geneve: Using bios selection; split genmod as a separate driver

This commit is contained in:
Michael Zapf 2018-06-10 18:14:05 +02:00
parent ae25eeb911
commit 02e37f561f
6 changed files with 604 additions and 844 deletions

File diff suppressed because it is too large Load Diff

View File

@ -32,8 +32,7 @@ enum
enum enum
{ {
GENEVE_098 = 0, GENEVE_EPROM = 0,
GENEVE_100,
GENEVE_PFM512, GENEVE_PFM512,
GENEVE_PFM512A GENEVE_PFM512A
}; };
@ -117,6 +116,7 @@ class geneve_mapper_device : public device_t
{ {
public: public:
geneve_mapper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); geneve_mapper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
void set_geneve_mode(bool geneve); void set_geneve_mode(bool geneve);
void set_direct_mode(bool direct); void set_direct_mode(bool direct);
void set_cartridge_size(int size); void set_cartridge_size(int size);
@ -141,10 +141,11 @@ public:
template <class Object> devcb_base &set_ready_callback(Object &&cb) { return m_ready.set_callback(std::forward<Object>(cb)); } template <class Object> devcb_base &set_ready_callback(Object &&cb) { return m_ready.set_callback(std::forward<Object>(cb)); }
protected: protected:
geneve_mapper_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
void device_start() override; void device_start() override;
void device_reset() override; virtual void device_reset() override;
void common_reset();
private:
// GROM simulation // GROM simulation
bool m_gromwaddr_LSB; bool m_gromwaddr_LSB;
bool m_gromraddr_LSB; bool m_gromraddr_LSB;
@ -154,7 +155,7 @@ private:
// wait states // wait states
void set_wait(int min); void set_wait(int min);
void set_ext_wait(int min); void set_video_waitcount(int min);
bool m_video_waitstates; bool m_video_waitstates;
bool m_extra_waitstates; bool m_extra_waitstates;
bool m_ready_asserted; bool m_ready_asserted;
@ -162,15 +163,6 @@ private:
bool m_read_mode; bool m_read_mode;
bool m_debug_no_ws; bool m_debug_no_ws;
// Mapper function
typedef struct
{
int function;
offs_t offset;
offs_t physaddr;
} decdata;
bool m_geneve_mode; bool m_geneve_mode;
bool m_direct_mode; bool m_direct_mode;
int m_cartridge_size; int m_cartridge_size;
@ -179,22 +171,102 @@ private:
bool m_cartridge7_writable; bool m_cartridge7_writable;
int m_map[8]; int m_map[8];
void decode(address_space& space, offs_t offset, bool read_mode, decdata* dec); /*
Constants for mapper decoding. Naming scheme:
M=Mapper, L=Logical space; P=Physical space
*/
typedef enum
{
MUNDEF=0,
MLVIDEO,
MLMAPPER,
MLKEY,
MLSOUND,
MLCLOCK,
MLGROM,
MPDRAM,
MPEXP,
MPEPROM,
MPSRAM,
MBOX
} decfunct_t;
// Mapper function
typedef struct
{
int function; // must be a fundamental type to be saveable
offs_t offset; // Logical address
offs_t physaddr; // Physical address
int wait; // Wait states
} decdata;
// The result of decoding
decdata m_decoded; decdata m_decoded;
// Genmod modifications // Static decoder entry for the logical space
bool m_turbo; // Not all entries apply for native mode, e.g. there is no GROM in native
bool m_genmod; // mode. In that case the base and mask are 0000, and the entry must be
bool m_timode; // skipped. Speech is accessible in the physical space in native mode.
// All entries have a wait state count of 1.
typedef struct
{
offs_t genbase; // Base address in native mode
int genmask; // Bits that also match this entry
offs_t tibase; // Base address in TI mode
int timask; // Bits that also match this entry
int writeoff; // Additional offset in TI mode for writing
decfunct_t function; // Decoded function
const char* description; // Good for logging
} logentry_t;
logentry_t m_logmap[7] =
{
{ 0xf100, 0x000e, 0x8800, 0x03fe, 0x0400, MLVIDEO, "video" },
{ 0xf110, 0x0007, 0x8000, 0x0007, 0x0000, MLMAPPER, "mapper" },
{ 0xf118, 0x0007, 0x8008, 0x0007, 0x0000, MLKEY, "keyboard" },
{ 0xf120, 0x000e, 0x8400, 0x03fe, 0x0000, MLSOUND, "sound" },
{ 0xf130, 0x000f, 0x8010, 0x000f, 0x0000, MLCLOCK, "clock" },
{ 0x0000, 0x0000, 0x9000, 0x03fe, 0x0400, MBOX, "speech (in P-Box)" },
{ 0x0000, 0x0000, 0x9800, 0x03fe, 0x0400, MLGROM, "GROM" },
};
// Static decoder entry for the physical space
// There are no differences between native mode and TI mode.
typedef struct
{
offs_t base; // Base address
int mask; // Bits that also match this entry
decfunct_t function; // Decoded function
int wait; // Wait states
const char* description; // Good for logging
} physentry_t;
physentry_t m_physmap[4] =
{
{ 0x000000, 0x07ffff, MPDRAM, 1, "DRAM" },
{ 0x080000, 0x07ffff, MPEXP, 1, "on-board expansion" },
{ 0x1e0000, 0x01ffff, MPEPROM, 0, "EPROM" },
{ 0x180000, 0x07ffff, MPSRAM, 0, "SRAM" }
};
void decode_logical(bool reading, decdata* dec);
void map_address(bool reading, decdata* dec);
void decode_physical(decdata* dec);
// This is the hook for Genmod. The normal Geneve just does nothing here.
virtual void decode_mod(decdata* dec) { };
// PFM mod (0 = none, 1 = AT29C040, 2 = AT29C040A) // PFM mod (0 = none, 1 = AT29C040, 2 = AT29C040A)
DECLARE_READ8_MEMBER( read_from_pfm ); DECLARE_READ8_MEMBER( boot_rom );
DECLARE_WRITE8_MEMBER( write_to_pfm ); DECLARE_WRITE8_MEMBER( write_to_pfm );
void set_boot_rom(int selection); int m_boot_rom;
int m_pfm_mode;
int m_pfm_bank; int m_pfm_bank;
bool m_pfm_output_enable; bool m_pfm_output_enable;
int m_pbox_prefix;
// SRAM access // SRAM access
int m_sram_mask; int m_sram_mask;
int m_sram_val; int m_sram_val;
@ -204,7 +276,7 @@ private:
// Counter for the wait states. // Counter for the wait states.
int m_waitcount; int m_waitcount;
int m_ext_waitcount; int m_video_waitcount;
// Devices // Devices
required_device<mm58274c_device> m_clock; required_device<mm58274c_device> m_clock;
@ -221,6 +293,20 @@ private:
required_device<ram_device> m_dram; required_device<ram_device> m_dram;
}; };
class genmod_mapper_device : public geneve_mapper_device
{
public:
genmod_mapper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
void decode_mod(decdata* dec) override;
void device_reset() override;
DECLARE_INPUT_CHANGED_MEMBER( setgm_changed );
private:
// Genmod modifications
bool m_gm_timode;
bool m_turbo;
};
#define MCFG_GENEVE_READY_HANDLER( _intcallb ) \ #define MCFG_GENEVE_READY_HANDLER( _intcallb ) \
devcb = &downcast<bus::ti99::internal::geneve_mapper_device &>(*device).set_ready_callback(DEVCB_##_intcallb); devcb = &downcast<bus::ti99::internal::geneve_mapper_device &>(*device).set_ready_callback(DEVCB_##_intcallb);
@ -228,5 +314,6 @@ private:
DECLARE_DEVICE_TYPE_NS(GENEVE_KEYBOARD, bus::ti99::internal, geneve_keyboard_device) DECLARE_DEVICE_TYPE_NS(GENEVE_KEYBOARD, bus::ti99::internal, geneve_keyboard_device)
DECLARE_DEVICE_TYPE_NS(GENEVE_MAPPER, bus::ti99::internal, geneve_mapper_device) DECLARE_DEVICE_TYPE_NS(GENEVE_MAPPER, bus::ti99::internal, geneve_mapper_device)
DECLARE_DEVICE_TYPE_NS(GENMOD_MAPPER, bus::ti99::internal, genmod_mapper_device)
#endif // MAME_BUS_TI99_INTERNAL_GENBOARD_H #endif // MAME_BUS_TI99_INTERNAL_GENBOARD_H

View File

@ -208,6 +208,9 @@ DEFINE_DEVICE_TYPE_NS(TI99_PERIBOX_SG, bus::ti99::peb, peribox_sg_device, "p
// Peripheral box which hosts the Geneve 9640 in slot 1 // Peripheral box which hosts the Geneve 9640 in slot 1
DEFINE_DEVICE_TYPE_NS(TI99_PERIBOX_GEN, bus::ti99::peb, peribox_gen_device, "peribox_gen", "Peripheral expansion box Geneve") DEFINE_DEVICE_TYPE_NS(TI99_PERIBOX_GEN, bus::ti99::peb, peribox_gen_device, "peribox_gen", "Peripheral expansion box Geneve")
// Peripheral box which hosts the Geneve 9640 in slot 1 with Genmod
DEFINE_DEVICE_TYPE_NS(TI99_PERIBOX_GENMOD, bus::ti99::peb, peribox_genmod_device, "peribox_genmod", "Peripheral expansion box Genmod")
// Single slot of the PEB // Single slot of the PEB
DEFINE_DEVICE_TYPE_NS(TI99_PERIBOX_SLOT, bus::ti99::peb, peribox_slot_device, "peribox_slot", "TI P-Box slot") DEFINE_DEVICE_TYPE_NS(TI99_PERIBOX_SLOT, bus::ti99::peb, peribox_slot_device, "peribox_slot", "TI P-Box slot")
@ -251,6 +254,7 @@ peribox_device::peribox_device(const machine_config &mconfig, const char *tag, d
// The address prefix is actually created by the "Flex cable interface" // The address prefix is actually created by the "Flex cable interface"
// which sits in slot 1. // which sits in slot 1.
m_address_prefix = 0x70000; m_address_prefix = 0x70000;
m_genmod = false;
} }
/* /*
@ -363,23 +367,6 @@ WRITE_LINE_MEMBER(peribox_device::clock_in)
} }
} }
/*
The Genmod modification is only of interest for the Geneve. It requires
to modify the decoding of each single card.
*/
INPUT_CHANGED_MEMBER( peribox_device::genmod_changed )
{
set_genmod(newval==1);
}
void peribox_device::set_genmod(bool set)
{
for (int i=2; i <= 8; i++)
{
if (m_slot[i]!=nullptr) m_slot[i]->set_genmod(set);
}
}
/* /*
The INTA*, INTB*, and READY* lines are connected to each PEB card and are The INTA*, INTB*, and READY* lines are connected to each PEB card and are
pulled up when inactive. If any card asserts the line (pulling down), the pulled up when inactive. If any card asserts the line (pulling down), the
@ -449,6 +436,8 @@ void peribox_device::ready_join(int slot, int state)
void peribox_device::set_slot_loaded(int slot, peribox_slot_device* slotdev) void peribox_device::set_slot_loaded(int slot, peribox_slot_device* slotdev)
{ {
m_slot[slot] = slotdev; m_slot[slot] = slotdev;
if (slotdev != nullptr)
slotdev->set_genmod(m_genmod);
} }
void peribox_device::device_start() void peribox_device::device_start()
@ -521,6 +510,7 @@ peribox_ev_device::peribox_ev_device(const machine_config &mconfig, const char *
: peribox_device(mconfig, TI99_PERIBOX_EV, tag, owner, clock) : peribox_device(mconfig, TI99_PERIBOX_EV, tag, owner, clock)
{ {
m_address_prefix = 0x70000; m_address_prefix = 0x70000;
m_genmod = false;
} }
void peribox_slotv(device_slot_interface &device) void peribox_slotv(device_slot_interface &device)
@ -555,8 +545,8 @@ MACHINE_CONFIG_END
A variant of the box used for the Geneve. A variant of the box used for the Geneve.
*****************************************************************************/ *****************************************************************************/
peribox_gen_device::peribox_gen_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) peribox_gen_device::peribox_gen_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock):
: peribox_device(mconfig, TI99_PERIBOX_GEN, tag, owner, clock) peribox_device(mconfig, type, tag, owner, clock)
{ {
// The Geneve sits in slot 1; there is no prefix here - it can control // The Geneve sits in slot 1; there is no prefix here - it can control
// a maximum address space of 512 KiB in the box. With the Genmod // a maximum address space of 512 KiB in the box. With the Genmod
@ -564,6 +554,18 @@ peribox_gen_device::peribox_gen_device(const machine_config &mconfig, const char
m_address_prefix = 0x00000; m_address_prefix = 0x00000;
} }
peribox_gen_device::peribox_gen_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: peribox_gen_device(mconfig, TI99_PERIBOX_GEN, tag, owner, clock)
{
m_genmod = false;
}
peribox_genmod_device::peribox_genmod_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: peribox_gen_device(mconfig, TI99_PERIBOX_GENMOD, tag, owner, clock)
{
m_genmod = true;
}
// The BwG controller will not run with the Geneve due to its wait state // The BwG controller will not run with the Geneve due to its wait state
// logic (see bwg.c) // logic (see bwg.c)
@ -589,6 +591,16 @@ MACHINE_CONFIG_START(peribox_gen_device::device_add_mconfig)
MCFG_PERIBOX_SLOT_ADD( PEBSLOT8, peribox_slotg ) MCFG_PERIBOX_SLOT_ADD( PEBSLOT8, peribox_slotg )
MACHINE_CONFIG_END MACHINE_CONFIG_END
MACHINE_CONFIG_START(peribox_genmod_device::device_add_mconfig)
MCFG_PERIBOX_SLOT_ADD_DEF( PEBSLOT2, peribox_slotg, "memex" )
MCFG_PERIBOX_SLOT_ADD( PEBSLOT3, peribox_slotv )
MCFG_PERIBOX_SLOT_ADD( PEBSLOT4, peribox_slotv )
MCFG_PERIBOX_SLOT_ADD( PEBSLOT5, peribox_slotv )
MCFG_PERIBOX_SLOT_ADD( PEBSLOT6, peribox_slotv )
MCFG_PERIBOX_SLOT_ADD( PEBSLOT7, peribox_slotv )
MCFG_PERIBOX_SLOT_ADD( PEBSLOT8, peribox_slotv )
MACHINE_CONFIG_END
/**************************************************************************** /****************************************************************************
A variant of the box used for the SGCPU (aka TI-99/4P). A variant of the box used for the SGCPU (aka TI-99/4P).
*****************************************************************************/ *****************************************************************************/
@ -597,6 +609,7 @@ peribox_sg_device::peribox_sg_device(const machine_config &mconfig, const char *
: peribox_device(mconfig, TI99_PERIBOX_SG, tag, owner, clock) : peribox_device(mconfig, TI99_PERIBOX_SG, tag, owner, clock)
{ {
m_address_prefix = 0x70000; m_address_prefix = 0x70000;
m_genmod = false;
} }
void peribox_slotp(device_slot_interface &device) void peribox_slotp(device_slot_interface &device)

View File

@ -58,10 +58,6 @@ public:
// Part of configuration // Part of configuration
void set_prefix(int prefix) { m_address_prefix = prefix; } void set_prefix(int prefix) { m_address_prefix = prefix; }
// Genmod support
DECLARE_INPUT_CHANGED_MEMBER( genmod_changed );
void set_genmod(bool set);
protected: protected:
peribox_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); peribox_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
@ -102,6 +98,9 @@ protected:
// Configured as a slot device (of the ioport) // Configured as a slot device (of the ioport)
bool m_ioport_connected; bool m_ioport_connected;
// Used for Genmod
bool m_genmod;
}; };
/************************************************************************ /************************************************************************
@ -139,12 +138,25 @@ protected:
class peribox_gen_device : public peribox_device class peribox_gen_device : public peribox_device
{ {
public: public:
peribox_gen_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
peribox_gen_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); peribox_gen_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected: protected:
virtual void device_add_mconfig(machine_config &config) override; virtual void device_add_mconfig(machine_config &config) override;
}; };
/*
Variation for Geneve with Genmod
*/
class peribox_genmod_device : public peribox_gen_device
{
public:
peribox_genmod_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
void device_add_mconfig(machine_config &config) override;
};
/***************************************************************************** /*****************************************************************************
The parent class for all expansion cards. The parent class for all expansion cards.
******************************************************************************/ ******************************************************************************/
@ -256,5 +268,6 @@ DECLARE_DEVICE_TYPE_NS(TI99_PERIBOX_EV, bus::ti99::peb, peribox_ev_device)
DECLARE_DEVICE_TYPE_NS(TI99_PERIBOX_SLOT, bus::ti99::peb, peribox_slot_device) DECLARE_DEVICE_TYPE_NS(TI99_PERIBOX_SLOT, bus::ti99::peb, peribox_slot_device)
DECLARE_DEVICE_TYPE_NS(TI99_PERIBOX_SG, bus::ti99::peb, peribox_sg_device) DECLARE_DEVICE_TYPE_NS(TI99_PERIBOX_SG, bus::ti99::peb, peribox_sg_device)
DECLARE_DEVICE_TYPE_NS(TI99_PERIBOX_GEN, bus::ti99::peb, peribox_gen_device) DECLARE_DEVICE_TYPE_NS(TI99_PERIBOX_GEN, bus::ti99::peb, peribox_gen_device)
DECLARE_DEVICE_TYPE_NS(TI99_PERIBOX_GENMOD, bus::ti99::peb, peribox_genmod_device)
#endif // MAME_BUS_TI99_PEB_PERIBOX_H #endif // MAME_BUS_TI99_PEB_PERIBOX_H

View File

@ -178,25 +178,6 @@
Bit 14: 0 = protect cartridge range >7000->7fff Bit 14: 0 = protect cartridge range >7000->7fff
bit 15: 1 = add 1 extra wait state when accessing 0-wait-state SRAM??? bit 15: 1 = add 1 extra wait state when accessing 0-wait-state SRAM???
Keyboard interface:
The XT keyboard interface is described in various places on the internet,
like (http://www-2.cs.cmu.edu/afs/cs/usr/jmcm/www/info/key2.txt). It is a
synchronous unidirectional serial interface: the data line is driven by the
keyboard to send data to the CPU; the CTS/clock line has a pull up resistor
and can be driven low by both keyboard and CPU. To send data to the CPU,
the keyboard pulses the clock line low 9 times, and the Geneve samples all
8 bits of data (plus one start bit) on each falling edge of the clock.
When the key code buffer is full, the Geneve gate array asserts the kbdint*
line (connected to 9901 int8_t*). The Geneve gate array will hold the
CTS/clock line low as long as the keyboard buffer is full or CRU bit @>F78
is 0. Writing a 0 to >F79 will clear the Geneve keyboard buffer, and
writing a 1 will resume normal operation: you need to write a 0 to >F78
before clearing >F79, or the keyboard will be enabled to send data the gate
array when >F79 is is set to 0, and any such incoming data from the
keyboard will be cleared as soon as it is buffered by the gate array.
Original version 2003 by Raphael Nabet Original version 2003 by Raphael Nabet
Rewritten 2012 by Michael Zapf Rewritten 2012 by Michael Zapf
@ -216,11 +197,15 @@
#include "speaker.h" #include "speaker.h"
#define TRACE_READY 0 #define LOG_WARN (1U<<1)
#define TRACE_LINES 0 #define LOG_READY (1U<<2)
#define TRACE_CRU 0 #define LOG_LINES (1U<<3)
#define LOG_CRU (1U<<4)
#define GENMOD 0x01 // Minimum log should be settings and warnings
#define VERBOSE (LOG_GENERAL | LOG_WARN)
#include "logmacro.h"
class geneve_state : public driver_device class geneve_state : public driver_device
{ {
@ -285,7 +270,10 @@ public:
int m_ready_line; int m_ready_line;
int m_ready_line1; int m_ready_line1;
void geneve_60hz(machine_config &config); void geneve_common(machine_config &config);
void geneve(machine_config &config);
void genmod(machine_config &config);
void crumap(address_map &map); void crumap(address_map &map);
void memmap(address_map &map); void memmap(address_map &map);
}; };
@ -316,42 +304,46 @@ void geneve_state::crumap(address_map &map)
map(0x0000, 0x001f).w(m_tms9901, FUNC(tms9901_device::write)); map(0x0000, 0x001f).w(m_tms9901, FUNC(tms9901_device::write));
} }
/* TI joysticks. The keyboard is implemented in genboard.c. */ static INPUT_PORTS_START(geneve_common)
static INPUT_PORTS_START(geneve)
PORT_START( "MODE" )
PORT_CONFNAME( 0x01, 0x00, "Operating mode" ) PORT_CHANGED_MEMBER(TI_PERIBOX_TAG, bus::ti99::peb::peribox_device, genmod_changed, 0)
PORT_CONFSETTING( 0x00, "Standard" )
PORT_CONFSETTING( GENMOD, "GenMod" )
PORT_START( "BOOTROM" ) PORT_START( "BOOTROM" )
PORT_CONFNAME( 0x03, GENEVE_098, "Boot ROM" ) PORT_CHANGED_MEMBER(GENEVE_MAPPER_TAG, bus::ti99::internal::geneve_mapper_device, settings_changed, 3) PORT_CONFNAME( 0x03, GENEVE_EPROM, "Boot from" ) PORT_CHANGED_MEMBER(GENEVE_MAPPER_TAG, bus::ti99::internal::geneve_mapper_device, settings_changed, 3)
PORT_CONFSETTING( GENEVE_098, "Version 0.98" ) PORT_CONFSETTING( GENEVE_EPROM, "EPROM" )
PORT_CONFSETTING( GENEVE_100, "Version 1.00" )
PORT_CONFSETTING( GENEVE_PFM512, "PFM 512" ) PORT_CONFSETTING( GENEVE_PFM512, "PFM 512" )
PORT_CONFSETTING( GENEVE_PFM512A, "PFM 512A" ) PORT_CONFSETTING( GENEVE_PFM512A, "PFM 512A" )
PORT_START( "SRAM" )
PORT_CONFNAME( 0x03, 0x01, "Onboard SRAM" ) PORT_CONDITION( "MODE", 0x01, EQUALS, 0x00 )
PORT_CONFSETTING( 0x00, "32 KiB" )
PORT_CONFSETTING( 0x01, "64 KiB" )
PORT_CONFSETTING( 0x02, "384 KiB" )
PORT_START( "VRAM" ) PORT_START( "VRAM" )
PORT_CONFNAME( 0x01, 0x00, "Video RAM" ) PORT_CONFNAME( 0x01, 0x00, "Video RAM" )
PORT_CONFSETTING( 0x00, "128 KiB" ) PORT_CONFSETTING( 0x00, "128 KiB" )
PORT_CONFSETTING( 0x01, "192 KiB" ) PORT_CONFSETTING( 0x01, "192 KiB" )
INPUT_PORTS_END
static INPUT_PORTS_START(geneve)
PORT_INCLUDE(geneve_common)
PORT_START( "SRAM" )
PORT_CONFNAME( 0x03, 0x01, "Onboard SRAM" )
PORT_CONFSETTING( 0x00, "32 KiB" )
PORT_CONFSETTING( 0x01, "64 KiB" )
PORT_CONFSETTING( 0x02, "384 KiB" )
INPUT_PORTS_END
static INPUT_PORTS_START(genmod)
PORT_INCLUDE(geneve_common)
PORT_START( "GENMODDIPS" ) PORT_START( "GENMODDIPS" )
PORT_DIPNAME( GENEVE_GM_TURBO, 0x00, "Genmod Turbo mode") PORT_CONDITION( "MODE", 0x01, EQUALS, GENMOD ) PORT_CHANGED_MEMBER(GENEVE_MAPPER_TAG, bus::ti99::internal::geneve_mapper_device, settings_changed, 1) PORT_DIPNAME( GENEVE_GM_TURBO, 0x00, "Genmod Turbo mode") PORT_CHANGED_MEMBER(GENEVE_MAPPER_TAG, bus::ti99::internal::genmod_mapper_device, setgm_changed, 1)
PORT_CONFSETTING( 0x00, DEF_STR( Off )) PORT_CONFSETTING( 0x00, DEF_STR( Off ))
PORT_CONFSETTING( GENEVE_GM_TURBO, DEF_STR( On )) PORT_CONFSETTING( GENEVE_GM_TURBO, DEF_STR( On ))
PORT_DIPNAME( GENEVE_GM_TIM, GENEVE_GM_TIM, "Genmod TI mode") PORT_CONDITION( "MODE", 0x01, EQUALS, GENMOD ) PORT_CHANGED_MEMBER(GENEVE_MAPPER_TAG, bus::ti99::internal::geneve_mapper_device, settings_changed, 2) PORT_DIPNAME( GENEVE_GM_TIM, GENEVE_GM_TIM, "Genmod TI mode") PORT_CHANGED_MEMBER(GENEVE_MAPPER_TAG, bus::ti99::internal::genmod_mapper_device, setgm_changed, 2)
PORT_CONFSETTING( 0x00, DEF_STR( Off )) PORT_CONFSETTING( 0x00, DEF_STR( Off ))
PORT_CONFSETTING( GENEVE_GM_TIM, DEF_STR( On )) PORT_CONFSETTING( GENEVE_GM_TIM, DEF_STR( On ))
INPUT_PORTS_END INPUT_PORTS_END
/**************************************************************************** /****************************************************************************
CRU handling CRU handling
*****************************************************************************/ *****************************************************************************/
@ -368,10 +360,11 @@ WRITE8_MEMBER ( geneve_state::cruwrite )
if ((addroff & 0xffc0) == CRU_SSTEP_BASE) if ((addroff & 0xffc0) == CRU_SSTEP_BASE)
{ {
int bit = (addroff & 0x003e)>>1; int bit = (addroff & 0x003e)>>1;
logerror("Single step not implemented; bit %d set to %d\n", bit, data); LOGMASKED(LOG_WARN, "Single step not implemented; bit %d set to %d\n", bit, data);
return; return;
} }
// This is just mirroring the internal flags of the 9995
if ((addroff & 0xffe0) == CRU_CONTROL_BASE) if ((addroff & 0xffe0) == CRU_CONTROL_BASE)
{ {
int bit = (addroff & 0x001e)>>1; int bit = (addroff & 0x001e)>>1;
@ -379,47 +372,47 @@ WRITE8_MEMBER ( geneve_state::cruwrite )
{ {
case 5: case 5:
// No one really cares... // No one really cares...
if (TRACE_CRU) logerror("Set PAL flag = %02x\n", data); LOGMASKED(LOG_CRU, "Set PAL flag = %02x\n", data);
// m_palvideo = (data!=0); // m_palvideo = (data!=0);
break; break;
case 7: case 7:
// m_capslock = (data!=0); // m_capslock = (data!=0);
if (TRACE_CRU) logerror("Set capslock flag = %02x\n", data); LOGMASKED(LOG_CRU, "Set capslock flag = %02x\n", data);
break; break;
case 8: case 8:
if (TRACE_CRU) logerror("Set keyboard clock flag = %02x\n", data); LOGMASKED(LOG_CRU, "Set keyboard clock flag = %02x\n", data);
m_keyboard->clock_control((data!=0)? ASSERT_LINE : CLEAR_LINE); m_keyboard->clock_control((data!=0)? ASSERT_LINE : CLEAR_LINE);
break; break;
case 9: case 9:
if (TRACE_CRU) logerror("Set keyboard scan flag = %02x\n", data); LOGMASKED(LOG_CRU, "Set keyboard scan flag = %02x\n", data);
m_keyboard->send_scancodes((data!=0)? ASSERT_LINE : CLEAR_LINE); m_keyboard->send_scancodes((data!=0)? ASSERT_LINE : CLEAR_LINE);
break; break;
case 10: case 10:
if (TRACE_CRU) logerror("Geneve mode = %02x\n", data); LOGMASKED(LOG_CRU, "Geneve mode = %02x\n", data);
m_mapper->set_geneve_mode(data!=0); m_mapper->set_geneve_mode(data!=0);
break; break;
case 11: case 11:
if (TRACE_CRU) logerror("Direct mode = %02x\n", data); LOGMASKED(LOG_CRU, "Direct mode = %02x\n", data);
m_mapper->set_direct_mode(data!=0); m_mapper->set_direct_mode(data!=0);
break; break;
case 12: case 12:
if (TRACE_CRU) logerror("Cartridge size 8K = %02x\n", data); LOGMASKED(LOG_CRU, "Cartridge size 8K = %02x\n", data);
m_mapper->set_cartridge_size((data!=0)? 0x2000 : 0x4000); m_mapper->set_cartridge_size((data!=0)? 0x2000 : 0x4000);
break; break;
case 13: case 13:
if (TRACE_CRU) logerror("Cartridge writable 6000 = %02x\n", data); LOGMASKED(LOG_CRU, "Cartridge writable 6000 = %02x\n", data);
m_mapper->set_cartridge_writable(0x6000, (data!=0)); m_mapper->set_cartridge_writable(0x6000, (data!=0));
break; break;
case 14: case 14:
if (TRACE_CRU) logerror("Cartridge writable 7000 = %02x\n", data); LOGMASKED(LOG_CRU, "Cartridge writable 7000 = %02x\n", data);
m_mapper->set_cartridge_writable(0x7000, (data!=0)); m_mapper->set_cartridge_writable(0x7000, (data!=0));
break; break;
case 15: case 15:
if (TRACE_CRU) logerror("Extra wait states = %02x\n", data==0); LOGMASKED(LOG_CRU, "Extra wait states = %02x\n", data==0);
m_mapper->set_extra_waitstates(data==0); // let's use the inverse semantics m_mapper->set_extra_waitstates(data==0); // let's use the inverse semantics
break; break;
default: default:
logerror("set CRU address %04x=%02x ignored\n", addroff, data); LOGMASKED(LOG_WARN, "set CRU address %04x=%02x ignored\n", addroff, data);
break; break;
} }
} }
@ -439,7 +432,7 @@ READ8_MEMBER( geneve_state::cruread )
if ((addroff & 0xffc0) == CRU_SSTEP_BASE) if ((addroff & 0xffc0) == CRU_SSTEP_BASE)
{ {
int bit = (addroff & 0x003e)>>1; int bit = (addroff & 0x003e)>>1;
logerror("Single step not implemented; attempting to read bit %d\n", bit); LOGMASKED(LOG_WARN, "Single step not implemented; attempting to read bit %d\n", bit);
return value; return value;
} }
@ -491,7 +484,7 @@ READ8_MEMBER( geneve_state::read_by_9901 )
if (m_intb==CLEAR_LINE) answer |= 0x10; if (m_intb==CLEAR_LINE) answer |= 0x10;
if (m_video_wait==ASSERT_LINE) answer |= 0x20; if (m_video_wait==ASSERT_LINE) answer |= 0x20;
// TODO: PAL pin 5 // TODO: PAL pin 5
if (TRACE_LINES) logerror("INT15-8 = %02x\n", answer); LOGMASKED(LOG_LINES, "INT15-8 = %02x\n", answer);
break; break;
case tms9901_device::P0_P7: case tms9901_device::P0_P7:
@ -519,7 +512,7 @@ READ8_MEMBER( geneve_state::read_by_9901 )
*/ */
WRITE_LINE_MEMBER( geneve_state::peripheral_bus_reset ) WRITE_LINE_MEMBER( geneve_state::peripheral_bus_reset )
{ {
logerror("Peripheral bus reset request; not implemented yet.\n"); LOGMASKED(LOG_WARN, "Peripheral bus reset request; not implemented yet.\n");
} }
/* /*
@ -527,7 +520,7 @@ WRITE_LINE_MEMBER( geneve_state::peripheral_bus_reset )
*/ */
WRITE_LINE_MEMBER( geneve_state::VDP_reset ) WRITE_LINE_MEMBER( geneve_state::VDP_reset )
{ {
logerror("Video reset request; not implemented yet.\n"); LOGMASKED(LOG_WARN, "Video reset request; not implemented yet.\n");
} }
/* /*
@ -543,7 +536,7 @@ WRITE_LINE_MEMBER( geneve_state::joystick_select )
*/ */
WRITE_LINE_MEMBER( geneve_state::extbus_wait_states ) WRITE_LINE_MEMBER( geneve_state::extbus_wait_states )
{ {
logerror("External bus wait states set to %d, not implemented yet.\n", state); LOGMASKED(LOG_WARN, "External bus wait states set to %d, not implemented yet.\n", state);
} }
/* /*
@ -552,7 +545,7 @@ WRITE_LINE_MEMBER( geneve_state::extbus_wait_states )
*/ */
WRITE_LINE_MEMBER( geneve_state::video_wait_states ) WRITE_LINE_MEMBER( geneve_state::video_wait_states )
{ {
if (TRACE_LINES) logerror("Video wait states set to %d\n", state); LOGMASKED(LOG_LINES, "Video wait states set to %d\n", state);
m_mapper->set_video_waitstates(state==ASSERT_LINE); m_mapper->set_video_waitstates(state==ASSERT_LINE);
m_video_wait = (state!=0)? ASSERT_LINE : CLEAR_LINE; m_video_wait = (state!=0)? ASSERT_LINE : CLEAR_LINE;
} }
@ -594,14 +587,14 @@ WRITE_LINE_MEMBER( geneve_state::intb )
WRITE_LINE_MEMBER( geneve_state::ext_ready ) WRITE_LINE_MEMBER( geneve_state::ext_ready )
{ {
if (TRACE_READY) logerror("READY level (ext) = %02x\n", state); LOGMASKED(LOG_READY, "READY level (ext) = %02x\n", state);
m_ready_line = state; m_ready_line = state;
m_cpu->ready_line((m_ready_line == ASSERT_LINE && m_ready_line1 == ASSERT_LINE)? ASSERT_LINE : CLEAR_LINE); m_cpu->ready_line((m_ready_line == ASSERT_LINE && m_ready_line1 == ASSERT_LINE)? ASSERT_LINE : CLEAR_LINE);
} }
WRITE_LINE_MEMBER( geneve_state::mapper_ready ) WRITE_LINE_MEMBER( geneve_state::mapper_ready )
{ {
if (TRACE_READY) logerror("READY level (mapper) = %02x\n", state); LOGMASKED(LOG_READY, "READY level (mapper) = %02x\n", state);
m_ready_line1 = state; m_ready_line1 = state;
m_cpu->ready_line((m_ready_line == ASSERT_LINE && m_ready_line1 == ASSERT_LINE)? ASSERT_LINE : CLEAR_LINE); m_cpu->ready_line((m_ready_line == ASSERT_LINE && m_ready_line1 == ASSERT_LINE)? ASSERT_LINE : CLEAR_LINE);
} }
@ -636,7 +629,8 @@ WRITE_LINE_MEMBER( geneve_state::keyboard_interrupt )
WRITE8_MEMBER( geneve_state::external_operation ) WRITE8_MEMBER( geneve_state::external_operation )
{ {
static const char* extop[8] = { "inv1", "inv2", "IDLE", "RSET", "inv3", "CKON", "CKOF", "LREX" }; static const char* extop[8] = { "inv1", "inv2", "IDLE", "RSET", "inv3", "CKON", "CKOF", "LREX" };
if (offset != IDLE_OP) logerror("External operation %s not implemented on Geneve board\n", extop[offset]); if (offset != IDLE_OP)
LOGMASKED(LOG_WARN, "External operation %s not implemented on Geneve board\n", extop[offset]);
} }
/* /*
@ -688,12 +682,35 @@ void geneve_state::machine_reset()
m_ready_line = m_ready_line1 = ASSERT_LINE; m_ready_line = m_ready_line1 = ASSERT_LINE;
m_peribox->set_genmod(ioport("MODE")->read()==GENMOD);
m_joyport->write_port(0x01); // select Joystick 1 m_joyport->write_port(0x01); // select Joystick 1
} }
MACHINE_CONFIG_START(geneve_state::geneve_60hz) MACHINE_CONFIG_START(geneve_state::geneve)
geneve_common(config);
// Mapper
MCFG_DEVICE_ADD(GENEVE_MAPPER_TAG, GENEVE_MAPPER, 0)
MCFG_GENEVE_READY_HANDLER( WRITELINE(*this, geneve_state, mapper_ready) )
// Peripheral expansion box (Geneve composition)
MCFG_DEVICE_ADD( TI_PERIBOX_TAG, TI99_PERIBOX_GEN, 0)
MCFG_PERIBOX_INTA_HANDLER( WRITELINE(*this, geneve_state, inta) )
MCFG_PERIBOX_INTB_HANDLER( WRITELINE(*this, geneve_state, intb) )
MCFG_PERIBOX_READY_HANDLER( WRITELINE(*this, geneve_state, ext_ready) )
MACHINE_CONFIG_END
MACHINE_CONFIG_START(geneve_state::genmod)
geneve_common(config);
// Mapper
MCFG_DEVICE_ADD(GENEVE_MAPPER_TAG, GENMOD_MAPPER, 0)
MCFG_GENEVE_READY_HANDLER( WRITELINE(*this, geneve_state, mapper_ready) )
// Peripheral expansion box (Geneve composition with Genmod and plugged-in Memex)
MCFG_DEVICE_ADD( TI_PERIBOX_TAG, TI99_PERIBOX_GENMOD, 0)
MCFG_PERIBOX_INTA_HANDLER( WRITELINE(*this, geneve_state, inta) )
MCFG_PERIBOX_INTB_HANDLER( WRITELINE(*this, geneve_state, intb) )
MCFG_PERIBOX_READY_HANDLER( WRITELINE(*this, geneve_state, ext_ready) )
MACHINE_CONFIG_END
MACHINE_CONFIG_START(geneve_state::geneve_common)
// basic machine hardware // basic machine hardware
// TMS9995 CPU @ 12.0 MHz // TMS9995 CPU @ 12.0 MHz
MCFG_TMS99xx_ADD("maincpu", TMS9995, 12000000, memmap, crumap) MCFG_TMS99xx_ADD("maincpu", TMS9995, 12000000, memmap, crumap)
@ -720,21 +737,11 @@ MACHINE_CONFIG_START(geneve_state::geneve_60hz)
MCFG_TMS9901_P13_HANDLER( WRITELINE( GENEVE_MAPPER_TAG, bus::ti99::internal::geneve_mapper_device, pfm_select_msb) ) // new for PFM MCFG_TMS9901_P13_HANDLER( WRITELINE( GENEVE_MAPPER_TAG, bus::ti99::internal::geneve_mapper_device, pfm_select_msb) ) // new for PFM
MCFG_TMS9901_INTLEVEL_HANDLER( WRITE8( *this, geneve_state, tms9901_interrupt) ) MCFG_TMS9901_INTLEVEL_HANDLER( WRITE8( *this, geneve_state, tms9901_interrupt) )
// Mapper
MCFG_DEVICE_ADD(GENEVE_MAPPER_TAG, GENEVE_MAPPER, 0)
MCFG_GENEVE_READY_HANDLER( WRITELINE(*this, geneve_state, mapper_ready) )
// Clock // Clock
MCFG_DEVICE_ADD(GENEVE_CLOCK_TAG, MM58274C, 0) MCFG_DEVICE_ADD(GENEVE_CLOCK_TAG, MM58274C, 0)
MCFG_MM58274C_MODE24(1) // 24 hour MCFG_MM58274C_MODE24(1) // 24 hour
MCFG_MM58274C_DAY1(0) // sunday MCFG_MM58274C_DAY1(0) // sunday
// Peripheral expansion box (Geneve composition)
MCFG_DEVICE_ADD( TI_PERIBOX_TAG, TI99_PERIBOX_GEN, 0)
MCFG_PERIBOX_INTA_HANDLER( WRITELINE(*this, geneve_state, inta) )
MCFG_PERIBOX_INTB_HANDLER( WRITELINE(*this, geneve_state, intb) )
MCFG_PERIBOX_READY_HANDLER( WRITELINE(*this, geneve_state, ext_ready) )
// Sound hardware // Sound hardware
SPEAKER(config, "sound_out").front_center(); SPEAKER(config, "sound_out").front_center();
MCFG_DEVICE_ADD(TI_SOUNDCHIP_TAG, SN76496, 3579545) /* 3.579545 MHz */ MCFG_DEVICE_ADD(TI_SOUNDCHIP_TAG, SN76496, 3579545) /* 3.579545 MHz */
@ -756,7 +763,7 @@ MACHINE_CONFIG_START(geneve_state::geneve_60hz)
MCFG_RAM_DEFAULT_SIZE("512K") MCFG_RAM_DEFAULT_SIZE("512K")
MCFG_RAM_DEFAULT_VALUE(0) MCFG_RAM_DEFAULT_VALUE(0)
// SRAM 384K (max; stock Geneve: 32K) // SRAM 384K (max; stock Geneve: 32K, but later MDOS releases require 64K)
MCFG_RAM_ADD(GENEVE_SRAM_TAG) MCFG_RAM_ADD(GENEVE_SRAM_TAG)
MCFG_RAM_DEFAULT_SIZE("384K") MCFG_RAM_DEFAULT_SIZE("384K")
MCFG_RAM_DEFAULT_VALUE(0) MCFG_RAM_DEFAULT_VALUE(0)
@ -769,11 +776,20 @@ MACHINE_CONFIG_END
ROM_START(geneve) ROM_START(geneve)
/*CPU memory space*/ /*CPU memory space*/
ROM_REGION(0xc000, "maincpu", 0) ROM_REGION(0x4000, "maincpu", 0)
ROM_LOAD("genbt100.bin", 0x0000, 0x4000, CRC(8001e386) SHA1(b44618b54dabac3882543e18555d482b299e0109)) /* CPU ROMs v1.0 */ ROM_DEFAULT_BIOS("0.98")
ROM_LOAD_OPTIONAL("genbt098.bin", 0x4000, 0x4000, CRC(b2e20df9) SHA1(2d5d09177afe97d63ceb3ad59b498b1c9e2153f7)) /* CPU ROMs v0.98 */ ROM_SYSTEM_BIOS(0, "0.98", "Geneve Boot ROM 0.98")
ROM_LOAD_OPTIONAL("gnmbt100.bin", 0x8000, 0x4000, CRC(19b89479) SHA1(6ef297eda78dc705946f6494e9d7e95e5216ec47)) /* CPU ROMs GenMod */ ROMX_LOAD("genbt098.bin", 0x0000, 0x4000, CRC(b2e20df9) SHA1(2d5d09177afe97d63ceb3ad59b498b1c9e2153f7), ROM_BIOS(0))
ROM_SYSTEM_BIOS(1, "1.00", "Geneve Boot ROM 1.00")
ROMX_LOAD("genbt100.bin", 0x0000, 0x4000, CRC(8001e386) SHA1(b44618b54dabac3882543e18555d482b299e0109), ROM_BIOS(1))
ROM_END
ROM_START(genmod)
/*CPU memory space*/
ROM_REGION(0x4000, "maincpu", 0)
ROM_LOAD("gnmbt100.bin", 0x0000, 0x4000, CRC(19b89479) SHA1(6ef297eda78dc705946f6494e9d7e95e5216ec47))
ROM_END ROM_END
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
COMP( 1987, geneve, 0, 0, geneve_60hz, geneve, geneve_state, init_geneve, "Myarc", "Geneve 9640", MACHINE_SUPPORTS_SAVE) COMP( 1987, geneve, 0, 0, geneve, geneve, geneve_state, init_geneve, "Myarc", "Geneve 9640", MACHINE_SUPPORTS_SAVE)
COMP( 1990, genmod, 0, 0, genmod, genmod, geneve_state, init_geneve, "Myarc / Ron G. Walters", "Geneve 9640 Mod", MACHINE_SUPPORTS_SAVE)

View File

@ -13836,7 +13836,8 @@ suprpokra // (c) 1986 Grayhound Electronics
suprpokrb // (c) 1986 Grayhound Electronics suprpokrb // (c) 1986 Grayhound Electronics
@source:geneve.cpp @source:geneve.cpp
geneve // 1987? Myarc Geneve 9640 geneve // 1987 Myarc Geneve 9640
genmod // 1990 Myarc / Ron G. Walters Geneve 9640 Mod
@source:geniusiq.cpp @source:geniusiq.cpp
iq128 // 1997 Genius IQ 128 (Germany) iq128 // 1997 Genius IQ 128 (Germany)