floobydust wrote:
Hi Proxy,
I use a 32KB EEPROM for my C02 Pocket SBC which is addressed starting at $8000. The programmer wouldn't know where (in a memory map) that I would have it configured. So, logically, the programmer starts it at $0000, so it has an addressable range from $0000 - $7FFF. Meanwhile, the S19 record does have load address for locating the data in the EEPROM, which are in the $8000 - $FFFF range. Hence, you tell the programmer that the EEPROM has an addressable offset of $8000, so it addresses the 32KB EEPROM from $8000 - $FFFF. Hope this is clear.
I use a 32KB EEPROM for my C02 Pocket SBC which is addressed starting at $8000. The programmer wouldn't know where (in a memory map) that I would have it configured. So, logically, the programmer starts it at $0000, so it has an addressable range from $0000 - $7FFF. Meanwhile, the S19 record does have load address for locating the data in the EEPROM, which are in the $8000 - $FFFF range. Hence, you tell the programmer that the EEPROM has an addressable offset of $8000, so it addresses the 32KB EEPROM from $8000 - $FFFF. Hope this is clear.
floobydust wrote:
Code changes.... well, as I like to say, "you can't argue with success". Filling memory... sure, the INY is quicker, but you also need to load the Y reg first, so the code may be larger, depending on register contents on entry. Not using the Y register also implies you don't disturb it's contents. It's all trade-offs. For certain routines it's advantageous to code for speed, others better to code for smaller size. For a startup routine, I generally go for smaller size as it's a one-time execute. The character input routine which is used a lot with EhBasic... you're better off optimizing for speed. Not having to set or clear the carry flag explicitly saves time as the ASL A already set it. Adding the CMP for a linefeed is just a convenience, but if your emulator used a C/R instead, it would save some additional cycles as well.
another example, if you want a function that calculates the Sine of an 8 bit number you could either actually calculate it, or use that number as an index into an array of pre-calculated values.
floobydust wrote:
In short, there's usually multiple ways to code anything on the 6502 and the later CMOS versions with additional instructions and address modes are helpful. I tend to use the newer instructions/address modes quite a bit. I would certainly recommend putting together a small 65C02 based system at some point. My current SBC runs at 6MHz, although I have one SCC2691 that survives an 8MHz clock. My next SBC will use a newer NXP DUART and will hopefully run beyond 14MHz.
As always, enjoy the project and learn from everything you do.
As always, enjoy the project and learn from everything you do.
but currently i just want to get the 65C02 for Digital done so i got the Verilog code for it. and afterwards i want to look into FPGAs so i can either use my simualted CPU or finally build a simple VGA graphics card for my SBC... (and overall for anyone who wants a cheap VGA Card for their 65C02 based system)
either way i got a lot of fun projects ahead and i hope you have too!