6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Mon May 06, 2024 7:00 pm

All times are UTC




Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Wed Apr 21, 2021 9:51 pm 
Offline

Joined: Sat Apr 11, 2020 7:28 pm
Posts: 341
Directly from WDC themselves, after a exchange of emails with them I've been allowed to share these with you:

Quote:
Note the csamp.zip was meant to run on an old dev board (no longer in production or supported as it worked through the parallel port) or the simulator.


startups.zip
csamp.zip(*)

I hope this to be useful to anyone willing to give WDC Tools a (re)try.

Yes there is this issue of Windows, emulation, Wine and whatever else. Only the real coding experts will be able to judge if what they get by using WDC Tools is worth of just ignoring those mentioned issues.


(*)Includes some custom startup.asm files for the C samples


Top
 Profile  
Reply with quote  
PostPosted: Wed Apr 21, 2021 9:55 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10799
Location: England
Thanks for reaching out and for sharing the results.

It's good that WDC are happy to work with those forum members who are open to the possibility, and not put off by anything said by other forum members.

As ever, we should conduct ourselves here as if we were in public, and the targets of our criticisms were reading our posts, as well they might be.


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 22, 2021 12:02 am 
Offline
User avatar

Joined: Mon May 12, 2014 6:18 pm
Posts: 365
tokafondo, fantastic! I'm glad they got back to you so quickly after ignoring my emails. I'll give these a try and see if I can make them work.


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 22, 2021 1:21 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1928
Location: Sacramento, CA, USA
There's room for optimization in those 'c02 startup routines, if anyone feels like a friendly challenge. :wink:

[hint: '02s often count up to 0 more efficiently than down to -1]

Attachment:
startup02.asm.txt [3.71 KiB]
Downloaded 60 times


... or, better yet ...

Attachment:
startup02b.asm [3.68 KiB]
Downloaded 64 times


both untested, per usual ...

_________________
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 22, 2021 7:57 am 
Offline

Joined: Sat Apr 11, 2020 7:28 pm
Posts: 341
Is it always needed to copy code from ROM to RAM?

It seems like this routine has been thought as one for code already present when thw CPU has been reset.

But if I wanted to code something to be loaded from dynamic storage (disk or flash drive) then I wouldn't need to copy anythimg from ROM to RAM... Would I?


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 22, 2021 9:57 am 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1373
I've been using WDC Tools for over 8 years now. Is it perfect? No... then again, what set of development tools are? I bought the WDC Tools back in 2013 when they dropped the price to $49... and you needed a license file to run them. In short, I'm still using it for all of my own 65C02 development. I'm also using it to assemble/link code that others have written, which implies I end up modifying the source to run with WDC Tools. Examples are: Symon-III, Enhanced Basic, Commodore 1581 Disk drive firmware, some tools from DOS/65 and probably a few others.

For simplicity (in a way), I have a licensed copy of Windows 7 Pro 64-bit (OEM license). It was installed as a virtual machine under VMware Fusion. I've upgraded and moved this VM multiple times over the years, as I've built new machines, updated to newer versions of OSX and Fusion, but have never had to rebuild the VM itself, just enlarged the disk partition once, as space was getting tight. The same VM is also used for running the Dataman 40Pro programmer, WinCUPL, Express PCB and some other Windows-only software. Everyone has their own development process and configuration. I've opted to run OSX... but my VM could just as easily be used on a Linux workstation using VMware Workstation. I think I also managed to get it running in a Wine environment some years ago (as a test, not actual usage)... but disk mapping and such does require some additional attention.

As for needing to copy ROM and RAM... that depends on what you're building (hardware) or what you're writing software for. For my own hardware design, I clear out page zero on a coldstart and copy some vectors and hardware config data from ROM to RAM, then initialize hardware and enter a Monitor program. Loading from a storage device implies the same... however, you would probably need to initialize the (storage) device before loading data from it, unless you implement some other microcontroller to frontend the boot process before releasing the 65(C)02 from a hardware reset.

The WDC samples are intended for their SBC boards... I've got both their 65C02 and 65C816 SXBs, but really haven't done anything with them yet. In any case, not being a C programmer, I doubt I'll ever use the C compiler.

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


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 22, 2021 11:08 am 
Offline

Joined: Sat Apr 11, 2020 7:28 pm
Posts: 341
floobydust wrote:
I've been using WDC Tools for over 8 years now.


Thanks. Well, as instructions for using wine with the tools are in the other thread, could you please try to compile a program of yours with WDC tools under wine?

Thanks, again.


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 22, 2021 11:58 am 
Offline
User avatar

Joined: Mon May 12, 2014 6:18 pm
Posts: 365
No problem running code from ROM. The problem is storing variables in RAM. Startup.asm is needed to copy those initial values to RAM and do the other housekeeping things that happen before main runs.


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 22, 2021 1:53 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1373
tokafondo wrote:
floobydust wrote:
I've been using WDC Tools for over 8 years now.


Thanks. Well, as instructions for using wine with the tools are in the other thread, could you please try to compile a program of yours with WDC tools under wine?

Thanks, again.


Well, I don't need instructions.... I've done this before....

So, I had an older Ubuntu 18.04.02 build installed in a VM. I did the latest updates, then installed Wine and PlayOnLinux from the Ubuntu Applications app. I've never seen or used the PlayOnLinux app before, but it's a slick front end for Wine. Within a few minutes, I navigated thru it and had WDCTools installed. Note that POL sets up a virtual drive for the app... so I also copied my CO2 dev folder from OSX to the virtual drive (which is drive C: to WDC Tools). All I had to do was edit the *.wdc files (which Tide uses) to the correct drive/path and was able to launch Tide from POL, open up any of the *.wdc files and assemble/link as usual. Seems to work fine.

Attachment:
Screen Shot 2021-04-22 at 9.52.35 AM.png
Screen Shot 2021-04-22 at 9.52.35 AM.png [ 417.26 KiB | Viewed 1784 times ]

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


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 22, 2021 2:21 pm 
Offline
User avatar

Joined: Mon May 12, 2014 6:18 pm
Posts: 365
Quote:
The WDC samples are intended for their SBC boards... I've got both their 65C02 and 65C816 SXBs, but really haven't done anything with them yet. In any case, not being a C programmer, I doubt I'll ever use the C compiler.
The problem is not getting the assembler to work. The problem is the C compiler doesn't work without an assembly file mentioned in the documentation but missing from the install that tokafondo seems to have found for us.


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 22, 2021 4:40 pm 
Offline

Joined: Sat Apr 11, 2020 7:28 pm
Posts: 341
Thanks.

[quote=floobudyst]So, I had an older Ubuntu 18.04.02 build installed in a VM. I did the latest updates, then installed Wine and PlayOnLinux from the Ubuntu Applications app. I've never seen or used the PlayOnLinux app before, but it's a slick front end for Wine. Within a few minutes, I navigated thru it and had WDCTools installed. Note that POL sets up a virtual drive for the app... so I also copied my CO2 dev folder from OSX to the virtual drive (which is drive C: to WDC Tools). All I had to do was edit the *.wdc files (which Tide uses) to the correct drive/path and was able to launch Tide from POL, open up any of the *.wdc files and assemble/link as usual. Seems to work fine.[/quote]

I just apt-get'd wine and the rest of the process was done by command line. PlayOnLinux seems to be targeted to games, but it works anyway.

Yes, the apps seems to work, or do work as you said. Can be said that the compilers generate the same code under Wine than under a VM?


Top
 Profile  
Reply with quote  
PostPosted: Mon Apr 26, 2021 4:05 am 
Offline
User avatar

Joined: Mon May 12, 2014 6:18 pm
Posts: 365
I got my example program to compile and run with STARTUP02.asm. Thanks again, tokafondo! Here is what worked for me:
Quote:
WDC02AS -G -L -S -DUSING_02 STARTUP02.asm
WDC02CC -SP main.c
WDCLN -HI -CC000 -D0200, main.obj STARTUP02.obj -LC -T -V
The -DUSING_02 option for the assembler is important since zpage.inc needs it to know where to put zero page variables.


Top
 Profile  
Reply with quote  
PostPosted: Mon Apr 26, 2021 6:07 pm 
Offline
User avatar

Joined: Tue Jul 17, 2018 9:58 am
Posts: 104
Location: Long Island, NY
Druzyek wrote:
The -DUSING_02 option for the assembler is important since zpage.inc needs it to know where to put zero page variables.


Oh, neat. Does this obviate the need to modify zpage.inc and wdc02cc.cfg? I must have missed it in the docs.


Top
 Profile  
Reply with quote  
PostPosted: Mon Apr 26, 2021 11:00 pm 
Offline
User avatar

Joined: Mon May 12, 2014 6:18 pm
Posts: 365
I was able to get mine running without modifying them. (Btw, why in the world is there a project-specific cfg file in the bin directory??? Are we supposed to overwrite it every time we compile?) The linker was complaining about mismatched PAGE0 types and I noticed page.inc doesn't define it unless either USING_02 or the equivalent for the 134 is defined.

The next task is removing the hard coded data section addresses from startup.asm so it will use the address passed to the linker. Garth's term "mickeymouseity" is starting to grow on me.


Top
 Profile  
Reply with quote  
PostPosted: Tue Apr 27, 2021 3:46 pm 
Offline

Joined: Sat Apr 11, 2020 7:28 pm
Posts: 341
Druzyek wrote:
I got my example program to compile and run with STARTUP02.asm. Thanks again, tokafondo! Here is what worked for me:
Quote:
WDC02AS -G -L -S -DUSING_02 STARTUP02.asm
WDC02CC -SP main.c
WDCLN -HI -CC000 -D0200, main.obj STARTUP02.obj -LC -T -V
The -DUSING_02 option for the assembler is important since zpage.inc needs it to know where to put zero page variables.


Nice!! Thanks you for showing that getting the files was worth of the effort!!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 8 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: