Skip to content

Commit 14c3c61

Browse files
committed
sinclair/tsconf.cpp: Changed default ram data to 0x00; cram full init
1 parent 12b2db3 commit 14c3c61

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

src/mame/sinclair/tsconf.cpp

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,27 @@ void tsconf_state::machine_reset()
231231

232232
m_keyboard->write(0xff);
233233
while (m_keyboard->read() != 0) { /* invalidate buffer */ }
234+
235+
const u16 cram_init[0x100] = {
236+
0x0000, 0x0008, 0x0010, 0x0018, 0x2000, 0x2008, 0x2010, 0x2018, 0x4000, 0x4008, 0x4010, 0x4018, 0x6000, 0x6008, 0x6010, 0x6018,
237+
0x0100, 0x0108, 0x0110, 0x0118, 0x2100, 0x2108, 0x2110, 0x2118, 0x4100, 0x4108, 0x4110, 0x4118, 0x6100, 0x6108, 0x6110, 0x6118,
238+
0x0200, 0x0208, 0x0210, 0x0218, 0x2200, 0x2208, 0x2210, 0x2218, 0x4200, 0x4208, 0x4210, 0x4218, 0x6200, 0x6208, 0x6210, 0x6218,
239+
0x0300, 0x0308, 0x0310, 0x0318, 0x2300, 0x2308, 0x2310, 0x2318, 0x4300, 0x4308, 0x4310, 0x4318, 0x6300, 0x6308, 0x6310, 0x6318,
240+
0x0000, 0x0010, 0x4000, 0x4010, 0x0200, 0x0210, 0x4200, 0x4210, 0x2108, 0x0018, 0x6000, 0x6018, 0x0300, 0x0318, 0x6300, 0x6318,
241+
0x0000, 0x0010, 0x4000, 0x4010, 0x0200, 0x0210, 0x4200, 0x4210, 0x0000, 0x0018, 0x6000, 0x6018, 0x0300, 0x0318, 0x6300, 0x6318,
242+
0x0000, 0x0010, 0x4000, 0x4010, 0x0200, 0x0210, 0x4200, 0x4210, 0x2108, 0x0018, 0x6000, 0x6018, 0x0300, 0x0318, 0x6300, 0x6318,
243+
0x0000, 0x0010, 0x4000, 0x4010, 0x0200, 0x0210, 0x4200, 0x4210, 0x0000, 0x0018, 0x6000, 0x6018, 0x0300, 0x0318, 0x6300, 0x6318,
244+
0x0000, 0x0010, 0x4000, 0x4010, 0x0200, 0x0210, 0x4200, 0x4210, 0x2108, 0x0018, 0x6000, 0x6018, 0x0300, 0x0318, 0x6300, 0x6318,
245+
0x0000, 0x0010, 0x4000, 0x4010, 0x0200, 0x0210, 0x4200, 0x4210, 0x0000, 0x0018, 0x6000, 0x6018, 0x0300, 0x0318, 0x6300, 0x6318,
246+
0x0000, 0x0010, 0x4000, 0x4010, 0x0200, 0x0210, 0x4200, 0x4210, 0x2108, 0x0018, 0x6000, 0x6018, 0x0300, 0x0318, 0x6300, 0x6318,
247+
0x0000, 0x0010, 0x4000, 0x4010, 0x0200, 0x0210, 0x4200, 0x4210, 0x0000, 0x0018, 0x6000, 0x6018, 0x0300, 0x0318, 0x6300, 0x6318,
248+
0x0000, 0x0010, 0x4000, 0x4010, 0x0200, 0x0210, 0x4200, 0x4210, 0x2108, 0x0018, 0x6000, 0x6018, 0x0300, 0x0318, 0x6300, 0x6318,
249+
0x0000, 0x0010, 0x4000, 0x4010, 0x0200, 0x0210, 0x4200, 0x4210, 0x0000, 0x0018, 0x6000, 0x6018, 0x0300, 0x0318, 0x6300, 0x6318,
250+
0x0000, 0x0010, 0x4000, 0x4010, 0x0200, 0x0210, 0x4200, 0x4210, 0x2108, 0x0018, 0x6000, 0x6018, 0x0300, 0x0318, 0x6300, 0x6318,
251+
0x0000, 0x0010, 0x4000, 0x4010, 0x0200, 0x0210, 0x4200, 0x4210, 0x0000, 0x0018, 0x6000, 0x6018, 0x0300, 0x0318, 0x6300, 0x6318
252+
};
253+
for (auto i = 0; i < 0x100; i++)
254+
cram_write16(i << 1, (cram_init[i] >> 8) | (cram_init[i] << 8)); // init color RAM
234255
}
235256

236257
void tsconf_state::device_post_load()
@@ -286,7 +307,7 @@ void tsconf_state::tsconf(machine_config &config)
286307
ZXBUS_SLOT(config, "zxbus1", 0, "zxbus", zxbus_cards, nullptr);
287308
//ZXBUS_SLOT(config, "zxbus2", 0, "zxbus", zxbus_cards, nullptr);
288309

289-
m_ram->set_default_size("4096K");
310+
m_ram->set_default_size("4096K").set_default_value(0x00); // must be random but 0x00 behaves better than 0xff in tested software
290311

291312
GLUKRS(config, m_glukrs);
292313

0 commit comments

Comments
 (0)