Newsgroups: comp.sys.oric Subject: TAP file viewer and 6502 "decoders" Date: Sat, 10 Aug 2002 12:35:46 +0200 Message-ID: <email@example.com> > > As I cannot get my ORIC emulator to display on my TFT screens I wonder > > if there is any other way to view TAP files and potentially the 6502 > > code embedded in them (as I recall it I think it was done in DATA > > statements?) in Win98 environment. > > > > Also, do you know if there exist a 6502 "decoder" (or whatever the > > terminology is) to view old #code (in the DATA statemements) in a more > > readable ASSY-format? > > I don't think there exists anything that goes straight from > machine-code-in-DATAs-in-a-BASIC-program-in-a-.tap-file to > disassembly listing. However, bas2txt will do the first third of > the job (converting the .tap to a text file). Marko Mäkelä's d65 > will do the last third by disassembling 6502 machine code. > > What's missing is the glue that will convert BASIC DATAs to a > binary image suitable for d65. That can probably be done with > Perl (or whatever your scripting language of choice is). You'll find one at the end of this post. Here's how it's used : $ bas2txt chess-ii.tap $ grep DATA chess-ii.txt 8100 DATA#2000,#221B,#26C5,#28B0,#2BFD,#30AC,#3385,#35B4,#37F0,#3D53,#419A 8105 DATA#430F,#4907,#4B8E,#4E3E,#51F1,#565E,#5D50,#5F18,#6182 $ ./oricdadu chess-ii.txt >chess-ii.data $ atdump chess-ii.data 0000 0000 00 20 1B 22-C5 26 B0 28-FD 2B AC 30-85 33 B4 35 . ."Å&°(ý+¬0.3´5 0000 0010 F0 37 53 3D-9A 41 0F 43-07 49 8E 4B-3E 4E F1 51 ð7S=.A.C.I.K>NñQ 0000 0020 5E 56 50 5D-18 5F 82 61 ^VP]._.a It's very crude. It supports only three data types : unsigned bytes in decimal (0-255), bytes in hex (#00-#FF) and words in hex (#0000-#FFFF). Everything else is rejected with a warning message. If you're going to use this on a non-Unix OS, you should use -o instead of redirecting standard output, as standard output is in text mode by default (causing 0A -> 0D0A corruption).
2_046 2002-08-12 README 3_508 2002-08-12 oricdadu