pser1 escribió:In the black and white version of Tiburon/Shark I used the subsystem to draw on screen sending commands with data (yamauchi way)
and besides I have seen that there is some code related to an NMI control. I should re-read the source again because I have forgotten
almost everything about that version.
Maybe Malik could tell us the better way to move big images on the FM77AV, maybe with MMR or better using the SubSystem?
I've thought about it a bit, so here are some ideas for implementation.
Although direct access makes it much easier to communicate with subsystems, it also has its drawbacks.
FM77AV drops the CPU clock from 2MHz to 1.6MHz when MMR is enabled. (This has been improved in FM77AV20EX/40EX.)
Also, with direct access alone, the main CPU will be overloaded with processing, and the sub CPU will be wasted.
I think it's good to use both direct access and sub-CPU access.
Specifically, direct access is used when drawing the background all at once when switching between screens, and sub-CPU access is used to draw Chief Brody's pattern. (Disable MMR when not using direct access.)
The YAMAUCHI command can also be used for sub CPU access like FM-7, but FM77AV has an extended command, the IKEMOTO command, for executing code on the sub CPU side. (IKEMOTO is probably the developer's name, like YAMAUCHI, and was initially a hidden command.)
The IKEMOTO command can be used to secure an area for code placement and extend user commands for calling code.
Another thing to consider is reducing the pattern data size. The original Chief Brody is black and white, how many colors will you use when porting to FM77AV?
You don't have to use all 64 colors just because you're in 64-color dual screen mode. If only 8 colors (transparent color + 7 colors) are used, the number of bytes of pattern data can be halved. (Because the data for 6 plains becomes the data for 3 plains)
The 64-color 2-screen mode simulates background/foreground 2 screens by setting the analog palette. Since it is purely pseudo, depending on the palette settings, it can be applied to other than 2 screens with 64 colors. For example, an 8-color 4-screen mode is also possible.
If you have 8 colors each for foreground/background, VRAM will only use page0. (Assign B3, R3, G3 to the foreground and B2, R2, G2 to the background.)
All 48KB of page1 can be used as free memory. It's a good place to put Chief Brody's pattern data here.
(Set all palettes for page1 to black, so you don't see the pattern.)
This eliminates the need to transfer pattern data from the main CPU side to the sub CPU side each time a pattern is drawn, unlike the FM-7.
The main CPU simply specifies the pattern address of PAGE1 and the display address of PAGE0, and the subsequent processing (including things like VSYNC) is done by the sub CPU.
The architecture is little complex, but what do you think?
For the time being, I would like to introduce the IKEMOTO command and post a simple sample next time.