summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Lord-Nightmare <Lord-Nightmare@users.noreply.github.com>2016-02-08 00:24:11 -0500
committer Lord-Nightmare <Lord-Nightmare@users.noreply.github.com>2016-02-08 00:25:31 -0500
commit0901dacf2f248c288b464d2d44c32684a7fbae9e (patch)
tree60ce0407a8aca7d65292e4961d77b93ffeddcf69
parent6bed300184b19746b5b012bf6a5b49690cb59374 (diff)
Descrambled the ROM on the Xerox Notetaker, and mapped it in the correct areas to make it start to boot. [Lord Nightmare]
-rw-r--r--src/mame/drivers/notetaker.cpp47
1 files changed, 37 insertions, 10 deletions
diff --git a/src/mame/drivers/notetaker.cpp b/src/mame/drivers/notetaker.cpp
index 899f16ad5ea..0780ff3ad3f 100644
--- a/src/mame/drivers/notetaker.cpp
+++ b/src/mame/drivers/notetaker.cpp
@@ -1,16 +1,15 @@
// license:BSD-3-Clause
// copyright-holders:Jonathan Gevaryahu
-/* Xerox Notetaker
+/* Xerox Notetaker, 1978
* Driver by Jonathan Gevaryahu
- * prototype only, one? unit manufactured
+ * prototype only, three? units manufactured (one at CHM, not sure where the other two are)
* This device was the origin of Smalltalk-78
* NO MEDIA for this device has survived, only a ram dump
* see http://bitsavers.informatik.uni-stuttgart.de/pdf/xerox/notetaker
*
- * MISSING DUMP for 8741 I/O MCU
+ * MISSING DUMP for 8741? I/O MCU which does mouse-related stuff
TODO: Pretty much everything.
-* Get the bootrom to do something sane instead of infinite-looping (is the dump good?)
* Get bootrom/ram bankswitching working
* Get the running machine smalltalk-78 memory dump loaded as a rom and forced into ram on startup, since no boot disks have survived
* floppy controller (rather complex and somewhat raw/low level)
@@ -18,7 +17,7 @@ TODO: Pretty much everything.
* pic8259 interrupt controller
* i8251? serial/EIA controller
* 6402 keyboard UART
-* HLE for the missing 8741 which reads the mouse quadratures and buttons
+* HLE for the missing MCU which reads the mouse quadratures and buttons
*/
@@ -39,14 +38,17 @@ public:
//required_device<crt5027_device> m_vtac;
//declarations
+ DECLARE_DRIVER_INIT(notetakr);
//variables
};
static ADDRESS_MAP_START(notetaker_mem, AS_PROGRAM, 16, notetaker_state)
- AM_RANGE(0x00000, 0x01fff) AM_RAM
- AM_RANGE(0xff000, 0xfffff) AM_ROM
+ // AM_RANGE(0x00000, 0x01fff) AM_RAM
+ AM_RANGE(0x00000, 0x00fff) AM_ROM AM_REGION("maincpu", 0xFF000) // I think this copy of rom is actually banked via io reg 0x20, there is ram which lives behind here?
+ // ram lives here?
+ AM_RANGE(0xff000, 0xfffff) AM_ROM // is this banked too?
ADDRESS_MAP_END
// io memory map comes from http://bitsavers.informatik.uni-stuttgart.de/pdf/xerox/notetaker/memos/19790605_Definition_of_8086_Ports.pdf
@@ -92,14 +94,39 @@ static MACHINE_CONFIG_START( notetakr, notetaker_state )
MACHINE_CONFIG_END
+DRIVER_INIT_MEMBER(notetaker_state,notetakr)
+{
+ // descramble the rom; the whole thing is a gigantic scrambled mess probably to ease
+ // interfacing with older xerox technologies which used A0 and D0 as the MSB bits
+ // or maybe because someone screwed up somewhere along the line. we may never know.
+ // see http://bitsavers.informatik.uni-stuttgart.de/pdf/xerox/notetaker/schematics/19790423_Notetaker_IO_Processor.pdf pages 12 and onward
+ UINT16 *romsrc = (UINT16 *)(memregion("maincpuload")->base());
+ UINT16 *romdst = (UINT16 *)(memregion("maincpu")->base());
+ UINT16 *temppointer;
+ UINT16 wordtemp;
+ UINT16 addrtemp;
+ romsrc += 0x7f800; // set the src pointer to 0xff000 (>>1 because 16 bits data)
+ romdst += 0x7f800; // set the dest pointer to 0xff000 (>>1 because 16 bits data)
+ for (int i = 0; i < 0x800; i++)
+ {
+ wordtemp = BITSWAP16(*romsrc, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7);
+ addrtemp = BITSWAP16(i, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
+ temppointer = romdst+(addrtemp&0x7FF);
+ *temppointer = wordtemp;
+ romsrc++;
+ }
+}
+
/* ROM definition */
ROM_START( notetakr )
- ROM_REGION( 0x100000, "maincpu", ROMREGION_ERASEFF )
+ ROM_REGION( 0x100000, "maincpuload", ROMREGION_ERASEFF ) // load roms here before descrambling
ROMX_LOAD( "NTIOLO_EPROM.BIN", 0xff000, 0x0800, CRC(b72aa4c7) SHA1(85dab2399f906c7695dc92e7c18f32e2303c5892), ROM_SKIP(1))
ROMX_LOAD( "NTIOHI_EPROM.BIN", 0xff001, 0x0800, CRC(1119691d) SHA1(4c20b595b554e6f5489ab2c3fb364b4a052f05e3), ROM_SKIP(1))
+ ROM_REGION( 0x100000, "maincpu", ROMREGION_ERASEFF ) // area for descrambled roms
ROM_END
/* Driver */
-/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */
-COMP( 1978, notetakr, 0, 0, notetakr, notetakr, driver_device, 0, "Xerox", "Notetaker", MACHINE_IS_SKELETON)
+/* YEAR NAME PARENT COMPAT MACHINE INPUT STATE INIT COMPANY FULLNAME FLAGS */
+COMP( 1978, notetakr, 0, 0, notetakr, notetakr, notetaker_state, notetakr, "Xerox", "Notetaker", MACHINE_IS_SKELETON)
+//COMP( 1978, notetakr, 0, 0, notetakr, notetakr, driver_device, notetakr, "Xerox", "Notetaker", MACHINE_IS_SKELETON)