(MESS) Cleanup. (nw)

This commit is contained in:
Curt Coder 2012-12-07 16:05:36 +00:00
parent f55ba0085a
commit 8622fcfecf
42 changed files with 134 additions and 151 deletions

View File

@ -1851,14 +1851,16 @@ void abc1600_state::machine_start()
// interrupt callback // interrupt callback
m_maincpu->set_irq_acknowledge_callback(abc1600_int_ack); m_maincpu->set_irq_acknowledge_callback(abc1600_int_ack);
// allocate memory
m_segment_ram.allocate(0x400);
m_page_ram.allocate(0x400);
// HACK fill segment RAM with non-zero values or no boot // HACK fill segment RAM with non-zero values or no boot
memset(m_segment_ram, 0xcd, 0x400); memset(m_segment_ram, 0xcd, 0x400);
// state saving // state saving
save_item(NAME(m_ifc2)); save_item(NAME(m_ifc2));
save_item(NAME(m_task)); save_item(NAME(m_task));
save_item(NAME(m_segment_ram));
save_item(NAME(m_page_ram));
save_item(NAME(m_dmamap)); save_item(NAME(m_dmamap));
save_item(NAME(m_dmadis)); save_item(NAME(m_dmadis));
save_item(NAME(m_sysscc)); save_item(NAME(m_sysscc));

View File

@ -706,7 +706,7 @@ SLOT_INTERFACE_END
void mpz80_state::machine_start() void mpz80_state::machine_start()
{ {
m_map_ram = auto_alloc_array_clear(machine(), UINT8, 0x200); m_map_ram.allocate(0x200);
} }

View File

@ -1002,19 +1002,6 @@ void pc1512_state::update_fdc_drq()
m_dmac->dreq2_w(0); m_dmac->dreq2_w(0);
} }
static const floppy_interface floppy_intf =
{
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
FLOPPY_STANDARD_5_25_DSDD,
LEGACY_FLOPPY_OPTIONS_NAME(pc),
"floppy_5_25",
NULL
};
WRITE_LINE_MEMBER( pc1512_state::fdc_int_w ) WRITE_LINE_MEMBER( pc1512_state::fdc_int_w )
{ {
m_dint = state; m_dint = state;

View File

@ -374,8 +374,9 @@ INPUT_PORTS_END
/* Video */ /* Video */
UINT32 tiki100_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) UINT32 tiki100_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{ {
const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
UINT16 addr = (m_scroll << 7); UINT16 addr = (m_scroll << 7);
int sx, y, pixel, mode = (m_mode >> 4) & 0x03; int sx, y, pixel, mode = (m_mode >> 4) & 0x03;
@ -392,7 +393,7 @@ UINT32 tiki100_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
{ {
int x = (sx * 8) + pixel; int x = (sx * 8) + pixel;
bitmap.pix16(y, x) = 0; bitmap.pix32(y, x) = palette[0];
} }
break; break;
@ -402,7 +403,7 @@ UINT32 tiki100_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
int x = (sx * 8) + pixel; int x = (sx * 8) + pixel;
int color = BIT(data, 0); int color = BIT(data, 0);
bitmap.pix16(y, x) = color; bitmap.pix32(y, x) = palette[color];
data >>= 1; data >>= 1;
} }
@ -414,8 +415,8 @@ UINT32 tiki100_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
int x = (sx * 8) + (pixel * 2); int x = (sx * 8) + (pixel * 2);
int color = data & 0x03; int color = data & 0x03;
bitmap.pix16(y, x) = color; bitmap.pix32(y, x) = palette[color];
bitmap.pix16(y, x + 1) = color; bitmap.pix32(y, x + 1) = palette[color];
data >>= 2; data >>= 2;
} }
@ -427,10 +428,10 @@ UINT32 tiki100_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
int x = (sx * 8) + (pixel * 4); int x = (sx * 8) + (pixel * 4);
int color = data & 0x0f; int color = data & 0x0f;
bitmap.pix16(y, x) = color; bitmap.pix32(y, x) = palette[color];
bitmap.pix16(y, x + 1) = color; bitmap.pix32(y, x + 1) = palette[color];
bitmap.pix16(y, x + 2) = color; bitmap.pix32(y, x + 2) = palette[color];
bitmap.pix16(y, x + 3) = color; bitmap.pix32(y, x + 3) = palette[color];
data >>= 4; data >>= 4;
} }
@ -546,7 +547,7 @@ static const z80_daisy_config tiki100_daisy_chain[] =
void tiki100_state::machine_start() void tiki100_state::machine_start()
{ {
/* allocate video RAM */ /* allocate video RAM */
m_video_ram = auto_alloc_array(machine(), UINT8, TIKI100_VIDEORAM_SIZE); m_video_ram.allocate(TIKI100_VIDEORAM_SIZE);
/* setup memory banking */ /* setup memory banking */
UINT8 *ram = m_ram->pointer(); UINT8 *ram = m_ram->pointer();
@ -565,7 +566,6 @@ void tiki100_state::machine_start()
/* register for state saving */ /* register for state saving */
save_item(NAME(m_rome)); save_item(NAME(m_rome));
save_item(NAME(m_vire)); save_item(NAME(m_vire));
save_pointer(NAME(m_video_ram), TIKI100_VIDEORAM_SIZE);
save_item(NAME(m_scroll)); save_item(NAME(m_scroll));
save_item(NAME(m_mode)); save_item(NAME(m_mode));
save_item(NAME(m_palette)); save_item(NAME(m_palette));
@ -641,5 +641,5 @@ ROM_END
/* System Drivers */ /* System Drivers */
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */
COMP( 1984, kontiki, 0, 0, tiki100, tiki100, driver_device, 0, "Kontiki Data A/S", "KONTIKI 100", GAME_SUPPORTS_SAVE ) COMP( 1984, kontiki, 0, 0, tiki100, tiki100, driver_device, 0, "Kontiki Data A/S", "KONTIKI 100", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
COMP( 1984, tiki100, kontiki, 0, tiki100, tiki100, driver_device, 0, "Tiki Data A/S", "TIKI 100", GAME_SUPPORTS_SAVE ) COMP( 1984, tiki100, kontiki, 0, tiki100, tiki100, driver_device, 0, "Tiki Data A/S", "TIKI 100", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )

View File

@ -629,7 +629,7 @@ void trs80m2_state::video_start()
m_char_rom = memregion(MC6845_TAG)->base(); m_char_rom = memregion(MC6845_TAG)->base();
// allocate memory // allocate memory
m_video_ram = auto_alloc_array(machine(), UINT8, 0x800); m_video_ram.allocate(0x800);
} }
UINT32 trs80m2_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) UINT32 trs80m2_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)

View File

@ -159,6 +159,16 @@ WRITE8_MEMBER( xor100_state::i8251_b_data_w )
m_terminal->write(space, 0, data); m_terminal->write(space, 0, data);
} }
READ8_MEMBER( xor100_state::fdc_r )
{
return m_fdc->gen_r(offset) ^ 0xff;
}
WRITE8_MEMBER( xor100_state::fdc_w )
{
m_fdc->gen_w(offset, data ^ 0xff);
}
READ8_MEMBER( xor100_state::fdc_wait_r ) READ8_MEMBER( xor100_state::fdc_wait_r )
{ {
/* /*
@ -178,8 +188,8 @@ READ8_MEMBER( xor100_state::fdc_wait_r )
if (!m_fdc_irq && !m_fdc_drq) if (!m_fdc_irq && !m_fdc_drq)
{ {
/* TODO: this is really connected to the Z80 _RDY line */ fatalerror("Z80 WAIT not supported by MAME core\n");
m_maincpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE);
} }
return !m_fdc_irq << 7; return !m_fdc_irq << 7;
@ -263,7 +273,7 @@ static ADDRESS_MAP_START( xor100_io, AS_IO, 8, xor100_state )
AM_RANGE(0x0a, 0x0a) AM_READ(prom_disable_r) AM_RANGE(0x0a, 0x0a) AM_READ(prom_disable_r)
AM_RANGE(0x0b, 0x0b) AM_READ_PORT("DSW0") AM_WRITE(baud_w) AM_RANGE(0x0b, 0x0b) AM_READ_PORT("DSW0") AM_WRITE(baud_w)
AM_RANGE(0x0c, 0x0f) AM_DEVREADWRITE(Z80CTC_TAG, z80ctc_device, read, write) AM_RANGE(0x0c, 0x0f) AM_DEVREADWRITE(Z80CTC_TAG, z80ctc_device, read, write)
AM_RANGE(0xf8, 0xfb) AM_DEVREADWRITE(WD1795_TAG, fd1795_t, read, write) // TODO inverted data bus AM_RANGE(0xf8, 0xfb) AM_READWRITE(fdc_r, fdc_w)
AM_RANGE(0xfc, 0xfc) AM_READWRITE(fdc_wait_r, fdc_dcont_w) AM_RANGE(0xfc, 0xfc) AM_READWRITE(fdc_wait_r, fdc_dcont_w)
AM_RANGE(0xfd, 0xfd) AM_WRITE(fdc_dsel_w) AM_RANGE(0xfd, 0xfd) AM_WRITE(fdc_dsel_w)
ADDRESS_MAP_END ADDRESS_MAP_END
@ -484,8 +494,8 @@ void xor100_state::fdc_intrq_w(bool state)
if (state) if (state)
{ {
/* TODO: this is really connected to the Z80 _RDY line */ fatalerror("Z80 WAIT not supported by MAME core\n");
m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE);
} }
} }
@ -495,8 +505,8 @@ void xor100_state::fdc_drq_w(bool state)
if (state) if (state)
{ {
/* TODO: this is really connected to the Z80 _RDY line */ fatalerror("Z80 WAIT not supported by MAME core\n");
m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE);
} }
} }

View File

@ -73,7 +73,10 @@ public:
m_bus0i(*this, BUS0I_TAG), m_bus0i(*this, BUS0I_TAG),
m_bus0x(*this, BUS0X_TAG), m_bus0x(*this, BUS0X_TAG),
m_bus1(*this, BUS1_TAG), m_bus1(*this, BUS1_TAG),
m_bus2(*this, BUS2_TAG) m_bus2(*this, BUS2_TAG),
m_segment_ram(*this, "segment_ram"),
m_page_ram(*this, "page_ram"),
m_video_ram(*this, "video_ram")
{ } { }
required_device<cpu_device> m_maincpu; required_device<cpu_device> m_maincpu;
@ -93,6 +96,9 @@ public:
required_device<abc1600bus_slot_device> m_bus0x; required_device<abc1600bus_slot_device> m_bus0x;
required_device<abc1600bus_slot_device> m_bus1; required_device<abc1600bus_slot_device> m_bus1;
required_device<abc1600bus_slot_device> m_bus2; required_device<abc1600bus_slot_device> m_bus2;
optional_shared_ptr<UINT8> m_segment_ram;
optional_shared_ptr<UINT16> m_page_ram;
optional_shared_ptr<UINT16> m_video_ram;
virtual void machine_start(); virtual void machine_start();
virtual void machine_reset(); virtual void machine_reset();
@ -196,8 +202,6 @@ public:
// memory access controller // memory access controller
int m_ifc2; int m_ifc2;
UINT8 m_task; UINT8 m_task;
UINT8 m_segment_ram[0x400];
UINT16 m_page_ram[0x400];
// DMA // DMA
UINT8 m_dmamap[8]; UINT8 m_dmamap[8];
@ -218,7 +222,6 @@ public:
const UINT8 *m_wrmsk_rom; // write mask ROM const UINT8 *m_wrmsk_rom; // write mask ROM
const UINT8 *m_shinf_rom; // shifter info ROM const UINT8 *m_shinf_rom; // shifter info ROM
const UINT8 *m_drmsk_rom; // data read mask ROM const UINT8 *m_drmsk_rom; // data read mask ROM
UINT16 *m_video_ram; // video RAM
int m_endisp; // enable display int m_endisp; // enable display
int m_clocks_disabled; // clocks disabled int m_clocks_disabled; // clocks disabled
UINT16 m_gmdi; // video RAM data latch UINT16 m_gmdi; // video RAM data latch
@ -244,7 +247,6 @@ public:
int m_rmc; // row match count int m_rmc; // row match count
int m_cmc; // column match count int m_cmc; // column match count
int m_amm; // active mover mask int m_amm; // active mover mask
UINT32 screen_update_abc1600(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
}; };

View File

@ -71,6 +71,7 @@ public:
m_kb(*this, ABC80_KEYBOARD_TAG), m_kb(*this, ABC80_KEYBOARD_TAG),
m_ram(*this, RAM_TAG), m_ram(*this, RAM_TAG),
m_rs232(*this, RS232_TAG), m_rs232(*this, RS232_TAG),
m_video_ram(*this, "video_ram"),
m_tape_in(1), m_tape_in(1),
m_tape_in_latch(1) m_tape_in_latch(1)
{ } { }
@ -83,6 +84,7 @@ public:
required_device<abc80_keyboard_device> m_kb; required_device<abc80_keyboard_device> m_kb;
required_device<ram_device> m_ram; required_device<ram_device> m_ram;
required_device<rs232_port_device> m_rs232; required_device<rs232_port_device> m_rs232;
optional_shared_ptr<UINT8> m_video_ram;
enum enum
{ {
@ -123,7 +125,6 @@ public:
int m_pio_astb; int m_pio_astb;
// video state // video state
UINT8 *m_video_ram;
UINT8 m_latch; UINT8 m_latch;
int m_blink; int m_blink;

View File

@ -61,12 +61,11 @@ public:
required_device<ram_device> m_ram; required_device<ram_device> m_ram;
required_shared_ptr<UINT8> m_video_ram; required_shared_ptr<UINT8> m_video_ram;
virtual void machine_start(); virtual void machine_start();
virtual void machine_reset(); virtual void machine_reset();
virtual void video_start(); virtual void video_start();
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
DECLARE_READ8_MEMBER( mmu_r ); DECLARE_READ8_MEMBER( mmu_r );
DECLARE_WRITE8_MEMBER( mmu_w ); DECLARE_WRITE8_MEMBER( mmu_w );
@ -102,7 +101,7 @@ public:
const UINT8 *m_key_rom; const UINT8 *m_key_rom;
// video state // video state
bitmap_ind16 m_bitmap; bitmap_rgb32 m_bitmap;
const UINT8 *m_char_rom; const UINT8 *m_char_rom;
int m_llen; int m_llen;
@ -116,7 +115,7 @@ public:
int m_recall; int m_recall;
int m_dack3; int m_dack3;
int m_tc; int m_tc;
UINT32 screen_update_mm1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_mm1(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
TIMER_DEVICE_CALLBACK_MEMBER(kbclk_tick); TIMER_DEVICE_CALLBACK_MEMBER(kbclk_tick);
DECLARE_FLOPPY_FORMATS( floppy_formats ); DECLARE_FLOPPY_FORMATS( floppy_formats );
}; };

View File

@ -27,6 +27,7 @@ public:
m_ram(*this, RAM_TAG), m_ram(*this, RAM_TAG),
m_terminal(*this, TERMINAL_TAG), m_terminal(*this, TERMINAL_TAG),
m_s100(*this, S100_TAG), m_s100(*this, S100_TAG),
m_map_ram(*this, "map_ram"),
m_nmi(1), m_nmi(1),
m_pint(1), m_pint(1),
m_int_pend(0), m_int_pend(0),
@ -44,6 +45,7 @@ public:
required_device<ram_device> m_ram; required_device<ram_device> m_ram;
required_device<generic_terminal_device> m_terminal; required_device<generic_terminal_device> m_terminal;
required_device<s100_device> m_s100; required_device<s100_device> m_s100;
optional_shared_ptr<UINT8> m_map_ram;
virtual void machine_start(); virtual void machine_start();
virtual void machine_reset(); virtual void machine_reset();
@ -94,7 +96,6 @@ public:
int m_trap_int; int m_trap_int;
int m_trap_stop; int m_trap_stop;
int m_trap_aux; int m_trap_aux;
UINT8 *m_map_ram;
DECLARE_DRIVER_INIT(mpz80); DECLARE_DRIVER_INIT(mpz80);
}; };

View File

@ -8,8 +8,6 @@
#include "cpu/i86/i86.h" #include "cpu/i86/i86.h"
#include "cpu/mcs48/mcs48.h" #include "cpu/mcs48/mcs48.h"
#include "formats/pc_dsk.h" #include "formats/pc_dsk.h"
#include "formats/mfi_dsk.h"
#include "imagedev/flopdrv.h"
#include "machine/am9517a.h" #include "machine/am9517a.h"
#include "machine/ctronics.h" #include "machine/ctronics.h"
#include "machine/ins8250.h" #include "machine/ins8250.h"
@ -59,6 +57,7 @@ public:
m_floppy0(*this, PC_FDC_XT_TAG ":0:525dd" ), m_floppy0(*this, PC_FDC_XT_TAG ":0:525dd" ),
m_floppy1(*this, PC_FDC_XT_TAG ":1:525dd" ), m_floppy1(*this, PC_FDC_XT_TAG ":1:525dd" ),
m_bus(*this, ISA_BUS_TAG), m_bus(*this, ISA_BUS_TAG),
m_video_ram(*this, "video_ram"),
m_pit1(0), m_pit1(0),
m_pit2(0), m_pit2(0),
m_status1(0), m_status1(0),
@ -94,6 +93,7 @@ public:
required_device<floppy_image_device> m_floppy0; required_device<floppy_image_device> m_floppy0;
optional_device<floppy_image_device> m_floppy1; optional_device<floppy_image_device> m_floppy1;
required_device<isa8_device> m_bus; required_device<isa8_device> m_bus;
optional_shared_ptr<UINT8> m_video_ram;
virtual void machine_start(); virtual void machine_start();
virtual void machine_reset(); virtual void machine_reset();
@ -196,8 +196,7 @@ public:
UINT8 m_printer_control; UINT8 m_printer_control;
// video state // video state
UINT8 *m_video_ram; const UINT8 *m_char_rom;
UINT8 *m_char_rom;
int m_toggle; int m_toggle;
int m_lpen; int m_lpen;
int m_blink; int m_blink;

View File

@ -7,7 +7,6 @@
#include "emu.h" #include "emu.h"
#include "cpu/z80/z80.h" #include "cpu/z80/z80.h"
#include "cpu/z80/z80daisy.h" #include "cpu/z80/z80daisy.h"
#include "imagedev/flopdrv.h"
#include "machine/ecbbus.h" #include "machine/ecbbus.h"
#include "machine/ecb_grip.h" #include "machine/ecb_grip.h"
#include "machine/ram.h" #include "machine/ram.h"
@ -18,7 +17,6 @@
#define Z80_TAG "z1" #define Z80_TAG "z1"
#define UPD765_TAG "z38" #define UPD765_TAG "z38"
#define UPD1990A_TAG "z43" #define UPD1990A_TAG "z43"
#define SCREEN_TAG "screen"
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------

View File

@ -40,7 +40,8 @@ public:
m_fdc(*this, FD1797_TAG), m_fdc(*this, FD1797_TAG),
m_ram(*this, RAM_TAG), m_ram(*this, RAM_TAG),
m_floppy0(*this, FD1797_TAG":0"), m_floppy0(*this, FD1797_TAG":0"),
m_floppy1(*this, FD1797_TAG":1") m_floppy1(*this, FD1797_TAG":1"),
m_video_ram(*this, "video_ram")
{ } { }
required_device<cpu_device> m_maincpu; required_device<cpu_device> m_maincpu;
@ -49,10 +50,11 @@ public:
required_device<ram_device> m_ram; required_device<ram_device> m_ram;
required_device<floppy_connector> m_floppy0; required_device<floppy_connector> m_floppy0;
required_device<floppy_connector> m_floppy1; required_device<floppy_connector> m_floppy1;
optional_shared_ptr<UINT8> m_video_ram;
virtual void machine_start(); virtual void machine_start();
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
DECLARE_READ8_MEMBER( gfxram_r ); DECLARE_READ8_MEMBER( gfxram_r );
DECLARE_WRITE8_MEMBER( gfxram_w ); DECLARE_WRITE8_MEMBER( gfxram_w );
@ -72,7 +74,6 @@ public:
int m_vire; int m_vire;
/* video state */ /* video state */
UINT8 *m_video_ram;
UINT8 m_scroll; UINT8 m_scroll;
UINT8 m_mode; UINT8 m_mode;
UINT8 m_palette; UINT8 m_palette;

View File

@ -31,13 +31,16 @@ public:
m_vis(*this, CDP1869_TAG), m_vis(*this, CDP1869_TAG),
m_cassette(*this, CASSETTE_TAG), m_cassette(*this, CASSETTE_TAG),
m_ram(*this, RAM_TAG), m_ram(*this, RAM_TAG),
m_page_ram(*this, "page_ram") m_page_ram(*this, "page_ram"),
m_color_ram(*this, "color_ram")
{ } { }
required_device<cosmac_device> m_maincpu; required_device<cosmac_device> m_maincpu;
required_device<cdp1869_device> m_vis; required_device<cdp1869_device> m_vis;
required_device<cassette_image_device> m_cassette; required_device<cassette_image_device> m_cassette;
required_device<ram_device> m_ram; required_device<ram_device> m_ram;
required_shared_ptr<UINT8> m_page_ram;
optional_shared_ptr<UINT8> m_color_ram;
virtual void machine_start(); virtual void machine_start();
@ -60,9 +63,7 @@ public:
int m_vismac_bkg_latch; // background color latch int m_vismac_bkg_latch; // background color latch
int m_blink; // cursor blink int m_blink; // cursor blink
required_shared_ptr<UINT8> m_page_ram; // page memory const UINT8 *m_char_rom;
UINT8 *m_color_ram; // color memory
UINT8 *m_char_rom; // character generator ROM
// keyboard state // keyboard state
int m_keylatch; // key latch int m_keylatch; // key latch

View File

@ -51,7 +51,8 @@ public:
m_floppy3(*this, FD1791_TAG":3"), m_floppy3(*this, FD1791_TAG":3"),
m_floppy(NULL), m_floppy(NULL),
m_ram(*this, RAM_TAG), m_ram(*this, RAM_TAG),
m_kb(*this, TRS80M2_KEYBOARD_TAG) m_kb(*this, TRS80M2_KEYBOARD_TAG),
m_video_ram(*this, "video_ram")
{ } { }
required_device<cpu_device> m_maincpu; required_device<cpu_device> m_maincpu;
@ -68,6 +69,7 @@ public:
floppy_image_device *m_floppy; floppy_image_device *m_floppy;
required_device<ram_device> m_ram; required_device<ram_device> m_ram;
required_device<trs80m2_keyboard_device> m_kb; required_device<trs80m2_keyboard_device> m_kb;
optional_shared_ptr<UINT8> m_video_ram;
virtual void machine_start(); virtual void machine_start();
virtual void machine_reset(); virtual void machine_reset();
@ -114,8 +116,7 @@ public:
int m_kbirq; int m_kbirq;
// video state // video state
UINT8 *m_video_ram; const UINT8 *m_char_rom;
UINT8 *m_char_rom;
int m_blnkvid; int m_blnkvid;
int m_80_40_char_en; int m_80_40_char_en;
int m_de; int m_de;

View File

@ -78,7 +78,8 @@ public:
m_timer_ack(*this, TIMER_ACK_TAG), m_timer_ack(*this, TIMER_ACK_TAG),
m_timer_rst(*this, TIMER_RST_TAG), m_timer_rst(*this, TIMER_RST_TAG),
m_sasibus(*this, SASIBUS_TAG ":host"), m_sasibus(*this, SASIBUS_TAG ":host"),
m_video_ram(*this, "video_ram") m_video_ram(*this, "video_ram"),
m_attr_ram(*this, "attr_ram")
{ } { }
required_device<cpu_device> m_maincpu; required_device<cpu_device> m_maincpu;
@ -99,6 +100,8 @@ public:
required_device<timer_device> m_timer_ack; required_device<timer_device> m_timer_ack;
required_device<timer_device> m_timer_rst; required_device<timer_device> m_timer_rst;
required_device<scsicb_device> m_sasibus; required_device<scsicb_device> m_sasibus;
required_shared_ptr<UINT8> m_video_ram;
optional_shared_ptr<UINT8> m_attr_ram;
virtual void machine_start(); virtual void machine_start();
virtual void machine_reset(); virtual void machine_reset();
@ -164,8 +167,6 @@ public:
UINT8 m_bank; // bank register UINT8 m_bank; // bank register
// video state // video state
required_shared_ptr<UINT8> m_video_ram; // video RAM
UINT8 *m_attr_ram; // attribute RAM
UINT8 m_attr; // attribute latch UINT8 m_attr; // attribute latch
// sasi state // sasi state

View File

@ -69,6 +69,8 @@ public:
DECLARE_READ8_MEMBER( prom_disable_r ); DECLARE_READ8_MEMBER( prom_disable_r );
DECLARE_WRITE8_MEMBER( baud_w ); DECLARE_WRITE8_MEMBER( baud_w );
DECLARE_WRITE8_MEMBER( i8251_b_data_w ); DECLARE_WRITE8_MEMBER( i8251_b_data_w );
DECLARE_READ8_MEMBER( fdc_r );
DECLARE_WRITE8_MEMBER( fdc_w );
DECLARE_READ8_MEMBER( fdc_wait_r ); DECLARE_READ8_MEMBER( fdc_wait_r );
DECLARE_WRITE8_MEMBER( fdc_dcont_w ); DECLARE_WRITE8_MEMBER( fdc_dcont_w );
DECLARE_WRITE8_MEMBER( fdc_dsel_w ); DECLARE_WRITE8_MEMBER( fdc_dsel_w );

View File

@ -388,8 +388,9 @@ c64h156_device::c64h156_device(const machine_config &mconfig, const char *tag, d
device_execute_interface(mconfig, *this), device_execute_interface(mconfig, *this),
m_icount(0), m_icount(0),
m_image(*this->owner(), FLOPPY_0), m_image(*this->owner(), FLOPPY_0),
m_track_buffer(*this, "track_buffer"),
m_speed_buffer(*this, "speed_buffer"),
m_side(0), m_side(0),
m_track_buffer(NULL),
m_track_len(0), m_track_len(0),
m_buffer_pos(0), m_buffer_pos(0),
m_bit_pos(0), m_bit_pos(0),
@ -429,8 +430,8 @@ void c64h156_device::device_start()
m_icountptr = &m_icount; m_icountptr = &m_icount;
// allocate track buffer // allocate track buffer
m_track_buffer = auto_alloc_array(machine(), UINT8, G64_BUFFER_SIZE); m_track_buffer.allocate(G64_BUFFER_SIZE);
m_speed_buffer = auto_alloc_array(machine(), UINT8, G64_SPEED_BLOCK_SIZE); m_speed_buffer.allocate(G64_SPEED_BLOCK_SIZE);
// resolve callbacks // resolve callbacks
m_out_atn_func.resolve(m_out_atn_cb, *this); m_out_atn_func.resolve(m_out_atn_cb, *this);
@ -440,8 +441,6 @@ void c64h156_device::device_start()
// register for state saving // register for state saving
save_item(NAME(m_shift)); save_item(NAME(m_shift));
save_item(NAME(m_side)); save_item(NAME(m_side));
save_pointer(NAME(m_track_buffer), G64_BUFFER_SIZE);
save_pointer(NAME(m_speed_buffer), G64_SPEED_BLOCK_SIZE);
save_item(NAME(m_track_len)); save_item(NAME(m_track_len));
save_item(NAME(m_buffer_pos)); save_item(NAME(m_buffer_pos));
save_item(NAME(m_bit_pos)); save_item(NAME(m_bit_pos));

View File

@ -145,12 +145,12 @@ private:
devcb_resolved_write_line m_out_byte_func; devcb_resolved_write_line m_out_byte_func;
required_device<legacy_floppy_image_device> m_image; required_device<legacy_floppy_image_device> m_image;
optional_shared_ptr<UINT8> m_track_buffer; // track data buffer
optional_shared_ptr<UINT8> m_speed_buffer; // speed block buffer
// track // track
UINT16 m_shift; UINT16 m_shift;
int m_side; // disk side int m_side; // disk side
UINT8 *m_track_buffer; // track data buffer
UINT8 *m_speed_buffer; // speed block buffer
int m_track_len; // track length int m_track_len; // track length
offs_t m_buffer_pos; // current byte position within track buffer offs_t m_buffer_pos; // current byte position within track buffer
int m_bit_pos; // current bit position within track buffer byte int m_bit_pos; // current bit position within track buffer byte

View File

@ -178,8 +178,9 @@ adam_fdc_device::adam_fdc_device(const machine_config &mconfig, const char *tag,
m_maincpu(*this, M6801_TAG), m_maincpu(*this, M6801_TAG),
m_fdc(*this, WD2793_TAG), m_fdc(*this, WD2793_TAG),
m_floppy0(*this, WD2793_TAG":0"), m_floppy0(*this, WD2793_TAG":0"),
m_floppy(NULL),
m_ram(*this, "ram"), m_ram(*this, "ram"),
m_image0(NULL) m_sw3(*this, "SW3")
{ {
} }
@ -190,7 +191,7 @@ adam_fdc_device::adam_fdc_device(const machine_config &mconfig, const char *tag,
void adam_fdc_device::device_start() void adam_fdc_device::device_start()
{ {
m_fdc->setup_intrq_cb(wd2793_t::line_cb(FUNC(adam_fdc_device::fdc_intrq_w), this)); m_fdc->setup_intrq_cb(wd_fdc_t::line_cb(FUNC(adam_fdc_device::fdc_intrq_w), this));
} }
@ -236,7 +237,7 @@ READ8_MEMBER( adam_fdc_device::p1_r )
data |= m_fdc->drq_r() ? 0x04 : 0x00; data |= m_fdc->drq_r() ? 0x04 : 0x00;
// drive select // drive select
data |= ioport("SW3")->read() << 7; data |= m_sw3->read() << 7;
return data; return data;
} }
@ -270,17 +271,17 @@ WRITE8_MEMBER( adam_fdc_device::p1_w )
m_fdc->dden_w(BIT(data, 3)); m_fdc->dden_w(BIT(data, 3));
// drive select // drive select
m_image0 = NULL; m_floppy = NULL;
if (BIT(data, 5)) if (BIT(data, 5))
{ {
m_image0 = m_floppy0->get_device(); m_floppy = m_floppy0->get_device();
} }
m_fdc->set_floppy(m_image0); m_fdc->set_floppy(m_floppy);
// motor enable // motor enable
if (m_image0) m_image0->mon_w(!BIT(data, 6)); if (m_floppy) m_floppy->mon_w(!BIT(data, 6));
} }

View File

@ -15,9 +15,6 @@
#include "emu.h" #include "emu.h"
#include "cpu/m6800/m6800.h" #include "cpu/m6800/m6800.h"
#include "formats/adam_dsk.h" #include "formats/adam_dsk.h"
#include "formats/hxcmfm_dsk.h"
#include "formats/mfi_dsk.h"
#include "imagedev/floppy.h"
#include "machine/adamnet.h" #include "machine/adamnet.h"
#include "machine/wd_fdc.h" #include "machine/wd_fdc.h"
@ -62,9 +59,9 @@ protected:
required_device<cpu_device> m_maincpu; required_device<cpu_device> m_maincpu;
required_device<wd2793_t> m_fdc; required_device<wd2793_t> m_fdc;
required_device<floppy_connector> m_floppy0; required_device<floppy_connector> m_floppy0;
floppy_image_device *m_floppy;
required_shared_ptr<UINT8> m_ram; required_shared_ptr<UINT8> m_ram;
required_ioport m_sw3;
floppy_image_device *m_image0;
}; };

View File

@ -1047,6 +1047,7 @@ SLOT_INTERFACE_START( cbm_iec_devices )
SLOT_INTERFACE("c1581", C1581) SLOT_INTERFACE("c1581", C1581)
SLOT_INTERFACE("cmdhd", CMD_HD) SLOT_INTERFACE("cmdhd", CMD_HD)
SLOT_INTERFACE("fd2000", FD2000) SLOT_INTERFACE("fd2000", FD2000)
SLOT_INTERFACE("fd4000", FD4000)
SLOT_INTERFACE("interpod", INTERPOD) SLOT_INTERFACE("interpod", INTERPOD)
SLOT_INTERFACE("minichief", MINI_CHIEF) SLOT_INTERFACE("minichief", MINI_CHIEF)
SLOT_INTERFACE("serialbox", SERIAL_BOX) SLOT_INTERFACE("serialbox", SERIAL_BOX)

View File

@ -163,8 +163,8 @@ void comx_fd_device::device_start()
m_rom = memregion("c000")->base(); m_rom = memregion("c000")->base();
// initialize floppy controller // initialize floppy controller
m_fdc->setup_intrq_cb(wd1770_t::line_cb(FUNC(comx_fd_device::intrq_w), this)); m_fdc->setup_intrq_cb(wd_fdc_t::line_cb(FUNC(comx_fd_device::intrq_w), this));
m_fdc->setup_drq_cb(wd1770_t::line_cb(FUNC(comx_fd_device::drq_w), this)); m_fdc->setup_drq_cb(wd_fdc_t::line_cb(FUNC(comx_fd_device::drq_w), this));
m_fdc->dden_w(1); m_fdc->dden_w(1);
// state saving // state saving

View File

@ -36,7 +36,8 @@ const device_type COMX_RAM = &device_creator<comx_ram_device>;
comx_ram_device::comx_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : comx_ram_device::comx_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, COMX_RAM, "COMX-35 RAM Card", tag, owner, clock), device_t(mconfig, COMX_RAM, "COMX-35 RAM Card", tag, owner, clock),
device_comx_expansion_card_interface(mconfig, *this) device_comx_expansion_card_interface(mconfig, *this),
m_ram(*this, "ram")
{ {
} }
@ -47,10 +48,7 @@ comx_ram_device::comx_ram_device(const machine_config &mconfig, const char *tag,
void comx_ram_device::device_start() void comx_ram_device::device_start()
{ {
m_ram = auto_alloc_array(machine(), UINT8, RAM_SIZE); m_ram.allocate(RAM_SIZE);
// state saving
save_pointer(NAME(m_ram), RAM_SIZE);
} }
@ -73,7 +71,7 @@ UINT8 comx_ram_device::comx_mrd_r(address_space &space, offs_t offset, int *extr
if (offset >= 0xc000 && offset < 0xd000) if (offset >= 0xc000 && offset < 0xd000)
{ {
data = m_ram[(m_ram_bank << 12) | (offset & 0xfff)]; data = m_ram[(m_bank << 12) | (offset & 0xfff)];
} }
return data; return data;
@ -88,7 +86,7 @@ void comx_ram_device::comx_mwr_w(address_space &space, offs_t offset, UINT8 data
{ {
if (offset >= 0xc000 && offset < 0xd000) if (offset >= 0xc000 && offset < 0xd000)
{ {
m_ram[(m_ram_bank << 12) | (offset & 0xfff)] = data; m_ram[(m_bank << 12) | (offset & 0xfff)] = data;
} }
} }
@ -101,6 +99,6 @@ void comx_ram_device::comx_io_w(address_space &space, offs_t offset, UINT8 data)
{ {
if (offset == 1) if (offset == 1)
{ {
m_ram_bank = (data >> 4) & 0x03; m_bank = (data >> 4) & 0x03;
} }
} }

View File

@ -43,8 +43,9 @@ protected:
virtual void comx_io_w(address_space &space, offs_t offset, UINT8 data); virtual void comx_io_w(address_space &space, offs_t offset, UINT8 data);
private: private:
UINT8 *m_ram; optional_shared_ptr<UINT8> m_ram;
int m_ram_bank;
int m_bank;
}; };

View File

@ -46,7 +46,8 @@ const device_type WANGPC_EMB = &device_creator<wangpc_emb_device>;
wangpc_emb_device::wangpc_emb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wangpc_emb_device::wangpc_emb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, WANGPC_EMB, "Wang PC-PM031-B", tag, owner, clock), device_t(mconfig, WANGPC_EMB, "Wang PC-PM031-B", tag, owner, clock),
device_wangpcbus_card_interface(mconfig, *this) device_wangpcbus_card_interface(mconfig, *this),
m_ram(*this, "ram")
{ {
} }
@ -58,10 +59,9 @@ wangpc_emb_device::wangpc_emb_device(const machine_config &mconfig, const char *
void wangpc_emb_device::device_start() void wangpc_emb_device::device_start()
{ {
// allocate memory // allocate memory
m_ram = auto_alloc_array(machine(), UINT16, RAM_SIZE); m_ram.allocate(RAM_SIZE);
// state saving // state saving
save_pointer(NAME(m_ram), RAM_SIZE);
save_item(NAME(m_option)); save_item(NAME(m_option));
save_item(NAME(m_parity_error)); save_item(NAME(m_parity_error));
save_item(NAME(m_parity_odd)); save_item(NAME(m_parity_odd));

View File

@ -44,7 +44,7 @@ protected:
virtual void wangpcbus_aiowc_w(address_space &space, offs_t offset, UINT16 mem_mask, UINT16 data); virtual void wangpcbus_aiowc_w(address_space &space, offs_t offset, UINT16 mem_mask, UINT16 data);
private: private:
UINT16 *m_ram; optional_shared_ptr<UINT16> m_ram;
UINT16 m_option; UINT16 m_option;
int m_parity_error; int m_parity_error;
int m_parity_odd; int m_parity_odd;

View File

@ -189,6 +189,7 @@ wangpc_lvc_device::wangpc_lvc_device(const machine_config &mconfig, const char *
device_t(mconfig, WANGPC_LVC, "Wang PC Low Resolution Video Card", tag, owner, clock), device_t(mconfig, WANGPC_LVC, "Wang PC Low Resolution Video Card", tag, owner, clock),
device_wangpcbus_card_interface(mconfig, *this), device_wangpcbus_card_interface(mconfig, *this),
m_crtc(*this, MC6845_TAG), m_crtc(*this, MC6845_TAG),
m_video_ram(*this, "video_ram"),
m_option(0), m_option(0),
m_irq(CLEAR_LINE) m_irq(CLEAR_LINE)
{ {
@ -202,10 +203,9 @@ wangpc_lvc_device::wangpc_lvc_device(const machine_config &mconfig, const char *
void wangpc_lvc_device::device_start() void wangpc_lvc_device::device_start()
{ {
// allocate memory // allocate memory
m_video_ram = auto_alloc_array(machine(), UINT16, RAM_SIZE); m_video_ram.allocate(RAM_SIZE);
// state saving // state saving
save_pointer(NAME(m_video_ram), RAM_SIZE);
save_item(NAME(m_option)); save_item(NAME(m_option));
save_item(NAME(m_scroll)); save_item(NAME(m_scroll));
save_item(NAME(m_irq)); save_item(NAME(m_irq));

View File

@ -54,11 +54,10 @@ protected:
private: private:
inline void set_irq(int state); inline void set_irq(int state);
// internal state
required_device<mc6845_device> m_crtc; required_device<mc6845_device> m_crtc;
optional_shared_ptr<UINT16> m_video_ram;
rgb_t m_palette[16]; rgb_t m_palette[16];
UINT16 *m_video_ram;
UINT8 m_option; UINT8 m_option;
UINT16 m_scroll; UINT16 m_scroll;
int m_irq; int m_irq;

View File

@ -209,6 +209,9 @@ wangpc_mvc_device::wangpc_mvc_device(const machine_config &mconfig, const char *
device_t(mconfig, WANGPC_MVC, "Wang PC Medium Resolution Video Card", tag, owner, clock), device_t(mconfig, WANGPC_MVC, "Wang PC Medium Resolution Video Card", tag, owner, clock),
device_wangpcbus_card_interface(mconfig, *this), device_wangpcbus_card_interface(mconfig, *this),
m_crtc(*this, MC6845_TAG), m_crtc(*this, MC6845_TAG),
m_video_ram(*this, "video_ram"),
m_char_ram(*this, "char_ram"),
m_bitmap_ram(*this, "bitmap_ram"),
m_option(0), m_option(0),
m_irq(CLEAR_LINE) m_irq(CLEAR_LINE)
{ {
@ -222,14 +225,11 @@ wangpc_mvc_device::wangpc_mvc_device(const machine_config &mconfig, const char *
void wangpc_mvc_device::device_start() void wangpc_mvc_device::device_start()
{ {
// allocate memory // allocate memory
m_video_ram = auto_alloc_array(machine(), UINT16, VIDEO_RAM_SIZE); m_video_ram.allocate(VIDEO_RAM_SIZE);
m_char_ram = auto_alloc_array(machine(), UINT16, CHAR_RAM_SIZE); m_char_ram.allocate(CHAR_RAM_SIZE);
m_bitmap_ram = auto_alloc_array(machine(), UINT16, BITMAP_RAM_SIZE); m_bitmap_ram.allocate(BITMAP_RAM_SIZE);
// state saving // state saving
save_pointer(NAME(m_video_ram), VIDEO_RAM_SIZE);
save_pointer(NAME(m_char_ram), CHAR_RAM_SIZE);
save_pointer(NAME(m_bitmap_ram), BITMAP_RAM_SIZE);
save_item(NAME(m_option)); save_item(NAME(m_option));
save_item(NAME(m_irq)); save_item(NAME(m_irq));
} }

View File

@ -54,12 +54,11 @@ protected:
private: private:
inline void set_irq(int state); inline void set_irq(int state);
// internal state
required_device<mc6845_device> m_crtc; required_device<mc6845_device> m_crtc;
optional_shared_ptr<UINT16> m_video_ram;
optional_shared_ptr<UINT16> m_char_ram;
optional_shared_ptr<UINT16> m_bitmap_ram;
UINT16 *m_video_ram;
UINT16 *m_char_ram;
UINT16 *m_bitmap_ram;
UINT8 m_option; UINT8 m_option;
int m_irq; int m_irq;
}; };

View File

@ -265,7 +265,8 @@ wangpc_rtc_device::wangpc_rtc_device(const machine_config &mconfig, const char *
m_dmac(*this, AM9517A_TAG), m_dmac(*this, AM9517A_TAG),
m_ctc0(*this, Z80CTC_0_TAG), m_ctc0(*this, Z80CTC_0_TAG),
m_ctc1(*this, Z80CTC_1_TAG), m_ctc1(*this, Z80CTC_1_TAG),
m_sio(*this, Z80SIO_TAG) m_sio(*this, Z80SIO_TAG),
m_char_ram(*this, "char_ram")
{ {
} }
@ -276,6 +277,7 @@ wangpc_rtc_device::wangpc_rtc_device(const machine_config &mconfig, const char *
void wangpc_rtc_device::device_start() void wangpc_rtc_device::device_start()
{ {
m_char_ram.allocate(0x100);
} }

View File

@ -58,8 +58,7 @@ private:
required_device<z80ctc_device> m_ctc0; required_device<z80ctc_device> m_ctc0;
required_device<z80ctc_device> m_ctc1; required_device<z80ctc_device> m_ctc1;
required_device<z80dart_device> m_sio; required_device<z80dart_device> m_sio;
optional_shared_ptr<UINT8> m_char_ram;
UINT8 m_char_ram[256];
}; };

View File

@ -206,7 +206,7 @@ void wangpc_tig_device::device_reset()
// screen_update - // screen_update -
//------------------------------------------------- //-------------------------------------------------
UINT32 wangpc_tig_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) UINT32 wangpc_tig_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{ {
m_hgdc0->screen_update(screen, bitmap, cliprect); m_hgdc0->screen_update(screen, bitmap, cliprect);
m_hgdc1->screen_update(screen, bitmap, cliprect); m_hgdc1->screen_update(screen, bitmap, cliprect);

View File

@ -35,7 +35,7 @@ public:
// optional information overrides // optional information overrides
virtual const rom_entry *device_rom_region() const; virtual const rom_entry *device_rom_region() const;
virtual machine_config_constructor device_mconfig_additions() const; virtual machine_config_constructor device_mconfig_additions() const;
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
protected: protected:
// device-level overrides // device-level overrides

View File

@ -1051,7 +1051,7 @@ static const mc6845_interface crtc_intf =
void abc1600_state::video_start() void abc1600_state::video_start()
{ {
// allocate video RAM // allocate video RAM
m_video_ram = auto_alloc_array(machine(), UINT16, VIDEORAM_SIZE); m_video_ram.allocate(VIDEORAM_SIZE);
// find memory regions // find memory regions
m_wrmsk_rom = memregion("wrmsk")->base(); m_wrmsk_rom = memregion("wrmsk")->base();
@ -1059,7 +1059,6 @@ void abc1600_state::video_start()
m_drmsk_rom = memregion("drmsk")->base(); m_drmsk_rom = memregion("drmsk")->base();
// state saving // state saving
save_pointer(NAME(m_video_ram), VIDEORAM_SIZE);
save_item(NAME(m_endisp)); save_item(NAME(m_endisp));
save_item(NAME(m_clocks_disabled)); save_item(NAME(m_clocks_disabled));
save_item(NAME(m_gmdi)); save_item(NAME(m_gmdi));

View File

@ -180,7 +180,7 @@ void abc80_state::video_start()
m_vsync_on_timer->adjust(screen->time_until_pos(16, 0), 0, screen->frame_period()); m_vsync_on_timer->adjust(screen->time_until_pos(16, 0), 0, screen->frame_period());
// allocate memory // allocate memory
m_video_ram = auto_alloc_array(machine(), UINT8, 0x400); m_video_ram.allocate(0x400);
// find memory regions // find memory regions
m_char_rom = memregion("chargen")->base(); m_char_rom = memregion("chargen")->base();

View File

@ -8,7 +8,6 @@
#define __CRTC_EGA__ #define __CRTC_EGA__
#include "emu.h" #include "emu.h"
#include "machine/devhelpr.h"
#define CRTC_EGA_INTERFACE(name) \ #define CRTC_EGA_INTERFACE(name) \
const crtc_ega_interface (name) = const crtc_ega_interface (name) =

View File

@ -551,7 +551,7 @@ void pc1512_state::video_start()
m_char_rom = memregion(AMS40041_TAG)->base(); m_char_rom = memregion(AMS40041_TAG)->base();
// allocate memory // allocate memory
m_video_ram = auto_alloc_array(machine(), UINT8, 0x10000); m_video_ram.allocate(0x10000);
} }

View File

@ -369,7 +369,7 @@ static const mc6845_interface crtc_intf =
void pc1640_state::video_start() void pc1640_state::video_start()
{ {
// allocate memory // allocate memory
m_video_ram = auto_alloc_array(machine(), UINT8, 0x20000); m_video_ram.allocate(0x20000);
} }

View File

@ -110,14 +110,12 @@ static CDP1869_INTERFACE( vis_intf )
void tmc600_state::video_start() void tmc600_state::video_start()
{ {
// allocate memory // allocate memory
m_color_ram = auto_alloc_array(machine(), UINT8, TMC600_PAGE_RAM_SIZE); m_color_ram.allocate(TMC600_PAGE_RAM_SIZE);
// find memory regions // find memory regions
m_char_rom = memregion("chargen")->base(); m_char_rom = memregion("chargen")->base();
// register for state saving // register for state saving
save_pointer(NAME(m_color_ram), TMC600_PAGE_RAM_SIZE);
save_item(NAME(m_vismac_reg_latch)); save_item(NAME(m_vismac_reg_latch));
save_item(NAME(m_vismac_color_latch)); save_item(NAME(m_vismac_color_latch));
save_item(NAME(m_vismac_bkg_latch)); save_item(NAME(m_vismac_bkg_latch));

View File

@ -53,7 +53,6 @@ WRITE8_MEMBER( v1050_state::videoram_w )
static MC6845_UPDATE_ROW( v1050_update_row ) static MC6845_UPDATE_ROW( v1050_update_row )
{ {
v1050_state *state = device->machine().driver_data<v1050_state>(); v1050_state *state = device->machine().driver_data<v1050_state>();
const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
int column, bit; int column, bit;
@ -80,7 +79,7 @@ static MC6845_UPDATE_ROW( v1050_update_row )
/* display blank */ /* display blank */
if (attr & V1050_ATTR_BLANK) color = 0; if (attr & V1050_ATTR_BLANK) color = 0;
bitmap.pix32(y, x) = palette[color]; bitmap.pix32(y, x) = RGB_MONOCHROME_GREEN_HIGHLIGHT[color];
data <<= 1; data <<= 1;
} }
@ -108,25 +107,15 @@ static const mc6845_interface crtc_intf =
NULL NULL
}; };
/* Palette */
static PALETTE_INIT( v1050 )
{
palette_set_color(machine, 0, RGB_BLACK); /* black */
palette_set_color_rgb(machine, 1, 0x00, 0xc0, 0x00); /* green */
palette_set_color_rgb(machine, 2, 0x00, 0xff, 0x00); /* bright green */
}
/* Video Start */ /* Video Start */
void v1050_state::video_start() void v1050_state::video_start()
{ {
/* allocate memory */ /* allocate memory */
m_attr_ram = auto_alloc_array(machine(), UINT8, V1050_VIDEORAM_SIZE); m_attr_ram.allocate(V1050_VIDEORAM_SIZE);
/* register for state saving */ /* register for state saving */
save_item(NAME(m_attr)); save_item(NAME(m_attr));
save_pointer(NAME(m_attr_ram), V1050_VIDEORAM_SIZE);
} }
/* Machine Drivers */ /* Machine Drivers */
@ -141,7 +130,4 @@ MACHINE_CONFIG_FRAGMENT( v1050_video )
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
MCFG_SCREEN_SIZE(640, 400) MCFG_SCREEN_SIZE(640, 400)
MCFG_SCREEN_VISIBLE_AREA(0,640-1, 0, 400-1) MCFG_SCREEN_VISIBLE_AREA(0,640-1, 0, 400-1)
MCFG_PALETTE_LENGTH(3)
MCFG_PALETTE_INIT(v1050)
MACHINE_CONFIG_END MACHINE_CONFIG_END