trunk/src/mame/drivers/gunpey.c
| r21480 | r21481 | |
| 1 | 1 | /******************************************************************************************** |
| 2 | 2 | |
| 3 | Gunpey (c) 2000 Banpresto |
| 3 | 4 | |
| 5 | ASM code study: |
| 6 | 0x84718 main code |
| 7 | 0x8472c call 0x81f34 reading of dip-switches |
| 8 | 0x84731 call 0x81f5c move dip-switches settings to work RAM |
| 9 | 0x84736 call 0x80ae4 writes to i/os 0x7fc0-0x7fff: |
| 10 | 0x7fc0: 0x00 |
| 11 | 0x7fc1: 0x00 |
| 12 | 0x7fc2: 0x40 |
| 13 | 0x7fc3: 0x03 |
| 14 | 0x7fc4: 0x72 |
| 15 | 0x7fc5: 0x72 |
| 16 | 0x7fc6: 0x90 |
| 17 | 0x7fc7: 0x01 |
| 18 | 0x7fc8: 0x55 irq mask? |
| 19 | (note: skips irq ack) |
| 20 | 0x7fca: 0x00 |
| 21 | 0x7fcb: 0x00 |
| 22 | 0x7fcc: 0x00 |
| 23 | 0x7fcd: 0x00 |
| 24 | 0x7fce: 0x00 |
| 25 | 0x7fcf: 0x07 |
| 26 | 0x7fd0: 0x00 |
| 27 | 0x7fd1: 0x00 |
| 28 | 0x7fd2: 0x00 |
| 29 | 0x7fd3: 0x8c |
| 30 | 0x7fd4-0x7fde: 0x00 |
| 31 | (skips 0x7fdf) |
| 32 | 0x7fe0: 0x40 |
| 33 | 0x7fe1: 0x02 |
| 34 | 0x7fe2: 0x00 |
| 35 | 0x7fe3: 0x00 |
| 36 | 0x7fe4: 0x60 |
| 37 | 0x7fe5: 0x07 |
| 38 | 0x7fe6: 0x88 |
| 39 | 0x7fe7: 0x07 |
| 40 | 0x7fe8: 0x9f |
| 41 | 0x7fe9: 0x08 |
| 42 | 0x7fea: 0x77 |
| 43 | 0x7feb: 0x08 |
| 44 | (here the code writes 16-bit words, read from 0x500e ...) |
| 45 | 0x7fec: 0x00 |
| 46 | 0x7fed: 0x84 |
| 47 | (read from 0x5012) |
| 48 | 0x7fee: 0x00 |
| 49 | 0x7fef: 0x88 |
| 50 | (returns to byte filling) |
| 51 | 0x7ff0: 0x84 |
| 52 | 0x7ff1: 0x00 |
| 53 | 0x7ff2: 0x00 |
| 54 | 0x7ff3: 0x01 |
| 55 | 0x7ff4: 0x00 |
| 56 | 0x7ff5: 0x00 |
| 57 | 0x7ff6: 0xc7 |
| 58 | 0x7ff7: 0x56 |
| 59 | 0x7ff8: 0x3f |
| 60 | 0x7ff9: 0x48 |
| 61 | 0x7ffa: 0x9a |
| 62 | 0x7ffb: 0x22 |
| 63 | 0x7ffc: 0x0e |
| 64 | 0x7ffd: 0x43 |
| 65 | 0x7ffe: 0xf0 |
| 66 | 0x7fff: 0x15 |
| 67 | Then, it fills the following work RAMs (with 0 except where noted): |
| 68 | 0x5e36, 0x5e38, 0x5e44, 0x5e46 (4), 0x5e48, 0x5e4a, 0x5e40, 0x5e42, 0x5b68 (0x9c8), 0x5b6a (0x9c8), 0x59c4 (1) |
| 69 | 0x8473b: call 0x81415 (TODO) |
| 70 | |
| 4 | 71 | ============================================================================================= |
| 5 | 72 | |
| 6 | 73 | Gunpey |