Same here! Goplanes dropped from 384kb to 256kb.sega16 wrote:Thank you my rom size went down from 1.1mb to 896kb nice update I already like it and I have been using it for only 5 minutes.
Sega Genesis Dev Kit (SGDK)
Moderator: Stef
-
- Very interested
- Posts: 710
- Joined: Sat Feb 18, 2012 2:44 am
-
- Very interested
- Posts: 117
- Joined: Sun Jan 02, 2011 9:14 pm
- Contact:
BMP_FF_* functions works in 0.90 and fails in 0.91.
(Or maybe it's my fault?)out/src/main.o: In function `main':
main.c:(.text+0x70): undefined reference to `BMP_FF_init'
main.c:(.text+0x9c): undefined reference to `BMP_FF_setPixel'
main.c:(.text+0xb8): undefined reference to `BMP_FF_clear'
main.c:(.text+0x176): undefined reference to `BMP_FF_drawLine'
main.c:(.text+0x1fc): undefined reference to `BMP_FF_flip'
main.c:(.text+0x21c): undefined reference to `BMP_FF_clear'
main.c:(.text+0x2da): undefined reference to `BMP_FF_drawLine'
main.c:(.text+0x360): undefined reference to `BMP_FF_flip'
-
- Very interested
- Posts: 117
- Joined: Sun Jan 02, 2011 9:14 pm
- Contact:
Thanks, It works as expected
So the 128x160 pixels screen and doubled X resolution is due to the RAM limit, right?
I assume BMP_* functions calculates dinamically the position and the BMP_FF_* ones uses an array into RAM memory to flip data into VRAM memory. Performance between both function sets is huge.* The software bitmap engine permit to simulate a 128x160 pixels bitmap screen with doubled X resolution.<br>
* It uses a double buffer so you can draw to buffer while other buffer is currently blitting in video memory.<br>
* Requires ~41 KB of memory which is dynamically allocated.
So the 128x160 pixels screen and doubled X resolution is due to the RAM limit, right?
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
BMP_FF_xx means Bitmap Fast Fill where BMP_xx is a 'simple' bitmap software engine.
The Fast Fill mode uses plain tile for fast filling, it permits fast clear or fast rectangular region fill... The draw back is that simple pixel or line drawing is slower than with simple bitmap engine. Originally I wanted to do a 3D flat engine with BMP_FF methods but I never completed it...
The 128x160 X doubled resolution is for speed reason (simpler line drawing method), not related to memory
The Fast Fill mode uses plain tile for fast filling, it permits fast clear or fast rectangular region fill... The draw back is that simple pixel or line drawing is slower than with simple bitmap engine. Originally I wanted to do a 3D flat engine with BMP_FF methods but I never completed it...
The 128x160 X doubled resolution is for speed reason (simpler line drawing method), not related to memory
I get 15fps with this code (using Fusion):
Did I miss something in config.h or is it expected ?
Code: Select all
int main()
{
VDP_setScreenWidth256();
VDP_init();
VDP_setHInterrupt(0);
VDP_setHilightShadow(0);
BMP_init(BMP_ENABLE_ASYNCFLIP | BMP_ENABLE_EXTENDEDBLANK | BMP_ENABLE_FPSDISPLAY);
while(1)
{
u8* buffer = BMP_getWritePointer(0, 0);
BMP_flip();
}
return 0;
}
-
- Very interested
- Posts: 117
- Joined: Sun Jan 02, 2011 9:14 pm
- Contact:
15 fps is the expected using BMP_* functions.bioloid wrote:I get 15fps with this code (using Fusion):
Did I miss something in config.h or is it expected ?Code: Select all
int main() { VDP_setScreenWidth256(); VDP_init(); VDP_setHInterrupt(0); VDP_setHilightShadow(0); BMP_init(BMP_ENABLE_ASYNCFLIP | BMP_ENABLE_EXTENDEDBLANK | BMP_ENABLE_FPSDISPLAY); while(1) { u8* buffer = BMP_getWritePointer(0, 0); BMP_flip(); } return 0; }
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
BMP_FF_xx will give you better performance there (simple blit) but again it is optimized for fast filling so using lot of line or point will make performance worst than with BMP_xx...
Also the BMP stuff are software bitmap conversion so yeah it takes sometime, basically almost all CPU time is "waste" in main memory --> VRAM frame buffer transfer.
As explained in the documentation, BMP_ENABLE_EXTENDEDBLANK permit to extend VDP blanking period. This permits to reduce number of needed frame for bitmap frame buffer conversion and transfer to 4 frames (60/4=15 FPS).
Also with this flag the memory transfer is done only during "blanking" period so you can use free CPU time (active period) to fill your bitmap buffer
Also the BMP stuff are software bitmap conversion so yeah it takes sometime, basically almost all CPU time is "waste" in main memory --> VRAM frame buffer transfer.
As explained in the documentation, BMP_ENABLE_EXTENDEDBLANK permit to extend VDP blanking period. This permits to reduce number of needed frame for bitmap frame buffer conversion and transfer to 4 frames (60/4=15 FPS).
Also with this flag the memory transfer is done only during "blanking" period so you can use free CPU time (active period) to fill your bitmap buffer
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
cutting doBlitNorm() O_o ??bioloid wrote:Ok, thanks for the clear explanations, I'll downsize the rendering size then, I don't need playable framerate anyway
edit: Ok, got it : I get around 35fps and better when cutting doBlitNorm() a bit, but thats not my current pitfall so I leave it as it for now, looks good
you want to reduce the bitmap resolution ?
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
He really nice ! I am impatient to see the final result
The megadrive is really not designed to do bitmap drawing so it's always impressive to get that sort of effect out of it.
Did you saw the cube 3D sample ? I initially had a gouraud shaded version of it sometime ago but gouraud shading do not look really good with MD palette so i only keep flat shaded version.
The megadrive is really not designed to do bitmap drawing so it's always impressive to get that sort of effect out of it.
Did you saw the cube 3D sample ? I initially had a gouraud shaded version of it sometime ago but gouraud shading do not look really good with MD palette so i only keep flat shaded version.