+SpiceWare Posted May 31, 2010 Share Posted May 31, 2010 As promised, here's the ARM code demo! I didn't finish what I wanted (the 3D projection isn't quite right), but it does show how to call ARM code, which is really all that matters. The ARM code is written in C. You'll need to have the appropriate compiler installed. I'm on OS X and used the GCC-3.3 Toolchain found on this page. Here's the direct link to the package. Linux/Windows users should use the one found here. You'll also need to update the Makefile. Specifics on what to change can be found at the top of main.c. The C code is found in the custom directory. One key thing you need to know about calling ARM Code is that the 6507 is being fed NOPs during the duration of the subroutine. This means the 6507's PC is advancing. If your code takes to long to execute, the 6507 will run past the end of cartridge space. This will crash your program. To maximize subroutine run time, have the STA CALLFUNCTION command towards the start of the 4K bank, this provices plenty of time to run an ARM function for the duration of the vertical blank. At the end of the ARM code, the 6507 is feed a JMP command to pick up after the STA CALLFUNCTION command. NOTE: DPC+ saw numerous revisions since this demo was posted, so this ROM is not compatible with the latest version of Stella. The DPC+ driver is part of the ROM image, so this ROM will work on a Harmony Cartridge. Source DPCplus ARM code demo.zip Binary DPC+ ARM Demo.bin 2 Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.