SamSuka
vitorvilela
vitorvilela

patreon


Super R-Type SA-1 is 95% done

Good news! Super R-Type for SA-1 Root is almost done. After a long time working on the RAM remaps and adapting the SA-1 -> SNES -> SPC700 communication, the game no longer crashes and I recently made the screen start rendering as it should. The game appears to work fluidly, without a hint of slowdown. The issues right now involves mostly visual glitches at the bosses.

The patch will feature asynchronous parallel communication between SA-1 and SNES, which allows to both processors execute tasks in parallel, accelerating even more the game. Certain jobs that only the SNES CPU can do such as PPU configuration, VRAM uploads and audio communication will do in parallel without stopping the SA-1 CPU from doing other jobs.

Since SA-1 runs at 10.74 MHz and the SNES CPU runs at 2.68 MHz, this parallel combination means that certain portions of the game will run up to "13.42 MHz"!

As you can see on the figure, SNES CPU-only processes run in parallel with other SA-1 processes. This is the approach that Super R-Type will use.

The patch will also be the first one I made where the SA-1 CPU is the master (coordinator) of the game, where it will be responsible for submitting tasks to the SNES CPU. Gradius III, Super Mario World and Contra III did the other way: the SNES CPU was the coordinator and was responsible for sending tasks to the SA-1 CPU.

As you can see on the figure, SA-1 coordinator mode (without parallelism) means that SA-1 CPU does all processes by default, except the ones that it can't and are transferred to the SNES CPU. SA-1 CPU waits while SNES CPU executes. This is a mostly fast-and-safe combination.

The differences may be confusing at start, but in resume SA-1 CPU as coordinator means that by default 100% of the game will run on the CPU except obligatory tasks are sent to the SNES CPU to process (e.g. DMA and part of Process B). The figure below should make clear the differences between SA-1 and SNES CPU as coordinator.

As you can see on the above figure, SNES CPU as coordinator means that the slower CPU still runs the game by default, except the slowest routines (e.g. Process C) which are sent to the SA-1 CPU. Super Mario World, Gradius III and Contra III patch uses this approach.

Of course, doing SA-1 CPU as coordinator and at the same time using asynchronous parallel mode means that the chances of bugs occurring is higher. In addition, if the SNES CPU and the SA-1 CPU accesses the same resource (BW-RAM, ROM and I-RAM) at the same time, the SA-1 will get a speed penalty. For that reason, I moved most of the critical routines to the WRAM side ensuring the SA-1 will keep running at 10.74 MHz.

Once the new model is done, newer SA-1 patched games will perform as faster as ever!

I have great hopes of the beta Super R-Type with SA-1 getting ready for tomorrow. I have been working full time during the holidays break just to offer you all the best Super R-Type experience using the SA-1 chip.

What are your thoughts about SA-1 as coordinator and expectations over Super R-Type? Don't forget to comment below and share with your friends!

This publication is open for all people (including non-patrons) to learn more a bit about SA-1 and how it can be used to accelerate SNES games.

Comments

The way you are reassigning roles of the CPU is really fascinating!

Fed


More Creators