If you need to clear the FB, there are many ways. My init code simply stores words of zero to the FB.
I thought that writing 0 to the frame buffers didn't do anything?
You could also use the VDP fill hardware.
Looking at the docs, it talks about VDP Fill Length, Start Address and Fill Data. At first I thought Fill Data was a pointer to an array of data but it's actually just a simple value? So it's pretty much a memset() as opposed to a memcpy()? Would this generally be the fastest way to clear video memory?
Be aware that writing bytes of zero to the FB does NOTHING. They are ignored. That was so that you could make simple copy routines for objects with transparent regions. The FB overwrite region is the same, except that it also ignores writes of words of zero.
Good to know. Testing confirms. Any idea what the overwrite region would be useful for?
About that 256 byte section at the start of the frame buffer, the one with the line addresses:
- Do they always need to be set to something?
- Setting them all to zero effectively sets the screen to just point to the first line of the frame buffer?
- are they typically used to do vertical scrolling? (with about 408 lines in 8bit mode?)
- is there a way to do horizontal scrolling of the frame buffer in hardware?
As for using both SH2s, I think I read that typically, the master SH2 performs game logic while the slave SH2 is used for rendering. How do you setup the slave SH2 to do this? Do any of the example projects you've posted (xrick, etc) do this?
Does gcc automatically use the hardware multiplier and divider or does it perform them in software?
How crappy is the floating point performance? Give up and just use fixed point?
From what I can see in your Wolfenstein and xRick ports, the rendering is done in an offscreen buffer and then copied to the frame buffer. Is there a reason/advantage of doing this instead of writing to the frame buffer directly?
thanks!