6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 3:38 am

All times are UTC




Post new topic Reply to topic  [ 14 posts ] 
Author Message
PostPosted: Mon Jul 03, 2017 3:11 pm 
Offline
User avatar

Joined: Fri Mar 31, 2017 7:52 pm
Posts: 45
I'm tinkering with making some patches to a ROM (all FPGA and emulators at this point).

There are a couple of ways to get started, but it got me thinking about a BASIC 6502 disassembler program I had on my old OSI.

I was curious if anyone knew of something similar floating around these days. I've found a lot of disassemblers but none written in BASIC. I can port the object code and use something else, but this is a tool I wouldn't mind having in my tool kit.

Thanks,
Jim


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 03, 2017 3:32 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
You might find some useful starting points here:
http://mdfs.net/Software/Assembler/DisAssem/

(But beware, they will be in BBC Basic dialect.)

Edit: plenty of pointers in the reference section here on 6502.org, but not one written in Basic.
http://6502.org/tools/asm/#disassemblers


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 03, 2017 4:06 pm 
Offline

Joined: Sat May 02, 2015 6:59 pm
Posts: 134
I recall some BASIC listings for dissemblers in some of the early commodore 64 related magazines, I'll post back if I find any details.

I whipped up a 6502 disassembler and memory dump tool last week. I thought a transparent disassembler could be handy so it's written in VHDL as a hardware module. How much room do you have on your FPGA?


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 03, 2017 4:12 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Ah - FPGA - I missed that! For an in-FPGA hardware monitor, you might like to look into hoglet's ICE-T65 project, which has a second CPU running a monitor next to the 6502 core, and controllable with a command line over a serial connection. It could of course be adapted to other situations.
https://github.com/hoglet67/AtomBusMon/ ... ng-Started

Edit: the block diagram looks a bit complicated, perhaps. But the command line interface is straightforward: inspect or modify memory, disassemble, single-step, set breakpoints and watchpoints.


Attachments:
block_diagram.png
block_diagram.png [ 112.78 KiB | Viewed 5035 times ]
Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 03, 2017 4:19 pm 
Offline

Joined: Sat May 02, 2015 6:59 pm
Posts: 134
Sorry BigEd, I didn't intend to steer the thread off course, I only mentioned the FPGA as something of an aside, since Jim mentioned he had one on hand.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 03, 2017 4:24 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Quick - back to Basic! I agree with you, there must have been several type-in 6502 disassemblers back in the day. Unfortunately, I would expect any of them to contain some machine-specific features so they'd need to be ported to a new platform.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 03, 2017 4:29 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Here's one from the Micro 6502 Journal, Issue 5:
https://archive.org/stream/micro-6502-j ... 8#page/n26
"A Basic Disassembler for Apple and PET"

Just two pages of code to type in!


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 03, 2017 4:47 pm 
Offline

Joined: Sat May 02, 2015 6:59 pm
Posts: 134
Here's one for the VIC-20 from Your Commodore Magazine Issue 05 written in 63 lines of BASIC.
https://archive.org/stream/05-your-comm ... 1/mode/2up


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 03, 2017 9:28 pm 
Offline
User avatar

Joined: Fri Mar 31, 2017 7:52 pm
Posts: 45
Thanks everyone! I think the one from Micro Journal may well have been the starting point for the one I used to have. I worked at the Ohio Scientific dealer in Tulsa for a while when I started college and I think the local "user group" library had the old editions in it.

Leslie over on the osiweb.org forum has a good portion of an OSI C4P working in FPGA. The starting point was Grant Searle's Multicomp design which is on the Cyclone 2C5. Leslie has ported it and expanded it on a Terasic DE0-CV board which is running the Cyclone 5CEA4. I just ordered the Terasic board and haven't compiled the code, so I'm not sure what is left in terms of horsepower. (Although I would tend to think there is plenty. The thread stated with me talking about the almost-C1P I have running with Grant's original design. That was kind of pushing the seams of the Cyclone 2C5.)

So now it is reaching the point where we are talking about how to "connect" an emulated floppy drive. I'm kind of thinking that the best approach is to patch the ROM and OS65D code. That was the point where I was thinking the old BASIC disassembler would be nice to disassemble the bootstrap in the ROM. I'll admit it is more nostalgia than necessity (or even utility), but it seemed line an interesting sidetrack to things.

The AtomBusMon is really impressive! I had not come across that before. That is worth another discussion. I had looked at Klaus's ATMega implementation of a 6502 emulator and was thinking that I would either use that or Western Design Center's Mensch (which, as a standalone device is limited, but seems like if you just used it basically as a CPU would let you do some interesting things) as the heart of a build.

I haven't typed in a program from a magazine in probably two decades. Funny how I don't remember that being one of my favorite parts of the hobby back in the day... :-)

I'll post back when I have it running in case anyone else is interested at some point.

Thanks!
Jim


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 04, 2017 12:57 pm 
Offline
User avatar

Joined: Fri Mar 31, 2017 7:52 pm
Posts: 45
Just wanted to share a useful site:

https://www.onlineocr.net

It is free and I was able to upload the graphics files and got back a reasonably good set of text files. Definitely some clean up to do, but it saves some typing.

Jim


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 04, 2017 5:48 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
(I have in the past used archive.org for OCR - you can upload anything, and if you tick the "test item" box it will be deleted in 30 days. But often if it's an interesting document, you might as well leave it published.)


Top
 Profile  
Reply with quote  
PostPosted: Fri Jul 07, 2017 5:59 pm 
Offline
User avatar

Joined: Fri Mar 31, 2017 7:52 pm
Posts: 45
Just for completeness, I found that Ohio Scientific actually had a disassembler utility on the OS65D V3.3 disk set. The manual is here:

http://www.osiweb.org/manuals/OS65D%20Tutorial%20and%20Ref%20Manual.pdf

The listing is on pages 140 through 142.

Even thought it is OSI, I don't think this is the one I used back then. I'm actually working on the one from Journal, the Commodore one, and this one. Plan to also write a few other utilities in BASIC to dump and load HEX records, etc..

Jim


Top
 Profile  
Reply with quote  
PostPosted: Fri Jul 07, 2017 7:23 pm 
Offline

Joined: Sat May 02, 2015 6:59 pm
Posts: 134
Here's another OSI listing: COMPUTE! ISSUE 8 / JANUARY 1981 / PAGE 81

Original article:
http://www.osiweb.org/computes_gazette/ ... embler.pdf

And here it is again, already OCR'ed/retyped and ready to go.
http://www.atarimagazines.com/compute/i ... EMBLER.php


Top
 Profile  
Reply with quote  
PostPosted: Fri Jul 07, 2017 11:23 pm 
Offline
User avatar

Joined: Fri Mar 31, 2017 7:52 pm
Posts: 45
Thanks! I may have a new hobby collecting disassemblers written in BASIC. :-)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC


Who is online

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