So I am following this tutorial - Machine code game in 30 minutes.
https://chuntey.wordpress.com/2010/01/1 ... 0-minutes/
It's just the perfect level of detail for my current level of learning. And! Amazingly, the things it said to do all worked... until...
I'm using fuse emulator, version 1.5.1, on Kubuntu 18.04. After installing and running for the first time, I was getting a warning on startup saying that it couldn't find 48.rom and that it was defaulting to opense.rom? I think. That default rom worked fine though - just as the tutorial said. I loaded the 4 byte machine code program into 33000 and was able to call it through BASIC using:
Code: Select all
PRINT "Return value is "; USR 33000
But. The code doesn't work now.
I have, like, the simplest 4 byte program:
1,0,0,201
(That's:
Code: Select all
ld bc,0
ret
- Using File -> Load binary data... in fuse.
- Using a BASIC READ, POKE loop.
I'm looking in the memory in fuse using Machine -> Memory Browser... and I can actually see the bytes are in there, where they're supposed to be!
But when I do:
Code: Select all
PRINT USR 33000
Code: Select all
2 Variable not found, 0:1
Has anyone seen anything like this before?
Am I missing some simple difference in the way these two ROMs deal with USR calls?
Could I have a dodgy version of the ROM?
Maybe I should revert to the opense version of the rom again?
Really don't know. Any and all help appreciated.