src/mess/drivers/dectalk.c
| r5680 | r5681 | |
| 90 | 90 | * $10402 - nvram recall/reset based on byte on stack (0 = recall, 1 = write default to nvram) |
| 91 | 91 | * $10f2E - nvram recall |
| 92 | 92 | * $10f52 - entry point for nvram check routine |
| 93 | | * $11004(entry point)-$11030, $11032-$111B4 - nvram store routine |
| 93 | * $11004(entry point)-$11030, $11032-$111B4 - nvram store routine: |
| 94 | * pass with a blank word on stack and be sure the test and branch at 11016 & 1101a passes (jumps to 1106a) |
| 95 | * It will then write currently loaded settings to nvram and execute a store, so do it after the defaults are loaded |
| 94 | 96 | * $1a7ae - default nvram image, without checksum (0x80 bytes) |
| 95 | 97 | *******************************************************************************/ |
| 96 | 98 | /*the 68k memory map is such: |
| r5680 | r5681 | |
| 124 | 126 | */ |
| 125 | 127 | // USE_LOOSE_TIMING makes the cpu interleave much lower and boosts it on fifo and flag writes by the 68k and semaphore sets by the dsp |
| 126 | 128 | #define USE_LOOSE_TIMING 1 |
| 127 | | // generic logs like nvram store/recall flag messages and led state, and common writes for dsp and spc such as the speech int |
| 129 | // generic logs like led state, and common writes for dsp and spc such as the speech int |
| 128 | 130 | #undef VERBOSE |
| 129 | | // logs reads and writes to nvram |
| 131 | // logs reads and writes to nvram, and nvram store/recall flag messages |
| 130 | 132 | #undef NVRAM_LOG |
| 131 | 133 | // logs reads and writes to TLC regs |
| 132 | 134 | #undef TLC_LOG |
| r5680 | r5681 | |
| 135 | 137 | // logs reads and writes to SPC regs, dsp side only |
| 136 | 138 | #undef SPC_LOG_DSP |
| 137 | 139 | // logs txd and related serial lines to stderr |
| 138 | | #undef SERIAL_TO_STDERR |
| 140 | #undef SERIAL_TO_STDERR |
| 139 | 141 | |
| 140 | 142 | /* Core includes */ |
| 141 | 143 | #include "driver.h" |
| r5680 | r5681 | |
| 244 | 246 | int i; |
| 245 | 247 | for (i = 0; i < 256; i++) |
| 246 | 248 | nvram[i] = dectalk.nvram_local[i]; |
| 247 | | #ifdef VERBOSE |
| 249 | #ifdef NVRAM_LOG |
| 248 | 250 | logerror("nvram store done\n"); |
| 249 | 251 | #endif |
| 250 | 252 | } |
| r5680 | r5681 | |
| 255 | 257 | int i; |
| 256 | 258 | for (i = 0; i < 256; i++) |
| 257 | 259 | dectalk.nvram_local[i] = nvram[i]; |
| 258 | | #ifdef VERBOSE |
| 260 | #ifdef NVRAM_LOG |
| 259 | 261 | logerror("nvram recall done\n"); |
| 260 | 262 | #endif |
| 261 | 263 | } |
| r5680 | r5681 | |
| 763 | 765 | ROM_LOAD16_BYTE("lm8506205f4.e70", 0x000, 0x800, CRC(ed76a3ad) SHA1(3136bae243ef48721e21c66fde70dab5fc3c21d0)) // Label: "LM8506205F4 // M1-76161-5" @ E70 |
| 764 | 766 | ROM_LOAD16_BYTE("lm8504204f4.e69", 0x001, 0x800, CRC(79bb54ff) SHA1(9409f90f7a397b041e4440341f2d7934cb479285)) // Label: "LM8504204F4 // 78S191" @ E69 |
| 765 | 767 | |
| 766 | | ROM_REGION(0x100,"nvram", 0) // default nvram image is at 0x1A7AE in main rom, read lsn first so 0x0005 in rom becomes 0x50 0x00, etc for all words of main rom |
| 767 | | ROM_FILL(0x00, 0x01, 0x50) // 0005 |
| 768 | | ROM_FILL(0x01, 0x01, 0x00) |
| 769 | | ROM_FILL(0x02, 0x01, 0x00) // 0000 |
| 770 | | ROM_FILL(0x03, 0x01, 0x00) |
| 771 | | ROM_FILL(0x04, 0x01, 0x60) // 0006 |
| 772 | | ROM_FILL(0x05, 0x01, 0x00) |
| 773 | | ROM_FILL(0x06, 0x01, 0x10) // 0001 |
| 774 | | ROM_FILL(0x07, 0x01, 0x00) |
| 775 | | ROM_FILL(0x08, 0x01, 0x60) // 0006 |
| 776 | | ROM_FILL(0x09, 0x01, 0x00) |
| 777 | | ROM_FILL(0x0A, 0x01, 0xB0) // 000B |
| 778 | | ROM_FILL(0x0B, 0x01, 0x00) |
| 779 | | ROM_FILL(0x0C, 0x01, 0x20) // 0002 |
| 780 | | ROM_FILL(0x0D, 0x01, 0x00) |
| 781 | | ROM_FILL(0x0E, 0x01, 0x20) // 0002 |
| 782 | | ROM_FILL(0x0F, 0x01, 0x00) |
| 783 | | ROM_FILL(0x10, 0x01, 0x10) // 0001 |
| 784 | | ROM_FILL(0x11, 0x01, 0x00) |
| 785 | | ROM_FILL(0x12, 0x01, 0x10) // 0001 |
| 786 | | ROM_FILL(0x13, 0x01, 0x00) |
| 787 | | ROM_FILL(0x14, 0x01, 0x00) // 0000 |
| 788 | | ROM_FILL(0x15, 0x01, 0x00) |
| 789 | | ROM_FILL(0x16, 0x01, 0x10) // 0001 |
| 790 | | ROM_FILL(0x17, 0x01, 0x00) |
| 791 | | ROM_FILL(0x18, 0xE4, 0x00) // rest is 0s except for checksum |
| 792 | | ROM_FILL(0xFE, 0x01, 0x00) // 0000 for now, probably wrong |
| 793 | | ROM_FILL(0xFF, 0x01, 0x00) |
| 768 | ROM_REGION(0x100,"nvram", 0) // default nvram image is at 0x1A7AE in main rom, read lsn first so 0x0005 in rom becomes 05 00 00 00 etc for all words of main rom |
| 769 | ROM_FILL(0x00, 0xff, 0x00) // blank it first; |
| 770 | ROM_FILL(0x00, 0x01, 0x05) |
| 771 | ROM_FILL(0x04, 0x01, 0x00) |
| 772 | ROM_FILL(0x08, 0x01, 0x06) |
| 773 | ROM_FILL(0x0C, 0x01, 0x01) |
| 774 | ROM_FILL(0x10, 0x01, 0x06) |
| 775 | ROM_FILL(0x14, 0x01, 0x0B) |
| 776 | ROM_FILL(0x18, 0x01, 0x02) |
| 777 | ROM_FILL(0x1C, 0x01, 0x02) |
| 778 | ROM_FILL(0x20, 0x01, 0x01) |
| 779 | ROM_FILL(0x24, 0x01, 0x01) |
| 780 | ROM_FILL(0x28, 0x01, 0x00) |
| 781 | ROM_FILL(0x2c, 0x01, 0x01) |
| 782 | ROM_FILL(0xFC, 0x01, 0x0D) // checksum, calculated some weird way which I haven't figured out yet |
| 783 | ROM_FILL(0xFD, 0x01, 0x02) // " |
| 784 | ROM_FILL(0xFE, 0x01, 0x05) // " |
| 785 | ROM_FILL(0xFF, 0x01, 0x0B) // " |
| 794 | 786 | |
| 795 | 787 | ROM_END |
| 796 | 788 | |