Previous 15994 Revisions Next

r5681 Friday 11th September, 2009 at 00:37:01 UTC by Jonathan Gevaryahu
[dectalk] add the correct default nvram image, dectalk no longer gives an NVR Fault error on startup [leeeeee]
[src/mess/drivers]dectalk.c

src/mess/drivers/dectalk.c
r5680r5681
9090* $10402 - nvram recall/reset based on byte on stack (0 = recall, 1 = write default to nvram)
9191* $10f2E - nvram recall
9292* $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
9496* $1a7ae - default nvram image, without checksum (0x80 bytes)
9597*******************************************************************************/
9698/*the 68k memory map is such:
r5680r5681
124126*/
125127// 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
126128#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
128130#undef VERBOSE
129// logs reads and writes to nvram
131// logs reads and writes to nvram, and nvram store/recall flag messages
130132#undef NVRAM_LOG
131133// logs reads and writes to TLC regs
132134#undef TLC_LOG
r5680r5681
135137// logs reads and writes to SPC regs, dsp side only
136138#undef SPC_LOG_DSP
137139// logs txd and related serial lines to stderr
138#undef SERIAL_TO_STDERR
140#undef SERIAL_TO_STDERR
139141
140142/* Core includes */
141143#include "driver.h"
r5680r5681
244246   int i;
245247   for (i = 0; i < 256; i++)
246248   nvram[i] = dectalk.nvram_local[i];
247#ifdef VERBOSE
249#ifdef NVRAM_LOG
248250   logerror("nvram store done\n");
249251#endif
250252}
r5680r5681
255257   int i;
256258   for (i = 0; i < 256; i++)
257259   dectalk.nvram_local[i] = nvram[i];
258#ifdef VERBOSE
260#ifdef NVRAM_LOG
259261   logerror("nvram recall done\n");
260262#endif
261263}
r5680r5681
763765   ROM_LOAD16_BYTE("lm8506205f4.e70", 0x000, 0x800, CRC(ed76a3ad) SHA1(3136bae243ef48721e21c66fde70dab5fc3c21d0)) // Label: "LM8506205F4 // M1-76161-5" @ E70
764766   ROM_LOAD16_BYTE("lm8504204f4.e69", 0x001, 0x800, CRC(79bb54ff) SHA1(9409f90f7a397b041e4440341f2d7934cb479285)) // Label: "LM8504204F4 // 78S191" @ E69
765767
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) // "
794786
795787ROM_END
796788

Previous 15994 Revisions Next


© 1998-2018 The MESS Team