Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbbert committed Nov 8, 2024
2 parents bc7215e + 4318236 commit 7030298
Show file tree
Hide file tree
Showing 30 changed files with 2,152 additions and 335 deletions.
22 changes: 20 additions & 2 deletions hash/ekara_cart.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3151,7 +3151,7 @@ license:CC0-1.0
愛燦燦(あいさんさん) 美空ひばり Ai Sansan Misora Hibari
川の流れのように 美空ひばり Kawa no Nagare no Yō ni Misora Hibari
真赤な太陽 美空ひばり Makkana TaiYō Misora Hibari -->
<software name="ekaraweb12a">
<software name="ekaraweb12a" cloneof="ekaraweb12">
<description>e-kara Web cartridge 12M (used, with 7 songs) (Japan)</description>
<year>2003</year>
<publisher>Takara</publisher>
Expand All @@ -3176,7 +3176,7 @@ license:CC0-1.0
LOVE LOVE LOVE DREAMS COME TRUE Love Love Love Dreams Come True
キラリ☆セーラードリーム 小枝(さえ) Kirari ☆ Sailor Dream Koeda (Sae)
夏祭り Whiteberry Natsu Matsuri Whiteberry -->
<software name="ekaraweb12b">
<software name="ekaraweb12b" cloneof="ekaraweb12">
<description>e-kara Web cartridge 12M (used, with 12 songs) (Japan)</description>
<year>2003</year>
<publisher>Takara</publisher>
Expand All @@ -3188,6 +3188,24 @@ license:CC0-1.0
</part>
</software>

<!-- this one has some songs programmed into it:
月光町のうた おじゃる丸・キス Gekkō Machi no Uta Ojarumaru/Kiss
詠人(うたびと) 北島三郎 Utabito Kitajima Saburō
アララの呪文 ちびまる子ちゃんwith爆チュー問題 Arara no Jumon Chibi Maruko-chan with Bakuchū Mondai
サザエさん 宇野ゆう子 Sazae-san Uno Yūko
島人ぬ宝 BEGIN Shimanchunu Takara BEGIN -->
<software name="ekaraweb12c" cloneof="ekaraweb12">
<description>e-kara Web cartridge 12M (used, with 5 songs) (Japan)</description>
<year>2003</year>
<publisher>Takara</publisher>
<sharedfeat name="compatibility" value="EKARA"/>
<part name="cart" interface="ekara_cart">
<dataarea name="rom" size="0x100000">
<rom name="usercart.bin" size="0x100000" crc="bc4635cd" sha1="5343b254218f85a2f9e5ae9e4646b456d82c7d27"/>
</dataarea>
</part>
</software>

<!-- this one has some songs programmed into it:
世界に一つだけの花 SMAP Sekai ni Hitotsu Dake no Hana SMAP
さくらんぼ 大塚愛 Sakuranbo Ōtsuka Ai
Expand Down
39 changes: 36 additions & 3 deletions src/devices/cpu/xa/xa_ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1527,7 +1527,7 @@ void xa_cpu::bnv_rel8(u8 rel8) { fatalerror("BNV %04x\n", expand_rel8(rel8)); }
// BOV rel8 Branch if overflow flag is set 2 6t/3nt 1111 0101 rrrr rrrr
void xa_cpu::bov_rel8(u8 rel8) { fatalerror("BOV %04x\n", expand_rel8(rel8)); }
// BPL rel8 Branch if the negative flag is clear 2 6t/3nt 1111 0110 rrrr rrrr
void xa_cpu::bpl_rel8(u8 rel8) { fatalerror("BPL %04x\n", expand_rel8(rel8)); }
void xa_cpu::bpl_rel8(u8 rel8) { if (!get_n_flag()) { set_pc_in_current_page(expand_rel8(rel8)); cy(6); } else { cy(3); } }
// BMI rel8 Branch if the negative flag is set 2 6t/3nt 1111 0111 rrrr rrrr
void xa_cpu::bmi_rel8(u8 rel8) { fatalerror("BMI %04x\n", expand_rel8(rel8)); }
// BG rel8 Branch if greater than (unsigned) 2 6t/3nt 1111 1000 rrrr rrrr
Expand Down Expand Up @@ -1593,7 +1593,39 @@ void xa_cpu::mulu_byte_rd_rs(u8 rd, u8 rs) { fatalerror( "MULU.b %s, %s", m_regn
//DIVU.b Rd, Rs
void xa_cpu::divu_byte_rd_rs(u8 rd, u8 rs) { fatalerror( "DIVU.b %s, %s", m_regnames8[rd], m_regnames8[rs]); }
//MULU.w Rd, Rs
void xa_cpu::mulu_word_rd_rs(u8 rd, u8 rs) { fatalerror( "MULU.w %s, %s", m_regnames16[rd], m_regnames16[rs]); }
void xa_cpu::mulu_word_rd_rs(u8 rd, u8 rs)
{
if (rd & 1)
fatalerror("mulu_word_rd_rs with low rd bit set\n");

u16 fullval = gr16(rd);
u16 rsval = gr16(rs);

u32 result = (u32)fullval * rsval;

if (result & 0xffff0000)
set_v_flag();
else
clear_v_flag();

if (result == 0x0000)
set_z_flag();
else
clear_z_flag();

if (result & 0x8000)
set_n_flag();
else
clear_n_flag();

// TODO: verify these are writing to the correct registers
sr16(rd, result & 0xffff);
sr16(rd + 1, result >> 16);

clear_c_flag();

cy(12);
}
//DIVU.w Rd, Rs
void xa_cpu::divu_word_rd_rs(u8 rd, u8 rs) { fatalerror( "DIVU.w %s, %s", m_regnames16[rd], m_regnames16[rs]); }
// MUL.w Rd, Rs
Expand Down Expand Up @@ -1641,13 +1673,14 @@ void xa_cpu::divu_dword_rd_rs(u8 rd, u8 rs)
if (result == 0x0000)
set_z_flag();
else
clear_n_flag();
clear_z_flag();

if (result & 0x8000)
set_n_flag();
else
clear_n_flag();

// TODO: verify these are writing to the correct registers
sr16(rd, result);
sr16(rd + 1, remainder);
}
Expand Down
1 change: 1 addition & 0 deletions src/emu/xtal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ const double XTAL::known_xtals[] = {
42'105'200, // 42.1052_MHz_XTAL NEC PC-88xx
42'954'545, // 42.954545_MHz_XTAL CPS3 (12x NTSC subcarrier)
43'320'000, // 43.32_MHz_XTAL DEC VT420
44'000'000, // 44_MHz_XTAL VGame slots
44'100'000, // 44.1_MHz_XTAL Subsino's Bishou Jan
44'236'800, // 44.2368_MHz_XTAL ReCo6502, Fortune 32:16
44'452'800, // 44.4528_MHz_XTAL TeleVideo 965
Expand Down
37 changes: 37 additions & 0 deletions src/mame/att/att630.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,34 @@ class att630_state : public driver_device
att630_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_duart2(*this, "duart2")
, m_vram(*this, "vram")
, m_buttons(*this, "BUTTONS")
, m_bram_data(*this, "bram", 0x2000, ENDIANNESS_BIG)
{ }

void att630(machine_config &config);
void att730x(machine_config &config);

INPUT_CHANGED_MEMBER(mouse_moved);

protected:
virtual void machine_start() override ATTR_COLD;

private:
u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);

u8 buttons_r();
u8 bram_r(offs_t offset);
void bram_w(offs_t offset, u8 data);

void att630_map(address_map &map) ATTR_COLD;
void att730_map(address_map &map) ATTR_COLD;

required_device<m68000_device> m_maincpu;
required_device<scn2681_device> m_duart2;
required_shared_ptr<u16> m_vram;
required_ioport m_buttons;
memory_share_creator<u8> m_bram_data;
};

Expand All @@ -58,6 +65,19 @@ u32 att630_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, con
return 0;
}

INPUT_CHANGED_MEMBER(att630_state::mouse_moved)
{
m_duart2->ip2_w(0);
m_duart2->ip2_w(1);
}

u8 att630_state::buttons_r()
{
if (!machine().side_effects_disabled())
m_maincpu->set_input_line(M68K_IRQ_1, CLEAR_LINE);
return m_buttons->read();
}

u8 att630_state::bram_r(offs_t offset)
{
return m_bram_data[offset];
Expand All @@ -75,6 +95,9 @@ void att630_state::att630_map(address_map &map)
map(0x100000, 0x1fffff).noprw(); // cartridge space
map(0x200000, 0x20001f).rw("duart1", FUNC(scn2681_device::read), FUNC(scn2681_device::write)).umask16(0x00ff);
map(0x200020, 0x20003f).rw("duart2", FUNC(scn2681_device::read), FUNC(scn2681_device::write)).umask16(0x00ff);
map(0x200040, 0x200041).portr("MOUSEX");
map(0x200042, 0x200043).portr("MOUSEY");
map(0x200045, 0x200045).r(FUNC(att630_state::buttons_r));
map(0x400000, 0x6fffff).noprw(); // expansion i/o card
// map(0x700000, 0x75ffff).noprw(); // video controller
map(0x760000, 0x77ffff).ram().share("vram");
Expand All @@ -92,6 +115,19 @@ void att630_state::att730_map(address_map &map)
}

static INPUT_PORTS_START( att630 )
PORT_START("MOUSEX")
PORT_BIT(0x0fff, 0x0000, IPT_MOUSE_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(att630_state::mouse_moved), 0)
PORT_BIT(0xf000, IP_ACTIVE_LOW, IPT_UNUSED)

PORT_START("MOUSEY")
PORT_BIT(0x0fff, 0x0000, IPT_MOUSE_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(att630_state::mouse_moved), 0)
PORT_BIT(0xf000, IP_ACTIVE_LOW, IPT_UNUSED)

PORT_START("BUTTONS")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON3)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_BUTTON2)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_BUTTON1)
PORT_BIT(0xf8, IP_ACTIVE_LOW, IPT_UNUSED)
INPUT_PORTS_END

void att630_state::att630(machine_config &config)
Expand All @@ -106,6 +142,7 @@ void att630_state::att630(machine_config &config)
screen.set_raw(87.18336_MHz_XTAL, 1376, 0, 1024, 1056, 0, 1024);
screen.set_color(rgb_t::amber());
screen.set_screen_update(FUNC(att630_state::screen_update));
screen.screen_vblank().set_inputline(m_maincpu, M68K_IRQ_1, ASSERT_LINE);

scn2681_device &duart1(SCN2681(config, "duart1", 3.6864_MHz_XTAL));
duart1.irq_cb().set_inputline(m_maincpu, M68K_IRQ_3);
Expand Down
2 changes: 1 addition & 1 deletion src/mame/capcom/cps1bl_pic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1421,7 +1421,7 @@ ROM_START( jurassic99 )

// EMC EM78P447AP, secured
ROM_REGION( 0x1000, "pic", 0 )
ROM_LOAD( "pic16c57.bin", 0x0000, 0x1000, NO_DUMP )
ROM_LOAD( "em78p447ap.u28", 0x0000, 0x1000, NO_DUMP )

ROM_REGION( 0x80000, "oki", 0 )
ROM_LOAD( "21003_u27.bin", 0x000000, 0x80000, CRC(7d921309) SHA1(d51e60e904d302c2516b734189e141aa171b2b82) ) // == dinopic, dinopic2, dinopic3
Expand Down
41 changes: 34 additions & 7 deletions src/mame/excellent/lastbank.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Undumped games on similar hardware (ES-9402 or ES-9410):
* Miracle Seven - Heaven's Gate Turbo
* Multi Spin
* Royal Choice Poker
* Ukiyo Box
TODO:
- lastbank: sprites should be clip masked during gameplay (verify);
Expand Down Expand Up @@ -571,6 +570,15 @@ static INPUT_PORTS_START( fever13 )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END

static INPUT_PORTS_START( ukiyobx )
PORT_INCLUDE( fever13 )

PORT_MODIFY("DSW4")
PORT_DIPNAME( 0x40, 0x40, "Hopper Access" ) PORT_DIPLOCATION("DSW4:7")
PORT_DIPSETTING( 0x00, "Slow" )
PORT_DIPSETTING( 0x40, "Fast" )
INPUT_PORTS_END

static INPUT_PORTS_START( mir7hg )
PORT_INCLUDE( fever13 )

Expand Down Expand Up @@ -682,7 +690,7 @@ ROM_START( lastbank )
ROM_REGION( 0x10000, "audiocpu", 0 )
ROM_LOAD( "8.u48", 0x00000, 0x10000, CRC(3a7bfe10) SHA1(7dc543e11d3c0b9872fcc622339ade25383a1eb3) )

ROM_REGION( 0x120000, "maincpu:gfx", 0 )
ROM_REGION( 0x200000, "maincpu:gfx", ROMREGION_ERASEFF )
ROM_LOAD( "u11", 0x000000, 0x100000, CRC(2588d82d) SHA1(426f6821862d54123e53410e2776586ddf6b21e7) )
ROM_LOAD( "5.u10", 0x100000, 0x020000, CRC(51f3c5a7) SHA1(73d4c8817fe96d75be32c43e816e93c52b5d2b27) )

Expand All @@ -702,7 +710,7 @@ ROM_START( fever13 )
ROM_REGION( 0x10000, "audiocpu", 0 )
ROM_LOAD( "4.u48", 0x00000, 0x10000, CRC(33cba6b2) SHA1(cf7d1c7c6215b2f83c9266f92f46d3cfc0242afc) )

ROM_REGION( 0x120000, "maincpu:gfx", 0 )
ROM_REGION( 0x200000, "maincpu:gfx", ROMREGION_ERASEFF )
// unlabeled mask ROM, socket marked as 23C8000 CG ROM
ROM_LOAD( "u11", 0x000000, 0x100000, CRC(da59b0d8) SHA1(86fd3cd77aae22e103d11e697b8b4f70ae8b8197) )

Expand All @@ -713,6 +721,24 @@ ROM_START( fever13 )
ROM_LOAD( "2.u60", 0x00000, 0x80000, CRC(4e0da568) SHA1(6cd4d3facf8f05747d6cff03617bdfc91b5e9d67) )
ROM_END

// ES-9410 PCB
ROM_START( ukiyobx )
ROM_REGION( 0x40000, "maincpu", 0 )
ROM_LOAD( "5-9d33.u9", 0x00000, 0x40000,CRC(6a567f55) SHA1(087579e420d581439788561abddfe42fdeaaaa88) )

ROM_REGION( 0x10000, "audiocpu", 0 )
ROM_LOAD( "4.u48", 0x00000, 0x10000, CRC(33cba6b2) SHA1(cf7d1c7c6215b2f83c9266f92f46d3cfc0242afc) )

ROM_REGION( 0x200000, "maincpu:gfx", ROMREGION_ERASEFF )
ROM_LOAD( "u11", 0x00000, 0x100000, CRC(da59b0d8) SHA1(86fd3cd77aae22e103d11e697b8b4f70ae8b8197) )

ROM_REGION( 0x40000, "oki", 0 )
ROM_LOAD( "es-9410.u55", 0x00000, 0x40000, CRC(09b5e4d6) SHA1(cf0235e9cf0577bf932beda7e4fb1b84410a3e0c) ) // 1xxxxxxxxxxxxxxxxx = 0xFF

ROM_REGION( 0x80000, "essnd", 0 ) // Samples
ROM_LOAD( "es-9410.u60", 0x00000, 0x80000, CRC(f277afa9) SHA1(1b5a8abad37b6f19730f99bf97334b4eb2da4399) )
ROM_END

// ES-9410 PCB
ROM_START( mir7hg ) // v1.0.2 Feb 19 1996 15:05:17
ROM_REGION( 0x40000, "maincpu", 0 )
Expand All @@ -721,7 +747,7 @@ ROM_START( mir7hg ) // v1.0.2 Feb 19 1996 15:05:17
ROM_REGION( 0x10000, "audiocpu", 0 )
ROM_LOAD( "3.u48", 0x00000, 0x10000, CRC(895da366) SHA1(4e82e2ee9b6a91453b8dca9f313714ef846dec56) ) // 11111xxxxxxxxxxx = 0xFF

ROM_REGION( 0x80000, "maincpu:gfx", 0 )
ROM_REGION( 0x200000, "maincpu:gfx", ROMREGION_ERASEFF )
ROM_LOAD( "2.u11", 0x00000, 0x80000, CRC(ddb65010) SHA1(f5af9f63f353023d2ce8e8787a13ec090158ac25) )

ROM_REGION( 0x40000, "oki", 0 )
Expand All @@ -734,6 +760,7 @@ ROM_END
} // anonymous namespace


GAME( 1994, lastbank, 0, lastbank, lastbank, lastbank_state, empty_init, ROT0, "Excellent System", "Last Bank (v1.16)", MACHINE_SUPPORTS_SAVE )
GAME( 1995, fever13, 0, lastbank, fever13, fever13_state, empty_init, ROT0, "Excellent System", "Fever 13 (Japan, v1.3)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL )
GAME( 1996, mir7hg, 0, lastbank, mir7hg, fever13_state, empty_init, ROT0, "Excellent System", "Miracle Seven - Heaven's Gate (Japan, v1.0.2)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL )
GAME( 1994, lastbank, 0, lastbank, lastbank, lastbank_state, empty_init, ROT0, "Excellent System", "Last Bank (v1.16)", MACHINE_SUPPORTS_SAVE )
GAME( 1995, fever13, 0, lastbank, fever13, fever13_state, empty_init, ROT0, "Excellent System", "Fever 13 (Japan, v1.3)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL )
GAME( 1995, ukiyobx, fever13, lastbank, ukiyobx, fever13_state, empty_init, ROT0, "Excellent System", "Ukiyo Box (Japan, v1.3.7)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL )
GAME( 1996, mir7hg, 0, lastbank, mir7hg, fever13_state, empty_init, ROT0, "Excellent System", "Miracle Seven - Heaven's Gate (Japan, v1.0.2)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_COCKTAIL )
36 changes: 31 additions & 5 deletions src/mame/fidelity/csc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ MOS MPS 6520 PIA, I/O is nearly same as CSC's PIA 0
To play it on MAME with the sensorboard device, it is recommended to set up
keyboard shortcuts for the spawn inputs. Then hold the spawn input down while
clicking on the game board.
clicking on the game board. Alternatively, it's also possible to flip pieces
that are on the board by clicking while holding ALT.
*******************************************************************************/

Expand Down Expand Up @@ -239,7 +240,8 @@ class csc_state : public driver_device
m_dac(*this, "dac"),
m_speech(*this, "speech"),
m_language(*this, "language"),
m_inputs(*this, "IN.%u", 0)
m_inputs(*this, "IN.%u", 0),
m_board_inp(*this, "BOARD")
{ }

// machine drivers
Expand All @@ -264,6 +266,7 @@ class csc_state : public driver_device
optional_device<s14001a_device> m_speech;
optional_region_ptr<u8> m_language;
optional_ioport_array<9> m_inputs;
optional_ioport m_board_inp;

u8 m_led_data = 0;
u8 m_7seg_data = 0;
Expand All @@ -274,6 +277,8 @@ class csc_state : public driver_device
void csce_map(address_map &map) ATTR_COLD;
void rsc_map(address_map &map) ATTR_COLD;

u8 rsc_board_sensor_cb(offs_t offset);

// I/O handlers
u16 read_inputs();
void update_inputs();
Expand Down Expand Up @@ -311,11 +316,9 @@ INPUT_CHANGED_MEMBER(csc_state::su9_change_cpu_freq)


/*******************************************************************************
I/O
Sensorboard
*******************************************************************************/

// sensorboard handlers

INPUT_CHANGED_MEMBER(csc_state::rsc_init_board)
{
if (!newval)
Expand Down Expand Up @@ -344,6 +347,27 @@ INPUT_CHANGED_MEMBER(csc_state::rsc_init_board)
m_board->refresh();
}

u8 csc_state::rsc_board_sensor_cb(offs_t offset)
{
if (~m_board_inp->read() & 4)
return 0;

u8 x = offset & 0xf;
u8 y = offset >> 4 & 0xf;
u8 piece = m_board->read_piece(x, y);

// flip piece
if (piece && offset != m_board->get_handpos())
m_board->write_piece(x, y, (piece & 1) + 1);

return 3;
}



/*******************************************************************************
I/O
*******************************************************************************/

// misc handlers

Expand Down Expand Up @@ -587,6 +611,7 @@ static INPUT_PORTS_START( rsc )
PORT_START("BOARD")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(csc_state::rsc_init_board), 0) PORT_NAME("Board Reset A")
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(csc_state::rsc_init_board), 1) PORT_NAME("Board Reset B")
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CODE(KEYCODE_LALT) PORT_CODE(KEYCODE_RALT) PORT_NAME("Modifier 3 / Flip Piece")
INPUT_PORTS_END


Expand Down Expand Up @@ -676,6 +701,7 @@ void csc_state::rsc(machine_config &config)
m_pia[0]->cb2_handler().set(FUNC(csc_state::pia0_cb2_w));

SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS);
m_board->sensor_cb().set(FUNC(csc_state::rsc_board_sensor_cb));
m_board->set_spawnpoints(2);
m_board->set_delay(attotime::from_msec(300));

Expand Down
Loading

0 comments on commit 7030298

Please sign in to comment.