|
Vintage Computers Any vintage computer systems, calculators, video games etc., but with an emphasis on 1980s and earlier equipment. |
|
Thread Tools |
10th Nov 2020, 3:17 pm | #1 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,119
|
Anyone know of an SC/MP disassembler please?
Looking for an SC/MP disassembler please. Back in the day I managed with the Jim Derosa basic one from 1978 but its not brilliant If all else fails I might have a go myself, I did a simple 6800 symbolic disassembler back in the early 90s which for what its worth I've posted, but I've got old & lazy since then
Cheers Phil Last edited by Phil__G; 10th Nov 2020 at 3:31 pm. |
11th Nov 2020, 2:33 am | #2 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,119
|
Re: Anyone know of an SC/MP disassembler please?
No suggestions so I made a start, working ok so far but I need to add symbols & data area handling...
|
11th Nov 2020, 10:06 am | #3 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,586
|
Re: Anyone know of an SC/MP disassembler please?
I don't know if this is part of the plan but it would be good to be able to tell it that areas with start 0x0000, end 0x0111 (for example) should be regarded as data and disassembled to .db statements rather than being disassembled into executable code. Maybe that's what you were already referring to.
If you're going to go mad and write a GUI disassembler, have a drop-down menu where areas which are known (or have been found) to be data can be defined. Also auto-generation of labels for jump destinations / memory storage locations etc, perhaps just by putting 'L' in front of the 4-digit ASCII address. |
11th Nov 2020, 3:17 pm | #4 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,119
|
Re: Anyone know of an SC/MP disassembler please?
Thanks G yes thats what I meant, probably similar to the 6800 one though its not as simple as merging code cos its so different in addressing modes and the pre-increment PC thing too... I will add the option of a PC offset but a GUI is unlikely, sorry , at one time I would have had the enthusiasm but for now I just need the fundamentals. SC/MP progs are usually quite small and very rarely go above the 4k page limit, so a little help goes a long way.
The actual reason I want a scamp disassembler is to try to work out stuff that I hand-coded 40+ years ago, didnt write any notes at the time (as you dont!) and now haven't the foggiest idea how it works! Cheers Phil |
11th Nov 2020, 4:14 pm | #5 |
Dekatron
Join Date: Sep 2010
Location: Cheltenham, Gloucestershire, UK.
Posts: 3,077
|
Re: Anyone know of an SC/MP disassembler please?
If you can find an old version of IDA Pro online you could write your own disassembler module for your processor. There is an example module bundled with IDA and the idea is to change the instruction codes to match the ones for your processor.
I wrote a custom IDA Pro disassembler module many years ago for a custom microcontroller used in a car ECU. It had a unique instruction set so I had to reverse engineer the instruction set and then write a disassembler module for IDA Pro. It took several days to write it in c but that's because I'm not very experienced in c programming. The benefit is that you then get the full features of IDA when you run the disassembler.
__________________
Regards, Jeremy G0HZU |
12th Nov 2020, 1:54 am | #6 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,119
|
Re: Anyone know of an SC/MP disassembler please?
Thanks Jeremy, I wasnt aware of that option, sounds interesting, like the opposite of TASM. But I've got far enough to be committed now, and whilst its usable in its current state I've a few bells & whistles to add...
Ta v much Phil |
19th Nov 2020, 1:51 am | #7 |
Heptode
Join Date: Oct 2011
Location: Culcheth, Cheshire, UK.
Posts: 654
|
Re: Anyone know of an SC/MP disassembler please?
I'm sure I saw a post here with scmpdis.zip attached.
Has it been deleted, or is it in a different post, or am I imagining things ? |
19th Nov 2020, 2:56 am | #8 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,119
|
Re: Anyone know of an SC/MP disassembler please?
I pulled it Buzby cos its already out of date. I'll upload it again asap!
Posting software is awkward when you cant edit posts. On other forums we keep the up-top-date copy in the first post of any software thread but thats not possible here so you end up with development steps throughout the thread. I know, I'll post it as a link, then I can update it as & when. It will be similar to my 6800 dis. Cheers Phil |
19th Nov 2020, 3:41 pm | #9 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,119
|
Re: Anyone know of an SC/MP disassembler please?
Working fine as far as its progressed, but more to do when time permits,
Needs to be run in DosBox. http://www.mccrash-racing.co.uk/files/scmpdis.zip |
19th Nov 2020, 10:37 pm | #10 |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Re: Anyone know of an SC/MP disassembler please?
Many years ago I wrote a disassembler for the 6502 that identified data areas by starting with a known execution address it followed the program flow and followed branches etc so that all memory addresses that were reachable via execution were marked as "code" and other areas could be marked as "data" or "code" by a configuration file. You could also add known symbols (i.e. hardware addresses or OS call locations) but the disassembler would generate other locations and labels in the manner Sirius suggested. The result was a file that could be fed back into an assembler. It also generated a symbol table of auto-generated addresses which you could use to create better labels in the config file as you identified what the routines etc were. You could also attach comments to addresses which would be added in the output file too. I managed a 90% full disassembly of the Commodore PET roms with help from Nick Hampshires "PET Revealed" book. I wish I could find it now, its on one of my hundreds of hard drives in storage......!
|
19th Nov 2020, 11:40 pm | #11 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,119
|
Re: Anyone know of an SC/MP disassembler please?
Hi Ian, yes thats what my 6800 symbolic disassembler does, posted the other day. When I've a quiet spell I intend to put the symbols translation part into the scamp disassembler so they work in the same way. It was only ever intended for a one-off disassembly job!
As a newcomer here I have been wondering about how software posts are received - in the company of so many brilliant minds, are trivial software contributions from old blokes in sheds welcome/discouraged/passively accepted/sneered at ? Cheers Phil |
20th Nov 2020, 12:36 am | #12 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,586
|
Re: Anyone know of an SC/MP disassembler please?
Unfortunately Phil, we are all old blokes in sheds nowadays. I have never written software for a living, which is quite sad given the head-start I had having a 'programmable computer' before most people had one but when it came to me having to start work the first job I landed was working as a repair technician in a radio and TV shop.
I liked that job so much that I have been doing it in one form or another for more or less the whole of my working life. Generally the only software I write is for myself, to support one hobby or another or to make some aspect of my life easier at work so I've never had to write anything to a professional standard, unfortunately. My view is that as long as I don't charge for something I've 'coded', people can take it or leave it, although I will usually try to fix problems if they are politely brought to my attention. I will also gratefully accept anything which someone else has written which happens to do something I need it to do. I believe Tim and Slothie have both written software for a living, Karen of course was a professional software / hardware engineer and there are quite a few software / embedded software people among the forum membership. |
20th Nov 2020, 1:29 am | #13 |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Re: Anyone know of an SC/MP disassembler please?
Provided software is relevant to the general topic and theme of the site then it doesn't really matter how elegant or clumsily written it is, provided it is useful or basically understandable. Its the knowledge thats coded into the program thats important. If someone wants to improve it, then they can. That said there's no specific section for software, you just need to find an appropriate place for it.
|
20th Nov 2020, 2:12 am | #14 | |
Heptode
Join Date: Oct 2011
Location: Culcheth, Cheshire, UK.
Posts: 654
|
Re: Anyone know of an SC/MP disassembler please?
Quote:
Cheers, Buzby |
|
20th Dec 2020, 3:30 am | #15 |
Octode
Join Date: May 2018
Location: Northampton, Northamptonshire, UK.
Posts: 1,444
|
Re: Anyone know of an SC/MP disassembler please?
I did recently see this cross assemble/disassemble library for many processors including the INS8060 / SC/MP.
https://github.com/tgtakaoka/libasm But it seems to have been designed for an Arduino / Linux etc. enviroment and not sure how much extra GUI etc. you might want on a PC. There doesn't really seem to be many other disassemblers out there for the SC/MP, although there is a recent assembler: https://www.sbprojects.net/sbasm/scmp.php Whereas a disassembler should be less work, not having to parse user source file and interpret it correctly. Although auto-assignment of labels etc and working out flow may be a bit more involved and where IDA(Pro) etc. is useful for more complex things And may also be worth looking at the Ghidra reverse-engineering toolkit that a free open-source version was made available to the public last year: https://ghidra-sre.org/ - Although this maybe focussed more on PC-systems, and requiring quite a bit of addition for the SC/MP |