Have you ever seen the movie "Apollo 13"? It's one of my favorite movies.
There are many sequences that I like, and many moments of my life match them perfectly. This is the time of the sequence where Ken Mattingly spends hours in a simulator putting together the procedures for starting up the cold, dead command module in time to bring the astronauts safely back to Earth.
Why I am talking about this sequence? Currently, I really feel like him here but instead of Amps, I am trying to find out KBs.
So, I am formatting the memory layout for both cores, and this is really challenging because the emulator really needs a double video buffer for rendering the game screen, then the emulated VDP needs 16KB in order to make the virtual console work, and 2KB mirrored for the Z80 used as system RAM. Moreover, there are variables and arrays here ad there in the emulator program.
I knew I would have gone crazy here.
To make matters worse, the CM4 and CM0+ need to share SRAM where the double buffer lives, because the CM4 renders into the back buffer, while the CM0+ streams the front buffer to the video. at the end of a frame, if there is s new one in the back buffer they are swapped, and so on.
The mechanism works, but what it's difficult to fit is the whole emulator, so some smart optimization is needed... I won't give up until the last day of the challenge
Top Comments