mirror of
https://github.com/holub/mame
synced 2025-06-07 13:23:50 +03:00
upd7810: upd78c06 has internal rom
This commit is contained in:
parent
e5bc8a44bd
commit
ec295d16b6
@ -11,8 +11,8 @@ license:CC0
|
|||||||
<publisher>Epoch</publisher>
|
<publisher>Epoch</publisher>
|
||||||
<info name="serial" value="1" />
|
<info name="serial" value="1" />
|
||||||
<part name="cart" interface="gamepock_cart">
|
<part name="cart" interface="gamepock_cart">
|
||||||
<dataarea name="rom" size="8192">
|
<dataarea name="rom" size="0x2000">
|
||||||
<rom name="astrobom.bin" size="8192" crc="b0fd260f" sha1="453a0f3c0952ebd8e691316c39960731f1996c09"/>
|
<rom name="astrobom.bin" size="0x2000" crc="b0fd260f" sha1="453a0f3c0952ebd8e691316c39960731f1996c09"/>
|
||||||
</dataarea>
|
</dataarea>
|
||||||
</part>
|
</part>
|
||||||
</software>
|
</software>
|
||||||
@ -23,8 +23,8 @@ license:CC0
|
|||||||
<publisher>Epoch</publisher>
|
<publisher>Epoch</publisher>
|
||||||
<info name="serial" value="2" />
|
<info name="serial" value="2" />
|
||||||
<part name="cart" interface="gamepock_cart">
|
<part name="cart" interface="gamepock_cart">
|
||||||
<dataarea name="rom" size="8192">
|
<dataarea name="rom" size="0x2000">
|
||||||
<rom name="blockmaz.bin" size="8192" crc="cfb3291b" sha1="50dc5736200986b326b372c17c233c4180474471"/>
|
<rom name="blockmaz.bin" size="0x2000" crc="cfb3291b" sha1="50dc5736200986b326b372c17c233c4180474471"/>
|
||||||
</dataarea>
|
</dataarea>
|
||||||
</part>
|
</part>
|
||||||
</software>
|
</software>
|
||||||
@ -35,8 +35,8 @@ license:CC0
|
|||||||
<publisher>Epoch</publisher>
|
<publisher>Epoch</publisher>
|
||||||
<info name="serial" value="3" />
|
<info name="serial" value="3" />
|
||||||
<part name="cart" interface="gamepock_cart">
|
<part name="cart" interface="gamepock_cart">
|
||||||
<dataarea name="rom" size="16384">
|
<dataarea name="rom" size="0x4000">
|
||||||
<rom name="pokemahj.bin" size="16384" crc="5c3eed48" sha1="918e1caa16cfae6b74da2026f3426d0a5818061c"/>
|
<rom name="pokemahj.bin" size="0x4000" crc="5c3eed48" sha1="918e1caa16cfae6b74da2026f3426d0a5818061c"/>
|
||||||
</dataarea>
|
</dataarea>
|
||||||
</part>
|
</part>
|
||||||
</software>
|
</software>
|
||||||
@ -47,8 +47,8 @@ license:CC0
|
|||||||
<publisher>Epoch</publisher>
|
<publisher>Epoch</publisher>
|
||||||
<info name="serial" value="4" />
|
<info name="serial" value="4" />
|
||||||
<part name="cart" interface="gamepock_cart">
|
<part name="cart" interface="gamepock_cart">
|
||||||
<dataarea name="rom" size="8192">
|
<dataarea name="rom" size="0x2000">
|
||||||
<rom name="pokereve.bin" size="8192" crc="1c461f91" sha1="ead4a4efe5439e2ec1f6befb50c350f73919da8d"/>
|
<rom name="pokereve.bin" size="0x2000" crc="1c461f91" sha1="ead4a4efe5439e2ec1f6befb50c350f73919da8d"/>
|
||||||
</dataarea>
|
</dataarea>
|
||||||
</part>
|
</part>
|
||||||
</software>
|
</software>
|
||||||
@ -59,8 +59,8 @@ license:CC0
|
|||||||
<publisher>Epoch</publisher>
|
<publisher>Epoch</publisher>
|
||||||
<info name="serial" value="5" />
|
<info name="serial" value="5" />
|
||||||
<part name="cart" interface="gamepock_cart">
|
<part name="cart" interface="gamepock_cart">
|
||||||
<dataarea name="rom" size="8192">
|
<dataarea name="rom" size="0x2000">
|
||||||
<rom name="soukoban.bin" size="8192" crc="5d6f7819" sha1="61ef6483e8f9935dd8b6351fd2bdfda3af3899bd"/>
|
<rom name="soukoban.bin" size="0x2000" crc="5d6f7819" sha1="61ef6483e8f9935dd8b6351fd2bdfda3af3899bd"/>
|
||||||
</dataarea>
|
</dataarea>
|
||||||
</part>
|
</part>
|
||||||
</software>
|
</software>
|
||||||
|
@ -392,6 +392,18 @@ void upd7810_device::upd_internal_256_ram_map(address_map &map)
|
|||||||
map(0xff00, 0xffff).ram();
|
map(0xff00, 0xffff).ram();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void upd7810_device::upd_internal_4096_rom_128_ram_map(address_map &map)
|
||||||
|
{
|
||||||
|
map(0x0000, 0x0fff).rom();
|
||||||
|
map(0xff80, 0xffff).ram();
|
||||||
|
}
|
||||||
|
|
||||||
|
void upd7810_device::upd_internal_4096_rom_256_ram_map(address_map &map)
|
||||||
|
{
|
||||||
|
map(0x0000, 0x0fff).rom();
|
||||||
|
map(0xff00, 0xffff).ram();
|
||||||
|
}
|
||||||
|
|
||||||
upd7810_device::upd7810_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_map)
|
upd7810_device::upd7810_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_map)
|
||||||
: cpu_device(mconfig, type, tag, owner, clock)
|
: cpu_device(mconfig, type, tag, owner, clock)
|
||||||
, m_to_func(*this)
|
, m_to_func(*this)
|
||||||
@ -494,13 +506,13 @@ void upd78c05_device::configure_ops()
|
|||||||
m_opXX = s_opXX_78c05;
|
m_opXX = s_opXX_78c05;
|
||||||
}
|
}
|
||||||
|
|
||||||
upd78c05_device::upd78c05_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
upd78c05_device::upd78c05_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_map)
|
||||||
: upd78c05_device(mconfig, UPD78C05, tag, owner, clock)
|
: upd7810_device(mconfig, type, tag, owner, clock, internal_map)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
upd78c05_device::upd78c05_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
upd78c05_device::upd78c05_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||||
: upd7810_device(mconfig, type, tag, owner, clock, address_map_constructor(FUNC(upd78c05_device::upd_internal_128_ram_map), this))
|
: upd78c05_device(mconfig, UPD78C05, tag, owner, clock, address_map_constructor(FUNC(upd78c05_device::upd_internal_128_ram_map), this))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -517,7 +529,7 @@ void upd78c06_device::configure_ops()
|
|||||||
}
|
}
|
||||||
|
|
||||||
upd78c06_device::upd78c06_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
upd78c06_device::upd78c06_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||||
: upd78c05_device(mconfig, UPD78C06, tag, owner, clock)
|
: upd78c05_device(mconfig, UPD78C06, tag, owner, clock, address_map_constructor(FUNC(upd78c06_device::upd_internal_4096_rom_128_ram_map), this))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,7 +86,8 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
void upd_internal_128_ram_map(address_map &map);
|
void upd_internal_128_ram_map(address_map &map);
|
||||||
void upd_internal_256_ram_map(address_map &map);
|
void upd_internal_256_ram_map(address_map &map);
|
||||||
void upd_internal_4096_rom_map(address_map &map);
|
void upd_internal_4096_rom_128_ram_map(address_map &map);
|
||||||
|
void upd_internal_4096_rom_256_ram_map(address_map &map);
|
||||||
|
|
||||||
// flags
|
// flags
|
||||||
enum
|
enum
|
||||||
@ -1399,7 +1400,7 @@ public:
|
|||||||
upd78c05_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
upd78c05_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
upd78c05_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
upd78c05_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_map);
|
||||||
|
|
||||||
virtual void device_start() override;
|
virtual void device_start() override;
|
||||||
virtual void device_reset() override;
|
virtual void device_reset() override;
|
||||||
|
@ -23,21 +23,15 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void upd7810_device::upd_internal_4096_rom_map(address_map &map)
|
|
||||||
{
|
|
||||||
map(0x0000, 0x0fff).rom();
|
|
||||||
map(0xff00, 0xffff).ram();
|
|
||||||
}
|
|
||||||
|
|
||||||
DEFINE_DEVICE_TYPE(UPD7811, upd7811_device, "upd7811", "NEC uPD7811")
|
DEFINE_DEVICE_TYPE(UPD7811, upd7811_device, "upd7811", "NEC uPD7811")
|
||||||
DEFINE_DEVICE_TYPE(UPD78C11, upd78c11_device, "upd78c11", "NEC uPD78C11")
|
DEFINE_DEVICE_TYPE(UPD78C11, upd78c11_device, "upd78c11", "NEC uPD78C11")
|
||||||
|
|
||||||
upd7811_device::upd7811_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
upd7811_device::upd7811_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||||
: upd7810_device(mconfig, UPD7811, tag, owner, clock, address_map_constructor(FUNC(upd7811_device::upd_internal_4096_rom_map), this))
|
: upd7810_device(mconfig, UPD7811, tag, owner, clock, address_map_constructor(FUNC(upd7811_device::upd_internal_4096_rom_256_ram_map), this))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
upd78c11_device::upd78c11_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
upd78c11_device::upd78c11_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||||
: upd78c10_device(mconfig, UPD78C11, tag, owner, clock, address_map_constructor(FUNC(upd78c11_device::upd_internal_4096_rom_map), this))
|
: upd78c10_device(mconfig, UPD78C11, tag, owner, clock, address_map_constructor(FUNC(upd78c11_device::upd_internal_4096_rom_256_ram_map), this))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
#include "gamepock.h"
|
#include "gamepock.h"
|
||||||
|
|
||||||
#include "bus/generic/carts.h"
|
#include "bus/generic/carts.h"
|
||||||
#include "cpu/upd7810/upd7810.h"
|
|
||||||
|
|
||||||
#include "emupal.h"
|
#include "emupal.h"
|
||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
@ -17,10 +16,11 @@
|
|||||||
void gamepock_state::gamepock_mem(address_map &map)
|
void gamepock_state::gamepock_mem(address_map &map)
|
||||||
{
|
{
|
||||||
map.unmap_value_high();
|
map.unmap_value_high();
|
||||||
map(0x0000, 0x0fff).rom();
|
// 0x0000-0x0fff is internal ROM
|
||||||
map(0x1000, 0x3fff).noprw();
|
map(0x1000, 0x3fff).noprw();
|
||||||
//map(0x4000,0xbfff).rom(); // mapped by the cartslot
|
map(0x4000, 0xbfff).r("cartslot", FUNC(generic_slot_device::read_rom));
|
||||||
map(0xc000, 0xc7ff).mirror(0x0800).ram();
|
map(0xc000, 0xc7ff).mirror(0x0800).ram();
|
||||||
|
// 0xff80-0xffff is internal RAM
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -43,13 +43,13 @@ INPUT_PORTS_END
|
|||||||
|
|
||||||
void gamepock_state::gamepock(machine_config &config)
|
void gamepock_state::gamepock(machine_config &config)
|
||||||
{
|
{
|
||||||
upd78c06_device &upd(UPD78C06(config, m_maincpu, 6_MHz_XTAL)); // uPD78C06AG
|
UPD78C06(config, m_maincpu, 6_MHz_XTAL); // uPD78C06AG
|
||||||
upd.set_addrmap(AS_PROGRAM, &gamepock_state::gamepock_mem);
|
m_maincpu->set_addrmap(AS_PROGRAM, &gamepock_state::gamepock_mem);
|
||||||
upd.pa_out_cb().set(FUNC(gamepock_state::port_a_w));
|
m_maincpu->pa_out_cb().set(FUNC(gamepock_state::port_a_w));
|
||||||
upd.pb_in_cb().set(FUNC(gamepock_state::port_b_r));
|
m_maincpu->pb_in_cb().set(FUNC(gamepock_state::port_b_r));
|
||||||
upd.pb_out_cb().set(FUNC(gamepock_state::port_b_w));
|
m_maincpu->pb_out_cb().set(FUNC(gamepock_state::port_b_w));
|
||||||
upd.pc_in_cb().set(FUNC(gamepock_state::port_c_r));
|
m_maincpu->pc_in_cb().set(FUNC(gamepock_state::port_c_r));
|
||||||
upd.to_func().set(FUNC(gamepock_state::gamepock_to_w));
|
m_maincpu->to_func().set(m_speaker, FUNC(speaker_sound_device::level_w));
|
||||||
|
|
||||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
|
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
|
||||||
screen.set_refresh_hz(60);
|
screen.set_refresh_hz(60);
|
||||||
@ -65,7 +65,7 @@ void gamepock_state::gamepock(machine_config &config)
|
|||||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50);
|
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50);
|
||||||
|
|
||||||
/* cartridge */
|
/* cartridge */
|
||||||
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "gamepock_cart");
|
GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "gamepock_cart");
|
||||||
|
|
||||||
/* Software lists */
|
/* Software lists */
|
||||||
SOFTWARE_LIST(config, "cart_list").set_original("gamepock");
|
SOFTWARE_LIST(config, "cart_list").set_original("gamepock");
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "bus/generic/slot.h"
|
#include "bus/generic/slot.h"
|
||||||
|
#include "cpu/upd7810/upd7810.h"
|
||||||
#include "sound/spkrdev.h"
|
#include "sound/spkrdev.h"
|
||||||
|
|
||||||
class gamepock_state : public driver_device
|
class gamepock_state : public driver_device
|
||||||
@ -14,8 +15,7 @@ public:
|
|||||||
gamepock_state(const machine_config &mconfig, device_type type, const char *tag) :
|
gamepock_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||||
driver_device(mconfig, type, tag),
|
driver_device(mconfig, type, tag),
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
m_speaker(*this, "speaker"),
|
m_speaker(*this, "speaker")
|
||||||
m_cart(*this, "cartslot")
|
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
void gamepock(machine_config &config);
|
void gamepock(machine_config &config);
|
||||||
@ -40,16 +40,14 @@ private:
|
|||||||
void port_b_w(uint8_t data);
|
void port_b_w(uint8_t data);
|
||||||
uint8_t port_c_r();
|
uint8_t port_c_r();
|
||||||
uint32_t screen_update_gamepock(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
uint32_t screen_update_gamepock(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
DECLARE_WRITE_LINE_MEMBER(gamepock_to_w);
|
|
||||||
void gamepock_mem(address_map &map);
|
void gamepock_mem(address_map &map);
|
||||||
|
|
||||||
uint8_t m_port_a = 0U;
|
uint8_t m_port_a = 0U;
|
||||||
uint8_t m_port_b = 0U;
|
uint8_t m_port_b = 0U;
|
||||||
HD44102CH m_hd44102ch[3];
|
HD44102CH m_hd44102ch[3];
|
||||||
|
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<upd78c06_device> m_maincpu;
|
||||||
required_device<speaker_sound_device> m_speaker;
|
required_device<speaker_sound_device> m_speaker;
|
||||||
required_device<generic_slot_device> m_cart;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MAME_INCLUDES_GAMEPOCK_H
|
#endif // MAME_INCLUDES_GAMEPOCK_H
|
||||||
|
@ -138,10 +138,6 @@ void gamepock_state::machine_reset()
|
|||||||
hd44102ch_init( 0 );
|
hd44102ch_init( 0 );
|
||||||
hd44102ch_init( 1 );
|
hd44102ch_init( 1 );
|
||||||
hd44102ch_init( 2 );
|
hd44102ch_init( 2 );
|
||||||
|
|
||||||
if (m_cart->exists())
|
|
||||||
m_maincpu->space(AS_PROGRAM).install_read_handler(0x4000,0xbfff, read8sm_delegate(*m_cart, FUNC(generic_slot_device::read_rom)));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t gamepock_state::screen_update_gamepock(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
uint32_t gamepock_state::screen_update_gamepock(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||||
@ -215,9 +211,3 @@ uint32_t gamepock_state::screen_update_gamepock(screen_device &screen, bitmap_in
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This is called whenever the T0 pin switches state */
|
|
||||||
WRITE_LINE_MEMBER(gamepock_state::gamepock_to_w)
|
|
||||||
{
|
|
||||||
m_speaker->level_w(state & 1);
|
|
||||||
}
|
|
||||||
|
@ -28,8 +28,8 @@ Watara SuperVision), so perhaps it's them.
|
|||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
- does port B do anything?
|
- does port B do anything?
|
||||||
- hspace should have some kind of volume filter on the bgm? not sure what
|
- according to one video on Youtube, hspace should have some kind of volume
|
||||||
what controls it, or maybe it's a hardware quirk
|
filter on the bgm? not sure what controls it, or maybe it's a hardware quirk
|
||||||
|
|
||||||
BTANB:
|
BTANB:
|
||||||
- LCD flickers partially, especially bad in finitezn
|
- LCD flickers partially, especially bad in finitezn
|
||||||
@ -60,8 +60,7 @@ public:
|
|||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
m_lcd(*this, "lcd%u", 0),
|
m_lcd(*this, "lcd%u", 0),
|
||||||
m_screen(*this, "screen"),
|
m_screen(*this, "screen"),
|
||||||
m_speaker(*this, "speaker"),
|
m_speaker(*this, "speaker")
|
||||||
m_cart(*this, "cartslot")
|
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
void gmaster(machine_config &config);
|
void gmaster(machine_config &config);
|
||||||
@ -74,7 +73,6 @@ private:
|
|||||||
required_device_array<sed1520_device, 2> m_lcd;
|
required_device_array<sed1520_device, 2> m_lcd;
|
||||||
required_device<screen_device> m_screen;
|
required_device<screen_device> m_screen;
|
||||||
required_device<speaker_sound_device> m_speaker;
|
required_device<speaker_sound_device> m_speaker;
|
||||||
required_device<generic_slot_device> m_cart;
|
|
||||||
|
|
||||||
u8 io_r(offs_t offset);
|
u8 io_r(offs_t offset);
|
||||||
void io_w(offs_t offset, u8 data);
|
void io_w(offs_t offset, u8 data);
|
||||||
@ -250,7 +248,7 @@ void gmaster_state::gmaster(machine_config &config)
|
|||||||
SPEAKER_SOUND(config, m_speaker).add_route(0, "mono", 0.50);
|
SPEAKER_SOUND(config, m_speaker).add_route(0, "mono", 0.50);
|
||||||
|
|
||||||
// cartridge
|
// cartridge
|
||||||
GENERIC_CARTSLOT(config, m_cart, generic_linear_slot, "gmaster_cart").set_must_be_loaded(true);
|
GENERIC_CARTSLOT(config, "cartslot", generic_linear_slot, "gmaster_cart").set_must_be_loaded(true);
|
||||||
SOFTWARE_LIST(config, "cart_list").set_original("gmaster");
|
SOFTWARE_LIST(config, "cart_list").set_original("gmaster");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user