ac.tomo Posted October 24, 2020 Share Posted October 24, 2020 3 hours ago, ac.tomo said: Many thanks Usotsuki, that's just the ticket. What I'd like to do now is dis-assemble the 3d demo to a text file, but to do that I need to know where the data and the code is situated. I have this table, how accurate it is I'm not sure: $7000 SIN/COS TABLE $7200 POINT & LINE DATA $7400 SHAPE TABLE $7A00 MULTI-PLICATION DATA $8200 PROJECTION TABLE But, I don't know where the main code sits. Any help much appreciated. If you require a link to the 'wire-graphic' source code, or the disk image for the full solid graphic images just ask. NB* I also understand that you can dis-assemble memory to a TeXT file in the debugger using the MD command, but does anyone know exactly how? Perhaps a rough memory map might be useful; maybe if someone could tell me the ROM addresses, BASIC, program memory etc., that would be great. Quote Link to comment Share on other sites More sharing options...
potatohead Posted October 24, 2020 Share Posted October 24, 2020 https://github.com/Michaelangel007/dcc6502 That will disassemble large programs. There are other tools out there. In general, reverse engineering is best done on a modern environment. You get the code into a binary file and begin to pick it apart. The Apple 2 will disassemble with its built in monitor too: http://wiki.apple2.org/index.php?title=System_Monitor Way back in the day, loading things into memory and looking at them with the monitor is how many people would begin the task you are. In general, you have a nice hint with the table info you have. I would start by looking at jumps. Program flow. You can map a lot of it that way. Then keep parsing. The Apple soft switches are good too. Searching for access to them may reveal initial code, for example. Quote Link to comment Share on other sites More sharing options...
potatohead Posted October 24, 2020 Share Posted October 24, 2020 http://www.kreativekorp.com/miscpages/a2info/memorymap.shtml Quote Link to comment Share on other sites More sharing options...
ac.tomo Posted October 24, 2020 Share Posted October 24, 2020 Thankyou for them links, but I cant make head or tail of the 1st two, the 3rd is very useful, thankyou. Quote Link to comment Share on other sites More sharing options...
potatohead Posted October 24, 2020 Share Posted October 24, 2020 Try CALL -151 [enter] D000L [enter] That will launch the monitor and disassemble memory starting at $D000 From there, you need to start reading up on tools to examine machine code. It is a non trivial task. Quote Link to comment Share on other sites More sharing options...
ac.tomo Posted October 25, 2020 Share Posted October 25, 2020 thankyou potatohead. Quote Link to comment Share on other sites More sharing options...
ac.tomo Posted October 25, 2020 Share Posted October 25, 2020 (edited) On 10/24/2020 at 12:02 AM, ac.tomo said: I typed this program into the apple basic screen and it does exactly what I need, but how can I print the dis-assembly to a text format file? Lastly, if I load the 3d demo, and then load up the MASTER file (BASIC I presume) will the 3d demo still be in the memory? On 10/24/2020 at 12:31 AM, The Usotsuki said: Probably; BASIC programs load from 0801 by default. If you want it to write to a text file on disk, change 40-50 to 40 INPUT "FILENAME: ";F$ 50 PRINT:PRINT CHR$(4)"OPEN"F$:PRINT CHR$(4)"WRITE"F$ and 90 to 90 PRINT:PRINT CHR$(4)"CLOSE" I typed in this program (to save to file), but I am getting error #9, break in 50. Sometimes it occurs straight away, othertimes after a short period, any advise? Edited October 25, 2020 by ac.tomo Quote Link to comment Share on other sites More sharing options...
The Usotsuki Posted October 25, 2020 Share Posted October 25, 2020 Error 9 is Disk Full. Quote Link to comment Share on other sites More sharing options...
ac.tomo Posted October 25, 2020 Share Posted October 25, 2020 Hmmm... that's odd. Perhaps you can help me direct the file to a particular folder. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.