From 4088eb80cffa1d54d9a25a521a5b7c0e2377febf Mon Sep 17 00:00:00 2001 From: Robbbert Date: Mon, 20 Jul 2020 00:51:01 +1000 Subject: [PATCH] ut88,unistar,tricep: cleanup --- hash/ut88.xml | 14 ++++++-- scripts/target/mame/mess.lua | 1 - src/mame/drivers/tricep.cpp | 33 ++++++++++-------- src/mame/drivers/unistar.cpp | 41 ++++++++++++++++------- src/mame/drivers/ut88.cpp | 65 +++++++++++++++++++++++++----------- src/mame/includes/ut88.h | 52 ++++++++++++----------------- src/mame/machine/ut88.cpp | 47 +++++++++++++------------- src/mame/video/ut88.cpp | 39 ---------------------- 8 files changed, 152 insertions(+), 140 deletions(-) delete mode 100644 src/mame/video/ut88.cpp diff --git a/hash/ut88.xml b/hash/ut88.xml index 203abeb6c96..e8f8cda2062 100644 --- a/hash/ut88.xml +++ b/hash/ut88.xml @@ -2,14 +2,18 @@ - + Mikro/80 BASIC 19?? <unknown> + @@ -17,6 +21,9 @@ license:CC0 + Changer (v1.1) (CP/M) 19?? @@ -28,10 +35,11 @@ license:CC0 - + CP/M (v2.2, 35K) 19?? <unknown> + @@ -43,6 +51,7 @@ license:CC0 CP/M (v2.2, 256K) 19?? <unknown> + @@ -54,6 +63,7 @@ license:CC0 Tetris 19?? <unknown> + diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index 1345507c35e..43aa781e636 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -1995,7 +1995,6 @@ files { MAME_DIR .. "src/mame/drivers/ut88.cpp", MAME_DIR .. "src/mame/includes/ut88.h", MAME_DIR .. "src/mame/machine/ut88.cpp", - MAME_DIR .. "src/mame/video/ut88.cpp", MAME_DIR .. "src/mame/drivers/vector06.cpp", MAME_DIR .. "src/mame/includes/vector06.h", MAME_DIR .. "src/mame/machine/vector06.cpp", diff --git a/src/mame/drivers/tricep.cpp b/src/mame/drivers/tricep.cpp index 585ca85a91b..b7ebd2c1db3 100644 --- a/src/mame/drivers/tricep.cpp +++ b/src/mame/drivers/tricep.cpp @@ -24,8 +24,8 @@ public: tricep_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") - , m_usart(*this, "usart%u", 0) - , m_p_ram(*this, "p_ram") + , m_usart(*this, "usart%u", 0U) + , m_ram(*this, "mainram") { } @@ -35,13 +35,14 @@ private: uint8_t usart_r(offs_t offset); void usart_w(offs_t offset, uint8_t data); - void tricep_mem(address_map &map); + void mem_map(address_map &map); - virtual void machine_reset() override; + void machine_reset() override; + void machine_start() override; required_device m_maincpu; required_device_array m_usart; - required_shared_ptr m_p_ram; + required_shared_ptr m_ram; uint8_t m_mux; }; @@ -63,11 +64,11 @@ void tricep_state::usart_w(offs_t offset, uint8_t data) m_usart[m_mux]->write(offset, data); } -void tricep_state::tricep_mem(address_map &map) +void tricep_state::mem_map(address_map &map) { map.unmap_value_high(); - map(0x00000000, 0x0007ffff).ram().share("p_ram"); - map(0x00fd0000, 0x00fd1fff).rom().region("bios", 0); + map(0x00000000, 0x0007ffff).ram().share("mainram"); + map(0x00fd0000, 0x00fd1fff).rom().region("maincpu", 0); map(0x00ff0028, 0x00ff002b).rw(FUNC(tricep_state::usart_r), FUNC(tricep_state::usart_w)); map(0x00ff002e, 0x00ff002f).nopr(); map(0x00ff002f, 0x00ff002f).w(FUNC(tricep_state::usart_select_w)); @@ -80,15 +81,20 @@ INPUT_PORTS_END void tricep_state::machine_reset() { - uint8_t* bios = memregion("bios")->base(); + uint8_t* bios = memregion("maincpu")->base(); - memcpy((uint8_t*)m_p_ram.target(),bios,0x2000); + memcpy((uint8_t*)m_ram.target(),bios,0x2000); m_maincpu->reset(); m_mux = 0; } +void tricep_state::machine_start() +{ + save_item(NAME(m_mux)); +} + static const input_device_default terminal_defaults[] = { DEVICE_INPUT_DEFAULTS( "RS232_RXBAUD", 0xff, RS232_BAUD_9600 ) @@ -103,7 +109,7 @@ static const input_device_default terminal_defaults[] = void tricep_state::tricep(machine_config &config) { M68000(config, m_maincpu, 20_MHz_XTAL / 2); - m_maincpu->set_addrmap(AS_PROGRAM, &tricep_state::tricep_mem); + m_maincpu->set_addrmap(AS_PROGRAM, &tricep_state::mem_map); // TODO: MC68451 MMU SCN2651(config, m_usart[0], 5.0688_MHz_XTAL); @@ -125,7 +131,7 @@ void tricep_state::tricep(machine_config &config) /* ROM definition */ ROM_START( tricep ) - ROM_REGION16_BE( 0x2000, "bios", ROMREGION_ERASEFF ) + ROM_REGION16_BE( 0x2000, "maincpu", 0 ) ROM_LOAD16_BYTE( "tri2.4_odd.u37", 0x0001, 0x1000, CRC(31eb2dcf) SHA1(2d9df9262ee1096d0398505e10d209201ac49a5d)) ROM_LOAD16_BYTE( "tri2.4_even.u36", 0x0000, 0x1000, CRC(4414dcdc) SHA1(00a3d293617dc691748ae85b6ccdd6723daefc0a)) ROM_END @@ -133,4 +139,5 @@ ROM_END /* Driver */ // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP( 1985, tricep, 0, 0, tricep, tricep, tricep_state, empty_init, "Morrow Designs", "Tricep", MACHINE_NOT_WORKING | MACHINE_NO_SOUND) +COMP( 1985, tricep, 0, 0, tricep, tricep, tricep_state, empty_init, "Morrow Designs", "Tricep", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) + diff --git a/src/mame/drivers/unistar.cpp b/src/mame/drivers/unistar.cpp index 6eaa740d451..ea086d988f9 100644 --- a/src/mame/drivers/unistar.cpp +++ b/src/mame/drivers/unistar.cpp @@ -30,6 +30,7 @@ public: : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") , m_chargen(*this, "chargen") + , m_palette(*this, "palette") { } void unistar(machine_config &config); @@ -44,11 +45,12 @@ private: void unistar_palette(palette_device &palette) const; I8275_DRAW_CHARACTER_MEMBER(draw_character); - void unistar_io(address_map &map); - void unistar_mem(address_map &map); + void io_map(address_map &map); + void mem_map(address_map &map); required_device m_maincpu; required_region_ptr m_chargen; + required_device m_palette; }; @@ -62,14 +64,14 @@ void unistar_state::dma_mem_w(offs_t offset, u8 data) m_maincpu->space(AS_PROGRAM).write_byte(offset, data); } -void unistar_state::unistar_mem(address_map &map) +void unistar_state::mem_map(address_map &map) { map.unmap_value_high(); map(0x0000, 0x2fff).rom(); map(0x8000, 0x97ff).ram(); } -void unistar_state::unistar_io(address_map &map) +void unistar_state::io_map(address_map &map) { //map.unmap_value_high(); map(0x00, 0x0f).rw("dmac", FUNC(am9517a_device::read), FUNC(am9517a_device::write)); @@ -133,10 +135,25 @@ void unistar_state::unistar_palette(palette_device &palette) const I8275_DRAW_CHARACTER_MEMBER(unistar_state::draw_character) { + // This code just a guess, so that we can see something + const rgb_t *palette = m_palette->palette()->entry_list_raw(); + u8 gfx = m_chargen[(linecount & 15) | (charcode << 4)]; + + if (vsp) + gfx = 0; + + if (lten) + gfx = 0xff; + + if (rvv) + gfx ^= 0xff; + + for(u8 i=0;i<8;i++) + bitmap.pix32(y, x + i) = palette[BIT(gfx, 7-i) ? (hlgt ? 2 : 1) : 0]; } /* F4 Character Displayer */ -static const gfx_layout unistar_charlayout = +static const gfx_layout charlayout = { 8, 16, /* 8 x 16 characters */ 128, /* 128 characters */ @@ -150,15 +167,15 @@ static const gfx_layout unistar_charlayout = }; static GFXDECODE_START( gfx_unistar ) - GFXDECODE_ENTRY( "chargen", 0x0000, unistar_charlayout, 0, 1 ) + GFXDECODE_ENTRY( "chargen", 0x0000, charlayout, 0, 1 ) GFXDECODE_END void unistar_state::unistar(machine_config &config) { /* basic machine hardware */ I8085A(config, m_maincpu, 20_MHz_XTAL / 2); - m_maincpu->set_addrmap(AS_PROGRAM, &unistar_state::unistar_mem); - m_maincpu->set_addrmap(AS_IO, &unistar_state::unistar_io); + m_maincpu->set_addrmap(AS_PROGRAM, &unistar_state::mem_map); + m_maincpu->set_addrmap(AS_IO, &unistar_state::io_map); INPUT_MERGER_ANY_HIGH(config, "rst65").output_handler().set_inputline(m_maincpu, I8085_RST65_LINE); INPUT_MERGER_ANY_HIGH(config, "rst75").output_handler().set_inputline(m_maincpu, I8085_RST75_LINE); @@ -205,21 +222,21 @@ void unistar_state::unistar(machine_config &config) crtc.irq_wr_callback().set("rst75", FUNC(input_merger_device::in_w<0>)); GFXDECODE(config, "gfxdecode", "palette", gfx_unistar); - PALETTE(config, "palette", FUNC(unistar_state::unistar_palette), 3); + PALETTE(config, m_palette, FUNC(unistar_state::unistar_palette), 3); } /* ROM definition */ ROM_START( unistar ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) + ROM_REGION( 0x3000, "maincpu", 0 ) ROM_LOAD( "280010c.u48", 0x0000, 0x1000, CRC(613ef521) SHA1(a77459e91617d2882778ab2dada74fcb5f44e949)) ROM_LOAD( "280011c.u49", 0x1000, 0x1000, CRC(6cc5e704) SHA1(fb93645f51d5ad0635cbc8a9174c61f96799313d)) ROM_LOAD( "280012c.u50", 0x2000, 0x1000, CRC(0b9ca5a5) SHA1(20bf4aeacda14ff7a3cf988c7c0bff6ec60406c7)) - ROM_REGION( 0x0800, "chargen", ROMREGION_ERASEFF ) + ROM_REGION( 0x0800, "chargen", 0 ) ROM_LOAD( "280014a.u1", 0x0000, 0x0800, CRC(a9e1b5b2) SHA1(6f5b597ee1417f1108ac5957b005a927acb5314a)) ROM_END /* Driver */ // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP( 198?, unistar, 0, 0, unistar, unistar, unistar_state, empty_init, "Callan Data Systems", "Unistar 200 Terminal", MACHINE_IS_SKELETON ) +COMP( 198?, unistar, 0, 0, unistar, unistar, unistar_state, empty_init, "Callan Data Systems", "Unistar 200 Terminal", MACHINE_IS_SKELETON | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/ut88.cpp b/src/mame/drivers/ut88.cpp index 65fc7f4d060..64f4e46fe4d 100644 --- a/src/mame/drivers/ut88.cpp +++ b/src/mame/drivers/ut88.cpp @@ -26,17 +26,12 @@ Paste facility was tested but doesn't work, so all code remnants removed. #include "includes/ut88.h" #include "formats/rk_cas.h" -#include "softlist.h" #include "ut88mini.lh" #include "sound/volt_reg.h" #include "screen.h" #include "speaker.h" -static GFXDECODE_START( gfx_ut88 ) - GFXDECODE_ENTRY( "chargen", 0x0000, ut88_charlayout, 0, 1 ) -GFXDECODE_END - /* Address maps */ void ut88mini_state::mem_map(address_map &map) { @@ -48,12 +43,11 @@ void ut88mini_state::mem_map(address_map &map) void ut88_state::mem_map(address_map &map) { - map(0x0000, 0x07ff).bankrw("bank1"); // First bank - map(0x0800, 0xdfff).ram(); // RAM + map(0x0000, 0xdfff).ram().share("mainram"); map(0xe000, 0xe7ff).ram(); // Video RAM (not used) map(0xe800, 0xefff).ram().share("videoram"); // Video RAM map(0xf400, 0xf7ff).ram(); // System RAM - map(0xf800, 0xffff).rom(); // System ROM + map(0xf800, 0xffff).rom().region("maincpu",0); // System ROM } void ut88mini_state::io_map(address_map &map) @@ -186,6 +180,35 @@ static INPUT_PORTS_START( ut88mini ) PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Backspace") PORT_CODE(KEYCODE_BACKSPACE) INPUT_PORTS_END +const gfx_layout charlayout = +{ + 8, 8, /* 8x8 characters */ + 256, /* 256 characters */ + 1, /* 1 bits per pixel */ + {0}, /* no bitplanes; 1 bit per pixel */ + {0, 1, 2, 3, 4, 5, 6, 7}, + {0 * 8, 1 * 8, 2 * 8, 3 * 8, 4 * 8, 5 * 8, 6 * 8, 7 * 8}, + 8*8 /* size of one char */ +}; + +static GFXDECODE_START( gfx_ut88 ) + GFXDECODE_ENTRY( "chargen", 0x0000, charlayout, 0, 1 ) +GFXDECODE_END + +u32 ut88_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + for (u8 y = 0; y < 28; y++) + { + for (u8 x = 0; x < 64; x++) + { + u8 code = m_vram[x + y*64] & 0x7f; + u8 attr = m_vram[x+1 + y*64] & 0x80; + m_gfxdecode->gfx(0)->opaque(bitmap,cliprect, code | attr, 0, 0,0, x*8,y*8); + } + } + return 0; +} + /* Machine driver */ void ut88_state::ut88(machine_config &config) { @@ -246,27 +269,29 @@ void ut88mini_state::ut88mini(machine_config &config) m_cassette->add_route(ALL_OUTPUTS, "speaker", 0.05); m_cassette->set_interface("ut88_cass"); - SOFTWARE_LIST(config, "cass_list").set_original("ut88"); + //SOFTWARE_LIST(config, "cass_list").set_original("ut88"); // no suitable software in the list } /* ROM definition */ ROM_START( ut88 ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD( "ut88.rom", 0xf800, 0x0800, CRC(f433202e) SHA1(a5808a4f68fb10eb7f17f2a05c3b8479fec0e05d) ) - ROM_REGION(0x0800, "chargen",0) - ROM_LOAD ("ut88.fnt", 0x0000, 0x0800, CRC(874b4d29) SHA1(357efbb295cd9e47fa97d4d03f4f1859a915b5c3) ) + ROM_REGION( 0x0800, "maincpu", 0 ) + ROM_LOAD( "ut88.rom", 0x0000, 0x0800, CRC(f433202e) SHA1(a5808a4f68fb10eb7f17f2a05c3b8479fec0e05d) ) + + ROM_REGION( 0x0800, "chargen",0 ) + ROM_LOAD( "ut88.fnt", 0x0000, 0x0800, CRC(874b4d29) SHA1(357efbb295cd9e47fa97d4d03f4f1859a915b5c3) ) ROM_END ROM_START( ut88mini ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD( "ut88mini.rom", 0x0000, 0x0400, CRC(ce9213ee) SHA1(16b71b3051a800386d664dbcc5983b783475d0c6) ) - ROM_REGION( 0x200, "proms", 0 ) - ROM_LOAD( "ut88key1.rom", 0x0000, 0x0100, CRC(ecfe42c7) SHA1(d7f10bbb05934150c1a258db1c8b4eb65771af59) ) - ROM_LOAD( "ut88key2.rom", 0x0100, 0x0100, CRC(96324d23) SHA1(9dca3f639fc29d87df56505b3dde668ef2849da3) ) + ROM_REGION( 0x0400, "maincpu", 0 ) + ROM_LOAD( "ut88mini.rom", 0x0000, 0x0400, CRC(ce9213ee) SHA1(16b71b3051a800386d664dbcc5983b783475d0c6) ) // DD10,DD11 (0x200 each) + + ROM_REGION( 0x0200, "proms", 0 ) + ROM_LOAD( "ut88key1.dd15", 0x0000, 0x0100, CRC(ecfe42c7) SHA1(d7f10bbb05934150c1a258db1c8b4eb65771af59) ) + ROM_LOAD( "ut88key2.dd16", 0x0100, 0x0100, CRC(96324d23) SHA1(9dca3f639fc29d87df56505b3dde668ef2849da3) ) ROM_END /* Driver */ /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ -COMP( 1989, ut88mini, 0, 0, ut88mini, ut88mini, ut88mini_state, empty_init, "", "UT-88 mini", 0) -COMP( 1989, ut88, ut88mini, 0, ut88, ut88, ut88_state, empty_init, "", "UT-88", 0) +COMP( 1989, ut88mini, 0, 0, ut88mini, ut88mini, ut88mini_state, empty_init, "", "UT-88 mini", MACHINE_SUPPORTS_SAVE ) +COMP( 1989, ut88, ut88mini, 0, ut88, ut88, ut88_state, empty_init, "", "UT-88", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/includes/ut88.h b/src/mame/includes/ut88.h index d2eb44e27c2..1d641467e02 100644 --- a/src/mame/includes/ut88.h +++ b/src/mame/includes/ut88.h @@ -16,40 +16,39 @@ #include "imagedev/cassette.h" #include "emupal.h" -class ut88_base_state : public driver_device +class ut88_common : public driver_device { public: - ut88_base_state(const machine_config &mconfig, device_type type, const char *tag) + ut88_common(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") , m_cassette(*this, "cassette") - , m_region_maincpu(*this, "maincpu") , m_io_line0(*this, "LINE0") , m_io_line1(*this, "LINE1") , m_io_line2(*this, "LINE2") - , m_maincpu(*this, "maincpu") { } protected: uint8_t tape_r(); + required_device m_maincpu; required_device m_cassette; - required_memory_region m_region_maincpu; required_ioport m_io_line0; required_ioport m_io_line1; required_ioport m_io_line2; - required_device m_maincpu; }; -class ut88_state : public ut88_base_state +class ut88_state : public ut88_common { public: ut88_state(const machine_config &mconfig, device_type type, const char *tag) - : ut88_base_state(mconfig, type, tag) - , m_ppi(*this, "ppi8255") + : ut88_common(mconfig, type, tag) + , m_ppi(*this, "ppi") , m_dac(*this, "dac") - , m_p_videoram(*this, "videoram") - , m_bank1(*this, "bank1") + , m_vram(*this, "videoram") + , m_rom(*this, "maincpu") + , m_ram(*this, "mainram") , m_io_line3(*this, "LINE3") , m_io_line4(*this, "LINE4") , m_io_line5(*this, "LINE5") @@ -63,16 +62,8 @@ public: void ut88(machine_config &config); private: - virtual void driver_init() override; - virtual void machine_reset() override; - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; - - enum - { - TIMER_RESET, - TIMER_UPDATE_DISPLAY - }; - + void machine_start() override; + void machine_reset() override; uint8_t keyboard_r(offs_t offset); void keyboard_w(offs_t offset, uint8_t data); void sound_w(uint8_t data); @@ -87,10 +78,12 @@ private: int m_keyboard_mask; + memory_passthrough_handler *m_rom_shadow_tap; required_device m_ppi; required_device m_dac; - required_shared_ptr m_p_videoram; - required_memory_bank m_bank1; + required_shared_ptr m_vram; + required_region_ptr m_rom; + required_shared_ptr m_ram; required_ioport m_io_line3; required_ioport m_io_line4; required_ioport m_io_line5; @@ -101,20 +94,20 @@ private: required_device m_palette; }; -class ut88mini_state : public ut88_base_state +class ut88mini_state : public ut88_common { public: ut88mini_state(const machine_config &mconfig, device_type type, const char *tag) - : ut88_base_state(mconfig, type, tag) - , m_region_proms(*this, "proms") + : ut88_common(mconfig, type, tag) + , m_proms(*this, "proms") , m_digits(*this, "digit%u", 0U) { } void ut88mini(machine_config &config); private: - virtual void machine_start() override; - virtual void machine_reset() override; + void machine_start() override; + void machine_reset() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; void io_map(address_map &map); @@ -122,14 +115,13 @@ private: enum { - TIMER_RESET, TIMER_UPDATE_DISPLAY }; uint8_t keyboard_r(); void led_w(offs_t offset, uint8_t data); - required_memory_region m_region_proms; + required_memory_region m_proms; int m_lcd_digit[6]; output_finder<6> m_digits; diff --git a/src/mame/machine/ut88.cpp b/src/mame/machine/ut88.cpp index edcd5dfcea3..4c6fa1e2833 100644 --- a/src/mame/machine/ut88.cpp +++ b/src/mame/machine/ut88.cpp @@ -25,24 +25,6 @@ static const uint8_t hex_to_7seg[16] = /* Driver initialization */ -void ut88_state::driver_init() -{ - /* set initially ROM to be visible on first bank */ - uint8_t *ram = m_region_maincpu->base(); - memset(ram, 0x0000, 0x0800); // make first page empty by default - m_bank1->configure_entries(1, 2, ram, 0x0000); - m_bank1->configure_entries(0, 2, ram, 0xf800); -} - - -void ut88_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) -{ - if (id == TIMER_RESET) - { - m_bank1->set_entry(0); - } -} - void ut88mini_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) { if (id == TIMER_UPDATE_DISPLAY) @@ -89,11 +71,29 @@ void ut88_state::ppi_porta_w(uint8_t data) void ut88_state::machine_reset() { - timer_set(attotime::from_usec(10), TIMER_RESET); - m_bank1->set_entry(1); m_keyboard_mask = 0; + address_space &program = m_maincpu->space(AS_PROGRAM); + program.install_rom(0x0000, 0x07ff, m_rom); // do it here for F3 + m_rom_shadow_tap = program.install_read_tap(0xf800, 0xffff, "rom_shadow_r",[this](offs_t offset, u8 &data, u8 mem_mask) + { + if (!machine().side_effects_disabled()) + { + // delete this tap + m_rom_shadow_tap->remove(); + + // reinstall ram over the rom shadow + m_maincpu->space(AS_PROGRAM).install_ram(0x0000, 0x07ff, m_ram); + } + + // return the original data + return data; + }); } +void ut88_state::machine_start() +{ + save_item(NAME(m_keyboard_mask)); +} uint8_t ut88_state::keyboard_r(offs_t offset) { @@ -113,7 +113,7 @@ void ut88_state::sound_w(uint8_t data) } -uint8_t ut88_base_state::tape_r() +uint8_t ut88_common::tape_r() { double level = m_cassette->input(); return (level < 0) ? 0 : 0xff; @@ -122,8 +122,8 @@ uint8_t ut88_base_state::tape_r() uint8_t ut88mini_state::keyboard_r() { // This is real keyboard implementation - uint8_t *keyrom1 = m_region_proms->base(); - uint8_t *keyrom2 = m_region_proms->base()+100; + uint8_t *keyrom1 = m_proms->base(); + uint8_t *keyrom2 = m_proms->base()+100; uint8_t key = keyrom2[m_io_line1->read()]; @@ -165,6 +165,7 @@ void ut88mini_state::machine_start() { m_digits.resolve(); timer_set(attotime::from_hz(60), TIMER_UPDATE_DISPLAY); + save_item(NAME(m_lcd_digit)); } void ut88mini_state::machine_reset() diff --git a/src/mame/video/ut88.cpp b/src/mame/video/ut88.cpp deleted file mode 100644 index 565d27cae48..00000000000 --- a/src/mame/video/ut88.cpp +++ /dev/null @@ -1,39 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic -/*************************************************************************** - - UT88 video driver by Miodrag Milanovic - - 06/03/2008 Preliminary driver. - -****************************************************************************/ - - -#include "emu.h" -#include "includes/ut88.h" - - -const gfx_layout ut88_charlayout = -{ - 8, 8, /* 8x8 characters */ - 256, /* 256 characters */ - 1, /* 1 bits per pixel */ - {0}, /* no bitplanes; 1 bit per pixel */ - {0, 1, 2, 3, 4, 5, 6, 7}, - {0 * 8, 1 * 8, 2 * 8, 3 * 8, 4 * 8, 5 * 8, 6 * 8, 7 * 8}, - 8*8 /* size of one char */ -}; - -uint32_t ut88_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - for (int y = 0; y < 28; y++) - { - for (int x = 0; x < 64; x++) - { - int code = m_p_videoram[x + y*64] & 0x7f; - int attr = m_p_videoram[x+1 + y*64] & 0x80; - m_gfxdecode->gfx(0)->opaque(bitmap,cliprect, code | attr, 0, 0,0, x*8,y*8); - } - } - return 0; -}