├── .gitignore ├── Makefile ├── README.md ├── codedump.asm ├── datadump.asm ├── dataflashloader.asm ├── docs ├── codeflash-29f080a.pdf ├── dataflash-28SF040.pdf ├── loader.txt ├── modem-RCV336DPFSP.pdf └── yahoo-group.mbox ├── loader.asm ├── memdump.asm ├── teensy-loader ├── Makefile ├── teensy-loader.hex ├── teensy-loader.ino └── usb.cpp ├── util ├── app_extractor.rb ├── recvdump.c ├── sendload.c ├── tribble.c ├── tribble.h ├── tribble_getty.c ├── xpm_to_icon.rb └── z80_opcodes.txt ├── win32 ├── inpout32.dll ├── maildump.cpp ├── maildump.exe └── mailsend.exe └── z80 ├── codedump.bin ├── datadump.bin └── loader.bin /.gitignore: -------------------------------------------------------------------------------- 1 | obj/ 2 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # ASM code requires SDCC and its ASZ80 assembler 3 | # http://sdcc.sourceforge.net/ 4 | # 5 | 6 | ASZ80 ?= sdasz80 -l 7 | SDCC ?= sdcc -mz80 8 | 9 | OBJ ?= obj/ 10 | 11 | CFLAGS += -Wall 12 | 13 | IOPL_LIB= 14 | 15 | OS != uname 16 | 17 | .if ${OS} == "OpenBSD" 18 | .if ${MACHINE_ARCH} == "amd64" 19 | IOPL_LIB=-lamd64 20 | .elif ${MACHINE_ARCH} == "i386" 21 | IOPL_LIB=-li386 22 | .endif 23 | .endif 24 | 25 | all: objdir \ 26 | loader.bin codedump.bin datadump.bin memdump.bin dataflashloader.bin \ 27 | recvdump sendload tribble_getty 28 | 29 | objdir: 30 | @mkdir -p ${OBJ} 31 | 32 | clean: 33 | rm -f *.{map,bin,ihx,lst,rel,sym,lk,noi} recvdump sendload \ 34 | tribble_getty 35 | 36 | # parallel loader 37 | loader.rel: loader.asm 38 | $(ASZ80) -o $@ $> 39 | 40 | loader.ihx: loader.rel 41 | $(SDCC) --no-std-crt0 -o $@ $> 42 | 43 | loader.bin: loader.ihx 44 | objcopy -Iihex -Obinary $> $@ 45 | 46 | # dataflash loader 47 | dataflashloader.rel: dataflashloader.asm 48 | $(ASZ80) -o $@ $> 49 | 50 | dataflashloader.ihx: dataflashloader.rel 51 | $(SDCC) --no-std-crt0 -o $@ $> 52 | 53 | dataflashloader.bin: dataflashloader.ihx 54 | objcopy -Iihex -Obinary $> $@ 55 | 56 | 57 | # parallel dumpers, codeflash and dataflash 58 | codedump.rel: codedump.asm 59 | $(ASZ80) -o $@ $> 60 | 61 | codedump.ihx: codedump.rel 62 | $(SDCC) --no-std-crt0 -o $@ $> 63 | 64 | codedump.bin: codedump.ihx 65 | objcopy -Iihex -Obinary $> $@ 66 | 67 | datadump.rel: datadump.asm 68 | $(ASZ80) -o $@ $> 69 | 70 | datadump.ihx: datadump.rel 71 | $(SDCC) --no-std-crt0 -o $@ $> 72 | 73 | datadump.bin: datadump.ihx 74 | objcopy -Iihex -Obinary $> $@ 75 | 76 | memdump.rel: memdump.asm 77 | $(ASZ80) -o $@ $> 78 | 79 | memdump.ihx: memdump.rel 80 | $(SDCC) --no-std-crt0 -o $@ $> 81 | 82 | memdump.bin: memdump.ihx 83 | objcopy -Iihex -Obinary $> $@ 84 | 85 | # datadump/codedump receiver 86 | recvdump: util/recvdump.c util/tribble.c 87 | $(CC) $(CFLAGS) -o $@ $> $(IOPL_LIB) 88 | 89 | # program loader 90 | sendload: util/sendload.c util/tribble.c 91 | $(CC) $(CFLAGS) -o $@ $> $(IOPL_LIB) 92 | 93 | # tribble getty 94 | tribble_getty: util/tribble_getty.c util/tribble.c 95 | $(CC) $(CFLAGS) -o $@ $> $(IOPL_LIB) -lutil 96 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## mailstation-tools 2 | 3 | This is a collection of tools for working with Cidco Mailstation devices 4 | (primarily the DET1), from a Unix machine. 5 | 6 | It was mostly pieced together from the now-defunct 7 | [mailstation Yahoo Group](https://groups.yahoo.com/neo/groups/mailstation/info) 8 | and files downloaded from 9 | [Fybertech's Mailstation pages](http://www.fybertech.net/mailstation/). 10 | 11 | There is no license on most of the code gathered from these sources, but since 12 | it was all posted to the public Yahoo group, I am naively assuming it is in the 13 | public domain. 14 | 15 | (Except for `win32/inpout32.dll`, obtained from 16 | [its website](http://www.highrez.co.uk/downloads/inpout32/) which states "This 17 | product is released as open source (Freeware).") 18 | 19 | The Z80 assembly files have been updated to assemble on newer non-win32 20 | assemblers. 21 | 22 | ### Compiling 23 | 24 | Install [SDCC](http://sdcc.sourceforge.net/). 25 | 26 | Create an `obj` directory with `mkdir obj` and then run `make`. (If your system `make` is GNU Make, install and use `bmake` for this project.) 27 | 28 | ### Loading code onto the Mailstation 29 | 30 | See [loader.txt](docs/loader.txt) for a more thorough explanation. 31 | 32 | - Connect a Teensy loader or Laplink parallel port cable to the DB25 port on 33 | the Mailstation. 34 | 35 | - With the Mailstation off, hold down the `Function`+`Shift`+`T` keys and press 36 | the `Power` button to turn it on. Instead of booting up to the Cidco logo, 37 | you should be in the Diagnostic Main Menu. 38 | 39 | - Press `Shift`+`F5` (`F5` being the right-most gray key in the group of five 40 | under the screen) and you'll now be in the hex editor. 41 | 42 | - To make changes, press `g` and for the address, enter `710304x` (the `x` will 43 | not be visible) and press `Enter`. 44 | 45 | - Press `g` again and go to an application location such as `004000` or 46 | `00c000`. Press `s` to enter edit mode and type in the hex values at each 47 | location. When finished, press `s` again and the right-side menu will change 48 | back to an ASCII version of your new code. 49 | 50 | - Press `Back`, then `q` to quit and reboot. 51 | 52 | Assuming your application header is correct at `020000` (see 53 | [loader.txt](docs/loader.txt) for an explanation), the application should now be 54 | visible with the proper name (but a blank icon) under the Yahoo menu or the 55 | Extras menu (depending on the firmware version). 56 | 57 | ### Parallel port access 58 | 59 | A DB25 LapLink parallel port cable is required for this method of connection. 60 | 61 | A USB IEEE 1284 printer cable will *NOT* work, though a PCI parallel port card 62 | will (including via a Thunderbolt enclosure if on a laptop). 63 | If you are using a parallel port other than the standard port of `0x378`, 64 | supply the `-p ` option to the host programs with the port in 65 | hexadecimal. 66 | 67 | When connecting to the Mailstation via parallel port, host tools 68 | (`sendload`, `recvdump`, and `tribble_getty`) need direct access 69 | to the port to communicate with the Mailstation over the Laplink 70 | cable using `inb` and `outb` system calls. 71 | 72 | On OpenBSD, direct port access will require the `machdep.allowaperture` sysctl 73 | set to `1` or higher. On OpenBSD and Linux, these host tools will also have 74 | to be executed as root. 75 | 76 | ### USB Loader with Teensy 77 | 78 | If you don't have a computer with a parallel port, you can use a 79 | [Teensy 3.2](https://www.pjrc.com/store/teensy32.html) 80 | which will connect to your computer via USB, and to the Mailstation via its 81 | many digital I/O pins: 82 | 83 | |Teensy Pin|Mailstation Pin| 84 | |----------|---------------| 85 | |1|2| 86 | |2|3| 87 | |3|4| 88 | |4|5| 89 | |5|6| 90 | |7|10| 91 | |8|11| 92 | |9|12| 93 | |10|13| 94 | |11|15| 95 | |GND|25| 96 | 97 | - Install [Arduino-Makefile](https://github.com/sudar/Arduino-Makefile) and 98 | [Teensyduino](https://www.pjrc.com/teensy/teensyduino.html) 99 | 100 | - `cd teensy-loader && make` (`gmake` on OpenBSD) 101 | 102 | - Upload `build-*/teensy-loader_.hex` firmware with `teensyloader` and Teensy 103 | will reattach as a USB serial device: 104 | 105 | ```` 106 | umodem0 at uhub0 port 4 configuration 1 interface 0 "jcs Mailstation Loader" rev 1.10/2.75 addr 9 107 | ucom0 at umodem0 108 | ```` 109 | 110 | ### Included host-side tools in `util/` 111 | 112 | #### `sendload` 113 | 114 | Writes a binary program file through the parallel port or USB serial port in 115 | the Mailstation's "tribble" format, sending each byte 3 bits at a time. 116 | 117 | #### `recvdump` 118 | 119 | Receives a dump from `codedump`, `datadump`, and `memdump` programs executed 120 | on the Mailstation and writes the bytes received to `codedump.bin`, 121 | `datadump.bin`, or `memdump.bin`. 122 | 123 | ### Included Mailstation Z80 tools 124 | 125 | #### `loader.asm` 126 | 127 | Loader is used to load binary code over the parallel port into RAM and then 128 | execute it. 129 | 130 | You need to type the hex values of `z80/loader.bin` (tip: use `hexdump -C 131 | z80/loader.bin`) into one of the application slots as detailed above, then run 132 | the new Loader app on the Mailstation. 133 | 134 | Then run `obj/sendload ` to send your binary code over the 135 | parallel port and it will be executed on the Mailstation as soon as the 136 | transfer is done. 137 | 138 | #### `codedump.asm` 139 | 140 | Code Dump is used to read the contents of the 1Mb flash chip containing the 141 | Mailstation's code and send it over the parallel port. 142 | 143 | You need to type the hex values of `z80/codedump.bin` into one of the 144 | application slots as detailed above. 145 | 146 | Run `obj/recvdump code` to wait for the code dump to begin. 147 | 148 | Then run the new Code Dump app on the Mailstation and `recvdump` should show 149 | its progress as it reads the transmitted data and saves it to `codeflash.bin`. 150 | You may want to run it twice and compare checksums of the two resulting files. 151 | 152 | #### `datadump.asm` 153 | 154 | Data Dump is used to read the contents of the 512Kb flash chip containing the 155 | Mailstation's data area (containing downloaded programs, e-mails, etc.) and 156 | send it over the parallel port. 157 | 158 | You need to type the hex values of `z80/datadump.bin` into one of the 159 | application slots as detailed above. 160 | 161 | Run `obj/recvdump data` to wait for the data dump to begin. 162 | 163 | Then run the new Data Dump app on the Mailstation and `recvdump` should show 164 | its progress as it reads the transmitted data and saves it to `dataflash.bin`. 165 | You may want to run it twice and compare checksums of the two resulting files. 166 | 167 | #### `memdump.asm` 168 | 169 | Mem Dump is used to read the contents of the current 64Kb of memory. 170 | It does not read additional pages of memory but shows the current layout of 171 | code page 0, the slot `0x4000` and `0x8000` devices, and page 0 of RAM. 172 | 173 | You need to type the hex values of `z80/memdump.bin` into one of the 174 | application slots as detailed above. 175 | 176 | Run `obj/recvdump mem` to wait for the memory dump to begin. 177 | 178 | Then run the new Mem Dump app on the Mailstation and `recvdump` should show 179 | its progress as it reads the transmitted data and saves it to `mem.bin`. 180 | 181 | ### Extracting programs from `dataflash` dumps 182 | 183 | While most of the core functionality of the Mailstation lives on the codeflash 184 | and does not change, the Mailstation could download new programs through POP3 185 | (via their patented 186 | [ClipMail](https://patents.google.com/patent/US6697942) 187 | format) and store up to 5 of them at a time on the data flash. 188 | These are the same program slots that you overwrite with `loader`, `codedump`, 189 | or `datadump`. 190 | 191 | To extract program 0 (which lives at 0x0000) from `dataflash.bin`, run: 192 | 193 | util/app_extractor.rb -f dataflash.bin -a 0 194 | 195 | Each of the programs can be extracted with different `-a` values. 196 | 197 | `app_extractor` will dump assembly (in SDCC ASZ80 format) to re-create the 198 | application including a graphical representation of the icons. 199 | 200 | Unfortunately most of these programs were as basic as just showing a 201 | full-screen, pre-rendered image (which is represented as `icon1` in the 202 | assembly). 203 | There was no other functionality in most of these downloaded apps. 204 | 205 | .module app0 206 | 207 | .area _DATA 208 | .area _HEADER (ABS) 209 | .org 0x4000 210 | 211 | jp 0x7800 212 | .dw (icons) ; 0x4064 213 | .dw (caption) ; 0x400e 214 | .dw (dunno) ; 0x4009 215 | dunno: 216 | .db #0x00 217 | xpos: 218 | .dw #0x0000 219 | ypos: 220 | .dw #0x0000 221 | caption: 222 | .dw #0x0001 223 | .dw (endcap - caption - 6) ; calc caption len (#0x000a) 224 | .dw #0x0006 ; offset to first char 225 | .ascii "TV Listing" 226 | endcap: 227 | 228 | .org 0x4064 229 | 230 | icons: 231 | .dw #0x00ad ; size icon0 232 | .dw (icon0 - icons) ; offset to icon0 (0x0008) 233 | .dw #0x1043 ; size icon1 234 | .dw (icon1 - icons) ; offset to icon1 (0x00b5) 235 | icon0: 236 | .dw #0x0022 ; icon width 237 | .db #0x22 ; icon height 238 | 239 | .db #0x00, #0x00, #0x00, #0x00, #0x00 ; ........................................ 240 | .db #0xfc, #0xff, #0xff, #0x03, #0x00 ; ..########################.............. 241 | .db #0x02, #0x00, #0x00, #0x04, #0x00 ; .#........................#............. 242 | .db #0x01, #0x00, #0x00, #0x08, #0x00 ; #..........................#............ 243 | .db #0xf1, #0xff, #0xff, #0x18, #0x00 ; #...####################...##........... 244 | .db #0x59, #0x55, #0x55, #0x19, #0x00 ; #..##.#.#.#.#.#.#.#.#.#.#..##........... 245 | .db #0xa9, #0xfa, #0xab, #0x19, #0x00 ; #..#.#.#.#.#######.#.#.##..##........... 246 | .db #0x59, #0xfd, #0x57, #0x19, #0x00 ; #..##.#.#.#########.#.#.#..##........... 247 | .db #0xa9, #0x0e, #0xaf, #0x19, #0x00 ; #..#.#.#.###....####.#.##..##........... 248 | .db #0x59, #0x03, #0x5c, #0x19, #0x00 ; #..##.#.##........###.#.#..##........... 249 | .db #0xa9, #0x91, #0xa8, #0x19, #0x00 ; #..#.#.##...#..#...#.#.##..##........... 250 | .db #0x59, #0x01, #0x58, #0x19, #0x00 ; #..##.#.#..........##.#.#..##........... 251 | .db #0xa9, #0x91, #0xa8, #0x19, #0x00 ; #..#.#.##...#..#...#.#.##..##........... 252 | .db #0x59, #0x63, #0x54, #0x19, #0x00 ; #..##.#.##...##...#.#.#.#..##........... 253 | .db #0xa9, #0x06, #0xaa, #0x19, #0x00 ; #..#.#.#.##......#.#.#.##..##........... 254 | .db #0x59, #0x0d, #0x55, #0x19, #0x00 ; #..##.#.#.##....#.#.#.#.#..##........... 255 | .db #0xa9, #0xfa, #0xaa, #0x19, #0x00 ; #..#.#.#.#.#####.#.#.#.##..##........... 256 | .db #0xd9, #0x0f, #0x5f, #0x19, #0x00 ; #..##.######....#####.#.#..##........... 257 | .db #0x69, #0xf0, #0xa0, #0x39, #0x00 ; #..#.##.....####.....#.##..###.......... 258 | .db #0x59, #0x02, #0x64, #0x49, #0x00 ; #..##.#..#........#..##.#..#..#......... 259 | .db #0x69, #0x02, #0xa4, #0x85, #0x00 ; #..#.##..#........#..#.##.#....#........ 260 | .db #0xf1, #0xff, #0xff, #0x12, #0x01 ; #...####################.#..#...#....... 261 | .db #0x01, #0x00, #0x00, #0x21, #0x02 ; #.......................#....#...#...... 262 | .db #0x61, #0x1b, #0x80, #0x04, #0x03 ; #....##.##.##..........#..#.....##...... 263 | .db #0x01, #0x00, #0x40, #0x88, #0x03 ; #.....................#....#...###...... 264 | .db #0xfe, #0xff, #0x3f, #0xc1, #0x01 ; .#####################..#.....###....... 265 | .db #0xfc, #0xff, #0x1f, #0xe2, #0x00 ; ..###################....#...###........ 266 | .db #0xf8, #0xff, #0x1f, #0x70, #0x00 ; ...##################.......###......... 267 | .db #0x00, #0x00, #0x30, #0x38, #0x00 ; ....................##.....###.......... 268 | .db #0x00, #0x00, #0x60, #0x1c, #0x00 ; .....................##...###........... 269 | .db #0x00, #0x00, #0xc0, #0x0e, #0x00 ; ......................##.###............ 270 | .db #0x00, #0x00, #0x80, #0x07, #0x00 ; .......................####............. 271 | .db #0x00, #0x00, #0x00, #0x03, #0x00 ; ........................##.............. 272 | .db #0x00, #0x00, #0x00, #0x00, #0x00 ; ........................................ 273 | 274 | icon1: 275 | .dw #0x0140 ; icon width 276 | .db #0x68 ; icon height 277 | 278 | .db #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ................................................................................................................................................................................................................................................................................................................................ 279 | .db #0x00, #0x7f, #0x7e, #0xff, #0x03, #0xf8, #0x03, #0x7e, #0xb8, #0x02, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ........#######..######.##########.........#######.......######....###.#.#...................................................................................................................................................................................................................................................... 280 | .db #0xc0, #0xff, #0x3c, #0xfe, #0x07, #0xfe, #0x87, #0xff, #0x51, #0x05, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ......##########..####...##########......##########....##########...#.#.#.#..................................................................................................................................................................................................................................................... 281 | .db #0xe0, #0xe1, #0x18, #0x0c, #0x1e, #0x0f, #0xc7, #0xc3, #0x53, #0x05, #0xfc, #0xdd, #0xe1, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; .....####....###...##.....##.....####...####....###...####....####..#.#.#.#.......#######.###.###....###........................................................................................................................................................................................................................ 282 | .db #0xe0, #0xc0, #0x18, #0x0c, #0x1c, #0x07, #0xe6, #0x81, #0x07, #0x00, #0x24, #0x89, #0x40, #0x40, #0x80, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0xe0, #0x38, #0xe0, #0x7c, #0xe0, #0x38, #0x8e, #0x03 ; .....###......##...##.....##......###...###......##..####......####...............#..#..#..#...#......#.......#........#....#........................................................................................................................................###...###.......###..#####......###...###...###...###...... 283 | .db #0x70, #0xc0, #0x18, #0x0c, #0xb8, #0x03, #0xe6, #0x00, #0x07, #0x00, #0x20, #0x88, #0x40, #0x00, #0x80, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0x45, #0x14, #0x05, #0x14, #0x45, #0x51, #0x04 ; ....###.......##...##.....##.......###.###.......##..###........###..................#.....#...#......#................#............................................................................................................................................#...#.#...#...#.#...#.#.......#.#...#.#...#.#...#.#...#..... 284 | .db #0x70, #0x80, #0x18, #0x0c, #0xb8, #0x03, #0xf4, #0x00, #0x0f, #0x00, #0x20, #0x88, #0x40, #0x60, #0xdc, #0x9b, #0x0d, #0x9f, #0x03, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0x41, #0x04, #0x05, #0x04, #0x45, #0x11, #0x04 ; ....###........#...##.....##.......###.###........#.####........####.................#.....#...#......#......##...###.####.##..##.##....#####..###..................................................................................................................#...#.....#...#.....#.#.......#.....#.#...#.#...#.....#..... 285 | .db #0x30, #0x00, #0x18, #0x0c, #0xb0, #0x01, #0x70, #0x00, #0x0e, #0x00, #0x20, #0x50, #0x40, #0x40, #0x92, #0x10, #0x93, #0x48, #0x02, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0x41, #0x02, #0x3d, #0x02, #0x45, #0x11, #0x04 ; ....##.............##.....##........##.##...........###..........###.................#......#.#.......#.......#..#..#..#....#...##..#..#...#..#..#..................................................................................................................#...#.....#..#......#.####...#......#.#...#.#...#.....#..... 286 | .db #0x30, #0x00, #0x18, #0x0c, #0xb0, #0x01, #0x70, #0x00, #0x0e, #0x00, #0x20, #0x50, #0x40, #0x40, #0x86, #0x10, #0x91, #0xc8, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0x21, #0x82, #0x44, #0x82, #0x44, #0x11, #0x03 ; ....##.............##.....##........##.##...........###..........###.................#......#.#.......#.......#..##....#....#...#...#..#...#..##....................................................................................................................#...#....#...#.....#..#...#..#.....#..#...#.#...#...##...... 287 | .db #0x70, #0x00, #0x18, #0x0c, #0xb8, #0x03, #0xf0, #0x00, #0x0f, #0x00, #0x20, #0x50, #0x40, #0x40, #0x98, #0x10, #0x11, #0x07, #0x03, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0x11, #0x42, #0x40, #0x42, #0x44, #0x11, #0x04 ; ....###............##.....##.......###.###..........####........####.................#......#.#.......#.......#....##..#....#...#...#...###.....##..................................................................................................................#...#...#....#....#.......#..#....#...#...#.#...#.....#..... 288 | .db #0x70, #0x00, #0x18, #0x0c, #0xb8, #0x03, #0xe0, #0x00, #0x07, #0x00, #0x20, #0x20, #0x40, #0x48, #0x92, #0x10, #0x11, #0x41, #0x02, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0x09, #0x22, #0x40, #0x22, #0x44, #0x11, #0x04 ; ....###............##.....##.......###.###...........###........###..................#.......#........#....#..#..#..#..#....#...#...#...#.....#..#..................................................................................................................#...#..#.....#...#........#..#...#....#...#.#...#.....#..... 289 | .db #0xe0, #0x80, #0x18, #0x0c, #0x38, #0x07, #0xe4, #0x81, #0x07, #0x00, #0x70, #0x20, #0xe0, #0xe7, #0x0e, #0xbb, #0x3b, #0xdf, #0x01, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0x05, #0x11, #0x44, #0x11, #0x44, #0x51, #0x04 ; .....###.......#...##.....##.......###..###.......#..####......####.................###......#.......######..###.###....##.###.###.###..#####.###...................................................................................................................#...#.#.....#...#.....#...#.#...#.....#...#.#...#.#...#..... 290 | .db #0xe0, #0xe1, #0x18, #0x1c, #0x1e, #0x0f, #0xc7, #0xc3, #0x03, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x80, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0xe0, #0x7c, #0xf1, #0x39, #0xf1, #0x39, #0x8e, #0x03 ; .....####....###...##.....###....####...####....###...####....####.....................................................................#....#........................................................................................................................###..#####.#...#####..###..#...#####..###...###...###...... 291 | .db #0xc0, #0x7f, #0x3c, #0xfe, #0x0f, #0xfe, #0x83, #0xff, #0x01, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x80, #0x0f, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ......#########...####...###########.....#########.....##########......................................................................#####.................................................................................................................................................................................... 292 | .db #0x00, #0x3f, #0x7e, #0xff, #0x03, #0xf8, #0x01, #0x7e, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ........######...######.##########.........######........######................................................................................................................................................................................................................................................................. 293 | .db #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ................................................................................................................................................................................................................................................................................................................................ 294 | .db #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0x7f ; ###############################################################################################################################################################################################################################################################################################################################. 295 | .db #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ................................................................................................................................................................................................................................................................................................................................ 296 | .db #0x00, #0x00, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x01, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ....................#...................................................................................................#...................................................................................................#................................................................................................... 297 | .db #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ................................................................................................................................................................................................................................................................................................................................ 298 | .db #0x00, #0x00, #0x10, #0x06, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x61, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0x32, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ....................#....##.............................................................................................#....##.............................................................................................#....#..##.......................................................................................... 299 | .db #0x00, #0x00, #0x00, #0x09, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x90, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x4b, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ........................#..#................................................................................................#..#................................................................................................##.#..#......................................................................................... 300 | .db #0x00, #0x00, #0x10, #0xe9, #0xdc, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x91, #0xce, #0x0d, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0x4a, #0xe7, #0x06, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ....................#...#..#.###..###.##................................................................................#...#..#.###..###.##................................................................................#....#.#..#.###..###.##............................................................................. 301 | .db #0x00, #0x00, #0x00, #0x26, #0x25, #0x01, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0xe0, #0x52, #0x12, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x4a, #0x29, #0x09, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; .........................##..#..#.#..#..#....................................................................................###.#..#.#..#..#....................................................................................#.#..#.#..#.#..#..#............................................................................ 302 | .db #0x00, #0x00, #0x10, #0x29, #0x25, #0x01, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x81, #0x52, #0x12, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0x4a, #0x29, #0x09, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ....................#...#..#.#..#.#..#..#...............................................................................#......#.#..#.#..#..#...............................................................................#....#.#..#.#..#.#..#..#............................................................................ 303 | .db #0x00, #0x00, #0x00, #0xe9, #0x24, #0x01, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x40, #0x4e, #0x12, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x4a, #0x27, #0x09, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ........................#..#.###..#..#..#.....................................................................................#..###..#..#..#....................................................................................#.#..#.###..#..#..#............................................................................ 304 | .db #0x00, #0x00, #0x10, #0x26, #0x24, #0x01, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x21, #0x42, #0x12, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0x32, #0x21, #0x09, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ....................#....##..#....#..#..#...............................................................................#....#...#....#..#..#...............................................................................#....#..##..#....#..#..#............................................................................ 305 | .db #0x00, #0x00, #0x00, #0x20, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x02, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x01, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; .............................#...................................................................................................#......................................................................................................#....................................................................................... 306 | .db #0x00, #0x00, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x01, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ....................#...................................................................................................#...................................................................................................#................................................................................................... 307 | .db #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55 ; #.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#. 308 | .db #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ................................................................................................................................................................................................................................................................................................................................ 309 | .db #0x00, #0x00, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x40, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x01, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ....................#.................................................#.................................................#...................................................................................................#................................................................................................... 310 | .db #0x8c, #0xc7, #0x81, #0x81, #0x13, #0x00, #0x08, #0x00, #0x00, #0x0c, #0x00, #0x00, #0x40, #0x01, #0x00, #0x1c, #0x00, #0x00, #0xe0, #0x80, #0x40, #0x00, #0x09, #0x00, #0x1c, #0x20, #0x00, #0xc0, #0x14, #0x3d, #0x07, #0x9e, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ..##...####...###......##......###..#..............#......................##..........................#.#.................###........................###.......#......#.........#..#..............###........#................##..#.#...#.####..###......####..#................................................................ 311 | .db #0x8c, #0x28, #0x52, #0x42, #0x04, #0x00, #0x08, #0x00, #0x40, #0x0c, #0x00, #0x00, #0x40, #0x00, #0x00, #0x89, #0x00, #0x00, #0x10, #0x81, #0x40, #0x00, #0x08, #0x00, #0x22, #0x20, #0x00, #0xd0, #0x14, #0x45, #0x09, #0xa2, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ..##...#...#.#...#..#.#..#....#...#................#..................#...##..........................#.................#..#...#....................#...#......#......#............#.............#...#.......#..............#.##..#.#...#.#...#.#..#.....#...#.#................................................................ 312 | .db #0x92, #0x28, #0x40, #0x42, #0xd0, #0xcd, #0xc9, #0x00, #0x00, #0x12, #0x63, #0x4c, #0x73, #0x1d, #0x00, #0x48, #0x6e, #0x60, #0x10, #0x98, #0xcc, #0x69, #0x5d, #0x02, #0x02, #0x73, #0x00, #0x40, #0xa5, #0x44, #0x11, #0xa2, #0x92, #0x01, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; .#..#..#...#.#........#..#....#.....#.###.##..###..#..##.................#..#...##...##...##..#.##..###.#.###..............#..#..###.##......##.....#......##..#..##..###..#.##.#.###.#..#.......#......##..###...............#.#.#..#.#..#...#.#...#....#...#.#.#..#..##....................................................... 313 | .db #0x92, #0x27, #0x90, #0x81, #0x53, #0x52, #0x2a, #0x01, #0x40, #0x92, #0x94, #0xd2, #0x48, #0x25, #0x00, #0x09, #0x92, #0x80, #0x10, #0xa4, #0x52, #0x1a, #0x49, #0x02, #0xb2, #0x24, #0x00, #0x50, #0x45, #0x3c, #0x11, #0x9e, #0x52, #0x02, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; .#..#..####..#......#..##......###..#.#..#..#.#..#.#.#..#.............#..#..#..#..#.#..#.#..#.##...#..#.#.#..#..........#..#.....#..#..#.......#....#.....#..#.#.#..#.#..#.##...#..#..#..#.......#..##.#..#..#..............#.#.#.#...#...####..#...#....####..#.#..#.#..#...................................................... 314 | .db #0x9e, #0x28, #0x40, #0x02, #0x54, #0x52, #0xea, #0x01, #0x00, #0x9e, #0x10, #0x52, #0x48, #0x25, #0x00, #0x08, #0x92, #0xe0, #0x10, #0xbc, #0x5e, #0x0a, #0x49, #0x1a, #0xa2, #0x27, #0x00, #0x40, #0x46, #0x04, #0x11, #0xa2, #0xd2, #0x03, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; .####..#...#.#........#..#........#.#.#..#..#.#..#.#.####................####..#....#....#..#.#....#..#.#.#..#.............#.....#..#..#.....###....#.....####.#.####.#..#.#....#..#..#..#.##....#...#.####..#................#..##...#...#.....#...#....#...#.#.#..#.####...................................................... 315 | .db #0xa1, #0x28, #0x52, #0x42, #0x54, #0xd2, #0x29, #0x00, #0x40, #0xa1, #0x94, #0x52, #0x48, #0x25, #0x00, #0x09, #0x92, #0x90, #0x10, #0x85, #0x42, #0x0a, #0x89, #0x13, #0xa2, #0x20, #0x00, #0x50, #0x46, #0x04, #0x09, #0xa2, #0x52, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; #....#.#...#.#...#..#.#..#....#...#.#.#..#..#.###..#.#................#.#....#.#..#.#..#.#..#.#....#..#.#.#..#..........#..#.....#..#..#....#..#....#...#.#....#.#....#..#.#....#..#...###..#....#...#.#.....#..............#.#..##...#...#.....#..#.....#...#.#.#..#.#......................................................... 316 | .db #0xa1, #0xc7, #0x81, #0x81, #0x53, #0x52, #0xc8, #0xa0, #0x02, #0x21, #0x63, #0x4c, #0x70, #0xa5, #0x0a, #0x1c, #0x92, #0xe0, #0xe0, #0x98, #0xcc, #0x09, #0x11, #0x0a, #0x1c, #0x43, #0xa8, #0x40, #0x44, #0x04, #0x07, #0x9e, #0x9c, #0x01, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; #....#.####...###......##......###..#.#..#..#.#....#..##.....#.#.#......#....#..##...##...##..#.....###.#.#..#.#.#.#......###....#..#..#.....###.....###...##..#..##..###..#....#...#....#.#......###...##....#....#.#.#......#...#...#...#.....###......####..#..###..##....................................................... 317 | .db #0x00, #0x00, #0x10, #0x00, #0x00, #0x40, #0x00, #0x00, #0x40, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x01, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x80, #0x01, #0x00, #0x00, #0x00, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ....................#.........................#.......................#.................................................#..............................................................##...................................#................................................................................................... 318 | .db #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ................................................................................................................................................................................................................................................................................................................................ 319 | .db #0x00, #0x00, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x40, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x01, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ....................#.................................................#.................................................#...................................................................................................#................................................................................................... 320 | .db #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55 ; #.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#. 321 | .db #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ................................................................................................................................................................................................................................................................................................................................ 322 | .db #0x00, #0x00, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x01, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ....................#...................................................................................................#...................................................................................................#................................................................................................... 323 | .db #0xce, #0xe3, #0x00, #0x62, #0x38, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x7c, #0x01, #0xc0, #0x01, #0x00, #0xa0, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x02, #0x08, #0x04, #0x00, #0x18, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; .###..####...###.........#...##....###....................................................................................#####.#.............###....................#.#.........................................................#.........#......#................##........................................................... 324 | .db #0x51, #0x14, #0x11, #0x62, #0x44, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x11, #0x01, #0x20, #0x02, #0x00, #0x20, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0x02, #0x08, #0x00, #0x00, #0x18, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; #...#.#...#.#...#...#....#...##...#...#.................................................................................#...#...#............#...#...................#......................................................#....#.........#.......................##........................................................... 325 | .db #0x41, #0x14, #0x00, #0x92, #0x04, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0xc7, #0x20, #0x48, #0xa6, #0xb9, #0xcc, #0x01, #0x00, #0x00, #0x00, #0x00, #0x00, #0x4a, #0xce, #0x75, #0x1c, #0x24, #0x37, #0x09, #0x00, #0x00, #0x00, #0x00, #0x00 ; #.....#...#.#............#..#..#..#.........................................................................................#...###...##.....#.....#..#..##..#.##..###.#..##..###................................................#.#..#..###..###.#.###...###.....#..#..###.##..#..#............................................ 326 | .db #0xc1, #0xe3, #0x10, #0x92, #0x64, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x11, #0x29, #0x21, #0x4b, #0x68, #0xa4, #0x50, #0x02, #0x00, #0x00, #0x00, #0x00, #0x10, #0x4a, #0x29, #0x95, #0x12, #0x24, #0x49, #0x09, #0x00, #0x00, #0x00, #0x00, #0x00 ; #.....####...###....#....#..#..#..#..##.................................................................................#...#...#..#.#..#....#..##.#..#....#.##...#..#.#....#.#..#..........................................#....#.#..#.#..#.#..#.#.#..#.#..#.....#..#..#..#..#.#..#............................................ 327 | .db #0x41, #0x04, #0x01, #0xf2, #0x44, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0xe9, #0x21, #0x4a, #0x2e, #0xa4, #0x5c, #0x02, #0x00, #0x00, #0x00, #0x00, #0x00, #0x4a, #0x29, #0x95, #0x12, #0x3c, #0x49, #0x09, #0x00, #0x00, #0x00, #0x00, #0x00 ; #.....#...#.....#........#..####..#...#.....................................................................................#...#..#.####....#...#.#..#..###.#....#..#.#..###.#..#...............................................#.#..#.#..#.#..#.#.#..#.#..#.....####..#..#..#.#..#............................................ 328 | .db #0x51, #0x14, #0x51, #0x0a, #0x45, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x11, #0x29, #0x20, #0x4a, #0x29, #0xa4, #0x52, #0x02, #0x00, #0x00, #0x00, #0x00, #0x50, #0x4a, #0xc9, #0x95, #0x1c, #0x42, #0x49, #0x0e, #0x00, #0x00, #0x00, #0x00, #0x00 ; #...#.#...#.#...#...#.#..#.#....#.#...#.................................................................................#...#...#..#.#.......#...#.#..#.#..#.#....#..#.#.#..#.#..#..........................................#.#..#.#..#.#..#..###.#.#..#..###....#....#.#..#..#..###............................................ 329 | .db #0xce, #0xe3, #0x80, #0x09, #0x39, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0xc9, #0xc0, #0x71, #0x2e, #0xb8, #0x5c, #0x02, #0x00, #0x00, #0x00, #0x00, #0x80, #0x71, #0x0e, #0x95, #0x10, #0x42, #0x49, #0x08, #0x00, #0x00, #0x00, #0x00, #0x00 ; .###..####...###.......##..#....#..###......................................................................................#...#..#..##......###...###..###.#.....###.#..###.#..#.............................................##...###..###....#.#.#..#....#....#....#.#..#..#....#............................................ 330 | .db #0x00, #0x00, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x01, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0x00, #0xe0, #0x00, #0x0e, #0x00, #0x00, #0x06, #0x00, #0x00, #0x00, #0x00, #0x00 ; ....................#...................................................................................................#...................................................................................................#................###.........###.....................##............................................. 331 | .db #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ................................................................................................................................................................................................................................................................................................................................ 332 | .db #0x00, #0x00, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x01, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ....................#...................................................................................................#...................................................................................................#................................................................................................... 333 | .db #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55 ; #.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#. 334 | .db #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ................................................................................................................................................................................................................................................................................................................................ 335 | .db #0x00, #0x00, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x01, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ....................#...................................................................................................#...................................................................................................#................................................................................................... 336 | .db #0x8f, #0x11, #0x01, #0x03, #0x00, #0x80, #0x00, #0x00, #0x38, #0x04, #0x02, #0x00, #0x00, #0x00, #0x00, #0x18, #0x04, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x40, #0x00, #0x00, #0x84, #0x07, #0x00, #0x00, #0x00, #0x00, #0x40, #0x00, #0x00, #0x00 ; ####...##...#...#.......##.....................#...................###....#......#.........................................##.....#...........................................................................................#...................#....####...........................................#......................... 337 | .db #0x41, #0x12, #0x11, #0x03, #0x00, #0x00, #0x00, #0x00, #0x10, #0x04, #0x02, #0x00, #0x00, #0x00, #0x00, #0x25, #0x06, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x50, #0x00, #0x00, #0x84, #0x08, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; #.....#..#..#...#...#...##..........................................#.....#......#......................................#.#..#...##.........................................................................................#.#...................#....#...#.................................................................... 338 | .db #0x21, #0xa4, #0x80, #0xe4, #0xc6, #0xb4, #0x8c, #0x39, #0x10, #0x67, #0x02, #0x00, #0x00, #0x00, #0x00, #0x20, #0x05, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x40, #0x30, #0xc6, #0x84, #0xa8, #0x19, #0xd7, #0xcc, #0xcd, #0x4d, #0xc7, #0x01, #0x00 ; #....#....#..#.#.......#..#..###.##...##..#.##.#..##...##..###......#...###..##..#...........................................#..#.#...........................................................................................#.....##...##...##..#....#...#.#.##..##...###.#.##..##..###.##..###.##..#.###...###............... 339 | .db #0x27, #0x44, #0x90, #0x24, #0x29, #0x8d, #0x12, #0x4a, #0x90, #0x94, #0x02, #0x00, #0x00, #0x00, #0x00, #0x91, #0x04, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x50, #0x48, #0x09, #0x85, #0x67, #0xa4, #0x34, #0x50, #0x52, #0x52, #0x29, #0x01, #0x00 ; ###..#....#...#.....#..#..#..#..#..#.#..#.##...#.#..#....#.#..#.....#..#..#.#..#.#......................................#...#..#..#.........................................................................................#.#....#..#.#..#....#.#....####..##...#..#.#..#.##......#.#..#..#.#..#..#.#.#..#.#..#............... 340 | .db #0x21, #0xa4, #0x80, #0x27, #0xe9, #0x85, #0x82, #0x4b, #0x90, #0x94, #0x02, #0x00, #0x00, #0x00, #0x00, #0x88, #0x07, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x40, #0x48, #0xc1, #0x85, #0x20, #0xa4, #0x14, #0x5c, #0x52, #0x52, #0x29, #0x01, #0x00 ; #....#....#..#.#.......####..#..#..#.####.#....#.#.....###.#..#.....#..#..#.#..#.#.........................................#...####...........................................................................................#....#..#.#.....###.#....#.....#....#..#.#..#.#.....###.#..#..#.#..#..#.#.#..#.#..#............... 341 | .db #0x41, #0x12, #0x51, #0x28, #0x29, #0x84, #0x52, #0x4a, #0x90, #0x94, #0x02, #0x00, #0x00, #0x00, #0x00, #0x05, #0x04, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x50, #0x48, #0x29, #0x85, #0x20, #0x24, #0x17, #0x52, #0x52, #0x52, #0xc9, #0x01, #0x00 ; #.....#..#..#...#...#.#....#.#..#..#.#....#....#.#..#.#..#.#..#.....#..#..#.#..#.#......................................#.#.......#.........................................................................................#.#....#..#.#..#.#..#.#....#.....#....#..#..###.#....#..#.#..#..#.#..#..#.#.#..#..###............... 342 | .db #0x81, #0x11, #0x41, #0x28, #0xc9, #0x84, #0x8c, #0x4b, #0x38, #0x67, #0x02, #0x00, #0x00, #0x00, #0x00, #0x3c, #0x04, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0xc0, #0x33, #0xc6, #0x85, #0x20, #0x18, #0x14, #0x5c, #0x52, #0x52, #0x09, #0x01, #0x00 ; #......##...#...#.....#....#.#..#..#..##..#....#..##...###.#..#....###..###..##..#........................................####....#...........................................................................................####..##...##...###.#....#.....#.....##.....#.#.....###.#..#..#.#..#..#.#.#..#....#............... 343 | .db #0x00, #0x00, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x01, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0x00, #0x00, #0x00, #0x00, #0x80, #0x03, #0x00, #0x00, #0x00, #0xe0, #0x00, #0x00 ; ....................#...................................................................................................#...................................................................................................#..........................................###...................................###................ 344 | .db #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ................................................................................................................................................................................................................................................................................................................................ 345 | .db #0x00, #0x00, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x01, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ....................#...................................................................................................#...................................................................................................#................................................................................................... 346 | .db #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55 ; #.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#. 347 | .db #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ................................................................................................................................................................................................................................................................................................................................ 348 | .db #0x00, #0x00, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x01, #0x00, #0x00, #0x00, #0x00, #0x00, #0x04, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ....................#...................................................................................................#.................................................#.................................................#................................................................................................... 349 | .db #0xd3, #0xe3, #0xc0, #0x17, #0x00, #0x82, #0x00, #0x10, #0x30, #0x80, #0x00, #0x00, #0x00, #0x00, #0x00, #0x3c, #0x00, #0x40, #0x00, #0x00, #0x00, #0xc0, #0x20, #0xc2, #0x81, #0x01, #0x00, #0xc0, #0x01, #0x04, #0x14, #0x00, #0x98, #0x1e, #0x07, #0x00, #0x00, #0x00, #0x00, #0x00 ; ##..#.####...###......#####.#............#.....#............#.......##.........#..........................................####................#...............................##.....#...#....###......##.....................###.........#.......#.#..............##..#.####...###............................................. 350 | .db #0x53, #0x14, #0x11, #0x11, #0x00, #0xc6, #0x00, #0x10, #0x48, #0x80, #0x00, #0x00, #0x00, #0x00, #0x00, #0x05, #0x00, #0x00, #0x00, #0x00, #0x00, #0xc4, #0x20, #0x22, #0x82, #0x01, #0x00, #0x50, #0x02, #0x04, #0x04, #0x00, #0x98, #0xa2, #0x08, #0x00, #0x00, #0x00, #0x00, #0x00 ; ##..#.#...#.#...#...#...#...#............##...##............#......#..#........#........................................#.#...............................................#...##.....#...#...#...#.....##...................#.#..#........#.......#................##..#.#...#.#...#............................................ 351 | .db #0x55, #0x14, #0x00, #0x71, #0x0c, #0xaa, #0x8c, #0x3b, #0x84, #0xd2, #0x35, #0xe3, #0x8c, #0x49, #0x00, #0x84, #0x66, #0x5c, #0xa6, #0x01, #0x00, #0x20, #0x21, #0x22, #0x40, #0x02, #0x00, #0x40, #0x64, #0xce, #0xd4, #0x31, #0xa8, #0xa2, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; #.#.#.#...#.#...........#...###...##.....#.#.#.#..##...###.###....#....#.#..#.###.#.##..##...###..##...##..#..#...........#....#.##..##...###.#..##..#.##....................#..#....#...#...#........#..#....................#...#..##..###..##..#.#.###...##.....#.#.#.#...#.#................................................ 352 | .db #0xd5, #0x13, #0x10, #0x91, #0x12, #0x92, #0x52, #0x10, #0x84, #0x92, #0x0c, #0x94, #0x52, #0x4a, #0x00, #0x9d, #0x81, #0x42, #0x69, #0x00, #0x00, #0x24, #0x21, #0xc2, #0x41, #0x02, #0x00, #0x50, #0x84, #0x24, #0x55, #0x4a, #0xa8, #0x9e, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; #.#.#.####..#.......#...#...#..#.#..#....#..#..#.#..#.#.....#.....#....#.#..#..#..##......#.#..#.#..#.#..#.#..#.........#.###..##......#.#....#.#..#.##...................#..#..#....#...#....###.....#..#..................#.#...#....#..#..#..#.#.#.#..#.#..#....#.#.#.####..#................................................ 353 | .db #0x59, #0x14, #0x00, #0x91, #0x1e, #0x92, #0x92, #0x11, #0x84, #0x92, #0x04, #0x97, #0x5e, #0x4a, #0x00, #0x84, #0xe0, #0x4c, #0x2f, #0x00, #0x00, #0xe0, #0x21, #0x02, #0xc2, #0x03, #0x00, #0x40, #0xe4, #0xe4, #0x55, #0x7a, #0xc8, #0xa2, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; #..##.#...#.#...........#...#..#.####....#..#..#.#..#..##...#.....#....#.#..#..#..#.....###.#..#.####.#..#.#..#...........#....#.....###..##..#.####.#.......................####....#...#.......#....####....................#...#..###..#..####.#.#.#..#.####....#..##.#...#.#................................................ 354 | .db #0x59, #0x14, #0x11, #0x91, #0x02, #0x82, #0x12, #0x12, #0x48, #0x92, #0x84, #0xe4, #0x42, #0x4a, #0x00, #0x85, #0x90, #0x50, #0x21, #0x00, #0x00, #0x14, #0x22, #0x22, #0x22, #0x04, #0x00, #0x50, #0x92, #0x24, #0x54, #0x0a, #0xc8, #0xa2, #0x08, #0x00, #0x00, #0x00, #0x00, #0x00 ; #..##.#...#.#...#...#...#...#..#.#.......#.....#.#..#....#..#......#..#..#..#..#..#....#..#..###.#....#..#.#..#.........#.#....#....#..#....#.#.#....#....................#.#....#...#...#...#...#...#....#.................#.#..#..#..#..#..#....#.#.#..#.#.......#..##.#...#.#...#............................................ 355 | .db #0xd1, #0xe3, #0x00, #0x91, #0x0c, #0x82, #0xcc, #0x21, #0x30, #0x1c, #0x05, #0x87, #0x8c, #0x71, #0x15, #0x84, #0xe0, #0x4e, #0x26, #0x00, #0x00, #0x10, #0xca, #0xc9, #0x29, #0x14, #0x00, #0xc0, #0xe1, #0xc8, #0x54, #0x32, #0x88, #0x1e, #0x07, #0x00, #0x00, #0x00, #0x00, #0x00 ; #...#.####...###........#...#..#..##.....#.....#..##..###....#......##....###...#.#.....###....#..##...##...###.#.#.#.....#....#.....###.###..#..##..#......................#....#.#..###..#..###..#.#....#.#.................###....###...#..##..#.#.#..#..##.....#...#.####...###............................................. 356 | .db #0x00, #0x00, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x70, #0x00, #0x00, #0x00, #0x01, #0x00, #0x00, #0x00, #0x00, #0x00, #0x04, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ....................#.......................................................................###.........................#.................................................#.................................................#................................................................................................... 357 | .db #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ................................................................................................................................................................................................................................................................................................................................ 358 | .db #0x00, #0x00, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x01, #0x00, #0x00, #0x00, #0x00, #0x00, #0x04, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ....................#...................................................................................................#.................................................#.................................................#................................................................................................... 359 | .db #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55, #0x55 ; #.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#. 360 | .db #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ................................................................................................................................................................................................................................................................................................................................ 361 | .db #0x00, #0x00, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x01, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ....................#...................................................................................................#...................................................................................................#................................................................................................... 362 | .db #0xcf, #0xe3, #0xc0, #0x04, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x4c, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0xc0, #0x01, #0x04, #0x00, #0x00, #0x08, #0x00, #0x41, #0x00, #0x00, #0x00, #0x00, #0x00 ; ####..####...###......##..#...............................................................................................##..#...............................................................................................###.........#........................#............#.....#......................................... 363 | .db #0x51, #0x14, #0xd1, #0x04, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x4d, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x90, #0x00, #0x04, #0x00, #0x00, #0x08, #0x00, #0x41, #0x00, #0x00, #0x00, #0x00, #0x00 ; #...#.#...#.#...#...#.##..#.............................................................................................#.##..#.............................................................................................#..#..........#........................#............#.....#......................................... 364 | .db #0x51, #0x14, #0x40, #0x65, #0x22, #0x03, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x54, #0x26, #0x32, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x80, #0x1c, #0x67, #0x8e, #0x39, #0xce, #0x9c, #0x43, #0x30, #0xc7, #0x01, #0x00, #0x00 ; #...#.#...#.#.........#.#.#..##..#...#..##................................................................................#.#.#..##..#...#..##.................................................................................#..###...###..##..###...##..###...###..##..###..###....#.....##..###...###....................... 365 | .db #0xcf, #0xe3, #0x50, #0x95, #0x14, #0x04, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x55, #0x49, #0x41, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x90, #0xa4, #0x94, #0x52, #0x4a, #0x29, #0x25, #0x41, #0x48, #0x29, #0x00, #0x00, #0x00 ; ####..####...###....#.#.#.#.#..#..#.#.....#.............................................................................#.#.#.#.#..#..#.#.....#.............................................................................#..#..#..#.#..#.#..#.#..#.#..#.#..#.#..#.#..#.#..#..#.....#....#..#.#..#.#.......................... 366 | .db #0x41, #0x04, #0x41, #0x96, #0x14, #0x07, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x64, #0x49, #0x71, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x80, #0xa4, #0xf4, #0xd2, #0x4b, #0xe9, #0x25, #0x41, #0x78, #0xc9, #0x00, #0x00, #0x00 ; #.....#...#.....#.....#..##.#..#..#.#...###...............................................................................#..##.#..#..#.#...###................................................................................#..#..#.#..#.####.#..#.####.#..#.#..#.####.#..#..#.....#....####.#..#..##........................ 367 | .db #0x41, #0x14, #0x51, #0x96, #0x88, #0x04, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x65, #0x89, #0x48, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x90, #0xa4, #0x14, #0x4e, #0x48, #0x29, #0x24, #0x41, #0x08, #0x09, #0x01, #0x00, #0x00 ; #.....#...#.#...#...#.#..##.#..#...#...#..#.............................................................................#.#..##.#..#...#...#..#.............................................................................#..#..#..#.#..#.#....###..#....#..#.#..#.#....#..#..#.....#....#....#..#....#....................... 368 | .db #0xc1, #0xe3, #0x40, #0x64, #0x08, #0x07, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x44, #0x86, #0x70, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0xc0, #0x25, #0x67, #0x82, #0x49, #0xce, #0x24, #0xc2, #0x33, #0xe9, #0x00, #0x00, #0x00 ; #.....####...###......#...#..##....#....###...............................................................................#...#..##....#....###...............................................................................###.#..#..###..##..#.....##..#..#..###..##..#..#...#....####..##..#..#.###........................ 369 | .db #0x00, #0x00, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x01, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x10, #0x00, #0x00, #0x02, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ....................#...................................................................................................#...................................................................................................#....................#.............................................................................. 370 | .db #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ................................................................................................................................................................................................................................................................................................................................ 371 | .db #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0xff, #0x7f ; ###############################################################################################################################################################################################################################################################################################################################. 372 | .db #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ................................................................................................................................................................................................................................................................................................................................ 373 | .db #0xe0, #0x00, #0x00, #0x40, #0x20, #0x08, #0x3c, #0x18, #0x63, #0x04, #0x27, #0x04, #0x00, #0x0e, #0x00, #0xc0, #0x28, #0x80, #0x40, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x40, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; .....###......................#......#.....#......####.....##...##...##...#.....###..#....#..............###..................##...#.#.........#......#.....#.................................................#................................................................................................................. 374 | .db #0x10, #0x01, #0x00, #0x00, #0x20, #0x08, #0x42, #0xa4, #0x94, #0x86, #0x08, #0x04, #0x00, #0x04, #0x00, #0xc0, #0x28, #0x00, #0x40, #0x10, #0x00, #0x00, #0x00, #0x00, #0x00, #0x40, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ....#...#............................#.....#.....#....#...#..#.#..#.#..#.##....#...#......#...............#...................##...#.#................#.....#.................................................#................................................................................................................. 375 | .db #0x10, #0x98, #0x93, #0x5a, #0xee, #0x1c, #0x99, #0xa0, #0x94, #0x84, #0x20, #0x67, #0x0c, #0xe4, #0x18, #0x20, #0x29, #0xb4, #0xdc, #0x39, #0x87, #0x66, #0x9c, #0x69, #0x91, #0x71, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ....#......##..###..#..#.#.##.#..###.###..###...#..##..#.....#.#..#.#..#..#....#.....#..###..##...##......#..###...##........#..#..#.#....#.##.#..###.###..###..###....#.##..##...###..##..#.##.#...#..##...###................................................................................................................. 376 | .db #0x10, #0xa4, #0x94, #0x46, #0x29, #0x09, #0x85, #0x90, #0x94, #0x84, #0xa0, #0x94, #0x12, #0x24, #0x25, #0x20, #0x29, #0x8c, #0x52, #0x92, #0x80, #0x91, #0x42, #0x1a, #0x4a, #0x4a, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ....#.....#..#.#..#.#..#.##...#.#..#.#..#..#....#.#....#....#..#..#.#..#..#....#.....#.#..#.#..#.#..#.....#..#..#.#..#.......#..#..#.#....##...#.#..#.#..#..#..#.......##...#..#.#....#..#.##....#.#..#..#.#..#................................................................................................................. 377 | .db #0x10, #0xa4, #0x94, #0x42, #0x29, #0x09, #0x85, #0x88, #0x94, #0x84, #0xa0, #0x14, #0x12, #0x24, #0x05, #0xe0, #0x29, #0x84, #0x52, #0x12, #0x83, #0xf0, #0xcc, #0x0b, #0xca, #0x4b, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ....#.....#..#.#..#.#..#.#....#.#..#.#..#..#....#.#....#...#...#..#.#..#..#....#.....#.#..#.#....#..#.....#..#..#.#..........####..#.#....#....#.#..#.#..#..#...##.....#....####..##..####.#.....#.#..####.#..#................................................................................................................. 378 | .db #0x10, #0xa5, #0xe3, #0x42, #0x2e, #0x09, #0x99, #0x84, #0x94, #0x84, #0xa8, #0x94, #0x12, #0x24, #0x25, #0x10, #0x2a, #0x84, #0x5c, #0x12, #0x84, #0x10, #0x50, #0x08, #0x44, #0x48, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ....#...#.#..#.###...###.#....#..###.#..#..#....#..##..#..#....#..#.#..#..#....#...#.#.#..#.#..#.#..#.....#..#..#.#..#......#....#.#.#....#....#..###.#..#..#.....#....#....#.......#.#....#......#...#....#..#................................................................................................................. 379 | .db #0xe0, #0x98, #0x80, #0x42, #0x28, #0x11, #0x42, #0x3c, #0x63, #0x04, #0x27, #0x67, #0x0c, #0x2e, #0x99, #0x10, #0x2a, #0x84, #0x50, #0xa2, #0x83, #0x60, #0x8e, #0x09, #0x84, #0x71, #0x01, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; .....###...##..#.......#.#....#....#.#..#...#....#....#...####..##...##...#.....###..#..###..##...##.....###.#..#..##..#....#....#.#.#....#....#....#.#..#...#.###.....#.....##..###...##..#......#....##...###.#............................................................................................................... 380 | .db #0x00, #0x80, #0x60, #0x00, #0x07, #0x00, #0x3c, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x0e, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ...............#.....##.........###...............####...........................................................................................###............................................................................................................................................................................ 381 | .db #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00, #0x00 ; ................................................................................................................................................................................................................................................................................................................................ 382 | 383 | ld de, #0xff96 ; 11 96 ff 384 | call #0x056b ; cd 6b 05 385 | ld hl, #0x007a ; 21 7a 00 386 | add hl, sp ; 39 387 | ld a, (hl) ; 7e 388 | ex de, hl ; eb 389 | dec a ; 3d 390 | jr z, 16 ; 28 10 391 | sub #0x07 ; d6 07 392 | jr z, 126 ; 28 7e 393 | sub #0x02 ; d6 02 394 | jp z, 0x78a1 ; ca a1 78 395 | sub #0x03 ; d6 03 396 | jr z, 76 ; 28 4c 397 | jp 0x78b4 ; c3 b4 78 398 | ld hl, #0x0050 ; 21 50 00 399 | push hl ; e5 400 | ld hl, #0x000f ; 21 0f 00 401 | add hl, sp ; 39 402 | push hl ; e5 403 | ld hl, #0x8000 ; 21 00 80 404 | push hl ; e5 405 | call #0x081b ; cd 1b 08 406 | pop de ; d1 407 | pop de ; d1 408 | pop de ; d1 409 | ld hl, #0x000d ; 21 0d 00 410 | add hl, sp ; 39 411 | push hl ; e5 412 | call #0x0827 ; cd 27 08 413 | pop de ; d1 414 | ld hl, #0x0008 ; 21 08 00 415 | add hl, sp ; 39 416 | ld (hl), #0x36 ; 36 36 417 | inc hl ; 23 418 | ld (hl), #0x00 ; 36 00 419 | inc hl ; 23 420 | ld (hl), #0x64 ; 36 64 421 | inc hl ; 23 422 | ld (hl), #0x00 ; 36 00 423 | inc hl ; 23 424 | ld (hl), #0x03 ; 36 03 425 | ld hl, #0x0001 ; 21 01 00 426 | push hl ; e5 427 | ld hl, #0x000a ; 21 0a 00 428 | add hl, sp ; 39 429 | push hl ; e5 430 | ld hl, #0x007a ; 21 7a 00 431 | add hl, sp ; 39 432 | ld e, (hl) ; 5e 433 | ld d, #0x00 ; 16 00 434 | push de ; d5 435 | call #0x0638 ; cd 38 06 436 | pop de ; d1 437 | pop de ; d1 438 | pop de ; d1 439 | ld hl, #0x0001 ; 21 01 00 440 | ret ; c9 441 | ld hl, #0x005e ; 21 5e 00 442 | add hl, sp ; 39 443 | push hl ; e5 444 | ld hl, #0x00ff ; 21 ff 00 445 | push hl ; e5 446 | call #0x072b ; cd 2b 07 447 | pop de ; d1 448 | pop de ; d1 449 | ld hl, #0x0081 ; 21 81 00 450 | push hl ; e5 451 | ld hl, (#0x400c) ; 2a 0c 40 452 | push hl ; e5 453 | ld hl, (#0x400a) ; 2a 0a 40 454 | push hl ; e5 455 | ld hl, #0x0064 ; 21 64 00 456 | add hl, sp ; 39 457 | push hl ; e5 458 | call #0x0743 ; cd 43 07 459 | ld hl, #0x0008 ; 21 08 00 460 | add hl, sp ; 39 461 | ld sp, hl ; f9 462 | jr 76 ; 18 4c 463 | ex de, hl ; eb 464 | inc hl ; 23 465 | inc hl ; 23 466 | ld e, (hl) ; 5e 467 | inc hl ; 23 468 | ld d, (hl) ; 56 469 | dec de ; 1b 470 | ld a, d ; 7a 471 | or e ; b3 472 | jr nz, 65 ; 20 41 473 | call #0x066e ; cd 6e 06 474 | jr 60 ; 18 3c 475 | ex de, hl ; eb 476 | inc hl ; 23 477 | inc hl ; 23 478 | ld e, (hl) ; 5e 479 | inc hl ; 23 480 | ld d, (hl) ; 56 481 | ld hl, #0xff9c ; 21 9c ff 482 | add hl, de ; 19 483 | ld a, h ; 7c 484 | or l ; b5 485 | jr nz, 46 ; 20 2e 486 | call #0x066e ; cd 6e 06 487 | jr 41 ; 18 29 488 | ld hl, #0x007e ; 21 7e 00 489 | add hl, sp ; 39 490 | ld e, (hl) ; 5e 491 | inc hl ; 23 492 | ld d, (hl) ; 56 493 | push de ; d5 494 | dec hl ; 2b 495 | dec hl ; 2b 496 | ld d, (hl) ; 56 497 | dec hl ; 2b 498 | ld e, (hl) ; 5e 499 | push de ; d5 500 | dec hl ; 2b 501 | dec hl ; 2b 502 | ld e, (hl) ; 5e 503 | ld d, #0x00 ; 16 00 504 | push de ; d5 505 | dec hl ; 2b 506 | dec hl ; 2b 507 | ld e, (hl) ; 5e 508 | push de ; d5 509 | dec hl ; 2b 510 | dec hl ; 2b 511 | ld e, (hl) ; 5e 512 | push de ; d5 513 | call #0x0602 ; cd 02 06 514 | ex de, hl ; eb 515 | ld hl, #0x000a ; 21 0a 00 516 | add hl, sp ; 39 517 | ld sp, hl ; f9 518 | ld d, #0x00 ; 16 00 519 | ex de, hl ; eb 520 | ret ; c9 521 | ld hl, #0x0078 ; 21 78 00 522 | add hl, sp ; 39 523 | ld e, (hl) ; 5e 524 | ld d, #0x00 ; 16 00 525 | ex de, hl ; eb 526 | ret ; c9 527 | -------------------------------------------------------------------------------- /codedump.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; Based off of spew.asm from Cyrano Jones on the mailstation Yahoo Group. 3 | ; 4 | ; Originally written to be assembled with AS80, converted to SDCC ASZ80 syntax. 5 | ; 6 | 7 | .module codedump 8 | 9 | .area _DATA 10 | .area _HEADER (ABS) 11 | .org 0x4000 ; This is *always* #4000, regardless of 12 | ; what page you use. 13 | 14 | jp eventhandler 15 | 16 | .dw (icons) ; icon location (in this page) 17 | .dw (caption) 18 | .dw (dunno) 19 | dunno: 20 | .db #0 21 | xpos: 22 | .dw #0 23 | ypos: 24 | .dw #0 25 | caption: 26 | .dw #0x0001 ; ????? 27 | .dw (endcap - caption - 6) ; end of chars 28 | .dw #0x0006 ; offset to first char 29 | .ascii "Code Dump" ; the caption string 30 | endcap: 31 | 32 | icons: 33 | .dw #0 ; size icon0 34 | .dw (icon0 - icons) ; offset to icon0 35 | .dw #0 ; size icon1 36 | .dw (icon1 - icons) ; offset to icon1 (0x00b5) 37 | icon0: 38 | .dw #0 ; icon width 39 | .db #0 ; icon height 40 | icon1: 41 | .dw #0 ; icon width 42 | .db #0 ; icon height 43 | 44 | 45 | .equ bsendbyte, #0x802D ; raises busy & sends byte. 46 | ; We use the existing sendbyte from 47 | ; original update code. This means 48 | ; codeflash page #01 needs to be banked 49 | ; in to slot8000 before calling bsendbyte. 50 | 51 | .equ done, #0x0000 ; Gotta go somewhere when done, we reboot. 52 | ; Mailstation will call eventhandler 3 53 | ; or 4 times when you select the new 54 | ; application, and we only want to exec 55 | ; once, so we do not return at end, we 56 | ; reboot after first "event". 57 | 58 | eventhandler: 59 | xor a ; set slot8000device = codeflash (0) 60 | out (8), a 61 | 62 | ld bc, #0x4000 ; b=count=64 pages, c=currentpage=0 63 | 64 | pgloop: 65 | ld hl, #0x8000 ; start at begining of each page 66 | 67 | byteloop: 68 | ld a, c ; bank currentpage into slot8000 69 | out (7), a 70 | 71 | ld a, (hl) ; get byte[i] 72 | 73 | push hl 74 | push bc 75 | 76 | ld h, a ; h is byte 77 | 78 | ld a, #1 ; bank bsendbyte into slot8000 79 | out (7), a 80 | call bsendbyte ; send byte(H) 81 | 82 | pop bc 83 | pop hl 84 | 85 | inc hl ; i++ (next byte) 86 | ld a, h 87 | cp #0xC0 88 | jr nz, byteloop ; jump if i < #C000 89 | 90 | inc c ; currentpage++ (next page) 91 | djnz pgloop 92 | 93 | jp done 94 | -------------------------------------------------------------------------------- /datadump.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; Based off of spew.asm from Cyrano Jones on the mailstation Yahoo Group, 3 | ; modified to send the 512kb of dataflash instead of 1mb of codeflash. 4 | ; 5 | ; Originally written to be assembled with AS80, converted to SDCC ASZ80 syntax. 6 | ; 7 | 8 | .module datadump 9 | 10 | .area _DATA 11 | .area _HEADER (ABS) 12 | .org 0x4000 ; This is *always* #4000, regardless of 13 | ; what page you use. 14 | 15 | jp eventhandler 16 | 17 | .dw (icons) ; icon location (in this page) 18 | .dw (caption) 19 | .dw (dunno) 20 | dunno: 21 | .db #0 22 | xpos: 23 | .dw #0 24 | ypos: 25 | .dw #0 26 | caption: 27 | .dw #0x0001 ; ????? 28 | .dw (endcap - caption - 6) ; end of chars 29 | .dw #0x0006 ; offset to first char 30 | .ascii "Data Dump" ; the caption string 31 | endcap: 32 | 33 | icons: 34 | .dw #0 ; size icon0 35 | .dw (icon0 - icons) ; offset to icon0 36 | .dw #0 ; size icon1 37 | .dw (icon1 - icons) ; offset to icon1 (0x00b5) 38 | icon0: 39 | .dw #0 ; icon width 40 | .db #0 ; icon height 41 | icon1: 42 | .dw #0 ; icon width 43 | .db #0 ; icon height 44 | 45 | .equ bsendbyte, #0x802D ; raises busy & sends byte. 46 | ; We use the existing sendbyte from 47 | ; original update code. This means 48 | ; codeflash page #01 needs to be banked 49 | ; in to slot8000 before calling bsendbyte. 50 | 51 | .equ done, #0x0000 ; Gotta go somewhere when done, we reboot. 52 | ; Mailstation will call eventhandler 3 53 | ; or 4 times when you select the new 54 | ; application, and we only want to exec 55 | ; once, so we do not return at end, we 56 | ; reboot after first "event". 57 | 58 | eventhandler: 59 | ld bc, #0x2000 ; b=count=32 pages, c=currentpage=0 60 | 61 | pgloop: 62 | ld hl, #0x8000 ; start at begining of each page 63 | 64 | byteloop: 65 | ld a, #03 ; set slot8000device = dataflash 66 | out (8), a 67 | 68 | ld a, c ; set slot8000page to currentpage 69 | out (7), a 70 | 71 | ld a, (hl) ; get byte[i] 72 | 73 | push hl 74 | push bc 75 | 76 | ld h, a ; h is byte 77 | 78 | ld a, #00 ; set slot8000device = codeflash 79 | out (8), a 80 | ld a, #1 ; bank bsendbyte into slot8000 81 | out (7), a 82 | call bsendbyte ; send byte(H) 83 | 84 | pop bc 85 | pop hl 86 | 87 | inc hl ; i++ (next byte) 88 | ld a, h 89 | cp #0xC0 90 | jr nz, byteloop ; jump if i < #C000 91 | 92 | inc c ; currentpage++ (next page) 93 | djnz pgloop 94 | 95 | jp done 96 | -------------------------------------------------------------------------------- /dataflashloader.asm: -------------------------------------------------------------------------------- 1 | ; vim:syntax=z8a:ts=8 2 | ; 3 | ; dataflash loader 4 | ; 5 | ; works as a "stage 2" loader, so type in loader.asm and then run Loader from 6 | ; the Yahoo! menu, then use sendload to upload this compiled binary, then 7 | ; use sendload to upload your actual binary to be written to the dataflash at 8 | ; DATAFLASH_PAGE 9 | ; 10 | ; Copyright (c) 2019 joshua stein 11 | ; 12 | ; Permission to use, copy, modify, and distribute this software for any 13 | ; purpose with or without fee is hereby granted, provided that the above 14 | ; copyright notice and this permission notice appear in all copies. 15 | ; 16 | ; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 17 | ; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 18 | ; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 19 | ; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 20 | ; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 21 | ; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 22 | ; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 23 | ; 24 | 25 | .module dataflashloader 26 | 27 | ; which page (Yahoo! menu slot) to save an uploaded program to 28 | ; page 0 is 0x0000, page 1 0x4000, page 2, 0x8000, etc. 29 | .equ DATAFLASH_PAGE, #0 30 | 31 | 32 | ; when running from Loader, we are loaded at 0x8000 and use slot 4 33 | .equ SLOT_ADDR, #0x4000 34 | .equ RUN_ADDR, #0x8000 35 | .equ SLOT_DEVICE, #0x6 36 | .equ SLOT_PAGE, #0x5 37 | 38 | ; where we'll buffer the 256 bytes we receive before writing to flash 39 | .equ RAM_ADDR, #0xd000 40 | 41 | .equ SDP_LOCK, #SLOT_ADDR + 0x040a 42 | .equ SDP_UNLOCK, #SLOT_ADDR + 0x041a 43 | 44 | ; lpt 45 | .equ CONTROL, #0x2c 46 | .equ DATA, #0x2d 47 | .equ STATUS, #0x21 48 | 49 | .equ LPT_BUSY_IN, #0x40 50 | .equ LPT_BUSY_OUT, #0x08 51 | .equ LPT_STROBE_IN, #0x80 52 | .equ LPT_STROBE_OUT, #0x10 53 | .equ LPT_TRIB_MASK, #0x07 54 | .equ LPT_DIB_MASK, #0x03 55 | 56 | 57 | .area _DATA 58 | .area _HEADER (ABS) 59 | 60 | .org #RUN_ADDR 61 | 62 | jp eventhandler 63 | 64 | .dw (icons) 65 | .dw (caption) 66 | .dw (dunno) 67 | dunno: 68 | .db #0 69 | zip: 70 | .dw #0 71 | zilch: 72 | .dw #0 73 | caption: 74 | .dw #0x0001 75 | .dw (endcap - caption - 6) ; num of chars 76 | .dw #0x0006 ; offset to first char 77 | .ascii "FlashLoader" ; the caption string 78 | endcap: 79 | 80 | icons: 81 | .dw #0x0 ; size icon0 82 | .dw (icon0 - icons) ; offset to icon0 83 | .dw #0 ; size icon1 84 | .dw (icon1 - icons) ; offset to icon1 (0x00b5) 85 | icon0: 86 | .dw #0x0 ; icon width 87 | .db #0x0 ; icon height 88 | 89 | icon1: 90 | .dw #0 ; icon width 91 | .db #0 ; icon height 92 | 93 | eventhandler: 94 | push ix 95 | ld ix, #0 96 | add ix, sp 97 | push bc 98 | push de 99 | push hl 100 | ld hl, #-8 ; stack bytes for local storage 101 | add hl, sp 102 | ld sp, hl 103 | in a, (#SLOT_DEVICE) 104 | ld -3(ix), a ; stack[-3] = slot 8 device 105 | in a, (#SLOT_PAGE) 106 | ld -4(ix), a ; stack[-4] = slot 8 device 107 | ld a, #3 ; slot 8 device = dataflash 108 | out (#SLOT_DEVICE), a 109 | xor a ; slot 8 page = 0 110 | out (#SLOT_PAGE), a 111 | ld hl, #SLOT_ADDR 112 | ld -5(ix), h 113 | ld -6(ix), l ; stack[-5,-6] = data flash location 114 | get_size: 115 | call getbyte ; low byte of total bytes to download 116 | ld -8(ix), a 117 | call getbyte ; high byte of total bytes to download 118 | ld -7(ix), a 119 | cp #0x40 ; we can't write more than 0x3fff 120 | jr c, size_ok 121 | size_too_big: 122 | jp 0x0000 123 | size_ok: 124 | di ; prevent things from touching RAM 125 | call sdp 126 | ld a, (#SDP_UNLOCK) 127 | read_chunk_into_ram: 128 | ; read 256 bytes at a time into ram, erase the target flash sector, 129 | ; then program it with those bytes 130 | ld b, -7(ix) 131 | ld c, -8(ix) 132 | ld hl, #RAM_ADDR 133 | ingest_loop: 134 | call getbyte 135 | ld (hl), a 136 | inc hl 137 | dec bc 138 | ld a, l 139 | cp #0 140 | jr z, done_ingesting ; on 256-byte boundary 141 | ld a, b 142 | cp #0 143 | jr nz, ingest_loop ; bc != 0, keep reading input 144 | ld a, c 145 | cp #0 146 | jr nz, ingest_loop ; bc != 0, keep reading input 147 | done_ingesting: 148 | ld -7(ix), b ; update bytes remaining to fetch on 149 | ld -8(ix), c ; next iteration 150 | move_into_flash: 151 | ld a, #3 ; slot 8 device = dataflash 152 | out (#SLOT_DEVICE), a 153 | ld a, #DATAFLASH_PAGE 154 | out (#SLOT_PAGE), a 155 | ld de, #RAM_ADDR 156 | ld h, -5(ix) ; data flash write location 157 | ld l, -6(ix) 158 | sector_erase: 159 | ld (hl), #0x20 ; 28SF040 Sector-Erase Setup 160 | ld (hl), #0xd0 ; 28SF040 Execute 161 | sector_erase_wait: 162 | ld a, (hl) ; wait until End-of-Write 163 | ld b, a 164 | ld a, (hl) 165 | cp b 166 | jr nz, sector_erase_wait 167 | byte_program_loop: 168 | ld a, (de) 169 | ld (hl), #0x10 ; 28SF040 Byte-Program Setup 170 | ld (hl), a ; 28SF040 Execute 171 | byte_program: 172 | ld a, (hl) 173 | ld b, a 174 | ld a, (hl) ; End-of-Write by reading it 175 | cp b 176 | jr nz, byte_program ; read until writing succeeds 177 | inc hl ; next flash byte 178 | inc de ; next RAM byte 179 | ld a, l 180 | cp #0 181 | jr nz, byte_program_loop 182 | sector_done: 183 | ld -5(ix), h ; update data flash write location 184 | ld -6(ix), l 185 | ld a, -7(ix) 186 | cp #0 187 | jp nz, read_chunk_into_ram ; more data to transfer 188 | ld a, -8(ix) 189 | cp #0 190 | jp nz, read_chunk_into_ram ; more data to transfer 191 | ; all done 192 | flash_out: 193 | ld a, #3 ; slot 8 device = dataflash 194 | out (#SLOT_DEVICE), a 195 | xor a ; slot 8 page = 0 196 | out (#SLOT_PAGE), a 197 | call sdp 198 | ld a, (#SDP_LOCK) 199 | bail: 200 | ld a, -3(ix) ; restore slot 8 device 201 | out (#SLOT_DEVICE), a 202 | ld a, -4(ix) ; restore slot 8 page 203 | out (#SLOT_PAGE), a 204 | ld hl, #8 ; remove stack bytes 205 | add hl, sp 206 | ld sp, hl 207 | pop hl 208 | pop de 209 | pop bc 210 | ld sp, ix 211 | pop ix 212 | ei 213 | jp 0x0000 214 | 215 | 216 | sdp: 217 | ld a, (#SLOT_ADDR + 0x1823) ; 28SF040 Software Data Protection 218 | ld a, (#SLOT_ADDR + 0x1820) 219 | ld a, (#SLOT_ADDR + 0x1822) 220 | ld a, (#SLOT_ADDR + 0x0418) 221 | ld a, (#SLOT_ADDR + 0x041b) 222 | ld a, (#SLOT_ADDR + 0x0419) 223 | ret 224 | ; caller needs to read final SDP_LOCK or SDP_UNLOCK address 225 | 226 | 227 | ; loop until we get a byte, return it in a 228 | getbyte: 229 | push hl 230 | getbyte_loop: 231 | call _lptrecv 232 | ld a, h 233 | cp #0 234 | jp nz, getbyte_loop 235 | ld a, l 236 | pop hl 237 | ret 238 | 239 | 240 | ; receive a tribble byte from host, return h=1 l=0 on error, else h=0, l=(byte) 241 | lptrecv_tribble: 242 | push bc 243 | ld hl, #0 ; h will contain error, l result 244 | xor a 245 | out (DATA), a ; drop busy/ack, wait for strobe 246 | ld b, #0xff ; try a bunch before bailing 247 | wait_for_strobe: 248 | in a, (STATUS) 249 | and #LPT_STROBE_IN ; inb(STATUS) & stbin 250 | jr nz, got_strobe 251 | djnz wait_for_strobe 252 | strobe_failed: 253 | ld h, #1 254 | ld l, #0 255 | jr lptrecv_tribble_out 256 | got_strobe: 257 | in a, (STATUS) 258 | sra a 259 | sra a 260 | sra a 261 | and #LPT_TRIB_MASK ; & tribmask 262 | ld l, a 263 | ld a, #LPT_BUSY_OUT ; raise busy/ack 264 | out (DATA), a 265 | ld b, #0xff ; retry 255 times 266 | wait_for_unstrobe: 267 | in a, (STATUS) 268 | and #LPT_STROBE_IN ; inb(STATUS) & stbin 269 | jr z, lptrecv_tribble_out 270 | djnz wait_for_unstrobe 271 | ; if we never get unstrobe, that's ok 272 | lptrecv_tribble_out: 273 | ld a, #LPT_BUSY_OUT ; raise busy/ack 274 | out (DATA), a 275 | pop bc 276 | ret 277 | 278 | 279 | ; unsigned char lptrecv(void) 280 | ; receive a full byte from host in three parts 281 | ; return h=1 l=0 on error, otherwise h=0, l=(byte) 282 | _lptrecv:: 283 | push bc 284 | call lptrecv_tribble 285 | ld a, h 286 | cp #1 287 | jr z, lptrecv_err ; bail early if h has an error 288 | ld b, l 289 | call lptrecv_tribble 290 | ld a, h 291 | cp #1 292 | jr z, lptrecv_err 293 | ld a, l 294 | sla a 295 | sla a 296 | sla a 297 | add b 298 | ld b, a ; += tribble << 3 299 | call lptrecv_tribble 300 | ld a, h 301 | cp #1 302 | jr z, lptrecv_err 303 | ld a, l 304 | and #LPT_DIB_MASK ; dibmask 305 | sla a 306 | sla a 307 | sla a 308 | sla a 309 | sla a 310 | sla a 311 | add b ; += (tribble & dibmask) << 6 312 | ld h, #0 313 | ld l, a 314 | lptrecv_out: 315 | pop bc 316 | ret 317 | lptrecv_err: 318 | pop bc 319 | ld hl, #0x0100 320 | ret 321 | -------------------------------------------------------------------------------- /docs/codeflash-29f080a.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcs/mailstation-tools/68cc381837011ffba804303f72d6eb7885aff050/docs/codeflash-29f080a.pdf -------------------------------------------------------------------------------- /docs/dataflash-28SF040.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcs/mailstation-tools/68cc381837011ffba804303f72d6eb7885aff050/docs/dataflash-28SF040.pdf -------------------------------------------------------------------------------- /docs/loader.txt: -------------------------------------------------------------------------------- 1 | # Written by FyberOptic, archived from http://www.fybertech.net/mailstation/fyos_c_002.zip 2 | 3 | INTRO 4 | ----- 5 | 6 | Loading code onto the Mailstation was once a lofty goal, but over time, some 7 | smart folk have figured out just how to do that. And the ironic part, as it 8 | turns out, is that the Mailstation itself includes the code which facilitates 9 | doing so. 10 | 11 | Mind you, we aren't going to reflash the Mailstation, we're merely going to 12 | take advantage of some of its features to run arbitrary code. This lets you 13 | keep the original firmware intact, without fear of bricking it, while still 14 | inserting a bit of permanent code onto it, which allows us to then easily 15 | transfer larger code via the parallel port into system memory. This not only 16 | makes it easy for debugging, but it saves wear and tear on the flash memory. 17 | 18 | I'm not aware of the details on all the Mailstation models, but most of the 19 | older ones should work with this process just fine. The only one that probably 20 | wouldn't is the 350. Possibly the 300 as well. I don't know anything about 21 | the latter, but I understand that the 350 uses an entirely different cpu. 22 | 23 | In any case, I'll go ahead and say the normal mumbo jumbo, where if you screw 24 | up and break your Mailstation, it's not my fault! This is all "try at your own 25 | risk" sort of stuff. 26 | 27 | 28 | LAPLINK 29 | ------- 30 | 31 | Using a parallel laplink cable is required for the transfers. And 32 | forunately, this is the only extra hardware you require, short of a PC. If you 33 | don't have the cable, there's lots of resources for making it on the internet. 34 | In fact, here's you a pinout that I had handy: 35 | 36 | 1-1 37 | 2-15 38 | 3-13 39 | 4-12 40 | 5-10 41 | 6-11 42 | 8-NC 43 | 9-NC 44 | 10-5 45 | 11-6 46 | 12-4 47 | 13-3 48 | 14-14 49 | 15-2 50 | 16-16 51 | 17-17 52 | 18-NC 53 | 19-NC 54 | 20-NC 55 | 21-NC 56 | 22-NC 57 | 24-NC 58 | 24-NC 59 | 25-25 60 | 61 | There's question over whether 1, 15, 16, and 17 are necessary, but it couldn't 62 | hurt to do them anyway in case something else wants them in the future that you 63 | try to use the cable on. 64 | 65 | 66 | HEX VIEWER 67 | ---------- 68 | 69 | Once you have a cable handy, the next question is "So how do I copy code from 70 | my computer to the Mailstation?" Well we're not quite there yet. We still 71 | have to put code onto the Mailstation to allow it to be able to copy your 72 | own code over. We start by taking advantage of one of the Mailstation's 73 | hidden features: the hex editor. 74 | 75 | Accessing the hex editor seems to vary from model to model. The first step 76 | is reaching the diagnostic screen. On my original black DET1 running v3.03a 77 | firmware, the key combination is Function + Shift + T when powering the device 78 | on. I got this information from the spew.txt on the Yahoo Mailstation group 79 | (http://tech.groups.yahoo.com/group/mailstation/), written by Cyrano Jones 80 | (who discovered much of what I will discuss here). You can find it in the 81 | Files/Mailbug section. Quoted from his file: 82 | 83 | "Enter test mode with vulcan nerve pinch while booting. , or 84 | or on the newer models, , then "qa781206", without 85 | the quotes, of course." 86 | 87 | Hopefully one of those will work for you. Once you're into the diagnostic 88 | screen, press Shift + F5 to get into the hex editor. The F keys are those gray 89 | rectangular ones beneath the screen. 90 | 91 | Keep in mind that this does not allow you to modify the codeflash on the 92 | device. It's merely for the 512KB of dataflash, which is where the Mailstation 93 | stores all your email and settings and such. Something else the Mailstation 94 | stores here however are third-party applications, particularly ones that were 95 | included from Yahoo, for getting weather and TV listings or whatever. These 96 | weren't included with all Mailstations, but the functionality to use them 97 | apparently was. This is what we're going to take advantage of to run code on 98 | the device, since aforementioned smart folk figured out the structure to these 99 | apps, allowing us to create our own. 100 | 101 | We're not ready to do so yet, but at any time, you can hit the Back button to 102 | exit the hex editor, and then press Q at the diagnostic menu to restart the 103 | Mailstation. It prompts you at this point whether you want to clear the 104 | dataflash (much like when you remove power while the device is on), but just 105 | skip past that unless you really want to clear everything for some reason. 106 | 107 | 108 | APP RECORDS 109 | ----------- 110 | 111 | First of all, we need to find out how many apps are already installed on your 112 | device, to know which area to place our own. So while in the hex editor, press 113 | G to bring up the Goto prompt, and type in "020000", followed by pressing 114 | Enter. This takes you to the location which stores info about how many 115 | apps are installed/where their code is stored/etc. You may see nothing 116 | but zeroes along the top row, but this just means you have no apps (much like 117 | mine did). Then again, you might have some stuff listed, which means you 118 | probably do have a couple. Here's the known structure of the data starting at 119 | 0x020000: 120 | 121 | nn ?? ?? ?? <-- number of apps 122 | xx 00 xx xx xx 18 <-- data for 1st app 123 | xx 01 xx xx xx 19 <-- data for 2nd app 124 | xx 02 xx xx xx 1a <-- data for 3rd app 125 | xx 03 xx xx xx 1b <-- data for 4th app 126 | xx 04 xx xx xx 1c <-- data for 5th app 127 | 128 | The first four bytes are header info, with only the first byte being known. It 129 | holds the number of apps you have. Immediately following that, you have 130 | records of six bytes each for each app. It's believed that you can have five 131 | apps at most. Most of these bytes are also unknown, but the second in each is 132 | the dataflash page number it resides on (out of 32 pages, 16KB each = 512KB), 133 | and the sixth byte is the app number. The values for each app must be left as- 134 | is unless you know what you're doing. You'll mostly only be changing the 135 | number of apps. 136 | 137 | 138 | HEX VIEWER TO HEX EDITOR 139 | ------------------------ 140 | 141 | Changing anything requires using the hex editor to actually edit, which, 142 | believe it or not, it can't do by default! It's actually more of just a hex 143 | viewer upon startup. But luckily they included a back door of sorts, which 144 | turns it into a true hex editor. 145 | 146 | To get into actual hex editor mode, press G for the Goto command, then type in 147 | this address: "710304x", minus quotes of course. And don't forget the x at the 148 | end, even though you won't see it being typed. Once you put this in, you don't 149 | have to press enter. If you do, you'll lose your place. Hit the Back button 150 | on the keyboard instead to return the editor, and you should still be at the 151 | 0x020000 location. And now you'll be in actual hex editor mode. 152 | 153 | To edit the current screen of data, you hit the "s" key on your keyboard. The 154 | original instructions say control-s, or function-s, but just "s" worked for me. 155 | You can use the arrow keys to move around in the data, and type in new values 156 | in hex. Pressing the "s" key again will save the current changes back to the 157 | dataflash. You must do this before leaving the current screen of data, or 158 | you'll lose any changes. Hitting the Back button will also result in losing 159 | changes. 160 | 161 | 162 | So now I'll break the instructions up: 163 | 164 | - Method A will be if you have Yahoo apps installed but wish to just overwrite 165 | one of them. 166 | 167 | - Method B will be if you have Yahoo apps but want to add a new one. 168 | 169 | - Method C will be if you have no apps at all and want to add one. 170 | 171 | 172 | METHOD A 173 | -------- 174 | So you already have some apps installed, but don't care about those, and just 175 | want to take the easy route and overwrite one of them. That's probably the 176 | easiest method. It means you don't have to edit anything here at 0x020000, as 177 | long as you see data to at least indiciate one or more apps. I expect you 178 | wouldn't have chosen method A if not. But if this is your method, we'll 179 | replace the first app, so for future reference, you need to remember that 180 | you'll be using dataflash page 0 to put your actual app in. All you need to do 181 | now is go to the LOADER APP section. 182 | 183 | If you plan to add more apps in the future though, I suggest reading METHOD B 184 | as well. 185 | 186 | 187 | METHOD B 188 | -------- 189 | This section will be slightly tricky, but mostly just because it might mean 190 | some counting. You probably already have two apps installed (which is what 191 | will be assumed for most of this section), and while you might think it's a 192 | simple matter of changing that "2" to a "3" at the beginning of the apps 193 | header, it's not quite. If you did think that though, you were partially 194 | right, because you certainly will need to increment that first value at 195 | 0x020000. Go ahead and do so. Use the instructions from earlier to make sure 196 | you're in actual hex editor mode if necessary, then just type over that value 197 | with your new one. If you had two apps, it should now show that you have 198 | three. 199 | 200 | In fact, at this point, if you saved the data (pressing "s") and went back and 201 | looked in the Extras section on the Mailstation, you'd likely see a third extra 202 | app over on the second page of apps, just minus an icon or name. It would be 203 | selectable though, which would indiciate what you've done so far worked. If 204 | you do go check this out though, make sure you follow all the previous 205 | instructions again to make it back to this point in the hex editor at 0x020000. 206 | 207 | Now is the counting part I mentioned. The problem with preinstalled apps is 208 | that there's only an app record for just the apps installed. That means we 209 | need to add a new one at the end of that, so that it'll know what page of 210 | dataflash the code is in and such when you run the third app. If you run the 211 | third app without this data specified, it'll almost always run the first Yahoo 212 | app (or whatever app you have in that location). 213 | 214 | So we're going to assume you have two apps already installed, and are wanting 215 | to add a third. This means counting over past the six-byte app records for the 216 | two apps already installed in order to add the bytes for the third. Remember 217 | that the app info area is formatted like this: 218 | 219 | [4 bytes header][6 bytes of app record 1][6 bytes of app record 2] 220 | 221 | The very first byte in the first four of course being the number of apps 222 | installed, which you should have already changed. We need to add another six 223 | bytes at the end of all of this. If you only had one app installed, you'd have 224 | to count over until past the last byte of the first app record, but luckily, 225 | having two apps installed means 16 bytes total (4 + 6 + 6). The hex editor 226 | shows 16 bytes per line. This means that instead of counting, you can simply 227 | go to the second line on the screen, aka address 0x020010. If you only had one 228 | app already, you'd have to count over to 0x02000A. 229 | 230 | Now, what you put at this location is dependant on the app number you're about 231 | to install. From earlier, this is the known structure of the app records: 232 | 233 | xx 00 xx xx xx 18 <-- data for 1st app 234 | xx 01 xx xx xx 19 <-- data for 2nd app 235 | xx 02 xx xx xx 1a <-- data for 3rd app 236 | xx 03 xx xx xx 1b <-- data for 4th app 237 | xx 04 xx xx xx 1c <-- data for 5th app 238 | 239 | If you have two apps installed already, then it's the data for the third app 240 | you need to put in. Since we don't know what the "xx" values are for, use 241 | "00". It works fine for me. So, for example, if you're adding in app three, 242 | you'd go to the second line on the screen when at 0x020000(aka address 243 | 0x020010 now), and put in the following bytes: "00 02 00 00 00 1a". These 244 | bytes tell it to go to dataflash page 2 to run the app, and that the internal 245 | app number is 1a. The latter isn't important to us (but is important to 246 | include). 247 | 248 | What is important though is that you remember the dataflash page number from 249 | the line you add. This is because you have to know which page your app will 250 | run in, in order to know which page to put the code, later in the LOADER APP 251 | section. If you put it in the wrong page, it naturally won't run. 252 | 253 | While you're here, you might want to go ahead and add in the remaining bytes 254 | necessary to identify the rest of the five total apps. This will be useful if 255 | you want to add in more apps in the future, and would later require you to only 256 | change the first byte in this area, aka the number of apps, when adding 257 | another. So for example, if you just added in app three using the previous 258 | instructions, then all you need to do is type in the data for apps four and 259 | five right afterward. 260 | 261 | Don't forget to press "s" again to save your changes! Now, with your proper 262 | dataflash page number in mind, go on to the LOADER APP section. 263 | 264 | 265 | METHOD C 266 | -------- 267 | This method is probably the second easiest aside from A, because it just means 268 | typing in bytes. You're probably here if you have no apps installed, or if you 269 | just don't care enough about the Yahoo apps to worry about them being there at 270 | all. 271 | 272 | So, make sure you're in actual hex editor mode, and that you're at location 273 | 0x020000. We're going to add in the app header, and all five app records. 274 | This means that if you decide to add more apps in the future, all you have 275 | to do is increment the first byte, since all the proper app records will 276 | already be in place. 277 | 278 | So, at 0x20000, we want to put in the following bytes: 279 | 280 | 01 00 00 00 00 00 00 00 00 18 00 00 00 00 00 18 281 | 00 01 00 00 00 19 00 02 00 00 00 1a 00 03 00 00 282 | 00 1b 00 04 00 00 00 1c 283 | 284 | The first byte obviously indicates we should now have one app. Make sure to 285 | hit "s" to save all this! It couldn't hurt to verify you typed in the proper 286 | bytes, as well. If you want to see if it worked, exit out of the hex editor, 287 | and go to the Extras area on your Mailstation. On the right, you should now 288 | have a new app, with no icon or label, but it should be selectable. Running it 289 | at the moment will probably crash your Mailstation though. 290 | 291 | Since this will be your first app, you'll be installing the code into dataflash 292 | page 0. Remember this value, then head on to the next section, LOADER APP. 293 | 294 | 295 | LOADER APP 296 | ---------- 297 | 298 | Okay, if you used methods B or C, you should have modified the apps header to 299 | specify the new number of apps, and added any necessary app records to be able 300 | to have your own apps. 301 | 302 | And no matter what method you used, you should know your dataflash page number to 303 | put the actual app at. 304 | 305 | This is where we're going to put the actual code! It also holds icon and icon 306 | label data, but we're not going to put an icon, just for the sake of typing 307 | less bytes in. Yes, you have to type in every byte of code for this manually, 308 | like in the old days. This is why the code is going to be as brief and to the 309 | point as possible. Its sole purpose will be loading code from your PC to the 310 | Mailstation, and running it. In fact, it won't even display anything on the 311 | screen while it's doing it! But we'll know it if it's loading, because the 312 | host loader app on the PC side will show us. 313 | 314 | In any case, let's put in some code. The first step is determining the 315 | location in the hex editor to go in order to do it. See, when you launch the 316 | app via the Mailstation, it looks in the app record and determines the 317 | dataflash page to load into slot4000 (16KB from 0x4000-0x7FFF in the 318 | Mailstation address space). As mentioned earlier, the dataflash is 512KB, 319 | resulting in 32 "pages" of flash that can be put into slot4000 (or slot8000 for 320 | that matter). Some of the later pages though are used for storing email and 321 | all that, so we wouldn't want to mess with those. You've already told 322 | it what page numbers each app uses anyway when you put in the app records 323 | earlier, and the Mailstation knows not to store anything important in those 324 | pages apparently. 325 | 326 | So this just takes a little math to determine the actual starting address in 327 | the dataflash that you need to put your code in. You basically just multiply 328 | your page number by 0x4000. So page 0 would be address 0x0000, page 1 would be 329 | 0x4000, page 2 would be 0x8000, etc. 330 | 331 | I'll make it easy for you actually. If you're using method A or C, your 332 | address will be 0x0000. If you're using Method B, it's PROBABLY going to be 333 | 0x8000, if you already had two apps installed. If you had some odd amount of 334 | apps installed, calculate accordingly. 335 | 336 | Now that you know your starting address in the dataflash, that's where we need 337 | to go. Using the Goto command in the hex editor, just punch in your address. 338 | Make sure you add enough zeroes into the blank, since it holds six characters. 339 | 0x4000 would be "004000", for example. 340 | 341 | Now you're at the starting address of where your app should be! It's probably 342 | a bunch of zeroes. If you're overwriting a pre-existing Yahoo app, then it's 343 | probably a bunch of gibberish. Either way, we're overwriting it at this point. 344 | Make sure you put in the backdoor code mentioned earlier, hit "s" to enter edit 345 | mode, and type in these bytes: 346 | 347 | C3 2D 40 1A 40 0E 40 09 40 00 00 00 00 00 01 00 348 | 06 00 06 00 4C 6F 61 64 65 72 C5 E5 AF D3 08 3C 349 | D3 07 CD 27 80 B7 CA 22 40 7D E1 C1 C9 CD 1A 40 350 | 6F CD 1A 40 67 01 00 80 CD 1A 40 57 3E 01 D3 08 351 | D3 07 7A 02 03 2B AF B4 C2 38 40 AF B5 C2 38 40 352 | C3 00 80 353 | 354 | This is the code from loaderapp.bin, if you're curious. If you want to see the 355 | source to have some idea what it's doing, look at loaderapp.asm. 356 | 357 | You might want to visually verify your bytes, because it's extremely easy to 358 | make a mistake. One wrong letter or number could mess up the entire program. 359 | 360 | That's it! If you haven't already, hit "s" to save. Now you can go back out 361 | of the hex editor and into the Mailstation, look in the Extras area, and you 362 | should see the "Loader" app. If this is your first app, it'll be on the first 363 | page. If you already had some apps, it'll be on the second page. 364 | 365 | Keep in mind that running this won't do anything until you actually try to send 366 | code to it. It'll actually seem like it's frozen up (since it's constantly 367 | waiting for a byte from the parallel port). And if something ever goes wrong 368 | during a transfer (which can happen occasionally), you'll have to reset the 369 | Mailstation either with the reset button on back, or cycling the power. 370 | 371 | Now to send your own code to it! 372 | 373 | 374 | MAILSEND 375 | -------- 376 | Mailsend is the other side of the transfer process that I wrote, which you run 377 | on your PC. It's a command-line Windows app. 378 | 379 | That said, open up a command prompt window, and navigate to where you put all 380 | the files. Sometimes it's easiest to just put it all in c:\mailstation, which 381 | is what I do. 382 | 383 | Mailsend assumes your PC's parallel port runs on the fairly standard port 384 | 0x378. If not, you're going to have some problems. I have no idea if this is 385 | compatible with those USB->Parallel dongles out there, either. But almost 386 | every computer still made has a parallel port built into it, which should work 387 | with this just fine. 388 | 389 | To try it out, run "mailsend fyos_bin.bin" on the PC. It'll prompt you to 390 | press enter to continue. At this point, you need to run Loader on the 391 | Mailstation. Doing so won't give you any sort of visual indication, but you'll 392 | know it's working here in a second. Once Loader is running, hit return on the 393 | PC. You should start to see a byte counter as it transfers data to the 394 | Mailstation. When it's done, it'll return to the command prompt, and your 395 | Mailstation should be running whatever you just send to it. In this case, 396 | FyOS. If so, then congratulations, you can now transfer any binary file to the 397 | Mailstation! 398 | 399 | 400 | THE END? 401 | -------- 402 | 403 | It's important to remember that your code is loaded into slot8000 (16KB from 404 | 0x8000 to 0xBFFF), in ram page 1. 0xC000 to 0xFFFF is ram page 0, which is 405 | fixed and can't be swapped (as far as we know). The Mailstation uses page 406 | 0 to store variables and such for its own code. This means you should keep 407 | the binaries you send less than 16KB, or you'll overwrite that stuff. If 408 | that's your intention, then fine, but keep in mind that interrupts are not 409 | disabled in the Loader app, meaning parts of the code you send that span 410 | past 0xC000 could get overwritten before it even gets a chance to execute. You 411 | could modify Loader to disable them however (then reassemble it, and type in 412 | the bytes again of course), but you should know what you're doing in such a 413 | case. No interrupts means no keyboard support via the firmware routines, for 414 | example. 415 | 416 | That's about it for this tutorial. If you have any questions/comments, feel 417 | free to let me know at fyberoptic@gmail.com. As mentioned in the readme, I 418 | also frequent the Yahoo group, where others might be able to help you as well: 419 | 420 | http://tech.groups.yahoo.com/group/mailstation/ 421 | 422 | Have fun! 423 | 424 | 425 | - FyberOptic 426 | 427 | 428 | 429 | -------------------------------------------------------------------------------- /docs/modem-RCV336DPFSP.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcs/mailstation-tools/68cc381837011ffba804303f72d6eb7885aff050/docs/modem-RCV336DPFSP.pdf -------------------------------------------------------------------------------- /loader.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; This loader app is based around the Yahoo app model used in spew.asm, by Cyrano Jones. 3 | ; The original comments have been removed/replaced. The code itself of course is also 4 | ; replaced to change the functionality, which is to recieve a dynamically specified 5 | ; number of bytes. That's all it does. The screen doesn't even update, in order to 6 | ; make the binary as small as possible. 7 | ; 8 | ; The first two bytes sent from the host make up a 16-bit value of the total number of 9 | ; data bytes to follow. The first byte is the low byte, the second is the high. After 10 | ; those, the actual data is transferred into ram page 1 in slot8000. The total byte 11 | ; count is decremented, and when zero, it jumps to 0x8000 to run the transferred code. 12 | ; 13 | ; This was originally written to be assembled using AS80, which can be found at: 14 | ; http://www.kingswood-consulting.co.uk/assemblers/ 15 | ; 16 | ; - FyberOptic (fyberoptic@gmail.com) 17 | ; 18 | ; This has been modified to be assembled with SDCC ASZ80. 19 | ; 20 | 21 | .module loader 22 | 23 | .area _DATA 24 | .area _HEADER (ABS) 25 | .org 0x4000 ; Apps always start at 0x4000 no matter what 26 | ; dataflash page they load from. 27 | 28 | jp eventhandler ; Jump to the start of our code. 29 | 30 | .dw (icons) ; The following is data about the app 31 | .dw (caption) ; itself, most of which we won't even 32 | .dw (dunno) ; worry about. 33 | dunno: 34 | .db #0 35 | zip: 36 | .dw #0 37 | zilch: 38 | .dw #0 39 | caption: 40 | .dw #0x0001 41 | .dw (endcap - caption - 6) ; num of chars 42 | .dw #0x0006 ; offset to first char 43 | .ascii "Loader" ; the caption string 44 | endcap: 45 | 46 | icons: 47 | .dw #0 ; size icon0 48 | .dw (icon0 - icons) ; offset to icon0 49 | .dw #0 ; size icon1 50 | .dw (icon1 - icons) ; offset to icon1 (0x00b5) 51 | icon0: 52 | .dw #0 ; icon width 53 | .db #0 ; icon height 54 | icon1: 55 | .dw #0 ; icon width 56 | .db #0 ; icon height 57 | 58 | .equ brecvbyte, #0x8027 ; Firmware function in codeflash page 1. Attempts 59 | ; to receive a byte. Upon returning, if a = 0, it 60 | ; timed out or failed. Otherwise the l register 61 | ; holds the received byte. 62 | 63 | ;---------------------------------------------------------- 64 | ; Now for the actual code 65 | ;---------------------------------------------------------- 66 | 67 | getbyte: 68 | push bc ; Preserve BC, HL 69 | push hl 70 | 71 | xor a ; Put codeflash page 1 into slot8000. 72 | out (#08), a 73 | inc a 74 | out (#07), a 75 | 76 | getbyte2: 77 | call brecvbyte ; Try to fetch a byte. 78 | or a ; If we didn't get one, try again. 79 | jp z, getbyte2 80 | 81 | ld a, l ; Load received byte into A register 82 | 83 | pop hl ; Restore BC, HL 84 | pop bc 85 | ret 86 | 87 | eventhandler: 88 | call getbyte ; Get low byte of total bytes to download 89 | ld l, a 90 | 91 | call getbyte ; Get high byte of total bytes to download 92 | ld h, a 93 | 94 | ld bc, #0x8000 ; Destination address 95 | nextcodebyte: 96 | call getbyte ; Fetch a byte of data 97 | 98 | ld d, a ; Preserve A 99 | 100 | ld a, #1 ; Put ram page 1 into slot8000 101 | out (#0x08), a 102 | out (#0x07), a 103 | 104 | ld a, d ; Restore A 105 | 106 | ld (bc), a ; Load incoming byte to ram. 107 | inc bc ; Inc ram location. 108 | 109 | dec hl ; Dec bytes to be received. 110 | 111 | xor a ; Check if hl = 0; get another byte if not 112 | or h 113 | jp nz, nextcodebyte 114 | xor a 115 | or l 116 | jp nz, nextcodebyte 117 | 118 | jp 0x8000 ; When done, jump to code! 119 | -------------------------------------------------------------------------------- /memdump.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; Based off of spew.asm from Cyrano Jones on the mailstation Yahoo Group, 3 | ; modified to send 64kb of memory. 4 | ; 5 | ; Originally written to be assembled with AS80, converted to SDCC ASZ80 syntax. 6 | ; 7 | 8 | .module memdump 9 | 10 | .area _DATA 11 | .area _HEADER (ABS) 12 | .org 0x4000 ; This is *always* #4000, regardless of 13 | ; what page you use. 14 | 15 | jp eventhandler 16 | 17 | .dw (icons) ; icon location (in this page) 18 | .dw (caption) 19 | .dw (dunno) 20 | dunno: 21 | .db #0 22 | xpos: 23 | .dw #0 24 | ypos: 25 | .dw #0 26 | caption: 27 | .dw #0x0001 ; ????? 28 | .dw (endcap - caption - 6) ; end of chars 29 | .dw #0x0006 ; offset to first char 30 | .ascii "Mem Dump" ; the caption string 31 | endcap: 32 | 33 | icons: 34 | .dw #0 ; size icon0 35 | .dw (icon0 - icons) ; offset to icon0 36 | .dw #0 ; size icon1 37 | .dw (icon1 - icons) ; offset to icon1 (0x00b5) 38 | icon0: 39 | .dw #0 ; icon width 40 | .db #0 ; icon height 41 | icon1: 42 | .dw #0 ; icon width 43 | .db #0 ; icon height 44 | 45 | 46 | .equ bsendbyte, #0x802D ; raises busy & sends byte. 47 | ; We use the existing sendbyte from 48 | ; original update code. This means 49 | ; codeflash page #01 needs to be banked 50 | ; in to slot8000 before calling bsendbyte. 51 | 52 | .equ done, #0x0000 ; Gotta go somewhere when done, we reboot. 53 | ; Mailstation will call eventhandler 3 54 | ; or 4 times when you select the new 55 | ; application, and we only want to exec 56 | ; once, so we do not return at end, we 57 | ; reboot after first "event". 58 | 59 | eventhandler: 60 | ld a, #0 ; set slot8000device = codeflash 61 | out (8), a 62 | ld a, #1 ; bank bsendbyte into slot8000 63 | out (7), a 64 | 65 | ld de, #0x0000 66 | byteloop: 67 | ld a, (de) 68 | ld h, a 69 | push de 70 | call bsendbyte ; send byte(H) 71 | pop de 72 | 73 | ld a, d 74 | cp #0xff 75 | jr nz, incde 76 | ld a, e 77 | cp #0xff 78 | jr nz, incde 79 | jp done 80 | incde: 81 | inc de 82 | jr byteloop 83 | -------------------------------------------------------------------------------- /teensy-loader/Makefile: -------------------------------------------------------------------------------- 1 | # requires arduino-makefile 2 | # https://github.com/sudar/Arduino-Makefile 3 | 4 | BOARD_TAG = teensy31 5 | F_CPU = 48000000 6 | 7 | include /usr/local/share/arduino-makefile/Teensy.mk 8 | -------------------------------------------------------------------------------- /teensy-loader/teensy-loader.hex: -------------------------------------------------------------------------------- 1 | :1000000000800020BD0100008D06000059060000A0 2 | :100010005906000059060000590600005906000064 3 | :100020005906000059060000590600008D06000020 4 | :100030008D06000059060000FD160000BD170000E7 5 | :100040008D0600008D0600008D0600008D06000064 6 | :100050008D0600008D0600008D0600008D06000054 7 | :100060008D0600008D0600008D0600008D06000044 8 | :100070008D0600008D0600008D0600008D06000034 9 | :100080008D0600008D0600008D0600008D06000024 10 | :100090008D0600008D0600008D0600008D06000014 11 | :1000A0008D0600008D0600008D0600008D06000004 12 | :1000B0008D0600008D0600008D0600008D060000F4 13 | :1000C0008D0600008D0600008D0600008D060000E4 14 | :1000D0008D0600008D0600008D0600008D060000D4 15 | :1000E0008D0600008D0600008D0600008D060000C4 16 | :1000F0008D060000891900008D060000A91A000075 17 | :100100008D060000C91B00008D0600008D06000052 18 | :100110008D0600008D0600008D0600008D06000093 19 | :100120008D0600008D0600008D0600008D06000083 20 | :100130008D0600008D0600008D0600008D06000073 21 | :100140008D0600008D0600008D0600008D06000063 22 | :100150008D0600008D0600008D0600008D06000053 23 | :100160008D060000110A00008D0600008D060000BB 24 | :100170008D0600008D0600008D0600008D06000033 25 | :100180008D0600008D0600008D0600008D06000023 26 | :100190008D0600008D0600008D0600008D06000013 27 | :1001A0008D0600008D0600008D0600008D06000003 28 | :1001B0008D0600008D0600008D060000574B4CF2A6 29 | :1001C000205210B51A804DF628121A8000BF00BFC9 30 | :1001D00000F060FA524B4FF010621A60514A9A6078 31 | :1001E000514ADA60514A136813F4807301BF5049D1 32 | :1001F0000B604FF4A85313604E4B1A78110748BF99 33 | :100200001A784D4944BF42F008021A704B4B2A221B 34 | :100210001A704B4A4B4B8B4277D34B4B4B4A0021C6 35 | :10022000934277D34A4A4B4C0023114654F823009B 36 | :1002300042F8230001336F2BF8D1474B474A802007 37 | :1002400003F8010B9342FBD1454B1960454B8A22C1 38 | :100250001A70A3F5805324225A70A0221A709A793A 39 | :100260009207FCD59A79D406FCD43F4B19469A796B 40 | :1002700002F00C02082AFAD103221A7140225A71A4 41 | :100280008B799806FCD5384B9A795106FCD5374ABC 42 | :10029000374911600221516020221A70324A937945 43 | :1002A00003F00C030C2BFAD1324B334A1A60334B58 44 | :1002B0004BF67F321A6000225A60072243F8042C62 45 | :1002C0002F4AC3F80C2D62B600F08AFA184B1B684F 46 | :1002D000DA0705D52B4800F0E5F92B4B2B4A1A60BD 47 | :1002E0002B4B1B785B0609D5274C284B22689A427A 48 | :1002F00004D1244800F0D6F90023236001F006FD64 49 | :1003000000F0CEF901F062FAFEE752F8040F43F86C 50 | :10031000040B80E743F8041B82E700BF0E20054072 51 | :1003200030800440823F04000100002B10D00340C5 52 | :1003300014D0034002D00740C887FF1F00E00740E9 53 | :10034000D81E00001C87FF1FC887FF1F8C8AFF1F55 54 | :100350000082FF1F0000000000E400E05FE400E016 55 | :1003600008ED00E000500640004006404480044094 56 | :100370000000131104800440C010050014E000E0E8 57 | :100380000000202000DD68501CE00340A5C3945A03 58 | :1003900000F00740FFFFFFFFFFFFFFFFFFFFFFFF32 59 | :1003A000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D 60 | :1003B000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4D 61 | :1003C000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF3D 62 | :1003D000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF2D 63 | :1003E000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF1D 64 | :1003F000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0D 65 | :10040000FFFFFFFFFFFFFFFFFFFFFFFFDEF9FFFF23 66 | :100410000648074B10B5834204D0064B002B01D091 67 | :1004200000F04EF810BC01BC0047C046C887FF1F53 68 | :10043000C887FF1F0000000008480949091A8910F1 69 | :10044000CB0F591810B5491004D0064B002B01D022 70 | :1004500000F036F810BC01BC0047C046C887FF1F3B 71 | :10046000C887FF1F0000000010B5084C2378002B40 72 | :1004700009D1FFF7CDFF064B002B02D00548AFF3A3 73 | :1004800000800123237010BC01BC0047C887FF1FF8 74 | :1004900000000000DC1E0000064B10B5002B03D04E 75 | :1004A00005490648AFF30080FFF7C6FF10BC01BC4A 76 | :1004B0000047C04600000000CC87FF1FDC1E000084 77 | :1004C0001847C04610B5052000F01CF901284FF070 78 | :1004D00004000CBF8024002400F014F901280CBF94 79 | :1004E0004023002303201C4400F00CF901280CBF1A 80 | :1004F0002023002302201C4400F004F901280CBF33 81 | :100500001023002301201C4400F0FCF801280CBF3C 82 | :1005100008200020204410BD10B5C400C4F3C01151 83 | :10052000082000F0CFF8C4F38011072000F0CAF8CB 84 | :10053000C4F34011092000F0C5F8C4F300110A20EB 85 | :1005400000F0C0F8C4F3C0010B20BDE8104000F07B 86 | :10055000B9B808B501210B2000F0E2F801210A200A 87 | :1005600000F0DEF80121092000F0DAF8012107206F 88 | :1005700000F0D6F80121082000F0D2F80021042074 89 | :1005800000F0CEF80021052000F0CAF80021032079 90 | :1005900000F0C6F80021022000F0C2F8002101207E 91 | :1005A00000F0BEF80D20012100F0BAF80820BDE8E7 92 | :1005B0000840FFF7B1BFFFFF70B504460820FFF702 93 | :1005C000ABFF124DFFF77EFF10F0400608D0013D53 94 | :1005D000F8D14FF0FF360820FFF79EFF304670BD80 95 | :1005E00004F007042046FFF797FF44F01000FFF7E0 96 | :1005F00093FF064CFFF766FF430602D4013CF9D196 97 | :10060000E7E70020FFF788FFE5E700BF20A107002C 98 | :1006100010B50446FFF7D0FF58B9E008FFF7CCFF4C 99 | :1006200048B9A009FFF7C8FF002814BF0320002025 100 | :1006300010BD0120FCE70220FAE710B501F010F828 101 | :1006400040B100F0E7FFC4B22046FFF7E1FF002809 102 | :10065000FAD1F3E710BDFFFF08B50B4D2C462B6810 103 | :10066000580301D500F0D4F92368590501D501F0EC 104 | :100670008BF923681A0501D501F016FA2368DB040B 105 | :10068000EDD501F0A1FAEAE73480044008B5FFF7A0 106 | :10069000E3FFFFFF014B10221A8070470020054046 107 | :1006A0007047FFFF044B054900221A600A60044AA4 108 | :1006B000106010221A60704714D0034004D0034029 109 | :1006C00000D00340212810B509D80D4B53F8302035 110 | :1006D00092F880423CB1012311B182F8803010BD04 111 | :1006E00082F80031FBE703EBC0035B681A6819B1BD 112 | :1006F00042F003021A60F2E722F00202FAE700BFBA 113 | :10070000601D000021289FBF044B53F8303093F840 114 | :100710000002C0B288BF0020704700BF601D00000B 115 | :10072000212817D8144A02EBC00301295B6852F84C 116 | :10073000300001D004290ED1012280F880224FF42C 117 | :10074000A2721A601A6804290CBF42F0200222F03B 118 | :1007500020021A607047002280F8802211B94FF4FD 119 | :100760008072F6E7022902D140F20312F1E7032971 120 | :1007700008BF4FF48172ECE7601D000072B60B4BAE 121 | :100780000B4A0C491B681268096862B6490102D518 122 | :10079000322B88BF0132C3F53B4330207F33B3FB9C 123 | :1007A000F0F34FF47A7000FB0230704718E000E07D 124 | :1007B000E487FF1F04ED00E038B50446FFF7DEFFD5 125 | :1007C000054624B938BD013CFCD005F57A75FFF724 126 | :1007D000D5FF401BB0F57A7FF5D201F001F8F6E7BE 127 | :1007E000214B4FF4000210B51A604FF080721A606E 128 | :1007F0004FF000721A604FF080621A604FF0006292 129 | :100800001A601A4B1A4A1B4C00204BF6FF711860F5 130 | :10081000596028231360936013619361136293629C 131 | :10082000136393630922226004F58054043420602A 132 | :100830006160A360236144F8042C04F5FE24206069 133 | :100840000D4801600D490B608B600D4B1A6001F083 134 | :100850000DF81920FFF7B0FF00F036FE40F213103C 135 | :10086000BDE81040FFF7A8BF08E100E004800340A6 136 | :100870000C8003400080034008800B400C800B403C 137 | :1008800000800B40431E032B14D872B60A4951F85E 138 | :10089000230068B170B4094C058834F81320466809 139 | :1008A00041F82360521B24F8132062B670BC7047D5 140 | :1008B00062B67047002070477888FF1F788AFF1F54 141 | :1008C00030B472B62B4A13781D0706D52A4B196A25 142 | :1008D000002936D0996A002941D053781C0706D5E3 143 | :1008E000254B196C00293ED0996C002939D093789A 144 | :1008F000190705D5204B196E002936D0996E89B19C 145 | :10090000D3781B0707D51C4BD3F880207AB3D3F8D4 146 | :10091000882011243AB162B6184B00221A7030BCFC 147 | :1009200000F056BE0D241549154D0A7843F8345091 148 | :1009300003EBC4030830013A58600A7062B630BC59 149 | :10094000704704220D4C0F4D217843F8325003EBD1 150 | :10095000C20308304A1E5860227062B6EFE70524D1 151 | :10096000E1E70924DFE70822ECE70C22EAE710229E 152 | :10097000E8E700BFC41E00000080FF1FC688FF1FFD 153 | :10098000C800400088004000421E032A0ED81C4BBD 154 | :10099000400140F0100070B4184472B6194CA35CCA 155 | :1009A000032B1CD8DFE803F0031316187047032548 156 | :1009B0000E88A55410F0080F14BFC823882343EAFB 157 | :1009C00006430831C0E9003162B670BC7047083098 158 | :1009D0000225EDE70525EBE708300425E8E70A4B9B 159 | :1009E00053F8220040B1094B53F82200416043F80C 160 | :1009F000221062B670BC704743F82210034BF6E732 161 | :100A00000080FF1FC088FF1FA088FF1FB088FF1F46 162 | :100A10002DE9F04F8A4C8B4E87B02578EDB26B07ED 163 | :100A20001AD5894B1B78ABB188490A7802F0FF03CD 164 | :100A30002AB1013BDBB20B70002B00F0FF8184492F 165 | :100A40000A7802F0FF032AB1013BDBB20B70002BE6 166 | :100A500000F032820423237015F0080300F0CC80EC 167 | :100A60003378DBB21A0943D0DFF8F8814FEA9309F3 168 | :100A700008EBC90A013ADAF8047013F00803D5B29A 169 | :100A8000A7F1080040F09D8058F83920120C91B26F 170 | :100A900027F8081C002A00F08B806E4A27F8063CD5 171 | :100AA00047F8043C52F82530002B00F0F1816A4FE2 172 | :100AB00057F825205060DFF8D0B147F825003BF803 173 | :100AC000153019442BF8151000F064FD002800F0D3 174 | :100AD000D881624A624B1AF0080F00F1080018BF73 175 | :100AE0001346CAF8040048F839300823237094E705 176 | :100AF00099085C4D55F8313005EBC100C3F3830311 177 | :100B0000013B40680C2B4FD8DFE813F05301530131 178 | :100B10004E004E004E004E004E004E000D004E00A6 179 | :100B20004E004E00C400504B01931F6897B3DFF88E 180 | :100B30005CB1DFF85C81BBF800904C4B98F800C0CA 181 | :100B400018784A46402A28BF402240F0020ABCF1E9 182 | :100B5000000F8CF0010C88F800C0A9EB02010CBF5B 183 | :100B60004FF0880C4FF0C80C05EBCA084CEA024C59 184 | :100B700089B280F00100ABF800103A4445F83AC061 185 | :100B8000C8F80470187019B9B9F13F0F98BF002266 186 | :100B9000019B1A60364B1A88B2F5A06F04D1354A12 187 | :100BA0009978117000225A70334A012313709CE720 188 | :100BB0002A4A2B4B1AF0080F18BF134648F8393051 189 | :100BC00093E700F005FD2D482D4950F82520002A17 190 | :100BD00000F06281536811F805C040F8253002F139 191 | :100BE0000803CAF80430BCF1030F1ED8DFE81CF07C 192 | :100BF0001B00310234022E02E80700F12181290690 193 | :100C000000F12D82AA0706D51E4A0D49137802204D 194 | :100C1000DBB213700870EB0602D5094B10221A7074 195 | :100C200007B0BDE8F08F03234B551AF0080F128868 196 | :100C30000CBF8823C82343EA024348F8393054E7FD 197 | :100C40008020074090200740C488FF1FC588FF1FF1 198 | :100C5000D588FF1F7888FF1F8888FF1FC8004000C5 199 | :100C6000880040000080FF1F6C88FF1F6888FF1FFE 200 | :100C70009888FF1F9820074094200740A088FF1FF6 201 | :100C8000C088FF1F88200740788AFF1F6A88FF1FDF 202 | :100C90006988FF1F0368D0F804C0894845F831000F 203 | :100CA000884FDFF838E2DFF86882019798B240F2A7 204 | :100CB000816A00214FF001095045CEE9003C3960BE 205 | :100CC0002961A96188F8009000F22481B0F5D06F05 206 | :100CD00080F09982B0F5817F00F0018200F2E68118 207 | :100CE000802800F0F782822840F0D2810CF07F0348 208 | :100CF000042B00F2CD817448DFF8F0E101704170FF 209 | :100D00001EF823304FEA1C419F07059140F19C8358 210 | :100D1000012980F8009040F2C6826C4B03930221B7 211 | :100D2000981E4FF400330591049102930021684B03 212 | :100D3000029F93F800B04BF0020905EBC90C4FF08D 213 | :100D4000010ACCF804004FF0C80E4EEA07078BF0FA 214 | :100D5000010C45F8397088F8002083F800C000299C 215 | :100D600040F03882049A402A1CD14CF0020C05EB6A 216 | :100D7000CC02039F5760BAF1010F4FEA014E40F0D9 217 | :100D80009E824EF088020F4445F83C2088F800A06F 218 | :100D900083F800B03846402904D100214D4B019A18 219 | :100DA000198010604C4A012313704B4A01231370C1 220 | :100DB0009BE64A4B1A8842F221039A4237D1484BAC 221 | :100DC00090F800C0427883F800C05A7090F802C0D2 222 | :100DD000C27883F802C0DA701A6890F804C083F809 223 | :100DE00004C0862A90F805C0807983F805C0987100 224 | :100DF00008BF3C4BDFF8188104BF0F221A70344B38 225 | :100E000098F800001A78002882F0010C42F00202E3 226 | :100E100083F800C00CBF8823C82345F8323005EBA7 227 | :100E2000C20280F00100002388F800005360244BC8 228 | :100E3000294A45F831300123137056E600BEFEE51D 229 | :100E4000294A25482249136102250570274E0B7057 230 | :100E5000274911609160274C274D93610D21317016 231 | :100E6000FF21217029702374244B29739F251D7045 232 | :100E7000234C244B012101705460D36007B0BDE8BE 233 | :100E8000F08F214A48F839001378013313702CE6AB 234 | :100E900042F825001D4F0EE64B5D032B00F2FF804C 235 | :100EA00001A252F823F000BFEB0A0000EB0A000099 236 | :100EB000791000007310000000F0E0FBCAE500BFED 237 | :100EC000C80040006C88FF1F7088FF1F7288FF1FDA 238 | :100ED0006888FF1F6A88FF1F942007409888FF1FBB 239 | :100EE000808AFF1FC588FF1F0080FF1FC0200740AA 240 | :100EF0008800400088200740802007408420074069 241 | :100F0000E887FF1F2888FF1FC688FF1F8888FF1FEC 242 | :100F10006988FF1F42F2210E70453FF443AF00F293 243 | :100F2000AE80B0F5086F00F0DE81B0F5106F40F0D4 244 | :100F3000AF802A6AB849C3F3074317060B7000F164 245 | :100F40003582AB6A180600F17A822B6B190600F124 246 | :100F50007182AB6B1A0600F168822B6C1B0600F1E4 247 | :100F60005F82AB6C1F0600F156822B6D180600F1F4 248 | :100F70004D82AB6D190600F144822B6E1A0600F10A 249 | :100F80003B82AB6E1B0600F132822B6F1F0600F115 250 | :100F90002982AB6F180600F12082D5F8803019063F 251 | :100FA00000F11582D5F888301A0600F10A82D5F8CA 252 | :100FB00090301B0600F1FF81D5F898301F0600F134 253 | :100FC000A781964B0393964B0293964B0593964FAE 254 | :100FD000964BDFF894B204934FF0000A039B53F84A 255 | :100FE000040B039330B1D0F8049000F0F1FA4846B6 256 | :100FF0000028F8D1029B1868039B1A46002342F888 257 | :10100000043C47F82A3030B1D0F8049000F0E0FA00 258 | :1010100048460028F8D1049B13F8012B0493029B47 259 | :101020001946002341F8043B059B02911946002311 260 | :1010300041F8043B023A4FF0000305912BF81A30B7 261 | :10104000032A6AD8DFE802F0B964B96404234B5577 262 | :10105000EBE502234B55E8E505234B55E5E57449DF 263 | :10106000744B80220D2008701A70AA077FF5D3AD4B 264 | :10107000CAE501234B5538E500234B5535E542F2CF 265 | :10108000212C604538D042F22133984200F09F80F5 266 | :10109000674B0F221A70684A0123137085E61AF015 267 | :1010A000080F0CBF022303234B551EE540F202310B 268 | :1010B000884240F088800CF07F0CBCF1040FE7D828 269 | :1010C000190CE5D15A4810F82C3043F0020300F80F 270 | :1010D0002C30CDE902110846CDE9041127E60CF0C9 271 | :1010E0007F0CBCF1040FD3D8190CD1D1504810F8A3 272 | :1010F0002C3023F00203EAE7DFF870E14F4F50484D 273 | :10110000DEF800E0C7F800E0C3F307430370E0E750 274 | :10111000049B4FF0010203F8012C0AF1010ABAF115 275 | :10112000040F7FF45BAFDFF84891464F99F8003029 276 | :10113000454A002118073970137000F1268199F88B 277 | :101140000130424900220B7019072A63AA6300F19B 278 | :101150000B8199F802303E4900220B702A65AA657E 279 | :101160001A0700F1EE8099F803303A4900220B701B 280 | :101170001B072A67AA6700F1D18098F800A0002316 281 | :101180008AF00102C5F89030C5F89830324B93F8D8 282 | :1011900000B04BF0020905EBC90000214160BAF133 283 | :1011A000000F40F07F815146CDE902AACDE904AAA3 284 | :1011B00050464FF0880E5746C7E5049B4FF000029B 285 | :1011C00003F8012CA9E7B0F5A06F7FF461AF4FF0F1 286 | :1011D000010ADBE740294CF0020C7FF6C8AD1F483E 287 | :1011E0001F4A83F800B0BAF1010F08BF0246039B03 288 | :1011F00088F800A005EBCC004039436045F83C205E 289 | :1012000003F14000CAE51749486800283FF440AFA1 290 | :101210001B0C1FFA8CF932E0C488FF1F7888FF1F6F 291 | :10122000A088FF1FB088FF1F8888FF1FC088FF1F8E 292 | :10123000C02007408020074094200740888AFF1F75 293 | :10124000D488FF1FC688FF1FC4200740C82007405E 294 | :10125000CC200740D02007406888FF1F880040004E 295 | :10126000C8004000701E0000788AFF1FE487FF1F3F 296 | :10127000C41E00000C31486800283FF409AFB1F8E3 297 | :1012800000E09E45F6D1B1F802E0CE45F2D11B0A4E 298 | :10129000032B0CBF03780B894FEA1C4C9C4528BFDD 299 | :1012A0009C46CDF814C0059B402B194628BF402111 300 | :1012B0000F040297471804910397591A37E583F8EA 301 | :1012C00000B0059B88F800A04EF0C80245F83C200D 302 | :1012D000184460E578484FEA1C43012B05930170E0 303 | :1012E0004170E0D919E5754B73481B7803705FEACC 304 | :1012F0001C4C07D0431C03934FF48033CDE9049971 305 | :10130000029314E56146CDE902C0CDE904CC0EE5B7 306 | :10131000D5F89C00083800F05BF952E600F03AF985 307 | :10132000002800F0AF80664B0830C5E9203000F09F 308 | :1013300031F9002800F0A080624B0830C5E9223066 309 | :101340001BE700F027F9002800F0A7805C4B08306D 310 | :10135000C5E9183000F01EF9002800F09980594BBB 311 | :101360000830C5E91A30FEE600F014F900287ED0F6 312 | :10137000534B0830C5E9103000F00CF9002871D04B 313 | :10138000504B0830C5E91230E3E600F003F90028BD 314 | :1013900063D04B4B0830C5E9083000F0FBF800285B 315 | :1013A00056D0484B0830C5E90A30C8E6686A0838A4 316 | :1013B00000F00EF9C5E5D5F89400083800F008F9FA 317 | :1013C000FAE5D5F88C00083800F002F9EFE5D5F819 318 | :1013D0008400083800F0FCF8E4E5E86F083800F015 319 | :1013E000F7F8DAE5686F083800F0F2F8D1E5E86E52 320 | :1013F000083800F0EDF8C8E5686E083800F0E8F845 321 | :10140000BFE5E86D083800F0E3F8B6E5686D083828 322 | :1014100000F0DEF8ADE5E86C083800F0D9F8A4E596 323 | :10142000686C083800F0D4F89BE5E86B083800F0E9 324 | :10143000CFF892E5686B083800F0CAF889E5E86AE9 325 | :10144000083800F0C5F880E501297FF62CAF64E488 326 | :101450003B78A86201333B7071E63B782862013328 327 | :101460003B709AE73B78A86401333B7071E63B78A8 328 | :10147000286401333B707FE73B78C5F8880001336F 329 | :101480003B707AE63B78C5F8800001333B704EE74D 330 | :101490003B78A86601333B7065E63B7828660133EC 331 | :1014A0003B7057E7CDE90211CDE9041108464FF032 332 | :1014B000C80E0F4649E400BF7088FF1FC488FF1F95 333 | :1014C00088004000C8004000F8B500F0E3FB284B5E 334 | :1014D0002848294C294D2A4E0022C3E90022C3E99D 335 | :1014E0000222C3E90422C3E90622C3E90822C3E9B0 336 | :1014F0000A22C3E90C22C3E90E22C3E91022C3E980 337 | :101500001222C3E91422C3E91622C3E91822C3E94F 338 | :101510001A22C3E91C22C3E91E22C3F880200168F5 339 | :10152000C3F8842041F480210160C3F3072100F552 340 | :1015300028302170C3F307475430124937701B0E0F 341 | :101540002B70114FFF2304F81C3C03700F4C0B70E1 342 | :101550000F4801233B7085F84C2006F82C3C702581 343 | :101560004FF4007210232570026081F8F830F8BD46 344 | :101570000080FF1F348004409C200740B4200740B7 345 | :10158000B0200740102007409420074049E400E0C5 346 | :1015900008E100E010B572B60B480268B2FA82F1B9 347 | :1015A0000B2902DD62B6002010BD4FF00043CB4096 348 | :1015B00022EA0302026062B6044C48234B43E0185F 349 | :1015C0000022E2504260EFE75087FF1FBC83FF1FFD 350 | :1015D0000C4B4822C31AB3FBF2F30B2B11D80A4A67 351 | :1015E000127822B1094A12780AB1FFF769B972B6C6 352 | :1015F00007494FF0004222FA03F30A681A430A60CF 353 | :1016000062B67047BC83FF1FC688FF1FC488FF1FD8 354 | :101610005087FF1F38B5104C236863B1206843889A 355 | :10162000C2180133157A02889A4212D8FFF7D0FF08 356 | :101630000023236004E0094B1B781BB94FF0FF35F2 357 | :10164000284638BD0320FFF71DF920600028E5D1AA 358 | :10165000F4E74380F4E700BFC888FF1FC488FF1F7A 359 | :10166000044B9888044B1A681AB1138852889B1A45 360 | :1016700018447047788AFF1FC888FF1F38B50E4B83 361 | :101680001B7803F0FF0543B90C4C216831B14B883E 362 | :101690000B800420FFF778F9256038BDFFF77AFF4B 363 | :1016A000014620B10420BDE83840FFF76DB9044B76 364 | :1016B00001221A70F1E700BFCC88FF1FD088FF1FFE 365 | :1016C000D588FF1F70B50B4D0B4E0024EFF3108231 366 | :1016D00072B6286858B143692B6033B19C6102B976 367 | :1016E00062B6447783689847F0E73360F7E702B95A 368 | :1016F00062B670BDE888FF1FE488FF1FFFF7E2BFF6 369 | :1017000015490B6830B52BB9C0E9023308600223D4 370 | :10171000037530BD04681A68944206D20025121B76 371 | :101720008360C560D8601A60F0E702681C68996839 372 | :10173000121B026061B10C6894420B46F5D98160BE 373 | :10174000C968C160D860C168A21A88601A60DEE703 374 | :10175000C0E902139860DAE7D888FF1F70B5154D0D 375 | :101760002C6800261CB1236883B1013B2360EFF392 376 | :10177000108272B6104B00211868196002B962B667 377 | :10178000B8B18468FFF7BCFF2046F9E7A26802B150 378 | :10179000D36020692A60036826751B6822460021F1 379 | :1017A000984763681BB123602046FFF7A9FF2C68A8 380 | :1017B000D8E770BDD888FF1FDC88FF1F024A136876 381 | :1017C00001331360FFF7CABFE487FF1F08B5FEF7B8 382 | :1017D000C0FEFEF732FF00F003F8FAE77047FFFFA4 383 | :1017E00038B51E4C237813BB01232370FFF738FF55 384 | :1017F00008B1FFF7F3FF00F0B7F808B100F082FA84 385 | :1018000000F042F908B100F07EFA00F0CDF908B11D 386 | :1018100000F07AFA00232370EFF305833BB9EFF36E 387 | :10182000108272B60E4D286810B902B962B638BD82 388 | :101830000C4C21780029F8D10123237043692B60D7 389 | :1018400043B1996102B962B600254577836898472C 390 | :101850002570ECE704490B60F4E700BFF488FF1F34 391 | :10186000E088FF1FEC88FF1FF088FF1F10B5204B9A 392 | :101870002048214960221A70E1225A701F4B204AE9 393 | :101880001C78204B082C1AD1012404601320086016 394 | :10189000146018601C4B1D491B781D4A03B10123BD 395 | :1018A0000B6013601B4B1C4A19781C4B012911D883 396 | :1018B0008021116019601A4B01221A7010BD0A2C88 397 | :1018C00001D13924E1E70C2C0CBF35243D24046000 398 | :1018D0001220DCE7042901D88421EAE7082901D88D 399 | :1018E0008521E6E7102994BF86218721E1E700BF23 400 | :1018F0000040074008B003400CB003405487FF1F6E 401 | :1019000008B00B400CB00B40F588FF1F20B003401F 402 | :1019100020B00B405587FF1F24B0034024B00B407C 403 | :10192000F688FF1F70B50026B0FBF2F302FB13052B 404 | :10193000ECB2092D94BF30343734E4B28C551846DC 405 | :101940000BB10136F0E78A19481E5370F41AA3420E 406 | :1019500001DB084670BD10F8014F157805700133A2 407 | :1019600002F80149F2E7FFFF054B064A1878C3B2B7 408 | :101970001078C0B2834238BF4033181A704700BF96 409 | :101980003C89FF1F3D89FF1FF0B535490B7913F0E6 410 | :10199000300F09D072B68B7D03F0FF04002B37D1D6 411 | :1019A000CB7940234B7462B62D4AD178C9B20D066B 412 | :1019B0001ED513791C061BD52A4B2B481D7803789E 413 | :1019C0002A4EEDB2DBB2AB420AD00133402B28BF26 414 | :1019D00000231479F45CE4B2D471147D072CF2D99D 415 | :1019E000DBB203701E4B1A79100644BF7C22DA70FA 416 | :1019F00049060CD51A4B1A79520608D51C4A002103 417 | :101A000011701C4A126802B111703C22DA70F0BDEC 418 | :101A100062B6194D194A2B781278194FDBB2D2B23F 419 | :101A2000581C4028CE7928BF00209042F6B21CBF37 420 | :101A30003E540346601E10F0FF04F1D1D9B2297064 421 | :101A4000104909680029AFD0934236BFC2F1400265 422 | :101A50009B1A9B18272BC4BF01230B70A4E700BF60 423 | :101A600000A006408589FF1F8689FF1F4589FF1F4B 424 | :101A70004489FF1F4089FF1F3C89FF1F3D89FF1FCD 425 | :101A8000FC88FF1FF888FF1F054B064A1878C3B271 426 | :101A90001078C0B2834238BF4033181A704700BF75 427 | :101AA000CC89FF1FCD89FF1FF0B535490B7913F0A5 428 | :101AB000300F09D072B68B7D03F0FF04002B37D1B5 429 | :101AC000CB7940234B7462B62D4AD178C9B20D064A 430 | :101AD0001ED513791C061BD52A4B2B481D7803787D 431 | :101AE0002A4EEDB2DBB2AB420AD00133282B28BF1D 432 | :101AF00000231479F45CE4B2D471147D072CF2D97C 433 | :101B0000DBB203701E4B1A79100644BF7C22DA70D8 434 | :101B100049060CD51A4B1A79520608D51C4A0021E1 435 | :101B200011701C4A126802B111703C22DA70F0BDCB 436 | :101B300062B6194D194A2B781278194FDBB2D2B21E 437 | :101B4000581C4028CE7928BF00209042F6B21CBF16 438 | :101B50003E540346601E10F0FF04F1D1D9B2297043 439 | :101B6000104909680029AFD0934236BFC2F1400244 440 | :101B70009B1A9B18272BC4BF01230B70A4E700BF3F 441 | :101B800000B00640FD89FF1FFE89FF1FD589FF1F9A 442 | :101B9000D489FF1FD089FF1FCC89FF1FCD89FF1F6C 443 | :101BA0008C89FF1F8889FF1F054B064A1878C3B22E 444 | :101BB0001078C0B2834238BF4033181A704700BF54 445 | :101BC000448AFF1F458AFF1F10B5284B1A799206D9 446 | :101BD00020D52749DA790B78264801330078402B45 447 | :101BE000A8BF0023984218BF2348D2B21EBFC254D8 448 | :101BF000DAB20A70214A116861B1214A1278D2B270 449 | :101C0000934236BFC2F140029B1A9B18272BC4BFD8 450 | :101C100001230B701549CA78D2B214060BD50B7983 451 | :101C2000180608D5174B164C18782378DBB2984263 452 | :101C300011D16C23CB7051060CD50C4B1A7952067E 453 | :101C400008D5114A00211170104A126802B11170B2 454 | :101C50002C22DA7010BD0133282B28BF00230C483A 455 | :101C6000C05CDBB2C0B2C8712370E4E700C00640BC 456 | :101C7000448AFF1F458AFF1F048AFF1F008AFF1F37 457 | :101C8000768AFF1F758AFF1F4C8AFF1F488AFF1F35 458 | :101C90004D8AFF1F1FB572B6154B70221A70154A78 459 | :101CA000412111700F2102F8011C80221A701A784C 460 | :101CB0001206FCD5104B186862B6104B984298BFBC 461 | :101CC0000A2301AC98BF58430A222146FFF72AFE97 462 | :101CD0000B4A0023E05C591C20B10A2922F81100AC 463 | :101CE0000B46F7D101335B00137004B010BD00BF89 464 | :101CF0000000024007000240080002407F96980062 465 | :101D0000B087FF1F704770477047FFFF70B50F4ED9 466 | :101D10000F4DAD1BAD1007D00024A300F3580134C4 467 | :101D200000F01CF8A542F8D100F0CEF8094E0A4D9B 468 | :101D3000AD1BAD1007D00024A300F358013400F010 469 | :101D40000DF8A542F8D170BC01BC0047D41E0000BC 470 | :101D5000D41E0000D41E0000D81E00001847C04644 471 | :101D60004008FE4340A004404408FE4344A0044011 472 | :101D70000018FE4300C004403000FE433090044091 473 | :101D80003400FE43349004401C18FE431CC0044041 474 | :101D90001018FE4310C004400818FE4308C0044059 475 | :101DA0000C18FE430CC004400C10FE430CB0044061 476 | :101DB0001010FE4310B004401810FE4318B0044049 477 | :101DC0001C10FE431CB004401410FE4314B0044029 478 | :101DD0000418FE4304C004400010FE4300B0044059 479 | :101DE0000008FE4300A004400408FE4304A0044091 480 | :101DF0000C08FE430CA004400808FE4308A0044061 481 | :101E00001418FE4314C004401818FE4318C00440C0 482 | :101E10000410FE4304B004400810FE4308B0044020 483 | :101E20001400FE43149004404C08FE434CA00440B0 484 | :101E30000420FE4304D004402410FE4324B0044098 485 | :101E40002010FE4320B004402810FE4328B0044078 486 | :101E50002C10FE432CB004400020FE4300D0044070 487 | :101E60004808FE4348A004401000FE431090044080 488 | :101E7000000100009987FF1F12000000000200000F 489 | :101E80005687FF1F4300000000030000AC87FF1FC0 490 | :101E900000000000010309041C87FF1F0000000070 491 | :101EA000020309042487FF1F000000000303090444 492 | :101EB0004A87FF1F00000000000000000000000033 493 | :101EC0000000000000151915F8B5C046F8BC08BCA4 494 | :081ED0009E46704799040000D2 495 | :041ED800F8B5C04653 496 | :101EDC0008036A006300730026034D00610069006B 497 | :101EEC006C00730074006100740069006F006E0078 498 | :101EFC0020004C006F006100640065007200030359 499 | :101F0C0001000000FFFFFFFF0A0409024300020169 500 | :101F1C0000C0320904000001020201000524001077 501 | :101F2C000105240101010424020605240600010711 502 | :101F3C0005820310004009040100020A000000079A 503 | :101F4C000503024000000705840240000012011046 504 | :101F5C000102000040C01683047502010203010057 505 | :101F6C00040309040C030000000000000000000042 506 | :0C1F7C0000000000000000000000000059 507 | :00000001FF 508 | -------------------------------------------------------------------------------- /teensy-loader/teensy-loader.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * Teensy Mailstation parallel port interface 3 | * Copyright (c) 2020 joshua stein 4 | * 5 | * Permission to use, copy, modify, and distribute this software for any 6 | * purpose with or without fee is hereby granted, provided that the above 7 | * copyright notice and this permission notice appear in all copies. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | */ 17 | 18 | const int pLED = 13; /* as it is on the Teensy 3.2 */ 19 | 20 | const int pError = 1; /* pin 2 (data0) on mailstation */ 21 | const int pSelect = 2; /* pin 3 (data1) on mailstation */ 22 | const int pPaperOut = 3; /* pin 4 (data2) on mailstation */ 23 | const int pAck = 4; /* pin 5 (data3) on mailstation */ 24 | const int pBusy = 5; /* pin 6 (data4) on mailstation */ 25 | 26 | const int pData4 = 8; /* pin 11 (busy) on mailstation */ 27 | const int pData3 = 7; /* pin 10 (ack) on mailstation */ 28 | const int pData2 = 9; /* pin 12 (paperout) on mailstation */ 29 | const int pData1 = 10; /* pin 13 (select) on mailstation */ 30 | const int pData0 = 11; /* pin 15 (error) on mailstation */ 31 | /* connect teensy GND pin to mailstation pin 25 */ 32 | 33 | #define bsyin 0x40 /* 01000000 */ 34 | #define bsyout 0x08 /* 00001000 */ 35 | #define stbin 0x80 /* 10000000 */ 36 | #define stbout 0x10 /* 00010000 */ 37 | #define tribmask 0x07 /* 00000111 */ 38 | #define dibmask 0x03 /* 00000011 */ 39 | 40 | void dumpbyte(char); 41 | int readstatus(void); 42 | void writedata(char); 43 | int recvtribble(void); 44 | int recvbyte(void); 45 | int sendtribble(unsigned char); 46 | int sendbyte(unsigned char); 47 | 48 | void 49 | setup(void) 50 | { 51 | Serial.begin(115200); 52 | 53 | pinMode(pData0, OUTPUT); 54 | pinMode(pData1, OUTPUT); 55 | pinMode(pData2, OUTPUT); 56 | pinMode(pData3, OUTPUT); 57 | pinMode(pData4, OUTPUT); 58 | 59 | pinMode(pAck, INPUT); 60 | pinMode(pBusy, INPUT); 61 | pinMode(pPaperOut, INPUT); 62 | pinMode(pSelect, INPUT); 63 | pinMode(pError, INPUT); 64 | 65 | pinMode(pLED, OUTPUT); 66 | 67 | writedata(bsyout); 68 | } 69 | 70 | void 71 | loop(void) 72 | { 73 | while (Serial.available()) { 74 | char b = Serial.read(); 75 | while (sendbyte(b) != 0) 76 | ; 77 | } 78 | } 79 | 80 | void 81 | dumpbyte(char b) 82 | { 83 | Serial.print((int)b); 84 | Serial.print(" ="); 85 | for (int x = 7; x >= 0; x--) { 86 | Serial.print(" "); 87 | Serial.print(!!(b & (1 << x))); 88 | } 89 | Serial.println(""); 90 | } 91 | 92 | int 93 | readstatus(void) 94 | { 95 | return ((digitalRead(pBusy) == HIGH ? 1 : 0) << 7) + 96 | ((digitalRead(pAck) == HIGH ? 1 : 0) << 6) + 97 | ((digitalRead(pPaperOut) == HIGH ? 1 : 0) << 5) + 98 | ((digitalRead(pSelect) == HIGH ? 1 : 0) << 4) + 99 | ((digitalRead(pError) == HIGH ? 1 : 0) << 3); 100 | } 101 | 102 | void 103 | writedata(char b) 104 | { 105 | /* we only have 5 data pins, so mask off high 3 bits and shift */ 106 | b = (b & ~0xe0) << 3; 107 | 108 | digitalWrite(pData4, (b & (1 << 7)) == 0 ? LOW : HIGH); 109 | digitalWrite(pData3, (b & (1 << 6)) == 0 ? LOW : HIGH); 110 | digitalWrite(pData2, (b & (1 << 5)) == 0 ? LOW : HIGH); 111 | digitalWrite(pData1, (b & (1 << 4)) == 0 ? LOW : HIGH); 112 | digitalWrite(pData0, (b & (1 << 3)) == 0 ? LOW : HIGH); 113 | } 114 | 115 | int 116 | recvtribble(void) 117 | { 118 | unsigned char b; 119 | int tries = 0; 120 | 121 | /* drop busy */ 122 | writedata(0); 123 | 124 | /* wait for strobe (stbout) from other side */ 125 | while ((readstatus() & stbin) == 0) { 126 | if (++tries > 500000) { 127 | writedata(bsyout); 128 | return -1; 129 | } 130 | } 131 | 132 | digitalWrite(pLED, HIGH); 133 | 134 | /* store received byte */ 135 | b = (readstatus() >> 3) & tribmask; 136 | 137 | /* raise busy/ack */ 138 | writedata(bsyout); 139 | 140 | /* wait for strobe to drop on other side */ 141 | tries = 0; 142 | while ((readstatus() & stbin) != 0) { 143 | if (++tries >= 50000) { 144 | digitalWrite(pLED, LOW); 145 | return -1; 146 | } 147 | } 148 | 149 | digitalWrite(pLED, LOW); 150 | 151 | return b; 152 | } 153 | 154 | int 155 | recvbyte(void) 156 | { 157 | int t; 158 | char c; 159 | 160 | if ((t = recvtribble()) == -1) 161 | return -1; 162 | c = t; 163 | 164 | if ((t = recvtribble()) == -1) 165 | return -1; 166 | c += (t << 3); 167 | 168 | if ((t = recvtribble()) == -1) 169 | return -1; 170 | c += ((t & dibmask) << 6); 171 | 172 | return c; 173 | } 174 | 175 | int 176 | sendtribble(unsigned char b) 177 | { 178 | unsigned int tries; 179 | int ret = 0; 180 | 181 | /* raise busy */ 182 | writedata(bsyout); 183 | 184 | /* wait for mailstation to drop busy */ 185 | tries = 0; 186 | while ((readstatus() & bsyin) != 0) { 187 | if (++tries >= 500000) { 188 | ret = -1; 189 | goto sendtribble_out; 190 | } 191 | } 192 | 193 | /* send tribble */ 194 | writedata(b & tribmask); 195 | 196 | /* strobe */ 197 | writedata((b & tribmask) | stbout); 198 | 199 | /* wait for ack */ 200 | tries = 0; 201 | while ((readstatus() & bsyin) == 0) { 202 | if (++tries >= 500000) { 203 | ret = -1; 204 | goto sendtribble_out; 205 | } 206 | } 207 | 208 | /* unstrobe */ 209 | writedata(0); 210 | 211 | sendtribble_out: 212 | /* raise busy/ack */ 213 | writedata(bsyout); 214 | 215 | return ret; 216 | } 217 | 218 | int 219 | sendbyte(unsigned char b) 220 | { 221 | if (sendtribble(b) != 0) 222 | return 1; 223 | if (sendtribble(b >> 3) != 0) 224 | return 2; 225 | if (sendtribble(b >> 6) != 0) 226 | return 3; 227 | 228 | return 0; 229 | } 230 | -------------------------------------------------------------------------------- /teensy-loader/usb.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define MANUFACTURER_NAME {'j','c','s'} 4 | #define MANUFACTURER_NAME_LEN 3 5 | #define PRODUCT_NAME {'M','a','i','l','s','t','a','t','i','o','n', \ 6 | ' ','L','o','a','d','e','r'} 7 | #define PRODUCT_NAME_LEN 18 8 | 9 | struct usb_string_descriptor_struct usb_string_manufacturer_name = { 10 | 2 + MANUFACTURER_NAME_LEN * 2, 11 | 3, 12 | MANUFACTURER_NAME 13 | }; 14 | struct usb_string_descriptor_struct usb_string_product_name = { 15 | 2 + PRODUCT_NAME_LEN * 2, 16 | 3, 17 | PRODUCT_NAME 18 | }; 19 | struct usb_string_descriptor_struct usb_string_serial_number = { 20 | 3, 21 | 3, 22 | { 1 }, 23 | }; 24 | -------------------------------------------------------------------------------- /util/app_extractor.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # 3 | # Copyright (c) 2019 joshua stein 4 | # 5 | # Permission to use, copy, modify, and distribute this software for any 6 | # purpose with or without fee is hereby granted, provided that the above 7 | # copyright notice and this permission notice appear in all copies. 8 | # 9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | # 17 | 18 | # 19 | # Extract an application from a Mailstation dataflash dump including its 20 | # icons/screens and program code. 21 | # 22 | # Usage: app_extractor.rb -d -a 23 | # 24 | # Assemble output with: 25 | # ruby app_extractor.rb -f dataflash.bin -a 0 > app.asm 26 | # sdasz80 -l app.lst app.asm 27 | # 28 | # Then compare the byte listing in app.lst with the hexdump output of 29 | # dataflash.bin and they should be identical. 30 | # 31 | 32 | require "getoptlong" 33 | 34 | ORG = 0x4000 35 | 36 | opts = GetoptLong.new( 37 | [ "--file", "-f", GetoptLong::REQUIRED_ARGUMENT ], 38 | [ "--app", "-a", GetoptLong::REQUIRED_ARGUMENT ], 39 | ) 40 | 41 | dataflash = nil 42 | app = -1 43 | 44 | opts.each do |opt,arg| 45 | case opt 46 | when "--file" 47 | dataflash = arg 48 | 49 | when "--app" 50 | app = arg.to_i 51 | end 52 | end 53 | 54 | if !dataflash || app < 0 || app > 4 55 | usage 56 | end 57 | 58 | @file = File.open(dataflash, "rb") 59 | @file.seek(ORG * app) 60 | 61 | if (b = read(1)) != 0xc3 62 | raise "expected jp, got #{b.inspect}" 63 | end 64 | 65 | puts "\t.module\tapp#{app}" 66 | puts "" 67 | puts "\t.area\t_DATA" 68 | puts "\t.area\t_HEADER (ABS)" 69 | puts "\t.org\t#{sprintf("0x%04x", ORG)}" 70 | puts "" 71 | 72 | code_base = read(2) 73 | puts "\tjp\t#{x code_base, 4}" 74 | 75 | icon_base = read(2) 76 | puts "\t.dw\t(icons)\t\t; #{x icon_base, 4}" 77 | puts "\t.dw\t(caption)\t; #{x read(2), 4}" 78 | puts "\t.dw\t(dunno)\t\t; #{x read(2), 4}" 79 | 80 | puts "dunno:" 81 | puts "\t.db\t##{x read(1), 2}" 82 | 83 | puts "xpos:" 84 | puts "\t.dw\t##{x read(2), 4}" 85 | puts "ypos:" 86 | puts "\t.dw\t##{x read(2), 4}" 87 | 88 | puts "caption:" 89 | puts "\t.dw\t##{x read(2), 4}" 90 | puts "\t.dw\t(endcap - caption - 6) ; calc caption len (##{x read(2), 4})" 91 | puts "\t.dw\t##{x read(2), 4}\t\t; offset to first char" 92 | 93 | print "\t.ascii\t\"" 94 | while true do 95 | z = read(1) 96 | if z == 0 97 | break 98 | end 99 | 100 | print z.chr 101 | end 102 | 103 | puts "\"" 104 | puts "endcap:" 105 | 106 | puts "" 107 | puts "\t.org\t#{x icon_base, 4}" 108 | puts "" 109 | 110 | @file.seek((ORG * app) - ORG + icon_base) 111 | 112 | puts "icons:" 113 | 114 | icons = [ {}, {} ] 115 | 116 | 2.times do |x| 117 | icons[x][:size] = read(2) 118 | puts "\t.dw\t##{x icons[x][:size], 4}\t\t; size icon#{x}" 119 | icons[x][:pos] = read(2) 120 | puts "\t.dw\t(icon#{x} - icons)\t; offset to icon#{x} (#{x icons[x][:pos], 4})" 121 | end 122 | 123 | 2.times do |i| 124 | puts "icon#{i}:" 125 | 126 | icons[i][:width] = read(2) 127 | puts "\t.dw\t##{x icons[i][:width], 4}\t\t; icon width (#{icons[i][:width]})" 128 | icons[i][:height] = read(1) 129 | puts "\t.db\t##{x icons[i][:height], 2}\t\t; icon height " << 130 | "(#{icons[i][:height]})" 131 | 132 | puts "" 133 | 134 | row = [] 135 | icons[i][:cols] = (icons[i][:width] / 8.0).ceil 136 | 137 | (icons[i][:size] - 3).times do |j| 138 | row.push read(1) 139 | 140 | if row.count == icons[i][:cols] 141 | # each byte is stored in memory in order, but each byte's bits are drawn 142 | # on the screen right-to-left 143 | puts "\t.db\t" + row.map{|z| "##{x(z, 2)}" }.join(", ") + 144 | "\t; " + row.map{|z| sprintf("%08b", z).reverse }.join. 145 | gsub("0", ".").gsub("1", "#") 146 | row = [] 147 | end 148 | end 149 | 150 | puts "" 151 | end 152 | 153 | @file.seek((ORG * app) - ORG + code_base) 154 | 155 | while !@file.eof? 156 | o = [ read(1) ] 157 | 158 | if o[0] == 0 159 | fp = @file.pos 160 | if @file.read(10) == ("\0" * 10) 161 | # assume a long string of nops is the end of the line 162 | break 163 | else 164 | # put those nops back 165 | @file.seek(fp) 166 | end 167 | end 168 | 169 | l = oclen(o[0]) 170 | if l > 1 171 | o += (l - 1).times.map{ read(1) } 172 | end 173 | 174 | puts oc(o) 175 | end 176 | 177 | BEGIN { 178 | def read(l) 179 | d = @file.read(l) 180 | if l == 1 181 | d.unpack("C*")[0] 182 | elsif l == 2 183 | d.unpack("v*")[0] 184 | end 185 | end 186 | 187 | def x(v, l = 1) 188 | sprintf("0x%0#{l}x", v) 189 | end 190 | 191 | def usage 192 | puts "usage: #{$0} -f -a " 193 | exit 1 194 | end 195 | 196 | @opcodes = {} 197 | File.open("z80_opcodes.txt") do |f| 198 | while f && !f.eof? 199 | oc, desc = f.gets.strip.split(/ +/, 2) 200 | 201 | t = oc.split(" ") 202 | @opcodes[t[0].to_i(16)] = { 203 | :desc => desc, 204 | :length => t.count, 205 | :format => t, 206 | } 207 | end 208 | end 209 | 210 | def oclen(c) 211 | return @opcodes[c][:length] 212 | end 213 | 214 | def oc(c_a) 215 | # ld de, nn 216 | # ld (nn), hl 217 | # call nn 218 | # jr z, e 219 | # ld b, n 220 | # rlc b 221 | # ret 222 | 223 | op = @opcodes[c_a[0]] 224 | 225 | desc = op[:desc].split(" ").map.with_index{|c,x| 226 | if c == "nn" || c == "(nn)" 227 | # use two bytes of c_a 228 | i = (c_a[1].chr + c_a[2].chr).unpack("v*")[0] 229 | 230 | if op[:desc][0, 2] == "jp" 231 | # jp takes an address, not a number 232 | c = sprintf("0x%04x", i) 233 | elsif c == "(nn)" 234 | c = sprintf("(#0x%04x)", i) 235 | else 236 | c = sprintf("#0x%04x", i) 237 | end 238 | 239 | elsif c == "n" 240 | c = sprintf("#0x%02x", c_a[1]) 241 | 242 | elsif c == "e" && op[:format][1] == "xx" # e when xx not in opcode is register e 243 | if op[:desc][0, 2] == "jr" 244 | c = c_a[1] 245 | else 246 | # calculate relative offset 247 | c = sprintf("0x%04x", (@file.pos + c_a[1])) 248 | end 249 | end 250 | 251 | c 252 | }.join(" ") 253 | 254 | "\t#{desc}#{desc.length < 8 ? "\t" : ""}#{desc.length < 16 ? "\t" : ""}\t;" + 255 | c_a.map{|b| sprintf(" %02x", b) }.join 256 | end 257 | } 258 | -------------------------------------------------------------------------------- /util/recvdump.c: -------------------------------------------------------------------------------- 1 | /* 2 | * recvdump 3 | * based on win32/maildump.cpp by FyberOptic 4 | * 5 | * must be run as root to set iopl and use inb/outb 6 | * 7 | * assumes codedump or datadump has been loaded on the Mailstation and is 8 | * running 9 | */ 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | #include "tribble.h" 21 | 22 | void 23 | usage(void) 24 | { 25 | printf("usage: %s [-d] [-p port address] \n", 26 | getprogname()); 27 | exit(1); 28 | } 29 | 30 | int 31 | main(int argc, char *argv[]) 32 | { 33 | FILE *pFile; 34 | unsigned int received = 0, expected = 0; 35 | int ch, b, codeflash = 0, dataflash = 0, mem = 0; 36 | char fn[14]; 37 | 38 | while ((ch = getopt(argc, argv, "dp:")) != -1) { 39 | switch (ch) { 40 | case 'd': 41 | tribble_debug = 1; 42 | break; 43 | case 'p': 44 | tribble_port = (unsigned)strtol(optarg, NULL, 0); 45 | if (errno) 46 | err(1, "invalid port value"); 47 | break; 48 | default: 49 | usage(); 50 | } 51 | } 52 | argc -= optind; 53 | argv += optind; 54 | 55 | if (argc != 1) 56 | usage(); 57 | 58 | if (strncmp((char *)argv[0], "code", 5) == 0) { 59 | if (dataflash || mem) 60 | usage(); 61 | codeflash = 1; 62 | } else if (strncmp((char *)argv[0], "data", 5) == 0) { 63 | if (codeflash || mem) 64 | usage(); 65 | dataflash = 1; 66 | } else if (strncmp((char *)argv[0], "mem", 4) == 0) { 67 | if (codeflash || dataflash) 68 | usage(); 69 | mem = 1; 70 | } else 71 | errx(1, "unknown dump parameter: %s\n", argv[0]); 72 | 73 | if (codeflash) { 74 | expected = 1024 * 1024; 75 | strlcpy(fn, "codeflash.bin", sizeof(fn)); 76 | } else if (dataflash) { 77 | expected = 1024 * 512; 78 | strlcpy(fn, "dataflash.bin", sizeof(fn)); 79 | } else if (mem) { 80 | expected = (1024 * 64) - 1; 81 | strlcpy(fn, "mem.bin", sizeof(fn)); 82 | } else 83 | usage(); 84 | 85 | checkio(); 86 | 87 | pFile = fopen(fn, "wb"); 88 | if (!pFile) { 89 | printf("couldn't open file %s\n", fn); 90 | return 1; 91 | } 92 | 93 | printf("[port 0x%x] dumping to %s, run Code Dump on Mailstation...", 94 | tribble_port, fn); 95 | fflush(stdout); 96 | 97 | while (received < expected) { 98 | if ((b = recvbyte()) == -1) 99 | continue; 100 | 101 | fputc(b & 0xff, pFile); 102 | fflush(pFile); 103 | 104 | if (received++ == 0) 105 | printf("\n"); 106 | 107 | if (received % 1024 == 0 || received == expected) { 108 | printf("\rreceived: %07d/%07d", received, expected); 109 | fflush(stdout); 110 | } 111 | } 112 | fclose(pFile); 113 | 114 | printf("\n"); 115 | 116 | return 0; 117 | } 118 | -------------------------------------------------------------------------------- /util/sendload.c: -------------------------------------------------------------------------------- 1 | /* 2 | * sendload 3 | * 4 | * must be run as root to set iopl and use inb/outb 5 | * 6 | * assumes Loader has been loaded on the Mailstation and is running 7 | */ 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | #include "tribble.h" 22 | 23 | static int serial_fd = -1; 24 | static int serial_speed = B115200; 25 | 26 | void 27 | usage(void) 28 | { 29 | errx(1, "usage: %s [-dr] [-p lpt address | serial device] " 30 | "[-s serial speed] ", getprogname()); 31 | } 32 | 33 | int 34 | sendbyte_shim(char b) 35 | { 36 | if (serial_fd >= 0) 37 | return (write(serial_fd, &b, 1) != 1); 38 | else 39 | return sendbyte(b); 40 | } 41 | 42 | void 43 | setupserial(speed_t speed) 44 | { 45 | struct termios tty; 46 | 47 | if (tcgetattr(serial_fd, &tty) < 0) 48 | err(1, "tcgetattr"); 49 | 50 | cfsetospeed(&tty, speed); 51 | cfsetispeed(&tty, speed); 52 | 53 | tty.c_cflag |= (CLOCAL | CREAD); /* ignore modem controls */ 54 | tty.c_cflag &= ~CSIZE; 55 | tty.c_cflag |= CS8; /* 8-bit characters */ 56 | tty.c_cflag &= ~PARENB; /* no parity bit */ 57 | tty.c_cflag &= ~CSTOPB; /* only need 1 stop bit */ 58 | 59 | /* setup for non-canonical mode */ 60 | tty.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL | IXON); 61 | tty.c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN); 62 | tty.c_oflag &= ~OPOST; 63 | 64 | /* fetch bytes as they become available */ 65 | tty.c_cc[VMIN] = 1; 66 | tty.c_cc[VTIME] = 1; 67 | 68 | if (tcsetattr(serial_fd, TCSANOW, &tty) != 0) 69 | err(1, "tcsetattr"); 70 | } 71 | 72 | int 73 | main(int argc, char *argv[]) 74 | { 75 | FILE *pFile; 76 | struct stat sb; 77 | unsigned int sent = 0, size = 0, raw = 0; 78 | int ch; 79 | char *fn, *serial_dev = NULL; 80 | 81 | while ((ch = getopt(argc, argv, "dp:rs:")) != -1) { 82 | switch (ch) { 83 | case 'd': 84 | tribble_debug = 1; 85 | break; 86 | case 'p': 87 | if (optarg[0] == '/') { 88 | if ((serial_dev = strdup(optarg)) == NULL) 89 | err(1, "strdup"); 90 | serial_fd = open(serial_dev, 91 | O_RDWR | O_NOCTTY | O_SYNC); 92 | if (serial_fd < 0) 93 | err(1, "can't open %s", optarg); 94 | } else { 95 | tribble_port = (unsigned)strtol(optarg, NULL, 96 | 0); 97 | if (errno) 98 | err(1, "invalid port value"); 99 | } 100 | break; 101 | case 'r': 102 | raw = 1; 103 | break; 104 | case 's': 105 | serial_speed = (unsigned)strtol(optarg, NULL, 0); 106 | if (errno) 107 | err(1, "invalid serial port speed value"); 108 | break; 109 | default: 110 | usage(); 111 | } 112 | } 113 | argc -= optind; 114 | argv += optind; 115 | 116 | if (argc != 1) 117 | usage(); 118 | 119 | if (serial_fd >= 0) 120 | setupserial(serial_speed); 121 | else 122 | checkio(); 123 | 124 | fn = argv[0]; 125 | pFile = fopen(fn, "rb"); 126 | if (!pFile) 127 | err(1, "open: %s", fn); 128 | 129 | if (fstat(fileno(pFile), &sb) != 0) 130 | err(1, "fstat: %s", fn); 131 | 132 | /* we're never going to send huge files */ 133 | size = (unsigned int)sb.st_size; 134 | 135 | if (serial_fd >= 0) 136 | printf("[%s]", serial_dev); 137 | else 138 | printf("[lpt port 0x%x]", tribble_port); 139 | 140 | printf(" sending %s (%d bytes)...", fn, size); 141 | fflush(stdout); 142 | 143 | /* loader expects two bytes, the low and then high of the file size */ 144 | if (!raw) { 145 | if (sendbyte_shim(size & 0xff) != 0) 146 | errx(1, "sendbyte failed"); 147 | if (sendbyte_shim((size >> 8) & 0xff) != 0) 148 | errx(1, "sendbyte failed"); 149 | } 150 | 151 | while (sent < size) { 152 | if (sendbyte_shim(fgetc(pFile)) != 0) 153 | errx(1, "sendbyte failed at %d/%d", sent, size); 154 | 155 | if (sent++ == 0) 156 | printf("\n"); 157 | 158 | if (sent % (raw ? 64 : 1024) == 0 || sent == size) { 159 | printf("\rsent: %07d/%07d", sent, size); 160 | fflush(stdout); 161 | } 162 | } 163 | fclose(pFile); 164 | 165 | printf("\n"); 166 | 167 | return 0; 168 | } 169 | -------------------------------------------------------------------------------- /util/tribble.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #define INB inb 7 | 8 | #ifdef __OpenBSD__ 9 | #include 10 | #include 11 | #define OUTB outb 12 | 13 | #elif defined(__linux__) 14 | #include 15 | #define OUTB(port, byte) outb(byte, port) 16 | 17 | #else 18 | void 19 | OUTB(int port, int byte) 20 | { 21 | errx(1, "cannot write to parallel port"); 22 | } 23 | int 24 | inb(int port) 25 | { 26 | errx(1, "cannot read from parallel port"); 27 | } 28 | #endif 29 | 30 | #include "tribble.h" 31 | 32 | unsigned int tribble_port = PORTADDRESS; 33 | 34 | int tribble_debug = 0; 35 | 36 | void 37 | checkio(void) 38 | { 39 | if (geteuid() != 0) 40 | errx(1, "must be run as root"); 41 | 42 | #ifdef __OpenBSD__ 43 | #ifdef __amd64__ 44 | if (amd64_iopl(1) != 0) 45 | errx(1, "amd64_iopl failed (is machdep.allowaperture=1?)"); 46 | #elif defined(__i386__) 47 | if (i386_iopl(1) != 0) 48 | errx(1, "i386_iopl failed (is machdep.allowaperture=1?)"); 49 | #endif 50 | #elif defined(__linux__) 51 | iopl(3); 52 | #endif 53 | } 54 | 55 | unsigned int 56 | havetribble(void) 57 | { 58 | int tries; 59 | 60 | /* drop busy */ 61 | OUTB(tribble_port + DATA, 0); 62 | 63 | /* wait for (inverted) strobe */ 64 | for (tries = 0; tries < 1024; tries++) 65 | if ((INB(tribble_port + STATUS) & stbin) == 0) 66 | /* 67 | * leave busy dropped, assume recvtribble() will deal 68 | * with it 69 | */ 70 | return 1; 71 | 72 | /* re-raise busy */ 73 | OUTB(tribble_port + DATA, bsyout); 74 | 75 | return 0; 76 | } 77 | 78 | int 79 | recvtribble(void) 80 | { 81 | unsigned char b; 82 | unsigned int tries; 83 | 84 | /* drop busy */ 85 | OUTB(tribble_port + DATA, 0); 86 | 87 | /* wait for (inverted) strobe */ 88 | tries = 0; 89 | while ((INB(tribble_port + STATUS) & stbin) != 0) { 90 | if (++tries >= 500000) { 91 | /* raise busy/ack */ 92 | OUTB(tribble_port + DATA, bsyout); 93 | return -1; 94 | } 95 | } 96 | 97 | /* grab tribble */ 98 | b = (INB(tribble_port + STATUS) >> 3) & tribmask; 99 | 100 | /* raise busy/ack */ 101 | OUTB(tribble_port + DATA, bsyout); 102 | 103 | /* wait for (inverted) UNstrobe */ 104 | tries = 0; 105 | while ((INB(tribble_port + STATUS) & stbin) == 0) { 106 | if (++tries >= 500000) 107 | return -1; 108 | } 109 | 110 | return b; 111 | } 112 | 113 | int 114 | recvbyte(void) 115 | { 116 | char c, t; 117 | 118 | if ((t = recvtribble()) == -1) 119 | return -1; 120 | c = t; 121 | 122 | if ((t = recvtribble()) == -1) 123 | return -1; 124 | c += (t << 3); 125 | 126 | if ((t = recvtribble()) == -1) 127 | return -1; 128 | c += ((t & dibmask) << 6); 129 | 130 | return c; 131 | } 132 | 133 | int 134 | sendtribble(unsigned char b) 135 | { 136 | unsigned int tries; 137 | int ret = 0; 138 | 139 | /* raise busy */ 140 | OUTB(tribble_port + DATA, bsyout); 141 | 142 | /* wait for mailstation to drop busy */ 143 | tries = 0; 144 | while ((INB(tribble_port + STATUS) & bsyin) != 0) { 145 | if (++tries >= 500000) { 146 | ret = 1; 147 | goto sendtribble_out; 148 | } 149 | } 150 | 151 | /* send tribble */ 152 | OUTB(tribble_port + DATA, b & tribmask); 153 | 154 | /* strobe */ 155 | OUTB(tribble_port + DATA, (b & tribmask) | stbout); 156 | 157 | /* wait for ack */ 158 | tries = 0; 159 | while ((INB(tribble_port + STATUS) & bsyin) == 0) { 160 | if (++tries >= 500000) { 161 | ret = 1; 162 | goto sendtribble_out; 163 | } 164 | } 165 | 166 | /* unstrobe */ 167 | OUTB(tribble_port + DATA, 0); 168 | 169 | sendtribble_out: 170 | /* raise busy/ack */ 171 | OUTB(tribble_port + DATA, bsyout); 172 | 173 | return ret; 174 | } 175 | 176 | int 177 | sendbyte(unsigned char b) 178 | { 179 | if (sendtribble(b) != 0) 180 | return 1; 181 | if (sendtribble(b >> 3) != 0) 182 | return 2; 183 | if (sendtribble(b >> 6) != 0) 184 | return 3; 185 | 186 | return 0; 187 | } 188 | -------------------------------------------------------------------------------- /util/tribble.h: -------------------------------------------------------------------------------- 1 | #define PORTADDRESS 0x378 2 | 3 | /* relative to PORTADDRESS (tribble_port) */ 4 | #define DATA 0 5 | #define STATUS 1 6 | #define CONTROL 2 7 | 8 | #define bsyin 0x40 9 | #define bsyout 0x08 10 | #define stbin 0x80 11 | #define stbout 0x10 12 | #define tribmask 0x07 13 | #define dibmask 0x03 14 | 15 | void checkio(void); 16 | unsigned int havetribble(void); 17 | int recvtribble(void); 18 | int recvbyte(void); 19 | int sendtribble(unsigned char b); 20 | int sendbyte(unsigned char b); 21 | 22 | extern int tribble_debug; 23 | unsigned int tribble_port; 24 | -------------------------------------------------------------------------------- /util/tribble_getty.c: -------------------------------------------------------------------------------- 1 | /* 2 | * tribble_getty 3 | * 4 | * must be run as root to set iopl and use inb/outb 5 | * 6 | * interfaces getty(8) to the parallel port tribble routines for sending and 7 | * receiving bytes 8 | * 9 | */ 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | #include "tribble.h" 24 | 25 | void 26 | usage(void) 27 | { 28 | printf("usage: %s [-d] [-p port address]\n", getprogname()); 29 | exit(1); 30 | } 31 | 32 | int 33 | main(int argc, char *argv[]) 34 | { 35 | struct timeval tv = { 0 }; 36 | unsigned char obuf[2]; 37 | size_t cc = 0; 38 | fd_set rfds; 39 | pid_t child; 40 | int master, slave, ch, b; 41 | 42 | while ((ch = getopt(argc, argv, "dp:")) != -1) { 43 | switch (ch) { 44 | case 'd': 45 | tribble_debug = 1; 46 | break; 47 | case 'p': 48 | tribble_port = (unsigned)strtol(optarg, NULL, 0); 49 | if (errno) 50 | err(1, "invalid port value"); 51 | break; 52 | default: 53 | usage(); 54 | } 55 | } 56 | argc -= optind; 57 | argv += optind; 58 | 59 | if (argc != 0) 60 | usage(); 61 | 62 | checkio(); 63 | 64 | printf("[port 0x%x]\n", tribble_port); 65 | 66 | if (openpty(&master, &slave, NULL, NULL, NULL) == -1) 67 | errx(1, "openpty"); 68 | 69 | child = fork(); 70 | if (child == 0) { 71 | char *argp[] = { "sh", "-c", "/usr/libexec/getty", NULL }; 72 | 73 | close(master); 74 | login_tty(slave); 75 | 76 | setenv("TERM", "vt100", 1); 77 | setenv("LINES", "15", 1); 78 | setenv("COLUMNS", "64", 1); 79 | 80 | execv("/bin/sh", argp); 81 | } 82 | 83 | close(STDIN_FILENO); 84 | 85 | for (;;) { 86 | FD_ZERO(&rfds); 87 | FD_SET(master, &rfds); 88 | tv.tv_usec = 10; 89 | 90 | if (cc == 0 && select(master + 1, &rfds, NULL, NULL, &tv)) { 91 | cc = read(master, obuf, 1); 92 | if (cc == -1 && errno == EINTR) 93 | continue; 94 | if (cc <= 0) 95 | break; 96 | } 97 | 98 | if (cc > 0 && (sendbyte(obuf[0]) == 0)) { 99 | cc--; 100 | #if 0 101 | printf("sendbyte(0x%x): %c\n", obuf[0], 102 | (obuf[0] >= 32 && obuf[0] <= 126 ? 103 | obuf[0] : ' ')); 104 | #endif 105 | } 106 | 107 | if (havetribble()) { 108 | b = recvbyte(); 109 | if (b < 0) { 110 | printf("recvbyte() failed\n"); 111 | continue; 112 | } 113 | #if 0 114 | printf("recvbyte() = 0x%x: %c\n", b, 115 | (b >= 32 && b <= 126 ? b : ' ')); 116 | #endif 117 | write(master, &b, 1); 118 | } 119 | } 120 | 121 | close(master); 122 | close(slave); 123 | 124 | return 0; 125 | } 126 | -------------------------------------------------------------------------------- /util/xpm_to_icon.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # 3 | # Copyright (c) 2019 joshua stein 4 | # 5 | # Permission to use, copy, modify, and distribute this software for any 6 | # purpose with or without fee is hereby granted, provided that the above 7 | # copyright notice and this permission notice appear in all copies. 8 | # 9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | # 17 | 18 | # 19 | # Convert a 1-bit XPM to a Mailstation icon data structure 20 | # 21 | # Usage: xpm_to_icon.rb -f 22 | # 23 | 24 | require "getoptlong" 25 | 26 | opts = GetoptLong.new( 27 | [ "--file", "-f", GetoptLong::REQUIRED_ARGUMENT ], 28 | ) 29 | 30 | icon = nil 31 | opts.each do |opt,arg| 32 | case opt 33 | when "--file" 34 | icon = arg 35 | end 36 | end 37 | 38 | if !icon 39 | puts "usage: #{$0} -f " 40 | exit 1 41 | end 42 | 43 | xpm = File.open(icon, "r") 44 | if !(line = xpm.gets).match(/^\/\* XPM/) 45 | raise "unexpected line: #{line.inspect}" 46 | end 47 | 48 | if !(line = xpm.gets).match(/^static char/) 49 | raise "unexpected line: #{line.inspect}" 50 | end 51 | 52 | if !(m = (line = xpm.gets).match(/^\"(\d+) (\d+) /)) 53 | raise "unexpected line: #{line.inspect}" 54 | end 55 | width = m[1].to_i 56 | height = m[2].to_i 57 | 58 | if width != 34 || height != 34 59 | raise "image should be 34x34, not #{width}x#{height}" 60 | end 61 | 62 | blank = nil 63 | black = nil 64 | 2.times do 65 | line = xpm.gets 66 | if line.match(/^\" \tc None/) 67 | # skip 68 | line = xpm.gets 69 | end 70 | 71 | if !(m = line.match(/^\"(.)\tc #(FFFFFF|000000)/)) 72 | raise "unexpected line: #{line.inspect}" 73 | end 74 | if m[2][0] == "F" 75 | blank = m[1] 76 | elsif m[2][0] == "0" 77 | black = m[1] 78 | else 79 | raise "unexpected color: #{line.inspect}" 80 | end 81 | end 82 | 83 | if !blank 84 | raise "no blank color found" 85 | end 86 | if !black 87 | raise "no black color found" 88 | end 89 | 90 | puts "icon0:" 91 | puts "\t.dw\t##{sprintf("0x%02x", width)}\t\t\t; icon width (#{width})" 92 | puts "\t.db\t##{sprintf("0x%02x", height)}\t\t\t; icon height (#{height})" 93 | puts "" 94 | 95 | while !xpm.eof? 96 | if !(m = (line = xpm.gets).match(/^\"(.{#{width}})"[,\}]/)) 97 | raise "unexpected data line: #{line.inspect}" 98 | end 99 | 100 | if m[1].length != width 101 | raise "unexpected line length: #{m[1].length} != #{width}" 102 | end 103 | 104 | bits = m[1].split("").map{|b| b == black ? 1 : 0 } 105 | dbs = bits.each_slice(8).map{|byte| byte.reverse.join("").to_i(2) } 106 | 107 | puts "\t.db\t" << dbs.map{|i| sprintf("#0x%02x", i) }.join(", ") << 108 | "\t; " << bits.map{|b| b == 1 ? "#" : "." }.join("") 109 | end 110 | -------------------------------------------------------------------------------- /util/z80_opcodes.txt: -------------------------------------------------------------------------------- 1 | 00 nop 2 | 01 xx xx ld bc, nn 3 | 02 ld (bc), a 4 | 03 inc bc 5 | 04 inc b 6 | 05 dec b 7 | 06 xx ld b, n 8 | 07 rlca 9 | 08 ex af, af' 10 | 09 add hl, bc 11 | 0a ld a, (bc) 12 | 0b dec bc 13 | 0c inc c 14 | 0d dec c 15 | 0e xx ld c, n 16 | 0f rrca 17 | 10 xx djnz e 18 | 11 xx xx ld de, nn 19 | 12 ld (de), a 20 | 13 inc de 21 | 14 inc d 22 | 15 dec d 23 | 16 xx ld d, n 24 | 17 rla 25 | 18 xx jr e 26 | 19 add hl, de 27 | 1a ld a, (de) 28 | 1b dec de 29 | 1c inc e 30 | 1d dec e 31 | 1e xx ld e, n 32 | 1f rra 33 | 20 xx jr nz, e 34 | 21 xx xx ld hl, nn 35 | 22 xx xx ld (nn), hl 36 | 23 inc hl 37 | 24 inc h 38 | 25 dec h 39 | 26 xx ld h, n 40 | 27 daa 41 | 28 xx jr z, e 42 | 29 add hl, hl 43 | 2a xx xx ld hl, (nn) 44 | 2b dec hl 45 | 2c inc l 46 | 2d dec l 47 | 2e xx ld l, n 48 | 2f cpl 49 | 30 xx jr nc, e 50 | 31 xx xx ld sp, nn 51 | 32 xx xx ld (nn), a 52 | 33 inc sp 53 | 34 inc (hl) 54 | 35 dec (hl) 55 | 36 xx ld (hl), n 56 | 37 scf 57 | 38 xx jr c, e 58 | 39 add hl, sp 59 | 3a xx xx ld a, (nn) 60 | 3b dec sp 61 | 3c inc a 62 | 3d dec a 63 | 3e xx ld a, n 64 | 3f ccf 65 | 40 ld b, b 66 | 41 ld b, c 67 | 42 ld b, d 68 | 43 ld b, e 69 | 44 ld b, h 70 | 45 ld b, l 71 | 46 ld b, (hl) 72 | 47 ld b, a 73 | 48 ld c, b 74 | 49 ld c, c 75 | 4a ld c, d 76 | 4b ld c, e 77 | 4c ld c, h 78 | 4d ld c, l 79 | 4e ld c, (hl) 80 | 4f ld c, a 81 | 50 ld d, b 82 | 51 ld d, c 83 | 52 ld d, d 84 | 53 ld d, e 85 | 54 ld d, h 86 | 55 ld d, l 87 | 56 ld d, (hl) 88 | 57 ld d, a 89 | 58 ld e, b 90 | 59 ld e, c 91 | 5a ld e, d 92 | 5b ld e, e 93 | 5c ld e, h 94 | 5d ld e, l 95 | 5e ld e, (hl) 96 | 5f ld e, a 97 | 60 ld h, b 98 | 61 ld h, c 99 | 62 ld h, d 100 | 63 ld h, e 101 | 64 ld h, h 102 | 65 ld h, l 103 | 66 ld h, (hl) 104 | 67 ld h, a 105 | 68 ld l, b 106 | 69 ld l, c 107 | 6a ld l, d 108 | 6b ld l, e 109 | 6c ld l, h 110 | 6d ld l, l 111 | 6e ld l, (hl) 112 | 6f ld l, a 113 | 70 ld (hl), b 114 | 71 ld (hl), c 115 | 72 ld (hl), d 116 | 73 ld (hl), e 117 | 74 ld (hl), h 118 | 75 ld (hl), l 119 | 76 halt 120 | 77 ld (hl), a 121 | 78 ld a, b 122 | 79 ld a, c 123 | 7a ld a, d 124 | 7b ld a, e 125 | 7c ld a, h 126 | 7d ld a, l 127 | 7e ld a, (hl) 128 | 7f ld a, a 129 | 80 add b 130 | 81 add c 131 | 82 add d 132 | 83 add e 133 | 84 add h 134 | 85 add l 135 | 86 add (hl) 136 | 87 add a 137 | 88 adc b 138 | 89 adc c 139 | 8a adc d 140 | 8b adc e 141 | 8c adc h 142 | 8d adc l 143 | 8e adc (hl) 144 | 8f adc a 145 | 90 sub b 146 | 91 sub c 147 | 92 sub d 148 | 93 sub e 149 | 94 sub h 150 | 95 sub l 151 | 96 sub (hl) 152 | 97 sub a 153 | 98 sbc b 154 | 99 sbc c 155 | 9a sbc d 156 | 9b sbc e 157 | 9c sbc h 158 | 9d sbc l 159 | 9e sbc (hl) 160 | 9f sbc a 161 | a0 and b 162 | a1 and c 163 | a2 and d 164 | a3 and e 165 | a4 and h 166 | a5 and l 167 | a6 and (hl) 168 | a7 and a 169 | a8 xor b 170 | a9 xor c 171 | aa xor d 172 | ab xor e 173 | ac xor h 174 | ad xor l 175 | ae xor (hl) 176 | af xor a 177 | b0 or b 178 | b1 or c 179 | b2 or d 180 | b3 or e 181 | b4 or h 182 | b5 or l 183 | b6 or (hl) 184 | b7 or a 185 | b8 cp b 186 | b9 cp c 187 | ba cp d 188 | bb cp e 189 | bc cp h 190 | bd cp l 191 | be cp (hl) 192 | bf cp a 193 | c0 ret nz 194 | c1 pop bc 195 | c2 xx xx jp nz, nn 196 | c3 xx xx jp nn 197 | c4 xx xx call nz, nn 198 | c5 push bc 199 | c6 xx add n 200 | c7 rst 00 201 | c8 ret z 202 | c9 ret 203 | ca xx xx jp z, nn 204 | cb 00 rlc b 205 | cb 01 rlc c 206 | cb 02 rlc d 207 | cb 03 rlc e 208 | cb 04 rlc h 209 | cb 05 rlc l 210 | cb 06 rlc (hl) 211 | cb 07 rlc a 212 | cb 08 rrc b 213 | cb 09 rrc c 214 | cb 0a rrc d 215 | cb 0b rrc e 216 | cb 0c rrc h 217 | cb 0d rrc l 218 | cb 0e rrc (hl) 219 | cb 0f rrc a 220 | cb 10 rl b 221 | cb 11 rl c 222 | cb 12 rl d 223 | cb 13 rl e 224 | cb 14 rl h 225 | cb 15 rl l 226 | cb 16 rl (hl) 227 | cb 17 rl a 228 | cb 18 rr b 229 | cb 19 rr c 230 | cb 1a rr d 231 | cb 1b rr e 232 | cb 1c rr h 233 | cb 1d rr l 234 | cb 1e rr (hl) 235 | cb 1f rr a 236 | cb 20 sla b 237 | cb 21 sla c 238 | cb 22 sla d 239 | cb 23 sla e 240 | cb 24 sla h 241 | cb 25 sla l 242 | cb 26 sla (hl) 243 | cb 27 sla a 244 | cb 28 sra b 245 | cb 29 sra c 246 | cb 2a sra d 247 | cb 2b sra e 248 | cb 2c sra h 249 | cb 2d sra l 250 | cb 2e sra (hl) 251 | cb 2f sra a 252 | cb 30 sll b 253 | cb 31 sll c 254 | cb 32 sll d 255 | cb 33 sll e 256 | cb 34 sll h 257 | cb 35 sll l 258 | cb 36 sll (hl) 259 | cb 37 sll a 260 | cb 38 srl b 261 | cb 39 srl c 262 | cb 3a srl d 263 | cb 3b srl e 264 | cb 3c srl h 265 | cb 3d srl l 266 | cb 3e srl (hl) 267 | cb 3f srl a 268 | cb 40 bit 0, b 269 | cb 41 bit 0, c 270 | cb 42 bit 0, d 271 | cb 43 bit 0, e 272 | cb 44 bit 0, h 273 | cb 45 bit 0, l 274 | cb 46 bit 0, (hl) 275 | cb 47 bit 0, a 276 | cb 48 bit 1, b 277 | cb 49 bit 1, c 278 | cb 4a bit 1, d 279 | cb 4b bit 1, e 280 | cb 4c bit 1, h 281 | cb 4d bit 1, l 282 | cb 4e bit 1, (hl) 283 | cb 4f bit 1, a 284 | cb 50 bit 2, b 285 | cb 51 bit 2, c 286 | cb 52 bit 2, d 287 | cb 53 bit 2, e 288 | cb 54 bit 2, h 289 | cb 55 bit 2, l 290 | cb 56 bit 2, (hl) 291 | cb 57 bit 2, a 292 | cb 58 bit 3, b 293 | cb 59 bit 3, c 294 | cb 5a bit 3, d 295 | cb 5b bit 3, e 296 | cb 5c bit 3, h 297 | cb 5d bit 3, l 298 | cb 5e bit 3, (hl) 299 | cb 5f bit 3, a 300 | cb 60 bit 4, b 301 | cb 61 bit 4, c 302 | cb 62 bit 4, d 303 | cb 63 bit 4, e 304 | cb 64 bit 4, h 305 | cb 65 bit 4, l 306 | cb 66 bit 4, (hl) 307 | cb 67 bit 4, a 308 | cb 68 bit 5, b 309 | cb 69 bit 5, c 310 | cb 6a bit 5, d 311 | cb 6b bit 5, e 312 | cb 6c bit 5, h 313 | cb 6d bit 5, l 314 | cb 6e bit 5, (hl) 315 | cb 6f bit 5, a 316 | cb 70 bit 6, b 317 | cb 71 bit 6, c 318 | cb 72 bit 6, d 319 | cb 73 bit 6, e 320 | cb 74 bit 6, h 321 | cb 75 bit 6, l 322 | cb 76 bit 6, (hl) 323 | cb 77 bit 6, a 324 | cb 78 bit 7, b 325 | cb 79 bit 7, c 326 | cb 7a bit 7, d 327 | cb 7b bit 7, e 328 | cb 7c bit 7, h 329 | cb 7d bit 7, l 330 | cb 7e bit 7, (hl) 331 | cb 7f bit 7, a 332 | cb 80 res 0, b 333 | cb 81 res 0, c 334 | cb 82 res 0, d 335 | cb 83 res 0, e 336 | cb 84 res 0, h 337 | cb 85 res 0, l 338 | cb 86 res 0, (hl) 339 | cb 87 res 0, a 340 | cb 88 res 1, b 341 | cb 89 res 1, c 342 | cb 8a res 1, d 343 | cb 8b res 1, e 344 | cb 8c res 1, h 345 | cb 8d res 1, l 346 | cb 8e res 1, (hl) 347 | cb 8f res 1, a 348 | cb 90 res 2, b 349 | cb 91 res 2, c 350 | cb 92 res 2, d 351 | cb 93 res 2, e 352 | cb 94 res 2, h 353 | cb 95 res 2, l 354 | cb 96 res 2, (hl) 355 | cb 97 res 2, a 356 | cb 98 res 3, b 357 | cb 99 res 3, c 358 | cb 9a res 3, d 359 | cb 9b res 3, e 360 | cb 9c res 3, h 361 | cb 9d res 3, l 362 | cb 9e res 3, (hl) 363 | cb 9f res 3, a 364 | cb a0 res 4, b 365 | cb a1 res 4, c 366 | cb a2 res 4, d 367 | cb a3 res 4, e 368 | cb a4 res 4, h 369 | cb a5 res 4, l 370 | cb a6 res 4, (hl) 371 | cb a7 res 4, a 372 | cb a8 res 5, b 373 | cb a9 res 5, c 374 | cb aa res 5, d 375 | cb ab res 5, e 376 | cb ac res 5, h 377 | cb ad res 5, l 378 | cb ae res 5, (hl) 379 | cb af res 5, a 380 | cb b0 res 6, b 381 | cb b1 res 6, c 382 | cb b2 res 6, d 383 | cb b3 res 6, e 384 | cb b4 res 6, h 385 | cb b5 res 6, l 386 | cb b6 res 6, (hl) 387 | cb b7 res 6, a 388 | cb b8 res 7, b 389 | cb b9 res 7, c 390 | cb ba res 7, d 391 | cb bb res 7, e 392 | cb bc res 7, h 393 | cb bd res 7, l 394 | cb be res 7, (hl) 395 | cb bf res 7, a 396 | cb c0 set 0, b 397 | cb c1 set 0, c 398 | cb c2 set 0, d 399 | cb c3 set 0, e 400 | cb c4 set 0, h 401 | cb c5 set 0, l 402 | cb c6 set 0, (hl) 403 | cb c7 set 0, a 404 | cb c8 set 1, b 405 | cb c9 set 1, c 406 | cb ca set 1, d 407 | cb cb set 1, e 408 | cb cc set 1, h 409 | cb cd set 1, l 410 | cb ce set 1, (hl) 411 | cb cf set 1, a 412 | cb d0 set 2, b 413 | cb d1 set 2, c 414 | cb d2 set 2, d 415 | cb d3 set 2, e 416 | cb d4 set 2, h 417 | cb d5 set 2, l 418 | cb d6 set 2, (hl) 419 | cb d7 set 2, a 420 | cb d8 set 3, b 421 | cb d9 set 3, c 422 | cb da set 3, d 423 | cb db set 3, e 424 | cb dc set 3, h 425 | cb dd set 3, l 426 | cb de set 3, (hl) 427 | cb df set 3, a 428 | cb e0 set 4, b 429 | cb e1 set 4, c 430 | cb e2 set 4, d 431 | cb e3 set 4, e 432 | cb e4 set 4, h 433 | cb e5 set 4, l 434 | cb e6 set 4, (hl) 435 | cb e7 set 4, a 436 | cb e8 set 5, b 437 | cb e9 set 5, c 438 | cb ea set 5, d 439 | cb eb set 5, e 440 | cb ec set 5, h 441 | cb ed set 5, l 442 | cb ee set 5, (hl) 443 | cb ef set 5, a 444 | cb f0 set 6, b 445 | cb f1 set 6, c 446 | cb f2 set 6, d 447 | cb f3 set 6, e 448 | cb f4 set 6, h 449 | cb f5 set 6, l 450 | cb f6 set 6, (hl) 451 | cb f7 set 6, a 452 | cb f8 set 7, b 453 | cb f9 set 7, c 454 | cb fa set 7, d 455 | cb fb set 7, e 456 | cb fc set 7, h 457 | cb fd set 7, l 458 | cb fe set 7, (hl) 459 | cb ff set 7, a 460 | cc xx xx call z, nn 461 | cd xx xx call nn 462 | ce xx adc n 463 | cf rst 08 464 | d0 ret nc 465 | d1 pop de 466 | d2 xx xx jp nc, nn 467 | d3 xx out (n), a 468 | d4 xx xx call nc, nn 469 | d5 push de 470 | d6 xx sub n 471 | d7 rst 10 472 | d8 ret c 473 | d9 exx 474 | da xx xx jp c, nn 475 | db xx in a, (n) 476 | dc xx xx call c, nn 477 | dd 09 add ix, bc 478 | dd 19 add ix, de 479 | dd 21 xx xx ld ix, nn 480 | dd 22 xx xx ld (nn), ix 481 | dd 23 inc ix 482 | dd 24 inc ixh 483 | dd 25 dec ixh 484 | dd 26 xx ld ixh, n 485 | dd 29 add ix, ix 486 | dd 2a xx xx ld ix, (nn) 487 | dd 2b dec ix 488 | dd 2c inc ixl 489 | dd 2d dec ixl 490 | dd 2e xx ld ixl, n 491 | dd 34 xx inc (ix+d) 492 | dd 35 xx dec (ix+d) 493 | dd 36 xx xx ld (ix+d), n 494 | dd 39 add ix, sp 495 | dd 44 ld b, ixh 496 | dd 45 ld b, ixl 497 | dd 46 xx ld b, (ix+d) 498 | dd 4c ld c, ixh 499 | dd 4d ld c, ixl 500 | dd 4e xx ld c, (ix+d) 501 | dd 54 ld d, ixh 502 | dd 55 ld d, ixl 503 | dd 56 xx ld d, (ix+d) 504 | dd 5c ld e, ixh 505 | dd 5d ld e, ixl 506 | dd 5e xx ld e, (ix+d) 507 | dd 60 ld ixh, b 508 | dd 61 ld ixh, c 509 | dd 62 ld ixh, d 510 | dd 63 ld ixh, e 511 | dd 64 ld ixh, ixh 512 | dd 65 ld ixh, ixl 513 | dd 66 xx ld h, (ix+d) 514 | dd 67 ld ixh, a 515 | dd 68 ld ixl, b 516 | dd 69 ld ixl, c 517 | dd 6a ld ixl, d 518 | dd 6b ld ixl, e 519 | dd 6c ld ixl, ixh 520 | dd 6d ld ixl, ixl 521 | dd 6e xx ld l, (ix+d) 522 | dd 6f ld ixl, a 523 | dd 70 xx ld (ix+d), b 524 | dd 71 xx ld (ix+d), c 525 | dd 72 xx ld (ix+d), d 526 | dd 73 xx ld (ix+d), e 527 | dd 74 xx ld (ix+d), h 528 | dd 75 xx ld (ix+d), l 529 | dd 77 xx ld (ix+d), a 530 | dd 7c ld a, ixh 531 | dd 7d ld a, ixl 532 | dd 7e xx ld a, (ix+d) 533 | dd 84 add ixh 534 | dd 85 add ixl 535 | dd 86 xx add (ix+d) 536 | dd 8c adc ixh 537 | dd 8d adc ixl 538 | dd 8e xx adc (ix+d) 539 | dd 94 sub ixh 540 | dd 95 sub ixl 541 | dd 96 xx sub (ix+d) 542 | dd 9c sbc ixh 543 | dd 9d sbc ixl 544 | dd 9e xx sbc (ix+d) 545 | dd a4 and ixh 546 | dd a5 and ixl 547 | dd a6 xx and (ix+d) 548 | dd ac xor ixh 549 | dd ad xor ixl 550 | dd ae xx xor (ix+d) 551 | dd b4 or ixh 552 | dd b5 or ixl 553 | dd b6 xx or (ix+d) 554 | dd bc cp ixh 555 | dd bd cp ixl 556 | dd be xx cp (ix+d) 557 | dd cb xx 00 rlc (ix+d), b 558 | dd cb xx 01 rlc (ix+d), c 559 | dd cb xx 02 rlc (ix+d), d 560 | dd cb xx 03 rlc (ix+d), e 561 | dd cb xx 04 rlc (ix+d), h 562 | dd cb xx 05 rlc (ix+d), l 563 | dd cb xx 06 rlc (ix+d) 564 | dd cb xx 07 rlc (ix+d), a 565 | dd cb xx 08 rrc (ix+d), b 566 | dd cb xx 09 rrc (ix+d), c 567 | dd cb xx 0a rrc (ix+d), d 568 | dd cb xx 0b rrc (ix+d), e 569 | dd cb xx 0c rrc (ix+d), h 570 | dd cb xx 0d rrc (ix+d), l 571 | dd cb xx 0e rrc (ix+d) 572 | dd cb xx 0f rrc (ix+d), a 573 | dd cb xx 10 rl (ix+d), b 574 | dd cb xx 11 rl (ix+d), c 575 | dd cb xx 12 rl (ix+d), d 576 | dd cb xx 13 rl (ix+d), e 577 | dd cb xx 14 rl (ix+d), h 578 | dd cb xx 15 rl (ix+d), l 579 | dd cb xx 16 rl (ix+d) 580 | dd cb xx 17 rl (ix+d), a 581 | dd cb xx 18 rr (ix+d), b 582 | dd cb xx 19 rr (ix+d), c 583 | dd cb xx 1a rr (ix+d), d 584 | dd cb xx 1b rr (ix+d), e 585 | dd cb xx 1c rr (ix+d), h 586 | dd cb xx 1d rr (ix+d), l 587 | dd cb xx 1e rr (ix+d) 588 | dd cb xx 1f rr (ix+d), a 589 | dd cb xx 20 sla (ix+d), b 590 | dd cb xx 21 sla (ix+d), c 591 | dd cb xx 22 sla (ix+d), d 592 | dd cb xx 23 sla (ix+d), e 593 | dd cb xx 24 sla (ix+d), h 594 | dd cb xx 25 sla (ix+d), l 595 | dd cb xx 26 sla (ix+d) 596 | dd cb xx 27 sla (ix+d), a 597 | dd cb xx 28 sra (ix+d), b 598 | dd cb xx 29 sra (ix+d), c 599 | dd cb xx 2a sra (ix+d), d 600 | dd cb xx 2b sra (ix+d), e 601 | dd cb xx 2c sra (ix+d), h 602 | dd cb xx 2d sra (ix+d), l 603 | dd cb xx 2e sra (ix+d) 604 | dd cb xx 2f sra (ix+d), a 605 | dd cb xx 30 sll (ix+d), b 606 | dd cb xx 31 sll (ix+d), c 607 | dd cb xx 32 sll (ix+d), d 608 | dd cb xx 33 sll (ix+d), e 609 | dd cb xx 34 sll (ix+d), h 610 | dd cb xx 35 sll (ix+d), l 611 | dd cb xx 36 sll (ix+d) 612 | dd cb xx 37 sll (ix+d), a 613 | dd cb xx 38 srl (ix+d), b 614 | dd cb xx 39 srl (ix+d), c 615 | dd cb xx 3a srl (ix+d), d 616 | dd cb xx 3b srl (ix+d), e 617 | dd cb xx 3c srl (ix+d), h 618 | dd cb xx 3d srl (ix+d), l 619 | dd cb xx 3e srl (ix+d) 620 | dd cb xx 3f srl (ix+d), a 621 | dd cb xx 40 bit 0, (ix+d) 622 | dd cb xx 41 bit 0, (ix+d) 623 | dd cb xx 42 bit 0, (ix+d) 624 | dd cb xx 43 bit 0, (ix+d) 625 | dd cb xx 44 bit 0, (ix+d) 626 | dd cb xx 45 bit 0, (ix+d) 627 | dd cb xx 46 bit 0, (ix+d) 628 | dd cb xx 47 bit 0, (ix+d) 629 | dd cb xx 48 bit 1, (ix+d) 630 | dd cb xx 49 bit 1, (ix+d) 631 | dd cb xx 4a bit 1, (ix+d) 632 | dd cb xx 4b bit 1, (ix+d) 633 | dd cb xx 4c bit 1, (ix+d) 634 | dd cb xx 4d bit 1, (ix+d) 635 | dd cb xx 4e bit 1, (ix+d) 636 | dd cb xx 4f bit 1, (ix+d) 637 | dd cb xx 50 bit 2, (ix+d) 638 | dd cb xx 51 bit 2, (ix+d) 639 | dd cb xx 52 bit 2, (ix+d) 640 | dd cb xx 53 bit 2, (ix+d) 641 | dd cb xx 54 bit 2, (ix+d) 642 | dd cb xx 55 bit 2, (ix+d) 643 | dd cb xx 56 bit 2, (ix+d) 644 | dd cb xx 57 bit 2, (ix+d) 645 | dd cb xx 58 bit 3, (ix+d) 646 | dd cb xx 59 bit 3, (ix+d) 647 | dd cb xx 5a bit 3, (ix+d) 648 | dd cb xx 5b bit 3, (ix+d) 649 | dd cb xx 5c bit 3, (ix+d) 650 | dd cb xx 5d bit 3, (ix+d) 651 | dd cb xx 5e bit 3, (ix+d) 652 | dd cb xx 5f bit 3, (ix+d) 653 | dd cb xx 60 bit 4, (ix+d) 654 | dd cb xx 61 bit 4, (ix+d) 655 | dd cb xx 62 bit 4, (ix+d) 656 | dd cb xx 63 bit 4, (ix+d) 657 | dd cb xx 64 bit 4, (ix+d) 658 | dd cb xx 65 bit 4, (ix+d) 659 | dd cb xx 66 bit 4, (ix+d) 660 | dd cb xx 67 bit 4, (ix+d) 661 | dd cb xx 68 bit 5, (ix+d) 662 | dd cb xx 69 bit 5, (ix+d) 663 | dd cb xx 6a bit 5, (ix+d) 664 | dd cb xx 6b bit 5, (ix+d) 665 | dd cb xx 6c bit 5, (ix+d) 666 | dd cb xx 6d bit 5, (ix+d) 667 | dd cb xx 6e bit 5, (ix+d) 668 | dd cb xx 6f bit 5, (ix+d) 669 | dd cb xx 70 bit 6, (ix+d) 670 | dd cb xx 71 bit 6, (ix+d) 671 | dd cb xx 72 bit 6, (ix+d) 672 | dd cb xx 73 bit 6, (ix+d) 673 | dd cb xx 74 bit 6, (ix+d) 674 | dd cb xx 75 bit 6, (ix+d) 675 | dd cb xx 76 bit 6, (ix+d) 676 | dd cb xx 77 bit 6, (ix+d) 677 | dd cb xx 78 bit 7, (ix+d) 678 | dd cb xx 79 bit 7, (ix+d) 679 | dd cb xx 7a bit 7, (ix+d) 680 | dd cb xx 7b bit 7, (ix+d) 681 | dd cb xx 7c bit 7, (ix+d) 682 | dd cb xx 7d bit 7, (ix+d) 683 | dd cb xx 7e bit 7, (ix+d) 684 | dd cb xx 7f bit 7, (ix+d) 685 | dd cb xx 80 res 0, (ix+d), b 686 | dd cb xx 81 res 0, (ix+d), c 687 | dd cb xx 82 res 0, (ix+d), d 688 | dd cb xx 83 res 0, (ix+d), e 689 | dd cb xx 84 res 0, (ix+d), h 690 | dd cb xx 85 res 0, (ix+d), l 691 | dd cb xx 86 res 0, (ix+d) 692 | dd cb xx 87 res 0, (ix+d), a 693 | dd cb xx 88 res 1, (ix+d), b 694 | dd cb xx 89 res 1, (ix+d), c 695 | dd cb xx 8a res 1, (ix+d), d 696 | dd cb xx 8b res 1, (ix+d), e 697 | dd cb xx 8c res 1, (ix+d), h 698 | dd cb xx 8d res 1, (ix+d), l 699 | dd cb xx 8e res 1, (ix+d) 700 | dd cb xx 8f res 1, (ix+d), a 701 | dd cb xx 90 res 2, (ix+d), b 702 | dd cb xx 91 res 2, (ix+d), c 703 | dd cb xx 92 res 2, (ix+d), d 704 | dd cb xx 93 res 2, (ix+d), e 705 | dd cb xx 94 res 2, (ix+d), h 706 | dd cb xx 95 res 2, (ix+d), l 707 | dd cb xx 96 res 2, (ix+d) 708 | dd cb xx 97 res 2, (ix+d), a 709 | dd cb xx 98 res 3, (ix+d), b 710 | dd cb xx 99 res 3, (ix+d), c 711 | dd cb xx 9a res 3, (ix+d), d 712 | dd cb xx 9b res 3, (ix+d), e 713 | dd cb xx 9c res 3, (ix+d), h 714 | dd cb xx 9d res 3, (ix+d), l 715 | dd cb xx 9e res 3, (ix+d) 716 | dd cb xx 9f res 3, (ix+d), a 717 | dd cb xx a0 res 4, (ix+d), b 718 | dd cb xx a1 res 4, (ix+d), c 719 | dd cb xx a2 res 4, (ix+d), d 720 | dd cb xx a3 res 4, (ix+d), e 721 | dd cb xx a4 res 4, (ix+d), h 722 | dd cb xx a5 res 4, (ix+d), l 723 | dd cb xx a6 res 4, (ix+d) 724 | dd cb xx a7 res 4, (ix+d), a 725 | dd cb xx a8 res 5, (ix+d), b 726 | dd cb xx a9 res 5, (ix+d), c 727 | dd cb xx aa res 5, (ix+d), d 728 | dd cb xx ab res 5, (ix+d), e 729 | dd cb xx ac res 5, (ix+d), h 730 | dd cb xx ad res 5, (ix+d), l 731 | dd cb xx ae res 5, (ix+d) 732 | dd cb xx af res 5, (ix+d), a 733 | dd cb xx b0 res 6, (ix+d), b 734 | dd cb xx b1 res 6, (ix+d), c 735 | dd cb xx b2 res 6, (ix+d), d 736 | dd cb xx b3 res 6, (ix+d), e 737 | dd cb xx b4 res 6, (ix+d), h 738 | dd cb xx b5 res 6, (ix+d), l 739 | dd cb xx b6 res 6, (ix+d) 740 | dd cb xx b7 res 6, (ix+d), a 741 | dd cb xx b8 res 7, (ix+d), b 742 | dd cb xx b9 res 7, (ix+d), c 743 | dd cb xx ba res 7, (ix+d), d 744 | dd cb xx bb res 7, (ix+d), e 745 | dd cb xx bc res 7, (ix+d), h 746 | dd cb xx bd res 7, (ix+d), l 747 | dd cb xx be res 7, (ix+d) 748 | dd cb xx bf res 7, (ix+d), a 749 | dd cb xx c0 set 0, (ix+d), b 750 | dd cb xx c1 set 0, (ix+d), c 751 | dd cb xx c2 set 0, (ix+d), d 752 | dd cb xx c3 set 0, (ix+d), e 753 | dd cb xx c4 set 0, (ix+d), h 754 | dd cb xx c5 set 0, (ix+d), l 755 | dd cb xx c6 set 0, (ix+d) 756 | dd cb xx c7 set 0, (ix+d), a 757 | dd cb xx c8 set 1, (ix+d), b 758 | dd cb xx c9 set 1, (ix+d), c 759 | dd cb xx ca set 1, (ix+d), d 760 | dd cb xx cb set 1, (ix+d), e 761 | dd cb xx cc set 1, (ix+d), h 762 | dd cb xx cd set 1, (ix+d), l 763 | dd cb xx ce set 1, (ix+d) 764 | dd cb xx cf set 1, (ix+d), a 765 | dd cb xx d0 set 2, (ix+d), b 766 | dd cb xx d1 set 2, (ix+d), c 767 | dd cb xx d2 set 2, (ix+d), d 768 | dd cb xx d3 set 2, (ix+d), e 769 | dd cb xx d4 set 2, (ix+d), h 770 | dd cb xx d5 set 2, (ix+d), l 771 | dd cb xx d6 set 2, (ix+d) 772 | dd cb xx d7 set 2, (ix+d), a 773 | dd cb xx d8 set 3, (ix+d), b 774 | dd cb xx d9 set 3, (ix+d), c 775 | dd cb xx da set 3, (ix+d), d 776 | dd cb xx db set 3, (ix+d), e 777 | dd cb xx dc set 3, (ix+d), h 778 | dd cb xx dd set 3, (ix+d), l 779 | dd cb xx de set 3, (ix+d) 780 | dd cb xx df set 3, (ix+d), a 781 | dd cb xx e0 set 4, (ix+d), b 782 | dd cb xx e1 set 4, (ix+d), c 783 | dd cb xx e2 set 4, (ix+d), d 784 | dd cb xx e3 set 4, (ix+d), e 785 | dd cb xx e4 set 4, (ix+d), h 786 | dd cb xx e5 set 4, (ix+d), l 787 | dd cb xx e6 set 4, (ix+d) 788 | dd cb xx e7 set 4, (ix+d), a 789 | dd cb xx e8 set 5, (ix+d), b 790 | dd cb xx e9 set 5, (ix+d), c 791 | dd cb xx ea set 5, (ix+d), d 792 | dd cb xx eb set 5, (ix+d), e 793 | dd cb xx ec set 5, (ix+d), h 794 | dd cb xx ed set 5, (ix+d), l 795 | dd cb xx ee set 5, (ix+d) 796 | dd cb xx ef set 5, (ix+d), a 797 | dd cb xx f0 set 6, (ix+d), b 798 | dd cb xx f1 set 6, (ix+d), c 799 | dd cb xx f2 set 6, (ix+d), d 800 | dd cb xx f3 set 6, (ix+d), e 801 | dd cb xx f4 set 6, (ix+d), h 802 | dd cb xx f5 set 6, (ix+d), l 803 | dd cb xx f6 set 6, (ix+d) 804 | dd cb xx f7 set 6, (ix+d), a 805 | dd cb xx f8 set 7, (ix+d), b 806 | dd cb xx f9 set 7, (ix+d), c 807 | dd cb xx fa set 7, (ix+d), d 808 | dd cb xx fb set 7, (ix+d), e 809 | dd cb xx fc set 7, (ix+d), h 810 | dd cb xx fd set 7, (ix+d), l 811 | dd cb xx fe set 7, (ix+d) 812 | dd cb xx ff set 7, (ix+d), a 813 | dd e1 pop ix 814 | dd e3 ex (sp), ix 815 | dd e5 push ix 816 | dd e9 jp (ix) 817 | dd f9 ld sp, ix 818 | de xx sbc n 819 | df rst 18 820 | e0 ret po 821 | e1 pop hl 822 | e2 xx xx jp po, nn 823 | e3 ex (sp), hl 824 | e4 xx xx call po, nn 825 | e5 push hl 826 | e6 xx and n 827 | e7 rst 20 828 | e8 ret pe 829 | e9 jp (hl) 830 | ea xx xx jp pe, nn 831 | eb ex de, hl 832 | ec xx xx call pe, nn 833 | ed 40 in b, (c) 834 | ed 41 out (c), b 835 | ed 42 sbc hl, bc 836 | ed 43 xx xx ld (nn), bc 837 | ed 44 neg 838 | ed 45 retn 839 | ed 46 im 0 840 | ed 47 ld i, a 841 | ed 48 in c, (c) 842 | ed 49 out (c), c 843 | ed 4a adc hl, bc 844 | ed 4b xx xx ld bc, (nn) 845 | ed 4c neg 846 | ed 4d reti 847 | ed 4e im 0 848 | ed 4f ld r, a 849 | ed 50 in d, (c) 850 | ed 51 out (c), d 851 | ed 52 sbc hl, de 852 | ed 53 xx xx ld (nn), de 853 | ed 54 neg 854 | ed 55 retn 855 | ed 56 im 1 856 | ed 57 ld a, i 857 | ed 58 in e, (c) 858 | ed 59 out (c), e 859 | ed 5a adc hl, de 860 | ed 5b xx xx ld de, (nn) 861 | ed 5c neg 862 | ed 5d retn 863 | ed 5e im 2 864 | ed 5f ld a, r 865 | ed 60 in h, (c) 866 | ed 61 out (c), h 867 | ed 62 sbc hl, hl 868 | ed 63 xx xx ld (nn), hl 869 | ed 64 neg 870 | ed 65 retn 871 | ed 66 im 0 872 | ed 67 rrd 873 | ed 68 in l, (c) 874 | ed 69 out (c), l 875 | ed 6a adc hl, hl 876 | ed 6b xx xx ld hl, (nn) 877 | ed 6c neg 878 | ed 6d retn 879 | ed 6e im 0 880 | ed 6f rld 881 | ed 70 in (c) 882 | ed 71 out (c), 0 883 | ed 72 sbc hl, sp 884 | ed 73 xx xx ld (nn), sp 885 | ed 74 neg 886 | ed 75 retn 887 | ed 76 im 1 888 | ed 78 in a, (c) 889 | ed 79 out (c), a 890 | ed 7a adc hl, sp 891 | ed 7b xx xx ld sp, (nn) 892 | ed 7c neg 893 | ed 7d retn 894 | ed 7e im 2 895 | ed a0 ldi 896 | ed a1 cpi 897 | ed a2 ini 898 | ed a3 outi 899 | ed a8 ldd 900 | ed a9 cpd 901 | ed aa ind 902 | ed ab outd 903 | ed b0 ldir 904 | ed b1 cpir 905 | ed b2 inir 906 | ed b3 otir 907 | ed b8 lddr 908 | ed b9 cpdr 909 | ed ba indr 910 | ed bb otdr 911 | ee xx xor n 912 | ef rst 28 913 | f0 ret p 914 | f1 pop af 915 | f2 xx xx jp p, nn 916 | f3 di 917 | f4 xx xx call p, nn 918 | f5 push af 919 | f6 xx or n 920 | f7 rst 30 921 | f8 ret m 922 | f9 ld sp, hl 923 | fa xx xx jp m, nn 924 | fb ei 925 | fc xx xx call m, nn 926 | fd 09 add iy, bc 927 | fd 19 add iy, de 928 | fd 21 xx xx ld iy, nn 929 | fd 22 xx xx ld (nn), iy 930 | fd 23 inc iy 931 | fd 24 inc iyh 932 | fd 25 dec iyh 933 | fd 26 xx ld iyh, n 934 | fd 29 add iy, iy 935 | fd 2a xx xx ld iy, (nn) 936 | fd 2b dec iy 937 | fd 2c inc iyl 938 | fd 2d dec iyl 939 | fd 2e xx ld iyl, n 940 | fd 34 xx inc (iy+d) 941 | fd 35 xx dec (iy+d) 942 | fd 36 xx xx ld (iy+d), n 943 | fd 39 add iy, sp 944 | fd 44 ld b, iyh 945 | fd 45 ld b, iyl 946 | fd 46 xx ld b, (iy+d) 947 | fd 4c ld c, iyh 948 | fd 4d ld c, iyl 949 | fd 4e xx ld c, (iy+d) 950 | fd 54 ld d, iyh 951 | fd 55 ld d, iyl 952 | fd 56 xx ld d, (iy+d) 953 | fd 5c ld e, iyh 954 | fd 5d ld e, iyl 955 | fd 5e xx ld e, (iy+d) 956 | fd 60 ld iyh, b 957 | fd 61 ld iyh, c 958 | fd 62 ld iyh, d 959 | fd 63 ld iyh, e 960 | fd 64 ld iyh, iyh 961 | fd 65 ld iyh, iyl 962 | fd 66 xx ld h, (iy+d) 963 | fd 67 ld iyh, a 964 | fd 68 ld iyl, b 965 | fd 69 ld iyl, c 966 | fd 6a ld iyl, d 967 | fd 6b ld iyl, e 968 | fd 6c ld iyl, iyh 969 | fd 6d ld iyl, iyl 970 | fd 6e xx ld l, (iy+d) 971 | fd 6f ld iyl, a 972 | fd 70 xx ld (iy+d), b 973 | fd 71 xx ld (iy+d), c 974 | fd 72 xx ld (iy+d), d 975 | fd 73 xx ld (iy+d), e 976 | fd 74 xx ld (iy+d), h 977 | fd 75 xx ld (iy+d), l 978 | fd 77 xx ld (iy+d), a 979 | fd 7c ld a, iyh 980 | fd 7d ld a, iyl 981 | fd 7e xx ld a, (iy+d) 982 | fd 84 add iyh 983 | fd 85 add iyl 984 | fd 86 xx add (iy+d) 985 | fd 8c adc iyh 986 | fd 8d adc iyl 987 | fd 8e xx adc (iy+d) 988 | fd 94 sub iyh 989 | fd 95 sub iyl 990 | fd 96 xx sub (iy+d) 991 | fd 9c sbc iyh 992 | fd 9d sbc iyl 993 | fd 9e xx sbc (iy+d) 994 | fd a4 and iyh 995 | fd a5 and iyl 996 | fd a6 xx and (iy+d) 997 | fd ac xor iyh 998 | fd ad xor iyl 999 | fd ae xx xor (iy+d) 1000 | fd b4 or iyh 1001 | fd b5 or iyl 1002 | fd b6 xx or (iy+d) 1003 | fd bc cp iyh 1004 | fd bd cp iyl 1005 | fd be xx cp (iy+d) 1006 | fd cb xx 00 rlc (iy+d), b 1007 | fd cb xx 01 rlc (iy+d), c 1008 | fd cb xx 02 rlc (iy+d), d 1009 | fd cb xx 03 rlc (iy+d), e 1010 | fd cb xx 04 rlc (iy+d), h 1011 | fd cb xx 05 rlc (iy+d), l 1012 | fd cb xx 06 rlc (iy+d) 1013 | fd cb xx 07 rlc (iy+d), a 1014 | fd cb xx 08 rrc (iy+d), b 1015 | fd cb xx 09 rrc (iy+d), c 1016 | fd cb xx 0a rrc (iy+d), d 1017 | fd cb xx 0b rrc (iy+d), e 1018 | fd cb xx 0c rrc (iy+d), h 1019 | fd cb xx 0d rrc (iy+d), l 1020 | fd cb xx 0e rrc (iy+d) 1021 | fd cb xx 0f rrc (iy+d), a 1022 | fd cb xx 10 rl (iy+d), b 1023 | fd cb xx 11 rl (iy+d), c 1024 | fd cb xx 12 rl (iy+d), d 1025 | fd cb xx 13 rl (iy+d), e 1026 | fd cb xx 14 rl (iy+d), h 1027 | fd cb xx 15 rl (iy+d), l 1028 | fd cb xx 16 rl (iy+d) 1029 | fd cb xx 17 rl (iy+d), a 1030 | fd cb xx 18 rr (iy+d), b 1031 | fd cb xx 19 rr (iy+d), c 1032 | fd cb xx 1a rr (iy+d), d 1033 | fd cb xx 1b rr (iy+d), e 1034 | fd cb xx 1c rr (iy+d), h 1035 | fd cb xx 1d rr (iy+d), l 1036 | fd cb xx 1e rr (iy+d) 1037 | fd cb xx 1f rr (iy+d), a 1038 | fd cb xx 20 sla (iy+d), b 1039 | fd cb xx 21 sla (iy+d), c 1040 | fd cb xx 22 sla (iy+d), d 1041 | fd cb xx 23 sla (iy+d), e 1042 | fd cb xx 24 sla (iy+d), h 1043 | fd cb xx 25 sla (iy+d), l 1044 | fd cb xx 26 sla (iy+d) 1045 | fd cb xx 27 sla (iy+d), a 1046 | fd cb xx 28 sra (iy+d), b 1047 | fd cb xx 29 sra (iy+d), c 1048 | fd cb xx 2a sra (iy+d), d 1049 | fd cb xx 2b sra (iy+d), e 1050 | fd cb xx 2c sra (iy+d), h 1051 | fd cb xx 2d sra (iy+d), l 1052 | fd cb xx 2e sra (iy+d) 1053 | fd cb xx 2f sra (iy+d), a 1054 | fd cb xx 30 sll (iy+d), b 1055 | fd cb xx 31 sll (iy+d), c 1056 | fd cb xx 32 sll (iy+d), d 1057 | fd cb xx 33 sll (iy+d), e 1058 | fd cb xx 34 sll (iy+d), h 1059 | fd cb xx 35 sll (iy+d), l 1060 | fd cb xx 36 sll (iy+d) 1061 | fd cb xx 37 sll (iy+d), a 1062 | fd cb xx 38 srl (iy+d), b 1063 | fd cb xx 39 srl (iy+d), c 1064 | fd cb xx 3a srl (iy+d), d 1065 | fd cb xx 3b srl (iy+d), e 1066 | fd cb xx 3c srl (iy+d), h 1067 | fd cb xx 3d srl (iy+d), l 1068 | fd cb xx 3e srl (iy+d) 1069 | fd cb xx 3f srl (iy+d), a 1070 | fd cb xx 40 bit 0, (iy+d) 1071 | fd cb xx 41 bit 0, (iy+d) 1072 | fd cb xx 42 bit 0, (iy+d) 1073 | fd cb xx 43 bit 0, (iy+d) 1074 | fd cb xx 44 bit 0, (iy+d) 1075 | fd cb xx 45 bit 0, (iy+d) 1076 | fd cb xx 46 bit 0, (iy+d) 1077 | fd cb xx 47 bit 0, (iy+d) 1078 | fd cb xx 48 bit 1, (iy+d) 1079 | fd cb xx 49 bit 1, (iy+d) 1080 | fd cb xx 4a bit 1, (iy+d) 1081 | fd cb xx 4b bit 1, (iy+d) 1082 | fd cb xx 4c bit 1, (iy+d) 1083 | fd cb xx 4d bit 1, (iy+d) 1084 | fd cb xx 4e bit 1, (iy+d) 1085 | fd cb xx 4f bit 1, (iy+d) 1086 | fd cb xx 50 bit 2, (iy+d) 1087 | fd cb xx 51 bit 2, (iy+d) 1088 | fd cb xx 52 bit 2, (iy+d) 1089 | fd cb xx 53 bit 2, (iy+d) 1090 | fd cb xx 54 bit 2, (iy+d) 1091 | fd cb xx 55 bit 2, (iy+d) 1092 | fd cb xx 56 bit 2, (iy+d) 1093 | fd cb xx 57 bit 2, (iy+d) 1094 | fd cb xx 58 bit 3, (iy+d) 1095 | fd cb xx 59 bit 3, (iy+d) 1096 | fd cb xx 5a bit 3, (iy+d) 1097 | fd cb xx 5b bit 3, (iy+d) 1098 | fd cb xx 5c bit 3, (iy+d) 1099 | fd cb xx 5d bit 3, (iy+d) 1100 | fd cb xx 5e bit 3, (iy+d) 1101 | fd cb xx 5f bit 3, (iy+d) 1102 | fd cb xx 60 bit 4, (iy+d) 1103 | fd cb xx 61 bit 4, (iy+d) 1104 | fd cb xx 62 bit 4, (iy+d) 1105 | fd cb xx 63 bit 4, (iy+d) 1106 | fd cb xx 64 bit 4, (iy+d) 1107 | fd cb xx 65 bit 4, (iy+d) 1108 | fd cb xx 66 bit 4, (iy+d) 1109 | fd cb xx 67 bit 4, (iy+d) 1110 | fd cb xx 68 bit 5, (iy+d) 1111 | fd cb xx 69 bit 5, (iy+d) 1112 | fd cb xx 6a bit 5, (iy+d) 1113 | fd cb xx 6b bit 5, (iy+d) 1114 | fd cb xx 6c bit 5, (iy+d) 1115 | fd cb xx 6d bit 5, (iy+d) 1116 | fd cb xx 6e bit 5, (iy+d) 1117 | fd cb xx 6f bit 5, (iy+d) 1118 | fd cb xx 70 bit 6, (iy+d) 1119 | fd cb xx 71 bit 6, (iy+d) 1120 | fd cb xx 72 bit 6, (iy+d) 1121 | fd cb xx 73 bit 6, (iy+d) 1122 | fd cb xx 74 bit 6, (iy+d) 1123 | fd cb xx 75 bit 6, (iy+d) 1124 | fd cb xx 76 bit 6, (iy+d) 1125 | fd cb xx 77 bit 6, (iy+d) 1126 | fd cb xx 78 bit 7, (iy+d) 1127 | fd cb xx 79 bit 7, (iy+d) 1128 | fd cb xx 7a bit 7, (iy+d) 1129 | fd cb xx 7b bit 7, (iy+d) 1130 | fd cb xx 7c bit 7, (iy+d) 1131 | fd cb xx 7d bit 7, (iy+d) 1132 | fd cb xx 7e bit 7, (iy+d) 1133 | fd cb xx 7f bit 7, (iy+d) 1134 | fd cb xx 80 res 0, (iy+d), b 1135 | fd cb xx 81 res 0, (iy+d), c 1136 | fd cb xx 82 res 0, (iy+d), d 1137 | fd cb xx 83 res 0, (iy+d), e 1138 | fd cb xx 84 res 0, (iy+d), h 1139 | fd cb xx 85 res 0, (iy+d), l 1140 | fd cb xx 86 res 0, (iy+d) 1141 | fd cb xx 87 res 0, (iy+d), a 1142 | fd cb xx 88 res 1, (iy+d), b 1143 | fd cb xx 89 res 1, (iy+d), c 1144 | fd cb xx 8a res 1, (iy+d), d 1145 | fd cb xx 8b res 1, (iy+d), e 1146 | fd cb xx 8c res 1, (iy+d), h 1147 | fd cb xx 8d res 1, (iy+d), l 1148 | fd cb xx 8e res 1, (iy+d) 1149 | fd cb xx 8f res 1, (iy+d), a 1150 | fd cb xx 90 res 2, (iy+d), b 1151 | fd cb xx 91 res 2, (iy+d), c 1152 | fd cb xx 92 res 2, (iy+d), d 1153 | fd cb xx 93 res 2, (iy+d), e 1154 | fd cb xx 94 res 2, (iy+d), h 1155 | fd cb xx 95 res 2, (iy+d), l 1156 | fd cb xx 96 res 2, (iy+d) 1157 | fd cb xx 97 res 2, (iy+d), a 1158 | fd cb xx 98 res 3, (iy+d), b 1159 | fd cb xx 99 res 3, (iy+d), c 1160 | fd cb xx 9a res 3, (iy+d), d 1161 | fd cb xx 9b res 3, (iy+d), e 1162 | fd cb xx 9c res 3, (iy+d), h 1163 | fd cb xx 9d res 3, (iy+d), l 1164 | fd cb xx 9e res 3, (iy+d) 1165 | fd cb xx 9f res 3, (iy+d), a 1166 | fd cb xx a0 res 4, (iy+d), b 1167 | fd cb xx a1 res 4, (iy+d), c 1168 | fd cb xx a2 res 4, (iy+d), d 1169 | fd cb xx a3 res 4, (iy+d), e 1170 | fd cb xx a4 res 4, (iy+d), h 1171 | fd cb xx a5 res 4, (iy+d), l 1172 | fd cb xx a6 res 4, (iy+d) 1173 | fd cb xx a7 res 4, (iy+d), a 1174 | fd cb xx a8 res 5, (iy+d), b 1175 | fd cb xx a9 res 5, (iy+d), c 1176 | fd cb xx aa res 5, (iy+d), d 1177 | fd cb xx ab res 5, (iy+d), e 1178 | fd cb xx ac res 5, (iy+d), h 1179 | fd cb xx ad res 5, (iy+d), l 1180 | fd cb xx ae res 5, (iy+d) 1181 | fd cb xx af res 5, (iy+d), a 1182 | fd cb xx b0 res 6, (iy+d), b 1183 | fd cb xx b1 res 6, (iy+d), c 1184 | fd cb xx b2 res 6, (iy+d), d 1185 | fd cb xx b3 res 6, (iy+d), e 1186 | fd cb xx b4 res 6, (iy+d), h 1187 | fd cb xx b5 res 6, (iy+d), l 1188 | fd cb xx b6 res 6, (iy+d) 1189 | fd cb xx b7 res 6, (iy+d), a 1190 | fd cb xx b8 res 7, (iy+d), b 1191 | fd cb xx b9 res 7, (iy+d), c 1192 | fd cb xx ba res 7, (iy+d), d 1193 | fd cb xx bb res 7, (iy+d), e 1194 | fd cb xx bc res 7, (iy+d), h 1195 | fd cb xx bd res 7, (iy+d), l 1196 | fd cb xx be res 7, (iy+d) 1197 | fd cb xx bf res 7, (iy+d), a 1198 | fd cb xx c0 set 0, (iy+d), b 1199 | fd cb xx c1 set 0, (iy+d), c 1200 | fd cb xx c2 set 0, (iy+d), d 1201 | fd cb xx c3 set 0, (iy+d), e 1202 | fd cb xx c4 set 0, (iy+d), h 1203 | fd cb xx c5 set 0, (iy+d), l 1204 | fd cb xx c6 set 0, (iy+d) 1205 | fd cb xx c7 set 0, (iy+d), a 1206 | fd cb xx c8 set 1, (iy+d), b 1207 | fd cb xx c9 set 1, (iy+d), c 1208 | fd cb xx ca set 1, (iy+d), d 1209 | fd cb xx cb set 1, (iy+d), e 1210 | fd cb xx cc set 1, (iy+d), h 1211 | fd cb xx cd set 1, (iy+d), l 1212 | fd cb xx ce set 1, (iy+d) 1213 | fd cb xx cf set 1, (iy+d), a 1214 | fd cb xx d0 set 2, (iy+d), b 1215 | fd cb xx d1 set 2, (iy+d), c 1216 | fd cb xx d2 set 2, (iy+d), d 1217 | fd cb xx d3 set 2, (iy+d), e 1218 | fd cb xx d4 set 2, (iy+d), h 1219 | fd cb xx d5 set 2, (iy+d), l 1220 | fd cb xx d6 set 2, (iy+d) 1221 | fd cb xx d7 set 2, (iy+d), a 1222 | fd cb xx d8 set 3, (iy+d), b 1223 | fd cb xx d9 set 3, (iy+d), c 1224 | fd cb xx da set 3, (iy+d), d 1225 | fd cb xx db set 3, (iy+d), e 1226 | fd cb xx dc set 3, (iy+d), h 1227 | fd cb xx dd set 3, (iy+d), l 1228 | fd cb xx de set 3, (iy+d) 1229 | fd cb xx df set 3, (iy+d), a 1230 | fd cb xx e0 set 4, (iy+d), b 1231 | fd cb xx e1 set 4, (iy+d), c 1232 | fd cb xx e2 set 4, (iy+d), d 1233 | fd cb xx e3 set 4, (iy+d), e 1234 | fd cb xx e4 set 4, (iy+d), h 1235 | fd cb xx e5 set 4, (iy+d), l 1236 | fd cb xx e6 set 4, (iy+d) 1237 | fd cb xx e7 set 4, (iy+d), a 1238 | fd cb xx e8 set 5, (iy+d), b 1239 | fd cb xx e9 set 5, (iy+d), c 1240 | fd cb xx ea set 5, (iy+d), d 1241 | fd cb xx eb set 5, (iy+d), e 1242 | fd cb xx ec set 5, (iy+d), h 1243 | fd cb xx ed set 5, (iy+d), l 1244 | fd cb xx ee set 5, (iy+d) 1245 | fd cb xx ef set 5, (iy+d), a 1246 | fd cb xx f0 set 6, (iy+d), b 1247 | fd cb xx f1 set 6, (iy+d), c 1248 | fd cb xx f2 set 6, (iy+d), d 1249 | fd cb xx f3 set 6, (iy+d), e 1250 | fd cb xx f4 set 6, (iy+d), h 1251 | fd cb xx f5 set 6, (iy+d), l 1252 | fd cb xx f6 set 6, (iy+d) 1253 | fd cb xx f7 set 6, (iy+d), a 1254 | fd cb xx f8 set 7, (iy+d), b 1255 | fd cb xx f9 set 7, (iy+d), c 1256 | fd cb xx fa set 7, (iy+d), d 1257 | fd cb xx fb set 7, (iy+d), e 1258 | fd cb xx fc set 7, (iy+d), h 1259 | fd cb xx fd set 7, (iy+d), l 1260 | fd cb xx fe set 7, (iy+d) 1261 | fd cb xx ff set 7, (iy+d), a 1262 | fd e1 pop iy 1263 | fd e3 ex (sp), iy 1264 | fd e5 push iy 1265 | fd e9 jp (iy) 1266 | fd f9 ld sp, iy 1267 | fe xx cp n 1268 | ff rst 38 1269 | -------------------------------------------------------------------------------- /win32/inpout32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcs/mailstation-tools/68cc381837011ffba804303f72d6eb7885aff050/win32/inpout32.dll -------------------------------------------------------------------------------- /win32/maildump.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Maildump.cpp 3 | * ------------ 4 | * 5 | * This should dump your Mailstation's codeflash or dataflash, in 6 | * combination with the codedump.asm or datadump.asm app for the 7 | * Mailstation, and a laplink cable of course. 8 | * 9 | * Basic use would be as follows: 10 | * 1.) connect laplink cable to MS and PC 11 | * 2.) turn on MS 12 | * 3.) run "maildump /code" on PC 13 | * 4.) run codedump on MS 14 | * 15 | * The MS should be on first to ensure parallel port signals are 16 | * reset, otherwise your dump could be bad. If you think you 17 | * did get a bad dump, it wouldn't hurt to turn the MS off and 18 | * on again, waiting for the main menu to show up, just to make 19 | * sure it resets itself before you start listening for data. 20 | * 21 | * A dump of the codeflash should be 1,048,576 bytes (1MB), and named 22 | * "codeflash.bin", which is automatically overwritten everytime you run 23 | * the program. 24 | * 25 | * A dump of the dataflash should be 524,288 bytes (512Kb), and named 26 | * "dataflash.bin", which is automatically overwritten everytime you run 27 | * the program. 28 | * 29 | * This is based around Cyrano Jones' unit_tribbles in Pascal, 30 | * but written to work under Windows (tested under 98 and XP) thanks 31 | * to inpout32.dll, which doesn't require a separate driver 32 | * to interface with I/O ports. It's pretty useful! 33 | * 34 | * - FyberOptic (fyberoptic@...) 35 | * 36 | */ 37 | 38 | #include 39 | #include 40 | #include 41 | 42 | #define PORTADDRESS 0x378 43 | 44 | #define DATA PORTADDRESS+0 45 | #define STATUS PORTADDRESS+1 46 | #define CONTROL PORTADDRESS+2 47 | 48 | #define bsyin 0x40 49 | #define bsyout 0x08 50 | #define stbin 0x80 51 | #define stbout 0x10 52 | #define tribmask 0x07 53 | #define dibmask 0x03 54 | 55 | typedef short (_stdcall *inpfuncPtr)(short portaddr); 56 | typedef void (_stdcall *oupfuncPtr)(short portaddr, short datum); 57 | 58 | inpfuncPtr inp32fp; 59 | oupfuncPtr oup32fp; 60 | 61 | short 62 | Inp32(short portaddr) 63 | { 64 | return (inp32fp)(portaddr); 65 | } 66 | 67 | void 68 | Out32(short portaddr, short datum) 69 | { 70 | (oup32fp)(portaddr,datum); 71 | } 72 | 73 | int 74 | InitIOLibrary(void) 75 | { 76 | HINSTANCE hLib; 77 | 78 | hLib = LoadLibrary("inpout32.dll"); 79 | 80 | if (hLib == NULL) { 81 | fprintf(stderr,"LoadLibrary Failed.\n"); 82 | return -1; 83 | } 84 | 85 | inp32fp = (inpfuncPtr)GetProcAddress(hLib, "Inp32"); 86 | 87 | if (inp32fp == NULL) { 88 | fprintf(stderr,"GetProcAddress for Inp32 Failed.\n"); 89 | return -1; 90 | } 91 | 92 | oup32fp = (oupfuncPtr)GetProcAddress(hLib, "Out32"); 93 | 94 | if (oup32fp == NULL) { 95 | fprintf(stderr,"GetProcAddress for Oup32 Failed.\n"); 96 | return -1; 97 | } 98 | } 99 | 100 | unsigned char 101 | recvtribble(void) 102 | { 103 | unsigned char mytribble; 104 | 105 | // drop busy/ack 106 | Out32(DATA,0); 107 | 108 | // wait for (inverted) strobe 109 | while ((Inp32(STATUS) & stbin) != 0) 110 | ; 111 | 112 | // grab tribble 113 | mytribble = (Inp32(STATUS) >> 3) & tribmask; 114 | 115 | // raise busy/ack 116 | Out32(DATA,bsyout); 117 | 118 | // wait for (inverted) UNstrobe 119 | while ((Inp32(STATUS) & stbin) == 0) 120 | ; 121 | 122 | return mytribble; 123 | } 124 | 125 | int 126 | main(int argc, void **argv) 127 | { 128 | FILE *pFile; 129 | unsigned int received = 0, expected = 0; 130 | unsigned char t1, t2, t3, b; 131 | char fn[14]; 132 | int codeflash = 0, dataflash = 0; 133 | int x; 134 | 135 | for (x = 1; x < argc; x++) { 136 | if (strcmp((char *)argv[x], "/code") == 0) 137 | codeflash = 1; 138 | else if (strcmp((char *)argv[x], "/data") == 0) 139 | dataflash = 1; 140 | else 141 | printf("unknown parameter: %s\n", argv[x]); 142 | } 143 | 144 | if (codeflash == dataflash) { 145 | printf("usage: %s [/code | /data]\n", argv[0]); 146 | return 1; 147 | } 148 | 149 | if (codeflash) { 150 | expected = 1024 * 1024; 151 | strncpy(fn, "codeflash.bin", sizeof(fn)); 152 | } else if (dataflash) { 153 | expected = 1024 * 512; 154 | strncpy(fn, "dataflash.bin", sizeof(fn)); 155 | } 156 | 157 | if (!InitIOLibrary()) { 158 | printf("Failed to initialize port I/O library\n"); 159 | return -1; 160 | } 161 | 162 | pFile = fopen(fn, "wb"); 163 | if (!pFile) { 164 | printf("couldn't open file %s\n", fn); 165 | return -1; 166 | } 167 | 168 | printf("waiting to dump to %s...", fn); 169 | 170 | while (received < expected) { 171 | t1 = recvtribble(); 172 | t2 = recvtribble(); 173 | t3 = recvtribble(); 174 | 175 | b = t1 + (t2 << 3) + ((t3 & dibmask) << 6); 176 | 177 | if (received == 0) 178 | printf("\n"); 179 | 180 | if (0) { 181 | printf("[%08d] received 0x%x, 0x%x, 0x%x = 0x%x\r\n", received, t1, t2, t3, b); 182 | } 183 | 184 | fputc(b, pFile); 185 | received++; 186 | 187 | if (received % 1024 == 0 || received == expected) 188 | printf("\rreceived: %07d/%07d", received, expected); 189 | } 190 | fclose(pFile); 191 | 192 | printf("\n"); 193 | 194 | return 0; 195 | } 196 | 197 | -------------------------------------------------------------------------------- /win32/maildump.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcs/mailstation-tools/68cc381837011ffba804303f72d6eb7885aff050/win32/maildump.exe -------------------------------------------------------------------------------- /win32/mailsend.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcs/mailstation-tools/68cc381837011ffba804303f72d6eb7885aff050/win32/mailsend.exe -------------------------------------------------------------------------------- /z80/codedump.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcs/mailstation-tools/68cc381837011ffba804303f72d6eb7885aff050/z80/codedump.bin -------------------------------------------------------------------------------- /z80/datadump.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcs/mailstation-tools/68cc381837011ffba804303f72d6eb7885aff050/z80/datadump.bin -------------------------------------------------------------------------------- /z80/loader.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcs/mailstation-tools/68cc381837011ffba804303f72d6eb7885aff050/z80/loader.bin --------------------------------------------------------------------------------