Skip to content

Analyses ZX Spectrum TAP data file and converts BASIC blocks to listing in human-readable form.

License

Notifications You must be signed in to change notification settings

mosaicmap/zxs_tap2bas

Repository files navigation

zxs_tap2bas

This program analyses ZX Spectrum TAP data file. Converts BASIC blocks to listing in human-readable form.

This is a tool for software archaeologists.

Note: This program is not able to disassemble machine code data.

For more information about BASIC for ZX Spectrum see article Sinclair BASIC on Wikipedia And for more information about ZX Spectrum see article ZX Spectrum.


Requirements

  • Java 7 or newer

How to built

  1. install Java SE Development Kit (JDK), install Apache Maven
  2. install Netbeans IDE
  3. open project in Netbeans.
  4. be sure you are connected to the Internet
  5. select Default config
  6. select "Clean and Build Project (Shift-F11)" in the menu "Run".
  7. wait until maven download all dependencies and plugins. Then maven will create the build.
  8. result should be in the directory: target/dist-package.
  • Note: instead of steps 2, 3, 5, 6 you can simply run this command: mvn package

Special characters format

Format is compatible with tool called bas2tap.

  • UDG characters
    {A}, {B}, ..., {T}

  • copyright symbol
    {(C)}

  • pound symbol
    {pound}

  • mosaic graphics symbols
    {-1}, {-2}, ..., {-8}
    {+1}, {+2}, ..., {+8} (mosaic graphics symbol with shift)
    bas2tap_mosaic_graphics_screenshot

  • control (invisible) characters for text attributes settings
    {INK c}
    {PAPER c}
    {FLASH b}
    {BRIGHT b}
    {INVERSE b}
    {OVER b}
    {AT y,x}
    {TAB t}

    (c = color number; b = value 0 or 1; y,x = coordinates in text mode; t = tab num)


Simple example

java -jar zxs_tap2bas -i usr_char.tap --onlyBasic -o usr_char.bas

input usr_char.tap (as hexdump):

          00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0D 0F  0123456789ABCDEF
00000000: 13 00 00 00 20 20 20 20 20 20 20 20 20 20 e0 00  ....          ..
00000010: 00 80 e0 00 80 e2 00 ff 00 0b 11 00 e4 c4 30 30  ..............00
00000020: 30 31 31 30 30 30 0e 00 00 18 00 00 0d 00 0c 11  011000..........
00000030: 00 e4 c4 30 30 31 31 31 31 30 30 0e 00 00 3c 00  ...00111100...<.
00000040: 00 0d 00 0d 11 00 e4 c4 30 31 31 31 31 31 31 30  ........01111110
00000050: 0e 00 00 7e 00 00 0d 00 0e 11 00 e4 c4 31 31 30  ...~.........110
00000060: 31 31 30 31 31 0e 00 00 db 00 00 0d 00 0f 11 00  11011...........
00000070: e4 c4 31 31 31 31 31 31 31 31 0e 00 00 ff 00 00  ..11111111......
00000080: 0d 00 10 11 00 e4 c4 30 30 31 30 30 31 30 30 0e  .......00100100.
00000090: 00 00 24 00 00 0d 00 11 11 00 e4 c4 30 31 30 31  ..$.........0101
000000A0: 31 30 31 30 0e 00 00 5a 00 00 0d 00 12 11 00 e4  1010...Z........
000000B0: c4 31 30 31 30 30 31 30 31 0e 00 00 a5 00 00 0d  .10100101.......
000000C0: 00 13 24 00 eb 49 3d 30 0e 00 00 00 00 00 20 cc  ..$..I=0...... .
000000D0: 37 0e 00 00 07 00 00 3a e3 42 3a f4 c0 22 41 22  7......:.B:.."A"
000000E0: 2b 49 2c 42 3a f3 49 0d 00 14 0c 00 f5 c2 31 34  +I,B:.I.......14
000000F0: 34 0e 00 00 90 00 00 0d de                       4........

output usr_char.bas:

11 DATA BIN 00011000
12 DATA BIN 00111100
13 DATA BIN 01111110
14 DATA BIN 11011011
15 DATA BIN 11111111
16 DATA BIN 00100100
17 DATA BIN 01011010
18 DATA BIN 10100101
19 FOR I=0  TO 7:READ B:POKE USR "A"+I,B:NEXT I
20 PRINT CHR$ 144

About

Analyses ZX Spectrum TAP data file and converts BASIC blocks to listing in human-readable form.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages