Search found 5 matches

by Milkybar
Mon Jul 23, 2012 7:19 am
Forum: Megadrive/Genesis
Topic: Using redirection vector table to jump interrupts to C func
Replies: 6
Views: 5003

I understand that as an interrupt can occur at any time that stack and any processor registers must be returned to the state at the beginning of the interrupt, to allow normal execution to resume. So if I intent to simply call a C function from an interrupt I need to manually store d0-d1/a0-a1 and t...
by Milkybar
Mon Jul 23, 2012 12:04 am
Forum: Megadrive/Genesis
Topic: Using redirection vector table to jump interrupts to C func
Replies: 6
Views: 5003

Thanks Chilly, I see my error now. I was confused that the sample code seemed to provide redirection vectors but did not actually use them. So my basic error was that a C code will automatically store and recover volatile processor registers (d0-d1/a0-a1). However in a ASM function it is up to the p...
by Milkybar
Sun Jul 22, 2012 10:29 pm
Forum: Megadrive/Genesis
Topic: Using redirection vector table to jump interrupts to C func
Replies: 6
Views: 5003

Using redirection vector table to jump interrupts to C func

Hi I am working with the TicTacToe C code sample to begin learning a little more about the lower levels of the system. I understand that the interrupt vectors like vblank are fixed in ROM. The standard way of getting round this (as I understand) is storing a redirection vector table in RAM. Then the...
by Milkybar
Wed Jul 18, 2012 6:43 pm
Forum: Tools
Topic: Update your Genesis/32X Toolchain!
Replies: 110
Views: 138911

Thank you very much. I copied dd.exe and got the error that the value 8k was not supported. Changed this to 8192 and everything works perfectly. I think I need to look a little more into how to adjust the makefile. As you have said 'make clean' removes all temporary files but also removes the final....
by Milkybar
Wed Jul 18, 2012 2:17 pm
Forum: Tools
Topic: Update your Genesis/32X Toolchain!
Replies: 110
Views: 138911

Dear all, I am trying to use Powerofrecall’s Windows GCC 4.5.2 toolchain binaries to compile C code to run on the MegaDrive from Windows7. As a test I am trying to make Chilly Willy’s MD_32X_Examples.7z TicTacToe using the provided makefile. I have the toolchain set up in C:\gen, souce code in C:\ge...