UK Vintage Radio Repair and Restoration Powered By Google Custom Search Vintage Radio and TV Service Data

Go Back   UK Vintage Radio Repair and Restoration Discussion Forum > Specific Vintage Equipment > Vintage Computers

Notices

Vintage Computers Any vintage computer systems, calculators, video games etc., but with an emphasis on 1980s and earlier equipment.

Closed Thread
 
Thread Tools
Old 10th Nov 2020, 3:17 pm   #1
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,079
Default 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.
Phil__G is online now  
Old 11th Nov 2020, 2:33 am   #2
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,079
Default 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...
Attached Thumbnails
Click image for larger version

Name:	discmp.jpg
Views:	121
Size:	39.6 KB
ID:	220097  
Phil__G is online now  
Old 11th Nov 2020, 10:06 am   #3
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default 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.
SiriusHardware is online now  
Old 11th Nov 2020, 3:17 pm   #4
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,079
Default 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
Phil__G is online now  
Old 11th Nov 2020, 4:14 pm   #5
G0HZU_JMR
Dekatron
 
Join Date: Sep 2010
Location: Cheltenham, Gloucestershire, UK.
Posts: 3,077
Default 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
G0HZU_JMR is offline  
Old 12th Nov 2020, 1:54 am   #6
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,079
Default 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
Phil__G is online now  
Old 19th Nov 2020, 1:51 am   #7
Buzby123
Heptode
 
Buzby123's Avatar
 
Join Date: Oct 2011
Location: Culcheth, Cheshire, UK.
Posts: 637
Default 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 ?
Buzby123 is offline  
Old 19th Nov 2020, 2:56 am   #8
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,079
Default 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
Phil__G is online now  
Old 19th Nov 2020, 3:41 pm   #9
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,079
Default 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
Phil__G is online now  
Old 19th Nov 2020, 10:37 pm   #10
Slothie
Octode
 
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
Default 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......!
Slothie is offline  
Old 19th Nov 2020, 11:40 pm   #11
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,079
Default 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
Phil__G is online now  
Old 20th Nov 2020, 12:36 am   #12
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default 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.
SiriusHardware is online now  
Old 20th Nov 2020, 1:29 am   #13
Slothie
Octode
 
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
Default 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.
Slothie is offline  
Old 20th Nov 2020, 2:12 am   #14
Buzby123
Heptode
 
Buzby123's Avatar
 
Join Date: Oct 2011
Location: Culcheth, Cheshire, UK.
Posts: 637
Default Re: Anyone know of an SC/MP disassembler please?

Quote:
... we are all old blokes in sheds nowadays ...
I'm not sure how to reply to that, so I won't.

Cheers,

Buzby
Buzby123 is offline  
Old 20th Dec 2020, 3:30 am   #15
ortek_service
Octode
 
ortek_service's Avatar
 
Join Date: May 2018
Location: Northampton, Northamptonshire, UK.
Posts: 1,392
Default 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
ortek_service is offline  
Closed Thread

Thread Tools



All times are GMT +1. The time now is 12:46 pm.


All information and advice on this forum is subject to the WARNING AND DISCLAIMER located at https://www.vintage-radio.net/rules.html.
Failure to heed this warning may result in death or serious injury to yourself and/or others.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright ©2002 - 2023, Paul Stenning.