6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Nov 21, 2024 9:40 am

All times are UTC




Post new topic Reply to topic  [ 63 posts ]  Go to page Previous  1, 2, 3, 4, 5
Author Message
PostPosted: Sat Jun 13, 2020 5:52 pm 
Offline
User avatar

Joined: Fri Aug 03, 2018 8:52 am
Posts: 746
Location: Germany
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.

oh i see, it's the same/similar problem as with a binary file then. interesting.

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.

yea it's always trade-offs, it's in any programming environment.
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.

having a SBC is pretty cool, mine can run at 16MHz perfectly fine. though the ROM size is rather small at 8kB. i do have an expansion port so i could add more ROM via that...
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!


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 12, 2020 3:49 pm 
Offline
User avatar

Joined: Wed Sep 03, 2003 6:53 pm
Posts: 153
Location: Long Island, NY
Hi all --

I was thinking of doing a respin of the v2.7 of my board to reduce the size to ECB (160mmx100mm) based on my work on the Retrobrew board series (I've done a few board designs for that group). So, I wanted to update the BASIC to whatever is most current, recognizing that I have a lot of patches to accommodate Serial IEC and a DOS command interpreter, plus some commands for joysticks and AVR video. I downloaded the version from @floobydust earlier in this thread (the C02 version, but I also grabbed the similar non-C version), but is there a better version to use that doesn't use WDC tools?

I really like the TASM assembler and although I saw some complaints about it in the SBC forum, there is a 64-bit version that works with more modern Windows. So, I'd like to stick with that if I could.

But, maybe the better question is should I patch my own to whatever is considered the most current version of the code base, or start from scratch and graft-in all of the IEC stuff? Maybe that's Klaus' 2.22p4 -- not sure.

Thoughts?

Thanks!


Rich

_________________
Rich Cini
Build Master and maintainer of the Altair32 Emulation project
http://cini.classiccmp.org
http://altair32.classiccmp.org


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 12, 2020 7:19 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
Hi Rich,

Actually Klaus did a p5 patch version some time ago. I also integrated those patches into the last CMOS version I did (posted here: viewtopic.php?f=5&t=5760&start=15#p76030)

This version, in addition to the p5 patches, has some other updates, including a slight performance enhancement in the equivalent chrget routine, compliments of Mike Barry. It also has LOAD and SAVE implemented against the Xmodem-CRC code in my Monitor code, which could easily be swapped out to your IEC code.

As for WDC tools, everyone has their preferred toolset, but it's not difficult to change the source over to use a different assembler.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 63 posts ]  Go to page Previous  1, 2, 3, 4, 5

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: