Dajgoro wrote:
A while ago ttlworks gave me a sbc2 clone that he made, and I was missing the 65C02.
After a while I got one from ebay, and today I finally decided to get it in working order.
I loaded the sbc2os (SBC25.ROM) in the eeprom, and it worked.
Next, I went to load the hello1 example, and it didn't work. I tried loading it into the Kowalski simulator, and it did run, but I could get anything on the console (0xF000 settings). I stepped though the code, and it does load the "Hello world!" characters in a loop to the accumulator, but no output. I made it go in a infinite do-while loop, and loaded the thing on the eeprom. I checked with the scope, there is no signal going out of the ACIA, and the cpu seems to be in some sort of a loop, as far as I can see on my scope.
The instructions say to load the program from 0x0200 which doesn't make much sense:
"When prompted, set the starting address to 0x0200 and you can either check the Clear all memory locations box or not."
I typed 0x8000 instead.
Also when I scroll down to 0xFFFF to see the jump vectors I noticed that the hex editor rolled over to 0x0000 and that there is some stuff down there, but then the entire simulator freezes and crashes.
I made two targets for the Simulator, Sim and Simrom. Sim loads code to RAM, starting at $0200. The code file is variable length, based on the size of the actual code. It does not set the vectors in page $FFxx. It also assumes all memory is RAM. You must load the generated cc65 file at location $0200. This kind of file would be loaded from an OS and executed.
Simrom creates a 32k ROM image file, no matter how big the source file is, and sets the vectors. The code will start at $8000, copy any initialized data to RAM, and continue running the Main program. You must load the generated cc65 file to address $8000. This code would auto-execute when reset is pressed (and released).
If you want to use the SBC2 and generate a program that is stored in ROM, the use the Simrom target and modify the cputc and cgetc routines to use the USART, located at $7F70-$7F73. You can borrow the routines from the SBC2OS source files if you like. The default RAM size is set to $7EFF, which equals the SBC-2's RAM.
Let me know if you need more help.
Daryl
_________________
Please visit my website ->
https://sbc.rictor.org/