Skip to content

Commit d2610ee

Browse files
authored
sinclair/tsconf.cpp: Added CRAM initialisation, changed initial system RAM fill to 0x00. (#13823)
Initial RAM system RAM content is indeterminate, but tested software seems to work better with 0x00 than with 0xff.
1 parent 49d7756 commit d2610ee

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/mame/sinclair/tsconf.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,10 @@ void tsconf_state::machine_reset()
240240

241241
m_keyboard->write(0xff);
242242
while (m_keyboard->read() != 0) { /* invalidate buffer */ }
243+
244+
u16 const *const cram_init = &memregion("cram_init")->as_u16();
245+
for (auto i = 0; i < 0x100; i++)
246+
cram_write16(i << 1, cram_init[i]); // init color RAM
243247
}
244248

245249
void tsconf_state::device_post_load()
@@ -302,7 +306,7 @@ void tsconf_state::tsconf(machine_config &config)
302306
ZXBUS_SLOT(config, "zxbus1", 0, "zxbus", zxbus_cards, nullptr);
303307
//ZXBUS_SLOT(config, "zxbus2", 0, "zxbus", zxbus_cards, nullptr);
304308

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

307311
GLUKRS(config, m_glukrs);
308312

@@ -355,6 +359,9 @@ ROM_START(tsconf)
355359

356360
ROM_SYSTEM_BIOS(1, "v2407", "Update 24.07.28")
357361
ROMX_LOAD("ts-bios.240728.rom", 0, 0x10000, CRC(19f8ad7b) SHA1(9cee82d4a6212686358a50b0fd5a2981b3323ab6), ROM_BIOS(1))
362+
363+
ROM_REGION(0x200, "cram_init", ROMREGION_ERASEFF)
364+
ROM_LOAD( "cram-init.bin", 0, 0x200, CRC(8b96ffb7) SHA1(4dbd22f4312251e922911a01526cbfba77a122fc))
358365
ROM_END
359366

360367
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS

0 commit comments

Comments
 (0)