I'm trying to port a CPP application to Saturn.
Before that, I've only worked with C language as far as Saturn is concerned.
There are two problems for me, a minor and a major.
So I modified the SGL files makefile and OBJECTS to compile C++ files and link them with sh-coff-g++.
There was a linking problem, so I setup Dev-CPP to build Saturn binaries - it works 😀 - and used it for building a little C++ test app instead.
There comes the minor problem: When calling SGL functions from within a cpp file(e.g. a file that has been compiled with sh-coff-g++), the linker says unknown reference, although sgl.a is specified.
Workaround: put all SGL function calls in C files and link those.
Already fixed, forget it:
Now the major problem is that the generated binary doesn't work. Here the errors from various emus:
GiriGir debugger 6a:
read access 22000000.L (PC = 1a6c)
undecoded read access at 8603240a.W (PC = 6012e5c)
-> strange Saturn logo flipping through the screen
Satourne:
unknown opcode while interrupting (master SH2) @0x00000002: 0x0200
Before that, I've only worked with C language as far as Saturn is concerned.
There are two problems for me, a minor and a major.
So I modified the SGL files makefile and OBJECTS to compile C++ files and link them with sh-coff-g++.
There was a linking problem, so I setup Dev-CPP to build Saturn binaries - it works 😀 - and used it for building a little C++ test app instead.
There comes the minor problem: When calling SGL functions from within a cpp file(e.g. a file that has been compiled with sh-coff-g++), the linker says unknown reference, although sgl.a is specified.
Workaround: put all SGL function calls in C files and link those.
Already fixed, forget it:
Now the major problem is that the generated binary doesn't work. Here the errors from various emus:
GiriGir debugger 6a:
read access 22000000.L (PC = 1a6c)
undecoded read access at 8603240a.W (PC = 6012e5c)
-> strange Saturn logo flipping through the screen
Satourne:
unknown opcode while interrupting (master SH2) @0x00000002: 0x0200