mirror of
https://github.com/holub/mame
synced 2025-05-19 20:29:09 +03:00
Removed deprecat.h usage from beezer.c [Angelo Salese]
This commit is contained in:
parent
07c84169d6
commit
4d9716f7d2
@ -4,10 +4,12 @@
|
||||
|
||||
Written by Mathis Rosenhauer
|
||||
|
||||
TODO:
|
||||
- what's really wrong with the sound? Any reference available?
|
||||
|
||||
*/
|
||||
|
||||
#include "emu.h"
|
||||
#include "deprecat.h"
|
||||
#include "machine/6522via.h"
|
||||
#include "cpu/m6809/m6809.h"
|
||||
#include "sound/dac.h"
|
||||
@ -75,12 +77,19 @@ static INPUT_PORTS_START( beezer )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
static MACHINE_START(beezer)
|
||||
{
|
||||
beezer_state *state = machine.driver_data<beezer_state>();
|
||||
|
||||
state->m_maincpu = machine.device("maincpu");
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( beezer, beezer_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M6809, 1000000) /* 1 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(main_map)
|
||||
MCFG_CPU_VBLANK_INT_HACK(beezer_interrupt,128)
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", beezer_interrupt, "screen", 0, 1)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", M6809, 1000000) /* 1 MHz */
|
||||
MCFG_CPU_PROGRAM_MAP(sound_map)
|
||||
@ -96,6 +105,8 @@ static MACHINE_CONFIG_START( beezer, beezer_state )
|
||||
|
||||
MCFG_PALETTE_LENGTH(16)
|
||||
|
||||
MCFG_MACHINE_START(beezer)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
||||
|
@ -9,7 +9,8 @@ public:
|
||||
UINT8 *m_videoram;
|
||||
int m_pbus;
|
||||
int m_banklatch;
|
||||
int m_scanline;
|
||||
|
||||
device_t *m_maincpu;
|
||||
};
|
||||
|
||||
|
||||
@ -33,7 +34,7 @@ READ8_DEVICE_HANDLER( beezer_noise_r );
|
||||
|
||||
/*----------- defined in video/beezer.c -----------*/
|
||||
|
||||
INTERRUPT_GEN( beezer_interrupt );
|
||||
TIMER_DEVICE_CALLBACK( beezer_interrupt );
|
||||
SCREEN_UPDATE( beezer );
|
||||
WRITE8_HANDLER( beezer_map_w );
|
||||
READ8_HANDLER( beezer_line_r );
|
||||
|
@ -4,17 +4,19 @@
|
||||
#include "includes/beezer.h"
|
||||
|
||||
|
||||
INTERRUPT_GEN( beezer_interrupt )
|
||||
TIMER_DEVICE_CALLBACK( beezer_interrupt )
|
||||
{
|
||||
beezer_state *state = device->machine().driver_data<beezer_state>();
|
||||
via6522_device *via_0 = device->machine().device<via6522_device>("via6522_0");
|
||||
int scanline = param;
|
||||
// beezer_state *state = timer.machine().driver_data<beezer_state>();
|
||||
via6522_device *via_0 = timer.machine().device<via6522_device>("via6522_0");
|
||||
|
||||
state->m_scanline = (state->m_scanline + 1) % 0x80;
|
||||
via_0->write_ca2((state->m_scanline & 0x10) ? 1 : 0);
|
||||
if ((state->m_scanline & 0x78) == 0x78)
|
||||
device_set_input_line(device, M6809_FIRQ_LINE, ASSERT_LINE);
|
||||
via_0->write_ca2((scanline & 0x20) ? 1 : 0);
|
||||
#if 0
|
||||
if (scanline == 240) // actually unused by the game! (points to a tight loop)
|
||||
device_set_input_line(state->m_maincpu, M6809_FIRQ_LINE, ASSERT_LINE);
|
||||
else
|
||||
device_set_input_line(device, M6809_FIRQ_LINE, CLEAR_LINE);
|
||||
device_set_input_line(state->m_maincpu, M6809_FIRQ_LINE, CLEAR_LINE);
|
||||
#endif
|
||||
}
|
||||
|
||||
SCREEN_UPDATE( beezer )
|
||||
@ -68,7 +70,6 @@ WRITE8_HANDLER( beezer_map_w )
|
||||
|
||||
READ8_HANDLER( beezer_line_r )
|
||||
{
|
||||
beezer_state *state = space->machine().driver_data<beezer_state>();
|
||||
return (state->m_scanline & 0xfe) << 1;
|
||||
return space->machine().primary_screen->vpos();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user