mirror of
https://github.com/holub/mame
synced 2025-04-18 22:49:58 +03:00
taito/kikikai.cpp: Added Kiki KaiKai microcontroller program ROM dump. [Madov, Raki, Travis Goodspeed]
This commit is contained in:
parent
8d5207f974
commit
87c0e06926
@ -8525,7 +8525,7 @@ The following floppies came with the machines.
|
||||
</software>
|
||||
|
||||
<software name="konaish1">
|
||||
<description>Kounai Shasei Vol. 1 (Japan)</description>
|
||||
<description>Konai Shasei Vol. 1 (Japan)</description> <!-- box says "Konai" -->
|
||||
<year>1991</year>
|
||||
<publisher>Fairytale</publisher>
|
||||
<info name="alt_title" value="校内写生1巻"/>
|
||||
@ -8558,7 +8558,7 @@ The following floppies came with the machines.
|
||||
</software>
|
||||
|
||||
<software name="konaish2">
|
||||
<description>Kounai Shasei Vol. 2 (Japan)</description>
|
||||
<description>Konai Shasei Vol. 2 (Japan)</description> <!-- box says "Konai" -->
|
||||
<year>1991</year>
|
||||
<publisher>Fairytale</publisher>
|
||||
<info name="alt_title" value="校内写生2巻"/>
|
||||
@ -8591,7 +8591,7 @@ The following floppies came with the machines.
|
||||
</software>
|
||||
|
||||
<software name="konaish3">
|
||||
<description>Kounai Shasei Vol. 3 (Japan)</description>
|
||||
<description>Konai Shasei Vol. 3 (Japan)</description> <!-- box says "Konai" -->
|
||||
<year>1991</year>
|
||||
<publisher>Fairytale</publisher>
|
||||
<info name="alt_title" value="校内写生3巻"/>
|
||||
|
@ -727,7 +727,7 @@ void kikikai_state::base(machine_config &config)
|
||||
m_ymsnd->add_route(3, "mono", 1.00);
|
||||
}
|
||||
|
||||
void kikikai_state::kicknrun(machine_config& config)
|
||||
void kikikai_state::kicknrun(machine_config &config)
|
||||
{
|
||||
base(config);
|
||||
|
||||
@ -762,7 +762,7 @@ void kikikai_simulation_state::kikikai(machine_config &config)
|
||||
}
|
||||
|
||||
|
||||
void mexico86_state::mexico86_68705(machine_config& config)
|
||||
void mexico86_state::mexico86_68705(machine_config &config)
|
||||
{
|
||||
base(config);
|
||||
m_maincpu->set_irq_acknowledge_callback(FUNC(mexico86_state::mcram_vect_r));
|
||||
@ -790,7 +790,7 @@ void kikikai_state::knightba(machine_config &config)
|
||||
|
||||
config.device_remove("sub");
|
||||
|
||||
m_screen->set_screen_update(FUNC(kikikai_simulation_state::screen_update_kikikai));
|
||||
m_screen->set_screen_update(FUNC(kikikai_state::screen_update_kikikai));
|
||||
}
|
||||
|
||||
|
||||
@ -811,7 +811,7 @@ ROM_START( kikikai )
|
||||
|
||||
ROM_REGION( 0x1000, "mcu", 0 ) /* 4k for the microcontroller (MC6801U4 type MCU) */
|
||||
/* MCU labeled TAITO A85 01, JPH1020P, 185, PS4 */
|
||||
ROM_LOAD( "a85-01.g8", 0x0000, 0x1000, NO_DUMP )
|
||||
ROM_LOAD( "a85-01_jph1020p.h8", 0x0000, 0x1000, CRC(01771197) SHA1(84430a56c66ff2781fe1ff35d4f15b332cd0af37) )
|
||||
|
||||
ROM_REGION( 0x40000, "gfx1", ROMREGION_INVERT )
|
||||
ROM_LOAD( "a85-15.a1", 0x00000, 0x10000, CRC(aebc8c32) SHA1(77347cf5780f084a77123eb636cd0bad672a39e8) )
|
||||
|
@ -11,8 +11,8 @@
|
||||
class kikikai_state : public driver_device
|
||||
{
|
||||
public:
|
||||
kikikai_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
kikikai_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_screen(*this, "screen"),
|
||||
@ -26,16 +26,10 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void base(machine_config &config);
|
||||
void kicknrun(machine_config &config);
|
||||
void knightba(machine_config &config);
|
||||
|
||||
protected:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
required_device<screen_device> m_screen;
|
||||
optional_shared_ptr<u8> m_mcu_sharedram;
|
||||
|
||||
u32 screen_update_kicknrun(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
u32 screen_update_kikikai(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
@ -44,7 +38,33 @@ protected:
|
||||
|
||||
IRQ_CALLBACK_MEMBER(mcram_vect_r);
|
||||
|
||||
void base(machine_config &config);
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
required_device<screen_device> m_screen;
|
||||
optional_shared_ptr<u8> m_mcu_sharedram;
|
||||
|
||||
private:
|
||||
void kicknrun_sub_output_w(uint8_t data);
|
||||
virtual void main_f008_w(uint8_t data);
|
||||
|
||||
void main_bankswitch_w(uint8_t data);
|
||||
uint8_t kiki_ym2203_r(offs_t offset);
|
||||
|
||||
virtual INTERRUPT_GEN_MEMBER(kikikai_interrupt);
|
||||
|
||||
void main_map(address_map &map);
|
||||
void sound_map(address_map &map);
|
||||
void kicknrun_sub_cpu_map(address_map &map);
|
||||
void knightba_main_map(address_map &map);
|
||||
|
||||
void kikikai_mcu_port1_w(uint8_t data);
|
||||
void kikikai_mcu_port2_w(uint8_t data);
|
||||
uint8_t kikikai_mcu_port3_r();
|
||||
void kikikai_mcu_port3_w(uint8_t data);
|
||||
void kikikai_mcu_port4_w(uint8_t data);
|
||||
|
||||
/* memory pointers */
|
||||
required_shared_ptr<u8> m_mainram;
|
||||
|
||||
@ -62,18 +82,6 @@ private:
|
||||
//u8 m_queue[64]{};
|
||||
//int m_qfront = 0;
|
||||
//int m_qstate = 0;
|
||||
void kicknrun_sub_output_w(uint8_t data);
|
||||
virtual void main_f008_w(uint8_t data);
|
||||
|
||||
void main_bankswitch_w(uint8_t data);
|
||||
uint8_t kiki_ym2203_r(offs_t offset);
|
||||
|
||||
virtual INTERRUPT_GEN_MEMBER(kikikai_interrupt);
|
||||
|
||||
void main_map(address_map &map);
|
||||
void sound_map(address_map &map);
|
||||
void kicknrun_sub_cpu_map(address_map &map);
|
||||
void knightba_main_map(address_map &map);
|
||||
|
||||
/* Kiki KaiKai / Kick 'n Run MCU */
|
||||
uint8_t m_port3_in = 0U;
|
||||
@ -81,24 +89,18 @@ private:
|
||||
uint8_t m_port2_out = 0U;
|
||||
uint8_t m_port3_out = 0U;
|
||||
uint8_t m_port4_out = 0U;
|
||||
|
||||
void kikikai_mcu_port1_w(uint8_t data);
|
||||
void kikikai_mcu_port2_w(uint8_t data);
|
||||
uint8_t kikikai_mcu_port3_r();
|
||||
void kikikai_mcu_port3_w(uint8_t data);
|
||||
void kikikai_mcu_port4_w(uint8_t data);
|
||||
};
|
||||
|
||||
class mexico86_state : public kikikai_state
|
||||
{
|
||||
public:
|
||||
mexico86_state(const machine_config& mconfig, device_type type, const char* tag)
|
||||
: kikikai_state(mconfig, type, tag),
|
||||
mexico86_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
kikikai_state(mconfig, type, tag),
|
||||
m_68705mcu(*this, "68705mcu")
|
||||
{
|
||||
}
|
||||
|
||||
void mexico86_68705(machine_config& config);
|
||||
void mexico86_68705(machine_config &config);
|
||||
void knightb(machine_config &config);
|
||||
|
||||
protected:
|
||||
@ -126,12 +128,12 @@ private:
|
||||
class kikikai_simulation_state : public kikikai_state
|
||||
{
|
||||
public:
|
||||
kikikai_simulation_state(const machine_config& mconfig, device_type type, const char* tag)
|
||||
: kikikai_state(mconfig, type, tag)
|
||||
kikikai_simulation_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
kikikai_state(mconfig, type, tag)
|
||||
{
|
||||
}
|
||||
|
||||
void kikikai(machine_config& config);
|
||||
void kikikai(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
|
@ -353,11 +353,13 @@ void kikikai_state::kikikai_mcu_port1_w(uint8_t data)
|
||||
//logerror("%04x: 6801U4 port 1 write %02x\n", m_mcu->pc(), data);
|
||||
|
||||
// bit 0, 1: coin counters (?)
|
||||
if (data & 0x01 && ~m_port1_out & 0x01) {
|
||||
if (data & 0x01 && ~m_port1_out & 0x01)
|
||||
{
|
||||
machine().bookkeeping().coin_counter_w(0, data & 0x01);
|
||||
}
|
||||
|
||||
if (data & 0x02 && ~m_port1_out & 0x02) {
|
||||
if (data & 0x02 && ~m_port1_out & 0x02)
|
||||
{
|
||||
machine().bookkeeping().coin_counter_w(1, data & 0x02);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user