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 Oct 24, 2024
2 parents 073fffe + 68008cf commit e3f0eb5
Show file tree
Hide file tree
Showing 25 changed files with 884 additions and 509 deletions.
905 changes: 541 additions & 364 deletions hash/spectrum_cass.xml

Large diffs are not rendered by default.

38 changes: 21 additions & 17 deletions src/mame/dataeast/dec0.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,33 @@
// thanks-to:Richard Bush
/***************************************************************************
Data East 16 bit games - Bryan McPhail, [email protected]
Data East 16 bit games - Bryan McPhail, [email protected]
Heavy Barrel, Bad Dudes, Robocop, Birdie Try & Hippodrome use the 'MEC-M1'
Heavy Barrel, Bad Dudes, Robocop, Birdie Try & Hippodrome use the 'MEC-M1'
motherboard and varying game boards. Sly Spy, Midnight Resistance and
Boulder Dash use the same graphics chips but are different pcbs.
Bandit (USA) is almost certainly a field test prototype, the software runs
on a Heavy Barrel board with the original Heavy Barrel MCU (which is effectively
not used). There is also Japanese version known to run on a DE-0321-1 top board.
Bandit (USA) is almost certainly a field test prototype, the software runs
on a Heavy Barrel board with the original Heavy Barrel MCU (which is effectively
not used). There is also Japanese version known to run on a DE-0321-1 top board.
There are Secret Agent (bootleg) and Robocop (bootleg) sets to add.
There are Secret Agent (bootleg) and Robocop (bootleg) sets to add.
Thanks to Gouky & Richard Bush for information along the way, especially
Gouky's patch for Bad Dudes & YM3812 information!
Thanks to JC Alexander for fix to Robocop ending!
Thanks to Gouky & Richard Bush for information along the way, especially
Gouky's patch for Bad Dudes & YM3812 information!
Thanks to JC Alexander for fix to Robocop ending!
All games' Dip Switches (except Boulder Dash) have been verified against
All games' Dip Switches (except Boulder Dash) have been verified against
Original Service Manuals and Service Mode (when available).
ToDo:
TODO:
- Fix remaining graphical problems in Automat (bootleg);
- Fix remaining sound problems in Secret Agent (bootleg);
- graphics are completely broken in Secret Agent (bootleg);
- Fighting Fantasy (bootleg) doesn't move on when killing the Lamia, is the MCU involved?
- Hook up the 68705 in Midnight Resistance (bootleg) (it might not be used, leftover from the Fighting Fantasy bootleg on the same PCB?)
- Hook up the 68705 in Midnight Resistance (bootleg) (it might not be used, leftover
from the Fighting Fantasy bootleg on the same PCB?)
- Get rid of ROM patch in Hippodrome;
- background pen in Birdie Try is presumably wrong;
- Unemulated coin counter, manuals mentions it but nowhere to be found, HW triggered?
Expand Down Expand Up @@ -58,8 +59,6 @@ Bad Dudes only seems to use commands $0B (sync), $01 (reset if parameter is not
startup), $07 (same function as Bad Dudes) and $09 (same function as Bad Dudes).
Most of the MCU program isn't utilised.
***************************************************************************
Data East 16 bit games (Updated 19-Feb-2021)
Expand Down Expand Up @@ -374,11 +373,13 @@ DE-0323-4
#include "cpu/m6502/m6502.h"
#include "cpu/z80/z80.h"
#include "cpu/m6805/m68705.h"
#include "machine/input_merger.h"
#include "machine/mb8421.h"
#include "machine/upd4701.h"
#include "sound/okim6295.h"
#include "sound/ymopn.h"
#include "sound/ymopl.h"

#include "speaker.h"


Expand Down Expand Up @@ -1828,6 +1829,9 @@ void dec0_state::dec0(machine_config &config)
M6502(config, m_audiocpu, XTAL(12'000'000) / 8);
m_audiocpu->set_addrmap(AS_PROGRAM, &dec0_state::dec0_s_map);

input_merger_device &audio_irq(INPUT_MERGER_ANY_HIGH(config, "audio_irq"));
audio_irq.output_handler().set_inputline(m_audiocpu, 0);

/* video hardware */
MCFG_VIDEO_START_OVERRIDE(dec0_state,dec0)

Expand All @@ -1841,10 +1845,11 @@ void dec0_state::dec0(machine_config &config)
ym1.add_route(1, "mono", 0.81);
ym1.add_route(2, "mono", 0.81);
ym1.add_route(3, "mono", 0.32);
ym1.irq_handler().set_inputline(m_audiocpu, 0); // Schematics show both ym2203 and ym3812 can trigger IRQ, but Bandit is the only game to program 2203 to do so
// Schematics show both ym2203 and ym3812 can trigger IRQ, but Bandit is the only game to program 2203 to do so
ym1.irq_handler().set("audio_irq", FUNC(input_merger_device::in_w<0>));

ym3812_device &ym2(YM3812(config, "ym2", XTAL(12'000'000) / 4));
ym2.irq_handler().set_inputline(m_audiocpu, 0);
ym2.irq_handler().set("audio_irq", FUNC(input_merger_device::in_w<1>));
ym2.add_route(ALL_OUTPUTS, "mono", 0.72);

okim6295_device &oki(OKIM6295(config, "oki", XTAL(20'000'000) / 2 / 10, okim6295_device::PIN7_HIGH));
Expand Down Expand Up @@ -4383,7 +4388,6 @@ GAME( 1990, bouldashj, bouldash, slyspy, bouldash, slyspy_state, init_s
GAME( 1988, robocopb, robocop, robocopb, robocop, dec0_state, empty_init, ROT0, "bootleg", "Robocop (World bootleg)", MACHINE_SUPPORTS_SAVE )
GAME( 1988, drgninjab, baddudes, drgninjab, drgninja, dec0_state, init_drgninja, ROT0, "bootleg", "Dragonninja (bootleg)", MACHINE_SUPPORTS_SAVE )


// this is a common bootleg board
GAME( 1989, midresb, midres, midresb, midresb, dec0_state, empty_init, ROT0, "bootleg", "Midnight Resistance (bootleg with 68705)", MACHINE_SUPPORTS_SAVE ) // need to hook up 68705? (probably unused)
GAME( 1989, midresbj, midres, midresbj, midresb, dec0_state, empty_init, ROT0, "bootleg", "Midnight Resistance (Joystick bootleg)", MACHINE_SUPPORTS_SAVE )
Expand Down
3 changes: 1 addition & 2 deletions src/mame/dataeast/dec0_m.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,10 @@ void dec0_state::sprite_mirror_w(offs_t offset, uint16_t data, uint16_t mem_mask

void dec0_state::h6280_decrypt(const char *cputag)
{
int i;
uint8_t *RAM = memregion(cputag)->base();

/* Read each byte, decrypt it */
for (i = 0x00000; i < 0x10000; i++)
for (int i = 0x00000; i < 0x10000; i++)
RAM[i] = (RAM[i] & 0x7e) | ((RAM[i] & 0x1) << 7) | ((RAM[i] & 0x80) >> 7);
}

Expand Down
14 changes: 2 additions & 12 deletions src/mame/fuuki/fuukifg2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ To Do:
they involve changing the *vertical* scroll value of the layers
each scanline (when you are about to die, in the solo game).
In gogomile they weave the water backgrounds and do some
parallactic scrolling on later levels. *partly done, could do with
parallax scrolling on later levels. *partly done, could do with
some tweaking
- The scroll values are generally wrong when flip screen is on and rasters are often incorrect
Expand Down Expand Up @@ -198,16 +198,6 @@ TILE_GET_INFO_MEMBER(fuuki16_state::get_tile_info)
***************************************************************************/

// Not used atm, seems to be fine without clearing pens?
#if 0
void fuuki16_state::fuuki16_palette(palette_device &palette) const
{
// The game does not initialise the palette at startup. It should be totally black
for (int pen = 0; pen < palette.entries(); pen++)
palette.set_pen_color(pen, rgb_t:black());
}
#endif

void fuuki16_state::video_start()
{
m_tilemap[0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(fuuki16_state::get_tile_info<0>)), TILEMAP_SCAN_ROWS, 16, 16, 64, 32);
Expand Down Expand Up @@ -714,7 +704,7 @@ void fuuki16_state::fuuki16(machine_config &config)
m_screen->set_palette(m_palette);

GFXDECODE(config, m_gfxdecode, m_palette, gfx_fuuki16);
PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 0x4000 / 2);
PALETTE(config, m_palette, palette_device::BLACK).set_format(palette_device::xRGB_555, 0x4000 / 2);

FUUKI_VIDEO(config, m_fuukivid, 0);
m_fuukivid->set_palette(m_palette);
Expand Down
2 changes: 1 addition & 1 deletion src/mame/fuuki/fuukifg3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ void fuuki32_state::fuuki32(machine_config &config)
m_screen->set_palette(m_palette);

GFXDECODE(config, m_gfxdecode, m_palette, gfx_fuuki32);
PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 0x4000 / 2);
PALETTE(config, m_palette, palette_device::BLACK).set_format(palette_device::xRGB_555, 0x4000 / 2);

FUUKI_VIDEO(config, m_fuukivid, 0);
m_fuukivid->set_palette(m_palette);
Expand Down
26 changes: 9 additions & 17 deletions src/mame/handheld/hh_tms1k.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8639,11 +8639,12 @@ ROM_END
* TMS1100NLL MP3491-N2 (die label: 1100E, MP3491)
* HLCD0569, 67-segment LCD panel, no sound

This handheld is not a toy, read the manual for more information. In short,
it is a device for predicting the winning chance of a gambling horserace.
This handheld is not a toy, read the manual for more information, and patent
US4382280 for more in-depth information. In short, it is a device for predicting
the winning chance of a gambling horserace.

It was rereleased in 1994 in China/Canada by AHTI(Advanced Handicapping
Technologies, Inc.), on a Hitachi HD613901.
It was rereleased in 1994 in China/Canada by AHTI (Advanced Handicapping
Technologies, Inc.), on a Hitachi HD613901 (LCD-IV).

*******************************************************************************/

Expand All @@ -8670,15 +8671,7 @@ class horseran_state : public hh_tms1k_state
void horseran_state::lcd_output_w(offs_t offset, u32 data)
{
// only 3 rows used
if (offset > 2)
return;

// update lcd segments
m_display->matrix_partial(0, 3, 1 << offset, data);

// col5-11 and col13-19 are 7segs
for (int i = 0; i < 2; i++)
m_display->write_row(3 + (offset << 1 | i), bitswap<8>(data >> (4+8*i),7,3,5,2,0,1,4,6) & 0x7f);
m_display->matrix(1 << offset, data);
}

void horseran_state::write_r(u32 data)
Expand Down Expand Up @@ -8781,8 +8774,7 @@ void horseran_state::horseran(machine_config &config)
HLCD0569(config, m_lcd, 1100); // C=0.022uF
m_lcd->write_cols().set(FUNC(horseran_state::lcd_output_w));

PWM_DISPLAY(config, m_display).set_size(3+6, 24);
m_display->set_segmask(0x3f<<3, 0x7f);
PWM_DISPLAY(config, m_display).set_size(3, 24);

// no sound!
}
Expand All @@ -8798,8 +8790,8 @@ ROM_START( horseran )
ROM_REGION( 365, "maincpu:opla", 0 ) // unused
ROM_LOAD( "tms1100_horseran_output.pla", 0, 365, CRC(0fea09b0) SHA1(27a56fcf2b490e9a7dbbc6ad48cc8aaca4cada94) )

ROM_REGION( 284940, "screen", 0)
ROM_LOAD( "horseran.svg", 0, 284940, CRC(eef5230d) SHA1(bafc3f7ac8052a4aafd7af80920e8a781c3898e4) )
ROM_REGION( 285857, "screen", 0)
ROM_LOAD( "horseran.svg", 0, 285857, CRC(2835acc5) SHA1(4fe19b4f902249ea9fb3e3baea704d4a7b9c897a) )
ROM_END


Expand Down
25 changes: 18 additions & 7 deletions src/mame/hitachi/bml3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Basic Master Level 3 (MB-689x) "Peach" (c) 1980 Hitachi
#include "bus/bml3/rtc.h"
#include "cpu/m6809/m6809.h"
#include "machine/6821pia.h"
#include "machine/clock.h"

#include "screen.h"
#include "softlist_dev.h"
Expand Down Expand Up @@ -212,7 +211,6 @@ void bml3_state::interlace_sel_w(u8 data)
crtc_change_clock();
}


u8 bml3_state::vram_r(offs_t offset)
{
// Bit 7 masks reading back to the latch
Expand Down Expand Up @@ -297,6 +295,19 @@ void bml3_state::remote_w(u8 data)
BIT(data, 7) ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR);
}

// BAUD SEL - ACIA clock select 600/1200 baud
// (Misspelled as BANK SEL in the English documentation)
void bml3_state::baud_sel_w(u8 data)
{
m_baud_sel = BIT(data, 0);
m_acia_clock->set_unscaled_clock(m_baud_sel ? 19'200 : 9'600);
}

u8 bml3_state::baud_sel_r()
{
return m_baud_sel;
}

// KBNMI - Keyboard "Break" key non-maskable interrupt
u8 bml3_state::kbnmi_r()
{
Expand Down Expand Up @@ -373,11 +384,11 @@ void bml3_state::system_io(address_map &map)
map(0x00d4, 0x00d4).w(FUNC(bml3_state::time_mask_w));
map(0x00d5, 0x00d5).noprw(); // L/P ENBL - Light pen operation enable
map(0x00d6, 0x00d6).w(FUNC(bml3_state::interlace_sel_w));
// map(0x00d7, 0x00d7) BANK SEL - baud select
map(0x00d7, 0x00d7).rw(FUNC(bml3_state::baud_sel_r), FUNC(bml3_state::baud_sel_w));
map(0x00d8, 0x00d8).rw(FUNC(bml3_state::c_reg_sel_r), FUNC(bml3_state::c_reg_sel_w));
map(0x00e0, 0x00e0).rw(FUNC(bml3_state::kb_sel_r), FUNC(bml3_state::kb_sel_w));
// map(0x00e8, 0x00e8) bank register
// map(0x00e9, 0x00e9) IG mode register
// map(0x00e9, 0x00e9) IG mode register (Mark 5 only, below)
// map(0x00ea, 0x00ea) IG enable register

#if 0
Expand Down Expand Up @@ -863,9 +874,9 @@ void bml3_state::bml3(machine_config &config)
m_acia->rts_handler().set(FUNC(bml3_state::acia_rts_w));
m_acia->irq_handler().set(FUNC(bml3_state::acia_irq_w));

clock_device &acia_clock(CLOCK(config, "acia_clock", 9'600)); // 600 baud x 16(divider) = 9600
acia_clock.signal_handler().set(m_acia, FUNC(acia6850_device::write_txc));
acia_clock.signal_handler().append(m_acia, FUNC(acia6850_device::write_rxc));
CLOCK(config, m_acia_clock, 9'600); // 600 baud x 16(divider) = 9600
m_acia_clock->signal_handler().set(m_acia, FUNC(acia6850_device::write_txc));
m_acia_clock->signal_handler().append(m_acia, FUNC(acia6850_device::write_rxc));

CASSETTE(config, m_cassette);
m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_DISABLED);
Expand Down
6 changes: 6 additions & 0 deletions src/mame/hitachi/bml3.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "bus/bml3/bml3bus.h"
#include "imagedev/cassette.h"
#include "machine/6850acia.h"
#include "machine/clock.h"
#include "machine/timer.h"
#include "sound/spkrdev.h"
#include "sound/ymopn.h"
Expand Down Expand Up @@ -72,6 +73,7 @@ class bml3_state : public driver_device
, m_speaker(*this, "speaker")
, m_ym2203(*this, "ym2203")
, m_acia(*this, "acia")
, m_acia_clock(*this, "acia_clock")
, m_io_keyboard(*this, "X%u", 0U)
{ }

Expand Down Expand Up @@ -111,6 +113,7 @@ class bml3_state : public driver_device
required_device<speaker_sound_device> m_speaker;
optional_device<ym2203_device> m_ym2203;
required_device<acia6850_device> m_acia;
required_device<clock_device> m_acia_clock;
//memory_view m_bank4;
required_ioport_array<4> m_io_keyboard;

Expand All @@ -119,6 +122,8 @@ class bml3_state : public driver_device
uint8_t kb_sel_r();
void kb_sel_w(u8 data);
void mode_sel_w(u8 data);
uint8_t baud_sel_r();
void baud_sel_w(u8 data);
void interlace_sel_w(u8 data);
[[maybe_unused]] uint8_t psg_latch_r();
[[maybe_unused]] void psg_latch_w(u8 data);
Expand Down Expand Up @@ -165,6 +170,7 @@ class bml3_state : public driver_device
u8 m_firq_mask = 0U;
u8 m_firq_status = 0U;
u8 m_nmi = 0U;
u8 m_baud_sel = 0U;
};

class bml3mk2_state : public bml3_state
Expand Down
29 changes: 7 additions & 22 deletions src/mame/igs/igs_m027_023vid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@ class igs_m027_023vid_state : public driver_device

void gpio_w(u8 data);

TIMER_DEVICE_CALLBACK_MEMBER(interrupt);

u16 sprites_r(offs_t offset);
void screen_vblank(int state);

Expand Down Expand Up @@ -164,6 +162,13 @@ void igs_m027_023vid_state::screen_vblank(int state)
{
// first 0xa00 of main ram = sprites, seems to be buffered, DMA?
m_video->get_sprites();

m_maincpu->pulse_input_line(arm7_cpu_device::ARM7_FIRQ_LINE, m_maincpu->minimum_quantum_time());
}
else
{
// this handles palette transfers, what scanline should it happen on? incorrect frame timing causes some graphics to be missing in service mode
igs_m027_023vid_state::irq_w<0>(ASSERT_LINE);
}
}

Expand Down Expand Up @@ -358,24 +363,6 @@ void igs_m027_023vid_state::gpio_w(u8 data)
m_gpio_out = data;
}


TIMER_DEVICE_CALLBACK_MEMBER(igs_m027_023vid_state::interrupt)
{
int const scanline = param;

switch (scanline)
{
case 0:
m_maincpu->pulse_input_line(arm7_cpu_device::ARM7_FIRQ_LINE, m_maincpu->minimum_quantum_time()); // vbl?
break;

case 192:
igs_m027_023vid_state::irq_w<0>(ASSERT_LINE);
break;
}
}


u16 igs_m027_023vid_state::sprites_r(offs_t offset)
{
// there does seem to be a spritelist at the start of mainram like PGM
Expand Down Expand Up @@ -417,8 +404,6 @@ void igs_m027_023vid_state::m027_023vid(machine_config &config)

PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 0x1200/2);

TIMER(config, "scantimer").configure_scanline(FUNC(igs_m027_023vid_state::interrupt), "screen", 0, 1);

// PGM video
IGS023_VIDEO(config, m_video, 0);
m_video->set_palette(m_palette);
Expand Down
Loading

0 comments on commit e3f0eb5

Please sign in to comment.