mirror of
https://github.com/holub/mame
synced 2025-05-29 17:13:05 +03:00
Improved sound and inputs in Midnight Landing
This commit is contained in:
parent
da2b0e3e8c
commit
1360627416
@ -1,6 +1,13 @@
|
||||
/* Taito Midnight Landing
|
||||
Dual 68k + 2xZ80
|
||||
no other hardware info..but it doesn't seem related to taitoair.c at all
|
||||
|
||||
TODO:
|
||||
- Fix "sprite" emulation, it's probably a blitter/buffer with commands etc.;
|
||||
- Comms between the four CPUs;
|
||||
- understand how to display the "dots", my guess is that they are at 0x200000-0x203fff of the sub cpu (this might need a side-by-side);
|
||||
- Fix "sound cpu error" msg;
|
||||
- Inputs, particularly needed for a game like this one;
|
||||
*/
|
||||
|
||||
#include "driver.h"
|
||||
@ -58,10 +65,9 @@ static READ16_HANDLER( io1_r ) //240006
|
||||
other bits = language(german, japan, english), video test
|
||||
*/
|
||||
|
||||
int retval= (status_bit|1|0x07fff);
|
||||
status_bit=0x8000;
|
||||
return retval;
|
||||
|
||||
int retval= (status_bit|1|0x07fff);
|
||||
status_bit=0x8000;
|
||||
return retval;
|
||||
}
|
||||
|
||||
static WRITE16_HANDLER(ml_subreset_w)
|
||||
@ -108,6 +114,12 @@ static WRITE8_DEVICE_HANDLER( ml_msm5205_stop_w )
|
||||
adpcm_pos &= 0xff00;
|
||||
}
|
||||
|
||||
/* TODO: check this */
|
||||
static WRITE16_HANDLER( sound_reset_w )
|
||||
{
|
||||
cputag_set_input_line(space->machine, "audiocpu", INPUT_LINE_RESET, PULSE_LINE);
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( mlanding_mem, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x000000, 0x05ffff) AM_ROM
|
||||
AM_RANGE(0x080000, 0x08ffff) AM_RAM
|
||||
@ -119,10 +131,11 @@ static ADDRESS_MAP_START( mlanding_mem, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x1c4000, 0x1cffff) AM_RAM AM_SHARE(1)
|
||||
|
||||
AM_RANGE(0x1d0000, 0x1d0001) AM_WRITENOP
|
||||
AM_RANGE(0x1d0002, 0x1d0003) AM_NOP //sound reset ??
|
||||
AM_RANGE(0x1d0002, 0x1d0003) AM_WRITE(sound_reset_w) //sound reset ??
|
||||
|
||||
AM_RANGE(0x2d0000, 0x2d0001) AM_READNOP AM_WRITE8(taitosound_port_w, 0x00ff)
|
||||
AM_RANGE(0x2d0002, 0x2d0003) AM_READ8(taitosound_comm_r, 0xff00) AM_WRITE8(taitosound_comm_w, 0x00ff)
|
||||
// AM_RANGE(0x2d0002, 0x2d0003) AM_READ8(taitosound_comm_r, 0xff00) AM_WRITE8(taitosound_comm_w, 0x00ff)
|
||||
AM_RANGE(0x2d0002, 0x2d0003) AM_READ8(taitosound_comm_r, 0x00ff) AM_WRITE8(taitosound_comm_w, 0x00ff)
|
||||
|
||||
AM_RANGE(0x200000, 0x20ffff) AM_RAM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) AM_BASE(&paletteram16)//AM_SHARE(2)
|
||||
AM_RANGE(0x280000, 0x2807ff) AM_RAM // is it shared with mecha ? tested around $940
|
||||
@ -134,8 +147,10 @@ static ADDRESS_MAP_START( mlanding_mem, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x240006, 0x240007) AM_READ(io1_r) // vblank ?
|
||||
AM_RANGE(0x2a0000, 0x2a0001) AM_WRITE(ml_subreset_w)
|
||||
|
||||
/* are we sure that these are for an analog stick? */
|
||||
AM_RANGE(0x2b0000, 0x2b0001) AM_READ_PORT("STICKX") //-40 .. 40 analog controls ?
|
||||
AM_RANGE(0x2b0004, 0x2b0005) AM_READ_PORT("STICKY") //-40 .. 40 analog controls ?
|
||||
AM_RANGE(0x2b0006, 0x2b0007) AM_READNOP // tested in service mode, dips?
|
||||
AM_RANGE(0x2c0000, 0x2c0001) AM_READ_PORT("STICKZ") //-60 .. 60 analog controls ?
|
||||
AM_RANGE(0x2c0002, 0x2c0003) AM_READ_PORT("IN3")
|
||||
AM_RANGE(0x2b0002, 0x2b0003) AM_READ_PORT("IN2") // IN2/IN3 could be switched
|
||||
@ -155,10 +170,9 @@ ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( mlanding_z80_mem, ADDRESS_SPACE_PROGRAM, 8 )
|
||||
AM_RANGE(0x0000, 0x3fff) AM_ROM
|
||||
AM_RANGE(0x4000, 0x7fff) AM_READ(SMH_BANK(1))
|
||||
AM_RANGE(0x4000, 0x7fff) AM_ROMBANK(1)
|
||||
AM_RANGE(0x8000, 0x8fff) AM_RAM
|
||||
AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE("ym", ym2151_r, ym2151_w)
|
||||
AM_RANGE(0x9002, 0x9100) AM_READ(SMH_RAM)
|
||||
AM_RANGE(0x9000, 0x9001) AM_MIRROR(0x00fe) AM_DEVREADWRITE("ym", ym2151_r, ym2151_w)
|
||||
AM_RANGE(0xa000, 0xa000) AM_WRITE(taitosound_slave_port_w)
|
||||
AM_RANGE(0xa001, 0xa001) AM_READ(taitosound_slave_comm_r) AM_WRITE(taitosound_slave_comm_w)
|
||||
|
||||
@ -254,7 +268,7 @@ static VIDEO_UPDATE(mlanding)
|
||||
copybitmap_trans(bitmap,ml_bitmap[i], 0, 0, 0, 0, cliprect, 0);
|
||||
}
|
||||
}
|
||||
status_bit=0;
|
||||
status_bit=0; //FIXME: emulation variable in VIDEO_UPDATE()
|
||||
{
|
||||
/* int i;
|
||||
for(i=0;i<0x8000;i++)
|
||||
@ -269,38 +283,84 @@ static VIDEO_UPDATE(mlanding)
|
||||
|
||||
static INPUT_PORTS_START( mlanding )
|
||||
PORT_START("IN0")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_TILT )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SERVICE ) //service coin?
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Door") PORT_TOGGLE
|
||||
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
|
||||
PORT_START("IN1")
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_COIN1 )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_COIN2 )
|
||||
PORT_DIPNAME( 0x01, 0x01, "SYSTEM" )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN2 )
|
||||
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
|
||||
PORT_START("IN2")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_PLAYER(1)
|
||||
PORT_DIPNAME( 0x01, 0x01, "SYSTEM" ) //high bits of counter 2
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Slot Down")
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Slot Up")
|
||||
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
|
||||
PORT_START("IN3")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_START2 )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_START1 )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_COIN3 )
|
||||
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Demo_Sounds ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0020, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Flip_Screen ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0040, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x0080, 0x0080, "test 1" )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0080, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x01, 0x01, "SYSTEM" ) //high bits of counter 3
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
|
||||
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
|
||||
PORT_START("STICKX") /* Stick 1 (3) */
|
||||
PORT_BIT( 0xffff, 0x0000, IPT_AD_STICK_X ) PORT_MINMAX(0xffd8,0x28) PORT_SENSITIVITY(30) PORT_KEYDELTA(1) PORT_PLAYER(1)
|
||||
@ -358,6 +418,8 @@ static MACHINE_DRIVER_START( mlanding )
|
||||
MDRV_CPU_PROGRAM_MAP(mlanding_z80_sub_mem)
|
||||
MDRV_CPU_VBLANK_INT("screen", irq0_line_hold)
|
||||
|
||||
MDRV_QUANTUM_TIME(HZ(600))
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("screen", RASTER)
|
||||
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
|
Loading…
Reference in New Issue
Block a user