mirror of
https://github.com/holub/mame
synced 2025-10-04 16:34:53 +03:00
(MESS) Apple II updates:
- Added additional ROMs for TK3000 - Added preliminary mono/color config switch for pre-IIgs machines (doesn't yet work in lo-res) - Moved Laser 3000 to its own driver since it's not very Apple-like and got it to boot into BASIC.
This commit is contained in:
parent
1174fbc4ba
commit
66ba3beecf
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -8127,6 +8127,7 @@ src/mess/drivers/konin.c svneol=native#text/plain
|
||||
src/mess/drivers/korgm1.c svneol=native#text/plain
|
||||
src/mess/drivers/kramermc.c svneol=native#text/plain
|
||||
src/mess/drivers/kyocera.c svneol=native#text/plain
|
||||
src/mess/drivers/laser3k.c svneol=native#text/plain
|
||||
src/mess/drivers/lc80.c svneol=native#text/plain
|
||||
src/mess/drivers/lcmate2.c svneol=native#text/plain
|
||||
src/mess/drivers/lft.c svneol=native#text/plain
|
||||
|
@ -177,7 +177,14 @@ UniDisk 3.5 drive!)
|
||||
The external drive port supports not only 5.25 drives but also UniDisk and
|
||||
Apple 3.5 drives, allowing via daisy-chaining any combination of UniDisk,
|
||||
Apple 3.5 and Apple 5.25 drives - up to three devices
|
||||
|
||||
|
||||
----------------------------------
|
||||
|
||||
TK3000 keyboard matrix
|
||||
|
||||
Data bus D0-D7 is X0-X7
|
||||
Address bus A0-A11 is Y0-Y11
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
@ -186,6 +193,7 @@ Apple 3.5 and Apple 5.25 drives - up to three devices
|
||||
#include "imagedev/cassette.h"
|
||||
#include "formats/ap2_dsk.h"
|
||||
#include "includes/apple2.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
|
||||
#include "bus/a2bus/a2bus.h"
|
||||
#include "bus/a2bus/a2lang.h"
|
||||
@ -253,6 +261,24 @@ static ADDRESS_MAP_START( apple2_map, AS_PROGRAM, 8, apple2_state )
|
||||
/* nothing in the address map - everything is added dynamically */
|
||||
ADDRESS_MAP_END
|
||||
|
||||
/*
|
||||
|
||||
LS259 at H12
|
||||
|
||||
A8 = D
|
||||
A9 = A
|
||||
A10 = B
|
||||
A11 = C
|
||||
|
||||
374/259 outputs to 65C02 c000/c010 selected by Z80 WR OR Z80 IORQ? (schematic is not super legible)
|
||||
|
||||
*/
|
||||
|
||||
// RAM and ROM alternate in 8K blocks: ROM at 0/4/8/c, RAM at 2/6/a/e (RAM is only 1k and further mirrors inside those locations)
|
||||
static ADDRESS_MAP_START( tk3000_kbd_map, AS_PROGRAM, 8, apple2_state )
|
||||
AM_RANGE(0x0000, 0x1fff) AM_ROM AM_MIRROR(0xc000) AM_REGION("kbdcpu", 0)
|
||||
AM_RANGE(0x2000, 0x3fff) AM_RAM AM_MIRROR(0xcc00) AM_MASK(0x3ff)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
@ -341,6 +367,15 @@ static INPUT_PORTS_START( apple2_gameport )
|
||||
//PORT_INCLUDE( apple2_paddle )
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( apple2_sysconfig )
|
||||
PORT_START("a2_config")
|
||||
PORT_CONFNAME(0x03, 0x00, "Composite monitor type")
|
||||
PORT_CONFSETTING(0x00, "Color")
|
||||
PORT_CONFSETTING(0x01, "B&W")
|
||||
PORT_CONFSETTING(0x02, "Green")
|
||||
PORT_CONFSETTING(0x03, "Amber")
|
||||
INPUT_PORTS_END
|
||||
|
||||
/*
|
||||
Apple II / II Plus key matrix (from "The Apple II Circuit Description")
|
||||
|
||||
@ -534,6 +569,8 @@ static INPUT_PORTS_START( apple2 )
|
||||
|
||||
/* other devices */
|
||||
PORT_INCLUDE( apple2_gameport )
|
||||
|
||||
PORT_INCLUDE(apple2_sysconfig)
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( apple2p )
|
||||
@ -662,6 +699,8 @@ static INPUT_PORTS_START( apple2e_common )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Open Apple") PORT_CODE(KEYCODE_LALT)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Solid Apple") PORT_CODE(KEYCODE_RALT)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RESET") PORT_CODE(KEYCODE_F12)
|
||||
|
||||
PORT_INCLUDE(apple2_sysconfig)
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( apple2e )
|
||||
@ -788,6 +827,7 @@ static INPUT_PORTS_START( apple2euk )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RESET") PORT_CODE(KEYCODE_F12)
|
||||
|
||||
PORT_INCLUDE( apple2_gameport )
|
||||
PORT_INCLUDE(apple2_sysconfig)
|
||||
INPUT_PORTS_END
|
||||
|
||||
INPUT_PORTS_START( apple2ep )
|
||||
@ -909,6 +949,7 @@ INPUT_PORTS_START( apple2ep )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RESET") PORT_CODE(KEYCODE_F12)
|
||||
|
||||
PORT_INCLUDE( apple2_gameport )
|
||||
PORT_INCLUDE(apple2_sysconfig)
|
||||
INPUT_PORTS_END
|
||||
|
||||
/* according to Steve Nickolas (author of Dapple), our original palette would
|
||||
@ -1145,6 +1186,13 @@ static MACHINE_CONFIG_DERIVED( apple2ee, apple2e )
|
||||
MCFG_CPU_REPLACE("maincpu", M65C02, 1021800) /* close to actual CPU frequency of 1.020484 MHz */
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( tk3000, apple2e )
|
||||
MCFG_CPU_REPLACE("maincpu", M65C02, 1021800) /* close to actual CPU frequency of 1.020484 MHz */
|
||||
|
||||
MCFG_CPU_ADD("subcpu", Z80, 1021800) // schematics are illegible on where the clock comes from, but it *seems* to be the same as the 65C02 clock
|
||||
MCFG_CPU_PROGRAM_MAP(tk3000_kbd_map)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( apple2ep, apple2e )
|
||||
MCFG_CPU_REPLACE("maincpu", M65C02, 1021800) /* close to actual CPU frequency of 1.020484 MHz */
|
||||
MACHINE_CONFIG_END
|
||||
@ -1194,6 +1242,9 @@ MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( apple2cp, apple2c )
|
||||
MCFG_MACHINE_START_OVERRIDE(apple2_state,apple2cp)
|
||||
|
||||
MCFG_A2BUS_SLOT_REMOVE("sl6")
|
||||
MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl6", A2BUS_IWM_FDC, NULL)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( apple2c_iwm, apple2c )
|
||||
@ -1212,7 +1263,7 @@ static MACHINE_CONFIG_DERIVED( laser128, apple2c )
|
||||
MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl3", A2BUS_LASER128, NULL)
|
||||
MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl4", A2BUS_LASER128, NULL)
|
||||
MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl5", A2BUS_LASER128, NULL)
|
||||
MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl6", A2BUS_IWM_FDC, NULL) // slots 6 and 7 are hacks for now
|
||||
MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl6", A2BUS_LASER128, NULL)
|
||||
// MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl7", A2BUS_LASER128, NULL)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
@ -1459,16 +1510,18 @@ ROM_START(tk2000)
|
||||
ROM_LOAD( "342-0132-c.e12", 0x000, 0x800, BAD_DUMP CRC(e47045f4) SHA1(12a2e718f5f4acd69b6c33a45a4a940b1440a481) ) // probably not this machine's actual ROM
|
||||
ROM_END
|
||||
|
||||
// unlike the very unique TK2000, the TK3000 is a stock enhanced IIe clone
|
||||
// unlike the very unique TK2000, the TK3000 is a mostly stock enhanced IIe clone
|
||||
ROM_START(tk3000)
|
||||
ROM_REGION(0x2000,"gfx1",0)
|
||||
ROM_LOAD ( "341-0265-a.chr", 0x0000, 0x1000,CRC(2651014d) SHA1(b2b5d87f52693817fc747df087a4aa1ddcdb1f10))
|
||||
ROM_LOAD ( "341-0265-a.chr", 0x1000, 0x1000,CRC(2651014d) SHA1(b2b5d87f52693817fc747df087a4aa1ddcdb1f10))
|
||||
ROM_LOAD( "tk3000.f7", 0x000000, 0x002000, CRC(70157693) SHA1(a7922e2137f95271011042441d80466fba7bb828) )
|
||||
|
||||
ROM_REGION(0x4000,"maincpu",0)
|
||||
ROM_LOAD( "tk3000e.rom", 0x000000, 0x004000, CRC(5b1e8ab2) SHA1(f163e5753c18ff0e812a448e8da406f102600edf) )
|
||||
ROM_LOAD( "tk3000.f4f6", 0x000000, 0x004000, CRC(5b1e8ab2) SHA1(f163e5753c18ff0e812a448e8da406f102600edf) )
|
||||
|
||||
ROM_REGION( 0x800, "keyboard", ROMREGION_ERASE00 )
|
||||
ROM_REGION(0x2000, "kbdcpu", 0)
|
||||
ROM_LOAD( "tk3000.e13", 0x000000, 0x002000, CRC(f9b860d3) SHA1(6a127f1458f43a00199d3dde94569b8928f05a53) )
|
||||
|
||||
ROM_REGION(0x800, "keyboard", ROMREGION_ERASE00)
|
||||
ROM_LOAD( "342-0132-c.e12", 0x000, 0x800, BAD_DUMP CRC(e47045f4) SHA1(12a2e718f5f4acd69b6c33a45a4a940b1440a481) ) // probably not this machine's actual ROM
|
||||
ROM_END
|
||||
|
||||
@ -1523,16 +1576,6 @@ ROM_START(apple2c4)
|
||||
ROM_LOAD( "342-0132-c.e12", 0x000, 0x800, CRC(e47045f4) SHA1(12a2e718f5f4acd69b6c33a45a4a940b1440a481) ) // 1983 US-Dvorak
|
||||
ROM_END
|
||||
|
||||
ROM_START(las3000)
|
||||
ROM_REGION(0x0800,"gfx1",0)
|
||||
ROM_LOAD ( "341-0036.chr", 0x0000, 0x0800, CRC(64f415c6) SHA1(f9d312f128c9557d9d6ac03bfad6c3ddf83e5659))
|
||||
|
||||
ROM_REGION(0x8700,"maincpu",0)
|
||||
ROM_LOAD ( "las3000.rom", 0x4000, 0x4000, CRC(9C7AEB09) SHA1(3302ADF41E258CF50210C19736948C8FA65E91DE))
|
||||
ROM_CONTINUE(0x0000, 0x4000)
|
||||
ROM_LOAD ( "l3kdisk.rom", 0x8500, 0x0100, CRC(2D4B1584) SHA1(989780B77E100598124DF7B72663E5A31A3339C0))
|
||||
ROM_END
|
||||
|
||||
ROM_START(laser128)
|
||||
ROM_REGION(0x2000,"gfx1",0)
|
||||
ROM_LOAD ( "341-0265-a.chr", 0x0000, 0x1000, BAD_DUMP CRC(2651014d) SHA1(b2b5d87f52693817fc747df087a4aa1ddcdb1f10)) // need to dump real laser rom
|
||||
@ -1661,9 +1704,8 @@ COMP( 1985, apple2eeuk,apple2e, 0, apple2ee, apple2euk, driver_device,
|
||||
COMP( 1987, apple2ep, apple2e, 0, apple2ep, apple2ep, driver_device, 0, "Apple Computer", "Apple //e (Platinum)", GAME_SUPPORTS_SAVE )
|
||||
COMP( 1984, apple2c, 0, apple2, apple2c, apple2e, driver_device, 0, "Apple Computer", "Apple //c" , GAME_SUPPORTS_SAVE )
|
||||
COMP( 1984, tk2000, apple2c, 0, tk2000, apple2e, driver_device, 0, "Microdigital", "TK2000" , GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
|
||||
COMP( 1986, tk3000, apple2c, 0, apple2ee, apple2e, driver_device, 0, "Microdigital", "TK3000//e" , GAME_SUPPORTS_SAVE )
|
||||
COMP( 1986, tk3000, apple2c, 0, tk3000, apple2e, driver_device, 0, "Microdigital", "TK3000//e" , GAME_SUPPORTS_SAVE )
|
||||
COMP( 1989, prav8c, apple2c, 0, apple2c, apple2e, driver_device, 0, "Pravetz", "Pravetz 8C", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
|
||||
COMP( 1983, las3000, apple2, 0, apple2p, apple2p, driver_device, 0, "Video Technology", "Laser 3000", GAME_NOT_WORKING )
|
||||
COMP( 1987, laser128, apple2c, 0, laser128, apple2e, driver_device, 0, "Video Technology", "Laser 128 (version 4.2)", GAME_NOT_WORKING )
|
||||
COMP( 1988, las128ex, apple2c, 0, laser128, apple2e, driver_device, 0, "Video Technology", "Laser 128ex (version 4.5)", GAME_NOT_WORKING )
|
||||
// TODO: add laser128ex2
|
||||
|
563
src/mess/drivers/laser3k.c
Normal file
563
src/mess/drivers/laser3k.c
Normal file
@ -0,0 +1,563 @@
|
||||
/***************************************************************************
|
||||
|
||||
laser3k.c
|
||||
Driver for VTech Laser 3000 / Dick Smith Electronics "The Cat"
|
||||
|
||||
This machine is somewhat similar to a 48K Apple II if you blur your eyes
|
||||
a lot, but it generally fits in poorly with 100% compatible machines
|
||||
(no chance of a compatible language card or auxmem) so it gets its own driver.
|
||||
|
||||
An "emulation cartridge" is required to run Apple II software; it's unclear
|
||||
what that consists of.
|
||||
|
||||
Banking theory:
|
||||
- 6502 has 4 banking windows, 0000-3FFF, 4000-7FFF, 8000-BFFF, C000-FFFF
|
||||
- Physical address space is 0x00000-0x3FFFF. ROM and I/O at the top, RAM
|
||||
up to 0x2FFFF (192k max).
|
||||
- Each window has a bank number register at physical 3C07C/D/E/F
|
||||
|
||||
Technical manual at:
|
||||
http://mirrors.apple2.org.za/Apple%20II%20Documentation%20Project/Computers/LASER/LASER%203000/Manuals/The%20Cat%20Technical%20Reference%20Manual.pdf
|
||||
|
||||
TODO:
|
||||
- keyboard
|
||||
- graphics modes
|
||||
- 80-column text
|
||||
- figure out where the C800 ROM pages for the printer and FDC are (currently the 80-col f/w's pages are mapped there)
|
||||
- Centronics printer port (data at 3c090, read ack at 3c1c0, read busy at 3c1c2)
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/m6502/m6502.h"
|
||||
#include "machine/bankdev.h"
|
||||
#include "machine/ram.h"
|
||||
#include "sound/speaker.h"
|
||||
#include "sound/sn76496.h"
|
||||
|
||||
class laser3k_state : public driver_device
|
||||
{
|
||||
public:
|
||||
laser3k_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_ram(*this, "mainram")
|
||||
, m_bank0(*this, "bank0")
|
||||
, m_bank1(*this, "bank1")
|
||||
, m_bank2(*this, "bank2")
|
||||
, m_bank3(*this, "bank3")
|
||||
, m_speaker(*this, "speaker")
|
||||
, m_sn(*this, "sn76489")
|
||||
{ }
|
||||
|
||||
required_device<m6502_device> m_maincpu;
|
||||
required_device<ram_device> m_ram;
|
||||
required_device<address_map_bank_device> m_bank0;
|
||||
required_device<address_map_bank_device> m_bank1;
|
||||
required_device<address_map_bank_device> m_bank2;
|
||||
required_device<address_map_bank_device> m_bank3;
|
||||
required_device<speaker_sound_device> m_speaker;
|
||||
required_device<sn76489_device> m_sn;
|
||||
|
||||
READ8_MEMBER( ram_r );
|
||||
WRITE8_MEMBER( ram_w );
|
||||
READ8_MEMBER( io_r );
|
||||
WRITE8_MEMBER( io_w );
|
||||
READ8_MEMBER( io2_r );
|
||||
|
||||
virtual void machine_reset();
|
||||
DECLARE_PALETTE_INIT(laser3k);
|
||||
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
private:
|
||||
UINT8 m_bank0val, m_bank1val, m_bank2val, m_bank3val;
|
||||
int m_flash;
|
||||
int m_speaker_state;
|
||||
int m_disp_page;
|
||||
int m_bg_color;
|
||||
|
||||
void plot_text_character(bitmap_ind16 &bitmap, int xpos, int ypos, int xscale, UINT32 code, const UINT8 *textgfx_data, UINT32 textgfx_datalen);
|
||||
};
|
||||
|
||||
/***************************************************************************
|
||||
ADDRESS MAP
|
||||
***************************************************************************/
|
||||
|
||||
static ADDRESS_MAP_START( laser3k_map, AS_PROGRAM, 8, laser3k_state )
|
||||
AM_RANGE(0x0000, 0x3fff) AM_DEVICE("bank0", address_map_bank_device, amap8)
|
||||
AM_RANGE(0x4000, 0x7fff) AM_DEVICE("bank1", address_map_bank_device, amap8)
|
||||
AM_RANGE(0x8000, 0xbfff) AM_DEVICE("bank2", address_map_bank_device, amap8)
|
||||
AM_RANGE(0xc000, 0xffff) AM_DEVICE("bank3", address_map_bank_device, amap8)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( banks_map, AS_PROGRAM, 8, laser3k_state )
|
||||
AM_RANGE(0x00000, 0x2ffff) AM_READWRITE(ram_r, ram_w)
|
||||
AM_RANGE(0x38000, 0x3bfff) AM_ROM AM_REGION("maincpu", 0)
|
||||
AM_RANGE(0x3c000, 0x3c0ff) AM_READWRITE(io_r, io_w)
|
||||
AM_RANGE(0x3c100, 0x3c1ff) AM_READ(io2_r)
|
||||
AM_RANGE(0x3c200, 0x3ffff) AM_ROM AM_REGION("maincpu", 0x4200)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
void laser3k_state::machine_reset()
|
||||
{
|
||||
m_bank0val = 0;
|
||||
m_bank1val = 1;
|
||||
m_bank2val = 2;
|
||||
m_bank3val = 0xf;
|
||||
m_bank0->set_bank(m_bank0val);
|
||||
m_bank1->set_bank(m_bank1val);
|
||||
m_bank2->set_bank(m_bank2val);
|
||||
m_bank3->set_bank(m_bank3val);
|
||||
|
||||
// reset the 6502 here with the banking set up so we get the right vector
|
||||
m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
|
||||
m_maincpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
|
||||
|
||||
m_flash = 0;
|
||||
m_speaker_state = 0;
|
||||
m_disp_page = 0;
|
||||
m_bg_color = 0;
|
||||
|
||||
UINT8 *rom = (UINT8 *)memregion("maincpu")->base();
|
||||
|
||||
// patch out disk controller ID for now so it drops right into BASIC
|
||||
rom[0x4607] = 0;
|
||||
}
|
||||
|
||||
READ8_MEMBER( laser3k_state::ram_r )
|
||||
{
|
||||
return m_ram->read(offset);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( laser3k_state::ram_w )
|
||||
{
|
||||
m_ram->write(offset, data);
|
||||
}
|
||||
|
||||
READ8_MEMBER( laser3k_state::io_r )
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
case 0x00: // keyboard latch
|
||||
return 0x00;
|
||||
|
||||
case 0x08: // set border color to black
|
||||
break;
|
||||
|
||||
case 0x10: // keyboard strobe
|
||||
return 0x00;
|
||||
|
||||
case 0x18: // set bg color to black
|
||||
m_bg_color = 0;
|
||||
break;
|
||||
case 0x19: // set bg color to red
|
||||
m_bg_color = 1;
|
||||
break;
|
||||
case 0x1a: // set bg color to green
|
||||
m_bg_color = 12;
|
||||
break;
|
||||
case 0x1b: // set bg color to yellow
|
||||
m_bg_color = 13;
|
||||
break;
|
||||
case 0x1c: // set bg color to blue
|
||||
m_bg_color = 6;
|
||||
break;
|
||||
case 0x1d: // set bg color to magenta
|
||||
m_bg_color = 3;
|
||||
break;
|
||||
case 0x1e: // set bg color to cyan
|
||||
m_bg_color = 14;
|
||||
break;
|
||||
case 0x1f: // set bg color to white
|
||||
m_bg_color = 15;
|
||||
break;
|
||||
|
||||
case 0x28: // "enable multi-color mode" - not sure what this means
|
||||
break;
|
||||
|
||||
case 0x4c: // low resolution (40 column)
|
||||
break;
|
||||
|
||||
case 0x30:
|
||||
m_speaker_state ^= 1;
|
||||
m_speaker->level_w(m_speaker_state);
|
||||
break;
|
||||
|
||||
case 0x51: // text mode
|
||||
break;
|
||||
|
||||
case 0x54: // set page 1
|
||||
m_disp_page = 0;
|
||||
break;
|
||||
|
||||
case 0x55: // set page 2
|
||||
m_disp_page = 1;
|
||||
break;
|
||||
|
||||
case 0x56: // disable emulation (?)
|
||||
break;
|
||||
|
||||
case 0x7c:
|
||||
return m_bank0val;
|
||||
|
||||
case 0x7d:
|
||||
return m_bank1val;
|
||||
|
||||
case 0x7e:
|
||||
return m_bank2val;
|
||||
|
||||
case 0x7f:
|
||||
return m_bank3val;
|
||||
|
||||
default:
|
||||
printf("io_r @ unknown %x\n", offset);
|
||||
break;
|
||||
}
|
||||
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( laser3k_state::io_w )
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
case 0x10: // clear keyboard latch
|
||||
break;
|
||||
|
||||
case 0x30: // speaker toggle sound
|
||||
m_speaker_state ^= 1;
|
||||
m_speaker->level_w(m_speaker_state);
|
||||
break;
|
||||
|
||||
case 0x4c: // low resolution
|
||||
break;
|
||||
|
||||
case 0x68: // SN76489 sound
|
||||
m_sn->write(space, 0, data);
|
||||
break;
|
||||
|
||||
case 0x78: // called "SYSTEM" in the boot ROM listing, but unsure what it does
|
||||
break;
|
||||
|
||||
case 0x7c: // bank 0
|
||||
m_bank0val = data;
|
||||
m_bank0->set_bank(m_bank0val);
|
||||
break;
|
||||
|
||||
case 0x7d: // bank 1
|
||||
m_bank1val = data;
|
||||
m_bank1->set_bank(m_bank1val);
|
||||
break;
|
||||
|
||||
case 0x7e: // bank 2
|
||||
m_bank2val = data;
|
||||
m_bank2->set_bank(m_bank2val);
|
||||
break;
|
||||
|
||||
case 0x7f: // bank 3
|
||||
m_bank3val = data;
|
||||
m_bank3->set_bank(m_bank3val);
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("io_w %02x @ unknown %x\n", data, offset);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
READ8_MEMBER( laser3k_state::io2_r )
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
case 0xc2: // h-blank status
|
||||
return space.machine().first_screen()->hblank() ? 0x80 : 0x00;
|
||||
|
||||
case 0xc3: // v-blank status
|
||||
return space.machine().first_screen()->vblank() ? 0x80 : 0x00;
|
||||
|
||||
case 0xc5: // CPU 1/2 MHz status?
|
||||
return 0x00;
|
||||
|
||||
default:
|
||||
printf("io2_r @ unknown %x\n", offset);
|
||||
break;
|
||||
}
|
||||
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
void laser3k_state::plot_text_character(bitmap_ind16 &bitmap, int xpos, int ypos, int xscale, UINT32 code,
|
||||
const UINT8 *textgfx_data, UINT32 textgfx_datalen)
|
||||
{
|
||||
int x, y, i;
|
||||
int fg = 15;
|
||||
int bg = m_bg_color;
|
||||
const UINT8 *chardata;
|
||||
UINT16 color;
|
||||
|
||||
/* look up the character data */
|
||||
chardata = &textgfx_data[(code * 8) % textgfx_datalen];
|
||||
|
||||
if (m_flash && (code >= 0x40) && (code <= 0x7f))
|
||||
{
|
||||
/* we're flashing; swap */
|
||||
i = fg;
|
||||
fg = bg;
|
||||
bg = i;
|
||||
}
|
||||
|
||||
for (y = 0; y < 8; y++)
|
||||
{
|
||||
for (x = 0; x < 7; x++)
|
||||
{
|
||||
color = (chardata[y] & (1 << (6-x))) ? fg : bg;
|
||||
|
||||
for (i = 0; i < xscale; i++)
|
||||
{
|
||||
bitmap.pix16(ypos + y, xpos + (x * xscale) + i) = color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UINT32 laser3k_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
int row, col;
|
||||
UINT32 start_address = (m_disp_page == 0) ? 0x400 : 0x800;
|
||||
UINT32 address;
|
||||
UINT8 *m_a2_videoram = m_ram->pointer();
|
||||
int beginrow = 0, endrow = 191;
|
||||
|
||||
m_flash = ((machine().time() * 4).seconds & 1) ? 1 : 0;
|
||||
|
||||
beginrow = MAX(beginrow, cliprect.min_y - (cliprect.min_y % 8));
|
||||
endrow = MIN(endrow, cliprect.max_y - (cliprect.max_y % 8) + 7);
|
||||
|
||||
for (row = beginrow; row <= endrow; row += 8)
|
||||
{
|
||||
for (col = 0; col < 40; col++)
|
||||
{
|
||||
/* calculate address */
|
||||
address = start_address + ((((row/8) & 0x07) << 7) | (((row/8) & 0x18) * 5 + col));
|
||||
|
||||
plot_text_character(bitmap, col * 14, row, 2, m_a2_videoram[address],
|
||||
memregion("gfx1")->base(), memregion("gfx1")->bytes());
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
INPUT PORTS
|
||||
***************************************************************************/
|
||||
|
||||
static INPUT_PORTS_START( laser3k )
|
||||
PORT_START("X0")
|
||||
PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#')
|
||||
PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
|
||||
PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
|
||||
PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&')
|
||||
PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'')
|
||||
PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(')
|
||||
PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')')
|
||||
PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')')
|
||||
PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':')
|
||||
PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_')
|
||||
|
||||
PORT_START("X1")
|
||||
PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') PORT_CHAR('q')
|
||||
PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('W') PORT_CHAR('w')
|
||||
PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('E') PORT_CHAR('e')
|
||||
PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('R') PORT_CHAR('r')
|
||||
PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('T') PORT_CHAR('t')
|
||||
PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') PORT_CHAR('y')
|
||||
PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('U') PORT_CHAR('u')
|
||||
PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('I') PORT_CHAR('i')
|
||||
PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('O') PORT_CHAR('o')
|
||||
PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('P') PORT_CHAR('p')
|
||||
|
||||
PORT_START("X2")
|
||||
PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('D') PORT_CHAR('d')
|
||||
PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('F') PORT_CHAR('f')
|
||||
PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('G') PORT_CHAR('g')
|
||||
PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('H') PORT_CHAR('h')
|
||||
PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CHAR('j')
|
||||
PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('K') PORT_CHAR('k')
|
||||
PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('L') PORT_CHAR('l')
|
||||
PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+')
|
||||
PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(UTF8_LEFT) PORT_CODE(KEYCODE_LEFT)
|
||||
PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(UTF8_RIGHT) PORT_CODE(KEYCODE_RIGHT)
|
||||
|
||||
PORT_START("X3")
|
||||
PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') PORT_CHAR('z')
|
||||
PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_CHAR('x')
|
||||
PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('C') PORT_CHAR('c')
|
||||
PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('V') PORT_CHAR('v')
|
||||
PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('B') PORT_CHAR('b')
|
||||
PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CHAR('n')
|
||||
PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('M') PORT_CHAR('m')
|
||||
PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<')
|
||||
PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>')
|
||||
PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?')
|
||||
|
||||
PORT_START("X4")
|
||||
PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CHAR('s')
|
||||
PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('\"')
|
||||
PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
|
||||
PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC) PORT_CHAR(27)
|
||||
PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('A') PORT_CHAR('a')
|
||||
PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
|
||||
PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
|
||||
|
||||
PORT_START("X5")
|
||||
PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
|
||||
PORT_START("X6")
|
||||
PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
|
||||
PORT_START("X7")
|
||||
PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
|
||||
PORT_START("X8")
|
||||
PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
|
||||
PORT_START("keyb_special")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Left Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Right Shift") PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Control") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2)
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RESET") PORT_CODE(KEYCODE_F12)
|
||||
INPUT_PORTS_END
|
||||
|
||||
// this is an apple II palette; it seems more likely the
|
||||
// actual laser3000 has a digital RGB palette...
|
||||
static const rgb_t laser3k_palette[] =
|
||||
{
|
||||
rgb_t::black,
|
||||
rgb_t(0xE3, 0x1E, 0x60), /* Dark Red */
|
||||
rgb_t(0x60, 0x4E, 0xBD), /* Dark Blue */
|
||||
rgb_t(0xFF, 0x44, 0xFD), /* Purple */
|
||||
rgb_t(0x00, 0xA3, 0x60), /* Dark Green */
|
||||
rgb_t(0x9C, 0x9C, 0x9C), /* Dark Gray */
|
||||
rgb_t(0x14, 0xCF, 0xFD), /* Medium Blue */
|
||||
rgb_t(0xD0, 0xC3, 0xFF), /* Light Blue */
|
||||
rgb_t(0x60, 0x72, 0x03), /* Brown */
|
||||
rgb_t(0xFF, 0x6A, 0x3C), /* Orange */
|
||||
rgb_t(0x9C, 0x9C, 0x9C), /* Light Grey */
|
||||
rgb_t(0xFF, 0xA0, 0xD0), /* Pink */
|
||||
rgb_t(0x14, 0xF5, 0x3C), /* Light Green */
|
||||
rgb_t(0xD0, 0xDD, 0x8D), /* Yellow */
|
||||
rgb_t(0x72, 0xFF, 0xD0), /* Aquamarine */
|
||||
rgb_t(0xFF, 0xFF, 0xFF) /* White */
|
||||
};
|
||||
|
||||
/* Initialize the palette */
|
||||
PALETTE_INIT_MEMBER(laser3k_state, laser3k)
|
||||
{
|
||||
palette.set_pen_colors(0, laser3k_palette, ARRAY_LENGTH(laser3k_palette));
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( laser3k, laser3k_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M6502, 1021800)
|
||||
MCFG_CPU_PROGRAM_MAP(laser3k_map)
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(50)
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
|
||||
MCFG_SCREEN_SIZE(300*2, 192)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0, (280*2)-1,0,192-1)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(laser3k_state, screen_update)
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
|
||||
MCFG_PALETTE_ADD("palette", ARRAY_LENGTH(laser3k_palette))
|
||||
MCFG_PALETTE_INIT_OWNER(laser3k_state, laser3k)
|
||||
|
||||
/* memory banking */
|
||||
MCFG_DEVICE_ADD("bank0", ADDRESS_MAP_BANK, 0)
|
||||
MCFG_DEVICE_PROGRAM_MAP(banks_map)
|
||||
MCFG_ADDRESS_MAP_BANK_ENDIANNESS(ENDIANNESS_LITTLE)
|
||||
MCFG_ADDRESS_MAP_BANK_DATABUS_WIDTH(8)
|
||||
MCFG_ADDRESS_MAP_BANK_STRIDE(0x4000)
|
||||
MCFG_DEVICE_ADD("bank1", ADDRESS_MAP_BANK, 0)
|
||||
MCFG_DEVICE_PROGRAM_MAP(banks_map)
|
||||
MCFG_ADDRESS_MAP_BANK_ENDIANNESS(ENDIANNESS_LITTLE)
|
||||
MCFG_ADDRESS_MAP_BANK_DATABUS_WIDTH(8)
|
||||
MCFG_ADDRESS_MAP_BANK_STRIDE(0x4000)
|
||||
MCFG_DEVICE_ADD("bank2", ADDRESS_MAP_BANK, 0)
|
||||
MCFG_DEVICE_PROGRAM_MAP(banks_map)
|
||||
MCFG_ADDRESS_MAP_BANK_ENDIANNESS(ENDIANNESS_LITTLE)
|
||||
MCFG_ADDRESS_MAP_BANK_DATABUS_WIDTH(8)
|
||||
MCFG_ADDRESS_MAP_BANK_STRIDE(0x4000)
|
||||
MCFG_DEVICE_ADD("bank3", ADDRESS_MAP_BANK, 0)
|
||||
MCFG_DEVICE_PROGRAM_MAP(banks_map)
|
||||
MCFG_ADDRESS_MAP_BANK_ENDIANNESS(ENDIANNESS_LITTLE)
|
||||
MCFG_ADDRESS_MAP_BANK_DATABUS_WIDTH(8)
|
||||
MCFG_ADDRESS_MAP_BANK_STRIDE(0x4000)
|
||||
|
||||
MCFG_RAM_ADD("mainram")
|
||||
MCFG_RAM_DEFAULT_SIZE("192K")
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
|
||||
MCFG_SOUND_ADD("sn76489", SN76489, 1020484)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
ROM_START(las3000)
|
||||
ROM_REGION(0x0800,"gfx1",0)
|
||||
ROM_LOAD ( "341-0036.chr", 0x0000, 0x0800, CRC(64f415c6) SHA1(f9d312f128c9557d9d6ac03bfad6c3ddf83e5659))
|
||||
|
||||
ROM_REGION(0x8000, "maincpu", 0)
|
||||
ROM_LOAD ( "las3000.rom", 0x0000, 0x8000, CRC(9C7AEB09) SHA1(3302ADF41E258CF50210C19736948C8FA65E91DE))
|
||||
|
||||
ROM_REGION(0x100, "fdc", 0)
|
||||
ROM_LOAD ( "l3kdisk.rom", 0x0000, 0x0100, CRC(2D4B1584) SHA1(989780B77E100598124DF7B72663E5A31A3339C0))
|
||||
ROM_END
|
||||
|
||||
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */
|
||||
COMP( 1983, las3000, 0, 0, laser3k, laser3k, driver_device, 0, "Video Technology", "Laser 3000", GAME_NOT_WORKING )
|
@ -80,6 +80,7 @@ enum machine_type_t
|
||||
APPLE_IIC, // Apple IIc
|
||||
APPLE_IICPLUS, // Apple IIc+
|
||||
TK2000, // Microdigital TK2000
|
||||
TK3000, // Microdigital TK3000
|
||||
LASER128, // Laser 128/128EX/128EX2
|
||||
SPACE84, // "Space 84" with flipped text mode
|
||||
LABA2P // lab equipment (?) II Plus with flipped text mode
|
||||
@ -135,6 +136,7 @@ public:
|
||||
m_kbspecial(*this, "keyb_special"),
|
||||
m_kbrepeat(*this, "keyb_repeat"),
|
||||
m_resetdip(*this, "reset_dip"),
|
||||
m_sysconfig(*this, "a2_config"),
|
||||
m_cassette(*this, "cassette"),
|
||||
m_acia1(*this, IIC_ACIA1_TAG),
|
||||
m_acia2(*this, IIC_ACIA2_TAG)
|
||||
@ -151,6 +153,7 @@ public:
|
||||
required_ioport m_kbspecial;
|
||||
optional_ioport m_kbrepeat;
|
||||
optional_ioport m_resetdip;
|
||||
optional_ioport m_sysconfig;
|
||||
optional_device<cassette_image_device> m_cassette;
|
||||
|
||||
optional_device<mos6551_device> m_acia1, m_acia2;
|
||||
@ -313,6 +316,7 @@ public:
|
||||
DECLARE_MACHINE_START(apple2c);
|
||||
DECLARE_MACHINE_START(apple2cp);
|
||||
DECLARE_MACHINE_START(tk2000);
|
||||
DECLARE_MACHINE_START(tk3000);
|
||||
DECLARE_MACHINE_START(laser128);
|
||||
DECLARE_MACHINE_START(space84);
|
||||
DECLARE_MACHINE_START(laba2p);
|
||||
|
@ -1313,7 +1313,7 @@ READ8_MEMBER ( apple2_state::apple2_auxram0000_r )
|
||||
{
|
||||
return m_auxslotdevice->read_auxram(offset);
|
||||
}
|
||||
else if (m_machinetype == APPLE_IIE)
|
||||
else if (m_machinetype == APPLE_IIE || m_machinetype == TK3000)
|
||||
{
|
||||
return 0xff;
|
||||
}
|
||||
@ -1328,7 +1328,7 @@ READ8_MEMBER ( apple2_state::apple2_auxram0200_r )
|
||||
{
|
||||
return m_auxslotdevice->read_auxram(offset+0x200);
|
||||
}
|
||||
else if (m_machinetype == APPLE_IIE)
|
||||
else if (m_machinetype == APPLE_IIE || m_machinetype == TK3000)
|
||||
{
|
||||
return 0xff;
|
||||
}
|
||||
@ -1343,7 +1343,7 @@ READ8_MEMBER ( apple2_state::apple2_auxram0400_r )
|
||||
{
|
||||
return m_auxslotdevice->read_auxram(offset+0x400);
|
||||
}
|
||||
else if (m_machinetype == APPLE_IIE)
|
||||
else if (m_machinetype == APPLE_IIE || m_machinetype == TK3000)
|
||||
{
|
||||
return 0xff;
|
||||
}
|
||||
@ -1358,7 +1358,7 @@ READ8_MEMBER ( apple2_state::apple2_auxram0800_r )
|
||||
{
|
||||
return m_auxslotdevice->read_auxram(offset+0x800);
|
||||
}
|
||||
else if (m_machinetype == APPLE_IIE)
|
||||
else if (m_machinetype == APPLE_IIE || m_machinetype == TK3000)
|
||||
{
|
||||
return 0xff;
|
||||
}
|
||||
@ -1373,7 +1373,7 @@ READ8_MEMBER ( apple2_state::apple2_auxram2000_r )
|
||||
{
|
||||
return m_auxslotdevice->read_auxram(offset+0x2000);
|
||||
}
|
||||
else if (m_machinetype == APPLE_IIE)
|
||||
else if (m_machinetype == APPLE_IIE || m_machinetype == TK3000)
|
||||
{
|
||||
return 0xff;
|
||||
}
|
||||
@ -1388,7 +1388,7 @@ READ8_MEMBER ( apple2_state::apple2_auxram4000_r )
|
||||
{
|
||||
return m_auxslotdevice->read_auxram(offset+0x4000);
|
||||
}
|
||||
else if (m_machinetype == APPLE_IIE)
|
||||
else if (m_machinetype == APPLE_IIE || m_machinetype == TK3000)
|
||||
{
|
||||
return 0xff;
|
||||
}
|
||||
@ -1403,7 +1403,7 @@ READ8_MEMBER ( apple2_state::apple2_auxramc000_r )
|
||||
{
|
||||
return m_auxslotdevice->read_auxram(offset+0xc000);
|
||||
}
|
||||
else if (m_machinetype == APPLE_IIE)
|
||||
else if (m_machinetype == APPLE_IIE || m_machinetype == TK3000)
|
||||
{
|
||||
return 0xff;
|
||||
}
|
||||
@ -1418,7 +1418,7 @@ READ8_MEMBER ( apple2_state::apple2_auxramd000_r )
|
||||
{
|
||||
return m_auxslotdevice->read_auxram(offset+0xd000);
|
||||
}
|
||||
else if (m_machinetype == APPLE_IIE)
|
||||
else if (m_machinetype == APPLE_IIE || m_machinetype == TK3000)
|
||||
{
|
||||
return 0xff;
|
||||
}
|
||||
@ -1433,7 +1433,7 @@ READ8_MEMBER ( apple2_state::apple2_auxrame000_r )
|
||||
{
|
||||
return m_auxslotdevice->read_auxram(offset+0xe000);
|
||||
}
|
||||
else if (m_machinetype == APPLE_IIE)
|
||||
else if (m_machinetype == APPLE_IIE || m_machinetype == TK3000)
|
||||
{
|
||||
return 0xff;
|
||||
}
|
||||
@ -1503,7 +1503,7 @@ WRITE8_MEMBER ( apple2_state::apple2_auxram0000_w )
|
||||
m_auxslotdevice->write_auxram(offset, data);
|
||||
return;
|
||||
}
|
||||
else if (m_machinetype == APPLE_IIE)
|
||||
else if (m_machinetype == APPLE_IIE || m_machinetype == TK3000)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -1519,7 +1519,7 @@ WRITE8_MEMBER ( apple2_state::apple2_auxram0200_w )
|
||||
m_auxslotdevice->write_auxram(offset+0x200, data);
|
||||
return;
|
||||
}
|
||||
else if (m_machinetype == APPLE_IIE)
|
||||
else if (m_machinetype == APPLE_IIE || m_machinetype == TK3000)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -1535,7 +1535,7 @@ WRITE8_MEMBER ( apple2_state::apple2_auxram0400_w )
|
||||
m_auxslotdevice->write_auxram(offset+0x400, data);
|
||||
return;
|
||||
}
|
||||
else if (m_machinetype == APPLE_IIE)
|
||||
else if (m_machinetype == APPLE_IIE || m_machinetype == TK3000)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -1551,7 +1551,7 @@ WRITE8_MEMBER ( apple2_state::apple2_auxram0800_w )
|
||||
m_auxslotdevice->write_auxram(offset+0x800, data);
|
||||
return;
|
||||
}
|
||||
else if (m_machinetype == APPLE_IIE)
|
||||
else if (m_machinetype == APPLE_IIE || m_machinetype == TK3000)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -1567,7 +1567,7 @@ WRITE8_MEMBER ( apple2_state::apple2_auxram2000_w )
|
||||
m_auxslotdevice->write_auxram(offset+0x2000, data);
|
||||
return;
|
||||
}
|
||||
else if (m_machinetype == APPLE_IIE)
|
||||
else if (m_machinetype == APPLE_IIE || m_machinetype == TK3000)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -1583,7 +1583,7 @@ WRITE8_MEMBER ( apple2_state::apple2_auxram4000_w )
|
||||
m_auxslotdevice->write_auxram(offset+0x4000, data);
|
||||
return;
|
||||
}
|
||||
else if (m_machinetype == APPLE_IIE)
|
||||
else if (m_machinetype == APPLE_IIE || m_machinetype == TK3000)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -1599,7 +1599,7 @@ WRITE8_MEMBER ( apple2_state::apple2_auxramc000_w )
|
||||
m_auxslotdevice->write_auxram(offset+0xc000, data);
|
||||
return;
|
||||
}
|
||||
else if (m_machinetype == APPLE_IIE)
|
||||
else if (m_machinetype == APPLE_IIE || m_machinetype == TK3000)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -1615,7 +1615,7 @@ WRITE8_MEMBER ( apple2_state::apple2_auxramd000_w )
|
||||
m_auxslotdevice->write_auxram(offset+0xd000, data);
|
||||
return;
|
||||
}
|
||||
else if (m_machinetype == APPLE_IIE)
|
||||
else if (m_machinetype == APPLE_IIE || m_machinetype == TK3000)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -1631,7 +1631,7 @@ WRITE8_MEMBER ( apple2_state::apple2_auxrame000_w )
|
||||
m_auxslotdevice->write_auxram(offset+0xe000, data);
|
||||
return;
|
||||
}
|
||||
else if (m_machinetype == APPLE_IIE)
|
||||
else if (m_machinetype == APPLE_IIE || m_machinetype == TK3000)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -2143,7 +2143,7 @@ void apple2_state::apple2_init_common()
|
||||
m_slot_ram = (m_slot_length > 0) ? &m_rom[m_rom_length] : NULL;
|
||||
|
||||
m_auxslotdevice = NULL;
|
||||
if (m_machinetype == APPLE_IIE)
|
||||
if (m_machinetype == APPLE_IIE || m_machinetype == TK3000)
|
||||
{
|
||||
m_auxslotdevice = m_a2eauxslot->get_a2eauxslot_card();
|
||||
}
|
||||
@ -2191,6 +2191,13 @@ MACHINE_START_MEMBER(apple2_state,apple2c)
|
||||
apple2eplus_init_common((void *)NULL);
|
||||
}
|
||||
|
||||
MACHINE_START_MEMBER(apple2_state,tk3000)
|
||||
{
|
||||
m_machinetype = TK3000; // enhanced IIe clone with Z80 keyboard scanner subcpu
|
||||
|
||||
apple2eplus_init_common((void *)NULL);
|
||||
}
|
||||
|
||||
MACHINE_START_MEMBER(apple2_state,apple2cp)
|
||||
{
|
||||
void *apple2cp_ce00_ram;
|
||||
|
@ -473,7 +473,6 @@ apple3 // May 1980 Apple ///
|
||||
ace100 // ??? 1982 Franklin Ace 100
|
||||
laser128 // ??? 1987 Laser 128
|
||||
las128ex // ??? 1988 Laser 128 EX
|
||||
las3000 // ??? 1983 Laser 3000
|
||||
ivelultr // Ivasim Ivel Ultra
|
||||
agat7 // Agat-7
|
||||
agat9 // Agat-9
|
||||
@ -1293,6 +1292,9 @@ gj5000 // Genius Junior 5000 (Germany)
|
||||
gl6600cx // Genius Leader 6600CX (Germany)
|
||||
pitagjr // Pitagorin Junior
|
||||
|
||||
// Other Video Technology Laser machines
|
||||
las3000 // 1983 Laser 3000
|
||||
|
||||
|
||||
// Tangerine
|
||||
microtan // 1979 Microtan 65
|
||||
|
@ -130,6 +130,7 @@ CPUS += SCUDSP
|
||||
CPUS += IE15
|
||||
CPUS += 8X300
|
||||
CPUS += ALTO2
|
||||
#CPUS += W65816
|
||||
|
||||
#-------------------------------------------------
|
||||
# specify available sound cores; some of these are
|
||||
@ -2022,6 +2023,7 @@ $(MESSOBJ)/vtech.a: \
|
||||
$(MESS_DRIVERS)/prestige.o \
|
||||
$(MESS_DRIVERS)/pitagjr.o \
|
||||
$(MESS_DRIVERS)/geniusiq.o \
|
||||
$(MESS_DRIVERS)/laser3k.o \
|
||||
|
||||
$(MESSOBJ)/wang.a: \
|
||||
$(MESS_DRIVERS)/wangpc.o \
|
||||
|
@ -97,6 +97,49 @@ inline void apple2_state::apple2_plot_text_character(bitmap_ind16 &bitmap, int x
|
||||
const UINT8 *chardata;
|
||||
UINT16 color;
|
||||
|
||||
if (m_sysconfig != NULL)
|
||||
{
|
||||
switch (m_sysconfig->read() & 0x03)
|
||||
{
|
||||
case 0:
|
||||
break; // leave alone
|
||||
|
||||
case 1:
|
||||
if ((m_machinetype == APPLE_II) || (m_machinetype == LABA2P) || (m_machinetype == SPACE84))
|
||||
{
|
||||
bg = WHITE;
|
||||
}
|
||||
else
|
||||
{
|
||||
fg = WHITE;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if ((m_machinetype == APPLE_II) || (m_machinetype == LABA2P) || (m_machinetype == SPACE84))
|
||||
{
|
||||
bg = GREEN;
|
||||
}
|
||||
else
|
||||
{
|
||||
fg = GREEN;
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if ((m_machinetype == APPLE_II) || (m_machinetype == LABA2P) || (m_machinetype == SPACE84))
|
||||
{
|
||||
bg = ORANGE;
|
||||
}
|
||||
else
|
||||
{
|
||||
fg = ORANGE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (my_a2 & VAR_ALTCHARSET)
|
||||
{
|
||||
/* we're using an alternate charset */
|
||||
@ -139,7 +182,7 @@ inline void apple2_state::apple2_plot_text_character(bitmap_ind16 &bitmap, int x
|
||||
|
||||
for (i = 0; i < xscale; i++)
|
||||
{
|
||||
bitmap.pix16(ypos + y, xpos + (x * xscale) + i) = color;
|
||||
bitmap.pix16(ypos + y, xpos + (x * xscale) + i) = color;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -242,6 +285,12 @@ void apple2_state::apple2_hires_draw(bitmap_ind16 &bitmap, const rectangle &clip
|
||||
UINT16 *p;
|
||||
UINT32 w;
|
||||
UINT16 *artifact_map_ptr;
|
||||
int mon_type = 0;
|
||||
|
||||
if (m_sysconfig != NULL)
|
||||
{
|
||||
mon_type = m_sysconfig->read() & 0x03;
|
||||
}
|
||||
|
||||
/* sanity checks */
|
||||
if (beginrow < cliprect.min_y)
|
||||
@ -300,12 +349,53 @@ void apple2_state::apple2_hires_draw(bitmap_ind16 &bitmap, const rectangle &clip
|
||||
switch(columns)
|
||||
{
|
||||
case 40:
|
||||
artifact_map_ptr = &m_hires_artifact_map[((vram_row[col+1] & 0x80) >> 7) * 16];
|
||||
for (b = 0; b < 7; b++)
|
||||
switch (mon_type)
|
||||
{
|
||||
v = artifact_map_ptr[((w >> (b + 7-1)) & 0x07) | (((b ^ col) & 0x01) << 3)];
|
||||
*(p++) = v;
|
||||
*(p++) = v;
|
||||
case 0:
|
||||
artifact_map_ptr = &m_hires_artifact_map[((vram_row[col+1] & 0x80) >> 7) * 16];
|
||||
for (b = 0; b < 7; b++)
|
||||
{
|
||||
v = artifact_map_ptr[((w >> (b + 7-1)) & 0x07) | (((b ^ col) & 0x01) << 3)];
|
||||
|
||||
if ((col == 0) && (row == 0))
|
||||
{
|
||||
printf("R0C0 %x\n", v);
|
||||
}
|
||||
|
||||
*(p++) = v;
|
||||
*(p++) = v;
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
for (b = 0; b < 7; b++)
|
||||
{
|
||||
v = (w & 1);
|
||||
w >>= 1;
|
||||
*(p++) = v ? WHITE : BLACK;
|
||||
*(p++) = v ? WHITE : BLACK;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
for (b = 0; b < 7; b++)
|
||||
{
|
||||
v = (w & 1);
|
||||
w >>= 1;
|
||||
*(p++) = v ? GREEN : BLACK;
|
||||
*(p++) = v ? GREEN : BLACK;
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
for (b = 0; b < 7; b++)
|
||||
{
|
||||
v = (w & 1);
|
||||
w >>= 1;
|
||||
*(p++) = v ? ORANGE : BLACK;
|
||||
*(p++) = v ? ORANGE : BLACK;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -321,10 +411,42 @@ void apple2_state::apple2_hires_draw(bitmap_ind16 &bitmap, const rectangle &clip
|
||||
}
|
||||
else
|
||||
{
|
||||
for (b = 0; b < 7; b++)
|
||||
switch (mon_type)
|
||||
{
|
||||
v = m_dhires_artifact_map[((((w >> (b + 7-1)) & 0x0F) * 0x11) >> (((2-(col*7+b))) & 0x03)) & 0x0F];
|
||||
*(p++) = v;
|
||||
case 0:
|
||||
for (b = 0; b < 7; b++)
|
||||
{
|
||||
v = m_dhires_artifact_map[((((w >> (b + 7-1)) & 0x0F) * 0x11) >> (((2-(col*7+b))) & 0x03)) & 0x0F];
|
||||
*(p++) = v;
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
for (b = 0; b < 7; b++)
|
||||
{
|
||||
v = (w & 1);
|
||||
w >>= 1;
|
||||
*(p++) = v ? WHITE : BLACK;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
for (b = 0; b < 7; b++)
|
||||
{
|
||||
v = (w & 1);
|
||||
w >>= 1;
|
||||
*(p++) = v ? GREEN : BLACK;
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
for (b = 0; b < 7; b++)
|
||||
{
|
||||
v = (w & 1);
|
||||
w >>= 1;
|
||||
*(p++) = v ? ORANGE : BLACK;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user