| Previous | 199869 Revisions | Next |
| r22782 Sunday 12th May, 2013 at 11:17:58 UTC by smf |
|---|
| modernised the AY8910 [smf] |
| [src/emu/sound] | ay8910.c ay8910.h |
| [src/mame/audio] | carnival.c cinemat.c gottlieb.c irem.c mario.c midway.c redalert.c scramble.c timeplt.c |
| [src/mame/drivers] | 1942.c 40love.c 4enraya.c 5clown.c aces1.c adp.c aeroboto.c albazc.c albazg.c alpha68k.c ambush.c ampoker2.c arabian.c aristmk4.c arkanoid.c astrocde.c avt.c aztarac.c bagman.c battlex.c bfcobra.c bfm_sc1.c bfmsys85.c big10.c bigevglf.c bking.c blueprnt.c bmcbowl.c bogeyman.c bombjack.c btime.c buggychl.c bwing.c calomega.c calorie.c carjmbre.c carrera.c caswin.c cb2001.c cchance.c cchasm.c cclimber.c centiped.c chaknpop.c champbas.c changela.c cidelsa.c citycon.c cntsteer.c coinmstr.c cop01.c corona.c crgolf.c dacholer.c dblcrown.c dday.c ddayjlc.c ddenlovr.c deco_ld.c decocass.c dlair.c dmndrby.c dogfgt.c dominob.c drw80pkr.c dunhuang.c dwarfd.c dynadice.c dynax.c enigma2.c epos.c equites.c espial.c ettrivia.c exedexes.c exerion.c fastfred.c fcombat.c flipjack.c flstory.c forte2.c fortecar.c fromance.c funkybee.c funworld.c galaxian.c galaxold.c gameplan.c ginganin.c gluck2.c goldngam.c goldnpkr.c goldstar.c grchamp.c gsword.c gyruss.c halleys.c hanaawas.c higemaru.c hitpoker.c holeland.c hotblock.c hyhoo.c icecold.c imolagp.c jack.c jangou.c jollyjgr.c jongkyo.c junofrst.c kaneko16.c kangaroo.c kas89.c kchamp.c kingdrby.c kingobox.c kingpin.c kncljoe.c koikoi.c ksayakyu.c kurukuru.c kyugo.c ladyfrog.c laserbat.c lasso.c liberate.c looping.c lsasquad.c ltcasino.c lucky74.c lvcards.c m63.c madalien.c magmax.c mainsnk.c marineb.c matmania.c maygay1b.c mazerbla.c megazone.c meijinsn.c merit.c meritm.c mermaid.c miniboy7.c mirax.c mjsister.c mole.c mouser.c mpu12wbk.c mpu4hw.c mrflea.c msisaac.c multfish.c munchmo.c mystston.c nbmj8688.c nbmj8891.c nbmj8991.c nemesis.c nightgal.c nova2001.c nsm.c nycaptor.c nyny.c ojankohs.c olibochu.c omegrace.c othello.c pacman.c pandoras.c pastelg.c pbaction.c pengadvb.c peplus.c peyper.c phoenix.c pitnrun.c poker72.c popeye.c popper.c proconn.c progolf.c pturn.c quizo.c r2dtank.c re900.c rgum.c rmhaihai.c rollrace.c roul.c route16.c royalmah.c sanremo.c sbowling.c scobra.c scramble.c scregg.c segag80v.c seicross.c shangha3.c shangkid.c shougi.c skeetsht.c skyarmy.c skylncr.c slapfght.c slotcarn.c sms.c snk.c solomon.c sonson.c speedatk.c splus.c srmp2.c ssingles.c ssozumo.c ssrj.c statriv2.c sub.c suna16.c suna8.c supdrapo.c superqix.c supertnk.c superwng.c suprridr.c tagteam.c taitosj.c tankbust.c taxidriv.c tehkanwc.c thepit.c thief.c tickee.c timelimt.c tonton.c trvmadns.c trvquest.c tsamurai.c tubep.c tugboat.c twins.c tx1.c usgames.c vastar.c vd.c vega.c videopkr.c vlc.c vroulet.c vulgus.c wallc.c wink.c wiz.c zaccaria.c zodiack.c |
| [src/mame/includes] | laserbat.h mermaid.h vectrex.h |
| [src/mame/machine] | leland.c vectrex.c |
| [src/mame/video] | vectrex.c |
| [src/mess/drivers] | ace.c aquarius.c atarist.c atm.c cgc7900.c cgenie.c einstein.c fm7.c galaxy.c intv.c mc1000.c microtan.c msx.c multi8.c pc6001.c pentagon.c phc25.c sbc6510.c scorpion.c spc1000.c spec128.c specpls3.c svi318.c tiki100.c timex.c x1.c |
| [src/mess/includes] | cgenie.h fm7.h msx.h oric.h orion.h rmnimbus.h |
| [src/mess/machine] | a2arcadebd.c a2mockingboard.c amstrad.c cgenie.c dgnalpha.c microtan.c nes_sunsoft.c oric.c orion.c rmnimbus.c spec_snqk.c |
| r22781 | r22782 | |
|---|---|---|
| 215 | 215 | AM_RANGE(0xca00, 0xca00) AM_WRITE(changela_slope_rom_addr_hi_w) |
| 216 | 216 | AM_RANGE(0xcb00, 0xcb00) AM_WRITE(changela_slope_rom_addr_lo_w) |
| 217 | 217 | |
| 218 | AM_RANGE(0xd000, 0xd001) AM_DEVREADWRITE_LEGACY("ay1", ay8910_r, ay8910_address_data_w) | |
| 219 | AM_RANGE(0xd010, 0xd011) AM_DEVREADWRITE_LEGACY("ay2", ay8910_r, ay8910_address_data_w) | |
| 218 | AM_RANGE(0xd000, 0xd001) AM_DEVREADWRITE("ay1", ay8910_device, data_r, address_data_w) | |
| 219 | AM_RANGE(0xd010, 0xd011) AM_DEVREADWRITE("ay2", ay8910_device, data_r, address_data_w) | |
| 220 | 220 | |
| 221 | 221 | /* LS259 - U44 */ |
| 222 | 222 | AM_RANGE(0xd020, 0xd020) AM_WRITE(changela_collision_reset_0) |
| r22781 | r22782 | |
|---|---|---|
| 396 | 396 | AM_RANGE(0xc00000, 0xc00001) AM_WRITE8(srmp2_irq2_ack_w,0x00ff) /* irq ack lv 2 */ |
| 397 | 397 | AM_RANGE(0xd00000, 0xd00001) AM_WRITE8(srmp2_irq4_ack_w,0x00ff) /* irq ack lv 4 */ |
| 398 | 398 | AM_RANGE(0xe00000, 0xe00001) AM_WRITENOP /* watchdog */ |
| 399 | AM_RANGE(0xf00000, 0xf00001) AM_DEVREAD8_LEGACY("aysnd", ay8910_r, 0x00ff) | |
| 400 | AM_RANGE(0xf00000, 0xf00003) AM_DEVWRITE8_LEGACY("aysnd", ay8910_address_data_w, 0x00ff) | |
| 399 | AM_RANGE(0xf00000, 0xf00001) AM_DEVREAD8("aysnd", ay8910_device, data_r, 0x00ff) | |
| 400 | AM_RANGE(0xf00000, 0xf00003) AM_DEVWRITE8("aysnd", ay8910_device, address_data_w, 0x00ff) | |
| 401 | 401 | ADDRESS_MAP_END |
| 402 | 402 | |
| 403 | 403 | READ8_MEMBER(srmp2_state::mjyuugi_irq2_ack_r) |
| r22781 | r22782 | |
| 428 | 428 | AM_RANGE(0x900002, 0x900003) AM_READWRITE8(iox_status_r,iox_data_w,0x00ff) |
| 429 | 429 | AM_RANGE(0xa00000, 0xa00001) AM_WRITE(srmp2_adpcm_code_w) /* ADPCM number */ |
| 430 | 430 | AM_RANGE(0xb00002, 0xb00003) AM_READ8(vox_status_r,0x00ff) /* ADPCM voice status */ |
| 431 | AM_RANGE(0xb00000, 0xb00001) AM_DEVREAD8_LEGACY("aysnd", ay8910_r, 0x00ff) | |
| 432 | AM_RANGE(0xb00000, 0xb00003) AM_DEVWRITE8_LEGACY("aysnd", ay8910_address_data_w, 0x00ff) | |
| 431 | AM_RANGE(0xb00000, 0xb00001) AM_DEVREAD8("aysnd", ay8910_device, data_r, 0x00ff) | |
| 432 | AM_RANGE(0xb00000, 0xb00003) AM_DEVWRITE8("aysnd", ay8910_device, address_data_w, 0x00ff) | |
| 433 | 433 | AM_RANGE(0xc00000, 0xc00001) AM_WRITENOP /* ??? */ |
| 434 | 434 | AM_RANGE(0xd00000, 0xd005ff) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spriteylow_r16, spriteylow_w16) /* Sprites Y */ |
| 435 | 435 | AM_RANGE(0xd00600, 0xd00607) AM_RAM AM_DEVREADWRITE_LEGACY("spritegen", spritectrl_r16, spritectrl_w16) |
| r22781 | r22782 | |
| 479 | 479 | AM_RANGE(0xa1, 0xa1) AM_READ(vox_status_r) /* ADPCM voice status */ |
| 480 | 480 | AM_RANGE(0xc0, 0xc0) AM_READWRITE(iox_mux_r, iox_command_w) /* key matrix | I/O */ |
| 481 | 481 | AM_RANGE(0xc1, 0xc1) AM_READWRITE(iox_status_r,iox_data_w) |
| 482 | AM_RANGE(0xe0, 0xe1) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 483 | AM_RANGE(0xe2, 0xe2) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 482 | AM_RANGE(0xe0, 0xe1) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 483 | AM_RANGE(0xe2, 0xe2) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 484 | 484 | ADDRESS_MAP_END |
| 485 | 485 | |
| 486 | 486 | static ADDRESS_MAP_START( rmgoldyh_map, AS_PROGRAM, 8, srmp2_state ) |
| r22781 | r22782 | |
|---|---|---|
| 131 | 131 | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| 132 | 132 | AM_RANGE(0x4000, 0x47ff) AM_RAM |
| 133 | 133 | AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r) |
| 134 | AM_RANGE(0x8001, 0x8001) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 135 | AM_RANGE(0x8002, 0x8003) AM_DEVWRITE_LEGACY("ay1", ay8910_data_address_w) | |
| 136 | AM_RANGE(0xa001, 0xa001) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 137 | AM_RANGE(0xa002, 0xa003) AM_DEVWRITE_LEGACY("ay2", ay8910_data_address_w) | |
| 138 | AM_RANGE(0xc001, 0xc001) AM_DEVREAD_LEGACY("ay3", ay8910_r) | |
| 139 | AM_RANGE(0xc002, 0xc003) AM_DEVWRITE_LEGACY("ay3", ay8910_data_address_w) | |
| 134 | AM_RANGE(0x8001, 0x8001) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 135 | AM_RANGE(0x8002, 0x8003) AM_DEVWRITE("ay1", ay8910_device, data_address_w) | |
| 136 | AM_RANGE(0xa001, 0xa001) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 137 | AM_RANGE(0xa002, 0xa003) AM_DEVWRITE("ay2", ay8910_device, data_address_w) | |
| 138 | AM_RANGE(0xc001, 0xc001) AM_DEVREAD("ay3", ay8910_device, data_r) | |
| 139 | AM_RANGE(0xc002, 0xc003) AM_DEVWRITE("ay3", ay8910_device, data_address_w) | |
| 140 | 140 | ADDRESS_MAP_END |
| 141 | 141 | |
| 142 | 142 |
| r22781 | r22782 | |
|---|---|---|
| 195 | 195 | |
| 196 | 196 | static ADDRESS_MAP_START( meijinsn_sound_io_map, AS_IO, 8, meijinsn_state ) |
| 197 | 197 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 198 | AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 199 | AM_RANGE(0x01, 0x01) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 198 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 199 | AM_RANGE(0x01, 0x01) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 200 | 200 | AM_RANGE(0x02, 0x02) AM_WRITE(soundlatch_clear_byte_w) |
| 201 | 201 | AM_RANGE(0x06, 0x06) AM_WRITENOP |
| 202 | 202 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 88 | 88 | AM_RANGE(0xec10, 0xec10) AM_READ_PORT("IN4") |
| 89 | 89 | AM_RANGE(0xec12, 0xec12) AM_READ_PORT("IN5") |
| 90 | 90 | |
| 91 | AM_RANGE(0xec20, 0xec20) AM_DEVREAD | |
| 91 | AM_RANGE(0xec20, 0xec20) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 92 | 92 | AM_RANGE(0xec21, 0xec21) AM_READ_PORT("BUTTONS") //ltcasino -> pc: F3F3 (A in service) and F3FD (B in service) |
| 93 | AM_RANGE(0xec20, 0xec21) AM_DEVWRITE | |
| 93 | AM_RANGE(0xec20, 0xec21) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 94 | 94 | AM_RANGE(0xec3e, 0xec3e) AM_READNOP //not used |
| 95 | 95 | AM_RANGE(0xec30, 0xec3f) AM_RAM |
| 96 | 96 | AM_RANGE(0xf000, 0xffff) AM_ROM |
| r22781 | r22782 | |
|---|---|---|
| 238 | 238 | AM_RANGE(0xc000, 0xdfff) AM_RAM AM_SHARE("nvram") |
| 239 | 239 | AM_RANGE(0xe000, 0xe000) AM_DEVWRITE("tms9128", tms9928a_device, vram_write) |
| 240 | 240 | AM_RANGE(0xe001, 0xe001) AM_DEVWRITE("tms9128", tms9928a_device, register_write) |
| 241 | AM_RANGE(0xe800, 0xe801) AM_DEVWRITE_LEGACY("ay_re900", ay8910_address_data_w) | |
| 242 | AM_RANGE(0xe802, 0xe802) AM_DEVREAD_LEGACY("ay_re900", ay8910_r) | |
| 241 | AM_RANGE(0xe800, 0xe801) AM_DEVWRITE("ay_re900", ay8910_device, address_data_w) | |
| 242 | AM_RANGE(0xe802, 0xe802) AM_DEVREAD("ay_re900", ay8910_device, data_r) | |
| 243 | 243 | AM_RANGE(0xe000, 0xefff) AM_WRITE(re900_watchdog_reset_w) |
| 244 | 244 | AM_RANGE(MCS51_PORT_P0, MCS51_PORT_P0) AM_WRITE(cpu_port_0_w) |
| 245 | 245 | AM_RANGE(MCS51_PORT_P2, MCS51_PORT_P2) AM_NOP |
| r22781 | r22782 | |
|---|---|---|
| 1051 | 1051 | AM_RANGE(0x3000, 0x3fff) AM_READWRITE(peplus_s3000_r, peplus_s3000_w) AM_SHARE("s3000_ram") |
| 1052 | 1052 | |
| 1053 | 1053 | // Sound and Dipswitches |
| 1054 | AM_RANGE(0x4000, 0x4000) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 1055 | AM_RANGE(0x4004, 0x4004) AM_READ_PORT("SW1")/* likely ay8910 input port, not direct */ AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 1054 | AM_RANGE(0x4000, 0x4000) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 1055 | AM_RANGE(0x4004, 0x4004) AM_READ_PORT("SW1")/* likely ay8910 input port, not direct */ AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 1056 | 1056 | |
| 1057 | 1057 | // Superboard Data |
| 1058 | 1058 | AM_RANGE(0x5000, 0x5fff) AM_READWRITE(peplus_s5000_r, peplus_s5000_w) AM_SHARE("s5000_ram") |
| r22781 | r22782 | |
|---|---|---|
| 228 | 228 | |
| 229 | 229 | static ADDRESS_MAP_START( sound_io_map, AS_IO, 8, jack_state ) |
| 230 | 230 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 231 | AM_RANGE(0x40, 0x40) AM_DEVREADWRITE_LEGACY("aysnd", ay8910_r, ay8910_data_w) | |
| 232 | AM_RANGE(0x80, 0x80) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 231 | AM_RANGE(0x40, 0x40) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, data_w) | |
| 232 | AM_RANGE(0x80, 0x80) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 233 | 233 | ADDRESS_MAP_END |
| 234 | 234 | |
| 235 | 235 |
| r22781 | r22782 | |
|---|---|---|
| 813 | 813 | |
| 814 | 814 | AM_RANGE(0x2070, 0x207f) AM_DEVREADWRITE_LEGACY("duart68681", duart68681_r, duart68681_w ) |
| 815 | 815 | |
| 816 | AM_RANGE(0x2090, 0x2091) AM_DEVWRITE | |
| 816 | AM_RANGE(0x2090, 0x2091) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 817 | 817 | AM_RANGE(0x20B0, 0x20B0) AM_READ(m1_meter_r) |
| 818 | 818 | |
| 819 | 819 | AM_RANGE(0x20A0, 0x20A3) AM_DEVWRITE("pia", pia6821_device, write) |
| r22781 | r22782 | |
|---|---|---|
| 1021 | 1021 | AM_RANGE(0x35, 0x35) AM_WRITE(multfish_lamps3_w) |
| 1022 | 1022 | // AM_RANGE(0x36, 0x36) AM_WRITE(multfish_port36_w) |
| 1023 | 1023 | AM_RANGE(0x37, 0x37) AM_WRITE(watchdog_reset_w) |
| 1024 | AM_RANGE(0x38, 0x38) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 1025 | AM_RANGE(0x39, 0x39) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 1026 | AM_RANGE(0x3a, 0x3a) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 1024 | AM_RANGE(0x38, 0x38) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 1025 | AM_RANGE(0x39, 0x39) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 1026 | AM_RANGE(0x3a, 0x3a) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 1027 | 1027 | |
| 1028 | 1028 | AM_RANGE(0x60, 0x60) AM_WRITE(multfish_dispenable_w) // display enable mirror for lottery sets |
| 1029 | 1029 |
| r22781 | r22782 | |
|---|---|---|
| 202 | 202 | |
| 203 | 203 | static ADDRESS_MAP_START( audio_cpu1_io_map, AS_IO, 8, gyruss_state ) |
| 204 | 204 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 205 | AM_RANGE(0x00, 0x00) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) | |
| 206 | AM_RANGE(0x01, 0x01) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 207 | AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("ay1", ay8910_data_w) | |
| 208 | AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) | |
| 209 | AM_RANGE(0x05, 0x05) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 210 | AM_RANGE(0x06, 0x06) AM_DEVWRITE_LEGACY("ay2", ay8910_data_w) | |
| 211 | AM_RANGE(0x08, 0x08) AM_DEVWRITE_LEGACY("ay3", ay8910_address_w) | |
| 212 | AM_RANGE(0x09, 0x09) AM_DEVREAD_LEGACY("ay3", ay8910_r) | |
| 213 | AM_RANGE(0x0a, 0x0a) AM_DEVWRITE_LEGACY("ay3", ay8910_data_w) | |
| 214 | AM_RANGE(0x0c, 0x0c) AM_DEVWRITE_LEGACY("ay4", ay8910_address_w) | |
| 215 | AM_RANGE(0x0d, 0x0d) AM_DEVREAD_LEGACY("ay4", ay8910_r) | |
| 216 | AM_RANGE(0x0e, 0x0e) AM_DEVWRITE_LEGACY("ay4", ay8910_data_w) | |
| 217 | AM_RANGE(0x10, 0x10) AM_DEVWRITE_LEGACY("ay5", ay8910_address_w) | |
| 218 | AM_RANGE(0x11, 0x11) AM_DEVREAD_LEGACY("ay5", ay8910_r) | |
| 219 | AM_RANGE(0x12, 0x12) AM_DEVWRITE_LEGACY("ay5", ay8910_data_w) | |
| 205 | AM_RANGE(0x00, 0x00) AM_DEVWRITE("ay1", ay8910_device, address_w) | |
| 206 | AM_RANGE(0x01, 0x01) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 207 | AM_RANGE(0x02, 0x02) AM_DEVWRITE("ay1", ay8910_device, data_w) | |
| 208 | AM_RANGE(0x04, 0x04) AM_DEVWRITE("ay2", ay8910_device, address_w) | |
| 209 | AM_RANGE(0x05, 0x05) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 210 | AM_RANGE(0x06, 0x06) AM_DEVWRITE("ay2", ay8910_device, data_w) | |
| 211 | AM_RANGE(0x08, 0x08) AM_DEVWRITE("ay3", ay8910_device, address_w) | |
| 212 | AM_RANGE(0x09, 0x09) AM_DEVREAD("ay3", ay8910_device, data_r) | |
| 213 | AM_RANGE(0x0a, 0x0a) AM_DEVWRITE("ay3", ay8910_device, data_w) | |
| 214 | AM_RANGE(0x0c, 0x0c) AM_DEVWRITE("ay4", ay8910_device, address_w) | |
| 215 | AM_RANGE(0x0d, 0x0d) AM_DEVREAD("ay4", ay8910_device, data_r) | |
| 216 | AM_RANGE(0x0e, 0x0e) AM_DEVWRITE("ay4", ay8910_device, data_w) | |
| 217 | AM_RANGE(0x10, 0x10) AM_DEVWRITE("ay5", ay8910_device, address_w) | |
| 218 | AM_RANGE(0x11, 0x11) AM_DEVREAD("ay5", ay8910_device, data_r) | |
| 219 | AM_RANGE(0x12, 0x12) AM_DEVWRITE("ay5", ay8910_device, data_w) | |
| 220 | 220 | AM_RANGE(0x14, 0x14) AM_WRITE(gyruss_i8039_irq_w) |
| 221 | 221 | AM_RANGE(0x18, 0x18) AM_WRITE(soundlatch2_byte_w) |
| 222 | 222 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 198 | 198 | AM_RANGE(0xb000, 0xb000) AM_READ_PORT("DSW1") |
| 199 | 199 | AM_RANGE(0xc000, 0xc000) AM_WRITE(exerion_videoreg_w) |
| 200 | 200 | AM_RANGE(0xc800, 0xc800) AM_WRITE(soundlatch_byte_w) |
| 201 | AM_RANGE(0xd000, 0xd001) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 202 | AM_RANGE(0xd800, 0xd801) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 203 | AM_RANGE(0xd802, 0xd802) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 201 | AM_RANGE(0xd000, 0xd001) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 202 | AM_RANGE(0xd800, 0xd801) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 203 | AM_RANGE(0xd802, 0xd802) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 204 | 204 | ADDRESS_MAP_END |
| 205 | 205 | |
| 206 | 206 |
| r22781 | r22782 | |
|---|---|---|
| 247 | 247 | |
| 248 | 248 | WRITE8_MEMBER(mirax_state::ay1_sel) |
| 249 | 249 | { |
| 250 | device_t *device = machine().device("ay1"); | |
| 251 | ay8910_address_w(device,space,0,m_nAyCtrl); | |
| 252 | ay8910_data_w(device,space,0,data); | |
| 250 | ay8910_device *ay8910 = machine().device<ay8910_device>("ay1"); | |
| 251 | ay8910->address_w(space,0,m_nAyCtrl); | |
| 252 | ay8910->data_w(space,0,data); | |
| 253 | 253 | } |
| 254 | 254 | |
| 255 | 255 | WRITE8_MEMBER(mirax_state::ay2_sel) |
| 256 | 256 | { |
| 257 | device_t *device = machine().device("ay2"); | |
| 258 | ay8910_address_w(device,space,0,m_nAyCtrl); | |
| 259 | ay8910_data_w(device,space,0,data); | |
| 257 | ay8910_device *ay8910 = machine().device<ay8910_device>("ay2"); | |
| 258 | ay8910->address_w(space,0,m_nAyCtrl); | |
| 259 | ay8910->data_w(space,0,data); | |
| 260 | 260 | } |
| 261 | 261 | |
| 262 | 262 | WRITE8_MEMBER(mirax_state::nmi_mask_w) |
| r22781 | r22782 | |
|---|---|---|
| 408 | 408 | static ADDRESS_MAP_START( dlus_map, AS_PROGRAM, 8, dlair_state ) |
| 409 | 409 | AM_RANGE(0x0000, 0x9fff) AM_ROM |
| 410 | 410 | AM_RANGE(0xa000, 0xa7ff) AM_MIRROR(0x1800) AM_RAM |
| 411 | AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x1fc7) AM_DEVREAD | |
| 411 | AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x1fc7) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 412 | 412 | AM_RANGE(0xc008, 0xc008) AM_MIRROR(0x1fc7) AM_READ_PORT("CONTROLS") |
| 413 | 413 | AM_RANGE(0xc010, 0xc010) AM_MIRROR(0x1fc7) AM_READ_PORT("SERVICE") |
| 414 | 414 | AM_RANGE(0xc020, 0xc020) AM_MIRROR(0x1fc7) AM_READ(laserdisc_r) |
| 415 | AM_RANGE(0xe000, 0xe000) AM_MIRROR(0x1fc7) AM_DEVWRITE | |
| 415 | AM_RANGE(0xe000, 0xe000) AM_MIRROR(0x1fc7) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 416 | 416 | AM_RANGE(0xe008, 0xe008) AM_MIRROR(0x1fc7) AM_WRITE(misc_w) |
| 417 | AM_RANGE(0xe010, 0xe010) AM_MIRROR(0x1fc7) AM_DEVWRITE | |
| 417 | AM_RANGE(0xe010, 0xe010) AM_MIRROR(0x1fc7) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 418 | 418 | AM_RANGE(0xe020, 0xe020) AM_MIRROR(0x1fc7) AM_WRITE(laserdisc_w) |
| 419 | 419 | AM_RANGE(0xe030, 0xe037) AM_MIRROR(0x1fc0) AM_WRITE(led_den2_w) |
| 420 | 420 | AM_RANGE(0xe038, 0xe03f) AM_MIRROR(0x1fc0) AM_WRITE(led_den1_w) |
| r22781 | r22782 | |
|---|---|---|
| 1337 | 1337 | |
| 1338 | 1338 | static ADDRESS_MAP_START( dremshpr_portmap, AS_IO, 8, pacman_state ) |
| 1339 | 1339 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1340 | AM_RANGE(0x06, 0x07) AM_DEVWRITE | |
| 1340 | AM_RANGE(0x06, 0x07) AM_DEVWRITE("namco", ay8910_device, data_address_w) | |
| 1341 | 1341 | ADDRESS_MAP_END |
| 1342 | 1342 | |
| 1343 | 1343 | static ADDRESS_MAP_START( piranha_portmap, AS_IO, 8, pacman_state ) |
| r22781 | r22782 | |
| 1396 | 1396 | |
| 1397 | 1397 | static ADDRESS_MAP_START( crushs_portmap, AS_IO, 8, pacman_state ) |
| 1398 | 1398 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1399 | AM_RANGE(0x00, 0x01) AM_DEVWRITE | |
| 1399 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("namco", ay8910_device, data_address_w) | |
| 1400 | 1400 | AM_RANGE(0x01, 0x01) AM_READ_PORT("DSW2") |
| 1401 | 1401 | AM_RANGE(0x02, 0x02) AM_READ_PORT("DSW1") |
| 1402 | 1402 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 146 | 146 | AM_RANGE(0x8800, 0x8800) AM_READWRITE(chaknpop_mcu_port_a_r, chaknpop_mcu_port_a_w) |
| 147 | 147 | AM_RANGE(0x8801, 0x8801) AM_READWRITE(chaknpop_mcu_port_b_r, chaknpop_mcu_port_b_w) |
| 148 | 148 | AM_RANGE(0x8802, 0x8802) AM_READWRITE(chaknpop_mcu_port_c_r, chaknpop_mcu_port_c_w) |
| 149 | AM_RANGE(0x8804, 0x8805) AM_DEVREADWRITE_LEGACY("ay1", ay8910_r, ay8910_address_data_w) | |
| 150 | AM_RANGE(0x8806, 0x8807) AM_DEVREADWRITE_LEGACY("ay2", ay8910_r, ay8910_address_data_w) | |
| 149 | AM_RANGE(0x8804, 0x8805) AM_DEVREADWRITE("ay1", ay8910_device, data_r, address_data_w) | |
| 150 | AM_RANGE(0x8806, 0x8807) AM_DEVREADWRITE("ay2", ay8910_device, data_r, address_data_w) | |
| 151 | 151 | AM_RANGE(0x8808, 0x8808) AM_READ_PORT("DSWC") |
| 152 | 152 | AM_RANGE(0x8809, 0x8809) AM_READ_PORT("P1") |
| 153 | 153 | AM_RANGE(0x880a, 0x880a) AM_READ_PORT("SYSTEM") |
| r22781 | r22782 | |
|---|---|---|
| 133 | 133 | m_colorram(*this, "colorram"), |
| 134 | 134 | m_soundcpu(*this, "soundcpu"), |
| 135 | 135 | m_samples(*this, "samples"), |
| 136 | m_maincpu(*this, "maincpu") { } | |
| 136 | m_maincpu(*this, "maincpu"), | |
| 137 | m_ay1(*this, "ay1"), | |
| 138 | m_ay2(*this, "ay2") | |
| 139 | { | |
| 140 | } | |
| 137 | 141 | |
| 138 | 142 | required_shared_ptr<UINT8> m_spriteram; |
| 139 | 143 | required_shared_ptr<UINT8> m_scrollram; |
| r22781 | r22782 | |
| 159 | 163 | |
| 160 | 164 | /* sound devices */ |
| 161 | 165 | required_device<cpu_device> m_soundcpu; |
| 162 | device_t *m_ay1; | |
| 163 | device_t *m_ay2; | |
| 164 | 166 | optional_device<samples_device> m_samples; |
| 165 | 167 | DECLARE_WRITE8_MEMBER(m63_videoram_w); |
| 166 | 168 | DECLARE_WRITE8_MEMBER(m63_colorram_w); |
| r22781 | r22782 | |
| 191 | 193 | INTERRUPT_GEN_MEMBER(vblank_irq); |
| 192 | 194 | void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); |
| 193 | 195 | required_device<cpu_device> m_maincpu; |
| 196 | required_device<ay8910_device> m_ay1; | |
| 197 | optional_device<ay8910_device> m_ay2; | |
| 194 | 198 | }; |
| 195 | 199 | |
| 196 | 200 | |
| r22781 | r22782 | |
| 386 | 390 | WRITE8_MEMBER(m63_state::snddata_w) |
| 387 | 391 | { |
| 388 | 392 | if ((m_p2 & 0xf0) == 0xe0) |
| 389 | ay | |
| 393 | m_ay1->address_w(space, 0, offset); | |
| 390 | 394 | else if ((m_p2 & 0xf0) == 0xa0) |
| 391 | ay | |
| 395 | m_ay1->data_w(space, 0, offset); | |
| 392 | 396 | else if (m_ay2 != NULL && (m_p1 & 0xe0) == 0x60) |
| 393 | ay | |
| 397 | m_ay2->address_w(space, 0, offset); | |
| 394 | 398 | else if (m_ay2 != NULL && (m_p1 & 0xe0) == 0x40) |
| 395 | ay | |
| 399 | m_ay2->data_w(space, 0, offset); | |
| 396 | 400 | else if ((m_p2 & 0xf0) == 0x70 ) |
| 397 | 401 | m_sound_status = offset; |
| 398 | 402 | } |
| r22781 | r22782 | |
| 717 | 721 | |
| 718 | 722 | MACHINE_START_MEMBER(m63_state,m63) |
| 719 | 723 | { |
| 720 | m_ay1 = machine().device("ay1"); | |
| 721 | m_ay2 = machine().device("ay2"); | |
| 722 | ||
| 723 | 724 | save_item(NAME(m_pal_bank)); |
| 724 | 725 | save_item(NAME(m_fg_flag)); |
| 725 | 726 | save_item(NAME(m_sy_offset)); |
| r22781 | r22782 | |
|---|---|---|
| 602 | 602 | AM_RANGE(0x3000, 0x300f) AM_READWRITE(splus_duart_r, splus_duart_w) |
| 603 | 603 | |
| 604 | 604 | // Dip Switches, Sound |
| 605 | AM_RANGE(0x4000, 0x4000) AM_READ_PORT("SW1") AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 606 | AM_RANGE(0x4001, 0x4001) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 605 | AM_RANGE(0x4000, 0x4000) AM_READ_PORT("SW1") AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 606 | AM_RANGE(0x4001, 0x4001) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 607 | 607 | |
| 608 | 608 | // Reel Optics, EEPROM |
| 609 | 609 | AM_RANGE(0x5000, 0x5000) AM_READ(splus_reel_optics_r) AM_WRITE(i2c_nvram_w) |
| r22781 | r22782 | |
|---|---|---|
| 246 | 246 | |
| 247 | 247 | static ADDRESS_MAP_START( tubep_sound_portmap, AS_IO, 8, tubep_state ) |
| 248 | 248 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 249 | AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 250 | AM_RANGE(0x02, 0x03) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 251 | AM_RANGE(0x04, 0x05) AM_DEVWRITE_LEGACY("ay3", ay8910_address_data_w) | |
| 249 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 250 | AM_RANGE(0x02, 0x03) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 251 | AM_RANGE(0x04, 0x05) AM_DEVWRITE("ay3", ay8910_device, address_data_w) | |
| 252 | 252 | AM_RANGE(0x06, 0x06) AM_READ(tubep_soundlatch_r) |
| 253 | 253 | AM_RANGE(0x07, 0x07) AM_WRITE(tubep_sound_unknown) |
| 254 | 254 | ADDRESS_MAP_END |
| r22781 | r22782 | |
| 601 | 601 | AM_RANGE(0x10, 0x10) AM_WRITE(rjammer_voice_startstop_w) |
| 602 | 602 | AM_RANGE(0x18, 0x18) AM_WRITE(rjammer_voice_frequency_select_w) |
| 603 | 603 | AM_RANGE(0x80, 0x80) AM_WRITE(rjammer_voice_input_w) |
| 604 | AM_RANGE(0x90, 0x91) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 605 | AM_RANGE(0x92, 0x93) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 606 | AM_RANGE(0x94, 0x95) AM_DEVWRITE_LEGACY("ay3", ay8910_address_data_w) | |
| 604 | AM_RANGE(0x90, 0x91) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 605 | AM_RANGE(0x92, 0x93) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 606 | AM_RANGE(0x94, 0x95) AM_DEVWRITE("ay3", ay8910_device, address_data_w) | |
| 607 | 607 | AM_RANGE(0x96, 0x96) AM_WRITE(rjammer_voice_intensity_control_w) |
| 608 | 608 | ADDRESS_MAP_END |
| 609 | 609 |
| r22781 | r22782 | |
|---|---|---|
| 63 | 63 | AM_RANGE(0x5800, 0x5bff) AM_RAM_WRITE(dday_bgvideoram_w) AM_SHARE("bgvideoram") |
| 64 | 64 | AM_RANGE(0x5c00, 0x5fff) AM_READWRITE(dday_colorram_r, dday_colorram_w) AM_SHARE("colorram") |
| 65 | 65 | AM_RANGE(0x6000, 0x63ff) AM_RAM |
| 66 | AM_RANGE(0x6400, 0x6401) AM_MIRROR(0x000e) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 67 | AM_RANGE(0x6800, 0x6801) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 66 | AM_RANGE(0x6400, 0x6401) AM_MIRROR(0x000e) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 67 | AM_RANGE(0x6800, 0x6801) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 68 | 68 | AM_RANGE(0x6c00, 0x6c00) AM_READ_PORT("BUTTONS") |
| 69 | 69 | AM_RANGE(0x7000, 0x7000) AM_READ_PORT("DSW0") |
| 70 | 70 | AM_RANGE(0x7400, 0x7400) AM_READ_PORT("DSW1") |
| r22781 | r22782 | |
|---|---|---|
| 175 | 175 | case 1: /* 04-07 */ |
| 176 | 176 | { |
| 177 | 177 | /* AY 3-8910 */ |
| 178 | ay8910 | |
| 178 | m_ay8910->address_w(space, 0, offset); | |
| 179 | 179 | } |
| 180 | 180 | break; |
| 181 | 181 | |
| r22781 | r22782 | |
| 304 | 304 | case 1: /* 04-07 */ |
| 305 | 305 | { |
| 306 | 306 | /* AY 3-8910 */ |
| 307 | ay8910 | |
| 307 | m_ay8910->data_w(space, 0, offset); | |
| 308 | 308 | return 0xff;//mame_rand(space.machine); |
| 309 | 309 | |
| 310 | 310 | } |
| r22781 | r22782 | |
|---|---|---|
| 905 | 905 | |
| 906 | 906 | WRITE8_MEMBER(videopkr_state::baby_sound_p3_w) |
| 907 | 907 | { |
| 908 | device | |
| 908 | ay8910_device *ay8910 = machine().device<ay8910_device>("aysnd"); | |
| 909 | 909 | UINT8 lmp_ports, ay_intf; |
| 910 | 910 | m_sbp3 = data; |
| 911 | 911 | lmp_ports = m_sbp3 >> 1 & 0x07; |
| r22781 | r22782 | |
| 927 | 927 | case 0x00: break; |
| 928 | 928 | case 0x01: break; |
| 929 | 929 | case 0x02: break; |
| 930 | case 0x03: ay8910 | |
| 930 | case 0x03: ay8910->data_w(space, 1, m_sbp0); break; | |
| 931 | 931 | case 0x04: break; |
| 932 | case 0x05: m_sbp0 = ay8910_r( | |
| 932 | case 0x05: m_sbp0 = ay8910->data_r(space, m_sbp0); break; | |
| 933 | 933 | case 0x06: break; |
| 934 | case 0x07: ay8910 | |
| 934 | case 0x07: ay8910->address_w(space, 0, m_sbp0); break; | |
| 935 | 935 | } |
| 936 | 936 | } |
| 937 | 937 |
| r22781 | r22782 | |
|---|---|---|
| 1061 | 1061 | static ADDRESS_MAP_START( greatgun_sound_map, AS_PROGRAM, 8, mazerbla_state ) |
| 1062 | 1062 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 1063 | 1063 | AM_RANGE(0x2000, 0x27ff) AM_RAM |
| 1064 | AM_RANGE(0x4000, 0x4000) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 1065 | AM_RANGE(0x4000, 0x4001) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 1066 | AM_RANGE(0x6000, 0x6001) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 1064 | AM_RANGE(0x4000, 0x4000) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 1065 | AM_RANGE(0x4000, 0x4001) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 1066 | AM_RANGE(0x6000, 0x6001) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 1067 | 1067 | AM_RANGE(0x8000, 0x8000) AM_WRITE(sound_int_clear_w) |
| 1068 | 1068 | AM_RANGE(0xa000, 0xa000) AM_WRITE(sound_nmi_clear_w) |
| 1069 | 1069 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 158 | 158 | AM_RANGE(0xf810, 0xf810) AM_READ_PORT("UNK1") |
| 159 | 159 | AM_RANGE(0xf811, 0xf811) AM_READ_PORT("UNK2") |
| 160 | 160 | AM_RANGE(0xf820, 0xf820) AM_READ_PORT("DSW2") |
| 161 | AM_RANGE(0xf830, 0xf830) AM_DEVREADWRITE_LEGACY("aysnd", ay8910_r, ay8910_data_w) | |
| 162 | AM_RANGE(0xf840, 0xf840) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 161 | AM_RANGE(0xf830, 0xf830) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, data_w) | |
| 162 | AM_RANGE(0xf840, 0xf840) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 163 | 163 | AM_RANGE(0xfa00, 0xfa00) AM_WRITE(goldstar_fa00_w) |
| 164 | 164 | AM_RANGE(0xfb00, 0xfb00) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 165 | 165 | AM_RANGE(0xfd00, 0xfdff) AM_RAM_WRITE(paletteram_BBGGGRRR_byte_w) AM_SHARE("paletteram") |
| r22781 | r22782 | |
| 196 | 196 | AM_RANGE(0xf822, 0xf822) AM_WRITE(goldstar_fa00_w) // hack (connected to ppi output port?, needed for colour banking) |
| 197 | 197 | AM_RANGE(0xf820, 0xf823) AM_DEVREADWRITE("ppi8255_2", i8255_device, read, write) /* Input/Output Ports */ |
| 198 | 198 | |
| 199 | AM_RANGE(0xf830, 0xf830) AM_DEVREADWRITE_LEGACY("aysnd", ay8910_r, ay8910_data_w) | |
| 200 | AM_RANGE(0xf840, 0xf840) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 199 | AM_RANGE(0xf830, 0xf830) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, data_w) | |
| 200 | AM_RANGE(0xf840, 0xf840) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 201 | 201 | // AM_RANGE(0xf850, 0xf850) AM_WRITE(ncb3_p1_flip_w) // need flip? |
| 202 | 202 | // AM_RANGE(0xf860, 0xf860) AM_WRITE(ncb3_p2_flip_w) // need flip? |
| 203 | 203 | AM_RANGE(0xf870, 0xf870) AM_DEVWRITE("snsnd", sn76489_device, write) /* guess... device is initialized, but doesn't seems to be used.*/ |
| r22781 | r22782 | |
| 298 | 298 | |
| 299 | 299 | static ADDRESS_MAP_START( cm_portmap, AS_IO, 8, goldstar_state ) |
| 300 | 300 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 301 | AM_RANGE(0x01, 0x01) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 302 | AM_RANGE(0x02, 0x03) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 301 | AM_RANGE(0x01, 0x01) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 302 | AM_RANGE(0x02, 0x03) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 303 | 303 | AM_RANGE(0x04, 0x07) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write) /* Inputs */ |
| 304 | 304 | AM_RANGE(0x08, 0x0b) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) /* DIP switches */ |
| 305 | 305 | AM_RANGE(0x10, 0x10) AM_WRITE(cm_outport0_w) /* output port */ |
| r22781 | r22782 | |
| 314 | 314 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 315 | 315 | AM_RANGE(0x00, 0x03) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write) /* Input Ports */ |
| 316 | 316 | AM_RANGE(0x10, 0x13) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) /* DIP switches */ |
| 317 | AM_RANGE(0x21, 0x21) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 318 | AM_RANGE(0x22, 0x23) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 317 | AM_RANGE(0x21, 0x21) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 318 | AM_RANGE(0x22, 0x23) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 319 | 319 | ADDRESS_MAP_END |
| 320 | 320 | |
| 321 | 321 | |
| 322 | 322 | static ADDRESS_MAP_START( amcoe1_portmap, AS_IO, 8, goldstar_state ) |
| 323 | 323 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 324 | AM_RANGE(0x01, 0x01) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 325 | AM_RANGE(0x02, 0x03) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 324 | AM_RANGE(0x01, 0x01) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 325 | AM_RANGE(0x02, 0x03) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 326 | 326 | AM_RANGE(0x04, 0x07) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write) /* Input Ports */ |
| 327 | 327 | AM_RANGE(0x08, 0x0b) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) /* DIP switches */ |
| 328 | 328 | AM_RANGE(0x10, 0x10) AM_WRITE(cm_outport0_w) /* output port */ |
| r22781 | r22782 | |
| 334 | 334 | |
| 335 | 335 | static ADDRESS_MAP_START( amcoe2_portmap, AS_IO, 8, goldstar_state ) |
| 336 | 336 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 337 | AM_RANGE(0x01, 0x01) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 338 | AM_RANGE(0x02, 0x03) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 337 | AM_RANGE(0x01, 0x01) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 338 | AM_RANGE(0x02, 0x03) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 339 | 339 | AM_RANGE(0x04, 0x07) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write) /* Input Ports */ |
| 340 | 340 | AM_RANGE(0x08, 0x0b) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) /* DIP switches */ |
| 341 | 341 | AM_RANGE(0x10, 0x10) AM_WRITE(cm_outport0_w) /* output port */ |
| r22781 | r22782 | |
| 373 | 373 | AM_RANGE(0xb800, 0xb803) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write) /* Input Ports */ |
| 374 | 374 | AM_RANGE(0xb810, 0xb813) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) /* Input Ports */ |
| 375 | 375 | AM_RANGE(0xb820, 0xb823) AM_DEVREADWRITE("ppi8255_2", i8255_device, read, write) /* Input/Output Ports */ |
| 376 | AM_RANGE(0xb830, 0xb830) AM_DEVREADWRITE_LEGACY("aysnd", ay8910_r, ay8910_data_w) | |
| 377 | AM_RANGE(0xb840, 0xb840) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) /* no sound... only use both ports for DSWs */ | |
| 376 | AM_RANGE(0xb830, 0xb830) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, data_w) | |
| 377 | AM_RANGE(0xb840, 0xb840) AM_DEVWRITE("aysnd", ay8910_device, address_w) /* no sound... only use both ports for DSWs */ | |
| 378 | 378 | AM_RANGE(0xb850, 0xb850) AM_WRITE(lucky8_outport_w) |
| 379 | 379 | AM_RANGE(0xb870, 0xb870) AM_DEVWRITE("snsnd", sn76489_device, write) /* sound */ |
| 380 | 380 | AM_RANGE(0xf800, 0xffff) AM_RAM |
| r22781 | r22782 | |
| 417 | 417 | AM_RANGE(0xb800, 0xb803) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write) /* Input Ports */ |
| 418 | 418 | AM_RANGE(0xb810, 0xb813) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) /* Input Ports */ |
| 419 | 419 | AM_RANGE(0xb820, 0xb823) AM_DEVREADWRITE("ppi8255_2", i8255_device, read, write) /* Input/Output Ports */ |
| 420 | AM_RANGE(0xb830, 0xb830) AM_DEVREADWRITE_LEGACY("aysnd", ay8910_r, ay8910_data_w) | |
| 421 | AM_RANGE(0xb840, 0xb840) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) /* no sound... only use both ports for DSWs */ | |
| 420 | AM_RANGE(0xb830, 0xb830) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, data_w) | |
| 421 | AM_RANGE(0xb840, 0xb840) AM_DEVWRITE("aysnd", ay8910_device, address_w) /* no sound... only use both ports for DSWs */ | |
| 422 | 422 | AM_RANGE(0xb850, 0xb850) AM_WRITE(magodds_outb850_w) //lamps |
| 423 | 423 | AM_RANGE(0xb860, 0xb860) AM_WRITE(magodds_outb860_w) //watchdog |
| 424 | 424 | AM_RANGE(0xb870, 0xb870) AM_DEVWRITE("snsnd", sn76489_device, write) /* sound */ |
| r22781 | r22782 | |
| 478 | 478 | |
| 479 | 479 | AM_RANGE(0xb800, 0xb803) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write) /* Input Ports */ |
| 480 | 480 | AM_RANGE(0xb810, 0xb813) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) /* DSW bank */ |
| 481 | AM_RANGE(0xb830, 0xb830) AM_DEVREADWRITE_LEGACY("aysnd", ay8910_r, ay8910_data_w) | |
| 482 | AM_RANGE(0xb840, 0xb840) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) /* no sound... only use ports */ | |
| 481 | AM_RANGE(0xb830, 0xb830) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, data_w) | |
| 482 | AM_RANGE(0xb840, 0xb840) AM_DEVWRITE("aysnd", ay8910_device, address_w) /* no sound... only use ports */ | |
| 483 | 483 | AM_RANGE(0xb850, 0xb850) AM_WRITENOP /* just turn off the lamps, if exist */ |
| 484 | 484 | AM_RANGE(0xb870, 0xb870) AM_DEVWRITE("snsnd", sn76489_device, write) /* sound */ |
| 485 | 485 | AM_RANGE(0xf800, 0xffff) AM_RAM |
| r22781 | r22782 | |
| 500 | 500 | AM_RANGE(0xb800, 0xb803) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write) /* Input Ports */ |
| 501 | 501 | AM_RANGE(0xb810, 0xb813) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) /* Input Ports */ |
| 502 | 502 | AM_RANGE(0xb820, 0xb823) AM_DEVREADWRITE("ppi8255_2", i8255_device, read, write) /* Input/Output Ports */ |
| 503 | AM_RANGE(0xb830, 0xb830) AM_DEVREADWRITE_LEGACY("aysnd", ay8910_r, ay8910_data_w) | |
| 504 | AM_RANGE(0xb840, 0xb840) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) /* no sound... only use both ports for DSWs */ | |
| 503 | AM_RANGE(0xb830, 0xb830) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, data_w) | |
| 504 | AM_RANGE(0xb840, 0xb840) AM_DEVWRITE("aysnd", ay8910_device, address_w) /* no sound... only use both ports for DSWs */ | |
| 505 | 505 | AM_RANGE(0xb850, 0xb850) AM_WRITE(lucky8_outport_w) |
| 506 | 506 | AM_RANGE(0xb870, 0xb870) AM_DEVWRITE("snsnd", sn76489_device, write) /* sound */ |
| 507 | 507 | // AM_RANGE(0xc000, 0xc003) AM_DEVREADWRITE("ppi8255_3", i8255_device, read, write) /* Other PPI initialized? */ |
| r22781 | r22782 | |
| 572 | 572 | |
| 573 | 573 | static ADDRESS_MAP_START( unkch_portmap, AS_IO, 8, goldstar_state ) |
| 574 | 574 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 575 | // AM_RANGE(0x01, 0x01) AM_DEVREAD | |
| 575 | // AM_RANGE(0x01, 0x01) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 576 | 576 | AM_RANGE(0x02, 0x02) AM_WRITE(unkcm_0x02_w) |
| 577 | 577 | AM_RANGE(0x03, 0x03) AM_WRITE(unkcm_0x03_w) |
| 578 | 578 | AM_RANGE(0x11, 0x11) AM_WRITE(unkcm_0x11_w) |
| r22781 | r22782 | |
| 631 | 631 | AM_RANGE(0xa0, 0xa0) AM_DEVWRITE("sn1", sn76489_device, write) /* SN76489 #1 */ |
| 632 | 632 | AM_RANGE(0xc0, 0xc0) AM_DEVWRITE("sn2", sn76489_device, write) /* SN76489 #2 */ |
| 633 | 633 | AM_RANGE(0xe0, 0xe0) AM_DEVWRITE("sn3", sn76489_device, write) /* SN76489 #3 */ |
| 634 | AM_RANGE(0x60, 0x60) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) /* AY8910 control? */ | |
| 635 | AM_RANGE(0x80, 0x80) AM_DEVREADWRITE_LEGACY("aysnd", ay8910_r, ay8910_data_w) /* AY8910 Input? */ | |
| 636 | // AM_RANGE(0x01, 0x01) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 637 | // AM_RANGE(0x02, 0x03) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 634 | AM_RANGE(0x60, 0x60) AM_DEVWRITE("aysnd", ay8910_device, address_w) /* AY8910 control? */ | |
| 635 | AM_RANGE(0x80, 0x80) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, data_w) /* AY8910 Input? */ | |
| 636 | // AM_RANGE(0x01, 0x01) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 637 | // AM_RANGE(0x02, 0x03) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 638 | 638 | ADDRESS_MAP_END |
| 639 | 639 | |
| 640 | 640 |
| r22781 | r22782 | |
|---|---|---|
| 123 | 123 | |
| 124 | 124 | static ADDRESS_MAP_START( main_portmap, AS_IO, 8, seicross_state ) |
| 125 | 125 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 126 | AM_RANGE(0x00, 0x01) AM_MIRROR(0x08) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 127 | AM_RANGE(0x04, 0x04) AM_MIRROR(0x08) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 126 | AM_RANGE(0x00, 0x01) AM_MIRROR(0x08) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 127 | AM_RANGE(0x04, 0x04) AM_MIRROR(0x08) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 128 | 128 | ADDRESS_MAP_END |
| 129 | 129 | |
| 130 | 130 |
| r22781 | r22782 | |
|---|---|---|
| 170 | 170 | AM_RANGE(0x0000, 0x01ff) AM_RAM |
| 171 | 171 | AM_RANGE(0x0200, 0x0200) AM_DEVWRITE("dac", dac_device, write_signed8) |
| 172 | 172 | AM_RANGE(0x1000, 0x1000) AM_WRITE(bwp3_nmiack_w) |
| 173 | AM_RANGE(0x2000, 0x2000) AM_DEVWRITE_LEGACY("ay1", ay8910_data_w) | |
| 174 | AM_RANGE(0x4000, 0x4000) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) | |
| 175 | AM_RANGE(0x6000, 0x6000) AM_DEVWRITE_LEGACY("ay2", ay8910_data_w) | |
| 176 | AM_RANGE(0x8000, 0x8000) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) | |
| 173 | AM_RANGE(0x2000, 0x2000) AM_DEVWRITE("ay1", ay8910_device, data_w) | |
| 174 | AM_RANGE(0x4000, 0x4000) AM_DEVWRITE("ay1", ay8910_device, address_w) | |
| 175 | AM_RANGE(0x6000, 0x6000) AM_DEVWRITE("ay2", ay8910_device, data_w) | |
| 176 | AM_RANGE(0x8000, 0x8000) AM_DEVWRITE("ay2", ay8910_device, address_w) | |
| 177 | 177 | AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) |
| 178 | 178 | AM_RANGE(0xd000, 0xd000) AM_WRITE(bwp3_nmimask_w) |
| 179 | 179 | AM_RANGE(0xe000, 0xffff) AM_ROM AM_SHARE("bwp3_rombase") |
| r22781 | r22782 | |
|---|---|---|
| 99 | 99 | |
| 100 | 100 | static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, sonson_state ) |
| 101 | 101 | AM_RANGE(0x0000, 0x07ff) AM_RAM |
| 102 | AM_RANGE(0x2000, 0x2001) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 103 | AM_RANGE(0x4000, 0x4001) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 102 | AM_RANGE(0x2000, 0x2001) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 103 | AM_RANGE(0x4000, 0x4001) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 104 | 104 | AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) |
| 105 | 105 | AM_RANGE(0xe000, 0xffff) AM_ROM |
| 106 | 106 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 551 | 551 | static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, grchamp_state ) |
| 552 | 552 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 553 | 553 | AM_RANGE(0x4000, 0x43ff) AM_RAM |
| 554 | AM_RANGE(0x4800, 0x4801) AM_MIRROR(0x07f8) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 555 | AM_RANGE(0x4801, 0x4801) AM_MIRROR(0x07f8) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 556 | AM_RANGE(0x4802, 0x4803) AM_MIRROR(0x07f8) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 557 | AM_RANGE(0x4803, 0x4803) AM_MIRROR(0x07f8) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 558 | AM_RANGE(0x4804, 0x4805) AM_MIRROR(0x07fa) AM_DEVWRITE_LEGACY("ay3", ay8910_address_data_w) | |
| 559 | AM_RANGE(0x4805, 0x4805) AM_MIRROR(0x07fa) AM_DEVREAD_LEGACY("ay3", ay8910_r) | |
| 554 | AM_RANGE(0x4800, 0x4801) AM_MIRROR(0x07f8) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 555 | AM_RANGE(0x4801, 0x4801) AM_MIRROR(0x07f8) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 556 | AM_RANGE(0x4802, 0x4803) AM_MIRROR(0x07f8) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 557 | AM_RANGE(0x4803, 0x4803) AM_MIRROR(0x07f8) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 558 | AM_RANGE(0x4804, 0x4805) AM_MIRROR(0x07fa) AM_DEVWRITE("ay3", ay8910_device, address_data_w) | |
| 559 | AM_RANGE(0x4805, 0x4805) AM_MIRROR(0x07fa) AM_DEVREAD("ay3", ay8910_device, data_r) | |
| 560 | 560 | AM_RANGE(0x5000, 0x5000) AM_READ(soundlatch_byte_r) |
| 561 | 561 | ADDRESS_MAP_END |
| 562 | 562 |
| r22781 | r22782 | |
|---|---|---|
| 309 | 309 | |
| 310 | 310 | AM_RANGE(0x5000, 0x5000) AM_READ_PORT("P1") |
| 311 | 311 | AM_RANGE(0x5800, 0x5800) AM_READ_PORT("P2") AM_WRITE(shougi_watchdog_reset_w) /* game won't boot if watchdog doesn't work */ |
| 312 | AM_RANGE(0x6000, 0x6000) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 313 | AM_RANGE(0x6800, 0x6800) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 312 | AM_RANGE(0x6000, 0x6000) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 313 | AM_RANGE(0x6800, 0x6800) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 314 | 314 | AM_RANGE(0x7000, 0x73ff) AM_RAM AM_SHARE("share1") /* 2114 x 2 (0x400 x 4bit each) */ |
| 315 | 315 | AM_RANGE(0x7800, 0x7bff) AM_RAM AM_SHARE("share2") /* 2114 x 2 (0x400 x 4bit each) */ |
| 316 | 316 |
| r22781 | r22782 | |
|---|---|---|
| 81 | 81 | |
| 82 | 82 | static ADDRESS_MAP_START( main_portmap, AS_IO, 8, ambush_state ) |
| 83 | 83 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 84 | AM_RANGE(0x00, 0x00) AM_DEVREADWRITE_LEGACY("ay1", ay8910_r, ay8910_address_w) | |
| 85 | AM_RANGE(0x01, 0x01) AM_DEVWRITE_LEGACY("ay1", ay8910_data_w) | |
| 86 | AM_RANGE(0x80, 0x80) AM_DEVREADWRITE_LEGACY("ay2", ay8910_r, ay8910_address_w) | |
| 87 | AM_RANGE(0x81, 0x81) AM_DEVWRITE_LEGACY("ay2", ay8910_data_w) | |
| 84 | AM_RANGE(0x00, 0x00) AM_DEVREADWRITE("ay1", ay8910_device, data_r, address_w) | |
| 85 | AM_RANGE(0x01, 0x01) AM_DEVWRITE("ay1", ay8910_device, data_w) | |
| 86 | AM_RANGE(0x80, 0x80) AM_DEVREADWRITE("ay2", ay8910_device, data_r, address_w) | |
| 87 | AM_RANGE(0x81, 0x81) AM_DEVWRITE("ay2", ay8910_device, data_w) | |
| 88 | 88 | ADDRESS_MAP_END |
| 89 | 89 | |
| 90 | 90 |
| r22781 | r22782 | |
|---|---|---|
| 490 | 490 | AM_RANGE(0x0000, 0x0fff) AM_MIRROR(0x1000) AM_ROM AM_WRITENOP |
| 491 | 491 | AM_RANGE(0x2000, 0x7fff) AM_NOP |
| 492 | 492 | AM_RANGE(0x8000, 0x83ff) AM_MIRROR(0x1c00) AM_RAM |
| 493 | AM_RANGE(0xa000, 0xa001) AM_MIRROR(0x1ffc) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 494 | AM_RANGE(0xa002, 0xa002) AM_MIRROR(0x1ffc) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 493 | AM_RANGE(0xa000, 0xa001) AM_MIRROR(0x1ffc) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 494 | AM_RANGE(0xa002, 0xa002) AM_MIRROR(0x1ffc) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 495 | 495 | AM_RANGE(0xa003, 0xa003) AM_MIRROR(0x1ffc) AM_NOP |
| 496 | 496 | AM_RANGE(0xc000, 0xffff) AM_NOP |
| 497 | 497 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 505 | 505 | { |
| 506 | 506 | /* the decoding here is very simplistic, and you can address both simultaneously */ |
| 507 | 507 | UINT8 result = 0xff; |
| 508 | if (offset & 0x20) result &= ay8910_r(machine().device("8910.1"), space, 0); | |
| 509 | if (offset & 0x80) result &= ay8910_r(machine().device("8910.0"), space, 0); | |
| 508 | if (offset & 0x20) result &= machine().device<ay8910_device>("8910.1")->data_r(space, 0); | |
| 509 | if (offset & 0x80) result &= machine().device<ay8910_device>("8910.0")->data_r(space, 0); | |
| 510 | 510 | return result; |
| 511 | 511 | } |
| 512 | 512 | |
| r22781 | r22782 | |
| 516 | 516 | /* AV 4,5 ==> AY8910 #2 */ |
| 517 | 517 | /* the decoding here is very simplistic, and you can address two simultaneously */ |
| 518 | 518 | if (offset & 0x10) |
| 519 | | |
| 519 | machine().device<ay8910_device>("8910.1")->address_w(space, 0, data); | |
| 520 | 520 | else if (offset & 0x20) |
| 521 | | |
| 521 | machine().device<ay8910_device>("8910.1")->data_w(space, 0, data); | |
| 522 | 522 | /* AV6,7 ==> AY8910 #1 */ |
| 523 | 523 | if (offset & 0x40) |
| 524 | | |
| 524 | machine().device<ay8910_device>("8910.0")->address_w(space, 0, data); | |
| 525 | 525 | else if (offset & 0x80) |
| 526 | | |
| 526 | machine().device<ay8910_device>("8910.0")->data_w(space, 0, data); | |
| 527 | 527 | } |
| 528 | 528 | |
| 529 | 529 | |
| r22781 | r22782 | |
| 893 | 893 | { |
| 894 | 894 | /* the decoding here is very simplistic */ |
| 895 | 895 | UINT8 result = 0xff; |
| 896 | if (offset & 0x40) result &= | |
| 896 | if (offset & 0x40) result &= machine().device<ay8910_device>("8910.0")->data_r(space, 0); | |
| 897 | 897 | return result; |
| 898 | 898 | } |
| 899 | 899 | |
| r22781 | r22782 | |
| 903 | 903 | /* the decoding here is very simplistic */ |
| 904 | 904 | /* AV6,7 ==> AY8910 #1 */ |
| 905 | 905 | if (offset & 0x40) |
| 906 | | |
| 906 | machine().device<ay8910_device>("8910.0")->data_w(space, 0, data); | |
| 907 | 907 | else if (offset & 0x80) |
| 908 | | |
| 908 | machine().device<ay8910_device>("8910.0")->address_w(space, 0, data); | |
| 909 | 909 | } |
| 910 | 910 | |
| 911 | 911 | |
| r22781 | r22782 | |
| 972 | 972 | { |
| 973 | 973 | /* the decoding here is very simplistic, and you can address both simultaneously */ |
| 974 | 974 | UINT8 result = 0xff; |
| 975 | if (offset & 0x08) result &= ay8910_r(machine().device("8910.2"), space, 0); | |
| 976 | if (offset & 0x20) result &= ay8910_r(machine().device("8910.1"), space, 0); | |
| 977 | if (offset & 0x80) result &= ay8910_r(machine().device("8910.0"), space, 0); | |
| 975 | if (offset & 0x08) result &= machine().device<ay8910_device>("8910.2")->data_r(space, 0); | |
| 976 | if (offset & 0x20) result &= machine().device<ay8910_device>("8910.1")->data_r(space, 0); | |
| 977 | if (offset & 0x80) result &= machine().device<ay8910_device>("8910.0")->data_r(space, 0); | |
| 978 | 978 | return result; |
| 979 | 979 | } |
| 980 | 980 | |
| r22781 | r22782 | |
| 982 | 982 | WRITE8_MEMBER(galaxian_state::scorpion_ay8910_w) |
| 983 | 983 | { |
| 984 | 984 | /* the decoding here is very simplistic, and you can address all six simultaneously */ |
| 985 | if (offset & 0x04) ay8910_address_w(machine().device("8910.2"), space, 0, data); | |
| 986 | if (offset & 0x08) ay8910_data_w(machine().device("8910.2"), space, 0, data); | |
| 987 | if (offset & 0x10) ay8910_address_w(machine().device("8910.1"), space, 0, data); | |
| 988 | if (offset & 0x20) ay8910_data_w(machine().device("8910.1"), space, 0, data); | |
| 989 | if (offset & 0x40) ay8910_address_w(machine().device("8910.0"), space, 0, data); | |
| 990 | if (offset & 0x80) ay8910_data_w(machine().device("8910.0"), space, 0, data); | |
| 985 | if (offset & 0x04) machine().device<ay8910_device>("8910.2")->address_w(space, 0, data); | |
| 986 | if (offset & 0x08) machine().device<ay8910_device>("8910.2")->data_w(space, 0, data); | |
| 987 | if (offset & 0x10) machine().device<ay8910_device>("8910.1")->address_w(space, 0, data); | |
| 988 | if (offset & 0x20) machine().device<ay8910_device>("8910.1")->data_w(space, 0, data); | |
| 989 | if (offset & 0x40) machine().device<ay8910_device>("8910.0")->address_w(space, 0, data); | |
| 990 | if (offset & 0x80) machine().device<ay8910_device>("8910.0")->data_w(space, 0, data); | |
| 991 | 991 | } |
| 992 | 992 | |
| 993 | 993 | |
| r22781 | r22782 | |
| 1102 | 1102 | /* bit 0 = WRITE */ |
| 1103 | 1103 | /* bit 1 = C/D */ |
| 1104 | 1104 | if ((offset & 1) != 0) |
| 1105 | | |
| 1105 | machine().device<ay8910_device>("aysnd")->data_address_w(space, offset >> 1, m_zigzag_ay8910_latch); | |
| 1106 | 1106 | break; |
| 1107 | 1107 | |
| 1108 | 1108 | case 0x100: |
| r22781 | r22782 | |
| 1194 | 1194 | WRITE8_MEMBER(galaxian_state::mshuttle_ay8910_control_w) |
| 1195 | 1195 | { |
| 1196 | 1196 | if (!m_mshuttle_ay8910_cs) |
| 1197 | | |
| 1197 | machine().device<ay8910_device>("aysnd")->address_w(space, offset, data); | |
| 1198 | 1198 | } |
| 1199 | 1199 | |
| 1200 | 1200 | |
| 1201 | 1201 | WRITE8_MEMBER(galaxian_state::mshuttle_ay8910_data_w) |
| 1202 | 1202 | { |
| 1203 | 1203 | if (!m_mshuttle_ay8910_cs) |
| 1204 | | |
| 1204 | machine().device<ay8910_device>("aysnd")->data_w(space, offset, data); | |
| 1205 | 1205 | } |
| 1206 | 1206 | |
| 1207 | 1207 | |
| 1208 | 1208 | READ8_MEMBER(galaxian_state::mshuttle_ay8910_data_r) |
| 1209 | 1209 | { |
| 1210 | 1210 | if (!m_mshuttle_ay8910_cs) |
| 1211 | return | |
| 1211 | return machine().device<ay8910_device>("aysnd")->data_r(space, offset); | |
| 1212 | 1212 | return 0xff; |
| 1213 | 1213 | } |
| 1214 | 1214 | |
| r22781 | r22782 | |
| 1455 | 1455 | ADDRESS_MAP_UNMAP_HIGH |
| 1456 | 1456 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 1457 | 1457 | AM_RANGE(0x8000, 0x87ff) AM_RAM |
| 1458 | AM_RANGE(0x8803, 0x8803) AM_DEVWRITE_LEGACY("8910.0", ay8910_address_w) | |
| 1459 | AM_RANGE(0x880b, 0x880b) AM_DEVWRITE_LEGACY("8910.0", ay8910_data_w) | |
| 1460 | AM_RANGE(0x880c, 0x880c) AM_DEVWRITE_LEGACY("8910.1", ay8910_address_w) | |
| 1461 | AM_RANGE(0x880e, 0x880e) AM_DEVWRITE_LEGACY("8910.1", ay8910_data_w) | |
| 1458 | AM_RANGE(0x8803, 0x8803) AM_DEVWRITE("8910.0", ay8910_device, address_w) | |
| 1459 | AM_RANGE(0x880b, 0x880b) AM_DEVWRITE("8910.0", ay8910_device, data_w) | |
| 1460 | AM_RANGE(0x880c, 0x880c) AM_DEVWRITE("8910.1", ay8910_device, address_w) | |
| 1461 | AM_RANGE(0x880e, 0x880e) AM_DEVWRITE("8910.1", ay8910_device, data_w) | |
| 1462 | 1462 | AM_RANGE(0x9000, 0x93ff) AM_MIRROR(0x0400) AM_RAM_WRITE(galaxian_videoram_w) AM_SHARE("videoram") |
| 1463 | 1463 | AM_RANGE(0x9800, 0x98ff) AM_MIRROR(0x0700) AM_RAM_WRITE(galaxian_objram_w) AM_SHARE("spriteram") |
| 1464 | 1464 | AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x07ff) AM_READ_PORT("IN0") |
| r22781 | r22782 | |
| 1473 | 1473 | ADDRESS_MAP_UNMAP_HIGH |
| 1474 | 1474 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 1475 | 1475 | AM_RANGE(0x8000, 0x87ff) AM_RAM |
| 1476 | AM_RANGE(0x8803, 0x8803) AM_DEVWRITE_LEGACY("8910.0", ay8910_address_w) | |
| 1477 | AM_RANGE(0x880b, 0x880b) AM_DEVWRITE_LEGACY("8910.0", ay8910_data_w) | |
| 1478 | AM_RANGE(0x880c, 0x880c) AM_DEVWRITE_LEGACY("8910.1", ay8910_address_w) | |
| 1479 | AM_RANGE(0x880e, 0x880e) AM_DEVWRITE_LEGACY("8910.1", ay8910_data_w) | |
| 1476 | AM_RANGE(0x8803, 0x8803) AM_DEVWRITE("8910.0", ay8910_device, address_w) | |
| 1477 | AM_RANGE(0x880b, 0x880b) AM_DEVWRITE("8910.0", ay8910_device, data_w) | |
| 1478 | AM_RANGE(0x880c, 0x880c) AM_DEVWRITE("8910.1", ay8910_device, address_w) | |
| 1479 | AM_RANGE(0x880e, 0x880e) AM_DEVWRITE("8910.1", ay8910_device, data_w) | |
| 1480 | 1480 | AM_RANGE(0x9000, 0x93ff) AM_MIRROR(0x0400) AM_RAM_WRITE(galaxian_videoram_w) AM_SHARE("videoram") |
| 1481 | 1481 | AM_RANGE(0x9800, 0x9bff) AM_MIRROR(0x0400) AM_RAM_WRITE(galaxian_objram_w) AM_SHARE("spriteram") |
| 1482 | 1482 | AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x07ff) AM_READ_PORT("IN0") |
| r22781 | r22782 | |
| 1689 | 1689 | AM_RANGE(0x4000, 0x47ff) AM_RAM |
| 1690 | 1690 | AM_RANGE(0x4800, 0x4bff) AM_MIRROR(0x0400) AM_RAM_WRITE(galaxian_videoram_w) AM_SHARE("videoram") |
| 1691 | 1691 | AM_RANGE(0x5000, 0x50ff) AM_MIRROR(0x0700) AM_RAM_WRITE(galaxian_objram_w) AM_SHARE("spriteram") |
| 1692 | AM_RANGE(0x5800, 0x5800) AM_MIRROR(0x00ff) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 1693 | AM_RANGE(0x5900, 0x5900) AM_MIRROR(0x00ff) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 1692 | AM_RANGE(0x5800, 0x5800) AM_MIRROR(0x00ff) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 1693 | AM_RANGE(0x5900, 0x5900) AM_MIRROR(0x00ff) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 1694 | 1694 | AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x07ff) AM_READ_PORT("IN0") |
| 1695 | 1695 | AM_RANGE(0x6002, 0x6006) AM_MIRROR(0x07f8) AM_WRITE(galaxian_gfxbank_w) |
| 1696 | 1696 | AM_RANGE(0x6800, 0x6800) AM_MIRROR(0x07ff) AM_READ_PORT("IN1") |
| r22781 | r22782 | |
| 1821 | 1821 | ADDRESS_MAP_UNMAP_HIGH |
| 1822 | 1822 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1823 | 1823 | AM_RANGE(0x03, 0x03) AM_READ(soundlatch_byte_r) |
| 1824 | AM_RANGE(0x04, 0x05) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 1825 | AM_RANGE(0x06, 0x06) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 1824 | AM_RANGE(0x04, 0x05) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 1825 | AM_RANGE(0x06, 0x06) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 1826 | 1826 | ADDRESS_MAP_END |
| 1827 | 1827 | |
| 1828 | 1828 | |
| r22781 | r22782 | |
| 1831 | 1831 | ADDRESS_MAP_UNMAP_HIGH |
| 1832 | 1832 | AM_RANGE(0x0000, 0x0fff) AM_ROM |
| 1833 | 1833 | AM_RANGE(0x8000, 0x83ff) AM_RAM |
| 1834 | AM_RANGE(0xa000, 0xa001) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 1835 | AM_RANGE(0xa002, 0xa002) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 1834 | AM_RANGE(0xa000, 0xa001) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 1835 | AM_RANGE(0xa002, 0xa002) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 1836 | 1836 | ADDRESS_MAP_END |
| 1837 | 1837 | |
| 1838 | 1838 |
| r22781 | r22782 | |
|---|---|---|
| 459 | 459 | m_videoram(*this, "videoram"), |
| 460 | 460 | m_colorram(*this, "colorram"), |
| 461 | 461 | m_maincpu(*this, "maincpu"), |
| 462 | m_audiocpu(*this, "audiocpu") { } | |
| 462 | m_audiocpu(*this, "audiocpu"), | |
| 463 | m_ay8910(*this, "ay8910") | |
| 464 | { | |
| 465 | } | |
| 463 | 466 | |
| 464 | 467 | UINT8 m_main_latch_d800; |
| 465 | 468 | UINT8 m_snd_latch_0800; |
| 466 | 469 | UINT8 m_snd_latch_0a02; |
| 467 | 470 | UINT8 m_ay8910_addr; |
| 468 | device_t *m_ay8910; | |
| 469 | 471 | required_shared_ptr<UINT8> m_videoram; |
| 470 | 472 | required_shared_ptr<UINT8> m_colorram; |
| 471 | 473 | tilemap_t *m_bg_tilemap; |
| r22781 | r22782 | |
| 491 | 493 | UINT32 screen_update_fclown(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 492 | 494 | required_device<cpu_device> m_maincpu; |
| 493 | 495 | required_device<cpu_device> m_audiocpu; |
| 496 | required_device<ay8910_device> m_ay8910; | |
| 494 | 497 | }; |
| 495 | 498 | |
| 496 | 499 | |
| r22781 | r22782 | |
| 689 | 692 | |
| 690 | 693 | WRITE8_MEMBER(_5clown_state::fclown_ay8910_w) |
| 691 | 694 | { |
| 692 | ay8910_address_w(m_ay8910, space, 0, offset); | |
| 693 | ay8910_data_w(m_ay8910, space, 0, data); | |
| 695 | m_ay8910->address_w(space, 0, offset); | |
| 696 | m_ay8910->data_w(space, 0, data); | |
| 694 | 697 | } |
| 695 | 698 | |
| 696 | 699 | |
| r22781 | r22782 | |
| 1258 | 1261 | samples_src[x] = samples_src[x] ^ 0x12; /* Otherwise bit 1 & 5 XOR'ed */ |
| 1259 | 1262 | } |
| 1260 | 1263 | } |
| 1261 | ||
| 1262 | ||
| 1263 | /* Assigning AY-3-8910 sound device */ | |
| 1264 | ||
| 1265 | m_ay8910 = machine().device("ay8910"); | |
| 1266 | 1264 | } |
| 1267 | 1265 | |
| 1268 | 1266 |
| r22781 | r22782 | |
|---|---|---|
| 835 | 835 | static ADDRESS_MAP_START( sys903_map, AS_PROGRAM, 8, calomega_state ) |
| 836 | 836 | ADDRESS_MAP_GLOBAL_MASK(0x3fff) |
| 837 | 837 | AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram") |
| 838 | AM_RANGE(0x0840, 0x0841) AM_DEVWRITE | |
| 838 | AM_RANGE(0x0840, 0x0841) AM_DEVWRITE("ay8912", ay8910_device, address_data_w) | |
| 839 | 839 | AM_RANGE(0x0880, 0x0880) AM_DEVWRITE("crtc", mc6845_device, address_w) |
| 840 | 840 | AM_RANGE(0x0881, 0x0881) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w) |
| 841 | 841 | AM_RANGE(0x08c4, 0x08c7) AM_DEVREADWRITE("pia0", pia6821_device, read, write) |
| r22781 | r22782 | |
| 850 | 850 | static ADDRESS_MAP_START( s903mod_map, AS_PROGRAM, 8, calomega_state ) |
| 851 | 851 | ADDRESS_MAP_GLOBAL_MASK(0x3fff) |
| 852 | 852 | AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram") |
| 853 | AM_RANGE(0x0840, 0x0841) AM_DEVWRITE | |
| 853 | AM_RANGE(0x0840, 0x0841) AM_DEVWRITE("ay8912", ay8910_device, address_data_w) | |
| 854 | 854 | AM_RANGE(0x0880, 0x0880) AM_DEVWRITE("crtc", mc6845_device, address_w) |
| 855 | 855 | AM_RANGE(0x0881, 0x0881) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w) |
| 856 | 856 | AM_RANGE(0x08c4, 0x08c7) AM_DEVREADWRITE("pia0", pia6821_device, read, write) |
| r22781 | r22782 | |
| 863 | 863 | static ADDRESS_MAP_START( sys905_map, AS_PROGRAM, 8, calomega_state ) |
| 864 | 864 | ADDRESS_MAP_GLOBAL_MASK(0x7fff) |
| 865 | 865 | AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram") |
| 866 | AM_RANGE(0x1040, 0x1041) AM_DEVWRITE | |
| 866 | AM_RANGE(0x1040, 0x1041) AM_DEVWRITE("ay8912", ay8910_device, address_data_w) | |
| 867 | 867 | AM_RANGE(0x1080, 0x1080) AM_DEVWRITE("crtc", mc6845_device, address_w) |
| 868 | 868 | AM_RANGE(0x1081, 0x1081) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w) |
| 869 | 869 | AM_RANGE(0x10c4, 0x10c7) AM_DEVREADWRITE("pia0", pia6821_device, read, write) |
| r22781 | r22782 | |
| 879 | 879 | AM_RANGE(0x2824, 0x2827) AM_DEVREADWRITE("pia1", pia6821_device, read, write) |
| 880 | 880 | AM_RANGE(0x2c04, 0x2c04) AM_DEVWRITE("crtc", mc6845_device, address_w) |
| 881 | 881 | AM_RANGE(0x2c05, 0x2c05) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w) |
| 882 | AM_RANGE(0x2c08, 0x2c09) AM_DEVREADWRITE | |
| 882 | AM_RANGE(0x2c08, 0x2c09) AM_DEVREADWRITE("ay8912", ay8910_device, data_r, address_data_w) | |
| 883 | 883 | AM_RANGE(0x2000, 0x23ff) AM_RAM_WRITE(calomega_videoram_w) AM_SHARE("videoram") |
| 884 | 884 | AM_RANGE(0x2400, 0x27ff) AM_RAM_WRITE(calomega_colorram_w) AM_SHARE("colorram") |
| 885 | 885 | AM_RANGE(0x6000, 0xffff) AM_ROM |
| r22781 | r22782 | |
|---|---|---|
| 426 | 426 | |
| 427 | 427 | AM_RANGE(0x20, 0x20) AM_WRITE(skylncr_coin_w ) |
| 428 | 428 | |
| 429 | AM_RANGE(0x30, 0x31) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w ) | |
| 430 | AM_RANGE(0x31, 0x31) AM_DEVREAD_LEGACY("aysnd", ay8910_r ) | |
| 429 | AM_RANGE(0x30, 0x31) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 430 | AM_RANGE(0x31, 0x31) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 431 | 431 | |
| 432 | 432 | AM_RANGE(0x40, 0x41) AM_WRITE(skylncr_paletteram_w ) |
| 433 | 433 | AM_RANGE(0x50, 0x51) AM_WRITE(skylncr_paletteram2_w ) |
| r22781 | r22782 | |
|---|---|---|
| 306 | 306 | static ADDRESS_MAP_START( mpu12wbk_map, AS_PROGRAM, 8, mpu12wbk_state ) |
| 307 | 307 | AM_RANGE(0x1400, 0x1400) AM_DEVWRITE("crtc", mc6845_device, address_w) // OK |
| 308 | 308 | AM_RANGE(0x1401, 0x1401) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w) // OK |
| 309 | AM_RANGE(0x1e00, 0x1e01) AM_DEVREADWRITE | |
| 309 | AM_RANGE(0x1e00, 0x1e01) AM_DEVREADWRITE("ay8910", ay8910_device, data_r, address_data_w) // hmmmmm.... | |
| 310 | 310 | AM_RANGE(0x2000, 0x23ff) AM_RAM_WRITE(mpu12wbk_videoram_w) AM_SHARE("videoram") // FIXME |
| 311 | 311 | AM_RANGE(0x2400, 0x27ff) AM_RAM_WRITE(mpu12wbk_colorram_w) AM_SHARE("colorram") // FIXME |
| 312 | 312 | AM_RANGE(0x2800, 0x3fff) AM_RAM // RAM (from 2000-3fff) |
| r22781 | r22782 | |
|---|---|---|
| 129 | 129 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 130 | 130 | AM_RANGE(0x2000, 0x2fff) AM_ROM //only bking3 |
| 131 | 131 | AM_RANGE(0x4000, 0x43ff) AM_RAM |
| 132 | AM_RANGE(0x4400, 0x4401) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 133 | AM_RANGE(0x4401, 0x4401) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 134 | AM_RANGE(0x4402, 0x4403) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 135 | AM_RANGE(0x4403, 0x4403) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 132 | AM_RANGE(0x4400, 0x4401) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 133 | AM_RANGE(0x4401, 0x4401) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 134 | AM_RANGE(0x4402, 0x4403) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 135 | AM_RANGE(0x4403, 0x4403) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 136 | 136 | AM_RANGE(0x4800, 0x4800) AM_READ(soundlatch_byte_r) |
| 137 | 137 | AM_RANGE(0x4802, 0x4802) AM_READWRITE(bking_sndnmi_disable_r, bking_sndnmi_enable_w) |
| 138 | 138 | AM_RANGE(0xe000, 0xefff) AM_ROM /* Space for diagnostic ROM */ |
| r22781 | r22782 | |
|---|---|---|
| 175 | 175 | AM_RANGE(0x30, 0x30) AM_WRITE(thief_input_select_w) /* 8255 */ |
| 176 | 176 | AM_RANGE(0x31, 0x31) AM_READ(thief_io_r) /* 8255 */ |
| 177 | 177 | AM_RANGE(0x33, 0x33) AM_WRITE(tape_control_w) |
| 178 | AM_RANGE(0x40, 0x41) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 179 | AM_RANGE(0x41, 0x41) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 180 | AM_RANGE(0x42, 0x43) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 181 | AM_RANGE(0x43, 0x43) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 178 | AM_RANGE(0x40, 0x41) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 179 | AM_RANGE(0x41, 0x41) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 180 | AM_RANGE(0x42, 0x43) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 181 | AM_RANGE(0x43, 0x43) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 182 | 182 | AM_RANGE(0x50, 0x50) AM_WRITE(thief_color_plane_w) |
| 183 | 183 | AM_RANGE(0x60, 0x6f) AM_DEVREADWRITE_LEGACY("tms", tms9927_r, tms9927_w) |
| 184 | 184 | AM_RANGE(0x70, 0x7f) AM_WRITE(thief_color_map_w) |
| r22781 | r22782 | |
|---|---|---|
| 203 | 203 | static ADDRESS_MAP_START( sound_portmap, AS_IO, 8, suprridr_state ) |
| 204 | 204 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 205 | 205 | AM_RANGE(0x00, 0x00) AM_WRITE(sound_irq_ack_w) |
| 206 | AM_RANGE(0x8c, 0x8d) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 207 | AM_RANGE(0x8d, 0x8d) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 208 | AM_RANGE(0x8e, 0x8f) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 209 | AM_RANGE(0x8f, 0x8f) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 206 | AM_RANGE(0x8c, 0x8d) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 207 | AM_RANGE(0x8d, 0x8d) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 208 | AM_RANGE(0x8e, 0x8f) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 209 | AM_RANGE(0x8f, 0x8f) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 210 | 210 | ADDRESS_MAP_END |
| 211 | 211 | |
| 212 | 212 |
| r22781 | r22782 | |
|---|---|---|
| 272 | 272 | |
| 273 | 273 | static ADDRESS_MAP_START( calorie_sound_io_map, AS_IO, 8, calorie_state ) |
| 274 | 274 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 275 | AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 276 | AM_RANGE(0x01, 0x01) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 277 | AM_RANGE(0x10, 0x11) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 278 | AM_RANGE(0x11, 0x11) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 275 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 276 | AM_RANGE(0x01, 0x01) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 277 | AM_RANGE(0x10, 0x11) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 278 | AM_RANGE(0x11, 0x11) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 279 | 279 | // 3rd ? |
| 280 | 280 | AM_RANGE(0x00, 0xff) AM_WRITE(bogus_w) |
| 281 | 281 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 297 | 297 | AM_RANGE(0x08, 0x08) AM_WRITE(snd_irq_w) |
| 298 | 298 | AM_RANGE(0x0c, 0x0c) AM_WRITE(snd_ack_w) |
| 299 | 299 | AM_RANGE(0x80, 0x80) AM_WRITE(adpcm_w) |
| 300 | AM_RANGE(0x86, 0x87) AM_DEVWRITE_LEGACY("ay1", ay8910_data_address_w) | |
| 301 | AM_RANGE(0x8a, 0x8b) AM_DEVWRITE_LEGACY("ay2", ay8910_data_address_w) | |
| 302 | AM_RANGE(0x8e, 0x8f) AM_DEVWRITE_LEGACY("ay3", ay8910_data_address_w) | |
| 300 | AM_RANGE(0x86, 0x87) AM_DEVWRITE("ay1", ay8910_device, data_address_w) | |
| 301 | AM_RANGE(0x8a, 0x8b) AM_DEVWRITE("ay2", ay8910_device, data_address_w) | |
| 302 | AM_RANGE(0x8e, 0x8f) AM_DEVWRITE("ay3", ay8910_device, data_address_w) | |
| 303 | 303 | ADDRESS_MAP_END |
| 304 | 304 | |
| 305 | 305 | static ADDRESS_MAP_START( itaten_snd_io_map, AS_IO, 8, dacholer_state ) |
| 306 | 306 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 307 | 307 | AM_RANGE(0x00, 0x00) AM_READWRITE(soundlatch_byte_r, soundlatch_clear_byte_w ) |
| 308 | AM_RANGE(0x86, 0x87) AM_DEVWRITE_LEGACY("ay1", ay8910_data_address_w) | |
| 309 | AM_RANGE(0x8a, 0x8b) AM_DEVWRITE_LEGACY("ay2", ay8910_data_address_w) | |
| 310 | AM_RANGE(0x8e, 0x8f) AM_DEVWRITE_LEGACY("ay3", ay8910_data_address_w) | |
| 308 | AM_RANGE(0x86, 0x87) AM_DEVWRITE("ay1", ay8910_device, data_address_w) | |
| 309 | AM_RANGE(0x8a, 0x8b) AM_DEVWRITE("ay2", ay8910_device, data_address_w) | |
| 310 | AM_RANGE(0x8e, 0x8f) AM_DEVWRITE("ay3", ay8910_device, data_address_w) | |
| 311 | 311 | ADDRESS_MAP_END |
| 312 | 312 | |
| 313 | 313 |
| r22781 | r22782 | |
|---|---|---|
| 55 | 55 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 56 | 56 | AM_RANGE(0x98, 0x98) AM_DEVREADWRITE( "tms9928a", tms9928a_device, vram_read, vram_write ) |
| 57 | 57 | AM_RANGE(0x99, 0x99) AM_DEVREADWRITE( "tms9928a", tms9928a_device, register_read, register_write ) |
| 58 | AM_RANGE(0xa0, 0xa1) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 59 | AM_RANGE(0xa2, 0xa2) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 58 | AM_RANGE(0xa0, 0xa1) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 59 | AM_RANGE(0xa2, 0xa2) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 60 | 60 | |
| 61 | 61 | /* Ports a8-ab are originally for communicating with the i8255 PPI on MSX. |
| 62 | 62 | Since this arcade board doesn't have one, those ports should be unmapped. */ |
| r22781 | r22782 | |
|---|---|---|
| 428 | 428 | static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, flstory_state ) |
| 429 | 429 | AM_RANGE(0x0000, 0xbfff) AM_ROM |
| 430 | 430 | AM_RANGE(0xc000, 0xc7ff) AM_RAM |
| 431 | AM_RANGE(0xc800, 0xc801) AM_DEVWRITE | |
| 431 | AM_RANGE(0xc800, 0xc801) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 432 | 432 | AM_RANGE(0xca00, 0xca0d) AM_DEVWRITE_LEGACY("msm", msm5232_w) |
| 433 | 433 | AM_RANGE(0xcc00, 0xcc00) AM_WRITE(sound_control_0_w) |
| 434 | 434 | AM_RANGE(0xce00, 0xce00) AM_WRITE(sound_control_1_w) |
| r22781 | r22782 | |
|---|---|---|
| 108 | 108 | ADDRESS_MAP_END |
| 109 | 109 | |
| 110 | 110 | static ADDRESS_MAP_START( twins_io, AS_IO, 16, twins_state ) |
| 111 | AM_RANGE(0x0000, 0x0003) AM_DEVWRITE8_LEGACY("aysnd", ay8910_address_data_w, 0x00ff) | |
| 112 | AM_RANGE(0x0002, 0x0003) AM_DEVREAD8_LEGACY("aysnd", ay8910_r, 0x00ff) | |
| 111 | AM_RANGE(0x0000, 0x0003) AM_DEVWRITE8("aysnd", ay8910_device, address_data_w, 0x00ff) | |
| 112 | AM_RANGE(0x0002, 0x0003) AM_DEVREAD8("aysnd", ay8910_device, data_r, 0x00ff) | |
| 113 | 113 | AM_RANGE(0x0004, 0x0005) AM_READWRITE(twins_port4_r, twins_port4_w) |
| 114 | 114 | AM_RANGE(0x0006, 0x0007) AM_WRITE(port6_pal0_w) |
| 115 | 115 | AM_RANGE(0x000e, 0x000f) AM_WRITE(porte_paloff0_w) |
| r22781 | r22782 | |
| 272 | 272 | AM_RANGE(0x0000, 0x0001) AM_READWRITE(twinsa_unk_r, porte_paloff0_w) |
| 273 | 273 | AM_RANGE(0x0002, 0x0003) AM_WRITE(porte_paloff0_w) |
| 274 | 274 | AM_RANGE(0x0004, 0x0005) AM_WRITE(twinsa_port4_w) // palette on this set |
| 275 | AM_RANGE(0x0008, 0x0009) AM_DEVWRITE8_LEGACY("aysnd", ay8910_address_w, 0x00ff) | |
| 276 | AM_RANGE(0x0010, 0x0011) AM_DEVREADWRITE8_LEGACY("aysnd", ay8910_r, ay8910_data_w, 0x00ff) | |
| 275 | AM_RANGE(0x0008, 0x0009) AM_DEVWRITE8("aysnd", ay8910_device, address_w, 0x00ff) | |
| 276 | AM_RANGE(0x0010, 0x0011) AM_DEVREADWRITE8("aysnd", ay8910_device, data_r, data_w, 0x00ff) | |
| 277 | 277 | AM_RANGE(0x0018, 0x0019) AM_READ(twins_port4_r) AM_WRITE(twins_port4_w) |
| 278 | 278 | ADDRESS_MAP_END |
| 279 | 279 |
| r22781 | r22782 | |
|---|---|---|
| 340 | 340 | AM_RANGE(0x092000, 0x09201f) AM_DEVREADWRITE8("via6522_0", via6522_device, read, write, 0x00ff) |
| 341 | 341 | |
| 342 | 342 | AM_RANGE(0x093000, 0x093003) AM_WRITENOP // related to music |
| 343 | AM_RANGE(0x092800, 0x092803) AM_DEVWRITE8_LEGACY("aysnd", ay8910_data_address_w, 0xff00) | |
| 344 | AM_RANGE(0x092802, 0x092803) AM_DEVREAD8_LEGACY("aysnd", ay8910_r, 0xff00) | |
| 343 | AM_RANGE(0x092800, 0x092803) AM_DEVWRITE8("aysnd", ay8910_device, data_address_w, 0xff00) | |
| 344 | AM_RANGE(0x092802, 0x092803) AM_DEVREAD8("aysnd", ay8910_device, data_r, 0xff00) | |
| 345 | 345 | AM_RANGE(0x093802, 0x093803) AM_READ_PORT("IN0") |
| 346 | 346 | AM_RANGE(0x095000, 0x095fff) AM_RAM AM_SHARE("nvram") /* 8 bit */ |
| 347 | 347 | AM_RANGE(0x097000, 0x097001) AM_READNOP |
| r22781 | r22782 | |
|---|---|---|
| 193 | 193 | |
| 194 | 194 | static ADDRESS_MAP_START( port_map_cpu2, AS_IO, 8, tankbust_state ) |
| 195 | 195 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 196 | AM_RANGE(0x10, 0x10) AM_DEVWRITE_LEGACY("ay2", ay8910_data_w) | |
| 197 | AM_RANGE(0x30, 0x30) AM_DEVREADWRITE_LEGACY("ay2", ay8910_r, ay8910_address_w) | |
| 198 | AM_RANGE(0x40, 0x40) AM_DEVWRITE_LEGACY("ay1", ay8910_data_w) | |
| 199 | AM_RANGE(0xc0, 0xc0) AM_DEVREADWRITE_LEGACY("ay1", ay8910_r, ay8910_address_w) | |
| 196 | AM_RANGE(0x10, 0x10) AM_DEVWRITE("ay2", ay8910_device, data_w) | |
| 197 | AM_RANGE(0x30, 0x30) AM_DEVREADWRITE("ay2", ay8910_device, data_r, address_w) | |
| 198 | AM_RANGE(0x40, 0x40) AM_DEVWRITE("ay1", ay8910_device, data_w) | |
| 199 | AM_RANGE(0xc0, 0xc0) AM_DEVREADWRITE("ay1", ay8910_device, data_r, address_w) | |
| 200 | 200 | ADDRESS_MAP_END |
| 201 | 201 | |
| 202 | 202 |
| r22781 | r22782 | |
|---|---|---|
| 807 | 807 | |
| 808 | 808 | static ADDRESS_MAP_START( jongbou_sound_portmap, AS_IO, 8, alpha68k_state ) |
| 809 | 809 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 810 | AM_RANGE(0x00, 0x00) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 811 | AM_RANGE(0x01, 0x01) AM_DEVREADWRITE_LEGACY("aysnd", ay8910_r, ay8910_data_w) | |
| 810 | AM_RANGE(0x00, 0x00) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 811 | AM_RANGE(0x01, 0x01) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, data_w) | |
| 812 | 812 | AM_RANGE(0x02, 0x02) AM_WRITE(soundlatch_clear_byte_w) |
| 813 | 813 | AM_RANGE(0x06, 0x06) AM_WRITENOP |
| 814 | 814 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 169 | 169 | |
| 170 | 170 | static ADDRESS_MAP_START( io_map, AS_IO, 8, zodiack_state ) |
| 171 | 171 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 172 | AM_RANGE(0x00, 0x01) AM_DEVWRITE | |
| 172 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 173 | 173 | ADDRESS_MAP_END |
| 174 | 174 | |
| 175 | 175 |
| r22781 | r22782 | |
|---|---|---|
| 734 | 734 | |
| 735 | 735 | static ADDRESS_MAP_START( bongo_io, AS_IO, 8, galaxold_state ) |
| 736 | 736 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 737 | AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 738 | AM_RANGE(0x02, 0x02) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 737 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 738 | AM_RANGE(0x02, 0x02) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 739 | 739 | ADDRESS_MAP_END |
| 740 | 740 | |
| 741 | 741 | |
| r22781 | r22782 | |
| 759 | 759 | |
| 760 | 760 | static ADDRESS_MAP_START( ozon1_io_map, AS_IO, 8, galaxold_state ) |
| 761 | 761 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 762 | AM_RANGE(0x00, 0x01) AM_DEVWRITE | |
| 762 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 763 | 763 | ADDRESS_MAP_END |
| 764 | 764 | |
| 765 | 765 |
| r22781 | r22782 | |
|---|---|---|
| 82 | 82 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 83 | 83 | AM_RANGE(0x00, 0x00) AM_READWRITE(hanaawas_input_port_0_r, hanaawas_inputs_mux_w) |
| 84 | 84 | AM_RANGE(0x01, 0x01) AM_READNOP /* it must return 0 */ |
| 85 | AM_RANGE(0x10, 0x10) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 86 | AM_RANGE(0x10, 0x11) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 85 | AM_RANGE(0x10, 0x10) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 86 | AM_RANGE(0x10, 0x11) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 87 | 87 | ADDRESS_MAP_END |
| 88 | 88 | |
| 89 | 89 | static INPUT_PORTS_START( hanaawas ) |
| r22781 | r22782 | |
|---|---|---|
| 307 | 307 | AM_RANGE(0x400002, 0x400003) AM_NOP // hopper status read ? |
| 308 | 308 | AM_RANGE(0x40000c, 0x40000d) AM_READ(unk_r) |
| 309 | 309 | AM_RANGE(0x40000e, 0x40000f) AM_READ_PORT("DSW2") // not sure... |
| 310 | AM_RANGE(0x402000, 0x402001) AM_DEVREAD8_LEGACY("aysnd", ay8910_r, 0x00ff) | |
| 311 | AM_RANGE(0x402000, 0x402003) AM_DEVWRITE8_LEGACY("aysnd", ay8910_address_data_w, 0x00ff) //wrong | |
| 310 | AM_RANGE(0x402000, 0x402001) AM_DEVREAD8("aysnd", ay8910_device, data_r, 0x00ff) | |
| 311 | AM_RANGE(0x402000, 0x402003) AM_DEVWRITE8("aysnd", ay8910_device, address_data_w, 0x00ff) //wrong | |
| 312 | 312 | |
| 313 | 313 | AM_RANGE(0xc00000, 0xc3ffff) AM_RAM AM_SHARE("videoram") |
| 314 | 314 | AM_RANGE(0x500200, 0x50020f) AM_RAM //? |
| r22781 | r22782 | |
|---|---|---|
| 363 | 363 | static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, bigevglf_state ) |
| 364 | 364 | AM_RANGE(0x0000, 0xbfff) AM_ROM |
| 365 | 365 | AM_RANGE(0xc000, 0xc7ff) AM_RAM |
| 366 | AM_RANGE(0xc800, 0xc801) AM_DEVWRITE | |
| 366 | AM_RANGE(0xc800, 0xc801) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 367 | 367 | AM_RANGE(0xca00, 0xca0d) AM_DEVWRITE_LEGACY("msm", msm5232_w) |
| 368 | 368 | AM_RANGE(0xcc00, 0xcc00) AM_WRITENOP |
| 369 | 369 | AM_RANGE(0xce00, 0xce00) AM_WRITENOP |
| r22781 | r22782 | |
|---|---|---|
| 65 | 65 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 66 | 66 | // AM_RANGE(0x00, 0x00) AM_WRITENOP |
| 67 | 67 | AM_RANGE(0x00, 0x7f) AM_READ_LEGACY(nb1413m3_sndrom_r) |
| 68 | AM_RANGE(0x81, 0x81) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 69 | AM_RANGE(0x82, 0x83) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 68 | AM_RANGE(0x81, 0x81) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 69 | AM_RANGE(0x82, 0x83) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 70 | 70 | AM_RANGE(0x90, 0x90) AM_READ_PORT("SYSTEM") |
| 71 | 71 | AM_RANGE(0x90, 0x96) AM_WRITE(pastelg_blitter_w) |
| 72 | 72 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r, nb1413m3_inputportsel_w) |
| r22781 | r22782 | |
| 113 | 113 | |
| 114 | 114 | static ADDRESS_MAP_START( threeds_io_map, AS_IO, 8, pastelg_state ) |
| 115 | 115 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 116 | AM_RANGE(0x81, 0x81) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 117 | AM_RANGE(0x82, 0x83) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 116 | AM_RANGE(0x81, 0x81) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 117 | AM_RANGE(0x82, 0x83) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 118 | 118 | AM_RANGE(0x90, 0x90) AM_READ_PORT("SYSTEM") AM_WRITE(threeds_romsel_w ) |
| 119 | 119 | AM_RANGE(0xf0, 0xf6) AM_WRITE(pastelg_blitter_w) |
| 120 | 120 | AM_RANGE(0xa0, 0xa0) AM_READWRITE(threeds_inputport1_r, threeds_inputportsel_w) |
| r22781 | r22782 | |
|---|---|---|
| 104 | 104 | |
| 105 | 105 | static ADDRESS_MAP_START( popeye_io_map, AS_IO, 8, popeye_state ) |
| 106 | 106 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 107 | AM_RANGE(0x00, 0x01) AM_DEVWRITE | |
| 107 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 108 | 108 | AM_RANGE(0x00, 0x00) AM_READ_PORT("P1") |
| 109 | 109 | AM_RANGE(0x01, 0x01) AM_READ_PORT("P2") |
| 110 | 110 | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN0") |
| 111 | AM_RANGE(0x03, 0x03) AM_DEVREAD | |
| 111 | AM_RANGE(0x03, 0x03) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 112 | 112 | ADDRESS_MAP_END |
| 113 | 113 | |
| 114 | 114 |
| r22781 | r22782 | |
|---|---|---|
| 147 | 147 | AM_RANGE(0x00, 0x00) AM_READ(mux_r) /* present in test mode */ |
| 148 | 148 | AM_RANGE(0x02, 0x02) AM_READ_PORT("SYSTEM") /* coins and service */ |
| 149 | 149 | AM_RANGE(0x98, 0x9b) AM_DEVREADWRITE("v9938", v9938_device, read, write) |
| 150 | AM_RANGE(0xa0, 0xa1) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 151 | AM_RANGE(0xa2, 0xa2) AM_DEVREAD_LEGACY("aysnd", ay8910_r) /* Dip-Switches routes here. */ | |
| 150 | AM_RANGE(0xa0, 0xa1) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 151 | AM_RANGE(0xa2, 0xa2) AM_DEVREAD("aysnd", ay8910_device, data_r) /* Dip-Switches routes here. */ | |
| 152 | 152 | ADDRESS_MAP_END |
| 153 | 153 | |
| 154 | 154 |
| r22781 | r22782 | |
|---|---|---|
| 522 | 522 | AM_RANGE( 0x0086, 0x0086 ) AM_WRITE(dunhuang_rombank_w ) |
| 523 | 523 | AM_RANGE( 0x0087, 0x0087 ) AM_WRITE(dunhuang_layers_w ) |
| 524 | 524 | |
| 525 | AM_RANGE( 0x0088, 0x0088 ) AM_DEVREAD_LEGACY("ay8910", ay8910_r ) | |
| 526 | AM_RANGE( 0x0090, 0x0090 ) AM_DEVWRITE_LEGACY("ay8910", ay8910_data_w ) | |
| 527 | AM_RANGE( 0x0098, 0x0098 ) AM_DEVWRITE_LEGACY("ay8910", ay8910_address_w ) | |
| 525 | AM_RANGE( 0x0088, 0x0088 ) AM_DEVREAD("ay8910", ay8910_device, data_r ) | |
| 526 | AM_RANGE( 0x0090, 0x0090 ) AM_DEVWRITE("ay8910", ay8910_device, data_w ) | |
| 527 | AM_RANGE( 0x0098, 0x0098 ) AM_DEVWRITE("ay8910", ay8910_device, address_w ) | |
| 528 | 528 | ADDRESS_MAP_END |
| 529 | 529 | |
| 530 | 530 |
| r22781 | r22782 | |
|---|---|---|
| 221 | 221 | AM_RANGE(0x03, 0x03) AM_WRITE(ojankohs_adpcm_reset_w) |
| 222 | 222 | AM_RANGE(0x04, 0x04) AM_WRITE(ojankohs_flipscreen_w) |
| 223 | 223 | AM_RANGE(0x05, 0x05) AM_WRITE(ojankohs_msm5205_w) |
| 224 | AM_RANGE(0x06, 0x06) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 225 | AM_RANGE(0x06, 0x07) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 224 | AM_RANGE(0x06, 0x06) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 225 | AM_RANGE(0x06, 0x07) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 226 | 226 | AM_RANGE(0x10, 0x10) AM_WRITENOP // unknown |
| 227 | 227 | AM_RANGE(0x11, 0x11) AM_WRITENOP // unknown |
| 228 | 228 | ADDRESS_MAP_END |
| r22781 | r22782 | |
| 234 | 234 | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN1") AM_WRITE(ojankoy_coinctr_w) |
| 235 | 235 | AM_RANGE(0x04, 0x04) AM_WRITE(ojankohs_flipscreen_w) |
| 236 | 236 | AM_RANGE(0x05, 0x05) AM_WRITE(ojankohs_msm5205_w) |
| 237 | AM_RANGE(0x06, 0x06) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 238 | AM_RANGE(0x06, 0x07) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 237 | AM_RANGE(0x06, 0x06) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 238 | AM_RANGE(0x06, 0x07) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 239 | 239 | ADDRESS_MAP_END |
| 240 | 240 | |
| 241 | 241 | static ADDRESS_MAP_START( ccasino_io_map, AS_IO, 8, ojankohs_state ) |
| r22781 | r22782 | |
| 246 | 246 | AM_RANGE(0x03, 0x03) AM_READ(ccasino_dipsw3_r) AM_WRITE(ojankohs_adpcm_reset_w) |
| 247 | 247 | AM_RANGE(0x04, 0x04) AM_READ(ccasino_dipsw4_r) AM_WRITE(ojankohs_flipscreen_w) |
| 248 | 248 | AM_RANGE(0x05, 0x05) AM_WRITE(ojankohs_msm5205_w) |
| 249 | AM_RANGE(0x06, 0x06) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 250 | AM_RANGE(0x06, 0x07) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 249 | AM_RANGE(0x06, 0x06) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 250 | AM_RANGE(0x06, 0x07) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 251 | 251 | AM_RANGE(0x08, 0x0f) AM_WRITE(ccasino_palette_w) AM_SHARE("paletteram") // 16bit address access |
| 252 | 252 | AM_RANGE(0x10, 0x10) AM_WRITENOP |
| 253 | 253 | AM_RANGE(0x11, 0x11) AM_WRITENOP |
| r22781 | r22782 | |
| 260 | 260 | AM_RANGE(0xfb, 0xfb) AM_WRITE(ojankoc_ctrl_w) |
| 261 | 261 | AM_RANGE(0xfc, 0xfd) AM_READ(ojankoc_keymatrix_r) |
| 262 | 262 | AM_RANGE(0xfd, 0xfd) AM_WRITE(ojankohs_portselect_w) |
| 263 | AM_RANGE(0xfe, 0xff) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 264 | AM_RANGE(0xff, 0xff) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 263 | AM_RANGE(0xfe, 0xff) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 264 | AM_RANGE(0xff, 0xff) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 265 | 265 | ADDRESS_MAP_END |
| 266 | 266 | |
| 267 | 267 |
| r22781 | r22782 | |
|---|---|---|
| 62 | 62 | AM_RANGE(0x3800, 0x380f) AM_DEVREADWRITE("via6522_1", via6522_device, read, write) |
| 63 | 63 | AM_RANGE(0x3810, 0x381f) AM_DEVREADWRITE("via6522_2", via6522_device, read, write) |
| 64 | 64 | AM_RANGE(0x3820, 0x382f) AM_DEVREADWRITE("via6522_0", via6522_device, read, write) |
| 65 | AM_RANGE(0x3830, 0x3831) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 66 | AM_RANGE(0x3840, 0x3841) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 65 | AM_RANGE(0x3830, 0x3831) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 66 | AM_RANGE(0x3840, 0x3841) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 67 | 67 | AM_RANGE(0x3850, 0x3850) AM_READNOP //watchdog_reset_r ? |
| 68 | 68 | AM_RANGE(0x8000, 0x9fff) AM_READ(trvquest_question_r) |
| 69 | 69 | AM_RANGE(0xa000, 0xa000) AM_WRITEONLY AM_SHARE("trvquest_q") |
| r22781 | r22782 | |
|---|---|---|
| 1177 | 1177 | static ADDRESS_MAP_START( hardhead_sound_map, AS_PROGRAM, 8, suna8_state ) |
| 1178 | 1178 | AM_RANGE(0x0000, 0x7fff) AM_ROM // ROM |
| 1179 | 1179 | AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE_LEGACY("ymsnd", ym3812_r, ym3812_w) |
| 1180 | AM_RANGE(0xa002, 0xa003) AM_DEVWRITE | |
| 1180 | AM_RANGE(0xa002, 0xa003) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 1181 | 1181 | AM_RANGE(0xc000, 0xc7ff) AM_RAM // RAM |
| 1182 | 1182 | AM_RANGE(0xc800, 0xc800) AM_DEVREAD_LEGACY("ymsnd", ym3812_status_port_r) // ? unsure |
| 1183 | 1183 | AM_RANGE(0xd000, 0xd000) AM_WRITE(soundlatch2_byte_w ) // |
| r22781 | r22782 | |
| 1212 | 1212 | static ADDRESS_MAP_START( brickzn_sound_map, AS_PROGRAM, 8, suna8_state ) |
| 1213 | 1213 | AM_RANGE(0x0000, 0xbfff) AM_ROM // ROM |
| 1214 | 1214 | AM_RANGE(0xc000, 0xc001) AM_DEVWRITE_LEGACY("ymsnd", ym3812_w ) |
| 1215 | AM_RANGE(0xc002, 0xc003) AM_DEVWRITE | |
| 1215 | AM_RANGE(0xc002, 0xc003) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 1216 | 1216 | AM_RANGE(0xe000, 0xe7ff) AM_RAM // RAM |
| 1217 | 1217 | AM_RANGE(0xf000, 0xf000) AM_WRITE(soundlatch2_byte_w ) // To PCM CPU |
| 1218 | 1218 | AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_byte_r ) // From Main CPU |
| r22781 | r22782 | |
|---|---|---|
| 325 | 325 | |
| 326 | 326 | static ADDRESS_MAP_START( audio_map, AS_PROGRAM, 8, btime_state ) |
| 327 | 327 | AM_RANGE(0x0000, 0x03ff) AM_MIRROR(0x1c00) AM_RAM AM_SHARE("audio_rambase") |
| 328 | AM_RANGE(0x2000, 0x3fff) AM_DEVWRITE_LEGACY("ay1", ay8910_data_w) | |
| 329 | AM_RANGE(0x4000, 0x5fff) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) | |
| 330 | AM_RANGE(0x6000, 0x7fff) AM_DEVWRITE_LEGACY("ay2", ay8910_data_w) | |
| 331 | AM_RANGE(0x8000, 0x9fff) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) | |
| 328 | AM_RANGE(0x2000, 0x3fff) AM_DEVWRITE("ay1", ay8910_device, data_w) | |
| 329 | AM_RANGE(0x4000, 0x5fff) AM_DEVWRITE("ay1", ay8910_device, address_w) | |
| 330 | AM_RANGE(0x6000, 0x7fff) AM_DEVWRITE("ay2", ay8910_device, data_w) | |
| 331 | AM_RANGE(0x8000, 0x9fff) AM_DEVWRITE("ay2", ay8910_device, address_w) | |
| 332 | 332 | AM_RANGE(0xa000, 0xbfff) AM_READ(audio_command_r) |
| 333 | 333 | AM_RANGE(0xc000, 0xdfff) AM_WRITE(audio_nmi_enable_w) |
| 334 | 334 | AM_RANGE(0xe000, 0xefff) AM_MIRROR(0x1000) AM_ROM |
| r22781 | r22782 | |
| 336 | 336 | |
| 337 | 337 | static ADDRESS_MAP_START( disco_audio_map, AS_PROGRAM, 8, btime_state ) |
| 338 | 338 | AM_RANGE(0x0000, 0x03ff) AM_RAM |
| 339 | AM_RANGE(0x4000, 0x4fff) AM_DEVWRITE_LEGACY("ay1", ay8910_data_w) | |
| 340 | AM_RANGE(0x5000, 0x5fff) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) | |
| 341 | AM_RANGE(0x6000, 0x6fff) AM_DEVWRITE_LEGACY("ay2", ay8910_data_w) | |
| 342 | AM_RANGE(0x7000, 0x7fff) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) | |
| 339 | AM_RANGE(0x4000, 0x4fff) AM_DEVWRITE("ay1", ay8910_device, data_w) | |
| 340 | AM_RANGE(0x5000, 0x5fff) AM_DEVWRITE("ay1", ay8910_device, address_w) | |
| 341 | AM_RANGE(0x6000, 0x6fff) AM_DEVWRITE("ay2", ay8910_device, data_w) | |
| 342 | AM_RANGE(0x7000, 0x7fff) AM_DEVWRITE("ay2", ay8910_device, address_w) | |
| 343 | 343 | AM_RANGE(0x8000, 0x8fff) AM_READ(soundlatch_byte_r) AM_WRITENOP /* ack ? */ |
| 344 | 344 | AM_RANGE(0xf000, 0xffff) AM_ROM |
| 345 | 345 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 36 | 36 | AM_RANGE(0xc003, 0xc003) AM_READ_PORT("DSW1") |
| 37 | 37 | AM_RANGE(0xc004, 0xc004) AM_READ_PORT("DSW2") |
| 38 | 38 | AM_RANGE(0xc800, 0xc800) AM_WRITE(higemaru_c800_w) |
| 39 | AM_RANGE(0xc801, 0xc802) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 40 | AM_RANGE(0xc803, 0xc804) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 39 | AM_RANGE(0xc801, 0xc802) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 40 | AM_RANGE(0xc803, 0xc804) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 41 | 41 | AM_RANGE(0xd000, 0xd3ff) AM_RAM_WRITE(higemaru_videoram_w) AM_SHARE("videoram") |
| 42 | 42 | AM_RANGE(0xd400, 0xd7ff) AM_RAM_WRITE(higemaru_colorram_w) AM_SHARE("colorram") |
| 43 | 43 | AM_RANGE(0xd880, 0xd9ff) AM_RAM AM_SHARE("spriteram") |
| r22781 | r22782 | |
|---|---|---|
| 406 | 406 | |
| 407 | 407 | static ADDRESS_MAP_START( cpu0_io, AS_IO, 8, jangou_state ) |
| 408 | 408 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 409 | AM_RANGE(0x01,0x01) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 410 | AM_RANGE(0x02,0x03) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 409 | AM_RANGE(0x01,0x01) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 410 | AM_RANGE(0x02,0x03) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 411 | 411 | AM_RANGE(0x10,0x10) AM_READ_PORT("DSW") //dsw + blitter busy flag |
| 412 | 412 | AM_RANGE(0x10,0x10) AM_WRITE(output_w) |
| 413 | 413 | AM_RANGE(0x11,0x11) AM_WRITE(mux_w) |
| r22781 | r22782 | |
| 477 | 477 | |
| 478 | 478 | static ADDRESS_MAP_START( cntrygrl_cpu0_io, AS_IO, 8, jangou_state ) |
| 479 | 479 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 480 | AM_RANGE(0x01,0x01) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 481 | AM_RANGE(0x02,0x03) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 480 | AM_RANGE(0x01,0x01) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 481 | AM_RANGE(0x02,0x03) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 482 | 482 | AM_RANGE(0x10,0x10) AM_READ_PORT("DSW") //dsw + blitter busy flag |
| 483 | 483 | AM_RANGE(0x10,0x10) AM_WRITE(output_w) |
| 484 | 484 | AM_RANGE(0x11,0x11) AM_WRITE(mux_w) |
| r22781 | r22782 | |
| 501 | 501 | |
| 502 | 502 | static ADDRESS_MAP_START( roylcrdn_cpu0_io, AS_IO, 8, jangou_state ) |
| 503 | 503 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 504 | AM_RANGE(0x01,0x01) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 505 | AM_RANGE(0x02,0x03) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 504 | AM_RANGE(0x01,0x01) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 505 | AM_RANGE(0x02,0x03) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 506 | 506 | AM_RANGE(0x10,0x10) AM_READ_PORT("DSW") /* DSW + blitter busy flag */ |
| 507 | 507 | AM_RANGE(0x10,0x10) AM_WRITENOP /* Writes continuosly 0's in attract mode, and 1's in game */ |
| 508 | 508 | AM_RANGE(0x11,0x11) AM_WRITE(mux_w) |
| r22781 | r22782 | |
|---|---|---|
| 51 | 51 | AM_RANGE(0x0000, 0x0fff) AM_ROM |
| 52 | 52 | AM_RANGE(0x4000, 0x43ff) AM_RAM |
| 53 | 53 | AM_RANGE(0x5000, 0x53ff) AM_RAM |
| 54 | AM_RANGE(0x6000, 0x6001) AM_MIRROR(0xf9e) AM_DEVWRITE | |
| 54 | AM_RANGE(0x6000, 0x6001) AM_MIRROR(0xf9e) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 55 | 55 | AM_RANGE(0x6000, 0x6000) AM_MIRROR(0xf9e) AM_READ(cchasm_coin_sound_r) |
| 56 | AM_RANGE(0x6001, 0x6001) AM_MIRROR(0xf9e) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 57 | AM_RANGE(0x6020, 0x6021) AM_MIRROR(0xf9e) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 58 | AM_RANGE(0x6021, 0x6021) AM_MIRROR(0xf9e) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 56 | AM_RANGE(0x6001, 0x6001) AM_MIRROR(0xf9e) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 57 | AM_RANGE(0x6020, 0x6021) AM_MIRROR(0xf9e) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 58 | AM_RANGE(0x6021, 0x6021) AM_MIRROR(0xf9e) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 59 | 59 | AM_RANGE(0x6040, 0x6040) AM_MIRROR(0xf9e) AM_READWRITE(soundlatch_byte_r, soundlatch3_byte_w) |
| 60 | 60 | AM_RANGE(0x6041, 0x6041) AM_MIRROR(0xf9e) AM_READWRITE(cchasm_soundlatch2_r, cchasm_soundlatch4_w) |
| 61 | 61 | AM_RANGE(0x6061, 0x6061) AM_MIRROR(0xf9e) AM_WRITE(cchasm_reset_coin_flag_w) |
| r22781 | r22782 | |
|---|---|---|
| 79 | 79 | |
| 80 | 80 | static ADDRESS_MAP_START( kingpin_sound_map, AS_PROGRAM, 8, kingpin_state ) |
| 81 | 81 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 82 | AM_RANGE(0x8000, 0x8001) AM_DEVWRITE | |
| 82 | AM_RANGE(0x8000, 0x8001) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 83 | 83 | //AM_RANGE(0x8400, 0x8400) AM_READNOP // ? |
| 84 | 84 | //AM_RANGE(0x8401, 0x8401) AM_WRITENOP // ? |
| 85 | 85 | AM_RANGE(0x8800, 0x8fff) AM_RAM |
| r22781 | r22782 | |
| 154 | 154 | DEVCB_DRIVER_LINE_MEMBER(kingpin_state, vdp_interrupt) |
| 155 | 155 | }; |
| 156 | 156 | |
| 157 | static | |
| 157 | static const ay8910_interface ay8912_interface = | |
| 158 | 158 | { |
| 159 | 159 | AY8910_LEGACY_OUTPUT, |
| 160 | 160 | AY8910_DEFAULT_LOADS, |
| r22781 | r22782 | |
|---|---|---|
| 71 | 71 | AM_RANGE(0x2041, 0x2041) AM_DEVWRITE("crtc", mc6845_device, register_w) |
| 72 | 72 | AM_RANGE(0x2060, 0x2060) AM_WRITE(usgames_rombank_w) |
| 73 | 73 | AM_RANGE(0x2070, 0x2070) AM_READ_PORT("UNK2") |
| 74 | AM_RANGE(0x2400, 0x2401) AM_DEVWRITE | |
| 74 | AM_RANGE(0x2400, 0x2401) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 75 | 75 | AM_RANGE(0x2800, 0x2fff) AM_RAM_WRITE(usgames_charram_w) AM_SHARE("charram") |
| 76 | 76 | AM_RANGE(0x3000, 0x3fff) AM_RAM_WRITE(usgames_videoram_w) AM_SHARE("videoram") |
| 77 | 77 | AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1") |
| r22781 | r22782 | |
| 81 | 81 | |
| 82 | 82 | static ADDRESS_MAP_START( usg185_map, AS_PROGRAM, 8, usgames_state ) |
| 83 | 83 | AM_RANGE(0x0000, 0x1fff) AM_RAM AM_SHARE("nvram") |
| 84 | AM_RANGE(0x2000, 0x2001) AM_DEVWRITE | |
| 84 | AM_RANGE(0x2000, 0x2001) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 85 | 85 | AM_RANGE(0x2400, 0x2400) AM_READ_PORT("DSW") |
| 86 | 86 | AM_RANGE(0x2410, 0x2410) AM_READ_PORT("INPUTS") |
| 87 | 87 | AM_RANGE(0x2420, 0x2420) AM_WRITE(lamps1_w) |
| r22781 | r22782 | |
|---|---|---|
| 162 | 162 | |
| 163 | 163 | static ADDRESS_MAP_START( audio_io_map, AS_IO, 8, bombjack_state ) |
| 164 | 164 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 165 | AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 166 | AM_RANGE(0x10, 0x11) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 167 | AM_RANGE(0x80, 0x81) AM_DEVWRITE_LEGACY("ay3", ay8910_address_data_w) | |
| 165 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 166 | AM_RANGE(0x10, 0x11) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 167 | AM_RANGE(0x80, 0x81) AM_DEVWRITE("ay3", ay8910_device, address_data_w) | |
| 168 | 168 | ADDRESS_MAP_END |
| 169 | 169 | |
| 170 | 170 |
| r22781 | r22782 | |
|---|---|---|
| 1334 | 1334 | DRIVER_INIT_MEMBER(segag80v_state,zektor) |
| 1335 | 1335 | { |
| 1336 | 1336 | address_space &iospace = m_maincpu->space(AS_IO); |
| 1337 | device | |
| 1337 | ay8910_device *ay8910 = machine().device<ay8910_device>("aysnd"); | |
| 1338 | 1338 | |
| 1339 | 1339 | /* configure security */ |
| 1340 | 1340 | m_decrypt = segag80_security(82); |
| r22781 | r22782 | |
| 1343 | 1343 | m_usb = NULL; |
| 1344 | 1344 | iospace.install_legacy_write_handler(*machine().device("segaspeech"), 0x38, 0x38, FUNC(sega_speech_data_w)); |
| 1345 | 1345 | iospace.install_legacy_write_handler(*machine().device("segaspeech"), 0x3b, 0x3b, FUNC(sega_speech_control_w)); |
| 1346 | iospace.install_ | |
| 1346 | iospace.install_write_handler(0x3c, 0x3d, write8_delegate(FUNC(ay8910_device::address_data_w), ay8910)); | |
| 1347 | 1347 | iospace.install_write_handler(0x3e, 0x3e, write8_delegate(FUNC(segag80v_state::zektor1_sh_w),this)); |
| 1348 | 1348 | iospace.install_write_handler(0x3f, 0x3f, write8_delegate(FUNC(segag80v_state::zektor2_sh_w),this)); |
| 1349 | 1349 |
| r22781 | r22782 | |
|---|---|---|
| 557 | 557 | AM_RANGE(0x0080, 0x0fff) AM_NOP |
| 558 | 558 | AM_RANGE(0x1000, 0x1000) AM_MIRROR(0x0fff) AM_READ(soundlatch_byte_r) AM_WRITE(audio_1_answer_w) |
| 559 | 559 | AM_RANGE(0x2000, 0x2000) AM_MIRROR(0x0fff) AM_READ_PORT("SW3") |
| 560 | AM_RANGE(0x3000, 0x3000) AM_MIRROR(0x0ffc) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 561 | AM_RANGE(0x3000, 0x3001) AM_MIRROR(0x0ffc) AM_DEVWRITE_LEGACY("ay1", ay8910_data_address_w) | |
| 562 | AM_RANGE(0x3002, 0x3002) AM_MIRROR(0x0ffc) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 563 | AM_RANGE(0x3002, 0x3003) AM_MIRROR(0x0ffc) AM_DEVWRITE_LEGACY("ay2", ay8910_data_address_w) | |
| 560 | AM_RANGE(0x3000, 0x3000) AM_MIRROR(0x0ffc) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 561 | AM_RANGE(0x3000, 0x3001) AM_MIRROR(0x0ffc) AM_DEVWRITE("ay1", ay8910_device, data_address_w) | |
| 562 | AM_RANGE(0x3002, 0x3002) AM_MIRROR(0x0ffc) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 563 | AM_RANGE(0x3002, 0x3003) AM_MIRROR(0x0ffc) AM_DEVWRITE("ay2", ay8910_device, data_address_w) | |
| 564 | 564 | AM_RANGE(0x4000, 0x4fff) AM_NOP |
| 565 | 565 | AM_RANGE(0x5000, 0x57ff) AM_MIRROR(0x0800) AM_ROM |
| 566 | 566 | AM_RANGE(0x6000, 0x67ff) AM_MIRROR(0x0800) AM_ROM |
| r22781 | r22782 | |
| 573 | 573 | AM_RANGE(0x0000, 0x007f) AM_RAM /* internal RAM */ |
| 574 | 574 | AM_RANGE(0x0080, 0x0fff) AM_NOP |
| 575 | 575 | AM_RANGE(0x1000, 0x1000) AM_MIRROR(0x0fff) AM_READ(soundlatch2_byte_r) |
| 576 | AM_RANGE(0x2000, 0x2000) AM_MIRROR(0x0ffe) AM_DEVREAD_LEGACY("ay3", ay8910_r) | |
| 577 | AM_RANGE(0x2000, 0x2001) AM_MIRROR(0x0ffe) AM_DEVWRITE_LEGACY("ay3", ay8910_data_address_w) | |
| 576 | AM_RANGE(0x2000, 0x2000) AM_MIRROR(0x0ffe) AM_DEVREAD("ay3", ay8910_device, data_r) | |
| 577 | AM_RANGE(0x2000, 0x2001) AM_MIRROR(0x0ffe) AM_DEVWRITE("ay3", ay8910_device, data_address_w) | |
| 578 | 578 | AM_RANGE(0x3000, 0x6fff) AM_NOP |
| 579 | 579 | AM_RANGE(0x7000, 0x77ff) AM_MIRROR(0x0800) AM_ROM |
| 580 | 580 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 227 | 227 | AM_RANGE(0x04, 0x04) AM_DEVWRITE("crtc", mc6845_device, address_w) |
| 228 | 228 | AM_RANGE(0x05, 0x05) AM_WRITE(lamps_w) |
| 229 | 229 | AM_RANGE(0x14, 0x14) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w) |
| 230 | AM_RANGE(0x17, 0x17) AM_DEVWRITE | |
| 230 | AM_RANGE(0x17, 0x17) AM_DEVWRITE("ay8910", ay8910_device, data_w) | |
| 231 | 231 | AM_RANGE(0x24, 0x24) AM_WRITE(banksel_w) |
| 232 | AM_RANGE(0x27, 0x27) AM_DEVREAD_LEGACY("ay8910", ay8910_r) | |
| 233 | AM_RANGE(0x37, 0x37) AM_DEVWRITE_LEGACY("ay8910", ay8910_address_w) | |
| 232 | AM_RANGE(0x27, 0x27) AM_DEVREAD("ay8910", ay8910_device, data_r) | |
| 233 | AM_RANGE(0x37, 0x37) AM_DEVWRITE("ay8910", ay8910_device, address_w) | |
| 234 | 234 | ADDRESS_MAP_END |
| 235 | 235 | |
| 236 | 236 | /* |
| r22781 | r22782 | |
|---|---|---|
| 686 | 686 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 687 | 687 | AM_RANGE(0x90, 0x93) AM_DEVREADWRITE("ctc", z80ctc_device, read, write) |
| 688 | 688 | AM_RANGE(0x97, 0x97) AM_READ(soundlatch_byte_r) |
| 689 | AM_RANGE(0x98, 0x98) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 690 | AM_RANGE(0x98, 0x98) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 691 | AM_RANGE(0x9a, 0x9a) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 689 | AM_RANGE(0x98, 0x98) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 690 | AM_RANGE(0x98, 0x98) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 691 | AM_RANGE(0x9a, 0x9a) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 692 | 692 | ADDRESS_MAP_END |
| 693 | 693 | |
| 694 | 694 |
| r22781 | r22782 | |
|---|---|---|
| 111 | 111 | |
| 112 | 112 | static ADDRESS_MAP_START( megazone_sound_io_map, AS_IO, 8, megazone_state ) |
| 113 | 113 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 114 | AM_RANGE(0x00, 0x00) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 115 | AM_RANGE(0x00, 0x02) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 116 | AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 114 | AM_RANGE(0x00, 0x00) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 115 | AM_RANGE(0x00, 0x02) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 116 | AM_RANGE(0x02, 0x02) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 117 | 117 | ADDRESS_MAP_END |
| 118 | 118 | |
| 119 | 119 | static ADDRESS_MAP_START( megazone_i8039_map, AS_PROGRAM, 8, megazone_state ) |
| r22781 | r22782 | |
|---|---|---|
| 220 | 220 | static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, sbowling_state ) |
| 221 | 221 | AM_RANGE(0x0000, 0x2fff) AM_ROM |
| 222 | 222 | AM_RANGE(0x8000, 0xbfff) AM_RAM_WRITE(sbw_videoram_w) AM_SHARE("videoram") |
| 223 | AM_RANGE(0xf800, 0xf801) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 224 | AM_RANGE(0xf801, 0xf801) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 223 | AM_RANGE(0xf800, 0xf801) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 224 | AM_RANGE(0xf801, 0xf801) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 225 | 225 | AM_RANGE(0xfc00, 0xffff) AM_RAM |
| 226 | 226 | ADDRESS_MAP_END |
| 227 | 227 |
| r22781 | r22782 | |
|---|---|---|
| 68 | 68 | |
| 69 | 69 | WRITE8_MEMBER(kncljoe_state::m6803_port2_w) |
| 70 | 70 | { |
| 71 | device | |
| 71 | ay8910_device *ay8910 = machine().device<ay8910_device>("aysnd"); | |
| 72 | 72 | |
| 73 | 73 | /* write latch */ |
| 74 | 74 | if ((m_port2 & 0x01) && !(data & 0x01)) |
| 75 | 75 | { |
| 76 | 76 | /* control or data port? */ |
| 77 | 77 | if (m_port2 & 0x08) |
| 78 | ay8910 | |
| 78 | ay8910->data_address_w(space, m_port2 >> 2, m_port1); | |
| 79 | 79 | } |
| 80 | 80 | m_port2 = data; |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | READ8_MEMBER(kncljoe_state::m6803_port1_r) |
| 84 | 84 | { |
| 85 | device | |
| 85 | ay8910_device *ay8910 = machine().device<ay8910_device>("aysnd"); | |
| 86 | 86 | |
| 87 | 87 | if (m_port2 & 0x08) |
| 88 | return ay8910_r( | |
| 88 | return ay8910->data_r(space, 0); | |
| 89 | 89 | return 0xff; |
| 90 | 90 | } |
| 91 | 91 |
| r22781 | r22782 | |
|---|---|---|
| 305 | 305 | |
| 306 | 306 | static ADDRESS_MAP_START( rblaster_sound_map, AS_PROGRAM, 8, deco_ld_state ) |
| 307 | 307 | AM_RANGE(0x0000, 0x01ff) AM_RAM |
| 308 | AM_RANGE(0x2000, 0x2000) AM_DEVWRITE_LEGACY("ay1", ay8910_data_w) | |
| 309 | AM_RANGE(0x4000, 0x4000) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) | |
| 310 | AM_RANGE(0x6000, 0x6000) AM_DEVWRITE_LEGACY("ay2", ay8910_data_w) | |
| 311 | AM_RANGE(0x8000, 0x8000) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) | |
| 308 | AM_RANGE(0x2000, 0x2000) AM_DEVWRITE("ay1", ay8910_device, data_w) | |
| 309 | AM_RANGE(0x4000, 0x4000) AM_DEVWRITE("ay1", ay8910_device, address_w) | |
| 310 | AM_RANGE(0x6000, 0x6000) AM_DEVWRITE("ay2", ay8910_device, data_w) | |
| 311 | AM_RANGE(0x8000, 0x8000) AM_DEVWRITE("ay2", ay8910_device, address_w) | |
| 312 | 312 | AM_RANGE(0xa000, 0xa000) AM_READWRITE(soundlatch_byte_r,soundlatch2_byte_w) |
| 313 | 313 | AM_RANGE(0xe000, 0xffff) AM_ROM |
| 314 | 314 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 396 | 396 | AM_RANGE(0xe001, 0xe001) AM_READ(soundlatch_byte_r) |
| 397 | 397 | AM_RANGE(0xe003, 0xe003) AM_DEVWRITE("k005289", k005289_device, k005289_keylatch_A_w) |
| 398 | 398 | AM_RANGE(0xe004, 0xe004) AM_DEVWRITE("k005289", k005289_device, k005289_keylatch_B_w) |
| 399 | AM_RANGE(0xe005, 0xe005) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) | |
| 400 | AM_RANGE(0xe006, 0xe006) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) | |
| 401 | AM_RANGE(0xe086, 0xe086) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 402 | AM_RANGE(0xe106, 0xe106) AM_DEVWRITE_LEGACY("ay1", ay8910_data_w) | |
| 403 | AM_RANGE(0xe205, 0xe205) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 404 | AM_RANGE(0xe405, 0xe405) AM_DEVWRITE_LEGACY("ay2", ay8910_data_w) | |
| 399 | AM_RANGE(0xe005, 0xe005) AM_DEVWRITE("ay2", ay8910_device, address_w) | |
| 400 | AM_RANGE(0xe006, 0xe006) AM_DEVWRITE("ay1", ay8910_device, address_w) | |
| 401 | AM_RANGE(0xe086, 0xe086) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 402 | AM_RANGE(0xe106, 0xe106) AM_DEVWRITE("ay1", ay8910_device, data_w) | |
| 403 | AM_RANGE(0xe205, 0xe205) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 404 | AM_RANGE(0xe405, 0xe405) AM_DEVWRITE("ay2", ay8910_device, data_w) | |
| 405 | 405 | ADDRESS_MAP_END |
| 406 | 406 | |
| 407 | 407 | static ADDRESS_MAP_START( gx400_sound_map, AS_PROGRAM, 8, nemesis_state ) |
| r22781 | r22782 | |
| 413 | 413 | AM_RANGE(0xe001, 0xe001) AM_READ(soundlatch_byte_r) |
| 414 | 414 | AM_RANGE(0xe003, 0xe003) AM_DEVWRITE("k005289", k005289_device, k005289_keylatch_A_w) |
| 415 | 415 | AM_RANGE(0xe004, 0xe004) AM_DEVWRITE("k005289", k005289_device, k005289_keylatch_B_w) |
| 416 | AM_RANGE(0xe005, 0xe005) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) | |
| 417 | AM_RANGE(0xe006, 0xe006) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) | |
| 416 | AM_RANGE(0xe005, 0xe005) AM_DEVWRITE("ay2", ay8910_device, address_w) | |
| 417 | AM_RANGE(0xe006, 0xe006) AM_DEVWRITE("ay1", ay8910_device, address_w) | |
| 418 | 418 | AM_RANGE(0xe030, 0xe030) AM_WRITE(gx400_speech_start_w) |
| 419 | AM_RANGE(0xe086, 0xe086) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 420 | AM_RANGE(0xe106, 0xe106) AM_DEVWRITE_LEGACY("ay1", ay8910_data_w) | |
| 421 | AM_RANGE(0xe205, 0xe205) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 422 | AM_RANGE(0xe405, 0xe405) AM_DEVWRITE_LEGACY("ay2", ay8910_data_w) | |
| 419 | AM_RANGE(0xe086, 0xe086) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 420 | AM_RANGE(0xe106, 0xe106) AM_DEVWRITE("ay1", ay8910_device, data_w) | |
| 421 | AM_RANGE(0xe205, 0xe205) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 422 | AM_RANGE(0xe405, 0xe405) AM_DEVWRITE("ay2", ay8910_device, data_w) | |
| 423 | 423 | ADDRESS_MAP_END |
| 424 | 424 | |
| 425 | 425 | /******************************************************************************/ |
| r22781 | r22782 | |
|---|---|---|
| 63 | 63 | AM_RANGE(0x0000, 0x0fff) AM_ROM |
| 64 | 64 | AM_RANGE(0x2000, 0x2fff) AM_RAM |
| 65 | 65 | AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r) AM_WRITE(sound_nmi_mask_w) |
| 66 | AM_RANGE(0x4000, 0x4001) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 67 | AM_RANGE(0x5000, 0x5001) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 68 | AM_RANGE(0x6000, 0x6001) AM_DEVWRITE_LEGACY("ay3", ay8910_address_data_w) | |
| 66 | AM_RANGE(0x4000, 0x4001) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 67 | AM_RANGE(0x5000, 0x5001) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 68 | AM_RANGE(0x6000, 0x6001) AM_DEVWRITE("ay3", ay8910_device, address_data_w) | |
| 69 | 69 | ADDRESS_MAP_END |
| 70 | 70 | |
| 71 | 71 |
| r22781 | r22782 | |
|---|---|---|
| 149 | 149 | AM_RANGE(0x0000, 0xbfff) AM_ROM |
| 150 | 150 | AM_RANGE(0xc000, 0xc7ff) AM_RAM |
| 151 | 151 | AM_RANGE(0xc800, 0xc801) AM_WRITENOP |
| 152 | AM_RANGE(0xc802, 0xc803) AM_DEVWRITE | |
| 152 | AM_RANGE(0xc802, 0xc803) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 153 | 153 | AM_RANGE(0xc900, 0xc90d) AM_DEVWRITE_LEGACY("msm", msm5232_w) |
| 154 | 154 | AM_RANGE(0xca00, 0xca00) AM_WRITENOP |
| 155 | 155 | AM_RANGE(0xcb00, 0xcb00) AM_WRITENOP |
| r22781 | r22782 | |
|---|---|---|
| 267 | 267 | |
| 268 | 268 | static ADDRESS_MAP_START( sound_cpu, AS_PROGRAM, 8, progolf_state ) |
| 269 | 269 | AM_RANGE(0x0000, 0x0fff) AM_RAM |
| 270 | AM_RANGE(0x4000, 0x4fff) AM_DEVREADWRITE_LEGACY("ay1", ay8910_r, ay8910_data_w) | |
| 271 | AM_RANGE(0x5000, 0x5fff) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) | |
| 272 | AM_RANGE(0x6000, 0x6fff) AM_DEVREADWRITE_LEGACY("ay2", ay8910_r, ay8910_data_w) | |
| 273 | AM_RANGE(0x7000, 0x7fff) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) | |
| 270 | AM_RANGE(0x4000, 0x4fff) AM_DEVREADWRITE("ay1", ay8910_device, data_r, data_w) | |
| 271 | AM_RANGE(0x5000, 0x5fff) AM_DEVWRITE("ay1", ay8910_device, address_w) | |
| 272 | AM_RANGE(0x6000, 0x6fff) AM_DEVREADWRITE("ay2", ay8910_device, data_r, data_w) | |
| 273 | AM_RANGE(0x7000, 0x7fff) AM_DEVWRITE("ay2", ay8910_device, address_w) | |
| 274 | 274 | AM_RANGE(0x8000, 0x8fff) AM_READ(audio_command_r) AM_WRITENOP //volume control? |
| 275 | 275 | AM_RANGE(0xf000, 0xffff) AM_ROM |
| 276 | 276 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 98 | 98 | AM_RANGE(0x4001, 0x4001) AM_READ_PORT("DSW2") AM_WRITE(btime_video_control_w) |
| 99 | 99 | AM_RANGE(0x4002, 0x4002) AM_READ_PORT("P1") |
| 100 | 100 | AM_RANGE(0x4003, 0x4003) AM_READ_PORT("P2") |
| 101 | AM_RANGE(0x4004, 0x4005) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) AM_READ(scregg_irqack_r) | |
| 102 | AM_RANGE(0x4006, 0x4007) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 101 | AM_RANGE(0x4004, 0x4005) AM_DEVWRITE("ay1", ay8910_device, address_data_w) AM_READ(scregg_irqack_r) | |
| 102 | AM_RANGE(0x4006, 0x4007) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 103 | 103 | AM_RANGE(0xa000, 0xffff) AM_ROM |
| 104 | 104 | ADDRESS_MAP_END |
| 105 | 105 | |
| r22781 | r22782 | |
| 114 | 114 | AM_RANGE(0x2001, 0x2001) AM_READ_PORT("DSW2") AM_WRITE(scregg_irqack_w) |
| 115 | 115 | AM_RANGE(0x2002, 0x2002) AM_READ_PORT("P1") |
| 116 | 116 | AM_RANGE(0x2003, 0x2003) AM_READ_PORT("P2") |
| 117 | AM_RANGE(0x2004, 0x2005) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) AM_READ(scregg_irqack_r) | |
| 118 | AM_RANGE(0x2006, 0x2007) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 117 | AM_RANGE(0x2004, 0x2005) AM_DEVWRITE("ay1", ay8910_device, address_data_w) AM_READ(scregg_irqack_r) | |
| 118 | AM_RANGE(0x2006, 0x2007) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 119 | 119 | AM_RANGE(0x3000, 0x7fff) AM_ROM |
| 120 | 120 | AM_RANGE(0xf000, 0xffff) AM_ROM /* reset/interrupt vectors */ |
| 121 | 121 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 394 | 394 | AM_RANGE(0x2A01, 0x2A01) AM_READWRITE(mux_ctrl_r,mux_ctrl_w)// mux status register |
| 395 | 395 | AM_RANGE(0x2E00, 0x2E00) AM_READ(irqlatch_r) // irq latch ( MC6850 / timer ) |
| 396 | 396 | |
| 397 | AM_RANGE(0x3000, 0x3000) AM_DEVWRITE | |
| 397 | AM_RANGE(0x3000, 0x3000) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 398 | 398 | AM_RANGE(0x3001, 0x3001) AM_READNOP //sound latch |
| 399 | AM_RANGE(0x3200, 0x3200) AM_DEVWRITE | |
| 399 | AM_RANGE(0x3200, 0x3200) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 400 | 400 | |
| 401 | 401 | AM_RANGE(0x3402, 0x3402) AM_DEVWRITE("acia6850_0", acia6850_device, control_write) |
| 402 | 402 | AM_RANGE(0x3403, 0x3403) AM_DEVWRITE("acia6850_0", acia6850_device, data_write) |
| r22781 | r22782 | |
|---|---|---|
| 91 | 91 | static ADDRESS_MAP_START( kingobox_sound_io_map, AS_IO, 8, kingofb_state ) |
| 92 | 92 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 93 | 93 | AM_RANGE(0x00, 0x00) AM_DEVWRITE("dac", dac_device, write_unsigned8) |
| 94 | AM_RANGE(0x08, 0x08) AM_DEVREADWRITE_LEGACY("aysnd", ay8910_r, ay8910_data_w) | |
| 95 | AM_RANGE(0x0c, 0x0c) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 94 | AM_RANGE(0x08, 0x08) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, data_w) | |
| 95 | AM_RANGE(0x0c, 0x0c) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 96 | 96 | ADDRESS_MAP_END |
| 97 | 97 | |
| 98 | 98 | /* Ring King */ |
| r22781 | r22782 | |
| 136 | 136 | static ADDRESS_MAP_START( ringking_sound_io_map, AS_IO, 8, kingofb_state ) |
| 137 | 137 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 138 | 138 | AM_RANGE(0x00, 0x00) AM_DEVWRITE("dac", dac_device, write_unsigned8) |
| 139 | AM_RANGE(0x02, 0x02) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 140 | AM_RANGE(0x02, 0x03) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 139 | AM_RANGE(0x02, 0x02) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 140 | AM_RANGE(0x02, 0x03) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 141 | 141 | ADDRESS_MAP_END |
| 142 | 142 | |
| 143 | 143 |
| r22781 | r22782 | |
|---|---|---|
| 175 | 175 | |
| 176 | 176 | static ADDRESS_MAP_START( z80_io_map, AS_IO, 8, tsamurai_state ) |
| 177 | 177 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 178 | AM_RANGE(0x00, 0x01) AM_DEVWRITE | |
| 178 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 179 | 179 | ADDRESS_MAP_END |
| 180 | 180 | |
| 181 | 181 | static ADDRESS_MAP_START( z80_m660_io_map, AS_IO, 8, tsamurai_state ) |
| r22781 | r22782 | |
| 187 | 187 | |
| 188 | 188 | static ADDRESS_MAP_START( vsgongf_audio_io_map, AS_IO, 8, tsamurai_state ) |
| 189 | 189 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 190 | AM_RANGE(0x00, 0x01) AM_DEVWRITE | |
| 190 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 191 | 191 | ADDRESS_MAP_END |
| 192 | 192 | |
| 193 | 193 | READ8_MEMBER(tsamurai_state::sound_command1_r) |
| r22781 | r22782 | |
| 256 | 256 | |
| 257 | 257 | static ADDRESS_MAP_START( sound3_m660_io_map, AS_IO, 8, tsamurai_state ) |
| 258 | 258 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 259 | AM_RANGE(0x00, 0x01) AM_DEVWRITE | |
| 259 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 260 | 260 | ADDRESS_MAP_END |
| 261 | 261 | |
| 262 | 262 | /*******************************************************************************/ |
| r22781 | r22782 | |
|---|---|---|
| 120 | 120 | /* special case to return the value written to 0xb000 */ |
| 121 | 121 | /* does it reset the chips too ? */ |
| 122 | 122 | case 0: break; |
| 123 | case 0xc4: m_b000_ret = ay8910_r(machine().device("ay1"), space, 0); break; | |
| 124 | case 0x94: m_b000_ret = ay8910_r(machine().device("ay2"), space, 0); break; | |
| 125 | case 0x86: m_b000_ret = ay8910_r(machine().device("ay3"), space, 0); break; | |
| 123 | case 0xc4: m_b000_ret = machine().device<ay8910_device>("ay1")->data_r(space, 0); break; | |
| 124 | case 0x94: m_b000_ret = machine().device<ay8910_device>("ay2")->data_r(space, 0); break; | |
| 125 | case 0x86: m_b000_ret = machine().device<ay8910_device>("ay3")->data_r(space, 0); break; | |
| 126 | 126 | |
| 127 | 127 | case 0x80: |
| 128 | 128 | switch(m_b800_prev) |
| 129 | 129 | { |
| 130 | case 0xe0: ay8910_address_w(machine().device("ay1"),space,0,m_b000_val); break; | |
| 131 | case 0x98: ay8910_address_w(machine().device("ay2"),space,0,m_b000_val); break; | |
| 132 | case 0x83: ay8910_address_w(machine().device("ay3"),space,0,m_b000_val); break; | |
| 130 | case 0xe0: machine().device<ay8910_device>("ay1")->address_w(space,0,m_b000_val); break; | |
| 131 | case 0x98: machine().device<ay8910_device>("ay2")->address_w(space,0,m_b000_val); break; | |
| 132 | case 0x83: machine().device<ay8910_device>("ay3")->address_w(space,0,m_b000_val); break; | |
| 133 | 133 | |
| 134 | case 0xa0: ay8910_data_w(machine().device("ay1"),space,0,m_b000_val); break; | |
| 135 | case 0x88: ay8910_data_w(machine().device("ay2"),space,0,m_b000_val); break; | |
| 136 | case 0x81: ay8910_data_w(machine().device("ay3"),space,0,m_b000_val); break; | |
| 134 | case 0xa0: machine().device<ay8910_device>("ay1")->data_w(space,0,m_b000_val); break; | |
| 135 | case 0x88: machine().device<ay8910_device>("ay2")->data_w(space,0,m_b000_val); break; | |
| 136 | case 0x81: machine().device<ay8910_device>("ay3")->data_w(space,0,m_b000_val); break; | |
| 137 | 137 | |
| 138 | 138 | } |
| 139 | 139 | break; |
| r22781 | r22782 | |
|---|---|---|
| 277 | 277 | AM_RANGE(0x8006, 0x8006) AM_READ_PORT("SW2") |
| 278 | 278 | AM_RANGE(0x9000, 0x90ff) AM_RAM AM_SHARE("nvram") |
| 279 | 279 | AM_RANGE(0x9400, 0x9400) AM_READ(sdpoker_rng_r) |
| 280 | AM_RANGE(0x9800, 0x9801) AM_DEVWRITE | |
| 280 | AM_RANGE(0x9800, 0x9801) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 281 | 281 | ADDRESS_MAP_END |
| 282 | 282 | |
| 283 | 283 |
| r22781 | r22782 | |
|---|---|---|
| 575 | 575 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 576 | 576 | AM_RANGE(0x00, 0x00) AM_WRITE(int_ack_w) // comm out (1st Z80). seems to write here the value previously read through soundlatch (port 0x02). |
| 577 | 577 | AM_RANGE(0x02, 0x02) AM_READ(soundlatch_byte_r) |
| 578 | AM_RANGE(0x04, 0x04) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 579 | AM_RANGE(0x04, 0x05) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 578 | AM_RANGE(0x04, 0x04) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 579 | AM_RANGE(0x04, 0x05) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 580 | 580 | ADDRESS_MAP_END |
| 581 | 581 | |
| 582 | 582 |
| r22781 | r22782 | |
|---|---|---|
| 91 | 91 | |
| 92 | 92 | static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, aeroboto_state ) |
| 93 | 93 | AM_RANGE(0x0000, 0x0fff) AM_RAM |
| 94 | AM_RANGE(0x9000, 0x9001) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 95 | AM_RANGE(0x9002, 0x9002) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 96 | AM_RANGE(0xa000, 0xa001) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 97 | AM_RANGE(0xa002, 0xa002) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 94 | AM_RANGE(0x9000, 0x9001) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 95 | AM_RANGE(0x9002, 0x9002) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 96 | AM_RANGE(0xa000, 0xa001) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 97 | AM_RANGE(0xa002, 0xa002) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 98 | 98 | AM_RANGE(0xf000, 0xffff) AM_ROM |
| 99 | 99 | ADDRESS_MAP_END |
| 100 | 100 |
| r22781 | r22782 | |
|---|---|---|
| 108 | 108 | AM_RANGE(0x0000, 0x03ff) AM_MIRROR(0x1c00) AM_RAM |
| 109 | 109 | AM_RANGE(0x6000, 0x6003) AM_MIRROR(0x1ffc) AM_RAM /* unknown device in an epoxy block, might be tilt detection */ |
| 110 | 110 | AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x1ffc) AM_READ(madalien_sound_command_r) |
| 111 | AM_RANGE(0x8000, 0x8001) AM_MIRROR(0x1ffc) AM_DEVWRITE | |
| 111 | AM_RANGE(0x8000, 0x8001) AM_MIRROR(0x1ffc) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 112 | 112 | AM_RANGE(0x8002, 0x8002) AM_MIRROR(0x1ffc) AM_WRITE(soundlatch2_byte_w) |
| 113 | 113 | AM_RANGE(0xf800, 0xffff) AM_ROM |
| 114 | 114 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 37 | 37 | |
| 38 | 38 | optional_device<roc10937_t> m_vfd; |
| 39 | 39 | |
| 40 | DECLARE_WRITE8_MEMBER( ay_w0 ) { ay8910_address_data_w(m_ay, space, 0, data); } | |
| 41 | DECLARE_WRITE8_MEMBER( ay_w1 ) { ay8910_address_data_w(m_ay, space, 1, data); } | |
| 40 | DECLARE_WRITE8_MEMBER( ay_w0 ) { m_ay->address_data_w(space, 0, data); } | |
| 41 | DECLARE_WRITE8_MEMBER( ay_w1 ) { m_ay->address_data_w(space, 1, data); } | |
| 42 | 42 | |
| 43 | 43 | DECLARE_WRITE8_MEMBER( ctc_w0 ) { m_z80ctc->write(space, 0, data); } |
| 44 | 44 | DECLARE_WRITE8_MEMBER( ctc_w1 ) { m_z80ctc->write(space, 1, data); } |
| r22781 | r22782 | |
| 75 | 75 | DECLARE_WRITE8_MEMBER( pio5_w2 ) { m_z80pio_5->write(space, 2, data); } |
| 76 | 76 | DECLARE_WRITE8_MEMBER( pio5_w3 ) { m_z80pio_5->write(space, 3, data); } |
| 77 | 77 | |
| 78 | DECLARE_READ8_MEMBER( ay_r0 ) { return ay | |
| 78 | DECLARE_READ8_MEMBER( ay_r0 ) { return m_ay->data_r(space, 0); } | |
| 79 | 79 | |
| 80 | 80 | DECLARE_READ8_MEMBER( ctc_r0 ) { return m_z80ctc->read(space, 0); } |
| 81 | 81 | DECLARE_READ8_MEMBER( ctc_r1 ) { return m_z80ctc->read(space, 1); } |
| r22781 | r22782 | |
|---|---|---|
| 315 | 315 | static ADDRESS_MAP_START( flipjack_sound_map, AS_PROGRAM, 8, flipjack_state ) |
| 316 | 316 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 317 | 317 | AM_RANGE(0x2000, 0x27ff) AM_RAM |
| 318 | AM_RANGE(0x4000, 0x4000) AM_DEVREADWRITE_LEGACY("ay2", ay8910_r, ay8910_data_w) | |
| 319 | AM_RANGE(0x6000, 0x6000) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) | |
| 320 | AM_RANGE(0x8000, 0x8000) AM_DEVREADWRITE_LEGACY("ay1", ay8910_r, ay8910_data_w) | |
| 321 | AM_RANGE(0xa000, 0xa000) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) | |
| 318 | AM_RANGE(0x4000, 0x4000) AM_DEVREADWRITE("ay2", ay8910_device, data_r, data_w) | |
| 319 | AM_RANGE(0x6000, 0x6000) AM_DEVWRITE("ay2", ay8910_device, address_w) | |
| 320 | AM_RANGE(0x8000, 0x8000) AM_DEVREADWRITE("ay1", ay8910_device, data_r, data_w) | |
| 321 | AM_RANGE(0xa000, 0xa000) AM_DEVWRITE("ay1", ay8910_device, address_w) | |
| 322 | 322 | ADDRESS_MAP_END |
| 323 | 323 | |
| 324 | 324 | static ADDRESS_MAP_START( flipjack_sound_io_map, AS_IO, 8, flipjack_state ) |
| r22781 | r22782 | |
| 407 | 407 | }; |
| 408 | 408 | |
| 409 | 409 | |
| 410 | static | |
| 410 | static const ay8910_interface ay8910_config_1 = | |
| 411 | 411 | { |
| 412 | 412 | AY8910_LEGACY_OUTPUT, /* Flags */ |
| 413 | 413 | AY8910_DEFAULT_LOADS, /* Load on channel in ohms */ |
| r22781 | r22782 | |
| 417 | 417 | DEVCB_NULL /* Port B write */ |
| 418 | 418 | }; |
| 419 | 419 | |
| 420 | static | |
| 420 | static const ay8910_interface ay8910_config_2 = | |
| 421 | 421 | { |
| 422 | 422 | AY8910_LEGACY_OUTPUT, /* Flags */ |
| 423 | 423 | AY8910_DEFAULT_LOADS, /* Load on channel in ohms */ |
| r22781 | r22782 | |
|---|---|---|
| 49 | 49 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 50 | 50 | AM_RANGE(0xe000, 0xefff) AM_RAM |
| 51 | 51 | AM_RANGE(0xf000, 0xf0fb) AM_READ_LEGACY(tms9995_internal1_r) |
| 52 | AM_RANGE(0xffec, 0xffed) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 53 | AM_RANGE(0xffee, 0xffef) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 52 | AM_RANGE(0xffec, 0xffed) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 53 | AM_RANGE(0xffee, 0xffef) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 54 | 54 | AM_RANGE(0xfffc, 0xffff) AM_READ_LEGACY(tms9995_internal2_r) |
| 55 | 55 | ADDRESS_MAP_END |
| 56 | 56 |
| r22781 | r22782 | |
|---|---|---|
| 110 | 110 | |
| 111 | 111 | static ADDRESS_MAP_START( pbaction_sound_io_map, AS_IO, 8, pbaction_state ) |
| 112 | 112 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 113 | AM_RANGE(0x10, 0x11) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 114 | AM_RANGE(0x20, 0x21) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 115 | AM_RANGE(0x30, 0x31) AM_DEVWRITE_LEGACY("ay3", ay8910_address_data_w) | |
| 113 | AM_RANGE(0x10, 0x11) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 114 | AM_RANGE(0x20, 0x21) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 115 | AM_RANGE(0x30, 0x31) AM_DEVWRITE("ay3", ay8910_device, address_data_w) | |
| 116 | 116 | ADDRESS_MAP_END |
| 117 | 117 | |
| 118 | 118 |
| r22781 | r22782 | |
|---|---|---|
| 925 | 925 | AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram") |
| 926 | 926 | AM_RANGE(0x0800, 0x0803) AM_DEVREADWRITE("pia0", pia6821_device, read, write) |
| 927 | 927 | AM_RANGE(0x0a00, 0x0a03) AM_DEVREADWRITE("pia1", pia6821_device, read, write) |
| 928 | AM_RANGE(0x0c00, 0x0c00) AM_DEVREAD_LEGACY("ay8910", ay8910_r) | |
| 929 | AM_RANGE(0x0c00, 0x0c01) AM_DEVWRITE_LEGACY("ay8910", ay8910_address_data_w) | |
| 928 | AM_RANGE(0x0c00, 0x0c00) AM_DEVREAD("ay8910", ay8910_device, data_r) | |
| 929 | AM_RANGE(0x0c00, 0x0c01) AM_DEVWRITE("ay8910", ay8910_device, address_data_w) | |
| 930 | 930 | AM_RANGE(0x0e00, 0x0e00) AM_DEVWRITE("crtc", mc6845_device, address_w) |
| 931 | 931 | AM_RANGE(0x0e01, 0x0e01) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w) |
| 932 | 932 | AM_RANGE(0x2000, 0x2fff) AM_RAM_WRITE(funworld_videoram_w) AM_SHARE("videoram") |
| r22781 | r22782 | |
| 959 | 959 | AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram") |
| 960 | 960 | AM_RANGE(0x0800, 0x0803) AM_DEVREADWRITE("pia0", pia6821_device, read, write) |
| 961 | 961 | AM_RANGE(0x0a00, 0x0a03) AM_DEVREADWRITE("pia1", pia6821_device, read, write) |
| 962 | AM_RANGE(0x0c00, 0x0c00) AM_DEVREAD_LEGACY("ay8910", ay8910_r) | |
| 963 | AM_RANGE(0x0c00, 0x0c01) AM_DEVWRITE_LEGACY("ay8910", ay8910_address_data_w) | |
| 962 | AM_RANGE(0x0c00, 0x0c00) AM_DEVREAD("ay8910", ay8910_device, data_r) | |
| 963 | AM_RANGE(0x0c00, 0x0c01) AM_DEVWRITE("ay8910", ay8910_device, address_data_w) | |
| 964 | 964 | AM_RANGE(0x0e00, 0x0e00) AM_DEVWRITE("crtc", mc6845_device, address_w) |
| 965 | 965 | AM_RANGE(0x0e01, 0x0e01) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w) |
| 966 | 966 | |
| r22781 | r22782 | |
| 977 | 977 | AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram") |
| 978 | 978 | AM_RANGE(0x0800, 0x0803) AM_DEVREADWRITE("pia0", pia6821_device, read, write) |
| 979 | 979 | AM_RANGE(0x0a00, 0x0a03) AM_DEVREADWRITE("pia1", pia6821_device, read, write) |
| 980 | AM_RANGE(0x0c00, 0x0c00) AM_DEVREAD_LEGACY("ay8910", ay8910_r) | |
| 981 | AM_RANGE(0x0c00, 0x0c01) AM_DEVWRITE_LEGACY("ay8910", ay8910_address_data_w) | |
| 980 | AM_RANGE(0x0c00, 0x0c00) AM_DEVREAD("ay8910", ay8910_device, data_r) | |
| 981 | AM_RANGE(0x0c00, 0x0c01) AM_DEVWRITE("ay8910", ay8910_device, address_data_w) | |
| 982 | 982 | AM_RANGE(0x0e00, 0x0e00) AM_DEVWRITE("crtc", mc6845_device, address_w) |
| 983 | 983 | AM_RANGE(0x0e01, 0x0e01) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w) |
| 984 | 984 | AM_RANGE(0x2c00, 0x2cff) AM_RAM /* range for protection */ |
| r22781 | r22782 | |
| 993 | 993 | AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram") |
| 994 | 994 | AM_RANGE(0x0800, 0x0803) AM_DEVREADWRITE("pia0", pia6821_device, read, write) |
| 995 | 995 | AM_RANGE(0x0a00, 0x0a03) AM_DEVREADWRITE("pia1", pia6821_device, read, write) |
| 996 | AM_RANGE(0x0c00, 0x0c00) AM_DEVREAD_LEGACY("ay8910", ay8910_r) | |
| 997 | AM_RANGE(0x0c00, 0x0c01) AM_DEVWRITE_LEGACY("ay8910", ay8910_address_data_w) | |
| 996 | AM_RANGE(0x0c00, 0x0c00) AM_DEVREAD("ay8910", ay8910_device, data_r) | |
| 997 | AM_RANGE(0x0c00, 0x0c01) AM_DEVWRITE("ay8910", ay8910_device, address_data_w) | |
| 998 | 998 | AM_RANGE(0x0e00, 0x0e00) AM_DEVWRITE("crtc", mc6845_device, address_w) |
| 999 | 999 | AM_RANGE(0x0e01, 0x0e01) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w) |
| 1000 | 1000 | AM_RANGE(0x2000, 0x2000) AM_READNOP /* some unknown reads */ |
| r22781 | r22782 | |
| 1011 | 1011 | AM_RANGE(0x081c, 0x081c) AM_DEVWRITE("crtc", mc6845_device, address_w) |
| 1012 | 1012 | AM_RANGE(0x081d, 0x081d) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w) |
| 1013 | 1013 | AM_RANGE(0x1000, 0x1000) AM_READ_PORT("IN2") |
| 1014 | AM_RANGE(0x1800, 0x1800) AM_DEVREAD_LEGACY("ay8910", ay8910_r) | |
| 1015 | AM_RANGE(0x1800, 0x1801) AM_DEVWRITE_LEGACY("ay8910", ay8910_address_data_w) | |
| 1014 | AM_RANGE(0x1800, 0x1800) AM_DEVREAD("ay8910", ay8910_device, data_r) | |
| 1015 | AM_RANGE(0x1800, 0x1801) AM_DEVWRITE("ay8910", ay8910_device, address_data_w) | |
| 1016 | 1016 | // AM_RANGE(0x2000, 0x2000) AM_READNOP /* some unknown reads... maybe a DSW */ |
| 1017 | 1017 | AM_RANGE(0x6000, 0x6fff) AM_RAM_WRITE(funworld_videoram_w) AM_SHARE("videoram") |
| 1018 | 1018 | AM_RANGE(0x7000, 0x7fff) AM_RAM_WRITE(funworld_colorram_w) AM_SHARE("colorram") |
| r22781 | r22782 | |
| 1036 | 1036 | AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram") |
| 1037 | 1037 | AM_RANGE(0x0800, 0x0803) AM_DEVREADWRITE("pia0", pia6821_device, read, write) |
| 1038 | 1038 | AM_RANGE(0x0a00, 0x0a03) AM_DEVREADWRITE("pia1", pia6821_device, read, write) |
| 1039 | AM_RANGE(0x0c00, 0x0c00) AM_DEVREAD_LEGACY("ay8910", ay8910_r) | |
| 1040 | AM_RANGE(0x0c00, 0x0c01) AM_DEVWRITE_LEGACY("ay8910", ay8910_address_data_w) | |
| 1039 | AM_RANGE(0x0c00, 0x0c00) AM_DEVREAD("ay8910", ay8910_device, data_r) | |
| 1040 | AM_RANGE(0x0c00, 0x0c01) AM_DEVWRITE("ay8910", ay8910_device, address_data_w) | |
| 1041 | 1041 | AM_RANGE(0x0e00, 0x0e00) AM_DEVWRITE("crtc", mc6845_device, address_w) |
| 1042 | 1042 | AM_RANGE(0x0e01, 0x0e01) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w) |
| 1043 | 1043 | AM_RANGE(0x4000, 0x4fff) AM_RAM_WRITE(funworld_videoram_w) AM_SHARE("videoram") |
| r22781 | r22782 | |
|---|---|---|
| 258 | 258 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 259 | 259 | AM_RANGE(0x2000, 0x23ff) AM_RAM |
| 260 | 260 | AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r) AM_WRITE(wiz_sound_nmi_mask_w) /* Stinger/Scion */ |
| 261 | AM_RANGE(0x4000, 0x4001) AM_DEVWRITE_LEGACY("8910.3", ay8910_address_data_w) | |
| 262 | AM_RANGE(0x5000, 0x5001) AM_DEVWRITE_LEGACY("8910.1", ay8910_address_data_w) | |
| 263 | AM_RANGE(0x6000, 0x6001) AM_DEVWRITE_LEGACY("8910.2", ay8910_address_data_w) /* Wiz only */ | |
| 261 | AM_RANGE(0x4000, 0x4001) AM_DEVWRITE("8910.3", ay8910_device, address_data_w) | |
| 262 | AM_RANGE(0x5000, 0x5001) AM_DEVWRITE("8910.1", ay8910_device, address_data_w) | |
| 263 | AM_RANGE(0x6000, 0x6001) AM_DEVWRITE("8910.2", ay8910_device, address_data_w) /* Wiz only */ | |
| 264 | 264 | AM_RANGE(0x7000, 0x7000) AM_READ(soundlatch_byte_r) AM_WRITE(wiz_sound_nmi_mask_w) /* Wiz */ |
| 265 | 265 | ADDRESS_MAP_END |
| 266 | 266 | |
| r22781 | r22782 | |
| 268 | 268 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 269 | 269 | AM_RANGE(0x2000, 0x23ff) AM_RAM |
| 270 | 270 | AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r) AM_WRITE(wiz_sound_nmi_mask_w) /* Stinger/Scion */ |
| 271 | AM_RANGE(0x5000, 0x5001) AM_DEVWRITE_LEGACY("8910.1", ay8910_address_data_w) | |
| 272 | AM_RANGE(0x6000, 0x6001) AM_DEVWRITE_LEGACY("8910.2", ay8910_address_data_w) /* Wiz only */ | |
| 271 | AM_RANGE(0x5000, 0x5001) AM_DEVWRITE("8910.1", ay8910_device, address_data_w) | |
| 272 | AM_RANGE(0x6000, 0x6001) AM_DEVWRITE("8910.2", ay8910_device, address_data_w) /* Wiz only */ | |
| 273 | 273 | AM_RANGE(0x7000, 0x7000) AM_READ(soundlatch_byte_r) AM_WRITE(wiz_sound_nmi_mask_w) /* Wiz */ |
| 274 | 274 | ADDRESS_MAP_END |
| 275 | 275 |
| r22781 | r22782 | |
|---|---|---|
| 168 | 168 | |
| 169 | 169 | static ADDRESS_MAP_START( lvcards_io_map, AS_IO, 8, lvcards_state ) |
| 170 | 170 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 171 | AM_RANGE(0x00, 0x00) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 172 | AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 171 | AM_RANGE(0x00, 0x00) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 172 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 173 | 173 | ADDRESS_MAP_END |
| 174 | 174 | |
| 175 | 175 | static ADDRESS_MAP_START( lvpoker_map, AS_PROGRAM, 8, lvcards_state ) |
| r22781 | r22782 | |
|---|---|---|
| 79 | 79 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 80 | 80 | AM_RANGE(0x00, 0x00) AM_READ_PORT("DSW") AM_WRITE(watchdog_reset_w) |
| 81 | 81 | AM_RANGE(0x01, 0x01) AM_READ_PORT("SYSTEM") AM_WRITE(epos_port_1_w) |
| 82 | AM_RANGE(0x02, 0x02) AM_READ_PORT("INPUTS") AM_DEVWRITE | |
| 82 | AM_RANGE(0x02, 0x02) AM_READ_PORT("INPUTS") AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 83 | 83 | AM_RANGE(0x03, 0x03) AM_READ_PORT("UNK") |
| 84 | AM_RANGE(0x06, 0x06) AM_DEVWRITE | |
| 84 | AM_RANGE(0x06, 0x06) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 85 | 85 | ADDRESS_MAP_END |
| 86 | 86 | |
| 87 | 87 | static ADDRESS_MAP_START( dealer_io_map, AS_IO, 8, epos_state ) |
| 88 | 88 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 89 | 89 | AM_RANGE(0x10, 0x13) AM_DEVREADWRITE("ppi8255", i8255_device, read, write) |
| 90 | 90 | AM_RANGE(0x20, 0x24) AM_WRITE(dealer_decrypt_rom) |
| 91 | AM_RANGE(0x34, 0x34) AM_DEVWRITE | |
| 91 | AM_RANGE(0x34, 0x34) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 92 | 92 | AM_RANGE(0x38, 0x38) AM_READ_PORT("DSW") |
| 93 | AM_RANGE(0x3C, 0x3C) AM_DEVWRITE | |
| 93 | AM_RANGE(0x3C, 0x3C) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 94 | 94 | AM_RANGE(0x40, 0x40) AM_WRITE(watchdog_reset_w) |
| 95 | 95 | ADDRESS_MAP_END |
| 96 | 96 |
| r22781 | r22782 | |
|---|---|---|
| 89 | 89 | AM_RANGE(0xf000, 0xf000) AM_READNOP AM_WRITENOP //??? |
| 90 | 90 | AM_RANGE(0xf001, 0xf001) AM_READ(input_1_r) AM_WRITE(output_0_w) |
| 91 | 91 | AM_RANGE(0xf002, 0xf002) AM_READ_PORT("IN0") AM_WRITE(output_1_w) |
| 92 | AM_RANGE(0xf800, 0xf801) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 93 | AM_RANGE(0xf801, 0xf801) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 92 | AM_RANGE(0xf800, 0xf801) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 93 | AM_RANGE(0xf801, 0xf801) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 94 | 94 | ADDRESS_MAP_END |
| 95 | 95 | |
| 96 | 96 |
| r22781 | r22782 | |
|---|---|---|
| 100 | 100 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 101 | 101 | AM_RANGE(0x8000, 0x87ff) AM_RAM |
| 102 | 102 | AM_RANGE(0x8800, 0x8800) AM_READ(aztarac_snd_command_r) |
| 103 | AM_RANGE(0x8c00, 0x8c01) AM_DEVREADWRITE_LEGACY("ay1", ay8910_r, ay8910_data_address_w) | |
| 104 | AM_RANGE(0x8c02, 0x8c03) AM_DEVREADWRITE_LEGACY("ay2", ay8910_r, ay8910_data_address_w) | |
| 105 | AM_RANGE(0x8c04, 0x8c05) AM_DEVREADWRITE_LEGACY("ay3", ay8910_r, ay8910_data_address_w) | |
| 106 | AM_RANGE(0x8c06, 0x8c07) AM_DEVREADWRITE_LEGACY("ay4", ay8910_r, ay8910_data_address_w) | |
| 103 | AM_RANGE(0x8c00, 0x8c01) AM_DEVREADWRITE("ay1", ay8910_device, data_r, data_address_w) | |
| 104 | AM_RANGE(0x8c02, 0x8c03) AM_DEVREADWRITE("ay2", ay8910_device, data_r, data_address_w) | |
| 105 | AM_RANGE(0x8c04, 0x8c05) AM_DEVREADWRITE("ay3", ay8910_device, data_r, data_address_w) | |
| 106 | AM_RANGE(0x8c06, 0x8c07) AM_DEVREADWRITE("ay4", ay8910_device, data_r, data_address_w) | |
| 107 | 107 | AM_RANGE(0x9000, 0x9000) AM_READWRITE(aztarac_snd_status_r, aztarac_snd_status_w) |
| 108 | 108 | ADDRESS_MAP_END |
| 109 | 109 |
| r22781 | r22782 | |
|---|---|---|
| 614 | 614 | |
| 615 | 615 | static ADDRESS_MAP_START( io_map, AS_IO, 8, dwarfd_state ) |
| 616 | 616 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 617 | AM_RANGE(0x01, 0x01) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 618 | AM_RANGE(0x02, 0x03) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 617 | AM_RANGE(0x01, 0x01) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 618 | AM_RANGE(0x02, 0x03) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 619 | 619 | |
| 620 | 620 | AM_RANGE(0x20, 0x20) AM_READWRITE(i8275_preg_r, i8275_preg_w) |
| 621 | 621 | AM_RANGE(0x21, 0x21) AM_READWRITE(i8275_sreg_r, i8275_creg_w) |
| r22781 | r22782 | |
|---|---|---|
| 385 | 385 | static ADDRESS_MAP_START( sound_port, AS_IO, 8, omegrace_state ) |
| 386 | 386 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 387 | 387 | AM_RANGE(0x00, 0x00) AM_READ(soundlatch_byte_r) /* likely ay8910 input port, not direct */ |
| 388 | AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 389 | AM_RANGE(0x02, 0x03) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 388 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 389 | AM_RANGE(0x02, 0x03) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 390 | 390 | ADDRESS_MAP_END |
| 391 | 391 | |
| 392 | 392 |
| r22781 | r22782 | |
|---|---|---|
| 193 | 193 | |
| 194 | 194 | static ADDRESS_MAP_START( vvillage_io, AS_IO, 8, caswin_state ) |
| 195 | 195 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 196 | AM_RANGE(0x01,0x01) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 197 | AM_RANGE(0x02,0x03) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 196 | AM_RANGE(0x01,0x01) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 197 | AM_RANGE(0x02,0x03) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 198 | 198 | AM_RANGE(0x10,0x10) AM_READ_PORT("IN0") |
| 199 | 199 | AM_RANGE(0x11,0x11) AM_READ_PORT("IN1") |
| 200 | 200 | AM_RANGE(0x10,0x10) AM_WRITE(vvillage_scroll_w) |
| r22781 | r22782 | |
|---|---|---|
| 113 | 113 | AM_RANGE(0x0000, 0x0fff) AM_RAM |
| 114 | 114 | AM_RANGE(0x1000, 0x17ff) AM_READWRITE(decocass_sound_nmi_enable_r, decocass_sound_nmi_enable_w) |
| 115 | 115 | AM_RANGE(0x1800, 0x1fff) AM_READWRITE(decocass_sound_data_ack_reset_r, decocass_sound_data_ack_reset_w) |
| 116 | AM_RANGE(0x2000, 0x2fff) AM_DEVWRITE_LEGACY("ay1", ay8910_data_w) | |
| 117 | AM_RANGE(0x4000, 0x4fff) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) | |
| 118 | AM_RANGE(0x6000, 0x6fff) AM_DEVWRITE_LEGACY("ay2", ay8910_data_w) | |
| 119 | AM_RANGE(0x8000, 0x8fff) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) | |
| 116 | AM_RANGE(0x2000, 0x2fff) AM_DEVWRITE("ay1", ay8910_device, data_w) | |
| 117 | AM_RANGE(0x4000, 0x4fff) AM_DEVWRITE("ay1", ay8910_device, address_w) | |
| 118 | AM_RANGE(0x6000, 0x6fff) AM_DEVWRITE("ay2", ay8910_device, data_w) | |
| 119 | AM_RANGE(0x8000, 0x8fff) AM_DEVWRITE("ay2", ay8910_device, address_w) | |
| 120 | 120 | AM_RANGE(0xa000, 0xafff) AM_READ(decocass_sound_command_r) |
| 121 | 121 | AM_RANGE(0xc000, 0xcfff) AM_WRITE(decocass_sound_data_w) |
| 122 | 122 | AM_RANGE(0xf800, 0xffff) AM_ROM |
| r22781 | r22782 | |
|---|---|---|
| 175 | 175 | AM_RANGE(0x0000, 0xbfff) AM_ROM AM_WRITENOP // there are some garbage writes to ROM |
| 176 | 176 | AM_RANGE(0xc000, 0xc7ff) AM_RAM |
| 177 | 177 | |
| 178 | AM_RANGE(0xd000, 0xd001) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 179 | AM_RANGE(0xd001, 0xd001) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 178 | AM_RANGE(0xd000, 0xd001) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 179 | AM_RANGE(0xd001, 0xd001) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 180 | 180 | AM_RANGE(0xd008, 0xd008) AM_WRITE(dominob_d008_w) |
| 181 | 181 | AM_RANGE(0xd00c, 0xd00c) AM_READ_PORT("IN0") |
| 182 | 182 | AM_RANGE(0xd010, 0xd010) AM_READ_PORT("IN1") AM_WRITENOP |
| r22781 | r22782 | |
|---|---|---|
| 213 | 213 | AM_RANGE(0x8000, 0x87ff) AM_RAM |
| 214 | 214 | AM_RANGE(0x8ff8, 0x8ff8) AM_READ_PORT("DSW1") |
| 215 | 215 | AM_RANGE(0x8ff9, 0x8ff9) AM_READ_PORT("INPUTS") |
| 216 | AM_RANGE(0x8ff8, 0x8ff8) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 217 | AM_RANGE(0x8ffa, 0x8ffa) AM_READ_PORT("SYSTEM") AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 216 | AM_RANGE(0x8ff8, 0x8ff8) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 217 | AM_RANGE(0x8ffa, 0x8ffa) AM_READ_PORT("SYSTEM") AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 218 | 218 | AM_RANGE(0x8ffc, 0x8ffc) AM_WRITE(jollyjgr_misc_w) |
| 219 | 219 | AM_RANGE(0x8ffd, 0x8ffd) AM_WRITE(jollyjgr_coin_lookout_w) |
| 220 | 220 | AM_RANGE(0x8fff, 0x8fff) AM_READ_PORT("DSW2") |
| r22781 | r22782 | |
| 230 | 230 | AM_RANGE(0x8000, 0x87ff) AM_RAM |
| 231 | 231 | AM_RANGE(0x8ff8, 0x8ff8) AM_READ_PORT("DSW1") |
| 232 | 232 | AM_RANGE(0x8ff9, 0x8ff9) AM_READ_PORT("INPUTS") |
| 233 | AM_RANGE(0x8ff8, 0x8ff8) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 234 | AM_RANGE(0x8ffa, 0x8ffa) AM_READ_PORT("SYSTEM") AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 233 | AM_RANGE(0x8ff8, 0x8ff8) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 234 | AM_RANGE(0x8ffa, 0x8ffa) AM_READ_PORT("SYSTEM") AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 235 | 235 | AM_RANGE(0x8ffc, 0x8ffc) AM_WRITE(jollyjgr_misc_w) |
| 236 | 236 | AM_RANGE(0x8ffd, 0x8ffd) AM_WRITE(jollyjgr_coin_lookout_w) |
| 237 | 237 | AM_RANGE(0x8fff, 0x8fff) AM_READ_PORT("DSW2") |
| r22781 | r22782 | |
|---|---|---|
| 686 | 686 | AM_RANGE(0x30, 0x33) AM_DEVREADWRITE("ppi8255", i8255_device, read, write) |
| 687 | 687 | AM_RANGE(0x40, 0x43) AM_DEVREADWRITE("z80pio_0", z80pio_device, read, write) |
| 688 | 688 | AM_RANGE(0x50, 0x53) AM_DEVREADWRITE("z80pio_1", z80pio_device, read, write) |
| 689 | AM_RANGE(0x80, 0x80) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 690 | AM_RANGE(0x80, 0x81) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 689 | AM_RANGE(0x80, 0x80) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 690 | AM_RANGE(0x80, 0x81) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 691 | 691 | AM_RANGE(0xff, 0xff) AM_WRITE(meritm_crt250_bank_w) |
| 692 | 692 | ADDRESS_MAP_END |
| 693 | 693 | |
| r22781 | r22782 | |
| 699 | 699 | AM_RANGE(0x40, 0x43) AM_DEVREADWRITE("z80pio_0", z80pio_device, read, write) |
| 700 | 700 | AM_RANGE(0x50, 0x53) AM_DEVREADWRITE("z80pio_1", z80pio_device, read, write) |
| 701 | 701 | AM_RANGE(0x60, 0x67) AM_READWRITE_LEGACY(pc16552d_0_r,pc16552d_0_w) |
| 702 | AM_RANGE(0x80, 0x80) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 703 | AM_RANGE(0x80, 0x81) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 702 | AM_RANGE(0x80, 0x80) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 703 | AM_RANGE(0x80, 0x81) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 704 | 704 | AM_RANGE(0xff, 0xff) AM_WRITE(meritm_crt250_bank_w) |
| 705 | 705 | ADDRESS_MAP_END |
| 706 | 706 | |
| r22781 | r22782 | |
| 720 | 720 | AM_RANGE(0x40, 0x43) AM_DEVREADWRITE("z80pio_0", z80pio_device, read, write) |
| 721 | 721 | AM_RANGE(0x50, 0x53) AM_DEVREADWRITE("z80pio_1", z80pio_device, read, write) |
| 722 | 722 | AM_RANGE(0x60, 0x67) AM_READWRITE_LEGACY(pc16552d_0_r,pc16552d_0_w) |
| 723 | AM_RANGE(0x80, 0x80) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 724 | AM_RANGE(0x80, 0x81) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 723 | AM_RANGE(0x80, 0x80) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 724 | AM_RANGE(0x80, 0x81) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 725 | 725 | AM_RANGE(0xff, 0xff) AM_WRITE(meritm_bank_w) |
| 726 | 726 | ADDRESS_MAP_END |
| 727 | 727 |
| r22781 | r22782 | |
|---|---|---|
| 45 | 45 | { |
| 46 | 46 | /* bit 5 goes to 8910 #0 BDIR pin */ |
| 47 | 47 | if ((m_last_snd_ctrl & 0x20) == 0x20 && (data & 0x20) == 0x00) |
| 48 | | |
| 48 | machine().device<ay8910_device>("ay1")->data_address_w(space, m_last_snd_ctrl >> 4, m_soundlatch); | |
| 49 | 49 | |
| 50 | 50 | /* bit 7 goes to 8910 #1 BDIR pin */ |
| 51 | 51 | if ((m_last_snd_ctrl & 0x80) == 0x80 && (data & 0x80) == 0x00) |
| 52 | | |
| 52 | machine().device<ay8910_device>("ay2")->data_address_w(space, m_last_snd_ctrl >> 6, m_soundlatch); | |
| 53 | 53 | |
| 54 | 54 | m_last_snd_ctrl = data; |
| 55 | 55 | } |
| r22781 | r22782 | |
|---|---|---|
| 257 | 257 | static ADDRESS_MAP_START( msisaac_sound_map, AS_PROGRAM, 8, msisaac_state ) |
| 258 | 258 | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| 259 | 259 | AM_RANGE(0x4000, 0x47ff) AM_RAM |
| 260 | AM_RANGE(0x8000, 0x8001) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 261 | AM_RANGE(0x8002, 0x8003) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 260 | AM_RANGE(0x8000, 0x8001) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 261 | AM_RANGE(0x8002, 0x8003) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 262 | 262 | AM_RANGE(0x8010, 0x801d) AM_DEVWRITE_LEGACY("msm", msm5232_w) |
| 263 | 263 | AM_RANGE(0x8020, 0x8020) AM_WRITE(sound_control_0_w) |
| 264 | 264 | AM_RANGE(0x8030, 0x8030) AM_WRITE(sound_control_1_w) |
| r22781 | r22782 | |
|---|---|---|
| 271 | 271 | AM_RANGE(0x0000, 0x0fff) AM_ROM |
| 272 | 272 | AM_RANGE(0x4000, 0x43ff) AM_MIRROR(0x0c00) AM_RAM |
| 273 | 273 | AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x0fff) AM_READ(soundlatch_byte_r) |
| 274 | AM_RANGE(0x7000, 0x7000) AM_MIRROR(0x0fff) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 275 | AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x0fff) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 274 | AM_RANGE(0x7000, 0x7000) AM_MIRROR(0x0fff) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 275 | AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x0fff) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 276 | 276 | ADDRESS_MAP_END |
| 277 | 277 | |
| 278 | 278 | |
| r22781 | r22782 | |
| 281 | 281 | AM_RANGE(0x0000, 0x0fff) AM_ROM |
| 282 | 282 | AM_RANGE(0x4000, 0x43ff) AM_MIRROR(0x0c00) AM_RAM |
| 283 | 283 | AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x0fff) AM_READ(soundlatch_byte_r) |
| 284 | AM_RANGE(0x7000, 0x7000) AM_MIRROR(0x0fff) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 285 | AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x0fff) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 284 | AM_RANGE(0x7000, 0x7000) AM_MIRROR(0x0fff) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 285 | AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x0fff) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 286 | 286 | ADDRESS_MAP_END |
| 287 | 287 | |
| 288 | 288 |
| r22781 | r22782 | |
|---|---|---|
| 135 | 135 | static ADDRESS_MAP_START( hotblock_io, AS_IO, 8, hotblock_state ) |
| 136 | 136 | AM_RANGE(0x0000, 0x0000) AM_WRITE(hotblock_port0_w) |
| 137 | 137 | AM_RANGE(0x0004, 0x0004) AM_READWRITE(hotblock_port4_r, hotblock_port4_w) |
| 138 | AM_RANGE(0x8000, 0x8001) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 139 | AM_RANGE(0x8001, 0x8001) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 138 | AM_RANGE(0x8000, 0x8001) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 139 | AM_RANGE(0x8001, 0x8001) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 140 | 140 | ADDRESS_MAP_END |
| 141 | 141 | |
| 142 | 142 |
| r22781 | r22782 | |
|---|---|---|
| 278 | 278 | static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, crgolf_state ) |
| 279 | 279 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 280 | 280 | AM_RANGE(0x8000, 0x87ff) AM_RAM |
| 281 | AM_RANGE(0xc000, 0xc001) AM_DEVWRITE | |
| 281 | AM_RANGE(0xc000, 0xc001) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 282 | 282 | AM_RANGE(0xc002, 0xc002) AM_WRITENOP |
| 283 | 283 | AM_RANGE(0xe000, 0xe000) AM_READWRITE(switch_input_r, switch_input_select_w) |
| 284 | 284 | AM_RANGE(0xe001, 0xe001) AM_READWRITE(analog_input_r, unknown_w) |
| r22781 | r22782 | |
|---|---|---|
| 741 | 741 | AM_RANGE(0x0000, 0xbfff) AM_ROM |
| 742 | 742 | AM_RANGE(0xc000, 0xc000) AM_READ(soundlatch_byte_r) |
| 743 | 743 | AM_RANGE(0xc080, 0xc08d) AM_DEVWRITE_LEGACY("msm", msm5232_w) |
| 744 | AM_RANGE(0xc0a0, 0xc0a1) AM_DEVWRITE | |
| 744 | AM_RANGE(0xc0a0, 0xc0a1) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 745 | 745 | AM_RANGE(0xc0b0, 0xc0b0) AM_WRITENOP // n.c. |
| 746 | 746 | AM_RANGE(0xc0c0, 0xc0c0) AM_WRITE(equites_cymbal_ctrl_w) |
| 747 | 747 | AM_RANGE(0xc0d0, 0xc0d0) AM_WRITE(equites_dac_latch_w) // followed by 1 (and usually 0) on 8155 port B |
| r22781 | r22782 | |
|---|---|---|
| 170 | 170 | AM_RANGE(0xb000, 0xb000) AM_WRITENOP // ??? always 0x40 |
| 171 | 171 | AM_RANGE(0xc000, 0xc3ff) AM_RAM // main ram |
| 172 | 172 | AM_RANGE(0xc400, 0xc4ff) AM_RAM // ??? |
| 173 | AM_RANGE(0xd000, 0xd000) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 174 | AM_RANGE(0xd000, 0xd001) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 173 | AM_RANGE(0xd000, 0xd000) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 174 | AM_RANGE(0xd000, 0xd001) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 175 | 175 | AM_RANGE(0xe000, 0xe000) AM_READ_PORT("IN0") AM_WRITE(hanaroku_out_0_w) |
| 176 | 176 | AM_RANGE(0xe001, 0xe001) AM_READ_PORT("IN1") |
| 177 | 177 | AM_RANGE(0xe002, 0xe002) AM_READ_PORT("IN2") AM_WRITE(hanaroku_out_1_w) |
| r22781 | r22782 | |
|---|---|---|
| 280 | 280 | static ADDRESS_MAP_START( sound_cpu, AS_PROGRAM, 8, ddayjlc_state ) |
| 281 | 281 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 282 | 282 | AM_RANGE(0x2000, 0x23ff) AM_RAM |
| 283 | AM_RANGE(0x3000, 0x3000) AM_DEVREADWRITE_LEGACY("ay1", ay8910_r, ay8910_data_w) | |
| 284 | AM_RANGE(0x4000, 0x4000) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) | |
| 285 | AM_RANGE(0x5000, 0x5000) AM_DEVREADWRITE_LEGACY("ay2", ay8910_r, ay8910_data_w) | |
| 286 | AM_RANGE(0x6000, 0x6000) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) | |
| 283 | AM_RANGE(0x3000, 0x3000) AM_DEVREADWRITE("ay1", ay8910_device, data_r, data_w) | |
| 284 | AM_RANGE(0x4000, 0x4000) AM_DEVWRITE("ay1", ay8910_device, address_w) | |
| 285 | AM_RANGE(0x5000, 0x5000) AM_DEVREADWRITE("ay2", ay8910_device, data_r, data_w) | |
| 286 | AM_RANGE(0x6000, 0x6000) AM_DEVWRITE("ay2", ay8910_device, address_w) | |
| 287 | 287 | AM_RANGE(0x7000, 0x7000) AM_WRITE(sound_nmi_w) |
| 288 | 288 | ADDRESS_MAP_END |
| 289 | 289 |
| r22781 | r22782 | |
|---|---|---|
| 221 | 221 | static ADDRESS_MAP_START( talbot_map, AS_PROGRAM, 8, champbas_state ) |
| 222 | 222 | AM_RANGE(0x0000, 0x5fff) AM_ROM |
| 223 | 223 | AM_RANGE(0x6000, 0x63ff) AM_RAM AM_SHARE("share1") /* MCU shared RAM */ |
| 224 | AM_RANGE(0x7000, 0x7001) AM_DEVWRITE | |
| 224 | AM_RANGE(0x7000, 0x7001) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 225 | 225 | AM_RANGE(0x8000, 0x87ff) AM_RAM_WRITE(champbas_bg_videoram_w) AM_SHARE("bg_videoram") |
| 226 | 226 | AM_RANGE(0x8800, 0x8fef) AM_RAM |
| 227 | 227 | AM_RANGE(0x8ff0, 0x8fff) AM_RAM AM_SHARE("spriteram") |
| r22781 | r22782 | |
| 248 | 248 | static ADDRESS_MAP_START( champbas_main_map, AS_PROGRAM, 8, champbas_state ) |
| 249 | 249 | AM_RANGE(0x0000, 0x5fff) AM_ROM |
| 250 | 250 | AM_RANGE(0x6000, 0x63ff) AM_RAM AM_SHARE("share1") |
| 251 | AM_RANGE(0x7000, 0x7001) AM_DEVWRITE | |
| 251 | AM_RANGE(0x7000, 0x7001) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 252 | 252 | AM_RANGE(0x7800, 0x7fff) AM_ROM // champbb2 only |
| 253 | 253 | AM_RANGE(0x8000, 0x87ff) AM_RAM_WRITE(champbas_bg_videoram_w) AM_SHARE("bg_videoram") |
| 254 | 254 | AM_RANGE(0x8800, 0x8fef) AM_RAM |
| r22781 | r22782 | |
| 280 | 280 | static ADDRESS_MAP_START( exctsccrb_main_map, AS_PROGRAM, 8, champbas_state ) |
| 281 | 281 | AM_RANGE(0x0000, 0x5fff) AM_ROM |
| 282 | 282 | // AM_RANGE(0x6000, 0x63ff) AM_RAM AM_SHARE("share1") // MCU not used (though it's present on the board) |
| 283 | AM_RANGE(0x7000, 0x7001) AM_DEVWRITE | |
| 283 | AM_RANGE(0x7000, 0x7001) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 284 | 284 | // AM_RANGE(0x7800, 0x7fff) AM_ROM // champbb2 only |
| 285 | 285 | AM_RANGE(0x8000, 0x87ff) AM_RAM_WRITE(champbas_bg_videoram_w) AM_SHARE("bg_videoram") |
| 286 | 286 | AM_RANGE(0x8800, 0x8fff) AM_RAM AM_SHARE("spriteram_2") /* ??? */ |
| r22781 | r22782 | |
| 351 | 351 | |
| 352 | 352 | static ADDRESS_MAP_START( exctsccr_sound_io_map, AS_IO, 8, champbas_state ) |
| 353 | 353 | ADDRESS_MAP_GLOBAL_MASK( 0x00ff ) |
| 354 | AM_RANGE(0x82, 0x83) AM_DEVWRITE_LEGACY("ay1", ay8910_data_address_w) | |
| 355 | AM_RANGE(0x86, 0x87) AM_DEVWRITE_LEGACY("ay2", ay8910_data_address_w) | |
| 356 | AM_RANGE(0x8a, 0x8b) AM_DEVWRITE_LEGACY("ay3", ay8910_data_address_w) | |
| 357 | AM_RANGE(0x8e, 0x8f) AM_DEVWRITE_LEGACY("ay4", ay8910_data_address_w) | |
| 354 | AM_RANGE(0x82, 0x83) AM_DEVWRITE("ay1", ay8910_device, data_address_w) | |
| 355 | AM_RANGE(0x86, 0x87) AM_DEVWRITE("ay2", ay8910_device, data_address_w) | |
| 356 | AM_RANGE(0x8a, 0x8b) AM_DEVWRITE("ay3", ay8910_device, data_address_w) | |
| 357 | AM_RANGE(0x8e, 0x8f) AM_DEVWRITE("ay4", ay8910_device, data_address_w) | |
| 358 | 358 | ADDRESS_MAP_END |
| 359 | 359 | |
| 360 | 360 |
| r22781 | r22782 | |
|---|---|---|
| 346 | 346 | AM_RANGE(0x3500, 0x3500) AM_READ_PORT("IN1") |
| 347 | 347 | AM_RANGE(0x3600, 0x3600) AM_READ_PORT("IN2") |
| 348 | 348 | AM_RANGE(0x3700, 0x3700) AM_WRITE(counters_w ) |
| 349 | AM_RANGE(0x3d00, 0x3d01) AM_DEVREADWRITE | |
| 349 | AM_RANGE(0x3d00, 0x3d01) AM_DEVREADWRITE("ay8910", ay8910_device, data_r, address_data_w) | |
| 350 | 350 | AM_RANGE(0x4000, 0xffff) AM_ROM |
| 351 | 351 | ADDRESS_MAP_END |
| 352 | 352 |
| r22781 | r22782 | |
|---|---|---|
| 557 | 557 | static ADDRESS_MAP_START( arkanoid_map, AS_PROGRAM, 8, arkanoid_state ) |
| 558 | 558 | AM_RANGE(0x0000, 0xbfff) AM_ROM |
| 559 | 559 | AM_RANGE(0xc000, 0xc7ff) AM_RAM |
| 560 | AM_RANGE(0xd000, 0xd001) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 561 | AM_RANGE(0xd001, 0xd001) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 560 | AM_RANGE(0xd000, 0xd001) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 561 | AM_RANGE(0xd001, 0xd001) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 562 | 562 | AM_RANGE(0xd008, 0xd008) AM_WRITE(arkanoid_d008_w) /* gfx bank, flip screen etc. */ |
| 563 | 563 | AM_RANGE(0xd00c, 0xd00c) AM_READ_PORT("SYSTEM") /* 2 bits from the 68705 */ |
| 564 | 564 | AM_RANGE(0xd010, 0xd010) AM_READ_PORT("BUTTONS") AM_WRITE(watchdog_reset_w) |
| r22781 | r22782 | |
| 572 | 572 | static ADDRESS_MAP_START( bootleg_map, AS_PROGRAM, 8, arkanoid_state ) |
| 573 | 573 | AM_RANGE(0x0000, 0xbfff) AM_ROM |
| 574 | 574 | AM_RANGE(0xc000, 0xc7ff) AM_RAM |
| 575 | AM_RANGE(0xd000, 0xd000) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 576 | AM_RANGE(0xd001, 0xd001) AM_DEVREADWRITE_LEGACY("aysnd", ay8910_r, ay8910_data_w) | |
| 575 | AM_RANGE(0xd000, 0xd000) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 576 | AM_RANGE(0xd001, 0xd001) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, data_w) | |
| 577 | 577 | AM_RANGE(0xd008, 0xd008) AM_WRITE(arkanoid_d008_w) /* gfx bank, flip screen etc. */ |
| 578 | 578 | AM_RANGE(0xd00c, 0xd00c) AM_READ_PORT("SYSTEM") |
| 579 | 579 | AM_RANGE(0xd010, 0xd010) AM_READ_PORT("BUTTONS") AM_WRITE(watchdog_reset_w) |
| r22781 | r22782 | |
| 588 | 588 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 589 | 589 | AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1") |
| 590 | 590 | AM_RANGE(0xc000, 0xc7ff) AM_RAM |
| 591 | AM_RANGE(0xd001, 0xd001) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 592 | AM_RANGE(0xd000, 0xd001) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 591 | AM_RANGE(0xd001, 0xd001) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 592 | AM_RANGE(0xd000, 0xd001) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 593 | 593 | AM_RANGE(0xd008, 0xd008) AM_WRITE(hexa_d008_w) |
| 594 | 594 | AM_RANGE(0xd010, 0xd010) AM_WRITE(watchdog_reset_w) /* or IRQ acknowledge, or both */ |
| 595 | 595 | AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(arkanoid_videoram_w) AM_SHARE("videoram") |
| r22781 | r22782 | |
| 598 | 598 | static ADDRESS_MAP_START( brixian_map, AS_PROGRAM, 8, arkanoid_state ) |
| 599 | 599 | AM_RANGE(0x0000, 0xbfff) AM_ROM |
| 600 | 600 | AM_RANGE(0xc000, 0xc7ff) AM_RAM AM_SHARE("protram") |
| 601 | AM_RANGE(0xd000, 0xd000) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 602 | AM_RANGE(0xd001, 0xd001) AM_DEVREADWRITE_LEGACY("aysnd", ay8910_r, ay8910_data_w) | |
| 601 | AM_RANGE(0xd000, 0xd000) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 602 | AM_RANGE(0xd001, 0xd001) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, data_w) | |
| 603 | 603 | AM_RANGE(0xd008, 0xd008) AM_WRITE(brixian_d008_w) /* gfx bank, flip screen etc. */ |
| 604 | 604 | AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(arkanoid_videoram_w) AM_SHARE("videoram") |
| 605 | 605 | AM_RANGE(0xe800, 0xe83f) AM_RAM AM_SHARE("spriteram") |
| r22781 | r22782 | |
|---|---|---|
| 130 | 130 | |
| 131 | 131 | static ADDRESS_MAP_START( kchampvs_sound_io_map, AS_IO, 8, kchamp_state ) |
| 132 | 132 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 133 | AM_RANGE(0x00, 0x01) AM_DEVWRITE | |
| 133 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("ay1", ay8910_device, data_address_w) | |
| 134 | 134 | AM_RANGE(0x01, 0x01) AM_READ(soundlatch_byte_r) |
| 135 | AM_RANGE(0x02, 0x03) AM_DEVWRITE | |
| 135 | AM_RANGE(0x02, 0x03) AM_DEVWRITE("ay2", ay8910_device, data_address_w) | |
| 136 | 136 | AM_RANGE(0x04, 0x04) AM_WRITE(sound_msm_w) |
| 137 | 137 | AM_RANGE(0x05, 0x05) AM_WRITE(sound_control_w) |
| 138 | 138 | ADDRESS_MAP_END |
| r22781 | r22782 | |
| 181 | 181 | |
| 182 | 182 | static ADDRESS_MAP_START( kchamp_sound_io_map, AS_IO, 8, kchamp_state ) |
| 183 | 183 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 184 | AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("ay1", ay8910_data_address_w) | |
| 185 | AM_RANGE(0x02, 0x03) AM_DEVWRITE_LEGACY("ay2", ay8910_data_address_w) | |
| 184 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("ay1", ay8910_device, data_address_w) | |
| 185 | AM_RANGE(0x02, 0x03) AM_DEVWRITE("ay2", ay8910_device, data_address_w) | |
| 186 | 186 | AM_RANGE(0x04, 0x04) AM_DEVWRITE("dac", dac_device, write_unsigned8) |
| 187 | 187 | AM_RANGE(0x05, 0x05) AM_WRITE(kc_sound_control_w) |
| 188 | 188 | AM_RANGE(0x06, 0x06) AM_READ(soundlatch_byte_r) |
| r22781 | r22782 | |
|---|---|---|
| 195 | 195 | AM_RANGE(0x7000, 0xafff) AM_ROM // spielbud |
| 196 | 196 | |
| 197 | 197 | |
| 198 | AM_RANGE(0xb000, 0xb000) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 199 | AM_RANGE(0xb100, 0xb100) AM_DEVREADWRITE_LEGACY("aysnd", ay8910_r, ay8910_data_w) | |
| 198 | AM_RANGE(0xb000, 0xb000) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 199 | AM_RANGE(0xb100, 0xb100) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, data_w) | |
| 200 | 200 | |
| 201 | 201 | AM_RANGE(0xb800, 0xb803) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write) /* Input Ports */ |
| 202 | 202 | AM_RANGE(0xba00, 0xba03) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) /* Input Ports */ |
| r22781 | r22782 | |
| 217 | 217 | |
| 218 | 218 | // spielbud - is the ay mirrored, or are there now 2? |
| 219 | 219 | static ADDRESS_MAP_START( spielbud_io_map, AS_IO, 8, slotcarn_state ) |
| 220 | AM_RANGE(0xb000, 0xb000) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 221 | AM_RANGE(0xb100, 0xb100) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 220 | AM_RANGE(0xb000, 0xb000) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 221 | AM_RANGE(0xb100, 0xb100) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 222 | 222 | ADDRESS_MAP_END |
| 223 | 223 | |
| 224 | 224 | /******************************** |
| r22781 | r22782 | |
|---|---|---|
| 74 | 74 | |
| 75 | 75 | static ADDRESS_MAP_START( sound_portmap, AS_IO, 8, solomon_state ) |
| 76 | 76 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 77 | AM_RANGE(0x10, 0x11) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 78 | AM_RANGE(0x20, 0x21) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 79 | AM_RANGE(0x30, 0x31) AM_DEVWRITE_LEGACY("ay3", ay8910_address_data_w) | |
| 77 | AM_RANGE(0x10, 0x11) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 78 | AM_RANGE(0x20, 0x21) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 79 | AM_RANGE(0x30, 0x31) AM_DEVWRITE("ay3", ay8910_device, address_data_w) | |
| 80 | 80 | ADDRESS_MAP_END |
| 81 | 81 | |
| 82 | 82 |
| r22781 | r22782 | |
|---|---|---|
| 324 | 324 | AM_RANGE(0x2000, 0x23ff) AM_RAM |
| 325 | 325 | AM_RANGE(0x2800, 0x2803) AM_DEVREADWRITE("ppi8255", i8255_device, read, write) |
| 326 | 326 | AM_RANGE(0x3000, 0x3000) AM_WRITE(vreg_control_w) |
| 327 | AM_RANGE(0x37f0, 0x37f0) AM_DEVWRITE | |
| 327 | AM_RANGE(0x37f0, 0x37f0) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 328 | 328 | // AM_RANGE(0x37f7, 0x37f7) AM_NOP |
| 329 | 329 | AM_RANGE(0x3800, 0x3800) AM_READWRITE(vreg_data_r, vreg_data_w) |
| 330 | AM_RANGE(0x3810, 0x3810) AM_DEVWRITE | |
| 330 | AM_RANGE(0x3810, 0x3810) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 331 | 331 | AM_RANGE(0x4000, 0x4000) AM_READ_PORT("DSWA") |
| 332 | 332 | AM_RANGE(0x47ff, 0x4800) AM_WRITE(transmit_data_w) |
| 333 | 333 | AM_RANGE(0x5000, 0x50ff) AM_WRITE(imola_led_board_w) |
| r22781 | r22782 | |
|---|---|---|
| 117 | 117 | AM_RANGE(0xfe17, 0xfe17) AM_READNOP //irq ack |
| 118 | 118 | AM_RANGE(0xfe20, 0xfe20) AM_WRITE(output_w) //output, irq enable? |
| 119 | 119 | AM_RANGE(0xfe22, 0xfe22) AM_WRITE(tile_bank_w) |
| 120 | AM_RANGE(0xfe40, 0xfe40) AM_DEVREADWRITE_LEGACY("ay", ay8910_r, ay8910_data_w) | |
| 121 | AM_RANGE(0xfe60, 0xfe60) AM_DEVWRITE_LEGACY("ay", ay8910_address_w) | |
| 120 | AM_RANGE(0xfe40, 0xfe40) AM_DEVREADWRITE("ay", ay8910_device, data_r, data_w) | |
| 121 | AM_RANGE(0xfe60, 0xfe60) AM_DEVWRITE("ay", ay8910_device, address_w) | |
| 122 | 122 | ADDRESS_MAP_END |
| 123 | 123 | |
| 124 | 124 |
| r22781 | r22782 | |
|---|---|---|
| 64 | 64 | switch (data) |
| 65 | 65 | { |
| 66 | 66 | case 0x01: |
| 67 | | |
| 67 | m_psg->data_w(space, 0, m_psg_latch); | |
| 68 | 68 | break; |
| 69 | 69 | |
| 70 | 70 | case 0x02: |
| 71 | m_psg_latch = | |
| 71 | m_psg_latch = m_psg->data_r(space, 0); | |
| 72 | 72 | break; |
| 73 | 73 | |
| 74 | 74 | case 0x03: |
| 75 | | |
| 75 | m_psg->address_w(space, 0, m_psg_latch); | |
| 76 | 76 | break; |
| 77 | 77 | } |
| 78 | 78 | } |
| r22781 | r22782 | |
|---|---|---|
| 549 | 549 | |
| 550 | 550 | static ADDRESS_MAP_START( royalmah_iomap, AS_IO, 8, royalmah_state ) |
| 551 | 551 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 552 | AM_RANGE( 0x01, 0x01 ) AM_DEVREAD_LEGACY("aysnd", ay8910_r ) | |
| 553 | AM_RANGE( 0x02, 0x03 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w ) | |
| 552 | AM_RANGE( 0x01, 0x01 ) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 553 | AM_RANGE( 0x02, 0x03 ) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 554 | 554 | AM_RANGE( 0x10, 0x10 ) AM_READ_PORT("DSW1") AM_WRITE(royalmah_palbank_w ) |
| 555 | 555 | AM_RANGE( 0x11, 0x11 ) AM_READ_PORT("SYSTEM") AM_WRITE(input_port_select_w ) |
| 556 | 556 | ADDRESS_MAP_END |
| 557 | 557 | |
| 558 | 558 | static ADDRESS_MAP_START( ippatsu_iomap, AS_IO, 8, royalmah_state ) |
| 559 | 559 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 560 | AM_RANGE( 0x01, 0x01 ) AM_DEVREAD_LEGACY("aysnd", ay8910_r ) | |
| 561 | AM_RANGE( 0x02, 0x03 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w ) | |
| 560 | AM_RANGE( 0x01, 0x01 ) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 561 | AM_RANGE( 0x02, 0x03 ) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 562 | 562 | AM_RANGE( 0x10, 0x10 ) AM_READ_PORT("DSW1") AM_WRITE(royalmah_palbank_w ) |
| 563 | 563 | AM_RANGE( 0x11, 0x11 ) AM_READ_PORT("SYSTEM") AM_WRITE(input_port_select_w ) |
| 564 | 564 | AM_RANGE( 0x12, 0x12 ) AM_READ_PORT("DSW2") |
| r22781 | r22782 | |
| 567 | 567 | |
| 568 | 568 | static ADDRESS_MAP_START( suzume_iomap, AS_IO, 8, royalmah_state ) |
| 569 | 569 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 570 | AM_RANGE( 0x01, 0x01 ) AM_DEVREAD_LEGACY("aysnd", ay8910_r ) | |
| 571 | AM_RANGE( 0x02, 0x03 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w ) | |
| 570 | AM_RANGE( 0x01, 0x01 ) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 571 | AM_RANGE( 0x02, 0x03 ) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 572 | 572 | AM_RANGE( 0x10, 0x10 ) AM_READ_PORT("DSW1") AM_WRITE(royalmah_palbank_w ) |
| 573 | 573 | AM_RANGE( 0x11, 0x11 ) AM_READ_PORT("SYSTEM") AM_WRITE(input_port_select_w ) |
| 574 | 574 | AM_RANGE( 0x80, 0x80 ) AM_READ(suzume_dsw_r ) |
| r22781 | r22782 | |
| 577 | 577 | |
| 578 | 578 | static ADDRESS_MAP_START( dondenmj_iomap, AS_IO, 8, royalmah_state ) |
| 579 | 579 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 580 | AM_RANGE( 0x01, 0x01 ) AM_DEVREAD_LEGACY("aysnd", ay8910_r ) | |
| 581 | AM_RANGE( 0x02, 0x03 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 580 | AM_RANGE( 0x01, 0x01 ) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 581 | AM_RANGE( 0x02, 0x03 ) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 582 | 582 | AM_RANGE( 0x10, 0x10 ) AM_READ_PORT("DSW1") AM_WRITE(royalmah_palbank_w ) |
| 583 | 583 | AM_RANGE( 0x11, 0x11 ) AM_READ_PORT("SYSTEM") AM_WRITE(input_port_select_w ) |
| 584 | 584 | AM_RANGE( 0x85, 0x85 ) AM_READ_PORT("DSW2") // DSW2 |
| r22781 | r22782 | |
| 588 | 588 | |
| 589 | 589 | static ADDRESS_MAP_START( makaijan_iomap, AS_IO, 8, royalmah_state ) |
| 590 | 590 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 591 | AM_RANGE( 0x01, 0x01 ) AM_DEVREAD_LEGACY("aysnd", ay8910_r ) | |
| 592 | AM_RANGE( 0x02, 0x03 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 591 | AM_RANGE( 0x01, 0x01 ) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 592 | AM_RANGE( 0x02, 0x03 ) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 593 | 593 | AM_RANGE( 0x10, 0x10 ) AM_READ_PORT("DSW1") AM_WRITE(royalmah_palbank_w ) |
| 594 | 594 | AM_RANGE( 0x11, 0x11 ) AM_READ_PORT("SYSTEM") AM_WRITE(input_port_select_w ) |
| 595 | 595 | AM_RANGE( 0x84, 0x84 ) AM_READ_PORT("DSW2") // DSW2 |
| r22781 | r22782 | |
| 599 | 599 | |
| 600 | 600 | static ADDRESS_MAP_START( daisyari_iomap, AS_IO, 8, royalmah_state ) |
| 601 | 601 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 602 | AM_RANGE( 0x01, 0x01 ) AM_DEVREAD_LEGACY("aysnd", ay8910_r ) | |
| 603 | AM_RANGE( 0x02, 0x03 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 602 | AM_RANGE( 0x01, 0x01 ) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 603 | AM_RANGE( 0x02, 0x03 ) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 604 | 604 | AM_RANGE( 0x10, 0x10 ) AM_WRITE(royalmah_palbank_w ) |
| 605 | 605 | AM_RANGE( 0x11, 0x11 ) AM_READ_PORT("SYSTEM") AM_WRITE(input_port_select_w ) |
| 606 | 606 | AM_RANGE( 0xc0, 0xc0 ) AM_READWRITE(daisyari_dsw_r, daisyari_bank_w ) |
| r22781 | r22782 | |
| 609 | 609 | static ADDRESS_MAP_START( mjclub_iomap, AS_IO, 8, royalmah_state ) |
| 610 | 610 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 611 | 611 | AM_RANGE( 0x00, 0x00 ) AM_READWRITE(mjclub_dsw_r, mjclub_bank_w ) |
| 612 | AM_RANGE( 0x01, 0x01 ) AM_DEVREAD_LEGACY("aysnd", ay8910_r ) | |
| 613 | AM_RANGE( 0x02, 0x03 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 612 | AM_RANGE( 0x01, 0x01 ) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 613 | AM_RANGE( 0x02, 0x03 ) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 614 | 614 | AM_RANGE( 0x10, 0x10 ) AM_READ_PORT("DSW1") AM_WRITE(royalmah_palbank_w ) |
| 615 | 615 | AM_RANGE( 0x11, 0x11 ) AM_READ_PORT("SYSTEM") AM_WRITE(input_port_select_w ) |
| 616 | 616 | ADDRESS_MAP_END |
| 617 | 617 | |
| 618 | 618 | static ADDRESS_MAP_START( mjdiplob_iomap, AS_IO, 8, royalmah_state ) |
| 619 | 619 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 620 | AM_RANGE( 0x01, 0x01 ) AM_DEVREAD_LEGACY("aysnd", ay8910_r ) | |
| 621 | AM_RANGE( 0x02, 0x03 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w ) | |
| 620 | AM_RANGE( 0x01, 0x01 ) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 621 | AM_RANGE( 0x02, 0x03 ) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 622 | 622 | AM_RANGE( 0x10, 0x10 ) AM_READ_PORT("DSW1") AM_WRITE(royalmah_palbank_w ) |
| 623 | 623 | AM_RANGE( 0x11, 0x11 ) AM_READ_PORT("SYSTEM") AM_WRITE(input_port_select_w ) |
| 624 | 624 | AM_RANGE( 0x61, 0x61 ) AM_WRITE(tontonb_bank_w) |
| r22781 | r22782 | |
| 628 | 628 | |
| 629 | 629 | static ADDRESS_MAP_START( tontonb_iomap, AS_IO, 8, royalmah_state ) |
| 630 | 630 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 631 | AM_RANGE( 0x01, 0x01 ) AM_DEVREAD_LEGACY("aysnd", ay8910_r ) | |
| 632 | AM_RANGE( 0x02, 0x03 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w ) | |
| 631 | AM_RANGE( 0x01, 0x01 ) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 632 | AM_RANGE( 0x02, 0x03 ) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 633 | 633 | AM_RANGE( 0x10, 0x10 ) AM_READ_PORT("DSW1") AM_WRITE(royalmah_palbank_w ) |
| 634 | 634 | AM_RANGE( 0x11, 0x11 ) AM_READ_PORT("SYSTEM") AM_WRITE(input_port_select_w ) |
| 635 | 635 | AM_RANGE( 0x44, 0x44 ) AM_WRITE(tontonb_bank_w ) |
| r22781 | r22782 | |
| 639 | 639 | |
| 640 | 640 | static ADDRESS_MAP_START( majs101b_iomap, AS_IO, 8, royalmah_state ) |
| 641 | 641 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 642 | AM_RANGE( 0x01, 0x01 ) AM_DEVREAD_LEGACY("aysnd", ay8910_r ) | |
| 643 | AM_RANGE( 0x02, 0x03 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w ) | |
| 642 | AM_RANGE( 0x01, 0x01 ) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 643 | AM_RANGE( 0x02, 0x03 ) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 644 | 644 | AM_RANGE( 0x10, 0x10 ) AM_READ_PORT("DSW1") AM_WRITE(royalmah_palbank_w ) |
| 645 | 645 | AM_RANGE( 0x11, 0x11 ) AM_READ_PORT("SYSTEM") AM_WRITE(input_port_select_w ) |
| 646 | 646 | AM_RANGE( 0x00, 0x00 ) AM_READWRITE(majs101b_dsw_r, dynax_bank_w ) |
| r22781 | r22782 | |
| 648 | 648 | |
| 649 | 649 | static ADDRESS_MAP_START( mjderngr_iomap, AS_IO, 8, royalmah_state ) |
| 650 | 650 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 651 | AM_RANGE( 0x01, 0x01 ) AM_DEVREAD_LEGACY("aysnd", ay8910_r ) | |
| 652 | AM_RANGE( 0x02, 0x03 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w ) | |
| 651 | AM_RANGE( 0x01, 0x01 ) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 652 | AM_RANGE( 0x02, 0x03 ) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 653 | 653 | // AM_RANGE( 0x10, 0x10 ) AM_READ_PORT("DSW1") |
| 654 | 654 | AM_RANGE( 0x10, 0x10 ) AM_WRITE(mjderngr_coin_w ) // palette bank is set separately |
| 655 | 655 | AM_RANGE( 0x11, 0x11 ) AM_READ_PORT("SYSTEM") AM_WRITE(input_port_select_w ) |
| r22781 | r22782 | |
| 662 | 662 | static ADDRESS_MAP_START( mjapinky_iomap, AS_IO, 8, royalmah_state ) |
| 663 | 663 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 664 | 664 | AM_RANGE( 0x00, 0x00 ) AM_WRITE(mjapinky_bank_w ) |
| 665 | AM_RANGE( 0x01, 0x01 ) AM_DEVREAD_LEGACY("aysnd", ay8910_r ) | |
| 666 | AM_RANGE( 0x02, 0x03 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w ) | |
| 665 | AM_RANGE( 0x01, 0x01 ) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 666 | AM_RANGE( 0x02, 0x03 ) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 667 | 667 | AM_RANGE( 0x04, 0x04 ) AM_READ_PORT("DSW2") |
| 668 | 668 | AM_RANGE( 0x10, 0x10 ) AM_READ_PORT("DSW1") AM_WRITE(mjapinky_palbank_w ) |
| 669 | 669 | AM_RANGE( 0x11, 0x11 ) AM_READ_PORT("SYSTEM") AM_WRITE(input_port_select_w ) |
| r22781 | r22782 | |
| 871 | 871 | AM_RANGE( 0x20, 0x20 ) AM_READWRITE(janptr96_unknown_r, janptr96_rambank_w ) |
| 872 | 872 | AM_RANGE( 0x50, 0x50 ) AM_WRITE(mjderngr_palbank_w ) |
| 873 | 873 | AM_RANGE( 0x60, 0x6f ) AM_DEVREADWRITE("rtc", msm6242_device, read, write) |
| 874 | AM_RANGE( 0x81, 0x81 ) AM_DEVREAD_LEGACY("aysnd", ay8910_r ) | |
| 875 | AM_RANGE( 0x82, 0x83 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w ) | |
| 874 | AM_RANGE( 0x81, 0x81 ) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 875 | AM_RANGE( 0x82, 0x83 ) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 876 | 876 | AM_RANGE( 0x93, 0x93 ) AM_WRITE(input_port_select_w ) |
| 877 | 877 | AM_RANGE( 0xd8, 0xd8 ) AM_WRITE(janptr96_coin_counter_w ) |
| 878 | 878 | AM_RANGE( 0xd9, 0xd9 ) AM_READ_PORT("SYSTEM") |
| r22781 | r22782 | |
| 901 | 901 | { |
| 902 | 902 | case 0x8000: return ioport("DSW4")->read(); // dsw 4 |
| 903 | 903 | case 0x8200: return ioport("DSW3")->read(); // dsw 3 |
| 904 | case 0x9001: return | |
| 904 | case 0x9001: return machine().device<ay8910_device>("aysnd")->data_r(space, 0); // inputs | |
| 905 | 905 | case 0x9011: return ioport("SYSTEM")->read(); |
| 906 | 906 | } |
| 907 | 907 | |
| r22781 | r22782 | |
| 923 | 923 | switch(offset) |
| 924 | 924 | { |
| 925 | 925 | case 0x8e00: m_palette_base = data & 0x1f; return; |
| 926 | case 0x9002: ay8910_data_w(machine().device("aysnd"),space,0,data); return; | |
| 927 | case 0x9003: ay8910_address_w(machine().device("aysnd"),space,0,data); return; | |
| 926 | case 0x9002: machine().device<ay8910_device>("aysnd")->data_w(space,0,data); return; | |
| 927 | case 0x9003: machine().device<ay8910_device>("aysnd")->address_w(space,0,data); return; | |
| 928 | 928 | case 0x9010: |
| 929 | 929 | mjifb_coin_counter_w(space,0,data); |
| 930 | 930 | return; |
| r22781 | r22782 | |
| 1010 | 1010 | { |
| 1011 | 1011 | case 0x8000: return ioport("DSW2")->read(); // dsw 2 |
| 1012 | 1012 | case 0x8001: return ioport("DSW1")->read(); // dsw 1 |
| 1013 | case 0x9001: return | |
| 1013 | case 0x9001: return machine().device<ay8910_device>("aysnd")->data_r(space, 0); // inputs | |
| 1014 | 1014 | case 0x9011: return ioport("SYSTEM")->read(); |
| 1015 | 1015 | } |
| 1016 | 1016 | |
| r22781 | r22782 | |
| 1031 | 1031 | switch(offset) |
| 1032 | 1032 | { |
| 1033 | 1033 | case 0x8802: m_palette_base = data & 0x1f; return; |
| 1034 | case 0x9002: ay8910_data_w(machine().device("aysnd"),space,0,data); return; | |
| 1035 | case 0x9003: ay8910_address_w(machine().device("aysnd"),space,0,data); return; | |
| 1034 | case 0x9002: machine().device<ay8910_device>("aysnd")->data_w(space,0,data); return; | |
| 1035 | case 0x9003: machine().device<ay8910_device>("aysnd")->address_w(space,0,data); return; | |
| 1036 | 1036 | case 0x9010: mjifb_coin_counter_w(space,0,data); return; |
| 1037 | 1037 | case 0x9011: input_port_select_w(space,0,data); return; |
| 1038 | 1038 | case 0x9013: |
| r22781 | r22782 | |
| 1078 | 1078 | static ADDRESS_MAP_START( mjtensin_map, AS_PROGRAM, 8, royalmah_state ) |
| 1079 | 1079 | AM_RANGE( 0x0000, 0x5fff ) AM_ROM |
| 1080 | 1080 | AM_RANGE( 0x6000, 0x6fbf ) AM_RAM |
| 1081 | AM_RANGE( 0x6fc1, 0x6fc1 ) AM_DEVREAD_LEGACY("aysnd", ay8910_r ) | |
| 1082 | AM_RANGE( 0x6fc2, 0x6fc3 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w ) | |
| 1081 | AM_RANGE( 0x6fc1, 0x6fc1 ) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 1082 | AM_RANGE( 0x6fc2, 0x6fc3 ) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 1083 | 1083 | AM_RANGE( 0x6fd0, 0x6fd0 ) AM_WRITE(janptr96_coin_counter_w ) |
| 1084 | 1084 | AM_RANGE( 0x6fd1, 0x6fd1 ) AM_READ_PORT("SYSTEM") AM_WRITE(input_port_select_w ) |
| 1085 | 1085 | AM_RANGE( 0x6fe0, 0x6fef ) AM_DEVREADWRITE("rtc", msm6242_device, read, write) |
| r22781 | r22782 | |
| 1146 | 1146 | static ADDRESS_MAP_START( cafetime_map, AS_PROGRAM, 8, royalmah_state ) |
| 1147 | 1147 | AM_RANGE( 0x0000, 0x5fff ) AM_ROM |
| 1148 | 1148 | AM_RANGE( 0x6000, 0x7eff ) AM_RAM AM_SHARE("nvram") |
| 1149 | AM_RANGE( 0x7fc1, 0x7fc1 ) AM_DEVREAD_LEGACY("aysnd", ay8910_r ) | |
| 1150 | AM_RANGE( 0x7fc2, 0x7fc3 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w ) | |
| 1149 | AM_RANGE( 0x7fc1, 0x7fc1 ) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 1150 | AM_RANGE( 0x7fc2, 0x7fc3 ) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 1151 | 1151 | AM_RANGE( 0x7fd0, 0x7fd0 ) AM_WRITE(janptr96_coin_counter_w ) |
| 1152 | 1152 | AM_RANGE( 0x7fd1, 0x7fd1 ) AM_READ_PORT("SYSTEM") AM_WRITENOP |
| 1153 | 1153 | AM_RANGE( 0x7fd3, 0x7fd3 ) AM_WRITE(input_port_select_w ) |
| r22781 | r22782 | |
| 1250 | 1250 | AM_RANGE( 0x06000, 0x07fff ) AM_RAM AM_SHARE("nvram") |
| 1251 | 1251 | AM_RANGE( 0x08000, 0x0ffff ) AM_READWRITE(mjvegasa_rom_io_r, mjvegasa_rom_io_w) AM_SHARE("videoram") |
| 1252 | 1252 | |
| 1253 | AM_RANGE( 0x10001, 0x10001 ) AM_DEVREAD_LEGACY("aysnd", ay8910_r ) | |
| 1254 | AM_RANGE( 0x10002, 0x10003 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w ) | |
| 1253 | AM_RANGE( 0x10001, 0x10001 ) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 1254 | AM_RANGE( 0x10002, 0x10003 ) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 1255 | 1255 | AM_RANGE( 0x10010, 0x10010 ) AM_WRITE(mjvegasa_coin_counter_w ) |
| 1256 | 1256 | AM_RANGE( 0x10011, 0x10011 ) AM_READ_PORT("SYSTEM") AM_WRITE(input_port_select_w ) |
| 1257 | 1257 | AM_RANGE( 0x10013, 0x10013 ) AM_WRITE(input_port_select_w ) |
| r22781 | r22782 | |
|---|---|---|
| 87 | 87 | |
| 88 | 88 | static ADDRESS_MAP_START( marineb_io_map, AS_IO, 8, marineb_state ) |
| 89 | 89 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 90 | AM_RANGE(0x08, 0x09) AM_DEVWRITE | |
| 90 | AM_RANGE(0x08, 0x09) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 91 | 91 | ADDRESS_MAP_END |
| 92 | 92 | |
| 93 | 93 | static ADDRESS_MAP_START( wanted_io_map, AS_IO, 8, marineb_state ) |
| 94 | 94 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 95 | AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 96 | AM_RANGE(0x02, 0x03) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 95 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 96 | AM_RANGE(0x02, 0x03) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 97 | 97 | ADDRESS_MAP_END |
| 98 | 98 | |
| 99 | 99 |
| r22781 | r22782 | |
|---|---|---|
| 280 | 280 | AM_RANGE(0x2600, 0x27ff) AM_RAM |
| 281 | 281 | AM_RANGE(0x2800, 0x2800) AM_DEVWRITE("crtc", mc6845_device, address_w) |
| 282 | 282 | AM_RANGE(0x2801, 0x2801) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w) |
| 283 | AM_RANGE(0x3000, 0x3001) AM_DEVREADWRITE | |
| 283 | AM_RANGE(0x3000, 0x3001) AM_DEVREADWRITE("ay8910", ay8910_device, data_r, address_data_w) // FIXME | |
| 284 | 284 | AM_RANGE(0x3080, 0x3083) AM_DEVREADWRITE("pia0", pia6821_device, read, write) |
| 285 | 285 | AM_RANGE(0x3800, 0x3800) AM_READNOP // R (right after each read, another value is loaded to the ACCU, so it lacks of sense) |
| 286 | 286 | AM_RANGE(0x4000, 0xffff) AM_ROM |
| r22781 | r22782 | |
|---|---|---|
| 380 | 380 | static ADDRESS_MAP_START( nycaptor_sound_map, AS_PROGRAM, 8, nycaptor_state ) |
| 381 | 381 | AM_RANGE(0x0000, 0xbfff) AM_ROM |
| 382 | 382 | AM_RANGE(0xc000, 0xc7ff) AM_RAM |
| 383 | AM_RANGE(0xc800, 0xc801) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 384 | AM_RANGE(0xc802, 0xc803) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 383 | AM_RANGE(0xc800, 0xc801) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 384 | AM_RANGE(0xc802, 0xc803) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 385 | 385 | AM_RANGE(0xc900, 0xc90d) AM_DEVWRITE_LEGACY("msm", msm5232_w) |
| 386 | 386 | AM_RANGE(0xca00, 0xca00) AM_WRITENOP |
| 387 | 387 | AM_RANGE(0xcb00, 0xcb00) AM_WRITENOP |
| r22781 | r22782 | |
|---|---|---|
| 48 | 48 | /* Same as Tag Team */ |
| 49 | 49 | static ADDRESS_MAP_START( ssozumo_sound_map, AS_PROGRAM, 8, ssozumo_state ) |
| 50 | 50 | AM_RANGE(0x0000, 0x01ff) AM_RAM |
| 51 | AM_RANGE(0x2000, 0x2001) AM_DEVWRITE_LEGACY("ay1", ay8910_data_address_w) | |
| 52 | AM_RANGE(0x2002, 0x2003) AM_DEVWRITE_LEGACY("ay2", ay8910_data_address_w) | |
| 51 | AM_RANGE(0x2000, 0x2001) AM_DEVWRITE("ay1", ay8910_device, data_address_w) | |
| 52 | AM_RANGE(0x2002, 0x2003) AM_DEVWRITE("ay2", ay8910_device, data_address_w) | |
| 53 | 53 | AM_RANGE(0x2004, 0x2004) AM_DEVWRITE("dac", dac_device, write_signed8) |
| 54 | 54 | AM_RANGE(0x2005, 0x2005) AM_WRITE(sound_nmi_mask_w) |
| 55 | 55 | AM_RANGE(0x2007, 0x2007) AM_READ(soundlatch_byte_r) |
| r22781 | r22782 | |
|---|---|---|
| 368 | 368 | AM_RANGE(0x90, 0x90) AM_MIRROR(0x0f) AM_WRITE(kurukuru_bankswitch_w) |
| 369 | 369 | AM_RANGE(0xa0, 0xa0) AM_MIRROR(0x0f) AM_READ_PORT("IN0") |
| 370 | 370 | AM_RANGE(0xb0, 0xb0) AM_MIRROR(0x0f) AM_READ_PORT("IN1") |
| 371 | AM_RANGE(0xc0, 0xc0) AM_MIRROR(0x0f) AM_DEVREADWRITE_LEGACY("ym2149", ay8910_r, ay8910_address_w) | |
| 372 | AM_RANGE(0xd0, 0xd0) AM_MIRROR(0x0f) AM_DEVWRITE_LEGACY("ym2149", ay8910_data_w) | |
| 371 | AM_RANGE(0xc0, 0xc0) AM_MIRROR(0x0f) AM_DEVREADWRITE("ym2149", ay8910_device, data_r, address_w) | |
| 372 | AM_RANGE(0xd0, 0xd0) AM_MIRROR(0x0f) AM_DEVWRITE("ym2149", ay8910_device, data_w) | |
| 373 | 373 | ADDRESS_MAP_END |
| 374 | 374 | |
| 375 | 375 |
| r22781 | r22782 | |
|---|---|---|
| 225 | 225 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 226 | 226 | AM_RANGE(0x00, 0x00) AM_READ(question_r) |
| 227 | 227 | AM_RANGE(0x00, 0x03) AM_WRITE(question_w) |
| 228 | AM_RANGE(0x40, 0x41) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 229 | AM_RANGE(0x41, 0x41) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 228 | AM_RANGE(0x40, 0x41) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 229 | AM_RANGE(0x41, 0x41) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 230 | 230 | AM_RANGE(0x48, 0x4b) AM_DEVREADWRITE("pia0", pia6821_device, read, write) |
| 231 | 231 | AM_RANGE(0x50, 0x53) AM_READNOP |
| 232 | 232 | AM_RANGE(0x50, 0x53) AM_WRITENOP |
| r22781 | r22782 | |
| 243 | 243 | AM_RANGE(0x00, 0x03) AM_WRITE(question_w) |
| 244 | 244 | AM_RANGE(0x40, 0x40) AM_DEVWRITE("crtc", mc6845_device, address_w) |
| 245 | 245 | AM_RANGE(0x41, 0x41) AM_DEVWRITE("crtc", mc6845_device, register_w) |
| 246 | AM_RANGE(0x48, 0x49) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 247 | AM_RANGE(0x49, 0x49) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 246 | AM_RANGE(0x48, 0x49) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 247 | AM_RANGE(0x49, 0x49) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 248 | 248 | AM_RANGE(0x50, 0x53) AM_DEVREADWRITE("pia0", pia6821_device, read, write) //? |
| 249 | 249 | AM_RANGE(0x60, 0x63) AM_DEVREADWRITE("pia1", pia6821_device, read, write) |
| 250 | 250 | AM_RANGE(0x70, 0x73) AM_DEVREADWRITE("pia2", pia6821_device, read, write) |
| r22781 | r22782 | |
| 267 | 267 | AM_RANGE(0x68, 0x69) AM_READNOP |
| 268 | 268 | AM_RANGE(0x68, 0x6b) AM_WRITENOP |
| 269 | 269 | AM_RANGE(0x6b, 0x6b) AM_READNOP |
| 270 | AM_RANGE(0x78, 0x79) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 271 | AM_RANGE(0x79, 0x79) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 270 | AM_RANGE(0x78, 0x79) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 271 | AM_RANGE(0x79, 0x79) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 272 | 272 | AM_RANGE(0xc0, 0xc1) AM_READNOP |
| 273 | 273 | AM_RANGE(0xc0, 0xc3) AM_WRITENOP |
| 274 | 274 | ADDRESS_MAP_END |
| r22781 | r22782 | |
| 277 | 277 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 278 | 278 | AM_RANGE(0x40, 0x40) AM_DEVWRITE("crtc", mc6845_device, address_w) |
| 279 | 279 | AM_RANGE(0x41, 0x41) AM_DEVWRITE("crtc", mc6845_device, register_w) |
| 280 | AM_RANGE(0x48, 0x49) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 281 | AM_RANGE(0x49, 0x49) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 280 | AM_RANGE(0x48, 0x49) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 281 | AM_RANGE(0x49, 0x49) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 282 | 282 | AM_RANGE(0x58, 0x5b) AM_DEVREADWRITE("pia0", pia6821_device, read, write) /* confirmed */ |
| 283 | 283 | AM_RANGE(0x68, 0x6b) AM_DEVREADWRITE("pia1", pia6821_device, read, write) /* confirmed */ |
| 284 | 284 | AM_RANGE(0x78, 0x7b) AM_DEVREADWRITE("pia2", pia6821_device, read, write) /* confirmed */ |
| r22781 | r22782 | |
|---|---|---|
| 76 | 76 | if (((*m_ay8910_select & 0x20) == 0x20) && ((data & 0x20) == 0x00)) |
| 77 | 77 | { |
| 78 | 78 | /* bit 4 goes to the 8910 #0 BC1 pin */ |
| 79 | | |
| 79 | machine().device<ay8910_device>("ay1")->data_address_w(space, *m_ay8910_select >> 4, *m_ay8910_data); | |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | /* bit 7 goes to 8910 #1 BDIR pin */ |
| 83 | 83 | if (((*m_ay8910_select & 0x80) == 0x80) && ((data & 0x80) == 0x00)) |
| 84 | 84 | { |
| 85 | 85 | /* bit 6 goes to the 8910 #1 BC1 pin */ |
| 86 | | |
| 86 | machine().device<ay8910_device>("ay2")->data_address_w(space, *m_ay8910_select >> 6, *m_ay8910_data); | |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | *m_ay8910_select = data; |
| r22781 | r22782 | |
|---|---|---|
| 63 | 63 | AM_RANGE(0xf001, 0xf001) AM_READ(ssrj_wheel_r) |
| 64 | 64 | AM_RANGE(0xf002, 0xf002) AM_READ_PORT("IN2") |
| 65 | 65 | AM_RANGE(0xf003, 0xf003) AM_WRITENOP /* unknown */ |
| 66 | AM_RANGE(0xf401, 0xf401) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 67 | AM_RANGE(0xf400, 0xf401) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 66 | AM_RANGE(0xf401, 0xf401) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 67 | AM_RANGE(0xf400, 0xf401) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 68 | 68 | AM_RANGE(0xf800, 0xf800) AM_WRITENOP /* wheel ? */ |
| 69 | 69 | AM_RANGE(0xfc00, 0xfc00) AM_WRITENOP /* unknown */ |
| 70 | 70 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 607 | 607 | static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, cntsteer_state ) |
| 608 | 608 | AM_RANGE(0x0000, 0x01ff) AM_RAM |
| 609 | 609 | // AM_RANGE(0x1000, 0x1000) AM_WRITE(nmiack_w) |
| 610 | AM_RANGE(0x2000, 0x2000) AM_DEVWRITE_LEGACY("ay1", ay8910_data_w) | |
| 611 | AM_RANGE(0x4000, 0x4000) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) | |
| 612 | AM_RANGE(0x6000, 0x6000) AM_DEVWRITE_LEGACY("ay2", ay8910_data_w) | |
| 613 | AM_RANGE(0x8000, 0x8000) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) | |
| 610 | AM_RANGE(0x2000, 0x2000) AM_DEVWRITE("ay1", ay8910_device, data_w) | |
| 611 | AM_RANGE(0x4000, 0x4000) AM_DEVWRITE("ay1", ay8910_device, address_w) | |
| 612 | AM_RANGE(0x6000, 0x6000) AM_DEVWRITE("ay2", ay8910_device, data_w) | |
| 613 | AM_RANGE(0x8000, 0x8000) AM_DEVWRITE("ay2", ay8910_device, address_w) | |
| 614 | 614 | AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) |
| 615 | 615 | AM_RANGE(0xd000, 0xd000) AM_WRITE(nmimask_w) |
| 616 | 616 | AM_RANGE(0xe000, 0xffff) AM_ROM |
| r22781 | r22782 | |
|---|---|---|
| 27 | 27 | : driver_device(mconfig, type, tag), |
| 28 | 28 | m_tlc34076(*this, "tlc34076"), |
| 29 | 29 | m_tms_vram(*this, "tms_vram"), |
| 30 | m_68hc11(*this, "68hc11"){ } | |
| 30 | m_68hc11(*this, "68hc11"), | |
| 31 | m_ay(*this, "aysnd") | |
| 32 | { | |
| 33 | } | |
| 31 | 34 | |
| 32 | 35 | required_device<tlc34076_device> m_tlc34076; |
| 33 | 36 | required_shared_ptr<UINT16> m_tms_vram; |
| r22781 | r22782 | |
| 35 | 38 | UINT8 m_ay_sel; |
| 36 | 39 | UINT8 m_lastdataw; |
| 37 | 40 | UINT16 m_lastdatar; |
| 38 | device_t *m_ay; | |
| 39 | 41 | device_t *m_tms; |
| 40 | 42 | DECLARE_READ16_MEMBER(ramdac_r); |
| 41 | 43 | DECLARE_WRITE16_MEMBER(ramdac_w); |
| r22781 | r22782 | |
| 47 | 49 | virtual void machine_reset(); |
| 48 | 50 | virtual void video_start(); |
| 49 | 51 | required_device<cpu_device> m_68hc11; |
| 52 | required_device<ay8910_device> m_ay; | |
| 50 | 53 | }; |
| 51 | 54 | |
| 52 | 55 | |
| r22781 | r22782 | |
| 58 | 61 | |
| 59 | 62 | void skeetsht_state::machine_reset() |
| 60 | 63 | { |
| 61 | m_ay = machine().device("aysnd"); | |
| 62 | 64 | m_tms = machine().device("tms"); |
| 63 | 65 | } |
| 64 | 66 | |
| r22781 | r22782 | |
| 163 | 165 | WRITE8_MEMBER(skeetsht_state::ay8910_w) |
| 164 | 166 | { |
| 165 | 167 | if (m_ay_sel) |
| 166 | ay | |
| 168 | m_ay->data_w(space, 0, data); | |
| 167 | 169 | else |
| 168 | ay | |
| 170 | m_ay->address_w(space, 0, data); | |
| 169 | 171 | } |
| 170 | 172 | |
| 171 | 173 |
| r22781 | r22782 | |
|---|---|---|
| 394 | 394 | AM_RANGE(0x02000000, 0x02ffffff) AM_ROM AM_REGION("user1", 0) |
| 395 | 395 | AM_RANGE(0x04000000, 0x04003fff) AM_RAM AM_SHARE("nvram") |
| 396 | 396 | AM_RANGE(0x04100000, 0x041000ff) AM_DEVREADWRITE8("tlc34076", tlc34076_device, read, write, 0x00ff) |
| 397 | AM_RANGE(0x04200000, 0x0420000f) AM_DEVREAD8_LEGACY("ym1", ay8910_r, 0x00ff) | |
| 398 | AM_RANGE(0x04200000, 0x0420001f) AM_DEVWRITE8_LEGACY("ym1", ay8910_address_data_w, 0x00ff) | |
| 399 | AM_RANGE(0x04200100, 0x0420010f) AM_DEVREAD8_LEGACY("ym2", ay8910_r, 0x00ff) | |
| 400 | AM_RANGE(0x04200100, 0x0420011f) AM_DEVWRITE8_LEGACY("ym2", ay8910_address_data_w, 0x00ff) | |
| 397 | AM_RANGE(0x04200000, 0x0420000f) AM_DEVREAD8("ym1", ay8910_device, data_r, 0x00ff) | |
| 398 | AM_RANGE(0x04200000, 0x0420001f) AM_DEVWRITE8("ym1", ay8910_device, address_data_w, 0x00ff) | |
| 399 | AM_RANGE(0x04200100, 0x0420010f) AM_DEVREAD8("ym2", ay8910_device, data_r, 0x00ff) | |
| 400 | AM_RANGE(0x04200100, 0x0420011f) AM_DEVWRITE8("ym2", ay8910_device, address_data_w, 0x00ff) | |
| 401 | 401 | AM_RANGE(0x04400000, 0x0440007f) AM_WRITE(tickee_control_w) AM_SHARE("control") |
| 402 | 402 | AM_RANGE(0x04400040, 0x0440004f) AM_READ_PORT("IN2") |
| 403 | 403 | AM_RANGE(0xc0000000, 0xc00001ff) AM_READWRITE_LEGACY(tms34010_io_register_r, tms34010_io_register_w) |
| r22781 | r22782 | |
| 412 | 412 | AM_RANGE(0x02000000, 0x02ffffff) AM_ROM AM_REGION("user1", 0) |
| 413 | 413 | AM_RANGE(0x04100000, 0x04103fff) AM_RAM AM_SHARE("nvram") |
| 414 | 414 | AM_RANGE(0x04200000, 0x042000ff) AM_DEVREADWRITE8("tlc34076", tlc34076_device, read, write, 0x00ff) |
| 415 | AM_RANGE(0x04300000, 0x0430000f) AM_DEVREAD8_LEGACY("ym1", ay8910_r, 0x00ff) | |
| 416 | AM_RANGE(0x04300000, 0x0430001f) AM_DEVWRITE8_LEGACY("ym1", ay8910_address_data_w, 0x00ff) | |
| 417 | AM_RANGE(0x04300100, 0x0430010f) AM_DEVREAD8_LEGACY("ym2", ay8910_r, 0x00ff) | |
| 418 | AM_RANGE(0x04300100, 0x0430011f) AM_DEVWRITE8_LEGACY("ym2", ay8910_address_data_w, 0x00ff) | |
| 415 | AM_RANGE(0x04300000, 0x0430000f) AM_DEVREAD8("ym1", ay8910_device, data_r, 0x00ff) | |
| 416 | AM_RANGE(0x04300000, 0x0430001f) AM_DEVWRITE8("ym1", ay8910_device, address_data_w, 0x00ff) | |
| 417 | AM_RANGE(0x04300100, 0x0430010f) AM_DEVREAD8("ym2", ay8910_device, data_r, 0x00ff) | |
| 418 | AM_RANGE(0x04300100, 0x0430011f) AM_DEVWRITE8("ym2", ay8910_device, address_data_w, 0x00ff) | |
| 419 | 419 | AM_RANGE(0x04500000, 0x0450007f) AM_WRITE(tickee_control_w) AM_SHARE("control") |
| 420 | 420 | AM_RANGE(0xc0000000, 0xc00001ff) AM_READWRITE_LEGACY(tms34010_io_register_r, tms34010_io_register_w) |
| 421 | 421 | AM_RANGE(0xc0000240, 0xc000025f) AM_WRITENOP /* seems to be a bug in their code */ |
| r22781 | r22782 | |
| 428 | 428 | AM_RANGE(0x02000000, 0x02ffffff) AM_ROM AM_REGION("user1", 0) |
| 429 | 429 | AM_RANGE(0x04000000, 0x04003fff) AM_RAM AM_SHARE("nvram") |
| 430 | 430 | AM_RANGE(0x04100000, 0x041000ff) AM_DEVREADWRITE8("tlc34076", tlc34076_device, read, write, 0x00ff) |
| 431 | AM_RANGE(0x04200000, 0x0420000f) AM_DEVREAD8_LEGACY("ym", ay8910_r, 0x00ff) | |
| 432 | AM_RANGE(0x04200000, 0x0420000f) AM_DEVWRITE8_LEGACY("ym", ay8910_address_data_w, 0x00ff) | |
| 431 | AM_RANGE(0x04200000, 0x0420000f) AM_DEVREAD8("ym", ay8910_device, data_r, 0x00ff) | |
| 432 | AM_RANGE(0x04200000, 0x0420000f) AM_DEVWRITE8("ym", ay8910_device, address_data_w, 0x00ff) | |
| 433 | 433 | AM_RANGE(0x04200100, 0x0420010f) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff) |
| 434 | 434 | AM_RANGE(0x04400000, 0x0440007f) AM_WRITE(tickee_control_w) AM_SHARE("control") |
| 435 | 435 | AM_RANGE(0x04400040, 0x0440004f) AM_READ_PORT("IN2") // ? |
| r22781 | r22782 | |
|---|---|---|
| 75 | 75 | AM_RANGE(0x4000, 0x47ff) AM_RAM |
| 76 | 76 | AM_RANGE(0x4000, 0x47ff) AM_WRITEONLY |
| 77 | 77 | AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r) |
| 78 | AM_RANGE(0x8000, 0x8001) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 79 | AM_RANGE(0xc000, 0xc001) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 78 | AM_RANGE(0x8000, 0x8001) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 79 | AM_RANGE(0xc000, 0xc001) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 80 | 80 | ADDRESS_MAP_END |
| 81 | 81 | |
| 82 | 82 |
| r22781 | r22782 | |
|---|---|---|
| 1485 | 1485 | AM_RANGE(0x2800, 0x2800) AM_RAM // W |
| 1486 | 1486 | AM_RANGE(0x2A00, 0x2A02) AM_READWRITE(latch_r, latch_w) |
| 1487 | 1487 | AM_RANGE(0x2E00, 0x2E00) AM_READ(int_latch_r) |
| 1488 | AM_RANGE(0x3001, 0x3001) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 1489 | AM_RANGE(0x3201, 0x3201) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 1488 | AM_RANGE(0x3001, 0x3001) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 1489 | AM_RANGE(0x3201, 0x3201) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 1490 | 1490 | AM_RANGE(0x3404, 0x3404) AM_DEVREADWRITE("acia6850_1", acia6850_device, status_read, control_write) |
| 1491 | 1491 | AM_RANGE(0x3405, 0x3405) AM_DEVREADWRITE("acia6850_1", acia6850_device, data_read, data_write) |
| 1492 | 1492 | AM_RANGE(0x3406, 0x3406) AM_DEVREADWRITE("acia6850_2", acia6850_device, status_read, control_write) |
| r22781 | r22782 | |
|---|---|---|
| 182 | 182 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 183 | 183 | AM_RANGE(0x00, 0x01) AM_WRITE(speedatk_6845_w) //h46505 address / data routing |
| 184 | 184 | AM_RANGE(0x24, 0x24) AM_WRITE(watchdog_reset_w) |
| 185 | AM_RANGE(0x40, 0x40) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 186 | AM_RANGE(0x40, 0x41) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 185 | AM_RANGE(0x40, 0x40) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 186 | AM_RANGE(0x40, 0x41) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 187 | 187 | //what's 60-6f for? Seems used only in attract mode and read back when a 2p play ends ... |
| 188 | 188 | ADDRESS_MAP_END |
| 189 | 189 |
| r22781 | r22782 | |
|---|---|---|
| 162 | 162 | |
| 163 | 163 | static ADDRESS_MAP_START( cpu2_port_map, AS_IO, 8, vastar_state ) |
| 164 | 164 | ADDRESS_MAP_GLOBAL_MASK(0x0f) |
| 165 | AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 166 | AM_RANGE(0x02, 0x02) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 165 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 166 | AM_RANGE(0x02, 0x02) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 167 | 167 | ADDRESS_MAP_END |
| 168 | 168 | |
| 169 | 169 |
| r22781 | r22782 | |
|---|---|---|
| 182 | 182 | |
| 183 | 183 | static ADDRESS_MAP_START( wink_sound_io, AS_IO, 8, wink_state ) |
| 184 | 184 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 185 | AM_RANGE(0x00, 0x00) AM_DEVREADWRITE_LEGACY("aysnd", ay8910_r, ay8910_data_w) | |
| 186 | AM_RANGE(0x80, 0x80) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 185 | AM_RANGE(0x00, 0x00) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, data_w) | |
| 186 | AM_RANGE(0x80, 0x80) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 187 | 187 | ADDRESS_MAP_END |
| 188 | 188 | |
| 189 | 189 | static INPUT_PORTS_START( wink ) |
| r22781 | r22782 | |
|---|---|---|
| 54 | 54 | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| 55 | 55 | AM_RANGE(0x4000, 0x47ff) AM_RAM |
| 56 | 56 | AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r) |
| 57 | AM_RANGE(0x8000, 0x8001) AM_DEVWRITE | |
| 57 | AM_RANGE(0x8000, 0x8001) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 58 | 58 | AM_RANGE(0x8002, 0x8002) AM_DEVWRITE("sn1", sn76489_device, write) |
| 59 | 59 | AM_RANGE(0x8003, 0x8003) AM_DEVWRITE("sn2", sn76489_device, write) |
| 60 | 60 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 158 | 158 | AM_RANGE(0x8000, 0x87ff) AM_RAM |
| 159 | 159 | AM_RANGE(0xa000, 0xa000) AM_READ(sound_command_r) |
| 160 | 160 | AM_RANGE(0xc000, 0xc000) AM_READ(sound_ack_r) |
| 161 | AM_RANGE(0xe000, 0xe001) AM_DEVWRITE | |
| 161 | AM_RANGE(0xe000, 0xe001) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 162 | 162 | AM_RANGE(0xe002, 0xe003) AM_WRITENOP // ? always FFFF, snkwave leftover? |
| 163 | AM_RANGE(0xe008, 0xe009) AM_DEVWRITE | |
| 163 | AM_RANGE(0xe008, 0xe009) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 164 | 164 | ADDRESS_MAP_END |
| 165 | 165 | |
| 166 | 166 | static ADDRESS_MAP_START( sound_portmap, AS_IO, 8, mainsnk_state ) |
| r22781 | r22782 | |
|---|---|---|
| 715 | 715 | AM_RANGE(0x2E00, 0x2E00) AM_READ(irqlatch_r) // irq latch |
| 716 | 716 | |
| 717 | 717 | AM_RANGE(0x3001, 0x3001) AM_READ(soundlatch_byte_r) |
| 718 | AM_RANGE(0x3001, 0x3001) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 719 | AM_RANGE(0x3101, 0x3201) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 718 | AM_RANGE(0x3001, 0x3001) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 719 | AM_RANGE(0x3101, 0x3201) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 720 | 720 | |
| 721 | 721 | AM_RANGE(0x3406, 0x3406) AM_READWRITE(aciastat_r,aciactrl_w) // MC6850 status register |
| 722 | 722 | AM_RANGE(0x3407, 0x3407) AM_READWRITE(aciadata_r,aciadata_w) // MC6850 data register |
| r22781 | r22782 | |
|---|---|---|
| 541 | 541 | |
| 542 | 542 | static ADDRESS_MAP_START( tx1_sound_io, AS_IO, 8, tx1_state ) |
| 543 | 543 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 544 | AM_RANGE(0x40, 0x41) AM_DEVWRITE | |
| 544 | AM_RANGE(0x40, 0x41) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 545 | 545 | ADDRESS_MAP_END |
| 546 | 546 | |
| 547 | 547 | |
| r22781 | r22782 | |
| 616 | 616 | /* Common */ |
| 617 | 617 | static ADDRESS_MAP_START( buggyboy_sound_io, AS_IO, 8, tx1_state ) |
| 618 | 618 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 619 | AM_RANGE(0x40, 0x40) AM_DEVREAD_LEGACY("ym1", ay8910_r) | |
| 620 | AM_RANGE(0x40, 0x41) AM_DEVWRITE_LEGACY("ym1", ay8910_data_address_w) | |
| 621 | AM_RANGE(0x80, 0x80) AM_DEVREAD_LEGACY("ym2", ay8910_r) | |
| 622 | AM_RANGE(0x80, 0x81) AM_DEVWRITE_LEGACY("ym2", ay8910_data_address_w) | |
| 619 | AM_RANGE(0x40, 0x40) AM_DEVREAD("ym1", ay8910_device, data_r) | |
| 620 | AM_RANGE(0x40, 0x41) AM_DEVWRITE("ym1", ay8910_device, data_address_w) | |
| 621 | AM_RANGE(0x80, 0x80) AM_DEVREAD("ym2", ay8910_device, data_r) | |
| 622 | AM_RANGE(0x80, 0x81) AM_DEVWRITE("ym2", ay8910_device, data_address_w) | |
| 623 | 623 | ADDRESS_MAP_END |
| 624 | 624 | |
| 625 | 625 |
| r22781 | r22782 | |
|---|---|---|
| 198 | 198 | |
| 199 | 199 | // ay8910 control port |
| 200 | 200 | if (m_p1 == 0xfc) |
| 201 | | |
| 201 | machine().device<ay8910_device>("aysnd")->address_w(space, 0, data); | |
| 202 | 202 | |
| 203 | 203 | // ay8910_write_port_0_w |
| 204 | 204 | if (m_p1 == 0xfe) |
| 205 | | |
| 205 | machine().device<ay8910_device>("aysnd")->data_w(space, 0, data); | |
| 206 | 206 | } |
| 207 | 207 | } |
| 208 | 208 |
| r22781 | r22782 | |
|---|---|---|
| 50 | 50 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 51 | 51 | // AM_RANGE(0x00, 0x00) AM_WRITE_LEGACY(nb1413m3_nmi_clock_w) |
| 52 | 52 | AM_RANGE(0x00, 0x7f) AM_READ_LEGACY(nb1413m3_sndrom_r) |
| 53 | AM_RANGE(0x81, 0x81) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 54 | AM_RANGE(0x82, 0x83) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 53 | AM_RANGE(0x81, 0x81) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 54 | AM_RANGE(0x82, 0x83) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 55 | 55 | AM_RANGE(0x90, 0x90) AM_READ_PORT("SYSTEM") |
| 56 | 56 | AM_RANGE(0x90, 0x97) AM_WRITE(hyhoo_blitter_w) |
| 57 | 57 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r, nb1413m3_inputportsel_w) |
| r22781 | r22782 | |
|---|---|---|
| 309 | 309 | |
| 310 | 310 | static ADDRESS_MAP_START( chinhero_bbx_portmap, AS_IO, 8, shangkid_state ) |
| 311 | 311 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 312 | AM_RANGE(0x00, 0x01) AM_DEVWRITE | |
| 312 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 313 | 313 | ADDRESS_MAP_END |
| 314 | 314 | |
| 315 | 315 | static ADDRESS_MAP_START( shangkid_bbx_portmap, AS_IO, 8, shangkid_state ) |
| 316 | 316 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 317 | AM_RANGE(0x00, 0x01) AM_DEVWRITE | |
| 317 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 318 | 318 | ADDRESS_MAP_END |
| 319 | 319 | |
| 320 | 320 | /***************************************************************************************/ |
| r22781 | r22782 | |
| 446 | 446 | static ADDRESS_MAP_START( dynamski_portmap, AS_IO, 8, shangkid_state ) |
| 447 | 447 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 448 | 448 | /* ports are reversed */ |
| 449 | AM_RANGE(0x00, 0x01) AM_DEVWRITE | |
| 449 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 450 | 450 | ADDRESS_MAP_END |
| 451 | 451 | |
| 452 | 452 | static MACHINE_CONFIG_START( dynamski, shangkid_state ) |
| r22781 | r22782 | |
|---|---|---|
| 203 | 203 | static ADDRESS_MAP_START( audio_io_map, AS_IO, 8, thepit_state ) |
| 204 | 204 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 205 | 205 | AM_RANGE(0x00, 0x00) AM_WRITE(soundlatch_clear_byte_w) |
| 206 | AM_RANGE(0x8c, 0x8d) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 207 | AM_RANGE(0x8d, 0x8d) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 208 | AM_RANGE(0x8e, 0x8f) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 209 | AM_RANGE(0x8f, 0x8f) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 206 | AM_RANGE(0x8c, 0x8d) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 207 | AM_RANGE(0x8d, 0x8d) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 208 | AM_RANGE(0x8e, 0x8f) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 209 | AM_RANGE(0x8f, 0x8f) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 210 | 210 | ADDRESS_MAP_END |
| 211 | 211 | |
| 212 | 212 |
| r22781 | r22782 | |
|---|---|---|
| 191 | 191 | *************************************/ |
| 192 | 192 | |
| 193 | 193 | static ADDRESS_MAP_START( main_io_map, AS_IO, 8, arabian_state ) |
| 194 | AM_RANGE(0xc800, 0xc800) AM_MIRROR(0x01ff) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 195 | AM_RANGE(0xca00, 0xca00) AM_MIRROR(0x01ff) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 194 | AM_RANGE(0xc800, 0xc800) AM_MIRROR(0x01ff) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 195 | AM_RANGE(0xca00, 0xca00) AM_MIRROR(0x01ff) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 196 | 196 | ADDRESS_MAP_END |
| 197 | 197 | |
| 198 | 198 |
| r22781 | r22782 | |
|---|---|---|
| 216 | 216 | AM_RANGE(0xf116, 0xf116) AM_WRITE(fastfred_flip_screen_x_w) |
| 217 | 217 | AM_RANGE(0xf117, 0xf117) AM_WRITE(fastfred_flip_screen_y_w) |
| 218 | 218 | //AM_RANGE(0xf800, 0xf800) AM_READ(watchdog_reset_r) // Why doesn't this work??? |
| 219 | AM_RANGE(0xf800, 0xf801) AM_READNOP AM_DEVWRITE | |
| 219 | AM_RANGE(0xf800, 0xf801) AM_READNOP AM_DEVWRITE("ay8910.1", ay8910_device, address_data_w) | |
| 220 | 220 | ADDRESS_MAP_END |
| 221 | 221 | |
| 222 | 222 | |
| r22781 | r22782 | |
| 252 | 252 | AM_RANGE(0x2000, 0x23ff) AM_RAM |
| 253 | 253 | AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r) AM_WRITE(sound_nmi_mask_w) |
| 254 | 254 | AM_RANGE(0x4000, 0x4000) AM_WRITEONLY // Reset PSG's |
| 255 | AM_RANGE(0x5000, 0x5001) AM_DEVWRITE_LEGACY("ay8910.1", ay8910_address_data_w) | |
| 256 | AM_RANGE(0x6000, 0x6001) AM_DEVWRITE_LEGACY("ay8910.2", ay8910_address_data_w) | |
| 255 | AM_RANGE(0x5000, 0x5001) AM_DEVWRITE("ay8910.1", ay8910_device, address_data_w) | |
| 256 | AM_RANGE(0x6000, 0x6001) AM_DEVWRITE("ay8910.2", ay8910_device, address_data_w) | |
| 257 | 257 | AM_RANGE(0x7000, 0x7000) AM_READNOP // only for Imago, read but not used |
| 258 | 258 | ADDRESS_MAP_END |
| 259 | 259 |
| r22781 | r22782 | |
|---|---|---|
| 253 | 253 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 254 | 254 | AM_RANGE(0x00, 0x00) AM_DEVWRITE("crtc", mc6845_device, address_w) |
| 255 | 255 | AM_RANGE(0x01, 0x01) AM_DEVWRITE("crtc", mc6845_device, register_w) |
| 256 | AM_RANGE(0x40, 0x40) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 257 | AM_RANGE(0x40, 0x41) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 256 | AM_RANGE(0x40, 0x40) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 257 | AM_RANGE(0x40, 0x41) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 258 | 258 | AM_RANGE(0x80, 0x83) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write) |
| 259 | 259 | AM_RANGE(0xc0, 0xc0) AM_WRITE(watchdog_reset_w) |
| 260 | 260 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 529 | 529 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 530 | 530 | AM_RANGE(0x2000, 0x27ff) AM_RAM |
| 531 | 531 | AM_RANGE(0x3100, 0x3103) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) |
| 532 | AM_RANGE(0x3381, 0x3382) AM_DEVWRITE | |
| 532 | AM_RANGE(0x3381, 0x3382) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 533 | 533 | AM_RANGE(0x3400, 0x3400) AM_READ(z80_8088_r) |
| 534 | 534 | AM_RANGE(0x3500, 0x3501) AM_READWRITE(p03_r, p03_w) |
| 535 | 535 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 382 | 382 | |
| 383 | 383 | static ADDRESS_MAP_START( cclimber_portmap, AS_IO, 8, cclimber_state ) |
| 384 | 384 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 385 | AM_RANGE(0x08, 0x09) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 386 | AM_RANGE(0x0c, 0x0c) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 385 | AM_RANGE(0x08, 0x09) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 386 | AM_RANGE(0x0c, 0x0c) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 387 | 387 | ADDRESS_MAP_END |
| 388 | 388 | |
| 389 | 389 | static ADDRESS_MAP_START( yamato_portmap, AS_IO, 8, cclimber_state ) |
| r22781 | r22782 | |
| 408 | 408 | |
| 409 | 409 | static ADDRESS_MAP_START( swimmer_audio_portmap, AS_IO, 8, cclimber_state ) |
| 410 | 410 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 411 | AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("ay1", ay8910_data_address_w) | |
| 412 | AM_RANGE(0x80, 0x81) AM_DEVWRITE_LEGACY("ay2", ay8910_data_address_w) | |
| 411 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("ay1", ay8910_device, data_address_w) | |
| 412 | AM_RANGE(0x80, 0x81) AM_DEVWRITE("ay2", ay8910_device, data_address_w) | |
| 413 | 413 | ADDRESS_MAP_END |
| 414 | 414 | |
| 415 | 415 | static ADDRESS_MAP_START( yamato_audio_portmap, AS_IO, 8, cclimber_state ) |
| 416 | 416 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 417 | AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 418 | AM_RANGE(0x02, 0x03) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 417 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 418 | AM_RANGE(0x02, 0x03) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 419 | 419 | AM_RANGE(0x04, 0x04) AM_READ(yamato_p0_r) /* ??? */ |
| 420 | 420 | AM_RANGE(0x08, 0x08) AM_READ(yamato_p1_r) /* ??? */ |
| 421 | 421 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 1143 | 1143 | case 0x02: |
| 1144 | 1144 | {/* CA2 = 0 CB2 = 1? : Write to selected PSG register and write data to Port A */ |
| 1145 | 1145 | pia6821_device *pia_ic6 = device->machine().device<pia6821_device>("pia_ic6"); |
| 1146 | device_t *ay = device->machine().device("ay8913"); | |
| 1147 | ay8910_data_w(ay, space, 0, pia_ic6->a_output()); | |
| 1146 | ay8910_device *ay8910 = device->machine().device<ay8910_device>("ay8913"); | |
| 1147 | ay8910->data_w(space, 0, pia_ic6->a_output()); | |
| 1148 | 1148 | LOG(("AY Chip Write \n")); |
| 1149 | 1149 | break; |
| 1150 | 1150 | } |
| r22781 | r22782 | |
| 1152 | 1152 | {/* CA2 = 1 CB2 = 1? : The register will now be selected and the user can read from or write to it. |
| 1153 | 1153 | The register will remain selected until another is chosen.*/ |
| 1154 | 1154 | pia6821_device *pia_ic6 = device->machine().device<pia6821_device>("pia_ic6"); |
| 1155 | device_t *ay = device->machine().device("ay8913"); | |
| 1156 | ay8910_address_w(ay, space, 0, pia_ic6->a_output()); | |
| 1155 | ay8910_device *ay8910 = device->machine().device<ay8910_device>("ay8913"); | |
| 1156 | ay8910->address_w(space, 0, pia_ic6->a_output()); | |
| 1157 | 1157 | LOG(("AY Chip Select \n")); |
| 1158 | 1158 | break; |
| 1159 | 1159 | } |
| r22781 | r22782 | |
|---|---|---|
| 141 | 141 | |
| 142 | 142 | static ADDRESS_MAP_START( vroulet_io_map, AS_IO, 8, vroulet_state ) |
| 143 | 143 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 144 | AM_RANGE(0x00, 0x00) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 145 | AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 144 | AM_RANGE(0x00, 0x00) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 145 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 146 | 146 | AM_RANGE(0x10, 0x13) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write) |
| 147 | 147 | AM_RANGE(0x80, 0x83) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) |
| 148 | 148 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 1918 | 1918 | AM_RANGE(0x3002c0, 0x3002c1) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff)// Sound |
| 1919 | 1919 | AM_RANGE(0x300300, 0x300303) AM_DEVWRITE8_LEGACY("ymsnd", ym2413_w, 0x00ff) |
| 1920 | 1920 | AM_RANGE(0x300340, 0x30035f) AM_DEVREADWRITE8("rtc", msm6242_device, read, write,0x00ff) |
| 1921 | AM_RANGE(0x300380, 0x300383) AM_DEVWRITE8_LEGACY("aysnd", ay8910_address_data_w, 0x00ff) | |
| 1922 | AM_RANGE(0x300384, 0x300385) AM_DEVREAD8_LEGACY("aysnd", ay8910_r, 0x00ff) | |
| 1921 | AM_RANGE(0x300380, 0x300383) AM_DEVWRITE8("aysnd", ay8910_device, address_data_w, 0x00ff) | |
| 1922 | AM_RANGE(0x300384, 0x300385) AM_DEVREAD8("aysnd", ay8910_device, data_r, 0x00ff) | |
| 1923 | 1923 | AM_RANGE(0x3003c2, 0x3003c3) AM_WRITE(quiz365_oki_bank1_w) |
| 1924 | 1924 | AM_RANGE(0x3003ca, 0x3003cb) AM_WRITE(ddenlovr_blitter_irq_ack_w) // Blitter irq acknowledge |
| 1925 | 1925 | AM_RANGE(0x3003cc, 0x3003cd) AM_WRITE(quiz365_oki_bank2_w) |
| r22781 | r22782 | |
| 1970 | 1970 | AM_RANGE(0x300086, 0x300087) AM_READ(ddenlovr_gfxrom_r) // Video Chip |
| 1971 | 1971 | AM_RANGE(0x3000c0, 0x3000c3) AM_DEVWRITE8_LEGACY("ymsnd", ym2413_w, 0x00ff) |
| 1972 | 1972 | AM_RANGE(0x300100, 0x30011f) AM_DEVREADWRITE8("rtc", msm6242_device, read, write,0x00ff) |
| 1973 | AM_RANGE(0x300140, 0x300143) AM_DEVWRITE8 | |
| 1973 | AM_RANGE(0x300140, 0x300143) AM_DEVWRITE8("aysnd", ay8910_device, address_data_w, 0x00ff) | |
| 1974 | 1974 | AM_RANGE(0x300180, 0x300181) AM_READ_PORT("P1") |
| 1975 | 1975 | AM_RANGE(0x300182, 0x300183) AM_READ_PORT("P2") |
| 1976 | 1976 | AM_RANGE(0x300184, 0x300185) AM_READ_PORT("SYSTEM") |
| r22781 | r22782 | |
| 2037 | 2037 | |
| 2038 | 2038 | AM_RANGE(0xe00400, 0xe00403) AM_DEVWRITE8_LEGACY("ymsnd", ym2413_w, 0x00ff) |
| 2039 | 2039 | AM_RANGE(0xe00500, 0xe0051f) AM_DEVREADWRITE8("rtc", msm6242_device, read, write,0x00ff) |
| 2040 | AM_RANGE(0xe00600, 0xe00603) AM_DEVWRITE8_LEGACY("aysnd", ay8910_address_data_w, 0x00ff) | |
| 2041 | AM_RANGE(0xe00604, 0xe00605) AM_DEVREAD8_LEGACY("aysnd", ay8910_r, 0x00ff) | |
| 2040 | AM_RANGE(0xe00600, 0xe00603) AM_DEVWRITE8("aysnd", ay8910_device, address_data_w, 0x00ff) | |
| 2041 | AM_RANGE(0xe00604, 0xe00605) AM_DEVREAD8("aysnd", ay8910_device, data_r, 0x00ff) | |
| 2042 | 2042 | AM_RANGE(0xe00700, 0xe00701) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff) // Sound |
| 2043 | 2043 | AM_RANGE(0xff0000, 0xffffff) AM_RAM // RAM |
| 2044 | 2044 | ADDRESS_MAP_END |
| r22781 | r22782 | |
| 2075 | 2075 | |
| 2076 | 2076 | AM_RANGE(0xe00400, 0xe00403) AM_DEVWRITE8_LEGACY("ymsnd", ym2413_w, 0x00ff) |
| 2077 | 2077 | AM_RANGE(0xe00500, 0xe0051f) AM_DEVREADWRITE8("rtc", msm6242_device, read, write,0x00ff) |
| 2078 | AM_RANGE(0xe00600, 0xe00603) AM_DEVWRITE8_LEGACY("aysnd", ay8910_address_data_w, 0x00ff) | |
| 2079 | AM_RANGE(0xe00604, 0xe00605) AM_DEVREAD8_LEGACY("aysnd", ay8910_r, 0x00ff) | |
| 2078 | AM_RANGE(0xe00600, 0xe00603) AM_DEVWRITE8("aysnd", ay8910_device, address_data_w, 0x00ff) | |
| 2079 | AM_RANGE(0xe00604, 0xe00605) AM_DEVREAD8("aysnd", ay8910_device, data_r, 0x00ff) | |
| 2080 | 2080 | AM_RANGE(0xe00700, 0xe00701) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff) // Sound |
| 2081 | 2081 | AM_RANGE(0xff0000, 0xffffff) AM_RAM // RAM |
| 2082 | 2082 | ADDRESS_MAP_END |
| r22781 | r22782 | |
| 2149 | 2149 | AM_RANGE(0x300086, 0x300087) AM_READ(ddenlovr_gfxrom_r) // Video Chip |
| 2150 | 2150 | AM_RANGE(0x3000c0, 0x3000c3) AM_DEVWRITE8_LEGACY("ymsnd", ym2413_w, 0x00ff) |
| 2151 | 2151 | AM_RANGE(0x300100, 0x30011f) AM_DEVREADWRITE8("rtc", msm6242_device, read, write,0x00ff) |
| 2152 | AM_RANGE(0x300140, 0x300143) AM_DEVWRITE8 | |
| 2152 | AM_RANGE(0x300140, 0x300143) AM_DEVWRITE8("aysnd", ay8910_device, address_data_w, 0x00ff) | |
| 2153 | 2153 | AM_RANGE(0x300180, 0x300181) AM_READ_PORT("P1") |
| 2154 | 2154 | AM_RANGE(0x300182, 0x300183) AM_READ_PORT("P2") |
| 2155 | 2155 | AM_RANGE(0x300184, 0x300185) AM_READ_PORT("SYSTEM") |
| r22781 | r22782 | |
| 2212 | 2212 | |
| 2213 | 2213 | AM_RANGE(0xe00400, 0xe00403) AM_DEVWRITE8_LEGACY("ymsnd", ym2413_w, 0x00ff) |
| 2214 | 2214 | AM_RANGE(0xe00500, 0xe0051f) AM_DEVREADWRITE8("rtc", msm6242_device, read, write,0x00ff) |
| 2215 | AM_RANGE(0xe00600, 0xe00603) AM_DEVWRITE8_LEGACY("aysnd", ay8910_address_data_w, 0x00ff) | |
| 2216 | AM_RANGE(0xe00604, 0xe00605) AM_DEVREAD8_LEGACY("aysnd", ay8910_r, 0x00ff) | |
| 2215 | AM_RANGE(0xe00600, 0xe00603) AM_DEVWRITE8("aysnd", ay8910_device, address_data_w, 0x00ff) | |
| 2216 | AM_RANGE(0xe00604, 0xe00605) AM_DEVREAD8("aysnd", ay8910_device, data_r, 0x00ff) | |
| 2217 | 2217 | AM_RANGE(0xe00700, 0xe00701) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff) // Sound |
| 2218 | 2218 | AM_RANGE(0xff0000, 0xffffff) AM_RAM AM_SHARE("nvram") // RAM (Battey-backed) |
| 2219 | 2219 | ADDRESS_MAP_END |
| r22781 | r22782 | |
| 2458 | 2458 | AM_RANGE(0x04, 0x04) AM_NOP // read only once at the start |
| 2459 | 2459 | AM_RANGE(0x06, 0x06) AM_WRITENOP // almost always 1, sometimes 0 |
| 2460 | 2460 | AM_RANGE(0x08, 0x09) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) |
| 2461 | AM_RANGE(0x0c, 0x0c) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 2462 | AM_RANGE(0x0e, 0x0e) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 2461 | AM_RANGE(0x0c, 0x0c) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 2462 | AM_RANGE(0x0e, 0x0e) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 2463 | 2463 | ADDRESS_MAP_END |
| 2464 | 2464 | |
| 2465 | 2465 | |
| r22781 | r22782 | |
| 2971 | 2971 | AM_RANGE(0x80, 0x80) AM_MIRROR(0xff00) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 2972 | 2972 | AM_RANGE(0xa0, 0xa1) AM_MIRROR(0xff00) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) |
| 2973 | 2973 | AM_RANGE(0xc0, 0xcf) AM_MIRROR(0xff00) AM_DEVREADWRITE("rtc", msm6242_device, read, write) |
| 2974 | AM_RANGE(0xe0, 0xe1) AM_MIRROR(0xff00) AM_DEVWRITE | |
| 2974 | AM_RANGE(0xe0, 0xe1) AM_MIRROR(0xff00) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 2975 | 2975 | ADDRESS_MAP_END |
| 2976 | 2976 | |
| 2977 | 2977 | |
| r22781 | r22782 | |
| 3079 | 3079 | AM_RANGE(0x23, 0x23) AM_READ(mjmyster_keyb_r) |
| 3080 | 3080 | AM_RANGE(0x40, 0x40) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 3081 | 3081 | AM_RANGE(0x42, 0x43) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) |
| 3082 | AM_RANGE(0x44, 0x44) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 3083 | AM_RANGE(0x46, 0x46) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 3084 | AM_RANGE(0x48, 0x48) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 3082 | AM_RANGE(0x44, 0x44) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 3083 | AM_RANGE(0x46, 0x46) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 3084 | AM_RANGE(0x48, 0x48) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 3085 | 3085 | AM_RANGE(0x60, 0x6f) AM_DEVREADWRITE("rtc", msm6242_device, read, write) |
| 3086 | 3086 | AM_RANGE(0x80, 0x83) AM_WRITE(ddenlovr_palette_base_w) |
| 3087 | 3087 | AM_RANGE(0x84, 0x87) AM_WRITE(ddenlovr_palette_mask_w) |
| r22781 | r22782 | |
| 3244 | 3244 | AM_RANGE(0x1c, 0x1c) AM_READNOP AM_WRITE(mjmyster_rambank_w) |
| 3245 | 3245 | AM_RANGE(0x1e, 0x1e) AM_WRITE(hginga_rombank_w) |
| 3246 | 3246 | AM_RANGE(0x22, 0x23) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) |
| 3247 | AM_RANGE(0x24, 0x24) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 3248 | AM_RANGE(0x26, 0x26) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 3249 | AM_RANGE(0x28, 0x28) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 3247 | AM_RANGE(0x24, 0x24) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 3248 | AM_RANGE(0x26, 0x26) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 3249 | AM_RANGE(0x28, 0x28) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 3250 | 3250 | AM_RANGE(0x40, 0x40) AM_WRITE(hginga_input_w) |
| 3251 | 3251 | AM_RANGE(0x41, 0x41) AM_WRITE(hginga_coins_w) |
| 3252 | 3252 | AM_RANGE(0x42, 0x42) AM_READ(hginga_coins_r) |
| r22781 | r22782 | |
| 3367 | 3367 | AM_RANGE(0x62, 0x62) AM_READ(hgokou_input_r) |
| 3368 | 3368 | AM_RANGE(0x80, 0x80) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 3369 | 3369 | AM_RANGE(0x82, 0x83) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) |
| 3370 | AM_RANGE(0x84, 0x84) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 3371 | AM_RANGE(0x86, 0x86) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 3372 | AM_RANGE(0x88, 0x88) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 3370 | AM_RANGE(0x84, 0x84) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 3371 | AM_RANGE(0x86, 0x86) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 3372 | AM_RANGE(0x88, 0x88) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 3373 | 3373 | AM_RANGE(0xb0, 0xb0) AM_READ(hanakanz_rand_r) |
| 3374 | 3374 | ADDRESS_MAP_END |
| 3375 | 3375 | |
| r22781 | r22782 | |
| 3410 | 3410 | AM_RANGE(0x1e, 0x1e) AM_WRITE(hginga_rombank_w) |
| 3411 | 3411 | AM_RANGE(0x20, 0x20) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 3412 | 3412 | AM_RANGE(0x22, 0x23) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) |
| 3413 | AM_RANGE(0x24, 0x24) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 3414 | AM_RANGE(0x26, 0x26) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 3415 | AM_RANGE(0x28, 0x28) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 3413 | AM_RANGE(0x24, 0x24) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 3414 | AM_RANGE(0x26, 0x26) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 3415 | AM_RANGE(0x28, 0x28) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 3416 | 3416 | AM_RANGE(0x40, 0x40) AM_WRITE(hgokou_dsw_sel_w) |
| 3417 | 3417 | AM_RANGE(0x41, 0x41) AM_WRITE(hgokou_input_w) |
| 3418 | 3418 | AM_RANGE(0x42, 0x42) AM_READ(hgokou_input_r) |
| r22781 | r22782 | |
| 3547 | 3547 | AM_RANGE(0x23, 0x23) AM_READ(mjmyster_keyb_r) |
| 3548 | 3548 | AM_RANGE(0x40, 0x40) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 3549 | 3549 | AM_RANGE(0x42, 0x43) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) |
| 3550 | AM_RANGE(0x44, 0x44) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 3551 | AM_RANGE(0x46, 0x46) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 3552 | AM_RANGE(0x48, 0x48) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 3550 | AM_RANGE(0x44, 0x44) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 3551 | AM_RANGE(0x46, 0x46) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 3552 | AM_RANGE(0x48, 0x48) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 3553 | 3553 | AM_RANGE(0x60, 0x6f) AM_DEVREADWRITE("rtc", msm6242_device, read, write) |
| 3554 | 3554 | AM_RANGE(0x80, 0x83) AM_WRITE(ddenlovr_palette_base_w) |
| 3555 | 3555 | AM_RANGE(0x84, 0x87) AM_WRITE(ddenlovr_palette_mask_w) |
| r22781 | r22782 | |
| 3648 | 3648 | |
| 3649 | 3649 | AM_RANGE(0xe00400, 0xe00403) AM_DEVWRITE8_LEGACY("ymsnd", ym2413_w, 0x00ff) |
| 3650 | 3650 | AM_RANGE(0xe00500, 0xe0051f) AM_DEVREADWRITE8("rtc", msm6242_device, read, write, 0x00ff) |
| 3651 | AM_RANGE(0xe00600, 0xe00603) AM_DEVWRITE8_LEGACY("aysnd", ay8910_address_data_w, 0x00ff) | |
| 3652 | AM_RANGE(0xe00604, 0xe00605) AM_DEVREAD8_LEGACY("aysnd", ay8910_r, 0x00ff) | |
| 3651 | AM_RANGE(0xe00600, 0xe00603) AM_DEVWRITE8("aysnd", ay8910_device, address_data_w, 0x00ff) | |
| 3652 | AM_RANGE(0xe00604, 0xe00605) AM_DEVREAD8("aysnd", ay8910_device, data_r, 0x00ff) | |
| 3653 | 3653 | AM_RANGE(0xe00700, 0xe00701) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff) // Sound |
| 3654 | 3654 | AM_RANGE(0xff0000, 0xffffff) AM_RAM // RAM |
| 3655 | 3655 | ADDRESS_MAP_END |
| r22781 | r22782 | |
| 3739 | 3739 | AM_RANGE(0x0184, 0x0184) AM_WRITE(mjflove_coincounter_w) |
| 3740 | 3740 | AM_RANGE(0x0200, 0x0201) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) |
| 3741 | 3741 | AM_RANGE(0x0280, 0x028f) AM_DEVREADWRITE("rtc", msm6242_device, read, write) |
| 3742 | AM_RANGE(0x0300, 0x0301) AM_DEVWRITE | |
| 3742 | AM_RANGE(0x0300, 0x0301) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 3743 | 3743 | AM_RANGE(0x0380, 0x0380) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 3744 | 3744 | ADDRESS_MAP_END |
| 3745 | 3745 | |
| r22781 | r22782 | |
| 3842 | 3842 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 3843 | 3843 | AM_RANGE(0x00, 0x00) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 3844 | 3844 | AM_RANGE(0x02, 0x03) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) |
| 3845 | AM_RANGE(0x04, 0x05) AM_DEVWRITE | |
| 3845 | AM_RANGE(0x04, 0x05) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 3846 | 3846 | AM_RANGE(0x1c, 0x1c) AM_READNOP AM_WRITE(sryudens_rambank_w) // ? ack on RTC int |
| 3847 | 3847 | AM_RANGE(0x1e, 0x1e) AM_WRITE(mjflove_rombank_w) |
| 3848 | 3848 | AM_RANGE(0x20, 0x23) AM_WRITE(ddenlovr_palette_base_w) |
| r22781 | r22782 | |
| 3929 | 3929 | AM_RANGE(0x80, 0x80) AM_RAM |
| 3930 | 3930 | AM_RANGE(0x90, 0x90) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 3931 | 3931 | AM_RANGE(0x92, 0x93) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) |
| 3932 | AM_RANGE(0x94, 0x95) AM_DEVWRITE | |
| 3932 | AM_RANGE(0x94, 0x95) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 3933 | 3933 | ADDRESS_MAP_END |
| 3934 | 3934 | |
| 3935 | 3935 | |
| r22781 | r22782 | |
| 4002 | 4002 | AM_RANGE(0x43, 0x43) AM_READ(rongrong_gfxrom_r) |
| 4003 | 4003 | AM_RANGE(0x50, 0x51) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) |
| 4004 | 4004 | AM_RANGE(0x54, 0x54) AM_DEVREADWRITE("oki", okim6295_device, read, write) |
| 4005 | AM_RANGE(0x58, 0x58) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 4006 | AM_RANGE(0x5c, 0x5c) AM_DEVREADWRITE_LEGACY("aysnd", ay8910_r, ay8910_data_w) // dsw | |
| 4005 | AM_RANGE(0x58, 0x58) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 4006 | AM_RANGE(0x5c, 0x5c) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, data_w) // dsw | |
| 4007 | 4007 | AM_RANGE(0x60, 0x60) AM_READNOP AM_WRITE(sryudens_rambank_w) // ? ack on RTC int |
| 4008 | 4008 | AM_RANGE(0x70, 0x70) AM_WRITE(seljan2_rombank_w) |
| 4009 | 4009 | AM_RANGE(0x80, 0x80) AM_READ_PORT("SYSTEM") AM_WRITE(seljan2_palette_enab_w) // writes: 1 = palette RAM at b000, 0 = ROM |
| r22781 | r22782 | |
| 4151 | 4151 | AM_RANGE( 0x21, 0x21 ) AM_WRITE(htengoku_coin_w) // |
| 4152 | 4152 | AM_RANGE( 0x22, 0x22 ) AM_READ(htengoku_coin_r) // |
| 4153 | 4153 | AM_RANGE( 0x23, 0x23 ) AM_READ(htengoku_input_r) // |
| 4154 | AM_RANGE( 0x40, 0x40 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) // AY8910 | |
| 4155 | AM_RANGE( 0x42, 0x42 ) AM_DEVREAD_LEGACY("aysnd", ay8910_r) // | |
| 4156 | AM_RANGE( 0x44, 0x44 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) // | |
| 4154 | AM_RANGE( 0x40, 0x40 ) AM_DEVWRITE("aysnd", ay8910_device, address_w) // AY8910 | |
| 4155 | AM_RANGE( 0x42, 0x42 ) AM_DEVREAD("aysnd", ay8910_device, data_r) // | |
| 4156 | AM_RANGE( 0x44, 0x44 ) AM_DEVWRITE("aysnd", ay8910_device, data_w) // | |
| 4157 | 4157 | AM_RANGE( 0x46, 0x47 ) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) // |
| 4158 | 4158 | AM_RANGE( 0x80, 0x8f ) AM_DEVREADWRITE("rtc", msm6242_device, read, write) |
| 4159 | 4159 | AM_RANGE( 0xa0, 0xa3 ) AM_WRITE(ddenlovr_palette_base_w) // ddenlovr mixer chip |
| r22781 | r22782 | |
|---|---|---|
| 160 | 160 | |
| 161 | 161 | READ16_MEMBER(kaneko16_state::kaneko16_ay1_YM2149_r) |
| 162 | 162 | { |
| 163 | device | |
| 163 | ay8910_device *ay8910 = machine().device<ay8910_device>("ay1"); | |
| 164 | 164 | /* Each 2149 register is mapped to a different address */ |
| 165 | ay8910_address_w(device,space,0,offset); | |
| 166 | return ay8910_r(device,space,0); | |
| 165 | ay8910->address_w(space,0,offset); | |
| 166 | return ay8910->data_r(space,0); | |
| 167 | 167 | } |
| 168 | 168 | |
| 169 | 169 | WRITE16_MEMBER(kaneko16_state::kaneko16_ay1_YM2149_w) |
| 170 | 170 | { |
| 171 | device | |
| 171 | ay8910_device *ay8910 = machine().device<ay8910_device>("ay1"); | |
| 172 | 172 | /* Each 2149 register is mapped to a different address */ |
| 173 | ay8910 | |
| 173 | ay8910->address_w(space,0,offset); | |
| 174 | 174 | /* The registers are mapped to odd addresses, except one! */ |
| 175 | if (ACCESSING_BITS_0_7) ay8910_data_w(device,space,0, data & 0xff); | |
| 176 | else ay8910_data_w(device,space,0,(data >> 8) & 0xff); | |
| 175 | if (ACCESSING_BITS_0_7) ay8910->data_w(space,0, data & 0xff); | |
| 176 | else ay8910->data_w(space,0,(data >> 8) & 0xff); | |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | READ16_MEMBER(kaneko16_state::kaneko16_ay2_YM2149_r) |
| 180 | 180 | { |
| 181 | device | |
| 181 | ay8910_device *ay8910 = machine().device<ay8910_device>("ay2"); | |
| 182 | 182 | /* Each 2149 register is mapped to a different address */ |
| 183 | ay8910_address_w(device,space,0,offset); | |
| 184 | return ay8910_r(device,space,0); | |
| 183 | ay8910->address_w(space,0,offset); | |
| 184 | return ay8910->data_r(space,0); | |
| 185 | 185 | } |
| 186 | 186 | |
| 187 | 187 | WRITE16_MEMBER(kaneko16_state::kaneko16_ay2_YM2149_w) |
| 188 | 188 | { |
| 189 | device | |
| 189 | ay8910_device *ay8910 = machine().device<ay8910_device>("ay2"); | |
| 190 | 190 | /* Each 2149 register is mapped to a different address */ |
| 191 | ay8910 | |
| 191 | ay8910->address_w(space,0,offset); | |
| 192 | 192 | /* The registers are mapped to odd addresses, except one! */ |
| 193 | if (ACCESSING_BITS_0_7) ay8910_data_w(device,space,0, data & 0xff); | |
| 194 | else ay8910_data_w(device,space,0,(data >> 8) & 0xff); | |
| 193 | if (ACCESSING_BITS_0_7) ay8910->data_w(space,0, data & 0xff); | |
| 194 | else ay8910->data_w(space,0,(data >> 8) & 0xff); | |
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 |
| r22781 | r22782 | |
|---|---|---|
| 177 | 177 | AM_RANGE(0xa800, 0xafff) AM_RAM_WRITE(nova2001_bg_videoram_w) AM_SHARE("bg_videoram") |
| 178 | 178 | AM_RANGE(0xb000, 0xb7ff) AM_RAM AM_SHARE("spriteram") |
| 179 | 179 | AM_RANGE(0xb800, 0xbfff) AM_WRITE(nova2001_flipscreen_w) |
| 180 | AM_RANGE(0xc000, 0xc000) AM_DEVREADWRITE_LEGACY("ay1", ay8910_r, ay8910_data_w) | |
| 181 | AM_RANGE(0xc001, 0xc001) AM_DEVREADWRITE_LEGACY("ay2", ay8910_r, ay8910_data_w) | |
| 182 | AM_RANGE(0xc002, 0xc002) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) | |
| 183 | AM_RANGE(0xc003, 0xc003) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) | |
| 180 | AM_RANGE(0xc000, 0xc000) AM_DEVREADWRITE("ay1", ay8910_device, data_r, data_w) | |
| 181 | AM_RANGE(0xc001, 0xc001) AM_DEVREADWRITE("ay2", ay8910_device, data_r, data_w) | |
| 182 | AM_RANGE(0xc002, 0xc002) AM_DEVWRITE("ay1", ay8910_device, address_w) | |
| 183 | AM_RANGE(0xc003, 0xc003) AM_DEVWRITE("ay2", ay8910_device, address_w) | |
| 184 | 184 | AM_RANGE(0xc004, 0xc004) AM_READ(watchdog_reset_r) |
| 185 | 185 | AM_RANGE(0xc006, 0xc006) AM_READ_PORT("IN0") |
| 186 | 186 | AM_RANGE(0xc007, 0xc007) AM_READ_PORT("IN1") |
| r22781 | r22782 | |
| 192 | 192 | static ADDRESS_MAP_START( ninjakun_cpu1_map, AS_PROGRAM, 8, nova2001_state ) |
| 193 | 193 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 194 | 194 | AM_RANGE(0x2000, 0x7fff) AM_ROM |
| 195 | AM_RANGE(0x8000, 0x8001) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 196 | AM_RANGE(0x8001, 0x8001) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 197 | AM_RANGE(0x8002, 0x8003) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 198 | AM_RANGE(0x8003, 0x8003) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 195 | AM_RANGE(0x8000, 0x8001) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 196 | AM_RANGE(0x8001, 0x8001) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 197 | AM_RANGE(0x8002, 0x8003) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 198 | AM_RANGE(0x8003, 0x8003) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 199 | 199 | AM_RANGE(0xa000, 0xa000) AM_READ_PORT("IN0") |
| 200 | 200 | AM_RANGE(0xa001, 0xa001) AM_READ_PORT("IN1") |
| 201 | 201 | AM_RANGE(0xa002, 0xa002) AM_READ_PORT("IN2") AM_WRITE(ninjakun_cpu1_io_A002_w) |
| r22781 | r22782 | |
| 211 | 211 | static ADDRESS_MAP_START( ninjakun_cpu2_map, AS_PROGRAM, 8, nova2001_state ) |
| 212 | 212 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 213 | 213 | AM_RANGE(0x2000, 0x7fff) AM_ROM AM_REGION("maincpu", 0x2000) |
| 214 | AM_RANGE(0x8000, 0x8001) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 215 | AM_RANGE(0x8001, 0x8001) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 216 | AM_RANGE(0x8002, 0x8003) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 217 | AM_RANGE(0x8003, 0x8003) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 214 | AM_RANGE(0x8000, 0x8001) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 215 | AM_RANGE(0x8001, 0x8001) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 216 | AM_RANGE(0x8002, 0x8003) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 217 | AM_RANGE(0x8003, 0x8003) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 218 | 218 | AM_RANGE(0xa000, 0xa000) AM_READ_PORT("IN0") |
| 219 | 219 | AM_RANGE(0xa001, 0xa001) AM_READ_PORT("IN1") |
| 220 | 220 | AM_RANGE(0xa002, 0xa002) AM_READ_PORT("IN2") AM_WRITE(ninjakun_cpu2_io_A002_w) |
| r22781 | r22782 | |
| 232 | 232 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 233 | 233 | AM_RANGE(0x8000, 0x87ff) AM_RAM AM_SHARE("spriteram") |
| 234 | 234 | AM_RANGE(0x8800, 0x8fff) AM_RAM_WRITE(nova2001_bg_videoram_w) AM_SHARE("bg_videoram") |
| 235 | AM_RANGE(0xa000, 0xa001) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 236 | AM_RANGE(0xa001, 0xa001) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 237 | AM_RANGE(0xa002, 0xa003) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 238 | AM_RANGE(0xa003, 0xa003) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 235 | AM_RANGE(0xa000, 0xa001) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 236 | AM_RANGE(0xa001, 0xa001) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 237 | AM_RANGE(0xa002, 0xa003) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 238 | AM_RANGE(0xa003, 0xa003) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 239 | 239 | AM_RANGE(0xc000, 0xc7ff) AM_RAM |
| 240 | 240 | AM_RANGE(0xe000, 0xffff) AM_ROM |
| 241 | 241 | ADDRESS_MAP_END |
| r22781 | r22782 | |
| 254 | 254 | AM_RANGE(0xa000, 0xa000) AM_WRITE(nova2001_scroll_x_w) |
| 255 | 255 | AM_RANGE(0xa001, 0xa001) AM_WRITE(nova2001_scroll_y_w) |
| 256 | 256 | AM_RANGE(0xa002, 0xa002) AM_WRITE(pkunwar_flipscreen_w) |
| 257 | AM_RANGE(0xc000, 0xc001) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 258 | AM_RANGE(0xc001, 0xc001) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 259 | AM_RANGE(0xc002, 0xc003) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 260 | AM_RANGE(0xc003, 0xc003) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 257 | AM_RANGE(0xc000, 0xc001) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 258 | AM_RANGE(0xc001, 0xc001) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 259 | AM_RANGE(0xc002, 0xc003) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 260 | AM_RANGE(0xc003, 0xc003) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 261 | 261 | AM_RANGE(0xd000, 0xd1ff) AM_RAM_WRITE(ninjakun_paletteram_w) AM_SHARE("paletteram") |
| 262 | 262 | AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_SHARE("share1") |
| 263 | 263 | ADDRESS_MAP_END |
| 264 | 264 | |
| 265 | 265 | static ADDRESS_MAP_START( raiders5_cpu2_map, AS_PROGRAM, 8, nova2001_state ) |
| 266 | 266 | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| 267 | AM_RANGE(0x8000, 0x8001) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 268 | AM_RANGE(0x8001, 0x8001) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 269 | AM_RANGE(0x8002, 0x8003) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 270 | AM_RANGE(0x8003, 0x8003) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 267 | AM_RANGE(0x8000, 0x8001) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 268 | AM_RANGE(0x8001, 0x8001) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 269 | AM_RANGE(0x8002, 0x8003) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 270 | AM_RANGE(0x8003, 0x8003) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 271 | 271 | AM_RANGE(0x9000, 0x9000) AM_READNOP /* unknown */ |
| 272 | 272 | AM_RANGE(0xa000, 0xa7ff) AM_RAM AM_SHARE("share1") |
| 273 | 273 | AM_RANGE(0xc000, 0xc000) AM_READNOP /* unknown */ |
| r22781 | r22782 | |
|---|---|---|
| 83 | 83 | |
| 84 | 84 | static ADDRESS_MAP_START( mouser_sound_io_map, AS_IO, 8, mouser_state ) |
| 85 | 85 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 86 | AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("ay1", ay8910_data_address_w) | |
| 87 | AM_RANGE(0x80, 0x81) AM_DEVWRITE_LEGACY("ay2", ay8910_data_address_w) | |
| 86 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("ay1", ay8910_device, data_address_w) | |
| 87 | AM_RANGE(0x80, 0x81) AM_DEVWRITE("ay2", ay8910_device, data_address_w) | |
| 88 | 88 | ADDRESS_MAP_END |
| 89 | 89 | |
| 90 | 90 | static INPUT_PORTS_START( mouser ) |
| r22781 | r22782 | |
|---|---|---|
| 76 | 76 | |
| 77 | 77 | static ADDRESS_MAP_START( scramble_sound_io_map, AS_IO, 8, scramble_state ) |
| 78 | 78 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 79 | AM_RANGE(0x10, 0x10) AM_DEVWRITE_LEGACY("8910.1", ay8910_address_w) | |
| 80 | AM_RANGE(0x20, 0x20) AM_DEVREADWRITE_LEGACY("8910.1", ay8910_r, ay8910_data_w) | |
| 81 | AM_RANGE(0x40, 0x40) AM_DEVWRITE_LEGACY("8910.2", ay8910_address_w) | |
| 82 | AM_RANGE(0x80, 0x80) AM_DEVREADWRITE_LEGACY("8910.2", ay8910_r, ay8910_data_w) | |
| 79 | AM_RANGE(0x10, 0x10) AM_DEVWRITE("8910.1", ay8910_device, address_w) | |
| 80 | AM_RANGE(0x20, 0x20) AM_DEVREADWRITE("8910.1", ay8910_device, data_r, data_w) | |
| 81 | AM_RANGE(0x40, 0x40) AM_DEVWRITE("8910.2", ay8910_device, address_w) | |
| 82 | AM_RANGE(0x80, 0x80) AM_DEVREADWRITE("8910.2", ay8910_device, data_r, data_w) | |
| 83 | 83 | ADDRESS_MAP_END |
| 84 | 84 | |
| 85 | 85 | |
| r22781 | r22782 | |
| 340 | 340 | |
| 341 | 341 | static ADDRESS_MAP_START( triplep_io_map, AS_IO, 8, scramble_state ) |
| 342 | 342 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 343 | AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("8910.1", ay8910_data_address_w) | |
| 344 | AM_RANGE(0x01, 0x01) AM_DEVREAD_LEGACY("8910.1", ay8910_r) | |
| 343 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("8910.1", ay8910_device, data_address_w) | |
| 344 | AM_RANGE(0x01, 0x01) AM_DEVREAD("8910.1", ay8910_device, data_r) | |
| 345 | 345 | AM_RANGE(0x02, 0x02) AM_READ(triplep_pip_r) |
| 346 | 346 | AM_RANGE(0x03, 0x03) AM_READ(triplep_pap_r) |
| 347 | 347 | ADDRESS_MAP_END |
| 348 | 348 | |
| 349 | 349 | static ADDRESS_MAP_START( hotshock_sound_io_map, AS_IO, 8, scramble_state ) |
| 350 | 350 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 351 | AM_RANGE(0x10, 0x10) AM_DEVWRITE_LEGACY("8910.1", ay8910_address_w) | |
| 352 | AM_RANGE(0x20, 0x20) AM_DEVREADWRITE_LEGACY("8910.1", ay8910_r, ay8910_data_w) | |
| 353 | AM_RANGE(0x40, 0x40) AM_DEVREADWRITE_LEGACY("8910.2", ay8910_r, ay8910_data_w) | |
| 354 | AM_RANGE(0x80, 0x80) AM_DEVWRITE_LEGACY("8910.2", ay8910_address_w) | |
| 351 | AM_RANGE(0x10, 0x10) AM_DEVWRITE("8910.1", ay8910_device, address_w) | |
| 352 | AM_RANGE(0x20, 0x20) AM_DEVREADWRITE("8910.1", ay8910_device, data_r, data_w) | |
| 353 | AM_RANGE(0x40, 0x40) AM_DEVREADWRITE("8910.2", ay8910_device, data_r, data_w) | |
| 354 | AM_RANGE(0x80, 0x80) AM_DEVWRITE("8910.2", ay8910_device, address_w) | |
| 355 | 355 | ADDRESS_MAP_END |
| 356 | 356 | |
| 357 | 357 | |
| r22781 | r22782 | |
| 414 | 414 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 415 | 415 | |
| 416 | 416 | // ports->speech?: |
| 417 | AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY ("8910.3", ay8910_address_w) | |
| 418 | AM_RANGE(0x08, 0x08) AM_DEVREADWRITE_LEGACY("8910.3", ay8910_r, ay8910_data_w) | |
| 417 | AM_RANGE(0x04, 0x04) AM_DEVWRITE("8910.3", ay8910_device, address_w) | |
| 418 | AM_RANGE(0x08, 0x08) AM_DEVREADWRITE("8910.3", ay8910_device, data_r, data_w) | |
| 419 | 419 | // same as scramble: |
| 420 | AM_RANGE(0x10, 0x10) AM_DEVWRITE_LEGACY ("8910.1", ay8910_address_w) | |
| 421 | AM_RANGE(0x20, 0x20) AM_DEVREADWRITE_LEGACY("8910.1", ay8910_r, ay8910_data_w) | |
| 422 | AM_RANGE(0x40, 0x40) AM_DEVWRITE_LEGACY ("8910.2", ay8910_address_w) | |
| 423 | AM_RANGE(0x80, 0x80) AM_DEVREADWRITE_LEGACY("8910.2", ay8910_r, ay8910_data_w) // read soundlatch | |
| 420 | AM_RANGE(0x10, 0x10) AM_DEVWRITE("8910.1", ay8910_device, address_w) | |
| 421 | AM_RANGE(0x20, 0x20) AM_DEVREADWRITE("8910.1", ay8910_device, data_r, data_w) | |
| 422 | AM_RANGE(0x40, 0x40) AM_DEVWRITE("8910.2", ay8910_device, address_w) | |
| 423 | AM_RANGE(0x80, 0x80) AM_DEVREADWRITE("8910.2", ay8910_device, data_r, data_w) // read soundlatch | |
| 424 | 424 | ADDRESS_MAP_END |
| 425 | 425 | |
| 426 | 426 |
| r22781 | r22782 | |
|---|---|---|
| 189 | 189 | |
| 190 | 190 | static ADDRESS_MAP_START( cpu3_port_map, AS_IO, 8, taxidriv_state ) |
| 191 | 191 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 192 | AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 193 | AM_RANGE(0x01, 0x01) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 194 | AM_RANGE(0x02, 0x03) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 195 | AM_RANGE(0x03, 0x03) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 192 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 193 | AM_RANGE(0x01, 0x01) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 194 | AM_RANGE(0x02, 0x03) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 195 | AM_RANGE(0x03, 0x03) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 196 | 196 | ADDRESS_MAP_END |
| 197 | 197 | |
| 198 | 198 |
| r22781 | r22782 | |
|---|---|---|
| 259 | 259 | |
| 260 | 260 | static ADDRESS_MAP_START( sound_port, AS_IO, 8, tehkanwc_state ) |
| 261 | 261 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 262 | AM_RANGE(0x00, 0x00) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 263 | AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("ay1", ay8910_data_address_w) | |
| 264 | AM_RANGE(0x02, 0x02) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 265 | AM_RANGE(0x02, 0x03) AM_DEVWRITE_LEGACY("ay2", ay8910_data_address_w) | |
| 262 | AM_RANGE(0x00, 0x00) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 263 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("ay1", ay8910_device, data_address_w) | |
| 264 | AM_RANGE(0x02, 0x02) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 265 | AM_RANGE(0x02, 0x03) AM_DEVWRITE("ay2", ay8910_device, data_address_w) | |
| 266 | 266 | ADDRESS_MAP_END |
| 267 | 267 | |
| 268 | 268 |
| r22781 | r22782 | |
|---|---|---|
| 200 | 200 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 201 | 201 | AM_RANGE(0x00, 0x00) AM_READWRITE(sw_r,disp_w) |
| 202 | 202 | AM_RANGE(0x01, 0x01) AM_WRITE(col_w) |
| 203 | // AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("ay8910_0", ay8910_address_w) | |
| 204 | // AM_RANGE(0x06, 0x06) AM_DEVWRITE_LEGACY("ay8910_0", ay8910_data_w) | |
| 205 | // AM_RANGE(0x08, 0x08) AM_DEVWRITE_LEGACY("ay8910_1", ay8910_address_w) | |
| 206 | // AM_RANGE(0x0a, 0x0a) AM_DEVWRITE_LEGACY("ay8910_1", ay8910_data_w) | |
| 203 | // AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("ay8910_0", ay8910_device, address_w) | |
| 204 | // AM_RANGE(0x06, 0x06) AM_DEVWRITE_LEGACY("ay8910_0", ay8910_device, data_w) | |
| 205 | // AM_RANGE(0x08, 0x08) AM_DEVWRITE_LEGACY("ay8910_1", ay8910_device, address_w) | |
| 206 | // AM_RANGE(0x0a, 0x0a) AM_DEVWRITE_LEGACY("ay8910_1", ay8910_device, data_w) | |
| 207 | 207 | AM_RANGE(0x0c, 0x0c) AM_WRITE(sol_w) |
| 208 | 208 | AM_RANGE(0x10, 0x18) AM_WRITE(lamp_w) |
| 209 | 209 | AM_RANGE(0x20, 0x20) AM_READ_PORT("DSW0") |
| r22781 | r22782 | |
|---|---|---|
| 116 | 116 | |
| 117 | 117 | #include "emu.h" |
| 118 | 118 | #include "cpu/z80/z80.h" |
| 119 | #include "sound/ay8910.h" | |
| 120 | 119 | #include "sound/msm5205.h" |
| 121 | 120 | #include "includes/mermaid.h" |
| 122 | 121 | |
| r22781 | r22782 | |
| 124 | 123 | |
| 125 | 124 | WRITE8_MEMBER(mermaid_state::mermaid_ay8910_write_port_w) |
| 126 | 125 | { |
| 127 | if (m_ay8910_enable[0]) ay8910_data_w(m_ay1, space, offset, data); | |
| 128 | if (m_ay8910_enable[1]) ay8910_data_w(m_ay2, space, offset, data); | |
| 126 | if (m_ay8910_enable[0]) m_ay1->data_w(space, offset, data); | |
| 127 | if (m_ay8910_enable[1]) m_ay2->data_w(space, offset, data); | |
| 129 | 128 | } |
| 130 | 129 | |
| 131 | 130 | WRITE8_MEMBER(mermaid_state::mermaid_ay8910_control_port_w) |
| 132 | 131 | { |
| 133 | if (m_ay8910_enable[0]) ay8910_address_w(m_ay1, space, offset, data); | |
| 134 | if (m_ay8910_enable[1]) ay8910_address_w(m_ay2, space, offset, data); | |
| 132 | if (m_ay8910_enable[0]) m_ay1->address_w(space, offset, data); | |
| 133 | if (m_ay8910_enable[1]) m_ay2->address_w(space, offset, data); | |
| 135 | 134 | } |
| 136 | 135 | |
| 137 | 136 | |
| r22781 | r22782 | |
| 360 | 359 | |
| 361 | 360 | void mermaid_state::machine_start() |
| 362 | 361 | { |
| 363 | m_ay1 = machine().device("ay1"); | |
| 364 | m_ay2 = machine().device("ay2"); | |
| 365 | ||
| 366 | 362 | save_item(NAME(m_coll_bit0)); |
| 367 | 363 | save_item(NAME(m_coll_bit1)); |
| 368 | 364 | save_item(NAME(m_coll_bit2)); |
| r22781 | r22782 | |
|---|---|---|
| 85 | 85 | |
| 86 | 86 | WRITE8_MEMBER(dynadice_state::sound_control_w) |
| 87 | 87 | { |
| 88 | device | |
| 88 | ay8910_device *ay8910 = machine().device<ay8910_device>("aysnd"); | |
| 89 | 89 | /* |
| 90 | 90 | AY 3-8910 : |
| 91 | 91 | |
| r22781 | r22782 | |
| 96 | 96 | |
| 97 | 97 | */ |
| 98 | 98 | if ((data & 7) == 7) |
| 99 | ay8910 | |
| 99 | ay8910->address_w(space, 0, m_ay_data); | |
| 100 | 100 | |
| 101 | 101 | if ((data & 7) == 6) |
| 102 | ay8910 | |
| 102 | ay8910->data_w(space, 0, m_ay_data); | |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 |
| r22781 | r22782 | |
|---|---|---|
| 628 | 628 | AM_RANGE(0x35, 0x35) AM_WRITE(ampoker2_port35_w) /* see write handlers */ |
| 629 | 629 | AM_RANGE(0x36, 0x36) AM_WRITE(ampoker2_port36_w) /* see write handlers */ |
| 630 | 630 | AM_RANGE(0x37, 0x37) AM_WRITE(ampoker2_watchdog_reset_w) |
| 631 | AM_RANGE(0x38, 0x39) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 632 | AM_RANGE(0x3A, 0x3A) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 631 | AM_RANGE(0x38, 0x39) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 632 | AM_RANGE(0x3A, 0x3A) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 633 | 633 | ADDRESS_MAP_END |
| 634 | 634 | |
| 635 | 635 | /* |
| r22781 | r22782 | |
|---|---|---|
| 225 | 225 | static ADDRESS_MAP_START( gameplan_audio_map, AS_PROGRAM, 8, gameplan_state ) |
| 226 | 226 | AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x1780) AM_RAM /* 6532 internal RAM */ |
| 227 | 227 | AM_RANGE(0x0800, 0x081f) AM_MIRROR(0x17e0) AM_DEVREADWRITE("riot", riot6532_device, read, write) |
| 228 | AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x1ffc) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 229 | AM_RANGE(0xa001, 0xa001) AM_MIRROR(0x1ffc) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 230 | AM_RANGE(0xa002, 0xa002) AM_MIRROR(0x1ffc) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 228 | AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x1ffc) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 229 | AM_RANGE(0xa001, 0xa001) AM_MIRROR(0x1ffc) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 230 | AM_RANGE(0xa002, 0xa002) AM_MIRROR(0x1ffc) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 231 | 231 | AM_RANGE(0xe000, 0xe7ff) AM_MIRROR(0x1800) AM_ROM |
| 232 | 232 | ADDRESS_MAP_END |
| 233 | 233 | |
| r22781 | r22782 | |
| 236 | 236 | static ADDRESS_MAP_START( leprechn_audio_map, AS_PROGRAM, 8, gameplan_state ) |
| 237 | 237 | AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x1780) AM_RAM /* 6532 internal RAM */ |
| 238 | 238 | AM_RANGE(0x0800, 0x081f) AM_MIRROR(0x17e0) AM_DEVREADWRITE("riot", riot6532_device, read, write) |
| 239 | AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x1ffc) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 240 | AM_RANGE(0xa001, 0xa001) AM_MIRROR(0x1ffc) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 241 | AM_RANGE(0xa002, 0xa002) AM_MIRROR(0x1ffc) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 239 | AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x1ffc) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 240 | AM_RANGE(0xa001, 0xa001) AM_MIRROR(0x1ffc) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 241 | AM_RANGE(0xa002, 0xa002) AM_MIRROR(0x1ffc) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 242 | 242 | AM_RANGE(0xe000, 0xefff) AM_MIRROR(0x1000) AM_ROM |
| 243 | 243 | ADDRESS_MAP_END |
| 244 | 244 |
| r22781 | r22782 | |
|---|---|---|
| 237 | 237 | static ADDRESS_MAP_START( koikoi_io_map, AS_IO, 8, koikoi_state ) |
| 238 | 238 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 239 | 239 | AM_RANGE(0x02, 0x02) AM_WRITENOP //watchdog |
| 240 | AM_RANGE(0x03, 0x03) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 241 | AM_RANGE(0x06, 0x07) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 240 | AM_RANGE(0x03, 0x03) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 241 | AM_RANGE(0x06, 0x07) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 242 | 242 | ADDRESS_MAP_END |
| 243 | 243 | |
| 244 | 244 | /************************************* |
| r22781 | r22782 | |
|---|---|---|
| 167 | 167 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 168 | 168 | AM_RANGE(0x98, 0x98) AM_DEVREADWRITE( "tms9928a", tms9928a_device, vram_read, vram_write ) |
| 169 | 169 | AM_RANGE(0x99, 0x99) AM_DEVREADWRITE( "tms9928a", tms9928a_device, register_read, register_write ) |
| 170 | AM_RANGE(0xa0, 0xa1) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 171 | AM_RANGE(0xa2, 0xa2) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 170 | AM_RANGE(0xa0, 0xa1) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 171 | AM_RANGE(0xa2, 0xa2) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 172 | 172 | AM_RANGE(0xa8, 0xab) AM_DEVREADWRITE("ppi8255", i8255_device, read, write) |
| 173 | 173 | ADDRESS_MAP_END |
| 174 | 174 |
| r22781 | r22782 | |
|---|---|---|
| 412 | 412 | |
| 413 | 413 | static ADDRESS_MAP_START( ssingles_io_map, AS_IO, 8, ssingles_state ) |
| 414 | 414 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 415 | AM_RANGE(0x00, 0x00) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) | |
| 416 | AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("ay1", ay8910_data_w) | |
| 417 | AM_RANGE(0x06, 0x06) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) | |
| 415 | AM_RANGE(0x00, 0x00) AM_DEVWRITE("ay1", ay8910_device, address_w) | |
| 416 | AM_RANGE(0x04, 0x04) AM_DEVWRITE("ay1", ay8910_device, data_w) | |
| 417 | AM_RANGE(0x06, 0x06) AM_DEVWRITE("ay2", ay8910_device, address_w) | |
| 418 | 418 | AM_RANGE(0x08, 0x08) AM_READNOP |
| 419 | AM_RANGE(0x0a, 0x0a) AM_DEVWRITE | |
| 419 | AM_RANGE(0x0a, 0x0a) AM_DEVWRITE("ay2", ay8910_device, data_w) | |
| 420 | 420 | AM_RANGE(0x16, 0x16) AM_READ_PORT("DSW0") |
| 421 | 421 | AM_RANGE(0x18, 0x18) AM_READ_PORT("DSW1") |
| 422 | 422 | AM_RANGE(0x1c, 0x1c) AM_READ_PORT("INPUTS") |
| r22781 | r22782 | |
| 427 | 427 | |
| 428 | 428 | static ADDRESS_MAP_START( atamanot_io_map, AS_IO, 8, ssingles_state ) |
| 429 | 429 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 430 | AM_RANGE(0x00, 0x00) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) | |
| 431 | AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("ay1", ay8910_data_w) | |
| 432 | AM_RANGE(0x06, 0x06) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) | |
| 430 | AM_RANGE(0x00, 0x00) AM_DEVWRITE("ay1", ay8910_device, address_w) | |
| 431 | AM_RANGE(0x04, 0x04) AM_DEVWRITE("ay1", ay8910_device, data_w) | |
| 432 | AM_RANGE(0x06, 0x06) AM_DEVWRITE("ay2", ay8910_device, address_w) | |
| 433 | 433 | AM_RANGE(0x08, 0x08) AM_READNOP |
| 434 | AM_RANGE(0x0a, 0x0a) AM_DEVWRITE | |
| 434 | AM_RANGE(0x0a, 0x0a) AM_DEVWRITE("ay2", ay8910_device, data_w) | |
| 435 | 435 | AM_RANGE(0x16, 0x16) AM_READ_PORT("DSW0") |
| 436 | 436 | AM_RANGE(0x18, 0x18) AM_READ_PORT("DSW1") AM_WRITE(atamanot_prot_w) |
| 437 | 437 | AM_RANGE(0x1c, 0x1c) AM_READ_PORT("INPUTS") |
| r22781 | r22782 | |
|---|---|---|
| 122 | 122 | static ADDRESS_MAP_START( soundcpu_map, AS_PROGRAM, 8, ksayakyu_state ) |
| 123 | 123 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 124 | 124 | AM_RANGE(0x8000, 0x83ff) AM_RAM |
| 125 | AM_RANGE(0xa001, 0xa001) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 126 | AM_RANGE(0xa002, 0xa003) AM_DEVWRITE_LEGACY("ay1", ay8910_data_address_w) | |
| 127 | AM_RANGE(0xa006, 0xa007) AM_DEVWRITE_LEGACY("ay2", ay8910_data_address_w) | |
| 125 | AM_RANGE(0xa001, 0xa001) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 126 | AM_RANGE(0xa002, 0xa003) AM_DEVWRITE("ay1", ay8910_device, data_address_w) | |
| 127 | AM_RANGE(0xa006, 0xa007) AM_DEVWRITE("ay2", ay8910_device, data_address_w) | |
| 128 | 128 | AM_RANGE(0xa008, 0xa008) AM_DEVWRITE("dac", dac_device, write_unsigned8) |
| 129 | 129 | AM_RANGE(0xa00c, 0xa00c) AM_WRITE(tomaincpu_w) |
| 130 | 130 | AM_RANGE(0xa010, 0xa010) AM_WRITENOP //a timer of some sort? |
| r22781 | r22782 | |
|---|---|---|
| 53 | 53 | othello_state(const machine_config &mconfig, device_type type, const char *tag) |
| 54 | 54 | : driver_device(mconfig, type, tag), |
| 55 | 55 | m_videoram(*this, "videoram"), |
| 56 | m_maincpu(*this, "maincpu"){ } | |
| 56 | m_maincpu(*this, "maincpu"), | |
| 57 | m_ay1(*this, "ay1"), | |
| 58 | m_ay2(*this, "ay2") | |
| 59 | { | |
| 60 | } | |
| 57 | 61 | |
| 58 | 62 | /* memory pointers */ |
| 59 | 63 | required_shared_ptr<UINT8> m_videoram; |
| r22781 | r22782 | |
| 71 | 75 | |
| 72 | 76 | /* devices */ |
| 73 | 77 | required_device<cpu_device> m_maincpu; |
| 78 | required_device<ay8910_device> m_ay1; | |
| 79 | required_device<ay8910_device> m_ay2; | |
| 74 | 80 | mc6845_device *m_mc6845; |
| 75 | 81 | device_t *m_n7751; |
| 76 | device_t *m_ay1; | |
| 77 | device_t *m_ay2; | |
| 78 | 82 | DECLARE_READ8_MEMBER(unk_87_r); |
| 79 | 83 | DECLARE_WRITE8_MEMBER(unk_8a_w); |
| 80 | 84 | DECLARE_WRITE8_MEMBER(unk_8c_w); |
| r22781 | r22782 | |
| 226 | 230 | |
| 227 | 231 | WRITE8_MEMBER(othello_state::ay_address_w) |
| 228 | 232 | { |
| 229 | if (m_ay_select & 1) ay8910_address_w(m_ay1, space, 0, data); | |
| 230 | if (m_ay_select & 2) ay8910_address_w(m_ay2, space, 0, data); | |
| 233 | if (m_ay_select & 1) m_ay1->address_w(space, 0, data); | |
| 234 | if (m_ay_select & 2) m_ay2->address_w(space, 0, data); | |
| 231 | 235 | } |
| 232 | 236 | |
| 233 | 237 | WRITE8_MEMBER(othello_state::ay_data_w) |
| 234 | 238 | { |
| 235 | if (m_ay_select & 1) ay8910_data_w(m_ay1, space, 0, data); | |
| 236 | if (m_ay_select & 2) ay8910_data_w(m_ay2, space, 0, data); | |
| 239 | if (m_ay_select & 1) m_ay1->data_w(space, 0, data); | |
| 240 | if (m_ay_select & 2) m_ay2->data_w(space, 0, data); | |
| 237 | 241 | } |
| 238 | 242 | |
| 239 | 243 | static ADDRESS_MAP_START( audio_map, AS_PROGRAM, 8, othello_state ) |
| r22781 | r22782 | |
| 385 | 389 | { |
| 386 | 390 | m_mc6845 = machine().device<mc6845_device>("crtc"); |
| 387 | 391 | m_n7751 = machine().device("n7751"); |
| 388 | m_ay1 = machine().device("ay1"); | |
| 389 | m_ay2 = machine().device("ay2"); | |
| 390 | 392 | |
| 391 | 393 | save_item(NAME(m_tile_bank)); |
| 392 | 394 | save_item(NAME(m_ay_select)); |
| r22781 | r22782 | |
|---|---|---|
| 149 | 149 | AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") |
| 150 | 150 | AM_RANGE(0x10, 0x10) AM_READ_PORT("IN1") |
| 151 | 151 | AM_RANGE(0x40, 0x40) AM_READ_PORT("IN2") |
| 152 | AM_RANGE(0x50, 0x51) AM_DEVWRITE | |
| 152 | AM_RANGE(0x50, 0x51) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 153 | 153 | AM_RANGE(0x60, 0x60) AM_WRITE(port60_w) |
| 154 | 154 | AM_RANGE(0x70, 0x70) AM_WRITE(port70_w) |
| 155 | 155 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 532 | 532 | AM_RANGE( 0x76, 0x76 ) AM_WRITE(dynax_blit_palbank_w) // Layers Palettes (High Bit) |
| 533 | 533 | AM_RANGE( 0x77, 0x77 ) AM_WRITE(hanamai_layer_half_w) // half of the interleaved layer to write to |
| 534 | 534 | AM_RANGE( 0x78, 0x79 ) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write) // 2 x DSW |
| 535 | AM_RANGE( 0x7a, 0x7b ) AM_DEVWRITE | |
| 535 | AM_RANGE( 0x7a, 0x7b ) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) // AY8910 | |
| 536 | 536 | // AM_RANGE( 0x7c, 0x7c ) AM_WRITENOP // CRT Controller |
| 537 | 537 | // AM_RANGE( 0x7d, 0x7d ) AM_WRITENOP // |
| 538 | 538 | AM_RANGE( 0x7e, 0x7e ) AM_WRITE(dynax_blit_romregion_w) // Blitter ROM bank |
| r22781 | r22782 | |
| 554 | 554 | AM_RANGE( 0x30, 0x30 ) AM_WRITE(adpcm_reset_w) // MSM5205 reset |
| 555 | 555 | AM_RANGE( 0x32, 0x32 ) AM_WRITE(adpcm_data_w) // MSM5205 data |
| 556 | 556 | AM_RANGE( 0x34, 0x35 ) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) // |
| 557 | AM_RANGE( 0x36, 0x36 ) AM_DEVREAD_LEGACY("aysnd", ay8910_r) // AY8910, DSW1 | |
| 558 | AM_RANGE( 0x38, 0x38 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) // AY8910 | |
| 559 | AM_RANGE( 0x3a, 0x3a ) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) // | |
| 557 | AM_RANGE( 0x36, 0x36 ) AM_DEVREAD("aysnd", ay8910_device, data_r) // AY8910, DSW1 | |
| 558 | AM_RANGE( 0x38, 0x38 ) AM_DEVWRITE("aysnd", ay8910_device, data_w) // AY8910 | |
| 559 | AM_RANGE( 0x3a, 0x3a ) AM_DEVWRITE("aysnd", ay8910_device, address_w) // | |
| 560 | 560 | AM_RANGE( 0x40, 0x40 ) AM_WRITE(dynax_blit_pen_w) // Destination Pen |
| 561 | 561 | AM_RANGE( 0x41, 0x41 ) AM_WRITE(dynax_blit_dest_w) // Destination Layer |
| 562 | 562 | AM_RANGE( 0x42, 0x42 ) AM_WRITE(dynax_blit_palette01_w) // Layers Palettes |
| r22781 | r22782 | |
| 640 | 640 | AM_RANGE( 0x32, 0x32 ) AM_WRITE(adpcm_data_w) // MSM5205 data |
| 641 | 641 | AM_RANGE( 0x34, 0x35 ) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) // |
| 642 | 642 | |
| 643 | AM_RANGE( 0x36, 0x36 ) AM_DEVREAD_LEGACY("aysnd", ay8910_r) // AY8910, DSW1 | |
| 644 | AM_RANGE( 0x38, 0x38 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) // AY8910 | |
| 645 | AM_RANGE( 0x3a, 0x3a ) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) // | |
| 643 | AM_RANGE( 0x36, 0x36 ) AM_DEVREAD("aysnd", ay8910_device, data_r) // AY8910, DSW1 | |
| 644 | AM_RANGE( 0x38, 0x38 ) AM_DEVWRITE("aysnd", ay8910_device, data_w) // AY8910 | |
| 645 | AM_RANGE( 0x3a, 0x3a ) AM_DEVWRITE("aysnd", ay8910_device, address_w) // | |
| 646 | 646 | |
| 647 | 647 | AM_RANGE( 0x40, 0x40 ) AM_WRITE(dynax_blit_pen_w) // Destination Pen |
| 648 | 648 | AM_RANGE( 0x41, 0x41 ) AM_WRITE(dynax_blit_dest_w) // Destination Layer |
| r22781 | r22782 | |
| 779 | 779 | AM_RANGE( 0x20, 0x20 ) AM_WRITE(adpcm_reset_w) // MSM5205 reset |
| 780 | 780 | AM_RANGE( 0x22, 0x22 ) AM_WRITE(adpcm_data_w) // MSM5205 data |
| 781 | 781 | AM_RANGE( 0x24, 0x25 ) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) // |
| 782 | AM_RANGE( 0x28, 0x28 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) // AY8910 | |
| 783 | AM_RANGE( 0x2a, 0x2a ) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) // | |
| 782 | AM_RANGE( 0x28, 0x28 ) AM_DEVWRITE("aysnd", ay8910_device, data_w) // AY8910 | |
| 783 | AM_RANGE( 0x2a, 0x2a ) AM_DEVWRITE("aysnd", ay8910_device, address_w) // | |
| 784 | 784 | AM_RANGE( 0x48, 0x48 ) AM_WRITE(dynax_extra_scrollx_w) // screen scroll X |
| 785 | 785 | AM_RANGE( 0x49, 0x49 ) AM_WRITE(dynax_extra_scrolly_w) // screen scroll Y |
| 786 | 786 | AM_RANGE( 0x4a, 0x4a ) AM_WRITE(yarunara_rombank_w) // BANK ROM Select |
| r22781 | r22782 | |
| 818 | 818 | AM_RANGE( 0x30, 0x30 ) AM_WRITE(adpcm_reset_w) // MSM5205 reset |
| 819 | 819 | AM_RANGE( 0x32, 0x32 ) AM_WRITE(adpcm_data_w) // MSM5205 data |
| 820 | 820 | AM_RANGE( 0x34, 0x35 ) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) // |
| 821 | AM_RANGE( 0x38, 0x38 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) // AY8910 | |
| 822 | AM_RANGE( 0x3a, 0x3a ) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) // | |
| 821 | AM_RANGE( 0x38, 0x38 ) AM_DEVWRITE("aysnd", ay8910_device, data_w) // AY8910 | |
| 822 | AM_RANGE( 0x3a, 0x3a ) AM_DEVWRITE("aysnd", ay8910_device, address_w) // | |
| 823 | 823 | AM_RANGE( 0x40, 0x40 ) AM_WRITE(dynax_blit_pen_w) // Destination Pen |
| 824 | 824 | AM_RANGE( 0x41, 0x41 ) AM_WRITE(dynax_blit_dest_w) // Destination Layer |
| 825 | 825 | AM_RANGE( 0x42, 0x42 ) AM_WRITE(dynax_blit_palette01_w) // Layers Palettes |
| r22781 | r22782 | |
| 901 | 901 | AM_RANGE( 0x00, 0x00 ) AM_WRITE(adpcm_reset_w) // MSM5205 reset |
| 902 | 902 | AM_RANGE( 0x02, 0x02 ) AM_WRITE(adpcm_data_w) // MSM5205 data |
| 903 | 903 | AM_RANGE( 0x04, 0x05 ) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) // |
| 904 | AM_RANGE( 0x08, 0x08 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) // AY8910 | |
| 905 | AM_RANGE( 0x0a, 0x0a ) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) // | |
| 904 | AM_RANGE( 0x08, 0x08 ) AM_DEVWRITE("aysnd", ay8910_device, data_w) // AY8910 | |
| 905 | AM_RANGE( 0x0a, 0x0a ) AM_DEVWRITE("aysnd", ay8910_device, address_w) // | |
| 906 | 906 | AM_RANGE( 0x10, 0x10 ) AM_WRITE(hanamai_keyboard_w) // keyboard row select |
| 907 | 907 | AM_RANGE( 0x11, 0x11 ) AM_READ_PORT("COINS") // Coins |
| 908 | 908 | AM_RANGE( 0x12, 0x12 ) AM_READ(hanamai_keyboard_1_r) // P2 |
| r22781 | r22782 | |
| 1020 | 1020 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 1021 | 1021 | AM_RANGE( 0x00, 0x00 ) AM_WRITE(jantouki_sound_rombank_w) // BANK ROM Select |
| 1022 | 1022 | AM_RANGE( 0x10, 0x10 ) AM_WRITE(jantouki_sound_vblank_ack_w) // VBlank IRQ Ack |
| 1023 | AM_RANGE( 0x21, 0x21 ) AM_DEVREAD_LEGACY("aysnd", ay8910_r) // AY8910 | |
| 1024 | AM_RANGE( 0x22, 0x23 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) // | |
| 1023 | AM_RANGE( 0x21, 0x21 ) AM_DEVREAD("aysnd", ay8910_device, data_r) // AY8910 | |
| 1024 | AM_RANGE( 0x22, 0x23 ) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) // | |
| 1025 | 1025 | AM_RANGE( 0x28, 0x29 ) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write) // |
| 1026 | 1026 | AM_RANGE( 0x30, 0x30 ) AM_WRITE(adpcm_reset_w) // MSM5205 reset |
| 1027 | 1027 | AM_RANGE( 0x40, 0x40 ) AM_WRITE(adpcm_data_w) // MSM5205 data |
| r22781 | r22782 | |
| 1059 | 1059 | AM_RANGE( 0x00, 0x00 ) AM_WRITE(adpcm_reset_w) // MSM5205 reset |
| 1060 | 1060 | AM_RANGE( 0x02, 0x02 ) AM_WRITE(adpcm_data_w) // MSM5205 data |
| 1061 | 1061 | AM_RANGE( 0x04, 0x05 ) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) // |
| 1062 | AM_RANGE( 0x08, 0x08 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) // AY8910 | |
| 1063 | AM_RANGE( 0x0a, 0x0a ) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) // | |
| 1062 | AM_RANGE( 0x08, 0x08 ) AM_DEVWRITE("aysnd", ay8910_device, data_w) // AY8910 | |
| 1063 | AM_RANGE( 0x0a, 0x0a ) AM_DEVWRITE("aysnd", ay8910_device, address_w) // | |
| 1064 | 1064 | AM_RANGE( 0x11, 0x12 ) AM_WRITE(mjelctrn_blitter_ack_w) //? |
| 1065 | 1065 | // AM_RANGE( 0x20, 0x20 ) AM_WRITENOP // CRT Controller |
| 1066 | 1066 | // AM_RANGE( 0x21, 0x21 ) AM_WRITENOP // CRT Controller |
| r22781 | r22782 | |
| 1339 | 1339 | AM_RANGE( 0x6000, 0x6fff ) AM_RAM |
| 1340 | 1340 | AM_RANGE( 0x7000, 0x7fff ) AM_RAM AM_SHARE("nvram") |
| 1341 | 1341 | AM_RANGE( 0x8000, 0xffff ) AM_READWRITE(tenkai_8000_r, tenkai_8000_w) |
| 1342 | AM_RANGE( 0x10000, 0x10000 ) AM_DEVREAD_LEGACY("aysnd", ay8910_r) // AY8910 | |
| 1343 | AM_RANGE( 0x10008, 0x10008 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) // | |
| 1344 | AM_RANGE( 0x10010, 0x10010 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) // | |
| 1342 | AM_RANGE( 0x10000, 0x10000 ) AM_DEVREAD("aysnd", ay8910_device, data_r) // AY8910 | |
| 1343 | AM_RANGE( 0x10008, 0x10008 ) AM_DEVWRITE("aysnd", ay8910_device, data_w) // | |
| 1344 | AM_RANGE( 0x10010, 0x10010 ) AM_DEVWRITE("aysnd", ay8910_device, address_w) // | |
| 1345 | 1345 | AM_RANGE( 0x10020, 0x10021 ) AM_DEVWRITE_LEGACY("ymsnd", ym2413_w) // |
| 1346 | 1346 | AM_RANGE( 0x10040, 0x10040 ) AM_WRITE(dynax_blit_pen_w) // Destination Pen |
| 1347 | 1347 | AM_RANGE( 0x10044, 0x10044 ) AM_WRITE(tenkai_blit_dest_w) // Destination Layer |
| r22781 | r22782 | |
|---|---|---|
| 69 | 69 | WRITE8_MEMBER(_4enraya_state::sound_control_w) |
| 70 | 70 | { |
| 71 | 71 | if ((m_last_snd_ctrl & m_snd_latch_bit ) == m_snd_latch_bit && (data & m_snd_latch_bit) == 0x00) |
| 72 | ay | |
| 72 | m_ay->data_address_w(space, m_last_snd_ctrl, m_soundlatch); | |
| 73 | 73 | |
| 74 | 74 | m_last_snd_ctrl = data; |
| 75 | 75 | } |
| r22781 | r22782 | |
|---|---|---|
| 105 | 105 | |
| 106 | 106 | static ADDRESS_MAP_START( io_map, AS_IO, 8, funkybee_state ) |
| 107 | 107 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 108 | AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 109 | AM_RANGE(0x02, 0x02) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 108 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 109 | AM_RANGE(0x02, 0x02) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 110 | 110 | ADDRESS_MAP_END |
| 111 | 111 | |
| 112 | 112 |
| r22781 | r22782 | |
|---|---|---|
| 607 | 607 | AM_RANGE(0x00a00000, 0x00a00001) AM_READWRITE(io_board_r,io_board_w) |
| 608 | 608 | AM_RANGE(0x00a08000, 0x00a08001) AM_WRITE(io_board_x) |
| 609 | 609 | AM_RANGE(0x00a10000, 0x00a10001) AM_WRITE(watchdog_reset16_w ) |
| 610 | AM_RANGE(0x00a20000, 0x00a20001) AM_DEVWRITE8_LEGACY("aysnd", ay8910_address_w,0x00ff ) | |
| 611 | AM_RANGE(0x00a28000, 0x00a28001) AM_DEVWRITE8_LEGACY("aysnd", ay8910_data_w ,0x00ff ) | |
| 610 | AM_RANGE(0x00a20000, 0x00a20001) AM_DEVWRITE8("aysnd", ay8910_device, address_w, 0x00ff) | |
| 611 | AM_RANGE(0x00a28000, 0x00a28001) AM_DEVWRITE8("aysnd", ay8910_device, data_w, 0x00ff) | |
| 612 | 612 | AM_RANGE(0x00a30000, 0x00A300ff) AM_DEVREADWRITE8("rtc",msm6242_device, read, write, 0x00ff) |
| 613 | 613 | AM_RANGE(0x00a40000, 0x00A40001) AM_READWRITE( nevada_sec_r, nevada_sec_w) |
| 614 | 614 | //AM_RANGE(0x00b00000, 0x00b01fff) AM_RAM_WRITE(nevada_videoram_w) AM_BASE_MEMBER(nevada_state, m_videoram) |
| r22781 | r22782 | |
|---|---|---|
| 700 | 700 | AM_RANGE(0x0c01, 0x0c01) AM_MIRROR(0x4000) AM_READ_PORT("IN1") /* IN1 */ |
| 701 | 701 | AM_RANGE(0x0c02, 0x0c02) AM_MIRROR(0x4000) AM_READ(centiped_IN2_r) /* IN2 */ |
| 702 | 702 | AM_RANGE(0x0c03, 0x0c03) AM_MIRROR(0x4000) AM_READ_PORT("IN3") /* IN3 */ |
| 703 | AM_RANGE(0x1000, 0x1001) AM_MIRROR(0x4000) AM_DEVWRITE_LEGACY("pokey", ay8910_data_address_w) | |
| 704 | AM_RANGE(0x1001, 0x1001) AM_MIRROR(0x4000) AM_DEVREAD_LEGACY("pokey", ay8910_r) | |
| 703 | AM_RANGE(0x1000, 0x1001) AM_MIRROR(0x4000) AM_DEVWRITE("pokey", ay8910_device, data_address_w) | |
| 704 | AM_RANGE(0x1001, 0x1001) AM_MIRROR(0x4000) AM_DEVREAD("pokey", ay8910_device, data_r) | |
| 705 | 705 | AM_RANGE(0x1400, 0x140f) AM_MIRROR(0x4000) AM_WRITE(centiped_paletteram_w) AM_SHARE("paletteram") |
| 706 | 706 | AM_RANGE(0x1600, 0x163f) AM_MIRROR(0x4000) AM_DEVWRITE("earom", atari_vg_earom_device, write) |
| 707 | 707 | AM_RANGE(0x1680, 0x1680) AM_MIRROR(0x4000) AM_DEVWRITE("earom", atari_vg_earom_device, ctrl_w) |
| r22781 | r22782 | |
| 718 | 718 | |
| 719 | 719 | static ADDRESS_MAP_START( magworm_map, AS_PROGRAM, 8, centiped_state ) |
| 720 | 720 | AM_IMPORT_FROM(centiped_base_map) |
| 721 | AM_RANGE(0x1001, 0x1001) AM_DEVWRITE_LEGACY("pokey", ay8910_address_w) | |
| 722 | AM_RANGE(0x1003, 0x1003) AM_DEVREADWRITE_LEGACY("pokey", ay8910_r, ay8910_data_w) | |
| 721 | AM_RANGE(0x1001, 0x1001) AM_DEVWRITE("pokey", ay8910_device, address_w) | |
| 722 | AM_RANGE(0x1003, 0x1003) AM_DEVREADWRITE("pokey", ay8910_device, data_r, data_w) | |
| 723 | 723 | ADDRESS_MAP_END |
| 724 | 724 | |
| 725 | 725 | |
| r22781 | r22782 | |
| 731 | 731 | |
| 732 | 732 | WRITE8_MEMBER(centiped_state::caterplr_AY8910_w) |
| 733 | 733 | { |
| 734 | device_t *device = machine().device("pokey"); | |
| 735 | ay8910_address_w(device, space, 0, offset); | |
| 736 | ay8910_data_w(device, space, 0, data); | |
| 734 | ay8910_device *ay8910 = machine().device<ay8910_device>("pokey"); | |
| 735 | ay8910->address_w(space, 0, offset); | |
| 736 | ay8910->data_w(space, 0, data); | |
| 737 | 737 | } |
| 738 | 738 | |
| 739 | 739 | READ8_MEMBER(centiped_state::caterplr_AY8910_r) |
| 740 | 740 | { |
| 741 | device_t *device = machine().device("pokey"); | |
| 742 | ay8910_address_w(device, space, 0, offset); | |
| 743 | return ay8910_r(device, space, 0); | |
| 741 | ay8910_device *ay8910 = machine().device<ay8910_device>("pokey"); | |
| 742 | ay8910->address_w(space, 0, offset); | |
| 743 | return ay8910->data_r(space, 0); | |
| 744 | 744 | } |
| 745 | 745 | |
| 746 | 746 |
| r22781 | r22782 | |
|---|---|---|
| 183 | 183 | static ADDRESS_MAP_START( aces1_map, AS_PROGRAM, 8, aces1_state ) |
| 184 | 184 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 185 | 185 | AM_RANGE(0x8000, 0x8fff) AM_RAM |
| 186 | AM_RANGE(0xadf0, 0xadf3) AM_DEVREADWRITE | |
| 186 | AM_RANGE(0xadf0, 0xadf3) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, address_data_w) // Dips, Sound | |
| 187 | 187 | AM_RANGE(0xafb0, 0xafb3) AM_DEVREADWRITE("ppi8255_ic24", i8255_device, read, write) // IC24 - lamps, 7segs |
| 188 | 188 | AM_RANGE(0xafd0, 0xafd3) AM_DEVREADWRITE("ppi8255_ic25", i8255_device, read, write) // IC25 - lamps, meters, reel comms (writes) |
| 189 | 189 | AM_RANGE(0xafe0, 0xafe3) AM_DEVREADWRITE("ppi8255_ic37", i8255_device, read, write)// IC37 - doors, coins, reel optics (reads) |
| r22781 | r22782 | |
|---|---|---|
| 124 | 124 | static ADDRESS_MAP_START( pitnrun_sound_io_map, AS_IO, 8, pitnrun_state ) |
| 125 | 125 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 126 | 126 | AM_RANGE(0x00, 0x00) AM_WRITE(soundlatch_clear_byte_w) |
| 127 | AM_RANGE(0x8c, 0x8d) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 128 | AM_RANGE(0x8e, 0x8f) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 129 | AM_RANGE(0x8f, 0x8f) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 127 | AM_RANGE(0x8c, 0x8d) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 128 | AM_RANGE(0x8e, 0x8f) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 129 | AM_RANGE(0x8f, 0x8f) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 130 | 130 | AM_RANGE(0x90, 0x96) AM_WRITENOP |
| 131 | 131 | AM_RANGE(0x97, 0x97) AM_WRITENOP |
| 132 | 132 | AM_RANGE(0x98, 0x98) AM_WRITENOP |
| r22781 | r22782 | |
|---|---|---|
| 43 | 43 | |
| 44 | 44 | static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, citycon_state ) |
| 45 | 45 | AM_RANGE(0x0000, 0x0fff) AM_RAM |
| 46 | AM_RANGE(0x4000, 0x4001) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 47 | // AM_RANGE(0x4002, 0x4002) AM_DEVREAD_LEGACY("aysnd", ay8910_r) /* ?? */ | |
| 46 | AM_RANGE(0x4000, 0x4001) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 47 | // AM_RANGE(0x4002, 0x4002) AM_DEVREAD("aysnd", ay8910_device, data_r) /* ?? */ | |
| 48 | 48 | AM_RANGE(0x6000, 0x6001) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write) |
| 49 | 49 | AM_RANGE(0x8000, 0xffff) AM_ROM |
| 50 | 50 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 251 | 251 | |
| 252 | 252 | static ADDRESS_MAP_START( scobra_sound_io_map, AS_IO, 8, scobra_state ) |
| 253 | 253 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 254 | AM_RANGE(0x10, 0x10) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) | |
| 255 | AM_RANGE(0x20, 0x20) AM_DEVREADWRITE_LEGACY("ay1", ay8910_r, ay8910_data_w) | |
| 256 | AM_RANGE(0x40, 0x40) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) | |
| 257 | AM_RANGE(0x80, 0x80) AM_DEVREADWRITE_LEGACY("ay2", ay8910_r, ay8910_data_w) | |
| 254 | AM_RANGE(0x10, 0x10) AM_DEVWRITE("ay1", ay8910_device, address_w) | |
| 255 | AM_RANGE(0x20, 0x20) AM_DEVREADWRITE("ay1", ay8910_device, data_r, data_w) | |
| 256 | AM_RANGE(0x40, 0x40) AM_DEVWRITE("ay2", ay8910_device, address_w) | |
| 257 | AM_RANGE(0x80, 0x80) AM_DEVREADWRITE("ay2", ay8910_device, data_r, data_w) | |
| 258 | 258 | ADDRESS_MAP_END |
| 259 | 259 | |
| 260 | 260 | static ADDRESS_MAP_START( hustler_sound_map, AS_PROGRAM, 8, scobra_state ) |
| r22781 | r22782 | |
| 265 | 265 | |
| 266 | 266 | static ADDRESS_MAP_START( hustler_sound_io_map, AS_IO, 8, scobra_state ) |
| 267 | 267 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 268 | AM_RANGE(0x40, 0x40) AM_DEVREADWRITE_LEGACY("aysnd", ay8910_r, ay8910_data_w) | |
| 269 | AM_RANGE(0x80, 0x80) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 268 | AM_RANGE(0x40, 0x40) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, data_w) | |
| 269 | AM_RANGE(0x80, 0x80) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 270 | 270 | ADDRESS_MAP_END |
| 271 | 271 | |
| 272 | 272 | |
| r22781 | r22782 | |
| 278 | 278 | |
| 279 | 279 | static ADDRESS_MAP_START( hustlerb_sound_io_map, AS_IO, 8, scobra_state ) |
| 280 | 280 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 281 | AM_RANGE(0x40, 0x40) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 282 | AM_RANGE(0x80, 0x80) AM_DEVREADWRITE_LEGACY("aysnd", ay8910_r, ay8910_data_w) | |
| 281 | AM_RANGE(0x40, 0x40) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 282 | AM_RANGE(0x80, 0x80) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, data_w) | |
| 283 | 283 | ADDRESS_MAP_END |
| 284 | 284 | |
| 285 | 285 |
| r22781 | r22782 | |
|---|---|---|
| 523 | 523 | |
| 524 | 524 | static ADDRESS_MAP_START( nightgal_io, AS_IO, 8, nightgal_state ) |
| 525 | 525 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 526 | AM_RANGE(0x01,0x01) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 527 | AM_RANGE(0x02,0x03) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 526 | AM_RANGE(0x01,0x01) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 527 | AM_RANGE(0x02,0x03) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 528 | 528 | // AM_RANGE(0x10,0x10) AM_WRITE(output_w) |
| 529 | 529 | AM_RANGE(0x10,0x10) AM_READ_PORT("DSWC") |
| 530 | 530 | AM_RANGE(0x11,0x11) AM_READ_PORT("SYSA") |
| r22781 | r22782 | |
| 598 | 598 | |
| 599 | 599 | static ADDRESS_MAP_START( royalqn_io, AS_IO, 8, nightgal_state ) |
| 600 | 600 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 601 | AM_RANGE(0x01,0x01) AM_MIRROR(0xec) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 602 | AM_RANGE(0x02,0x03) AM_MIRROR(0xec) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 601 | AM_RANGE(0x01,0x01) AM_MIRROR(0xec) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 602 | AM_RANGE(0x02,0x03) AM_MIRROR(0xec) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 603 | 603 | AM_RANGE(0x10,0x10) AM_MIRROR(0xe8) AM_READ_PORT("DSWC") AM_WRITENOP //AM_WRITE(output_w) |
| 604 | 604 | AM_RANGE(0x11,0x11) AM_MIRROR(0xe8) AM_READ_PORT("SYSA") AM_WRITE(mux_w) |
| 605 | 605 | AM_RANGE(0x12,0x12) AM_MIRROR(0xe8) AM_READ_PORT("DSWA") AM_WRITE(royalqn_blitter_0_w) |
| r22781 | r22782 | |
|---|---|---|
| 186 | 186 | |
| 187 | 187 | static ADDRESS_MAP_START( skyarmy_io_map, AS_IO, 8, skyarmy_state ) |
| 188 | 188 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 189 | AM_RANGE(0x04, 0x05) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 190 | AM_RANGE(0x06, 0x06) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 189 | AM_RANGE(0x04, 0x05) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 190 | AM_RANGE(0x06, 0x06) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 191 | 191 | ADDRESS_MAP_END |
| 192 | 192 | |
| 193 | 193 |
| r22781 | r22782 | |
|---|---|---|
| 91 | 91 | AM_RANGE(0x10, 0x10) AM_WRITE(battlex_flipscreen_w) |
| 92 | 92 | |
| 93 | 93 | /* verify all of these */ |
| 94 | AM_RANGE(0x22, 0x23) AM_DEVWRITE | |
| 94 | AM_RANGE(0x22, 0x23) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 95 | 95 | AM_RANGE(0x30, 0x30) AM_WRITE(battlex_scroll_starfield_w) |
| 96 | 96 | AM_RANGE(0x32, 0x32) AM_WRITE(battlex_scroll_x_lsb_w) |
| 97 | 97 | AM_RANGE(0x33, 0x33) AM_WRITE(battlex_scroll_x_msb_w) |
| r22781 | r22782 | |
|---|---|---|
| 112 | 112 | |
| 113 | 113 | READ8_MEMBER(zaccaria_state::zaccaria_port0a_r) |
| 114 | 114 | { |
| 115 | return | |
| 115 | return machine().device<ay8910_device>((m_active_8910 == 0) ? "ay1" : "ay2")->data_r(space, 0); | |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | WRITE8_MEMBER(zaccaria_state::zaccaria_port0a_w) |
| r22781 | r22782 | |
| 126 | 126 | if ((m_last_port0b & 0x02) == 0x02 && (data & 0x02) == 0x00) |
| 127 | 127 | { |
| 128 | 128 | /* bit 0 goes to the 8910 #0 BC1 pin */ |
| 129 | | |
| 129 | machine().device<ay8910_device>("ay1")->data_address_w(space, m_last_port0b, m_port0a); | |
| 130 | 130 | } |
| 131 | 131 | else if ((m_last_port0b & 0x02) == 0x00 && (data & 0x02) == 0x02) |
| 132 | 132 | { |
| r22781 | r22782 | |
| 138 | 138 | if ((m_last_port0b & 0x08) == 0x08 && (data & 0x08) == 0x00) |
| 139 | 139 | { |
| 140 | 140 | /* bit 2 goes to the 8910 #1 BC1 pin */ |
| 141 | | |
| 141 | machine().device<ay8910_device>("ay2")->data_address_w(space, m_last_port0b >> 2, m_port0a); | |
| 142 | 142 | } |
| 143 | 143 | else if ((m_last_port0b & 0x08) == 0x00 && (data & 0x08) == 0x08) |
| 144 | 144 | { |
| r22781 | r22782 | |
|---|---|---|
| 151 | 151 | static ADDRESS_MAP_START( dderby_sound_map, AS_PROGRAM, 8, dmndrby_state ) |
| 152 | 152 | AM_RANGE(0x0000, 0x0fff) AM_ROM |
| 153 | 153 | AM_RANGE(0x1000, 0x1000) AM_RAM //??? |
| 154 | AM_RANGE(0x4000, 0x4001) AM_DEVWRITE | |
| 154 | AM_RANGE(0x4000, 0x4001) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 155 | 155 | AM_RANGE(0x4000, 0x4000) AM_READ(soundlatch_byte_r) |
| 156 | AM_RANGE(0x4001, 0x4001) AM_DEVREAD | |
| 156 | AM_RANGE(0x4001, 0x4001) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 157 | 157 | AM_RANGE(0x6000, 0x67ff) AM_RAM |
| 158 | 158 | ADDRESS_MAP_END |
| 159 | 159 |
| r22781 | r22782 | |
|---|---|---|
| 290 | 290 | static ADDRESS_MAP_START( mjsister_io_map, AS_IO, 8, mjsister_state ) |
| 291 | 291 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 292 | 292 | AM_RANGE(0x00, 0x01) AM_WRITENOP /* HD46505? */ |
| 293 | AM_RANGE(0x10, 0x10) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 294 | AM_RANGE(0x11, 0x11) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 295 | AM_RANGE(0x12, 0x12) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 293 | AM_RANGE(0x10, 0x10) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 294 | AM_RANGE(0x11, 0x11) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 295 | AM_RANGE(0x12, 0x12) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 296 | 296 | AM_RANGE(0x20, 0x20) AM_READ(mjsister_keys_r) |
| 297 | 297 | AM_RANGE(0x21, 0x21) AM_READ_PORT("IN0") |
| 298 | 298 | AM_RANGE(0x30, 0x30) AM_WRITE(mjsister_banksel1_w) |
| r22781 | r22782 | |
|---|---|---|
| 68 | 68 | |
| 69 | 69 | READ8_MEMBER(munchmo_state::munchmo_ay1reset_r) |
| 70 | 70 | { |
| 71 | device_t *device = machine().device("ay1"); | |
| 72 | ay8910_reset_w(device,space,0,0); | |
| 71 | ay8910_device *ay8910 = machine().device<ay8910_device>("ay1"); | |
| 72 | ay8910->reset_w(space,0,0); | |
| 73 | 73 | return 0; |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | READ8_MEMBER(munchmo_state::munchmo_ay2reset_r) |
| 77 | 77 | { |
| 78 | device_t *device = machine().device("ay2"); | |
| 79 | ay8910_reset_w(device,space,0,0); | |
| 78 | ay8910_device *ay8910 = machine().device<ay8910_device>("ay2"); | |
| 79 | ay8910->reset_w(space,0,0); | |
| 80 | 80 | return 0; |
| 81 | 81 | } |
| 82 | 82 | /************************************* |
| r22781 | r22782 | |
| 113 | 113 | static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, munchmo_state ) |
| 114 | 114 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 115 | 115 | AM_RANGE(0x2000, 0x3fff) AM_READ(soundlatch_byte_r) |
| 116 | AM_RANGE(0x4000, 0x4fff) AM_DEVWRITE_LEGACY("ay1", ay8910_data_w) | |
| 117 | AM_RANGE(0x5000, 0x5fff) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) | |
| 118 | AM_RANGE(0x6000, 0x6fff) AM_DEVWRITE_LEGACY("ay2", ay8910_data_w) | |
| 119 | AM_RANGE(0x7000, 0x7fff) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) | |
| 120 | AM_RANGE(0x8000, 0x9fff) AM_READ(munchmo_ay1reset_r) AM_DEVWRITE_LEGACY("ay1",ay8910_reset_w) | |
| 121 | AM_RANGE(0xa000, 0xbfff) AM_READ(munchmo_ay2reset_r) AM_DEVWRITE_LEGACY("ay2",ay8910_reset_w) | |
| 116 | AM_RANGE(0x4000, 0x4fff) AM_DEVWRITE("ay1", ay8910_device, data_w) | |
| 117 | AM_RANGE(0x5000, 0x5fff) AM_DEVWRITE("ay1", ay8910_device, address_w) | |
| 118 | AM_RANGE(0x6000, 0x6fff) AM_DEVWRITE("ay2", ay8910_device, data_w) | |
| 119 | AM_RANGE(0x7000, 0x7fff) AM_DEVWRITE("ay2", ay8910_device, address_w) | |
| 120 | AM_RANGE(0x8000, 0x9fff) AM_READ(munchmo_ay1reset_r) AM_DEVWRITE("ay1", ay8910_device, reset_w) | |
| 121 | AM_RANGE(0xa000, 0xbfff) AM_READ(munchmo_ay2reset_r) AM_DEVWRITE("ay2", ay8910_device, reset_w) | |
| 122 | 122 | AM_RANGE(0xc000, 0xdfff) AM_WRITE(sound_nmi_ack_w) |
| 123 | 123 | AM_RANGE(0xe000, 0xe7ff) AM_MIRROR(0x1800) AM_RAM // is mirror ok? |
| 124 | 124 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 151 | 151 | |
| 152 | 152 | static ADDRESS_MAP_START( espial_sound_io_map, AS_IO, 8, espial_state ) |
| 153 | 153 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 154 | AM_RANGE(0x00, 0x01) AM_DEVWRITE | |
| 154 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 155 | 155 | ADDRESS_MAP_END |
| 156 | 156 | |
| 157 | 157 |
| r22781 | r22782 | |
|---|---|---|
| 478 | 478 | AM_RANGE(0x40, 0x4f) AM_WRITE(nbmj8891_clut_w) |
| 479 | 479 | // AM_RANGE(0x50, 0x50) AM_WRITE_LEGACY(nb1413m3_nmi_clock_w) |
| 480 | 480 | AM_RANGE(0x70, 0x70) AM_WRITE(nbmj8891_scrolly_w) |
| 481 | AM_RANGE(0x81, 0x81) AM_DEVREAD_LEGACY("fmsnd", ay8910_r) | |
| 482 | AM_RANGE(0x82, 0x83) AM_DEVWRITE_LEGACY("fmsnd", ay8910_data_address_w) | |
| 481 | AM_RANGE(0x81, 0x81) AM_DEVREAD("fmsnd", ay8910_device, data_r) | |
| 482 | AM_RANGE(0x82, 0x83) AM_DEVWRITE("fmsnd", ay8910_device, data_address_w) | |
| 483 | 483 | AM_RANGE(0x90, 0x90) AM_READ_LEGACY(nb1413m3_inputport0_r) AM_WRITENOP |
| 484 | 484 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| 485 | 485 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| r22781 | r22782 | |
| 555 | 555 | AM_RANGE(0x20, 0x20) AM_WRITE(nbmj8891_clutsel_w) |
| 556 | 556 | AM_RANGE(0x40, 0x4f) AM_WRITE(nbmj8891_clut_w) |
| 557 | 557 | AM_RANGE(0x50, 0x50) AM_WRITE(nbmj8891_scrolly_w) |
| 558 | AM_RANGE(0x81, 0x81) AM_DEVREAD_LEGACY("fmsnd", ay8910_r) | |
| 559 | AM_RANGE(0x82, 0x83) AM_DEVWRITE_LEGACY("fmsnd", ay8910_data_address_w) | |
| 558 | AM_RANGE(0x81, 0x81) AM_DEVREAD("fmsnd", ay8910_device, data_r) | |
| 559 | AM_RANGE(0x82, 0x83) AM_DEVWRITE("fmsnd", ay8910_device, data_address_w) | |
| 560 | 560 | AM_RANGE(0x90, 0x90) AM_READ_LEGACY(nb1413m3_inputport0_r) |
| 561 | 561 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| 562 | 562 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| r22781 | r22782 | |
| 628 | 628 | static ADDRESS_MAP_START( taiwanmb_io_map, AS_IO, 8, nbmj8891_state ) |
| 629 | 629 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 630 | 630 | AM_RANGE(0x00, 0x7f) AM_READ_LEGACY(nb1413m3_sndrom_r) |
| 631 | AM_RANGE(0x81, 0x81) AM_DEVREAD_LEGACY("fmsnd", ay8910_r) | |
| 632 | AM_RANGE(0x82, 0x83) AM_DEVWRITE_LEGACY("fmsnd", ay8910_data_address_w) | |
| 631 | AM_RANGE(0x81, 0x81) AM_DEVREAD("fmsnd", ay8910_device, data_r) | |
| 632 | AM_RANGE(0x82, 0x83) AM_DEVWRITE("fmsnd", ay8910_device, data_address_w) | |
| 633 | 633 | AM_RANGE(0x90, 0x90) AM_READ_LEGACY(nb1413m3_inputport0_r) //AM_WRITENOP // ? |
| 634 | 634 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| 635 | 635 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| r22781 | r22782 | |
|---|---|---|
| 42 | 42 | static ADDRESS_MAP_START( io_map, AS_IO, 8, holeland_state ) |
| 43 | 43 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 44 | 44 | AM_RANGE(0x01, 0x01) AM_READ(watchdog_reset_r) /* ? */ |
| 45 | AM_RANGE(0x04, 0x04) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 46 | AM_RANGE(0x04, 0x05) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 47 | AM_RANGE(0x06, 0x06) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 48 | AM_RANGE(0x06, 0x07) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 45 | AM_RANGE(0x04, 0x04) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 46 | AM_RANGE(0x04, 0x05) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 47 | AM_RANGE(0x06, 0x06) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 48 | AM_RANGE(0x06, 0x07) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 49 | 49 | ADDRESS_MAP_END |
| 50 | 50 | |
| 51 | 51 |
| r22781 | r22782 | |
|---|---|---|
| 312 | 312 | |
| 313 | 313 | static ADDRESS_MAP_START( prosoccr_sound_map, AS_PROGRAM, 8, liberate_state ) |
| 314 | 314 | AM_RANGE(0x0000, 0x01ff) AM_RAM |
| 315 | AM_RANGE(0x2000, 0x2000) AM_DEVWRITE_LEGACY("ay1", ay8910_data_w) | |
| 316 | AM_RANGE(0x4000, 0x4000) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) | |
| 317 | AM_RANGE(0x6000, 0x6000) AM_DEVWRITE_LEGACY("ay2", ay8910_data_w) | |
| 318 | AM_RANGE(0x8000, 0x8000) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) | |
| 315 | AM_RANGE(0x2000, 0x2000) AM_DEVWRITE("ay1", ay8910_device, data_w) | |
| 316 | AM_RANGE(0x4000, 0x4000) AM_DEVWRITE("ay1", ay8910_device, address_w) | |
| 317 | AM_RANGE(0x6000, 0x6000) AM_DEVWRITE("ay2", ay8910_device, data_w) | |
| 318 | AM_RANGE(0x8000, 0x8000) AM_DEVWRITE("ay2", ay8910_device, address_w) | |
| 319 | 319 | AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) |
| 320 | 320 | AM_RANGE(0xc000, 0xc000) AM_WRITENOP //irq ack |
| 321 | 321 | AM_RANGE(0xe000, 0xffff) AM_ROM |
| r22781 | r22782 | |
| 324 | 324 | static ADDRESS_MAP_START( liberate_sound_map, AS_PROGRAM, 8, liberate_state ) |
| 325 | 325 | AM_RANGE(0x0000, 0x01ff) AM_RAM |
| 326 | 326 | AM_RANGE(0x1000, 0x1000) AM_WRITENOP |
| 327 | AM_RANGE(0x3000, 0x3000) AM_DEVWRITE_LEGACY("ay1", ay8910_data_w) | |
| 328 | AM_RANGE(0x4000, 0x4000) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) | |
| 329 | AM_RANGE(0x7000, 0x7000) AM_DEVWRITE_LEGACY("ay2", ay8910_data_w) | |
| 330 | AM_RANGE(0x8000, 0x8000) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) | |
| 327 | AM_RANGE(0x3000, 0x3000) AM_DEVWRITE("ay1", ay8910_device, data_w) | |
| 328 | AM_RANGE(0x4000, 0x4000) AM_DEVWRITE("ay1", ay8910_device, address_w) | |
| 329 | AM_RANGE(0x7000, 0x7000) AM_DEVWRITE("ay2", ay8910_device, data_w) | |
| 330 | AM_RANGE(0x8000, 0x8000) AM_DEVWRITE("ay2", ay8910_device, address_w) | |
| 331 | 331 | AM_RANGE(0xb000, 0xb000) AM_READ(soundlatch_byte_r) |
| 332 | 332 | AM_RANGE(0xc000, 0xffff) AM_ROM |
| 333 | 333 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 20 | 20 | #include "cpu/m6800/m6800.h" |
| 21 | 21 | #include "cpu/s2650/s2650.h" |
| 22 | 22 | #include "machine/6821pia.h" |
| 23 | #include "sound/ay8910.h" | |
| 24 | 23 | #include "sound/sn76477.h" |
| 25 | 24 | #include "sound/tms3615.h" |
| 26 | 25 | #include "video/s2636.h" |
| r22781 | r22782 | |
| 578 | 577 | |
| 579 | 578 | READ8_MEMBER(laserbat_state::zaccaria_port0a_r) |
| 580 | 579 | { |
| 581 | device_t *ay = (m_active_8910 == 0) ? m_ay1 : m_ay2; | |
| 582 | return ay8910_r(ay, space, 0); | |
| 580 | ay8910_device *ay8910 = (m_active_8910 == 0) ? m_ay1 : m_ay2; | |
| 581 | return ay8910->data_r(space, 0); | |
| 583 | 582 | } |
| 584 | 583 | |
| 585 | 584 | WRITE8_MEMBER(laserbat_state::zaccaria_port0a_w) |
| r22781 | r22782 | |
| 593 | 592 | if ((m_last_port0b & 0x02) == 0x02 && (data & 0x02) == 0x00) |
| 594 | 593 | { |
| 595 | 594 | /* bit 0 goes to the 8910 #0 BC1 pin */ |
| 596 | ay | |
| 595 | m_ay1->data_address_w(space, m_last_port0b >> 0, m_port0a); | |
| 597 | 596 | } |
| 598 | 597 | else if ((m_last_port0b & 0x02) == 0x00 && (data & 0x02) == 0x02) |
| 599 | 598 | { |
| r22781 | r22782 | |
| 605 | 604 | if ((m_last_port0b & 0x08) == 0x08 && (data & 0x08) == 0x00) |
| 606 | 605 | { |
| 607 | 606 | /* bit 2 goes to the 8910 #1 BC1 pin */ |
| 608 | ay | |
| 607 | m_ay2->data_address_w(space, m_last_port0b >> 2, m_port0a); | |
| 609 | 608 | } |
| 610 | 609 | else if ((m_last_port0b & 0x08) == 0x00 && (data & 0x08) == 0x08) |
| 611 | 610 | { |
| r22781 | r22782 | |
| 689 | 688 | m_sn = machine().device("snsnd"); |
| 690 | 689 | m_tms1 = machine().device<tms3615_device>("tms1"); |
| 691 | 690 | m_tms2 = machine().device<tms3615_device>("tms2"); |
| 692 | m_ay1 = machine().device("ay1"); | |
| 693 | m_ay2 = machine().device("ay2"); | |
| 694 | 691 | |
| 695 | 692 | save_item(NAME(m_video_page)); |
| 696 | 693 | save_item(NAME(m_input_mux)); |
| r22781 | r22782 | |
|---|---|---|
| 74 | 74 | static ADDRESS_MAP_START( sound_io_map, AS_IO, 8, timelimt_state ) |
| 75 | 75 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 76 | 76 | AM_RANGE(0x00, 0x00) AM_WRITE(soundlatch_clear_byte_w) |
| 77 | AM_RANGE(0x8c, 0x8d) AM_DEVREADWRITE_LEGACY("ay1", ay8910_r, ay8910_address_data_w) | |
| 78 | AM_RANGE(0x8e, 0x8f) AM_DEVREADWRITE_LEGACY("ay2", ay8910_r, ay8910_address_data_w) | |
| 77 | AM_RANGE(0x8c, 0x8d) AM_DEVREADWRITE("ay1", ay8910_device, data_r, address_data_w) | |
| 78 | AM_RANGE(0x8e, 0x8f) AM_DEVREADWRITE("ay2", ay8910_device, data_r, address_data_w) | |
| 79 | 79 | ADDRESS_MAP_END |
| 80 | 80 | |
| 81 | 81 | /***************************************************************************/ |
| r22781 | r22782 | |
|---|---|---|
| 570 | 570 | static ADDRESS_MAP_START( cb2001_io, AS_IO, 16, cb2001_state ) |
| 571 | 571 | AM_RANGE(0x00, 0x03) AM_DEVREADWRITE8("ppi8255_0", i8255_device, read, write, 0xffff) /* Input Ports */ |
| 572 | 572 | AM_RANGE(0x10, 0x13) AM_DEVREADWRITE8("ppi8255_1", i8255_device, read, write, 0xffff) /* DIP switches */ |
| 573 | AM_RANGE(0x20, 0x21) AM_DEVREAD8_LEGACY("aysnd", ay8910_r, 0xff00) | |
| 574 | AM_RANGE(0x22, 0x23) AM_DEVWRITE8_LEGACY("aysnd", ay8910_data_address_w, 0xffff) | |
| 573 | AM_RANGE(0x20, 0x21) AM_DEVREAD8("aysnd", ay8910_device, data_r, 0xff00) | |
| 574 | AM_RANGE(0x22, 0x23) AM_DEVWRITE8("aysnd", ay8910_device, data_address_w, 0xffff) | |
| 575 | 575 | |
| 576 | 576 | AM_RANGE(0x30, 0x31) AM_WRITE(cb2001_vidctrl_w) |
| 577 | 577 | AM_RANGE(0x32, 0x33) AM_WRITE(cb2001_vidctrl2_w) |
| r22781 | r22782 | |
|---|---|---|
| 190 | 190 | AM_RANGE(0x21, 0x21) AM_WRITE(mrflea_main_w) |
| 191 | 191 | AM_RANGE(0x22, 0x22) AM_READ(mrflea_io_status_r) |
| 192 | 192 | AM_RANGE(0x23, 0x23) AM_WRITENOP /* 0xb4,0x09,0x05 */ |
| 193 | AM_RANGE(0x40, 0x40) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 194 | AM_RANGE(0x40, 0x41) AM_DEVWRITE_LEGACY("ay1", ay8910_data_address_w) | |
| 193 | AM_RANGE(0x40, 0x40) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 194 | AM_RANGE(0x40, 0x41) AM_DEVWRITE("ay1", ay8910_device, data_address_w) | |
| 195 | 195 | AM_RANGE(0x42, 0x42) AM_READWRITE(mrflea_input1_r, mrflea_data1_w) |
| 196 | 196 | AM_RANGE(0x43, 0x43) AM_WRITE(mrflea_select1_w) |
| 197 | AM_RANGE(0x44, 0x44) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 198 | AM_RANGE(0x44, 0x45) AM_DEVWRITE_LEGACY("ay2", ay8910_data_address_w) | |
| 199 | AM_RANGE(0x46, 0x46) AM_DEVREAD_LEGACY("ay3", ay8910_r) | |
| 200 | AM_RANGE(0x46, 0x47) AM_DEVWRITE_LEGACY("ay3", ay8910_data_address_w) | |
| 197 | AM_RANGE(0x44, 0x44) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 198 | AM_RANGE(0x44, 0x45) AM_DEVWRITE("ay2", ay8910_device, data_address_w) | |
| 199 | AM_RANGE(0x46, 0x46) AM_DEVREAD("ay3", ay8910_device, data_r) | |
| 200 | AM_RANGE(0x46, 0x47) AM_DEVWRITE("ay3", ay8910_device, data_address_w) | |
| 201 | 201 | ADDRESS_MAP_END |
| 202 | 202 | |
| 203 | 203 | /************************************* |
| r22781 | r22782 | |
|---|---|---|
| 238 | 238 | static ADDRESS_MAP_START( jongkyo_portmap, AS_IO, 8, jongkyo_state ) |
| 239 | 239 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 240 | 240 | // R 01 keyboard |
| 241 | AM_RANGE(0x01, 0x01) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 242 | AM_RANGE(0x02, 0x03) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 241 | AM_RANGE(0x01, 0x01) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 242 | AM_RANGE(0x02, 0x03) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 243 | 243 | |
| 244 | 244 | AM_RANGE(0x10, 0x10) AM_READ_PORT("DSW") AM_WRITE(jongkyo_coin_counter_w) |
| 245 | 245 | AM_RANGE(0x11, 0x11) AM_READ_PORT("IN0") AM_WRITE(mux_w) |
| r22781 | r22782 | |
|---|---|---|
| 110 | 110 | AM_RANGE(0x02, 0x02) AM_READ_PORT("DSW1") |
| 111 | 111 | AM_RANGE(0x03, 0x03) AM_READ_PORT("DSW2") |
| 112 | 112 | AM_RANGE(0x88, 0x8b) AM_DEVREADWRITE( "v9938", v9938_device, read, write ) |
| 113 | AM_RANGE(0xa0, 0xa1) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 114 | AM_RANGE(0xa2, 0xa2) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 113 | AM_RANGE(0xa0, 0xa1) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 114 | AM_RANGE(0xa2, 0xa2) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 115 | 115 | ADDRESS_MAP_END |
| 116 | 116 | |
| 117 | 117 |
| r22781 | r22782 | |
|---|---|---|
| 63 | 63 | /* Same as Syusse Oozumou */ |
| 64 | 64 | static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, tagteam_state ) |
| 65 | 65 | AM_RANGE(0x0000, 0x03ff) AM_RAM |
| 66 | AM_RANGE(0x2000, 0x2001) AM_DEVWRITE_LEGACY("ay1", ay8910_data_address_w) | |
| 67 | AM_RANGE(0x2002, 0x2003) AM_DEVWRITE_LEGACY("ay2", ay8910_data_address_w) | |
| 66 | AM_RANGE(0x2000, 0x2001) AM_DEVWRITE("ay1", ay8910_device, data_address_w) | |
| 67 | AM_RANGE(0x2002, 0x2003) AM_DEVWRITE("ay2", ay8910_device, data_address_w) | |
| 68 | 68 | AM_RANGE(0x2004, 0x2004) AM_DEVWRITE("dac", dac_device, write_unsigned8) |
| 69 | 69 | AM_RANGE(0x2005, 0x2005) AM_WRITE(sound_nmi_mask_w) |
| 70 | 70 | AM_RANGE(0x2007, 0x2007) AM_READ(soundlatch_byte_r) |
| r22781 | r22782 | |
|---|---|---|
| 83 | 83 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 84 | 84 | AM_RANGE(0x00, 0x00) AM_READ(soundlatch_byte_r) |
| 85 | 85 | AM_RANGE(0x10, 0x10) AM_WRITENOP //?? written on init/0xff sound command reset |
| 86 | AM_RANGE(0x20, 0x21) AM_DEVWRITE | |
| 86 | AM_RANGE(0x20, 0x21) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 87 | 87 | AM_RANGE(0x22, 0x22) AM_WRITENOP //?? written before and after 0x21 with same value |
| 88 | 88 | AM_RANGE(0x24, 0x24) AM_READNOP //?? |
| 89 | AM_RANGE(0x30, 0x31) AM_DEVWRITE | |
| 89 | AM_RANGE(0x30, 0x31) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 90 | 90 | AM_RANGE(0x32, 0x32) AM_WRITENOP //?? written before and after 0x31 with same value |
| 91 | 91 | ADDRESS_MAP_END |
| 92 | 92 |
| r22781 | r22782 | |
|---|---|---|
| 138 | 138 | |
| 139 | 139 | static ADDRESS_MAP_START( gyrodine_sub_portmap, AS_IO, 8, kyugo_state ) |
| 140 | 140 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 141 | AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 142 | AM_RANGE(0x02, 0x02) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 143 | AM_RANGE(0xc0, 0xc1) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 141 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 142 | AM_RANGE(0x02, 0x02) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 143 | AM_RANGE(0xc0, 0xc1) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 144 | 144 | ADDRESS_MAP_END |
| 145 | 145 | |
| 146 | 146 | |
| 147 | 147 | static ADDRESS_MAP_START( repulse_sub_portmap, AS_IO, 8, kyugo_state ) |
| 148 | 148 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 149 | AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 150 | AM_RANGE(0x02, 0x02) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 151 | AM_RANGE(0x40, 0x41) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 149 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 150 | AM_RANGE(0x02, 0x02) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 151 | AM_RANGE(0x40, 0x41) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 152 | 152 | AM_RANGE(0xc0, 0xc1) AM_WRITE(kyugo_coin_counter_w) |
| 153 | 153 | ADDRESS_MAP_END |
| 154 | 154 | |
| 155 | 155 | |
| 156 | 156 | static ADDRESS_MAP_START( flashgala_sub_portmap, AS_IO, 8, kyugo_state ) |
| 157 | 157 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 158 | AM_RANGE(0x40, 0x41) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 159 | AM_RANGE(0x42, 0x42) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 160 | AM_RANGE(0x80, 0x81) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 158 | AM_RANGE(0x40, 0x41) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 159 | AM_RANGE(0x42, 0x42) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 160 | AM_RANGE(0x80, 0x81) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 161 | 161 | AM_RANGE(0xc0, 0xc1) AM_WRITE(kyugo_coin_counter_w) |
| 162 | 162 | ADDRESS_MAP_END |
| 163 | 163 | |
| 164 | 164 | |
| 165 | 165 | static ADDRESS_MAP_START( srdmissn_sub_portmap, AS_IO, 8, kyugo_state ) |
| 166 | 166 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 167 | AM_RANGE(0x80, 0x81) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 168 | AM_RANGE(0x82, 0x82) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 169 | AM_RANGE(0x84, 0x85) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 167 | AM_RANGE(0x80, 0x81) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 168 | AM_RANGE(0x82, 0x82) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 169 | AM_RANGE(0x84, 0x85) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 170 | 170 | AM_RANGE(0x90, 0x91) AM_WRITE(kyugo_coin_counter_w) |
| 171 | 171 | ADDRESS_MAP_END |
| 172 | 172 |
| r22781 | r22782 | |
|---|---|---|
| 309 | 309 | AM_RANGE(0x0000, 0x0fff) AM_ROM |
| 310 | 310 | AM_RANGE(0x2000, 0x23ff) AM_RAM |
| 311 | 311 | AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r) |
| 312 | AM_RANGE(0x4000, 0x4000) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 313 | AM_RANGE(0x4001, 0x4001) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 314 | AM_RANGE(0x4002, 0x4002) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 312 | AM_RANGE(0x4000, 0x4000) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 313 | AM_RANGE(0x4001, 0x4001) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 314 | AM_RANGE(0x4002, 0x4002) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 315 | 315 | AM_RANGE(0x5000, 0x5000) AM_WRITE(soundlatch2_byte_w) |
| 316 | 316 | AM_RANGE(0x6000, 0x6000) AM_WRITE(junofrst_i8039_irq_w) |
| 317 | 317 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 300 | 300 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 301 | 301 | AM_RANGE(0x00, 0x7f) AM_READ_LEGACY(nb1413m3_sndrom_r) |
| 302 | 302 | AM_RANGE(0x00, 0x00) AM_WRITE_LEGACY(nb1413m3_nmi_clock_w) |
| 303 | AM_RANGE(0x81, 0x81) AM_DEVREAD_LEGACY("psg", ay8910_r) | |
| 304 | AM_RANGE(0x82, 0x83) AM_DEVWRITE_LEGACY("psg", ay8910_data_address_w) | |
| 303 | AM_RANGE(0x81, 0x81) AM_DEVREAD("psg", ay8910_device, data_r) | |
| 304 | AM_RANGE(0x82, 0x83) AM_DEVWRITE("psg", ay8910_device, data_address_w) | |
| 305 | 305 | AM_RANGE(0x90, 0x90) AM_READ_LEGACY(nb1413m3_inputport0_r) |
| 306 | 306 | AM_RANGE(0x90, 0x97) AM_WRITE(nbmj8688_blitter_w) |
| 307 | 307 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| r22781 | r22782 | |
| 343 | 343 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 344 | 344 | AM_RANGE(0x00, 0x7f) AM_READ_LEGACY(nb1413m3_sndrom_r) |
| 345 | 345 | AM_RANGE(0x00, 0x00) AM_WRITE_LEGACY(nb1413m3_nmi_clock_w) |
| 346 | AM_RANGE(0x81, 0x81) AM_DEVREAD_LEGACY("psg", ay8910_r) | |
| 347 | AM_RANGE(0x82, 0x83) AM_DEVWRITE_LEGACY("psg", ay8910_data_address_w) | |
| 346 | AM_RANGE(0x81, 0x81) AM_DEVREAD("psg", ay8910_device, data_r) | |
| 347 | AM_RANGE(0x82, 0x83) AM_DEVWRITE("psg", ay8910_device, data_address_w) | |
| 348 | 348 | AM_RANGE(0x90, 0x90) AM_READ_LEGACY(nb1413m3_inputport0_r) |
| 349 | 349 | AM_RANGE(0x90, 0x97) AM_WRITE(nbmj8688_blitter_w) |
| 350 | 350 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| r22781 | r22782 | |
| 385 | 385 | AM_RANGE(0x20, 0x3f) AM_WRITE(nbmj8688_clut_w) |
| 386 | 386 | AM_RANGE(0x50, 0x50) AM_WRITE(mjsikaku_romsel_w) |
| 387 | 387 | AM_RANGE(0x70, 0x77) AM_WRITE(nbmj8688_blitter_w) |
| 388 | AM_RANGE(0x81, 0x81) AM_DEVREAD_LEGACY("psg", ay8910_r) | |
| 389 | AM_RANGE(0x82, 0x83) AM_DEVWRITE_LEGACY("psg", ay8910_data_address_w) | |
| 388 | AM_RANGE(0x81, 0x81) AM_DEVREAD("psg", ay8910_device, data_r) | |
| 389 | AM_RANGE(0x82, 0x83) AM_DEVWRITE("psg", ay8910_device, data_address_w) | |
| 390 | 390 | AM_RANGE(0x90, 0x90) AM_READ_LEGACY(nb1413m3_inputport0_r) |
| 391 | 391 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| 392 | 392 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| r22781 | r22782 | |
| 406 | 406 | AM_RANGE(0x20, 0x3f) AM_WRITE(nbmj8688_clut_w) |
| 407 | 407 | AM_RANGE(0x40, 0x47) AM_WRITE(nbmj8688_blitter_w) |
| 408 | 408 | AM_RANGE(0x50, 0x50) AM_WRITE(seiha_romsel_w) |
| 409 | AM_RANGE(0x81, 0x81) AM_DEVREAD_LEGACY("psg", ay8910_r) | |
| 410 | AM_RANGE(0x82, 0x83) AM_DEVWRITE_LEGACY("psg", ay8910_data_address_w) | |
| 409 | AM_RANGE(0x81, 0x81) AM_DEVREAD("psg", ay8910_device, data_r) | |
| 410 | AM_RANGE(0x82, 0x83) AM_DEVWRITE("psg", ay8910_device, data_address_w) | |
| 411 | 411 | AM_RANGE(0x90, 0x90) AM_READ_LEGACY(nb1413m3_inputport0_r) |
| 412 | 412 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| 413 | 413 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| r22781 | r22782 | |
| 427 | 427 | AM_RANGE(0x10, 0x10) AM_WRITE_LEGACY(nb1413m3_sndrombank2_w) |
| 428 | 428 | AM_RANGE(0x20, 0x3f) AM_WRITE(nbmj8688_clut_w) |
| 429 | 429 | AM_RANGE(0x50, 0x50) AM_WRITE(seiha_romsel_w) |
| 430 | AM_RANGE(0x81, 0x81) AM_DEVREAD_LEGACY("psg", ay8910_r) | |
| 431 | AM_RANGE(0x82, 0x83) AM_DEVWRITE_LEGACY("psg", ay8910_data_address_w) | |
| 430 | AM_RANGE(0x81, 0x81) AM_DEVREAD("psg", ay8910_device, data_r) | |
| 431 | AM_RANGE(0x82, 0x83) AM_DEVWRITE("psg", ay8910_device, data_address_w) | |
| 432 | 432 | AM_RANGE(0x90, 0x90) AM_READ_LEGACY(nb1413m3_inputport0_r) |
| 433 | 433 | AM_RANGE(0x90, 0x97) AM_WRITE(nbmj8688_blitter_w) |
| 434 | 434 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| r22781 | r22782 | |
| 447 | 447 | AM_RANGE(0x00, 0x00) AM_WRITE_LEGACY(nb1413m3_nmi_clock_w) |
| 448 | 448 | AM_RANGE(0x20, 0x3f) AM_WRITE(nbmj8688_clut_w) |
| 449 | 449 | AM_RANGE(0x50, 0x50) AM_WRITE(mjsikaku_romsel_w) |
| 450 | AM_RANGE(0x81, 0x81) AM_DEVREAD_LEGACY("psg", ay8910_r) | |
| 451 | AM_RANGE(0x82, 0x83) AM_DEVWRITE_LEGACY("psg", ay8910_data_address_w) | |
| 450 | AM_RANGE(0x81, 0x81) AM_DEVREAD("psg", ay8910_device, data_r) | |
| 451 | AM_RANGE(0x82, 0x83) AM_DEVWRITE("psg", ay8910_device, data_address_w) | |
| 452 | 452 | AM_RANGE(0x90, 0x90) AM_READ_LEGACY(nb1413m3_inputport0_r) |
| 453 | 453 | AM_RANGE(0x90, 0x97) AM_WRITE(nbmj8688_blitter_w) |
| 454 | 454 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| r22781 | r22782 | |
| 471 | 471 | AM_RANGE(0x45, 0x45) AM_WRITE(nbmj8688_HD61830B_1_instr_w) |
| 472 | 472 | AM_RANGE(0x46, 0x46) AM_WRITE(nbmj8688_HD61830B_both_data_w) |
| 473 | 473 | AM_RANGE(0x47, 0x47) AM_WRITE(nbmj8688_HD61830B_both_instr_w) |
| 474 | AM_RANGE(0x81, 0x81) AM_DEVREAD_LEGACY("psg", ay8910_r) | |
| 475 | AM_RANGE(0x82, 0x83) AM_DEVWRITE_LEGACY("psg", ay8910_data_address_w) | |
| 474 | AM_RANGE(0x81, 0x81) AM_DEVREAD("psg", ay8910_device, data_r) | |
| 475 | AM_RANGE(0x82, 0x83) AM_DEVWRITE("psg", ay8910_device, data_address_w) | |
| 476 | 476 | AM_RANGE(0x90, 0x90) AM_READ_LEGACY(nb1413m3_inputport0_r) |
| 477 | 477 | AM_RANGE(0x90, 0x97) AM_WRITE(nbmj8688_blitter_w) |
| 478 | 478 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| r22781 | r22782 | |
| 516 | 516 | AM_RANGE(0x20, 0x3f) AM_WRITE(nbmj8688_clut_w) |
| 517 | 517 | AM_RANGE(0x40, 0x47) AM_WRITE(nbmj8688_blitter_w) |
| 518 | 518 | AM_RANGE(0x50, 0x50) AM_WRITE(mjsikaku_romsel_w) |
| 519 | AM_RANGE(0x81, 0x81) AM_DEVREAD_LEGACY("psg", ay8910_r) | |
| 520 | AM_RANGE(0x82, 0x83) AM_DEVWRITE_LEGACY("psg", ay8910_data_address_w) | |
| 519 | AM_RANGE(0x81, 0x81) AM_DEVREAD("psg", ay8910_device, data_r) | |
| 520 | AM_RANGE(0x82, 0x83) AM_DEVWRITE("psg", ay8910_device, data_address_w) | |
| 521 | 521 | AM_RANGE(0x90, 0x90) AM_READ_LEGACY(nb1413m3_inputport0_r) |
| 522 | 522 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| 523 | 523 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| r22781 | r22782 | |
|---|---|---|
| 259 | 259 | AM_RANGE(0xbe53, 0xbe53) AM_READWRITE(eeprom_r, eeprom_w) |
| 260 | 260 | AM_RANGE(0xbe80, 0xbe80) AM_DEVWRITE("crtc", mc6845_device, address_w) |
| 261 | 261 | AM_RANGE(0xbe81, 0xbe81) AM_DEVWRITE("crtc", mc6845_device, register_w) |
| 262 | AM_RANGE(0xbe90, 0xbe91) AM_DEVREADWRITE | |
| 262 | AM_RANGE(0xbe90, 0xbe91) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, address_data_w) | |
| 263 | 263 | AM_RANGE(0xbea0, 0xbea0) AM_READ_PORT("VBLANK") //probably other bits as well |
| 264 | 264 | // AM_RANGE(0xbe00, 0xbeff) AM_READ(test_r) |
| 265 | 265 | AM_RANGE(0xc000, 0xdfff) AM_READWRITE(hitpoker_cram_r,hitpoker_cram_w) |
| r22781 | r22782 | |
|---|---|---|
| 95 | 95 | AM_RANGE(0x0800, 0x0807) AM_DEVREADWRITE("6840ptm", ptm6840_device, read, write) |
| 96 | 96 | AM_RANGE(0x1800, 0x1800) AM_READ(soundlatch_byte_r) |
| 97 | 97 | AM_RANGE(0x2000, 0x2001) AM_DEVWRITE_LEGACY("ymsnd", y8950_w) |
| 98 | AM_RANGE(0x2800, 0x2801) AM_DEVWRITE | |
| 98 | AM_RANGE(0x2800, 0x2801) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 99 | 99 | AM_RANGE(0x4000, 0xffff) AM_ROM |
| 100 | 100 | ADDRESS_MAP_END |
| 101 | 101 |
| r22781 | r22782 | |
|---|---|---|
| 262 | 262 | static ADDRESS_MAP_START( hyouban_io_map, AS_IO, 8, nbmj8991_state ) |
| 263 | 263 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 264 | 264 | AM_RANGE(0x00, 0x7f) AM_READ_LEGACY(nb1413m3_sndrom_r) AM_WRITE(nbmj8991_blitter_w) |
| 265 | AM_RANGE(0x81, 0x81) AM_DEVREAD_LEGACY("fmsnd", ay8910_r) | |
| 266 | AM_RANGE(0x82, 0x83) AM_DEVWRITE_LEGACY("fmsnd", ay8910_data_address_w) | |
| 265 | AM_RANGE(0x81, 0x81) AM_DEVREAD("fmsnd", ay8910_device, data_r) | |
| 266 | AM_RANGE(0x82, 0x83) AM_DEVWRITE("fmsnd", ay8910_device, data_address_w) | |
| 267 | 267 | AM_RANGE(0x90, 0x90) AM_READ_LEGACY(nb1413m3_inputport0_r) |
| 268 | 268 | AM_RANGE(0xa0, 0xa0) AM_READWRITE_LEGACY(nb1413m3_inputport1_r,nb1413m3_inputportsel_w) |
| 269 | 269 | AM_RANGE(0xb0, 0xb0) AM_READWRITE_LEGACY(nb1413m3_inputport2_r,nb1413m3_sndrombank1_w) |
| r22781 | r22782 | |
|---|---|---|
| 180 | 180 | AM_RANGE(0xb000, 0xb000) AM_WRITENOP |
| 181 | 181 | AM_RANGE(0xb100, 0xb100) AM_WRITE(wallc_coin_counter_w) |
| 182 | 182 | AM_RANGE(0xb200, 0xb200) AM_WRITENOP |
| 183 | AM_RANGE(0xb500, 0xb500) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 184 | AM_RANGE(0xb600, 0xb600) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 183 | AM_RANGE(0xb500, 0xb500) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 184 | AM_RANGE(0xb600, 0xb600) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 185 | 185 | ADDRESS_MAP_END |
| 186 | 186 | |
| 187 | 187 |
| r22781 | r22782 | |
|---|---|---|
| 59 | 59 | AM_RANGE(0x20,0x27) AM_WRITE(lamp_w) |
| 60 | 60 | AM_RANGE(0x28,0x28) AM_WRITE(sol_w) |
| 61 | 61 | AM_RANGE(0x40,0x44) AM_WRITE(disp_w) |
| 62 | AM_RANGE(0x60,0x60) AM_DEVWRITE | |
| 62 | AM_RANGE(0x60,0x60) AM_DEVWRITE("ay1", ay8910_device, address_w) | |
| 63 | 63 | AM_RANGE(0x61,0x61) AM_READ_PORT("DSW") //AM_READ(dsw_r) |
| 64 | AM_RANGE(0x62,0x62) AM_DEVWRITE_LEGACY("ay1", ay8910_data_w) | |
| 65 | AM_RANGE(0x80,0x80) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) | |
| 66 | AM_RANGE(0x82,0x82) AM_DEVWRITE_LEGACY("ay2", ay8910_data_w) | |
| 67 | AM_RANGE(0xa0,0xa0) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 64 | AM_RANGE(0x62,0x62) AM_DEVWRITE("ay1", ay8910_device, data_w) | |
| 65 | AM_RANGE(0x80,0x80) AM_DEVWRITE("ay2", ay8910_device, address_w) | |
| 66 | AM_RANGE(0x82,0x82) AM_DEVWRITE("ay2", ay8910_device, data_w) | |
| 67 | AM_RANGE(0xa0,0xa0) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 68 | 68 | AM_RANGE(0xc0,0xc0) AM_WRITE(col_w) |
| 69 | 69 | ADDRESS_MAP_END |
| 70 | 70 |
| r22781 | r22782 | |
|---|---|---|
| 267 | 267 | |
| 268 | 268 | static ADDRESS_MAP_START( bestbest_sound_map, AS_PROGRAM, 8, suna16_state ) |
| 269 | 269 | AM_RANGE( 0x0000, 0xbfff ) AM_ROM // ROM |
| 270 | AM_RANGE( 0xc000, 0xc001 ) AM_DEVWRITE_LEGACY("ymsnd", ym3526_w ) // | |
| 271 | AM_RANGE( 0xc002, 0xc003 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w ) // AY8910 | |
| 270 | AM_RANGE( 0xc000, 0xc001 ) AM_DEVWRITE_LEGACY("ymsnd", ym3526_w) // | |
| 271 | AM_RANGE( 0xc002, 0xc003 ) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) // AY8910 | |
| 272 | 272 | AM_RANGE( 0xe000, 0xe7ff ) AM_RAM // RAM |
| 273 | 273 | AM_RANGE( 0xf000, 0xf000 ) AM_WRITE(soundlatch2_byte_w ) // To PCM Z80 |
| 274 | 274 | AM_RANGE( 0xf800, 0xf800 ) AM_READ ( soundlatch_byte_r ) // From Main CPU |
| r22781 | r22782 | |
|---|---|---|
| 156 | 156 | AM_RANGE(0xa007, 0xa007) AM_WRITENOP /* ???? */ |
| 157 | 157 | |
| 158 | 158 | /* guess */ |
| 159 | AM_RANGE(0xb000, 0xb000) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) | |
| 160 | AM_RANGE(0xb800, 0xb800) AM_DEVREADWRITE_LEGACY("ay2", ay8910_r, ay8910_data_w) | |
| 159 | AM_RANGE(0xb000, 0xb000) AM_DEVWRITE("ay2", ay8910_device, address_w) | |
| 160 | AM_RANGE(0xb800, 0xb800) AM_DEVREADWRITE("ay2", ay8910_device, data_r, data_w) | |
| 161 | 161 | ADDRESS_MAP_END |
| 162 | 162 | |
| 163 | 163 | static ADDRESS_MAP_START( main_portmap, AS_IO, 8, bagman_state ) |
| 164 | 164 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 165 | AM_RANGE(0x08, 0x09) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 166 | AM_RANGE(0x0c, 0x0c) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 165 | AM_RANGE(0x08, 0x09) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 166 | AM_RANGE(0x0c, 0x0c) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 167 | 167 | //AM_RANGE(0x56, 0x56) AM_WRITENOP |
| 168 | 168 | ADDRESS_MAP_END |
| 169 | 169 |
| r22781 | r22782 | |
|---|---|---|
| 33 | 33 | |
| 34 | 34 | // bit 5 goes to 8910 #0 BDIR pin |
| 35 | 35 | if ((m_last_write & 0x20) == 0x20 && (data & 0x20) == 0x00) |
| 36 | | |
| 36 | machine().device<ay8910_device>("ay1")->data_address_w(space, m_last_write >> 4, m_psg_latch); | |
| 37 | 37 | |
| 38 | 38 | // bit 7 goes to 8910 #1 BDIR pin |
| 39 | 39 | if ((m_last_write & 0x80) == 0x80 && (data & 0x80) == 0x00) |
| 40 | | |
| 40 | machine().device<ay8910_device>("ay2")->data_address_w(space, m_last_write >> 6, m_psg_latch); | |
| 41 | 41 | |
| 42 | 42 | m_last_write = data; |
| 43 | 43 | } |
| r22781 | r22782 | |
|---|---|---|
| 217 | 217 | AM_RANGE(0x0000, 0x7fff) AM_READ(samples_r) |
| 218 | 218 | AM_RANGE(0x8000, 0x8000) AM_READ(keyboard_r) AM_WRITENOP // ?? |
| 219 | 219 | AM_RANGE(0x8001, 0x8001) AM_READNOP AM_WRITE(keyboard_w) // ?? |
| 220 | AM_RANGE(0x8020, 0x8020) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 221 | AM_RANGE(0x8020, 0x8021) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 220 | AM_RANGE(0x8020, 0x8020) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 221 | AM_RANGE(0x8020, 0x8021) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 222 | 222 | AM_RANGE(0x8040, 0x8040) AM_WRITE(adpcm_w) |
| 223 | 223 | AM_RANGE(0x8060, 0x8060) AM_WRITE(ctrl_w) |
| 224 | 224 | AM_RANGE(0x8080, 0x8080) AM_WRITENOP // ?? |
| r22781 | r22782 | |
| 240 | 240 | AM_RANGE(0x0000, 0x7fff) AM_READ(samples_r) |
| 241 | 241 | AM_RANGE(0x8000, 0x8000) AM_READ(keyboard_r) AM_WRITENOP // ?? |
| 242 | 242 | AM_RANGE(0x8001, 0x8001) AM_READNOP AM_WRITE(keyboard_w) // ?? |
| 243 | AM_RANGE(0x8020, 0x8020) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 244 | AM_RANGE(0x8020, 0x8021) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 243 | AM_RANGE(0x8020, 0x8020) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 244 | AM_RANGE(0x8020, 0x8021) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 245 | 245 | AM_RANGE(0x8040, 0x8040) AM_WRITE(adpcm_w) |
| 246 | 246 | AM_RANGE(0x8060, 0x8060) AM_WRITE(ctrl_w) |
| 247 | 247 | AM_RANGE(0x8080, 0x8080) AM_WRITENOP // ?? |
| r22781 | r22782 | |
|---|---|---|
| 202 | 202 | AM_RANGE(0x5000, 0x7fff) AM_MIRROR(0x8000) AM_ROM |
| 203 | 203 | AM_RANGE(0x8000, 0x83ff) AM_WRITE(mole_tileram_w) AM_READNOP |
| 204 | 204 | AM_RANGE(0x8400, 0x8400) AM_WRITE(mole_tilebank_w) |
| 205 | AM_RANGE(0x8c00, 0x8c01) AM_DEVWRITE | |
| 205 | AM_RANGE(0x8c00, 0x8c01) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 206 | 206 | AM_RANGE(0x8c40, 0x8c40) AM_WRITENOP // ??? |
| 207 | 207 | AM_RANGE(0x8c80, 0x8c80) AM_WRITENOP // ??? |
| 208 | 208 | AM_RANGE(0x8c81, 0x8c81) AM_WRITENOP // ??? |
| r22781 | r22782 | |
|---|---|---|
| 656 | 656 | |
| 657 | 657 | if (m_ay8910_1&0x03) // SW1 read. |
| 658 | 658 | { |
| 659 | psg_ret = ay8910_r(machine().device("ay1"), space, 0); | |
| 660 | //logerror("PSG porta ay1 returned %02X\n",psg_ret); | |
| 659 | psg_ret = machine().device<ay8910_device>("ay1")->data_r(space, 0); | |
| 660 | //logerror("PSG porta ay1 returned %02X\n",psg_ret); | |
| 661 | 661 | } |
| 662 | 662 | |
| 663 | 663 | else if (m_ay8910_2&0x03) //i don't think we read anything from Port A on ay2, Can be removed once game works ok. |
| 664 | 664 | { |
| 665 | psg_ret = | |
| 665 | psg_ret = machine().device<ay8910_device>("ay2")->data_r(space, 0); | |
| 666 | 666 | //logerror("PSG porta ay2 returned %02X\n",psg_ret); |
| 667 | 667 | } |
| 668 | 668 | return psg_ret; |
| r22781 | r22782 | |
| 755 | 755 | break; |
| 756 | 756 | case 0x06: //WRITE |
| 757 | 757 | { |
| 758 | | |
| 758 | machine().device<ay8910_device>("ay1")->data_w(space, 0 , m_psg_data); | |
| 759 | 759 | //logerror("VIA Port A write data ay1: %02X\n",m_psg_data); |
| 760 | 760 | break; |
| 761 | 761 | } |
| 762 | 762 | case 0x07: //LATCH Address (set register) |
| 763 | 763 | { |
| 764 | | |
| 764 | machine().device<ay8910_device>("ay1")->address_w(space, 0 , m_psg_data); | |
| 765 | 765 | //logerror("VIA Port B write register ay1: %02X\n",m_psg_data); |
| 766 | 766 | break; |
| 767 | 767 | } |
| r22781 | r22782 | |
| 782 | 782 | break; |
| 783 | 783 | case 0x06: //WRITE |
| 784 | 784 | { |
| 785 | | |
| 785 | machine().device<ay8910_device>("ay2")->data_w(space, 0, m_psg_data); | |
| 786 | 786 | //logerror("VIA Port A write data ay2: %02X\n",m_psg_data); |
| 787 | 787 | break; |
| 788 | 788 | } |
| 789 | 789 | case 0x07: //LATCH Address (set register) |
| 790 | 790 | { |
| 791 | | |
| 791 | machine().device<ay8910_device>("ay2")->address_w(space, 0, m_psg_data); | |
| 792 | 792 | //logerror("VIA Port B write register ay2: %02X\n",m_psg_data); |
| 793 | 793 | break; |
| 794 | 794 | } |
| r22781 | r22782 | |
|---|---|---|
| 928 | 928 | AM_RANGE(0xf100, 0xf100) AM_DEVWRITE("sn1", sn76489_device, write) /* SN76489 #1 */ |
| 929 | 929 | AM_RANGE(0xf200, 0xf203) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) /* Input Ports 2 & 4 */ |
| 930 | 930 | AM_RANGE(0xf300, 0xf300) AM_DEVWRITE("sn2", sn76489_device, write) /* SN76489 #2 */ |
| 931 | AM_RANGE(0xf400, 0xf400) AM_DEVWRITE | |
| 931 | AM_RANGE(0xf400, 0xf400) AM_DEVWRITE("aysnd", ay8910_device, address_w) /* YM2149 control */ | |
| 932 | 932 | AM_RANGE(0xf500, 0xf500) AM_DEVWRITE("sn3", sn76489_device, write) /* SN76489 #3 */ |
| 933 | AM_RANGE(0xf600, 0xf600) AM_DEVREADWRITE | |
| 933 | AM_RANGE(0xf600, 0xf600) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, data_w) /* YM2149 (Input Port 1) */ | |
| 934 | 934 | AM_RANGE(0xf700, 0xf701) AM_READWRITE(usart_8251_r, usart_8251_w) /* USART 8251 port */ |
| 935 | 935 | AM_RANGE(0xf800, 0xf803) AM_READWRITE(copro_sm7831_r, copro_sm7831_w) /* SM7831 Co-Processor */ |
| 936 | 936 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 353 | 353 | AM_RANGE(0x2000, 0x23ff) AM_RAM |
| 354 | 354 | AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r) AM_WRITE(nmi_sub_enable_w) |
| 355 | 355 | AM_RANGE(0x4000, 0x4000) AM_RAM |
| 356 | AM_RANGE(0x5000, 0x5001) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 357 | AM_RANGE(0x6000, 0x6001) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 356 | AM_RANGE(0x5000, 0x5001) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 357 | AM_RANGE(0x6000, 0x6001) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 358 | 358 | ADDRESS_MAP_END |
| 359 | 359 | |
| 360 | 360 | static const gfx_layout charlayout = |
| r22781 | r22782 | |
|---|---|---|
| 220 | 220 | |
| 221 | 221 | static ADDRESS_MAP_START( magmax_sound_io_map, AS_IO, 8, magmax_state ) |
| 222 | 222 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 223 | AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 224 | AM_RANGE(0x02, 0x03) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 225 | AM_RANGE(0x04, 0x05) AM_DEVWRITE_LEGACY("ay3", ay8910_address_data_w) | |
| 223 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 224 | AM_RANGE(0x02, 0x03) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 225 | AM_RANGE(0x04, 0x05) AM_DEVWRITE("ay3", ay8910_device, address_data_w) | |
| 226 | 226 | AM_RANGE(0x06, 0x06) AM_READ(magmax_sound_r) |
| 227 | 227 | ADDRESS_MAP_END |
| 228 | 228 |
| r22781 | r22782 | |
|---|---|---|
| 217 | 217 | AM_RANGE(0xd40b, 0xd40b) AM_MIRROR(0x00f0) AM_READ_PORT("IN2") |
| 218 | 218 | AM_RANGE(0xd40c, 0xd40c) AM_MIRROR(0x00f0) AM_READ_PORT("IN3") /* Service */ |
| 219 | 219 | AM_RANGE(0xd40d, 0xd40d) AM_MIRROR(0x00f0) AM_READ_PORT("IN4") |
| 220 | AM_RANGE(0xd40e, 0xd40f) AM_MIRROR(0x00f0) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 221 | AM_RANGE(0xd40f, 0xd40f) AM_MIRROR(0x00f0) AM_DEVREAD_LEGACY("ay1", ay8910_r) /* DSW2 and DSW3 */ | |
| 220 | AM_RANGE(0xd40e, 0xd40f) AM_MIRROR(0x00f0) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 221 | AM_RANGE(0xd40f, 0xd40f) AM_MIRROR(0x00f0) AM_DEVREAD("ay1", ay8910_device, data_r) /* DSW2 and DSW3 */ | |
| 222 | 222 | AM_RANGE(0xd500, 0xd505) AM_MIRROR(0x00f0) AM_WRITEONLY AM_SHARE("scroll") |
| 223 | 223 | AM_RANGE(0xd506, 0xd507) AM_MIRROR(0x00f0) AM_WRITEONLY AM_SHARE("colorbank") |
| 224 | 224 | AM_RANGE(0xd508, 0xd508) AM_MIRROR(0x00f0) AM_WRITE(taitosj_collision_reg_clear_w) |
| r22781 | r22782 | |
| 257 | 257 | AM_RANGE(0xd40b, 0xd40b) AM_MIRROR(0x00f0) AM_READ_PORT("IN2") |
| 258 | 258 | AM_RANGE(0xd40c, 0xd40c) AM_MIRROR(0x00f0) AM_READ_PORT("IN3") /* Service */ |
| 259 | 259 | AM_RANGE(0xd40d, 0xd40d) AM_MIRROR(0x00f0) AM_READ_PORT("IN4") |
| 260 | AM_RANGE(0xd40e, 0xd40f) AM_MIRROR(0x00f0) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 261 | AM_RANGE(0xd40f, 0xd40f) AM_MIRROR(0x00f0) AM_DEVREAD_LEGACY("ay1", ay8910_r) /* DSW2 and DSW3 */ | |
| 260 | AM_RANGE(0xd40e, 0xd40f) AM_MIRROR(0x00f0) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 261 | AM_RANGE(0xd40f, 0xd40f) AM_MIRROR(0x00f0) AM_DEVREAD("ay1", ay8910_device, data_r) /* DSW2 and DSW3 */ | |
| 262 | 262 | AM_RANGE(0xd500, 0xd505) AM_MIRROR(0x00f0) AM_WRITEONLY AM_SHARE("scroll") |
| 263 | 263 | AM_RANGE(0xd506, 0xd507) AM_MIRROR(0x00f0) AM_WRITEONLY AM_SHARE("colorbank") |
| 264 | 264 | AM_RANGE(0xd508, 0xd508) AM_MIRROR(0x00f0) AM_WRITE(taitosj_collision_reg_clear_w) |
| r22781 | r22782 | |
| 322 | 322 | AM_RANGE(0xd40b, 0xd40b) AM_MIRROR(0x00f0) AM_READ_PORT("IN2") |
| 323 | 323 | AM_RANGE(0xd40c, 0xd40c) AM_MIRROR(0x00f0) AM_READ_PORT("IN3") /* Service */ |
| 324 | 324 | AM_RANGE(0xd40d, 0xd40d) AM_MIRROR(0x00f0) AM_READ_PORT("IN4") |
| 325 | AM_RANGE(0xd40e, 0xd40f) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 326 | AM_RANGE(0xd40f, 0xd40f) AM_DEVREAD_LEGACY("ay1", ay8910_r) /* DSW2 and DSW3 */ | |
| 325 | AM_RANGE(0xd40e, 0xd40f) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 326 | AM_RANGE(0xd40f, 0xd40f) AM_DEVREAD("ay1", ay8910_device, data_r) /* DSW2 and DSW3 */ | |
| 327 | 327 | AM_RANGE(0xd508, 0xd508) AM_WRITE(taitosj_collision_reg_clear_w) |
| 328 | 328 | AM_RANGE(0xd509, 0xd50a) AM_WRITEONLY AM_SHARE("gfxpointer") |
| 329 | 329 | AM_RANGE(0xd50b, 0xd50b) AM_WRITE(taitosj_soundcommand_w) |
| r22781 | r22782 | |
| 338 | 338 | static ADDRESS_MAP_START( taitosj_audio_map, AS_PROGRAM, 8, taitosj_state ) |
| 339 | 339 | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| 340 | 340 | AM_RANGE(0x4000, 0x43ff) AM_RAM |
| 341 | AM_RANGE(0x4800, 0x4801) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 342 | AM_RANGE(0x4801, 0x4801) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 343 | AM_RANGE(0x4802, 0x4803) AM_DEVWRITE_LEGACY("ay3", ay8910_address_data_w) | |
| 344 | AM_RANGE(0x4803, 0x4803) AM_DEVREAD_LEGACY("ay3", ay8910_r) | |
| 345 | AM_RANGE(0x4804, 0x4805) AM_DEVWRITE_LEGACY("ay4", ay8910_address_data_w) | |
| 346 | AM_RANGE(0x4805, 0x4805) AM_DEVREAD_LEGACY("ay4", ay8910_r) | |
| 341 | AM_RANGE(0x4800, 0x4801) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 342 | AM_RANGE(0x4801, 0x4801) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 343 | AM_RANGE(0x4802, 0x4803) AM_DEVWRITE("ay3", ay8910_device, address_data_w) | |
| 344 | AM_RANGE(0x4803, 0x4803) AM_DEVREAD("ay3", ay8910_device, data_r) | |
| 345 | AM_RANGE(0x4804, 0x4805) AM_DEVWRITE("ay4", ay8910_device, address_data_w) | |
| 346 | AM_RANGE(0x4805, 0x4805) AM_DEVREAD("ay4", ay8910_device, data_r) | |
| 347 | 347 | AM_RANGE(0x5000, 0x5000) AM_READ(soundlatch_byte_r) |
| 348 | 348 | AM_RANGE(0xe000, 0xefff) AM_ROM /* space for diagnostic ROM */ |
| 349 | 349 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 158 | 158 | |
| 159 | 159 | static ADDRESS_MAP_START( audio_io_map, AS_IO, 8, cop01_state ) |
| 160 | 160 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 161 | AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 162 | AM_RANGE(0x02, 0x03) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 163 | AM_RANGE(0x04, 0x05) AM_DEVWRITE_LEGACY("ay3", ay8910_address_data_w) | |
| 161 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 162 | AM_RANGE(0x02, 0x03) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 163 | AM_RANGE(0x04, 0x05) AM_DEVWRITE("ay3", ay8910_device, address_data_w) | |
| 164 | 164 | AM_RANGE(0x06, 0x06) AM_READ(cop01_sound_command_r) |
| 165 | 165 | ADDRESS_MAP_END |
| 166 | 166 |
| r22781 | r22782 | |
|---|---|---|
| 1380 | 1380 | static ADDRESS_MAP_START( marvins_sound_map, AS_PROGRAM, 8, snk_state ) |
| 1381 | 1381 | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| 1382 | 1382 | AM_RANGE(0x4000, 0x4000) AM_READ(marvins_soundlatch_r) |
| 1383 | AM_RANGE(0x8000, 0x8001) AM_DEVWRITE | |
| 1383 | AM_RANGE(0x8000, 0x8001) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 1384 | 1384 | AM_RANGE(0x8002, 0x8007) AM_DEVWRITE("wave", snkwave_device, snkwave_w) |
| 1385 | AM_RANGE(0x8008, 0x8009) AM_DEVWRITE | |
| 1385 | AM_RANGE(0x8008, 0x8009) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 1386 | 1386 | AM_RANGE(0xa000, 0xa000) AM_READ(marvins_sound_nmi_ack_r) |
| 1387 | 1387 | AM_RANGE(0xe000, 0xe7ff) AM_RAM |
| 1388 | 1388 | ADDRESS_MAP_END |
| r22781 | r22782 | |
| 1398 | 1398 | AM_RANGE(0x8000, 0x87ff) AM_RAM |
| 1399 | 1399 | AM_RANGE(0xa000, 0xa000) AM_READ(sgladiat_soundlatch_r) |
| 1400 | 1400 | AM_RANGE(0xc000, 0xc000) AM_READ(sgladiat_sound_nmi_ack_r) |
| 1401 | AM_RANGE(0xe000, 0xe001) AM_DEVWRITE | |
| 1401 | AM_RANGE(0xe000, 0xe001) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 1402 | 1402 | AM_RANGE(0xe002, 0xe003) AM_WRITENOP // ? always FFFF, snkwave leftover? |
| 1403 | AM_RANGE(0xe004, 0xe005) AM_DEVWRITE | |
| 1403 | AM_RANGE(0xe004, 0xe005) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 1404 | 1404 | ADDRESS_MAP_END |
| 1405 | 1405 | |
| 1406 | 1406 | static ADDRESS_MAP_START( jcross_sound_portmap, AS_IO, 8, snk_state ) |
| r22781 | r22782 | |
| 1414 | 1414 | AM_RANGE(0x8000, 0x87ff) AM_RAM |
| 1415 | 1415 | AM_RANGE(0xa000, 0xa000) AM_READ(sgladiat_soundlatch_r) |
| 1416 | 1416 | AM_RANGE(0xc000, 0xc000) AM_READ(sgladiat_sound_nmi_ack_r) |
| 1417 | AM_RANGE(0xe000, 0xe001) AM_DEVWRITE | |
| 1417 | AM_RANGE(0xe000, 0xe001) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 1418 | 1418 | // AM_RANGE(0xe002, 0xe002) AM_WRITENOP // bitfielded(0-5) details unknown. Filter enable? |
| 1419 | AM_RANGE(0xe008, 0xe009) AM_DEVWRITE | |
| 1419 | AM_RANGE(0xe008, 0xe009) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 1420 | 1420 | ADDRESS_MAP_END |
| 1421 | 1421 | |
| 1422 | 1422 | static ADDRESS_MAP_START( hal21_sound_portmap, AS_IO, 8, snk_state ) |
| r22781 | r22782 | |
|---|---|---|
| 277 | 277 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 278 | 278 | AM_RANGE(0x6000, 0x63ff) AM_RAM |
| 279 | 279 | AM_RANGE(0x7000, 0x7000) AM_READ(soundlatch_byte_r) /* likely ay8910 input port, not direct */ |
| 280 | AM_RANGE(0x7000, 0x7001) AM_DEVWRITE | |
| 280 | AM_RANGE(0x7000, 0x7001) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 281 | 281 | AM_RANGE(0x7004, 0x7004) AM_WRITENOP //sound filter? |
| 282 | 282 | AM_RANGE(0x7006, 0x7006) AM_WRITENOP //irq ack? |
| 283 | 283 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 262 | 262 | AM_RANGE(0x4800, 0x4800) AM_READ_PORT("DSW") AM_WRITE(route16_out0_w) |
| 263 | 263 | AM_RANGE(0x5000, 0x5000) AM_READ_PORT("IN0") AM_WRITE(route16_out1_w) |
| 264 | 264 | AM_RANGE(0x5800, 0x5800) AM_READWRITE(ttmahjng_input_port_matrix_r, ttmahjng_input_port_matrix_w) |
| 265 | AM_RANGE(0x6800, 0x6800) AM_DEVWRITE_LEGACY("ay8910", ay8910_data_w) | |
| 266 | AM_RANGE(0x6900, 0x6900) AM_DEVWRITE_LEGACY("ay8910", ay8910_address_w) | |
| 265 | AM_RANGE(0x6800, 0x6800) AM_DEVWRITE("ay8910", ay8910_device, data_w) | |
| 266 | AM_RANGE(0x6900, 0x6900) AM_DEVWRITE("ay8910", ay8910_device, address_w) | |
| 267 | 267 | AM_RANGE(0x8000, 0xbfff) AM_RAM AM_SHARE("videoram1") |
| 268 | 268 | ADDRESS_MAP_END |
| 269 | 269 | |
| r22781 | r22782 | |
| 285 | 285 | |
| 286 | 286 | static ADDRESS_MAP_START( cpu1_io_map, AS_IO, 8, route16_state ) |
| 287 | 287 | ADDRESS_MAP_GLOBAL_MASK(0x1ff) |
| 288 | AM_RANGE(0x0000, 0x0000) AM_MIRROR(0x00ff) AM_DEVWRITE_LEGACY("ay8910", ay8910_data_w) | |
| 289 | AM_RANGE(0x0100, 0x0100) AM_MIRROR(0x00ff) AM_DEVWRITE_LEGACY("ay8910", ay8910_address_w) | |
| 288 | AM_RANGE(0x0000, 0x0000) AM_MIRROR(0x00ff) AM_DEVWRITE("ay8910", ay8910_device, data_w) | |
| 289 | AM_RANGE(0x0100, 0x0100) AM_MIRROR(0x00ff) AM_DEVWRITE("ay8910", ay8910_device, address_w) | |
| 290 | 290 | ADDRESS_MAP_END |
| 291 | 291 | |
| 292 | 292 |
| r22781 | r22782 | |
|---|---|---|
| 455 | 455 | |
| 456 | 456 | static ADDRESS_MAP_START( sound_io_map, AS_IO, 8, kingdrby_state ) |
| 457 | 457 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 458 | AM_RANGE(0x40, 0x40) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 459 | AM_RANGE(0x40, 0x41) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 458 | AM_RANGE(0x40, 0x40) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 459 | AM_RANGE(0x40, 0x41) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 460 | 460 | ADDRESS_MAP_END |
| 461 | 461 | |
| 462 | 462 | static ADDRESS_MAP_START( cowrace_sound_map, AS_PROGRAM, 8, kingdrby_state ) |
| r22781 | r22782 | |
|---|---|---|
| 562 | 562 | |
| 563 | 563 | static ADDRESS_MAP_START( pbillian_port_map, AS_IO, 8, superqix_state ) |
| 564 | 564 | AM_RANGE(0x0000, 0x01ff) AM_RAM_WRITE(paletteram_BBGGRRII_byte_w) AM_SHARE("paletteram") |
| 565 | AM_RANGE(0x0401, 0x0401) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 566 | AM_RANGE(0x0402, 0x0403) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 565 | AM_RANGE(0x0401, 0x0401) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 566 | AM_RANGE(0x0402, 0x0403) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 567 | 567 | AM_RANGE(0x0408, 0x0408) AM_READ(pbillian_from_mcu_r) |
| 568 | 568 | AM_RANGE(0x0408, 0x0408) AM_WRITE(pbillian_z80_mcu_w) |
| 569 | 569 | AM_RANGE(0x0410, 0x0410) AM_WRITE(pbillian_0410_w) |
| r22781 | r22782 | |
| 575 | 575 | |
| 576 | 576 | static ADDRESS_MAP_START( hotsmash_port_map, AS_IO, 8, superqix_state ) |
| 577 | 577 | AM_RANGE(0x0000, 0x01ff) AM_RAM_WRITE(paletteram_BBGGRRII_byte_w) AM_SHARE("paletteram") |
| 578 | AM_RANGE(0x0401, 0x0401) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 579 | AM_RANGE(0x0402, 0x0403) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) | |
| 578 | AM_RANGE(0x0401, 0x0401) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 579 | AM_RANGE(0x0402, 0x0403) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 580 | 580 | AM_RANGE(0x0408, 0x0408) AM_READ(hotsmash_from_mcu_r) |
| 581 | 581 | AM_RANGE(0x0408, 0x0408) AM_WRITE(hotsmash_z80_mcu_w) |
| 582 | 582 | AM_RANGE(0x0410, 0x0410) AM_WRITE(pbillian_0410_w) |
| r22781 | r22782 | |
| 588 | 588 | |
| 589 | 589 | static ADDRESS_MAP_START( sqix_port_map, AS_IO, 8, superqix_state ) |
| 590 | 590 | AM_RANGE(0x0000, 0x00ff) AM_RAM_WRITE(paletteram_BBGGRRII_byte_w) AM_SHARE("paletteram") |
| 591 | AM_RANGE(0x0401, 0x0401) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 592 | AM_RANGE(0x0402, 0x0403) AM_DEVWRITE_LEGACY("ay1", ay8910_data_address_w) | |
| 593 | AM_RANGE(0x0405, 0x0405) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 594 | AM_RANGE(0x0406, 0x0407) AM_DEVWRITE_LEGACY("ay2", ay8910_data_address_w) | |
| 591 | AM_RANGE(0x0401, 0x0401) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 592 | AM_RANGE(0x0402, 0x0403) AM_DEVWRITE("ay1", ay8910_device, data_address_w) | |
| 593 | AM_RANGE(0x0405, 0x0405) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 594 | AM_RANGE(0x0406, 0x0407) AM_DEVWRITE("ay2", ay8910_device, data_address_w) | |
| 595 | 595 | AM_RANGE(0x0408, 0x0408) AM_READ(mcu_acknowledge_r) |
| 596 | 596 | AM_RANGE(0x0410, 0x0410) AM_WRITE(superqix_0410_w) /* ROM bank, NMI enable, tile bank */ |
| 597 | 597 | AM_RANGE(0x0418, 0x0418) AM_READ(nmi_ack_r) |
| r22781 | r22782 | |
|---|---|---|
| 180 | 180 | UINT8 ret = 0; |
| 181 | 181 | |
| 182 | 182 | if (m_AY8910_selected & 0x08) |
| 183 | ret = | |
| 183 | ret = machine().device<ay8910_device>("ay1")->data_r(space, 0); | |
| 184 | 184 | |
| 185 | 185 | if (m_AY8910_selected & 0x10) |
| 186 | ret = | |
| 186 | ret = machine().device<ay8910_device>("ay2")->data_r(space, 0); | |
| 187 | 187 | |
| 188 | 188 | return ret; |
| 189 | 189 | } |
| r22781 | r22782 | |
| 192 | 192 | WRITE8_MEMBER(r2dtank_state::AY8910_port_w) |
| 193 | 193 | { |
| 194 | 194 | if (m_AY8910_selected & 0x08) |
| 195 | | |
| 195 | machine().device<ay8910_device>("ay1")->data_address_w(space, m_AY8910_selected >> 2, data); | |
| 196 | 196 | |
| 197 | 197 | if (m_AY8910_selected & 0x10) |
| 198 | | |
| 198 | machine().device<ay8910_device>("ay2")->data_address_w(space, m_AY8910_selected >> 2, data); | |
| 199 | 199 | } |
| 200 | 200 | |
| 201 | 201 |
| r22781 | r22782 | |
|---|---|---|
| 392 | 392 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 393 | 393 | AM_RANGE(0x8800, 0x880f) AM_RAM AM_SHARE("share1") |
| 394 | 394 | AM_RANGE(0x8810, 0x8fff) AM_RAMBANK("bank1") /* Shared RAM with main CPU */ |
| 395 | AM_RANGE(0xa080, 0xa080) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) | |
| 396 | AM_RANGE(0xa081, 0xa081) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 397 | AM_RANGE(0xa082, 0xa082) AM_DEVWRITE_LEGACY("ay1", ay8910_data_w) | |
| 398 | AM_RANGE(0xa090, 0xa090) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) | |
| 399 | AM_RANGE(0xa091, 0xa091) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 400 | AM_RANGE(0xa092, 0xa092) AM_DEVWRITE_LEGACY("ay2", ay8910_data_w) | |
| 395 | AM_RANGE(0xa080, 0xa080) AM_DEVWRITE("ay1", ay8910_device, address_w) | |
| 396 | AM_RANGE(0xa081, 0xa081) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 397 | AM_RANGE(0xa082, 0xa082) AM_DEVWRITE("ay1", ay8910_device, data_w) | |
| 398 | AM_RANGE(0xa090, 0xa090) AM_DEVWRITE("ay2", ay8910_device, address_w) | |
| 399 | AM_RANGE(0xa091, 0xa091) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 400 | AM_RANGE(0xa092, 0xa092) AM_DEVWRITE("ay2", ay8910_device, data_w) | |
| 401 | 401 | AM_RANGE(0xa0e0, 0xa0e0) AM_WRITE(getstar_sh_intenable_w) /* maybe a0f0 also -LE */ |
| 402 | 402 | // AM_RANGE(0xa0f0, 0xa0f0) AM_WRITENOP |
| 403 | 403 | ADDRESS_MAP_END |
| 404 | 404 | |
| 405 | 405 | static ADDRESS_MAP_START( slapfght_sound_map, AS_PROGRAM, 8, slapfght_state ) |
| 406 | 406 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 407 | AM_RANGE(0xa080, 0xa080) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) | |
| 408 | AM_RANGE(0xa081, 0xa081) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 409 | AM_RANGE(0xa082, 0xa082) AM_DEVWRITE_LEGACY("ay1", ay8910_data_w) | |
| 410 | AM_RANGE(0xa090, 0xa090) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) | |
| 411 | AM_RANGE(0xa091, 0xa091) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 412 | AM_RANGE(0xa092, 0xa092) AM_DEVWRITE_LEGACY("ay2", ay8910_data_w) | |
| 407 | AM_RANGE(0xa080, 0xa080) AM_DEVWRITE("ay1", ay8910_device, address_w) | |
| 408 | AM_RANGE(0xa081, 0xa081) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 409 | AM_RANGE(0xa082, 0xa082) AM_DEVWRITE("ay1", ay8910_device, data_w) | |
| 410 | AM_RANGE(0xa090, 0xa090) AM_DEVWRITE("ay2", ay8910_device, address_w) | |
| 411 | AM_RANGE(0xa091, 0xa091) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 412 | AM_RANGE(0xa092, 0xa092) AM_DEVWRITE("ay2", ay8910_device, data_w) | |
| 413 | 413 | AM_RANGE(0xa0e0, 0xa0e0) AM_WRITE(getstar_sh_intenable_w) /* maybe a0f0 also -LE */ |
| 414 | 414 | // AM_RANGE(0xa0f0, 0xa0f0) AM_WRITENOP |
| 415 | 415 | AM_RANGE(0xc800, 0xc80f) AM_RAM AM_SHARE("share1") |
| r22781 | r22782 | |
|---|---|---|
| 738 | 738 | static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, fortyl_state ) |
| 739 | 739 | AM_RANGE(0x0000, 0xbfff) AM_ROM |
| 740 | 740 | AM_RANGE(0xc000, 0xc7ff) AM_RAM |
| 741 | AM_RANGE(0xc800, 0xc801) AM_DEVWRITE | |
| 741 | AM_RANGE(0xc800, 0xc801) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 742 | 742 | AM_RANGE(0xca00, 0xca0d) AM_DEVWRITE_LEGACY("msm", msm5232_w) |
| 743 | 743 | AM_RANGE(0xcc00, 0xcc00) AM_WRITE(sound_control_0_w) |
| 744 | 744 | AM_RANGE(0xce00, 0xce00) AM_WRITE(sound_control_1_w) |
| r22781 | r22782 | |
|---|---|---|
| 309 | 309 | AM_RANGE(0x1800, 0x1bff) AM_RAM |
| 310 | 310 | AM_RANGE(0x1efc, 0x1efc) AM_READ_PORT("JOYS") |
| 311 | 311 | AM_RANGE(0x1efd, 0x1efd) AM_READ_PORT("INPUTS") |
| 312 | AM_RANGE(0x1efe, 0x1eff) AM_DEVWRITE | |
| 312 | AM_RANGE(0x1efe, 0x1eff) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 313 | 313 | AM_RANGE(0x1efe, 0x1efe) AM_READ_PORT("DSW") |
| 314 | 314 | AM_RANGE(0x1eff, 0x1eff) AM_READ_PORT("UNK") |
| 315 | 315 | AM_RANGE(0x2000, 0x3fff) AM_READWRITE(supertnk_videoram_r, supertnk_videoram_w) |
| r22781 | r22782 | |
|---|---|---|
| 211 | 211 | static ADDRESS_MAP_START( sound_cpu_io_map, AS_IO, 8, roul_state ) |
| 212 | 212 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 213 | 213 | AM_RANGE(0x00, 0x00) AM_READ(soundlatch_byte_r) |
| 214 | AM_RANGE(0x00, 0x01) AM_DEVWRITE | |
| 214 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 215 | 215 | ADDRESS_MAP_END |
| 216 | 216 | |
| 217 | 217 | void roul_state::video_start() |
| r22781 | r22782 | |
|---|---|---|
| 632 | 632 | // AM_RANGE(0x08, 0x0b) unk, maybe IO |
| 633 | 633 | // AM_RANGE(0x08, 0x08) AM_READ_PORT("IN2") |
| 634 | 634 | // AM_RANGE(0x09, 0x09) AM_READ_PORT("IN3") |
| 635 | AM_RANGE(0x21, 0x21) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) /* AY8910 data */ | |
| 636 | AM_RANGE(0x23, 0x23) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) /* AY8910 control */ | |
| 635 | AM_RANGE(0x21, 0x21) AM_DEVWRITE("aysnd", ay8910_device, data_w) /* AY8910 data */ | |
| 636 | AM_RANGE(0x23, 0x23) AM_DEVWRITE("aysnd", ay8910_device, address_w) /* AY8910 control */ | |
| 637 | 637 | AM_RANGE(0x28, 0x28) AM_WRITE(avt_6845_address_w) |
| 638 | 638 | AM_RANGE(0x29, 0x29) AM_READWRITE(avt_6845_data_r,avt_6845_data_w) |
| 639 | 639 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 274 | 274 | AM_RANGE(0xe6, 0xe6) AM_READWRITE(fromance_commanddata_r, fromance_busycheck_sub_w) |
| 275 | 275 | AM_RANGE(0xe7, 0xe7) AM_WRITE(fromance_adpcm_reset_w) |
| 276 | 276 | AM_RANGE(0xe8, 0xe8) AM_WRITE(fromance_adpcm_w) |
| 277 | AM_RANGE(0xe9, 0xea) AM_DEVWRITE | |
| 277 | AM_RANGE(0xe9, 0xea) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 278 | 278 | ADDRESS_MAP_END |
| 279 | 279 | |
| 280 | 280 | static ADDRESS_MAP_START( idolmj_sub_io_map, AS_IO, 8, fromance_state ) |
| r22781 | r22782 | |
| 288 | 288 | AM_RANGE(0x26, 0x26) AM_READWRITE(fromance_commanddata_r, fromance_busycheck_sub_w) |
| 289 | 289 | AM_RANGE(0x27, 0x27) AM_WRITE(fromance_adpcm_reset_w) |
| 290 | 290 | AM_RANGE(0x28, 0x28) AM_WRITE(fromance_adpcm_w) |
| 291 | AM_RANGE(0x29, 0x2a) AM_DEVWRITE | |
| 291 | AM_RANGE(0x29, 0x2a) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) | |
| 292 | 292 | ADDRESS_MAP_END |
| 293 | 293 | |
| 294 | 294 | static ADDRESS_MAP_START( fromance_sub_io_map, AS_IO, 8, fromance_state ) |
| r22781 | r22782 | |
|---|---|---|
| 181 | 181 | |
| 182 | 182 | static ADDRESS_MAP_START( popper_sound_map, AS_PROGRAM, 8, popper_state ) |
| 183 | 183 | AM_RANGE(0x0000, 0x0fff) AM_ROM |
| 184 | AM_RANGE(0x8000, 0x8001) AM_DEVWRITE | |
| 184 | AM_RANGE(0x8000, 0x8001) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 185 | 185 | AM_RANGE(0x8002, 0x8002) AM_READNOP //?? all read once at startup and the |
| 186 | 186 | AM_RANGE(0x8002, 0x8002) AM_WRITENOP //?? same writes as 0x8000 (mostly) |
| 187 | 187 | AM_RANGE(0x8003, 0x8003) AM_READNOP //?? result ignored, looks like part |
| 188 | AM_RANGE(0xa000, 0xa001) AM_DEVWRITE | |
| 188 | AM_RANGE(0xa000, 0xa001) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 189 | 189 | AM_RANGE(0xa002, 0xa002) AM_READNOP //?? of AY8910 initialisation |
| 190 | 190 | AM_RANGE(0xa002, 0xa002) AM_WRITENOP //?? same writes as 0xa000 |
| 191 | 191 | AM_RANGE(0xd800, 0xdfff) AM_RAM AM_SHARE("share1") |
| r22781 | r22782 | |
|---|---|---|
| 309 | 309 | static ADDRESS_MAP_START( statriv2_io_map, AS_IO, 8, statriv2_state ) |
| 310 | 310 | AM_RANGE(0x20, 0x23) AM_DEVREADWRITE("ppi8255", i8255_device, read, write) |
| 311 | 311 | AM_RANGE(0x28, 0x2b) AM_READ(question_data_r) AM_WRITEONLY AM_SHARE("question_offset") |
| 312 | AM_RANGE(0xb0, 0xb1) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 313 | AM_RANGE(0xb1, 0xb1) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 312 | AM_RANGE(0xb0, 0xb1) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 313 | AM_RANGE(0xb1, 0xb1) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 314 | 314 | AM_RANGE(0xc0, 0xcf) AM_DEVREADWRITE_LEGACY("tms", tms9927_r, tms9927_w) |
| 315 | 315 | ADDRESS_MAP_END |
| 316 | 316 | |
| r22781 | r22782 | |
| 318 | 318 | static ADDRESS_MAP_START( statusbj_io, AS_IO, 8, statriv2_state ) |
| 319 | 319 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 320 | 320 | AM_RANGE(0x20, 0x23) AM_DEVREADWRITE("ppi8255", i8255_device, read, write) |
| 321 | AM_RANGE(0xb0, 0xb1) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 322 | AM_RANGE(0xb1, 0xb1) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 321 | AM_RANGE(0xb0, 0xb1) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 322 | AM_RANGE(0xb1, 0xb1) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 323 | 323 | AM_RANGE(0xc0, 0xcf) AM_DEVREADWRITE_LEGACY("tms", tms9927_r, tms9927_w) |
| 324 | 324 | ADDRESS_MAP_END |
| 325 | 325 | #endif |
| r22781 | r22782 | |
|---|---|---|
| 274 | 274 | static ADDRESS_MAP_START( subm_sound_io, AS_IO, 8, sub_state ) |
| 275 | 275 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 276 | 276 | AM_RANGE(0x00, 0x00) AM_READWRITE(soundlatch_byte_r, soundlatch2_byte_w) // to/from main CPU |
| 277 | AM_RANGE(0x40, 0x41) AM_DEVREADWRITE_LEGACY("ay1", ay8910_r, ay8910_address_data_w) | |
| 278 | AM_RANGE(0x80, 0x81) AM_DEVREADWRITE_LEGACY("ay2", ay8910_r, ay8910_address_data_w) | |
| 277 | AM_RANGE(0x40, 0x41) AM_DEVREADWRITE("ay1", ay8910_device, data_r, address_data_w) | |
| 278 | AM_RANGE(0x80, 0x81) AM_DEVREADWRITE("ay2", ay8910_device, data_r, address_data_w) | |
| 279 | 279 | ADDRESS_MAP_END |
| 280 | 280 | |
| 281 | 281 |
| r22781 | r22782 | |
|---|---|---|
| 117 | 117 | AM_RANGE(0x0000, 0x0fff) AM_ROM AM_MIRROR(0x1000) |
| 118 | 118 | AM_RANGE(0x2000, 0x2fff) AM_ROM AM_MIRROR(0x1000) |
| 119 | 119 | AM_RANGE(0x4000, 0x43ff) AM_RAM |
| 120 | AM_RANGE(0x6000, 0x6001) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 121 | AM_RANGE(0x6002, 0x6002) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 122 | AM_RANGE(0x8000, 0x8001) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 123 | AM_RANGE(0x8002, 0x8002) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 120 | AM_RANGE(0x6000, 0x6001) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 121 | AM_RANGE(0x6002, 0x6002) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 122 | AM_RANGE(0x8000, 0x8001) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 123 | AM_RANGE(0x8002, 0x8002) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 124 | 124 | ADDRESS_MAP_END |
| 125 | 125 | |
| 126 | 126 | static ADDRESS_MAP_START( sound_io, AS_IO, 8, blueprnt_state ) |
| r22781 | r22782 | |
|---|---|---|
| 449 | 449 | AM_RANGE(0x800080, 0x800081) AM_DEVREADWRITE("h63484", h63484_device, status_r, address_w) |
| 450 | 450 | AM_RANGE(0x800082, 0x800083) AM_DEVREADWRITE("h63484", h63484_device, data_r, data_w) |
| 451 | 451 | AM_RANGE(0x800100, 0x800101) AM_READWRITE(test_r,wh2_w) //related to input |
| 452 | AM_RANGE(0x800140, 0x800143) AM_DEVREADWRITE8 | |
| 452 | AM_RANGE(0x800140, 0x800143) AM_DEVREADWRITE8("aysnd", ay8910_device, data_r, address_data_w, 0x00ff) //18b too | |
| 453 | 453 | AM_RANGE(0x800180, 0x80019f) AM_DEVREADWRITE8_LEGACY("duart68681", duart68681_r, duart68681_w, 0xff ) |
| 454 | 454 | AM_RANGE(0xffc000, 0xffffff) AM_RAM |
| 455 | 455 | ADDRESS_MAP_END |
| r22781 | r22782 | |
| 459 | 459 | // AM_RANGE(0x400000, 0x40001f) ? |
| 460 | 460 | AM_RANGE(0x800080, 0x800081) AM_DEVREADWRITE("h63484", h63484_device, status_r, address_w) // bad |
| 461 | 461 | AM_RANGE(0x800082, 0x800083) AM_DEVREADWRITE("h63484", h63484_device, data_r, data_w) // bad |
| 462 | AM_RANGE(0x800140, 0x800143) AM_DEVREADWRITE8 | |
| 462 | AM_RANGE(0x800140, 0x800143) AM_DEVREADWRITE8("aysnd", ay8910_device, data_r, address_data_w, 0x00ff) //18b too | |
| 463 | 463 | AM_RANGE(0x800180, 0x80019f) AM_DEVREADWRITE8_LEGACY("duart68681", duart68681_r, duart68681_w, 0xff ) |
| 464 | 464 | AM_RANGE(0xff0000, 0xffffff) AM_RAM |
| 465 | 465 | ADDRESS_MAP_END |
| r22781 | r22782 | |
| 514 | 514 | AM_RANGE(0x800082, 0x800083) AM_DEVREADWRITE("h63484", h63484_device, data_r, data_w) |
| 515 | 515 | AM_RANGE(0x800088, 0x80008d) AM_WRITE8(ramdac_io_w, 0x00ff) |
| 516 | 516 | AM_RANGE(0x800100, 0x800101) AM_RAM //??? |
| 517 | AM_RANGE(0x800140, 0x800143) AM_DEVREADWRITE8 | |
| 517 | AM_RANGE(0x800140, 0x800143) AM_DEVREADWRITE8("aysnd", ay8910_device, data_r, address_data_w, 0x00ff) //18b too | |
| 518 | 518 | AM_RANGE(0x800180, 0x80019f) AM_DEVREADWRITE8_LEGACY("duart68681", duart68681_r, duart68681_w, 0xff ) |
| 519 | 519 | AM_RANGE(0xfc0000, 0xffffff) AM_RAM |
| 520 | 520 | ADDRESS_MAP_END |
| r22781 | r22782 | |
| 525 | 525 | AM_RANGE(0x800080, 0x800081) AM_DEVREADWRITE("h63484", h63484_device, status_r, address_w) |
| 526 | 526 | AM_RANGE(0x800082, 0x800083) AM_DEVREADWRITE("h63484", h63484_device, data_r, data_w) |
| 527 | 527 | AM_RANGE(0x800100, 0x800101) AM_RAM //??? |
| 528 | AM_RANGE(0x800140, 0x800143) AM_DEVREADWRITE8 | |
| 528 | AM_RANGE(0x800140, 0x800143) AM_DEVREADWRITE8("aysnd", ay8910_device, data_r, address_data_w, 0x00ff) //18b too | |
| 529 | 529 | AM_RANGE(0x800180, 0x80019f) AM_DEVREADWRITE8_LEGACY("duart68681", duart68681_r, duart68681_w, 0xff ) |
| 530 | 530 | AM_RANGE(0xfc0000, 0xffffff) AM_RAM |
| 531 | 531 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 162 | 162 | static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, buggychl_state ) |
| 163 | 163 | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| 164 | 164 | AM_RANGE(0x4000, 0x47ff) AM_RAM |
| 165 | AM_RANGE(0x4800, 0x4801) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 166 | AM_RANGE(0x4802, 0x4803) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 165 | AM_RANGE(0x4800, 0x4801) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 166 | AM_RANGE(0x4802, 0x4803) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 167 | 167 | AM_RANGE(0x4810, 0x481d) AM_DEVWRITE_LEGACY("msm", msm5232_w) |
| 168 | 168 | AM_RANGE(0x4820, 0x4820) AM_RAM /* VOL/BAL for the 7630 on the MSM5232 output */ |
| 169 | 169 | AM_RANGE(0x4830, 0x4830) AM_RAM /* TRBL/BASS for the 7630 on the MSM5232 output */ |
| r22781 | r22782 | |
|---|---|---|
| 219 | 219 | |
| 220 | 220 | static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, tugboat_state ) |
| 221 | 221 | AM_RANGE(0x0000, 0x01ff) AM_RAM AM_SHARE("ram") |
| 222 | AM_RANGE(0x1060, 0x1061) AM_DEVWRITE | |
| 222 | AM_RANGE(0x1060, 0x1061) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 223 | 223 | AM_RANGE(0x10a0, 0x10a1) AM_WRITE(tugboat_hd46505_0_w) /* scrolling is performed changing the start_addr register (0C/0D) */ |
| 224 | 224 | AM_RANGE(0x10c0, 0x10c1) AM_WRITE(tugboat_hd46505_1_w) |
| 225 | 225 | AM_RANGE(0x11e4, 0x11e7) AM_DEVREADWRITE("pia0", pia6821_device, read, write) |
| r22781 | r22782 | |
|---|---|---|
| 158 | 158 | AM_RANGE(0x0000, 0x1fff) AM_ROM /* ROM */ |
| 159 | 159 | AM_RANGE(0x2000, 0x23ff) AM_RAM /* RAM */ |
| 160 | 160 | AM_RANGE(0x4000, 0x4000) AM_READ(soundlatch_byte_r) /* soundlatch_byte_r */ |
| 161 | AM_RANGE(0x6000, 0x6000) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) /* AY-8910 */ | |
| 162 | AM_RANGE(0x6001, 0x6001) AM_DEVREAD_LEGACY("aysnd", ay8910_r) /* AY-8910 */ | |
| 163 | AM_RANGE(0x6002, 0x6002) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) /* AY-8910 */ | |
| 161 | AM_RANGE(0x6000, 0x6000) AM_DEVWRITE("aysnd", ay8910_device, address_w) /* AY-8910 */ | |
| 162 | AM_RANGE(0x6001, 0x6001) AM_DEVREAD("aysnd", ay8910_device, data_r) /* AY-8910 */ | |
| 163 | AM_RANGE(0x6002, 0x6002) AM_DEVWRITE("aysnd", ay8910_device, data_w) /* AY-8910 */ | |
| 164 | 164 | AM_RANGE(0x8000, 0x8000) AM_WRITE(pandoras_i8039_irqtrigger_w) /* cause INT on the 8039 */ |
| 165 | 165 | AM_RANGE(0xa000, 0xa000) AM_WRITE(soundlatch2_byte_w) /* sound command to the 8039 */ |
| 166 | 166 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 70 | 70 | AM_RANGE(0x0800, 0x0800) AM_DEVWRITE("crtc", mc6845_device, address_w) |
| 71 | 71 | AM_RANGE(0x0801, 0x0801) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w) |
| 72 | 72 | |
| 73 | AM_RANGE(0x2000, 0x2000) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 74 | AM_RANGE(0x2002, 0x2002) AM_DEVREADWRITE_LEGACY("aysnd", ay8910_r, ay8910_address_w) | |
| 73 | AM_RANGE(0x2000, 0x2000) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 74 | AM_RANGE(0x2002, 0x2002) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, address_w) | |
| 75 | 75 | |
| 76 | 76 | AM_RANGE(0x2801, 0x2801) AM_READNOP //read but value discarded? |
| 77 | 77 | AM_RANGE(0x2803, 0x2803) AM_READNOP |
| r22781 | r22782 | |
|---|---|---|
| 65 | 65 | AM_RANGE(0x4000, 0x4fff) AM_READ_BANK("bank1") AM_WRITE(phoenix_videoram_w) /* 2 pages selected by bit 0 of the video register */ |
| 66 | 66 | AM_RANGE(0x5000, 0x53ff) AM_WRITE(phoenix_videoreg_w) |
| 67 | 67 | AM_RANGE(0x5800, 0x5bff) AM_WRITE(phoenix_scroll_w) |
| 68 | AM_RANGE(0x6800, 0x68ff) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 69 | AM_RANGE(0x6900, 0x69ff) AM_DEVREADWRITE_LEGACY("aysnd", ay8910_r, ay8910_data_w) | |
| 68 | AM_RANGE(0x6800, 0x68ff) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 69 | AM_RANGE(0x6900, 0x69ff) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, data_w) | |
| 70 | 70 | AM_RANGE(0x7000, 0x73ff) AM_READ(survival_input_port_0_r) /* IN0 or IN1 */ |
| 71 | 71 | AM_RANGE(0x7800, 0x7bff) AM_READ_PORT("DSW0") /* DSW */ |
| 72 | 72 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 1313 | 1313 | { |
| 1314 | 1314 | if (wcfalcon_flag == 0) |
| 1315 | 1315 | { |
| 1316 | | |
| 1316 | machine().device<ay8910_device>("ay8910")->data_address_w(space, 0, data); | |
| 1317 | 1317 | } |
| 1318 | 1318 | else |
| 1319 | 1319 | { |
| 1320 | | |
| 1320 | machine().device<ay8910_device>("ay8910")->data_address_w(space, 1, data); | |
| 1321 | 1321 | } |
| 1322 | 1322 | |
| 1323 | 1323 | wcfalcon_flag = wcfalcon_flag ^ 1; |
| r22781 | r22782 | |
|---|---|---|
| 549 | 549 | ADDRESS_MAP_GLOBAL_MASK(0x3fff) |
| 550 | 550 | AM_RANGE(0x0000, 0x37ff) AM_ROM |
| 551 | 551 | AM_RANGE(0x3800, 0x3bff) AM_RAM |
| 552 | AM_RANGE(0x3c00, 0x3c00) AM_MIRROR(0x00f4) AM_DEVREADWRITE_LEGACY("aysnd", ay8910_r, ay8910_address_w) | |
| 553 | AM_RANGE(0x3c02, 0x3c02) AM_MIRROR(0x00f4) AM_READNOP AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 552 | AM_RANGE(0x3c00, 0x3c00) AM_MIRROR(0x00f4) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, address_w) | |
| 553 | AM_RANGE(0x3c02, 0x3c02) AM_MIRROR(0x00f4) AM_READNOP AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 554 | 554 | AM_RANGE(0x3c03, 0x3c03) AM_MIRROR(0x00f6) AM_NOP |
| 555 | 555 | AM_RANGE(0x3e00, 0x3e00) AM_MIRROR(0x00f4) AM_READNOP AM_DEVWRITE("tms", tms5220n_device, write) |
| 556 | 556 | AM_RANGE(0x3e02, 0x3e02) AM_MIRROR(0x00f4) AM_DEVREAD("tms", tms5220n_device, read) AM_WRITENOP |
| r22781 | r22782 | |
|---|---|---|
| 190 | 190 | |
| 191 | 191 | static ADDRESS_MAP_START( pinbo_audio_io_map, AS_IO, 8, lasso_state ) |
| 192 | 192 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 193 | AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 194 | AM_RANGE(0x02, 0x02) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 195 | AM_RANGE(0x04, 0x05) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 196 | AM_RANGE(0x06, 0x06) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 193 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 194 | AM_RANGE(0x02, 0x02) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 195 | AM_RANGE(0x04, 0x05) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 196 | AM_RANGE(0x06, 0x06) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 197 | 197 | AM_RANGE(0x08, 0x08) AM_READ(soundlatch_byte_r) AM_WRITENOP /* ??? */ |
| 198 | 198 | AM_RANGE(0x14, 0x14) AM_WRITENOP /* ??? */ |
| 199 | 199 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 134 | 134 | AM_RANGE(0x200008, 0x200009) AM_WRITE(shangha3_blitter_go_w) |
| 135 | 135 | AM_RANGE(0x20000a, 0x20000b) AM_WRITE(shangha3_irq_ack_w) |
| 136 | 136 | AM_RANGE(0x20000c, 0x20000d) AM_WRITE(shangha3_coinctrl_w) |
| 137 | AM_RANGE(0x20001e, 0x20001f) AM_DEVREAD8_LEGACY("aysnd", ay8910_r, 0x00ff) | |
| 138 | AM_RANGE(0x20002e, 0x20002f) AM_DEVWRITE8_LEGACY("aysnd", ay8910_data_w, 0x00ff) | |
| 139 | AM_RANGE(0x20003e, 0x20003f) AM_DEVWRITE8_LEGACY("aysnd", ay8910_address_w, 0x00ff) | |
| 137 | AM_RANGE(0x20001e, 0x20001f) AM_DEVREAD8("aysnd", ay8910_device, data_r, 0x00ff) | |
| 138 | AM_RANGE(0x20002e, 0x20002f) AM_DEVWRITE8("aysnd", ay8910_device, data_w, 0x00ff) | |
| 139 | AM_RANGE(0x20003e, 0x20003f) AM_DEVWRITE8("aysnd", ay8910_device, address_w, 0x00ff) | |
| 140 | 140 | AM_RANGE(0x20004e, 0x20004f) AM_READWRITE(shangha3_prot_r,shangha3_prot_w) |
| 141 | 141 | AM_RANGE(0x20006e, 0x20006f) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff) |
| 142 | 142 | AM_RANGE(0x300000, 0x30ffff) AM_RAM AM_SHARE("ram") /* gfx & work ram */ |
| r22781 | r22782 | |
|---|---|---|
| 1688 | 1688 | static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, halleys_state ) |
| 1689 | 1689 | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| 1690 | 1690 | AM_RANGE(0x4000, 0x47ff) AM_RAM |
| 1691 | AM_RANGE(0x4800, 0x4801) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 1692 | AM_RANGE(0x4801, 0x4801) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 1693 | AM_RANGE(0x4802, 0x4803) AM_DEVWRITE_LEGACY("ay3", ay8910_address_data_w) | |
| 1694 | AM_RANGE(0x4803, 0x4803) AM_DEVREAD_LEGACY("ay3", ay8910_r) | |
| 1695 | AM_RANGE(0x4804, 0x4805) AM_DEVWRITE_LEGACY("ay4", ay8910_address_data_w) | |
| 1696 | AM_RANGE(0x4805, 0x4805) AM_DEVREAD_LEGACY("ay4", ay8910_r) | |
| 1691 | AM_RANGE(0x4800, 0x4801) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 1692 | AM_RANGE(0x4801, 0x4801) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 1693 | AM_RANGE(0x4802, 0x4803) AM_DEVWRITE("ay3", ay8910_device, address_data_w) | |
| 1694 | AM_RANGE(0x4803, 0x4803) AM_DEVREAD("ay3", ay8910_device, data_r) | |
| 1695 | AM_RANGE(0x4804, 0x4805) AM_DEVWRITE("ay4", ay8910_device, address_data_w) | |
| 1696 | AM_RANGE(0x4805, 0x4805) AM_DEVREAD("ay4", ay8910_device, data_r) | |
| 1697 | 1697 | AM_RANGE(0x5000, 0x5000) AM_READ(soundlatch_byte_r) |
| 1698 | 1698 | AM_RANGE(0xe000, 0xefff) AM_ROM // space for diagnostic ROM |
| 1699 | 1699 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 290 | 290 | |
| 291 | 291 | WRITE8_MEMBER(gsword_state::gsword_AY8910_control_port_0_w) |
| 292 | 292 | { |
| 293 | device_t *device = machine().device("ay1"); | |
| 294 | ay8910_address_w(device,space,offset,data); | |
| 293 | ay8910_device *ay8910 = machine().device<ay8910_device>("ay1"); | |
| 294 | ay8910->address_w(space,offset,data); | |
| 295 | 295 | m_fake8910_0 = data; |
| 296 | 296 | } |
| 297 | 297 | WRITE8_MEMBER(gsword_state::gsword_AY8910_control_port_1_w) |
| 298 | 298 | { |
| 299 | device_t *device = machine().device("ay2"); | |
| 300 | ay8910_address_w(device,space,offset,data); | |
| 299 | ay8910_device *ay8910 = machine().device<ay8910_device>("ay2"); | |
| 300 | ay8910->address_w(space,offset,data); | |
| 301 | 301 | m_fake8910_1 = data; |
| 302 | 302 | } |
| 303 | 303 | |
| r22781 | r22782 | |
| 360 | 360 | AM_RANGE(0x20, 0x21) AM_READWRITE_LEGACY(TAITO8741_3_r,TAITO8741_3_w) |
| 361 | 361 | AM_RANGE(0x40, 0x41) AM_READWRITE_LEGACY(TAITO8741_1_r,TAITO8741_1_w) |
| 362 | 362 | AM_RANGE(0x60, 0x60) AM_READWRITE(gsword_fake_0_r, gsword_AY8910_control_port_0_w) |
| 363 | AM_RANGE(0x61, 0x61) AM_DEVREADWRITE | |
| 363 | AM_RANGE(0x61, 0x61) AM_DEVREADWRITE("ay1", ay8910_device, data_r, data_w) | |
| 364 | 364 | AM_RANGE(0x80, 0x80) AM_READWRITE(gsword_fake_1_r, gsword_AY8910_control_port_1_w) |
| 365 | AM_RANGE(0x81, 0x81) AM_DEVREADWRITE | |
| 365 | AM_RANGE(0x81, 0x81) AM_DEVREADWRITE("ay2", ay8910_device, data_r, data_w) | |
| 366 | 366 | // |
| 367 | 367 | AM_RANGE(0xe0, 0xe0) AM_READNOP /* ?? */ |
| 368 | 368 | AM_RANGE(0xa0, 0xa0) AM_WRITENOP /* ?? */ |
| r22781 | r22782 | |
| 394 | 394 | static ADDRESS_MAP_START( josvolly_cpu2_io_map, AS_IO, 8, gsword_state ) |
| 395 | 395 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 396 | 396 | AM_RANGE(0x00, 0x00) AM_READWRITE(gsword_fake_0_r, gsword_AY8910_control_port_0_w) |
| 397 | AM_RANGE(0x01, 0x01) AM_DEVREADWRITE | |
| 397 | AM_RANGE(0x01, 0x01) AM_DEVREADWRITE("ay1", ay8910_device, data_r, data_w) | |
| 398 | 398 | AM_RANGE(0x40, 0x40) AM_READWRITE(gsword_fake_1_r, gsword_AY8910_control_port_1_w) |
| 399 | AM_RANGE(0x41, 0x41) AM_DEVREADWRITE | |
| 399 | AM_RANGE(0x41, 0x41) AM_DEVREADWRITE("ay2", ay8910_device, data_r, data_w) | |
| 400 | 400 | |
| 401 | 401 | AM_RANGE(0x81, 0x81) AM_WRITE_LEGACY(josvolly_nmi_enable_w) |
| 402 | 402 | AM_RANGE(0xC1, 0xC1) AM_NOP // irq clear |
| r22781 | r22782 | |
|---|---|---|
| 575 | 575 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 576 | 576 | AM_RANGE(0x20, 0x20) AM_DEVWRITE("crtc", mc6845_device, address_w) // pc=444 |
| 577 | 577 | AM_RANGE(0x21, 0x21) AM_DEVWRITE("crtc", mc6845_device, register_w) |
| 578 | AM_RANGE(0x40, 0x40) AM_DEVREAD_LEGACY("aysnd", ay8910_r) | |
| 579 | AM_RANGE(0x40, 0x41) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) | |
| 578 | AM_RANGE(0x40, 0x40) AM_DEVREAD("aysnd", ay8910_device, data_r) | |
| 579 | AM_RANGE(0x40, 0x41) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 580 | 580 | AM_RANGE(0x60, 0x63) AM_DEVREADWRITE("fcppi0", i8255_device, read, write)//M5L8255AP |
| 581 | 581 | // AM_RANGE(0x80, 0x81) //8251A UART |
| 582 | 582 | AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("rtc", v3021_device, read, write) |
| r22781 | r22782 | |
|---|---|---|
| 314 | 314 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 315 | 315 | AM_RANGE(0x2000, 0x23ff) AM_RAM |
| 316 | 316 | AM_RANGE(0x3000, 0x3000) AM_WRITE(superwng_sound_nmi_clear_w) |
| 317 | AM_RANGE(0x4000, 0x4000) AM_DEVREADWRITE_LEGACY("ay1", ay8910_r, ay8910_data_w) | |
| 318 | AM_RANGE(0x5000, 0x5000) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) | |
| 319 | AM_RANGE(0x6000, 0x6000) AM_DEVREADWRITE_LEGACY("ay2", ay8910_r, ay8910_data_w) | |
| 320 | AM_RANGE(0x7000, 0x7000) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) | |
| 317 | AM_RANGE(0x4000, 0x4000) AM_DEVREADWRITE("ay1", ay8910_device, data_r, data_w) | |
| 318 | AM_RANGE(0x5000, 0x5000) AM_DEVWRITE("ay1", ay8910_device, address_w) | |
| 319 | AM_RANGE(0x6000, 0x6000) AM_DEVREADWRITE("ay2", ay8910_device, data_r, data_w) | |
| 320 | AM_RANGE(0x7000, 0x7000) AM_DEVWRITE("ay2", ay8910_device, address_w) | |
| 321 | 321 | ADDRESS_MAP_END |
| 322 | 322 | |
| 323 | 323 | static INPUT_PORTS_START( superwng ) |
| r22781 | r22782 | |
|---|---|---|
| 85 | 85 | AM_RANGE(0x04, 0x04) AM_READ_PORT("IN4") |
| 86 | 86 | AM_RANGE(0x05, 0x05) AM_READ_PORT("IN5") |
| 87 | 87 | AM_RANGE(0x06, 0x06) AM_WRITENOP // ? |
| 88 | AM_RANGE(0x08, 0x09) AM_DEVWRITE | |
| 88 | AM_RANGE(0x08, 0x09) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 89 | 89 | ADDRESS_MAP_END |
| 90 | 90 | |
| 91 | 91 | static INPUT_PORTS_START( carrera ) |
| r22781 | r22782 | |
|---|---|---|
| 646 | 646 | static ADDRESS_MAP_START( winner81_sound_cpu_io_map, AS_IO, 8, corona_state ) |
| 647 | 647 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 648 | 648 | AM_RANGE(0x00, 0x00) AM_READ(sound_latch_r) |
| 649 | AM_RANGE(0x00, 0x01) AM_DEVWRITE | |
| 649 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 650 | 650 | ADDRESS_MAP_END |
| 651 | 651 | |
| 652 | 652 | /* Winners Circle 1982 |
| r22781 | r22782 | |
| 700 | 700 | static ADDRESS_MAP_START( winner82_sound_cpu_io_map, AS_IO, 8, corona_state ) |
| 701 | 701 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 702 | 702 | AM_RANGE(0x00, 0x00) AM_READ(sound_latch_r) |
| 703 | AM_RANGE(0x00, 0x01) AM_DEVWRITE | |
| 703 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 704 | 704 | AM_RANGE(0x02, 0x03) AM_WRITENOP /* socket for another ay, inited but never played */ |
| 705 | 705 | ADDRESS_MAP_END |
| 706 | 706 | |
| r22781 | r22782 | |
| 761 | 761 | static ADDRESS_MAP_START( re800_sound_cpu_io_map, AS_IO, 8, corona_state ) |
| 762 | 762 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 763 | 763 | AM_RANGE(0x00, 0x00) AM_READ(sound_latch_r) |
| 764 | AM_RANGE(0x00, 0x01) AM_DEVWRITE | |
| 764 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 765 | 765 | ADDRESS_MAP_END |
| 766 | 766 | |
| 767 | 767 | |
| r22781 | r22782 | |
| 821 | 821 | static ADDRESS_MAP_START( luckyrlt_sound_cpu_io_map, AS_IO, 8, corona_state ) |
| 822 | 822 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 823 | 823 | AM_RANGE(0x00, 0x00) AM_READ(sound_latch_r) |
| 824 | AM_RANGE(0x00, 0x01) AM_DEVWRITE | |
| 824 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 825 | 825 | ADDRESS_MAP_END |
| 826 | 826 | |
| 827 | 827 |
| r22781 | r22782 | |
|---|---|---|
| 102 | 102 | |
| 103 | 103 | static ADDRESS_MAP_START( matmania_sound_map, AS_PROGRAM, 8, matmania_state ) |
| 104 | 104 | AM_RANGE(0x0000, 0x01ff) AM_RAM |
| 105 | AM_RANGE(0x2000, 0x2001) AM_DEVWRITE_LEGACY("ay1", ay8910_data_address_w) | |
| 106 | AM_RANGE(0x2002, 0x2003) AM_DEVWRITE_LEGACY("ay2", ay8910_data_address_w) | |
| 105 | AM_RANGE(0x2000, 0x2001) AM_DEVWRITE("ay1", ay8910_device, data_address_w) | |
| 106 | AM_RANGE(0x2002, 0x2003) AM_DEVWRITE("ay2", ay8910_device, data_address_w) | |
| 107 | 107 | AM_RANGE(0x2004, 0x2004) AM_DEVWRITE("dac", dac_device, write_signed8) |
| 108 | 108 | AM_RANGE(0x2007, 0x2007) AM_READ(soundlatch_byte_r) |
| 109 | 109 | AM_RANGE(0x8000, 0xffff) AM_ROM |
| r22781 | r22782 | |
|---|---|---|
| 109 | 109 | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| 110 | 110 | AM_RANGE(0x4000, 0x47ff) AM_RAM |
| 111 | 111 | AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r) |
| 112 | AM_RANGE(0x8000, 0x8001) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) | |
| 113 | AM_RANGE(0xc000, 0xc001) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) | |
| 112 | AM_RANGE(0x8000, 0x8001) AM_DEVWRITE("ay1", ay8910_device, address_data_w) | |
| 113 | AM_RANGE(0xc000, 0xc001) AM_DEVWRITE("ay2", ay8910_device, address_data_w) | |
| 114 | 114 | ADDRESS_MAP_END |
| 115 | 115 | |
| 116 | 116 |
| r22781 | r22782 | |
|---|---|---|
| 223 | 223 | WRITE8_MEMBER( icecold_state::snd_ctrl_w ) |
| 224 | 224 | { |
| 225 | 225 | if (m_ay_ctrl & ~data & 0x04) |
| 226 | ay8910_data_address_w( | |
| 226 | m_ay8910_0->data_address_w(space, m_ay_ctrl & 0x01, m_sound_latch); | |
| 227 | 227 | if (m_ay_ctrl & ~data & 0x20) |
| 228 | ay8910_data_address_w( | |
| 228 | m_ay8910_1->data_address_w(space, (m_ay_ctrl>>3) & 0x01, m_sound_latch); | |
| 229 | 229 | |
| 230 | 230 | m_ay_ctrl = data; |
| 231 | 231 | } |
| r22781 | r22782 | |
| 238 | 238 | READ8_MEMBER( icecold_state::ay_r ) |
| 239 | 239 | { |
| 240 | 240 | if (m_ay_ctrl & 0x02) |
| 241 | return | |
| 241 | return m_ay8910_0->data_r(space, 0); | |
| 242 | 242 | if (m_ay_ctrl & 0x10) |
| 243 | return | |
| 243 | return m_ay8910_1->data_r(space, 0); | |
| 244 | 244 | |
| 245 | 245 | return 0; |
| 246 | 246 | } |
| r22781 | r22782 | |
|---|---|---|
| 322 | 322 | AM_RANGE(0x10, 0x10) AM_READWRITE(lamps_r,lamps_w) |
| 323 | 323 | AM_RANGE(0x11, 0x11) AM_READWRITE(bank_r,bank_w) |
| 324 | 324 | AM_RANGE(0x12, 0x12) AM_READWRITE(mux_r,mux_w) |
| 325 | AM_RANGE(0x20, 0x21) AM_DEVWRITE | |
| 325 | AM_RANGE(0x20, 0x21) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 326 | 326 | // AM_RANGE(0x30, 0x30) always 1? |
| 327 | 327 | AM_RANGE(0x40, 0x40) AM_WRITE(output_w) |
| 328 | 328 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 190 | 190 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 191 | 191 | AM_RANGE(0x8000, 0x87ff) AM_RAM |
| 192 | 192 | AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write) |
| 193 | AM_RANGE(0xc000, 0xc001) AM_DEVWRITE | |
| 193 | AM_RANGE(0xc000, 0xc001) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 194 | 194 | AM_RANGE(0xd000, 0xd000) AM_READWRITE(lsasquad_sh_sound_command_r, lsasquad_sh_result_w) |
| 195 | 195 | AM_RANGE(0xd400, 0xd400) AM_WRITE(lsasquad_sh_nmi_disable_w) |
| 196 | 196 | AM_RANGE(0xd800, 0xd800) AM_WRITE(lsasquad_sh_nmi_enable_w) |
| r22781 | r22782 | |
| 397 | 397 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 398 | 398 | AM_RANGE(0x8000, 0x87ff) AM_RAM |
| 399 | 399 | AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write) |
| 400 | AM_RANGE(0xc000, 0xc001) AM_DEVWRITE | |
| 400 | AM_RANGE(0xc000, 0xc001) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 401 | 401 | AM_RANGE(0xd000, 0xd000) AM_READ(daikaiju_sh_sound_command_r) |
| 402 | 402 | AM_RANGE(0xd400, 0xd400) AM_WRITENOP |
| 403 | 403 | AM_RANGE(0xd800, 0xd800) AM_READ(daikaiju_sound_status_r) AM_WRITENOP |
| r22781 | r22782 | |
|---|---|---|
| 470 | 470 | ADDRESS_MAP_END |
| 471 | 471 | |
| 472 | 472 | static ADDRESS_MAP_START( trvwhiz_io_map, AS_IO, 8, merit_state ) |
| 473 | AM_RANGE(0x8000, 0x8000) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 474 | AM_RANGE(0x8100, 0x8100) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 473 | AM_RANGE(0x8000, 0x8000) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 474 | AM_RANGE(0x8100, 0x8100) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 475 | 475 | ADDRESS_MAP_END |
| 476 | 476 | |
| 477 | 477 | |
| r22781 | r22782 | |
| 491 | 491 | ADDRESS_MAP_END |
| 492 | 492 | |
| 493 | 493 | static ADDRESS_MAP_START( phrcraze_io_map, AS_IO, 8, merit_state ) |
| 494 | AM_RANGE(0xc004, 0xc004) AM_MIRROR(0x1cf3) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 495 | AM_RANGE(0xc104, 0xc104) AM_MIRROR(0x1cf3) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 494 | AM_RANGE(0xc004, 0xc004) AM_MIRROR(0x1cf3) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 495 | AM_RANGE(0xc104, 0xc104) AM_MIRROR(0x1cf3) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 496 | 496 | ADDRESS_MAP_END |
| 497 | 497 | |
| 498 | 498 | |
| r22781 | r22782 | |
| 512 | 512 | ADDRESS_MAP_END |
| 513 | 513 | |
| 514 | 514 | static ADDRESS_MAP_START( tictac_io_map, AS_IO, 8, merit_state ) |
| 515 | AM_RANGE(0xc00c, 0xc00c) AM_MIRROR(0x1cf3) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 516 | AM_RANGE(0xc10c, 0xc10c) AM_MIRROR(0x1cf3) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) | |
| 515 | AM_RANGE(0xc00c, 0xc00c) AM_MIRROR(0x1cf3) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 516 | AM_RANGE(0xc10c, 0xc10c) AM_MIRROR(0x1cf3) AM_DEVWRITE("aysnd", ay8910_device, data_w) | |
| 517 | 517 | ADDRESS_MAP_END |
| 518 | 518 | |
| 519 | 519 |
| r22781 | r22782 | |
|---|---|---|
| 232 | 232 | |
| 233 | 233 | static ADDRESS_MAP_START( io_map, AS_IO, 8, trvmadns_state ) |
| 234 | 234 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 235 | AM_RANGE(0x00, 0x01) AM_DEVWRITE | |
| 235 | AM_RANGE(0x00, 0x01) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 236 | 236 | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN0") |
| 237 | 237 | AM_RANGE(0x80, 0x80) AM_WRITE(trvmadns_banking_w) |
| 238 | 238 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 814 | 814 | // bit 3 selects which of the two 8913 to enable |
| 815 | 815 | // bit 4 goes to the 8913 BC1 pin |
| 816 | 816 | if ((data & 0x08) != 0) |
| 817 | ay | |
| 817 | m_ay1->data_address_w(space, data >> 4, m_psg_latch); | |
| 818 | 818 | else |
| 819 | ay | |
| 819 | m_ay2->data_address_w(space, data >> 4, m_psg_latch); | |
| 820 | 820 | } |
| 821 | 821 | } |
| 822 | 822 | else |
| r22781 | r22782 | |
| 828 | 828 | else |
| 829 | 829 | { |
| 830 | 830 | ay8913_device *ay = (data & 0x08) ? m_ay1 : m_ay2; |
| 831 | ay8910_address_w(ay, space, 0, m_psg_latch); | |
| 832 | ay8910_data_w(ay, space, 0, m_psg_data_latch); | |
| 831 | ay->address_w(space, 0, m_psg_latch); | |
| 832 | ay->data_w(space, 0, m_psg_data_latch); | |
| 833 | 833 | } |
| 834 | 834 | } |
| 835 | 835 |
| r22781 | r22782 | |
|---|---|---|
| 601 | 601 | static ADDRESS_MAP_START( masao_sound_map, AS_PROGRAM, 8, mario_state ) |
| 602 | 602 | AM_RANGE(0x0000, 0x0fff) AM_ROM |
| 603 | 603 | AM_RANGE(0x2000, 0x23ff) AM_RAM |
| 604 | AM_RANGE(0x4000, 0x4000) AM_DEVREADWRITE_LEGACY("aysnd", ay8910_r, ay8910_data_w) | |
| 605 | AM_RANGE(0x6000, 0x6000) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) | |
| 604 | AM_RANGE(0x4000, 0x4000) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, data_w) | |
| 605 | AM_RANGE(0x6000, 0x6000) AM_DEVWRITE("aysnd", ay8910_device, address_w) | |
| 606 | 606 | ADDRESS_MAP_END |
| 607 | 607 | |
| 608 | 608 | /************************************* |
| r22781 | r22782 | |
|---|---|---|
| 416 | 416 | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| 417 | 417 | AM_RANGE(0x8000, 0x83ff) AM_MIRROR(0x0c00) AM_RAM |
| 418 | 418 | AM_RANGE(0x9000, 0x9003) AM_MIRROR(0x0ffc) AM_READ(data_r) |
| 419 | AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x0ffc) AM_DEVWRITE_LEGACY("ay0", ay8910_address_w) | |
| 420 | AM_RANGE(0xa001, 0xa001) AM_MIRROR(0x0ffc) AM_DEVREAD_LEGACY("ay0", ay8910_r) | |
| 421 | AM_RANGE(0xa002, 0xa002) AM_MIRROR(0x0ffc) AM_DEVWRITE_LEGACY("ay0", ay8910_data_w) | |
| 422 | AM_RANGE(0xb000, 0xb000) AM_MIRROR(0x0ffc) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) | |
| 423 | AM_RANGE(0xb001, 0xb001) AM_MIRROR(0x0ffc) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 424 | AM_RANGE(0xb002, 0xb002) AM_MIRROR(0x0ffc) AM_DEVWRITE_LEGACY("ay1", ay8910_data_w) | |
| 419 | AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x0ffc) AM_DEVWRITE("ay0", ay8910_device, address_w) | |
| 420 | AM_RANGE(0xa001, 0xa001) AM_MIRROR(0x0ffc) AM_DEVREAD("ay0", ay8910_device, data_r) | |
| 421 | AM_RANGE(0xa002, 0xa002) AM_MIRROR(0x0ffc) AM_DEVWRITE("ay0", ay8910_device, data_w) | |
| 422 | AM_RANGE(0xb000, 0xb000) AM_MIRROR(0x0ffc) AM_DEVWRITE("ay1", ay8910_device, address_w) | |
| 423 | AM_RANGE(0xb001, 0xb001) AM_MIRROR(0x0ffc) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 424 | AM_RANGE(0xb002, 0xb002) AM_MIRROR(0x0ffc) AM_DEVWRITE("ay1", ay8910_device, data_w) | |
| 425 | 425 | AM_RANGE(0xc000, 0xcfff) AM_READNOP AM_WRITE(status_w) |
| 426 | 426 | AM_RANGE(0xd000, 0xdfff) AM_WRITENOP // low bit controls yellow LED |
| 427 | 427 | AM_RANGE(0xe000, 0xefff) AM_READ(irq_clear) |
| r22781 | r22782 | |
|---|---|---|
| 76 | 76 | |
| 77 | 77 | WRITE8_MEMBER(redalert_state::redalert_AY8910_w) |
| 78 | 78 | { |
| 79 | device | |
| 79 | ay8910_device *ay8910 = machine().device<ay8910_device>("aysnd"); | |
| 80 | 80 | /* BC2 is connected to a pull-up resistor, so BC2=1 always */ |
| 81 | 81 | switch (data & 0x03) |
| 82 | 82 | { |
| r22781 | r22782 | |
| 86 | 86 | |
| 87 | 87 | /* BC1=1, BDIR=0 : read from PSG */ |
| 88 | 88 | case 0x01: |
| 89 | m_ay8910_latch_1 = ay8910_r( | |
| 89 | m_ay8910_latch_1 = ay8910->data_r(space, 0); | |
| 90 | 90 | break; |
| 91 | 91 | |
| 92 | 92 | /* BC1=0, BDIR=1 : write to PSG */ |
| r22781 | r22782 | |
| 94 | 94 | case 0x02: |
| 95 | 95 | case 0x03: |
| 96 | 96 | default: |
| 97 | ay8910 | |
| 97 | ay8910->data_address_w(space, data, m_ay8910_latch_2); | |
| 98 | 98 | break; |
| 99 | 99 | } |
| 100 | 100 | } |
| r22781 | r22782 | |
| 300 | 300 | |
| 301 | 301 | WRITE8_MEMBER(redalert_state::demoneye_ay8910_data_w) |
| 302 | 302 | { |
| 303 | device_t *ay1 = machine().device("ay1"); | |
| 304 | device_t *ay2 = machine().device("ay2"); | |
| 303 | ay8910_device *ay1 = machine().device<ay8910_device>("ay1"); | |
| 304 | ay8910_device *ay2 = machine().device<ay8910_device>("ay2"); | |
| 305 | 305 | |
| 306 | 306 | switch (m_ay8910_latch_1 & 0x03) |
| 307 | 307 | { |
| 308 | 308 | case 0x00: |
| 309 | 309 | if (m_ay8910_latch_1 & 0x10) |
| 310 | ay | |
| 310 | ay1->data_w(space, 0, data); | |
| 311 | 311 | |
| 312 | 312 | if (m_ay8910_latch_1 & 0x20) |
| 313 | ay | |
| 313 | ay2->data_w(space, 0, data); | |
| 314 | 314 | |
| 315 | 315 | break; |
| 316 | 316 | |
| 317 | 317 | case 0x01: |
| 318 | 318 | if (m_ay8910_latch_1 & 0x10) |
| 319 | m_ay8910_latch_2 = ay | |
| 319 | m_ay8910_latch_2 = ay1->data_r(space, 0); | |
| 320 | 320 | |
| 321 | 321 | if (m_ay8910_latch_1 & 0x20) |
| 322 | m_ay8910_latch_2 = ay | |
| 322 | m_ay8910_latch_2 = ay2->data_r(space, 0); | |
| 323 | 323 | |
| 324 | 324 | break; |
| 325 | 325 | |
| 326 | 326 | case 0x03: |
| 327 | 327 | if (m_ay8910_latch_1 & 0x10) |
| 328 | ay | |
| 328 | ay1->address_w(space, 0, data); | |
| 329 | 329 | |
| 330 | 330 | if (m_ay8910_latch_1 & 0x20) |
| 331 | ay | |
| 331 | ay2->address_w(space, 0, data); | |
| 332 | 332 | |
| 333 | 333 | break; |
| 334 | 334 |
| r22781 | r22782 | |
|---|---|---|
| 167 | 167 | static ADDRESS_MAP_START( timeplt_sound_map, AS_PROGRAM, 8, driver_device ) |
| 168 | 168 | AM_RANGE(0x0000, 0x2fff) AM_ROM |
| 169 | 169 | AM_RANGE(0x3000, 0x33ff) AM_MIRROR(0x0c00) AM_RAM |
| 170 | AM_RANGE(0x4000, 0x4000) AM_MIRROR(0x0fff) AM_DEVREADWRITE_LEGACY("ay1", ay8910_r, ay8910_data_w) | |
| 171 | AM_RANGE(0x5000, 0x5000) AM_MIRROR(0x0fff) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) | |
| 172 | AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x0fff) AM_DEVREADWRITE_LEGACY("ay2", ay8910_r, ay8910_data_w) | |
| 173 | AM_RANGE(0x7000, 0x7000) AM_MIRROR(0x0fff) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) | |
| 170 | AM_RANGE(0x4000, 0x4000) AM_MIRROR(0x0fff) AM_DEVREADWRITE("ay1", ay8910_device, data_r, data_w) | |
| 171 | AM_RANGE(0x5000, 0x5000) AM_MIRROR(0x0fff) AM_DEVWRITE("ay1", ay8910_device, address_w) | |
| 172 | AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x0fff) AM_DEVREADWRITE("ay2", ay8910_device, data_r, data_w) | |
| 173 | AM_RANGE(0x7000, 0x7000) AM_MIRROR(0x0fff) AM_DEVWRITE("ay2", ay8910_device, address_w) | |
| 174 | 174 | AM_RANGE(0x8000, 0xffff) AM_DEVWRITE_LEGACY("timeplt_audio", timeplt_filter_w) |
| 175 | 175 | ADDRESS_MAP_END |
| 176 | 176 | |
| r22781 | r22782 | |
| 179 | 179 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 180 | 180 | AM_RANGE(0x2000, 0x23ff) AM_MIRROR(0x0c00) AM_RAM |
| 181 | 181 | AM_RANGE(0x3000, 0x3fff) AM_DEVWRITE_LEGACY("timeplt_audio", timeplt_filter_w) |
| 182 | AM_RANGE(0x4000, 0x4000) AM_MIRROR(0x0fff) AM_DEVREADWRITE_LEGACY("ay1", ay8910_r, ay8910_data_w) | |
| 183 | AM_RANGE(0x5000, 0x5000) AM_MIRROR(0x0fff) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) | |
| 184 | AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x0fff) AM_DEVREADWRITE_LEGACY("ay2", ay8910_r, ay8910_data_w) | |
| 185 | AM_RANGE(0x7000, 0x7000) AM_MIRROR(0x0fff) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) | |
| 182 | AM_RANGE(0x4000, 0x4000) AM_MIRROR(0x0fff) AM_DEVREADWRITE("ay1", ay8910_device, data_r, data_w) | |
| 183 | AM_RANGE(0x5000, 0x5000) AM_MIRROR(0x0fff) AM_DEVWRITE("ay1", ay8910_device, address_w) | |
| 184 | AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x0fff) AM_DEVREADWRITE("ay2", ay8910_device, data_r, data_w) | |
| 185 | AM_RANGE(0x7000, 0x7000) AM_MIRROR(0x0fff) AM_DEVWRITE("ay2", ay8910_device, address_w) | |
| 186 | 186 | ADDRESS_MAP_END |
| 187 | 187 | |
| 188 | 188 |
| r22781 | r22782 | |
|---|---|---|
| 1417 | 1417 | static ADDRESS_MAP_START( demon_sound_map, AS_PROGRAM, 8, driver_device ) |
| 1418 | 1418 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 1419 | 1419 | AM_RANGE(0x3000, 0x33ff) AM_RAM |
| 1420 | AM_RANGE(0x4000, 0x4001) AM_DEVREAD_LEGACY("ay1", ay8910_r) | |
| 1421 | AM_RANGE(0x4002, 0x4003) AM_DEVWRITE_LEGACY("ay1", ay8910_data_address_w) | |
| 1422 | AM_RANGE(0x5000, 0x5001) AM_DEVREAD_LEGACY("ay2", ay8910_r) | |
| 1423 | AM_RANGE(0x5002, 0x5003) AM_DEVWRITE_LEGACY("ay2", ay8910_data_address_w) | |
| 1424 | AM_RANGE(0x6000, 0x6001) AM_DEVREAD_LEGACY("ay3", ay8910_r) | |
| 1425 | AM_RANGE(0x6002, 0x6003) AM_DEVWRITE_LEGACY("ay3", ay8910_data_address_w) | |
| 1420 | AM_RANGE(0x4000, 0x4001) AM_DEVREAD("ay1", ay8910_device, data_r) | |
| 1421 | AM_RANGE(0x4002, 0x4003) AM_DEVWRITE("ay1", ay8910_device, data_address_w) | |
| 1422 | AM_RANGE(0x5000, 0x5001) AM_DEVREAD("ay2", ay8910_device, data_r) | |
| 1423 | AM_RANGE(0x5002, 0x5003) AM_DEVWRITE("ay2", ay8910_device, data_address_w) | |
| 1424 | AM_RANGE(0x6000, 0x6001) AM_DEVREAD("ay3", ay8910_device, data_r) | |
| 1425 | AM_RANGE(0x6002, 0x6003) AM_DEVWRITE("ay3", ay8910_device, data_address_w) | |
| 1426 | 1426 | AM_RANGE(0x7000, 0x7000) AM_WRITENOP /* watchdog? */ |
| 1427 | 1427 | ADDRESS_MAP_END |
| 1428 | 1428 |
| r22781 | r22782 | |
|---|---|---|
| 16 | 16 | UINT8 m_port1; |
| 17 | 17 | UINT8 m_port2; |
| 18 | 18 | |
| 19 | device_t *m_ay1; | |
| 20 | device_t *m_ay2; | |
| 19 | ay8910_device *m_ay1; | |
| 20 | ay8910_device *m_ay2; | |
| 21 | 21 | device_t *m_adpcm1; |
| 22 | 22 | device_t *m_adpcm2; |
| 23 | 23 | }; |
| r22781 | r22782 | |
| 45 | 45 | |
| 46 | 46 | state->m_adpcm1 = machine.device("msm1"); |
| 47 | 47 | state->m_adpcm2 = machine.device("msm2"); |
| 48 | state->m_ay1 = machine.device("ay1"); | |
| 49 | state->m_ay2 = machine.device("ay2"); | |
| 48 | state->m_ay1 = machine.device<ay8910_device>("ay1"); | |
| 49 | state->m_ay2 = machine.device<ay8910_device>("ay2"); | |
| 50 | 50 | |
| 51 | 51 | device->save_item(NAME(state->m_port1)); |
| 52 | 52 | device->save_item(NAME(state->m_port2)); |
| r22781 | r22782 | |
| 98 | 98 | { |
| 99 | 99 | /* PSG 0 or 1? */ |
| 100 | 100 | if (state->m_port2 & 0x08) |
| 101 | ay | |
| 101 | state->m_ay1->address_w(space, 0, state->m_port1); | |
| 102 | 102 | if (state->m_port2 & 0x10) |
| 103 | | |
| 103 | state->m_ay2->address_w(space, 0, state->m_port1); | |
| 104 | 104 | } |
| 105 | 105 | else |
| 106 | 106 | { |
| 107 | 107 | /* PSG 0 or 1? */ |
| 108 | 108 | if (state->m_port2 & 0x08) |
| 109 | | |
| 109 | state->m_ay1->data_w(space, 0, state->m_port1); | |
| 110 | 110 | if (state->m_port2 & 0x10) |
| 111 | | |
| 111 | state->m_ay2->data_w(space, 0, state->m_port1); | |
| 112 | 112 | } |
| 113 | 113 | } |
| 114 | 114 | state->m_port2 = data; |
| r22781 | r22782 | |
| 128 | 128 | |
| 129 | 129 | /* PSG 0 or 1? */ |
| 130 | 130 | if (state->m_port2 & 0x08) |
| 131 | return | |
| 131 | return state->m_ay1->data_r(space, 0); | |
| 132 | 132 | if (state->m_port2 & 0x10) |
| 133 | return | |
| 133 | return state->m_ay2->data_r(space, 0); | |
| 134 | 134 | return 0xff; |
| 135 | 135 | } |
| 136 | 136 |
| r22781 | r22782 | |
|---|---|---|
| 255 | 255 | |
| 256 | 256 | static WRITE8_DEVICE_HANDLER( carnival_music_port_2_w ) |
| 257 | 257 | { |
| 258 | ay8910_device *ay8910 = (ay8910_device *) device; | |
| 258 | 259 | static int psgSelect = 0; |
| 259 | 260 | int newSelect; |
| 260 | 261 | |
| r22781 | r22782 | |
| 274 | 275 | break; |
| 275 | 276 | |
| 276 | 277 | case PSG_BC_WRITE: |
| 277 | ay8910 | |
| 278 | ay8910->data_w(space, 0, psgData); | |
| 278 | 279 | break; |
| 279 | 280 | |
| 280 | 281 | case PSG_BC_LATCH_ADDRESS: |
| 281 | ay8910 | |
| 282 | ay8910->address_w(space, 0, psgData); | |
| 282 | 283 | break; |
| 283 | 284 | } |
| 284 | 285 | } |
| r22781 | r22782 | |
|---|---|---|
| 311 | 311 | static ADDRESS_MAP_START( ad2083_sound_io_map, AS_IO, 8, driver_device ) |
| 312 | 312 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 313 | 313 | AM_RANGE(0x01, 0x01) AM_DEVWRITE_LEGACY("tmsprom", ad2083_tms5110_ctrl_w) |
| 314 | AM_RANGE(0x10, 0x10) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) | |
| 315 | AM_RANGE(0x20, 0x20) AM_DEVREADWRITE_LEGACY("ay1", ay8910_r, ay8910_data_w) | |
| 316 | AM_RANGE(0x40, 0x40) AM_DEVREADWRITE_LEGACY("ay2", ay8910_r, ay8910_data_w) | |
| 317 | AM_RANGE(0x80, 0x80) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) | |
| 314 | AM_RANGE(0x10, 0x10) AM_DEVWRITE("ay1", ay8910_device, address_w) | |
| 315 | AM_RANGE(0x20, 0x20) AM_DEVREADWRITE("ay1", ay8910_device, data_r, data_w) | |
| 316 | AM_RANGE(0x40, 0x40) AM_DEVREADWRITE("ay2", ay8910_device, data_r, data_w) | |
| 317 | AM_RANGE(0x80, 0x80) AM_DEVWRITE("ay2", ay8910_device, address_w) | |
| 318 | 318 | ADDRESS_MAP_END |
| 319 | 319 | |
| 320 | 320 | static SOUND_START( ad2083 ) |
| r22781 | r22782 | |
|---|---|---|
| 1090 | 1090 | |
| 1091 | 1091 | case 0x03: /* /IGID */ |
| 1092 | 1092 | case 0x13: |
| 1093 | result = | |
| 1093 | result = machine().device<ay8910_device>("ay8910.1")->data_r(space, offset); | |
| 1094 | 1094 | break; |
| 1095 | 1095 | |
| 1096 | 1096 | case 0x10: /* /GIN0 */ |
| r22781 | r22782 | |
| 1129 | 1129 | |
| 1130 | 1130 | case 0x0a: /* /OGIA */ |
| 1131 | 1131 | case 0x0b: /* /OGID */ |
| 1132 | | |
| 1132 | machine().device<ay8910_device>("ay8910.1")->address_data_w(space, offset, data); | |
| 1133 | 1133 | break; |
| 1134 | 1134 | |
| 1135 | 1135 | case 0x0c: /* /BKXL */ |
| r22781 | r22782 | |
|---|---|---|
| 246 | 246 | if ((!(m_via_out[PORTB] & 0x10)) && (m_via_out[PORTB] & 0x08)) |
| 247 | 247 | /* BDIR inactive, we can read the PSG. BC1 has to be active. */ |
| 248 | 248 | { |
| 249 | m_via_out[PORTA] = | |
| 249 | m_via_out[PORTA] = m_ay8912->data_r(space, 0) | |
| 250 | 250 | & ~(m_imager_pinlevel & 0x80); |
| 251 | 251 | } |
| 252 | 252 | return m_via_out[PORTA]; |
| r22781 | r22782 | |
|---|---|---|
| 3 | 3 | #include "includes/vectrex.h" |
| 4 | 4 | #include "video/vector.h" |
| 5 | 5 | #include "cpu/m6809/m6809.h" |
| 6 | #include "sound/ay8910.h" | |
| 7 | 6 | |
| 8 | 7 | |
| 9 | 8 | #define ANALOG_DELAY 7800 |
| r22781 | r22782 | |
| 365 | 364 | /* Sound */ |
| 366 | 365 | if (data & 0x10) |
| 367 | 366 | { |
| 368 | device_t *ay8912 = machine().device("ay8912"); | |
| 369 | ||
| 370 | 367 | if (data & 0x08) /* BC1 (do we select a reg or write it ?) */ |
| 371 | ay891 | |
| 368 | m_ay8912->address_w(space, 0, m_via_out[PORTA]); | |
| 372 | 369 | else |
| 373 | ay891 | |
| 370 | m_ay8912->data_w(space, 0, m_via_out[PORTA]); | |
| 374 | 371 | } |
| 375 | 372 | |
| 376 | 373 | if (!(data & 0x1) && (m_via_out[PORTB] & 0x1)) |
| r22781 | r22782 | |
|---|---|---|
| 5 | 5 | *************************************************************************/ |
| 6 | 6 | |
| 7 | 7 | #include "machine/6821pia.h" |
| 8 | #include "sound/ay8910.h" | |
| 8 | 9 | |
| 9 | 10 | class laserbat_state : public driver_device |
| 10 | 11 | { |
| r22781 | r22782 | |
| 13 | 14 | : driver_device(mconfig, type, tag), |
| 14 | 15 | m_maincpu(*this, "maincpu"), |
| 15 | 16 | m_audiocpu(*this, "audiocpu"), |
| 16 | m_fo_state(*this, "fo_state") | |
| 17 | { } | |
| 17 | m_fo_state(*this, "fo_state"), | |
| 18 | m_ay1(*this, "ay1"), | |
| 19 | m_ay2(*this, "ay2") | |
| 20 | { | |
| 21 | } | |
| 18 | 22 | |
| 19 | 23 | required_device<cpu_device> m_maincpu; |
| 20 | 24 | optional_device<cpu_device> m_audiocpu; |
| 21 | 25 | required_shared_ptr<UINT8> m_fo_state; |
| 26 | optional_device<ay8910_device> m_ay1; | |
| 27 | optional_device<ay8910_device> m_ay2; | |
| 22 | 28 | |
| 23 | 29 | /* video-related */ |
| 24 | 30 | tilemap_t *m_bg_tilemap; |
| r22781 | r22782 | |
| 57 | 63 | device_t *m_sn; |
| 58 | 64 | tms3615_device *m_tms1; |
| 59 | 65 | tms3615_device *m_tms2; |
| 60 | device_t *m_ay1; | |
| 61 | device_t *m_ay2; | |
| 62 | 66 | |
| 63 | 67 | // memory |
| 64 | 68 | UINT8 m_videoram[0x400]; |
| r22781 | r22782 | |
|---|---|---|
| 9 | 9 | |
| 10 | 10 | #include "machine/6522via.h" |
| 11 | 11 | #include "sound/dac.h" |
| 12 | #include "sound/ay8910.h" | |
| 12 | 13 | |
| 13 | 14 | |
| 14 | 15 | #define NVECT 10000 |
| r22781 | r22782 | |
| 107 | 108 | required_device<cpu_device> m_maincpu; |
| 108 | 109 | required_device<via6522_device> m_via6522_0; |
| 109 | 110 | required_device<dac_device> m_dac; |
| 110 | required_device<device | |
| 111 | required_device<ay8910_device> m_ay8912; | |
| 111 | 112 | optional_ioport m_io_contr1x; |
| 112 | 113 | optional_ioport m_io_contr1y; |
| 113 | 114 | optional_ioport m_io_contr2x; |
| r22781 | r22782 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | *************************************************************************/ |
| 6 | 6 | #include "sound/msm5205.h" |
| 7 | #include "sound/ay8910.h" | |
| 7 | 8 | |
| 8 | 9 | class mermaid_state : public driver_device |
| 9 | 10 | { |
| r22781 | r22782 | |
| 18 | 19 | m_colorram(*this, "colorram"), |
| 19 | 20 | m_ay8910_enable(*this, "ay8910_enable"), |
| 20 | 21 | m_maincpu(*this, "maincpu"), |
| 21 | m_adpcm(*this, "adpcm"){ } | |
| 22 | m_adpcm(*this, "adpcm"), | |
| 23 | m_ay1(*this, "ay1"), | |
| 24 | m_ay2(*this, "ay2") | |
| 25 | { | |
| 26 | } | |
| 22 | 27 | |
| 23 | 28 | /* memory pointers */ |
| 24 | 29 | required_shared_ptr<UINT8> m_videoram2; |
| r22781 | r22782 | |
| 54 | 59 | /* devices */ |
| 55 | 60 | required_device<cpu_device> m_maincpu; |
| 56 | 61 | optional_device<msm5205_device> m_adpcm; |
| 57 | device_t *m_ay1; | |
| 58 | device_t *m_ay2; | |
| 62 | required_device<ay8910_device> m_ay1; | |
| 63 | required_device<ay8910_device> m_ay2; | |
| 59 | 64 | |
| 60 | 65 | UINT8 m_nmi_mask; |
| 61 | 66 | DECLARE_WRITE8_MEMBER(mermaid_ay8910_write_port_w); |
| r22781 | r22782 | |
|---|---|---|
| 194 | 194 | devcb_resolved_write8 portBwrite; |
| 195 | 195 | }; |
| 196 | 196 | |
| 197 | INLINE ay8910_context *get_safe_token(device_t *device) | |
| 198 | { | |
| 199 | assert(device != NULL); | |
| 200 | assert(device->type() == AY8910 || | |
| 201 | device->type() == AY8912 || | |
| 202 | device->type() == AY8913 || | |
| 203 | device->type() == AY8914 || | |
| 204 | device->type() == AY8930 || | |
| 205 | device->type() == YM2149 || | |
| 206 | device->type() == YM3439 || | |
| 207 | device->type() == YMZ284 || | |
| 208 | device->type() == YMZ294); | |
| 209 | return (ay8910_context *)downcast<ay8910_device *>(device)->token(); | |
| 210 | } | |
| 211 | 197 | |
| 212 | ||
| 213 | 198 | /************************************* |
| 214 | 199 | * |
| 215 | 200 | * Static |
| r22781 | r22782 | |
| 843 | 828 | #endif |
| 844 | 829 | } |
| 845 | 830 | |
| 846 | void ay8910_set_volume( | |
| 831 | void ay8910_set_volume(void *chip,int channel,int volume) | |
| 847 | 832 | { |
| 848 | ay8910_context *psg = | |
| 833 | ay8910_context *psg = (ay8910_context *)chip; | |
| 849 | 834 | int ch; |
| 850 | 835 | |
| 851 | 836 | for (ch = 0; ch < psg->streams; ch++) |
| r22781 | r22782 | |
| 939 | 924 | * |
| 940 | 925 | *************************************/ |
| 941 | 926 | |
| 942 | ||
| 927 | void ay8910_device::set_volume(int channel,int volume) | |
| 943 | 928 | { |
| 944 | static const ay8910_interface generic_ay8910 = | |
| 929 | ay8910_set_volume(m_psg, channel, volume); | |
| 930 | } | |
| 931 | ||
| 932 | //------------------------------------------------- | |
| 933 | // device_start - device-specific startup | |
| 934 | //------------------------------------------------- | |
| 935 | ||
| 936 | void ay8910_device::device_start() | |
| 937 | { | |
| 938 | m_ay8910_config = (const ay8910_interface *) static_config(); | |
| 939 | ||
| 940 | static const ay8910_interface default_ay8910_config = | |
| 945 | 941 | { |
| 946 | 942 | AY8910_LEGACY_OUTPUT, |
| 947 | 943 | AY8910_DEFAULT_LOADS, |
| 948 | 944 | DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL |
| 949 | 945 | }; |
| 950 | const ay8910_interface *intf = (device->static_config() ? (const ay8910_interface *)device->static_config() : &generic_ay8910); | |
| 951 | ay8910_start_ym(get_safe_token(device), AY8910, device, device->clock(), intf); | |
| 946 | ||
| 947 | const ay8910_interface *ay8910_config = m_ay8910_config != NULL ? m_ay8910_config : &default_ay8910_config; | |
| 948 | ||
| 949 | m_psg = ay8910_start_ym(NULL, type(), this, clock(), ay8910_config); | |
| 952 | 950 | } |
| 953 | 951 | |
| 954 | static DEVICE_START( ym2149 ) | |
| 952 | //------------------------------------------------- | |
| 953 | // device_start - device-specific startup | |
| 954 | //------------------------------------------------- | |
| 955 | ||
| 956 | void ym2149_device::device_start() | |
| 955 | 957 | { |
| 956 | static const ay8910_interface generic_ay8910 = | |
| 958 | m_ay8910_config = (const ay8910_interface *) static_config(); | |
| 959 | ||
| 960 | static const ay8910_interface default_ay8910_config = | |
| 957 | 961 | { |
| 958 | 962 | AY8910_LEGACY_OUTPUT, |
| 959 | 963 | AY8910_DEFAULT_LOADS, |
| 960 | 964 | DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL |
| 961 | 965 | }; |
| 962 | const ay8910_interface *intf = (device->static_config() ? (const ay8910_interface *)device->static_config() : &generic_ay8910); | |
| 963 | ay8910_start_ym(get_safe_token(device), YM2149, device, device->clock(), intf); | |
| 966 | ||
| 967 | const ay8910_interface *ay8910_config = m_ay8910_config != NULL ? m_ay8910_config : &default_ay8910_config; | |
| 968 | ||
| 969 | m_psg = ay8910_start_ym(NULL, type(), this, clock(), ay8910_config); | |
| 964 | 970 | } |
| 965 | 971 | |
| 966 | static DEVICE_STOP( ay8910 ) | |
| 972 | //------------------------------------------------- | |
| 973 | // device_stop - device-specific stop | |
| 974 | //------------------------------------------------- | |
| 975 | ||
| 976 | void ay8910_device::device_stop() | |
| 967 | 977 | { |
| 968 | ay8910_stop_ym( | |
| 978 | ay8910_stop_ym(m_psg); | |
| 969 | 979 | } |
| 970 | 980 | |
| 971 | static DEVICE_RESET( ay8910 ) | |
| 981 | //------------------------------------------------- | |
| 982 | // device_reset - device-specific reset | |
| 983 | //------------------------------------------------- | |
| 984 | ||
| 985 | void ay8910_device::device_reset() | |
| 972 | 986 | { |
| 973 | ay8910_reset_ym( | |
| 987 | ay8910_reset_ym(m_psg); | |
| 974 | 988 | } |
| 975 | 989 | |
| 976 | 990 | /************************************* |
| r22781 | r22782 | |
| 979 | 993 | * |
| 980 | 994 | *************************************/ |
| 981 | 995 | |
| 982 | READ8_ | |
| 996 | READ8_MEMBER( ay8910_device::data_r ) | |
| 983 | 997 | { |
| 984 | return ay8910_read_ym( | |
| 998 | return ay8910_read_ym(m_psg); | |
| 985 | 999 | } |
| 986 | 1000 | |
| 987 | WRITE8_ | |
| 1001 | WRITE8_MEMBER( ay8910_device::data_address_w ) | |
| 988 | 1002 | { |
| 989 | 1003 | /* note that directly connecting BC1 to A0 puts data on 0 and address on 1 */ |
| 990 | ay8910_write_ym( | |
| 1004 | ay8910_write_ym(m_psg, ~offset & 1, data); | |
| 991 | 1005 | } |
| 992 | 1006 | |
| 993 | WRITE8_ | |
| 1007 | WRITE8_MEMBER( ay8910_device::address_data_w ) | |
| 994 | 1008 | { |
| 995 | ay8910_write_ym( | |
| 1009 | ay8910_write_ym(m_psg, offset & 1, data); | |
| 996 | 1010 | } |
| 997 | 1011 | |
| 998 | WRITE8_ | |
| 1012 | WRITE8_MEMBER( ay8910_device::address_w ) | |
| 999 | 1013 | { |
| 1000 | 1014 | #if ENABLE_REGISTER_TEST |
| 1001 | 1015 | return; |
| 1002 | 1016 | #else |
| 1003 | | |
| 1017 | data_address_w(space, 1, data); | |
| 1004 | 1018 | #endif |
| 1005 | 1019 | } |
| 1006 | 1020 | |
| 1007 | WRITE8_ | |
| 1021 | WRITE8_MEMBER( ay8910_device::data_w ) | |
| 1008 | 1022 | { |
| 1009 | 1023 | #if ENABLE_REGISTER_TEST |
| 1010 | 1024 | return; |
| 1011 | 1025 | #else |
| 1012 | | |
| 1026 | data_address_w(space, 0, data); | |
| 1013 | 1027 | #endif |
| 1014 | 1028 | } |
| 1015 | 1029 | |
| 1016 | WRITE8_ | |
| 1030 | WRITE8_MEMBER( ay8910_device::reset_w ) | |
| 1017 | 1031 | { |
| 1018 | ay8910_reset_ym( | |
| 1032 | ay8910_reset_ym(m_psg); | |
| 1019 | 1033 | } |
| 1020 | 1034 | |
| 1021 | 1035 | static const int mapping8914to8910[16] = { 0, 2, 4, 11, 1, 3, 5, 12, 7, 6, 13, 8, 9, 10, 14, 15 }; |
| 1022 | 1036 | |
| 1023 | READ8_ | |
| 1037 | READ8_MEMBER( ay8914_device::read ) | |
| 1024 | 1038 | { |
| 1025 | 1039 | UINT16 rv; |
| 1026 | ay8910_address_w(device, space, 0, mapping8914to8910[offset & 0xff]); | |
| 1027 | rv = (UINT16)ay8910_r(device, space, 0); | |
| 1040 | address_w(space, 0, mapping8914to8910[offset & 0xf]); | |
| 1041 | rv = (UINT16) data_r(space, 0); | |
| 1028 | 1042 | return rv; |
| 1029 | 1043 | } |
| 1030 | 1044 | |
| 1031 | WRITE8_ | |
| 1045 | WRITE8_MEMBER( ay8914_device::write ) | |
| 1032 | 1046 | { |
| 1033 | ay8910_address_w(device, space, 0, mapping8914to8910[offset & 0xff]); | |
| 1034 | ay8910_data_w(device, space, 0, data & 0xff); | |
| 1047 | address_w(space, 0, mapping8914to8910[offset & 0xf]); | |
| 1048 | data_w(space, 0, data & 0xff); | |
| 1035 | 1049 | } |
| 1036 | 1050 | |
| 1037 | 1051 | |
| r22781 | r22782 | |
| 1042 | 1056 | : device_t(mconfig, AY8910, "AY-3-8910A", tag, owner, clock), |
| 1043 | 1057 | device_sound_interface(mconfig, *this) |
| 1044 | 1058 | { |
| 1045 | m_token = global_alloc_clear(ay8910_context); | |
| 1046 | 1059 | } |
| 1047 | 1060 | ay8910_device::ay8910_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock) |
| 1048 | 1061 | : device_t(mconfig, type, name, tag, owner, clock), |
| 1049 | 1062 | device_sound_interface(mconfig, *this) |
| 1050 | 1063 | { |
| 1051 | m_token = global_alloc_clear(ay8910_context); | |
| 1052 | 1064 | } |
| 1053 | 1065 | |
| 1054 | 1066 | //------------------------------------------------- |
| r22781 | r22782 | |
| 1061 | 1073 | { |
| 1062 | 1074 | } |
| 1063 | 1075 | |
| 1064 | //------------------------------------------------- | |
| 1065 | // device_start - device-specific startup | |
| 1066 | //------------------------------------------------- | |
| 1067 | 1076 | |
| 1068 | void ay8910_device::device_start() | |
| 1069 | { | |
| 1070 | DEVICE_START_NAME( ay8910 )(this); | |
| 1071 | } | |
| 1072 | ||
| 1073 | 1077 | //------------------------------------------------- |
| 1074 | // device_reset - device-specific reset | |
| 1075 | //------------------------------------------------- | |
| 1076 | ||
| 1077 | void ay8910_device::device_reset() | |
| 1078 | { | |
| 1079 | DEVICE_RESET_NAME( ay8910 )(this); | |
| 1080 | } | |
| 1081 | ||
| 1082 | //------------------------------------------------- | |
| 1083 | // device_stop - device-specific stop | |
| 1084 | //------------------------------------------------- | |
| 1085 | ||
| 1086 | void ay8910_device::device_stop() | |
| 1087 | { | |
| 1088 | DEVICE_STOP_NAME( ay8910 )(this); | |
| 1089 | } | |
| 1090 | ||
| 1091 | //------------------------------------------------- | |
| 1092 | 1078 | // sound_stream_update - handle a stream update |
| 1093 | 1079 | //------------------------------------------------- |
| 1094 | 1080 | |
| r22781 | r22782 | |
| 1106 | 1092 | { |
| 1107 | 1093 | } |
| 1108 | 1094 | |
| 1109 | //------------------------------------------------- | |
| 1110 | // sound_stream_update - handle a stream update | |
| 1111 | //------------------------------------------------- | |
| 1112 | 1095 | |
| 1113 | void ay8912_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) | |
| 1114 | { | |
| 1115 | // should never get here | |
| 1116 | fatalerror("sound_stream_update called; not applicable to legacy sound devices\n"); | |
| 1117 | } | |
| 1118 | ||
| 1119 | ||
| 1120 | 1096 | const device_type AY8913 = &device_creator<ay8913_device>; |
| 1121 | 1097 | |
| 1122 | 1098 | ay8913_device::ay8913_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| r22781 | r22782 | |
| 1124 | 1100 | { |
| 1125 | 1101 | } |
| 1126 | 1102 | |
| 1127 | //------------------------------------------------- | |
| 1128 | // sound_stream_update - handle a stream update | |
| 1129 | //------------------------------------------------- | |
| 1130 | 1103 | |
| 1131 | void ay8913_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) | |
| 1132 | { | |
| 1133 | // should never get here | |
| 1134 | fatalerror("sound_stream_update called; not applicable to legacy sound devices\n"); | |
| 1135 | } | |
| 1136 | ||
| 1137 | ||
| 1138 | 1104 | const device_type AY8914 = &device_creator<ay8914_device>; |
| 1139 | 1105 | |
| 1140 | 1106 | ay8914_device::ay8914_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| r22781 | r22782 | |
| 1142 | 1108 | { |
| 1143 | 1109 | } |
| 1144 | 1110 | |
| 1145 | //------------------------------------------------- | |
| 1146 | // sound_stream_update - handle a stream update | |
| 1147 | //------------------------------------------------- | |
| 1148 | 1111 | |
| 1149 | void ay8914_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) | |
| 1150 | { | |
| 1151 | // should never get here | |
| 1152 | fatalerror("sound_stream_update called; not applicable to legacy sound devices\n"); | |
| 1153 | } | |
| 1154 | ||
| 1155 | ||
| 1156 | 1112 | const device_type AY8930 = &device_creator<ay8930_device>; |
| 1157 | 1113 | |
| 1158 | 1114 | ay8930_device::ay8930_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| r22781 | r22782 | |
| 1160 | 1116 | { |
| 1161 | 1117 | } |
| 1162 | 1118 | |
| 1163 | //------------------------------------------------- | |
| 1164 | // sound_stream_update - handle a stream update | |
| 1165 | //------------------------------------------------- | |
| 1166 | 1119 | |
| 1167 | void ay8930_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) | |
| 1168 | { | |
| 1169 | // should never get here | |
| 1170 | fatalerror("sound_stream_update called; not applicable to legacy sound devices\n"); | |
| 1171 | } | |
| 1172 | ||
| 1173 | ||
| 1174 | 1120 | const device_type YM2149 = &device_creator<ym2149_device>; |
| 1175 | 1121 | |
| 1176 | 1122 | ym2149_device::ym2149_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| r22781 | r22782 | |
| 1182 | 1128 | { |
| 1183 | 1129 | } |
| 1184 | 1130 | |
| 1185 | //------------------------------------------------- | |
| 1186 | // device_start - device-specific startup | |
| 1187 | //------------------------------------------------- | |
| 1188 | 1131 | |
| 1189 | void ym2149_device::device_start() | |
| 1190 | { | |
| 1191 | DEVICE_START_NAME( ym2149 )(this); | |
| 1192 | } | |
| 1193 | ||
| 1194 | //------------------------------------------------- | |
| 1195 | // sound_stream_update - handle a stream update | |
| 1196 | //------------------------------------------------- | |
| 1197 | ||
| 1198 | void ym2149_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) | |
| 1199 | { | |
| 1200 | // should never get here | |
| 1201 | fatalerror("sound_stream_update called; not applicable to legacy sound devices\n"); | |
| 1202 | } | |
| 1203 | ||
| 1204 | ||
| 1205 | 1132 | const device_type YM3439 = &device_creator<ym3439_device>; |
| 1206 | 1133 | |
| 1207 | 1134 | ym3439_device::ym3439_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| r22781 | r22782 | |
| 1209 | 1136 | { |
| 1210 | 1137 | } |
| 1211 | 1138 | |
| 1212 | //------------------------------------------------- | |
| 1213 | // sound_stream_update - handle a stream update | |
| 1214 | //------------------------------------------------- | |
| 1215 | 1139 | |
| 1216 | void ym3439_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) | |
| 1217 | { | |
| 1218 | // should never get here | |
| 1219 | fatalerror("sound_stream_update called; not applicable to legacy sound devices\n"); | |
| 1220 | } | |
| 1221 | ||
| 1222 | ||
| 1223 | 1140 | const device_type YMZ284 = &device_creator<ymz284_device>; |
| 1224 | 1141 | |
| 1225 | 1142 | ymz284_device::ymz284_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| r22781 | r22782 | |
| 1227 | 1144 | { |
| 1228 | 1145 | } |
| 1229 | 1146 | |
| 1230 | //------------------------------------------------- | |
| 1231 | // sound_stream_update - handle a stream update | |
| 1232 | //------------------------------------------------- | |
| 1233 | 1147 | |
| 1234 | void ymz284_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) | |
| 1235 | { | |
| 1236 | // should never get here | |
| 1237 | fatalerror("sound_stream_update called; not applicable to legacy sound devices\n"); | |
| 1238 | } | |
| 1239 | ||
| 1240 | ||
| 1241 | 1148 | const device_type YMZ294 = &device_creator<ymz294_device>; |
| 1242 | 1149 | |
| 1243 | 1150 | ymz294_device::ymz294_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 1244 | 1151 | : ym2149_device(mconfig, YMZ294, "YMZ294", tag, owner, clock) |
| 1245 | 1152 | { |
| 1246 | 1153 | } |
| 1247 | ||
| 1248 | //------------------------------------------------- | |
| 1249 | // sound_stream_update - handle a stream update | |
| 1250 | //------------------------------------------------- | |
| 1251 | ||
| 1252 | void ymz294_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) | |
| 1253 | { | |
| 1254 | // should never get here | |
| 1255 | fatalerror("sound_stream_update called; not applicable to legacy sound devices\n"); | |
| 1256 | } |
| r22781 | r22782 | |
|---|---|---|
| 3 | 3 | #ifndef __AY8910_H__ |
| 4 | 4 | #define __AY8910_H__ |
| 5 | 5 | |
| 6 | #include " | |
| 6 | #include "emu.h" | |
| 7 | 7 | |
| 8 | 8 | /* |
| 9 | 9 | AY-3-8910A: 2 I/O ports |
| r22781 | r22782 | |
| 74 | 74 | #define YM2149_PIN26_LOW (0x10) |
| 75 | 75 | |
| 76 | 76 | |
| 77 | #define AY8910_INTERFACE(name) \ | |
| 78 | const ay8910_interface (name) = | |
| 79 | ||
| 80 | 77 | struct ay8910_interface |
| 81 | 78 | { |
| 82 | 79 | int flags; /* Flags */ |
| r22781 | r22782 | |
| 87 | 84 | devcb_write8 portBwrite; |
| 88 | 85 | }; |
| 89 | 86 | |
| 90 | ||
| 91 | void ay8910_set_volume(device_t *device,int channel,int volume); | |
| 92 | ||
| 93 | DECLARE_READ8_DEVICE_HANDLER( ay8910_r ); | |
| 94 | DECLARE_WRITE8_DEVICE_HANDLER( ay8910_address_w ); | |
| 95 | DECLARE_WRITE8_DEVICE_HANDLER( ay8910_data_w ); | |
| 96 | ||
| 97 | /* /RES */ | |
| 98 | DECLARE_WRITE8_DEVICE_HANDLER( ay8910_reset_w ); | |
| 99 | ||
| 100 | /* use this when BC1 == A0; here, BC1=0 selects 'data' and BC1=1 selects 'latch address' */ | |
| 101 | DECLARE_WRITE8_DEVICE_HANDLER( ay8910_data_address_w ); | |
| 102 | ||
| 103 | /* use this when BC1 == !A0; here, BC1=0 selects 'latch address' and BC1=1 selects 'data' */ | |
| 104 | DECLARE_WRITE8_DEVICE_HANDLER( ay8910_address_data_w ); | |
| 105 | ||
| 106 | /* AY8914 handlers needed due to different register map */ | |
| 107 | DECLARE_READ8_DEVICE_HANDLER( ay8914_r ); | |
| 108 | DECLARE_WRITE8_DEVICE_HANDLER( ay8914_w ); | |
| 109 | ||
| 110 | ||
| 111 | 87 | /*********** An interface for SSG of YM2203 ***********/ |
| 112 | 88 | |
| 113 | 89 | void *ay8910_start_ym(void *infoptr, device_type chip_type, device_t *device, int clock, const ay8910_interface *intf); |
| r22781 | r22782 | |
| 115 | 91 | void ay8910_stop_ym(void *chip); |
| 116 | 92 | void ay8910_reset_ym(void *chip); |
| 117 | 93 | void ay8910_set_clock_ym(void *chip, int clock); |
| 94 | void ay8910_set_volume(void *chip ,int channel, int volume); | |
| 118 | 95 | void ay8910_write_ym(void *chip, int addr, int data); |
| 119 | 96 | int ay8910_read_ym(void *chip); |
| 120 | 97 | |
| r22781 | r22782 | |
| 124 | 101 | public: |
| 125 | 102 | ay8910_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 126 | 103 | ay8910_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock); |
| 127 | ~ay8910_device() { global_free(m_token); } | |
| 128 | 104 | |
| 129 | // access to legacy token | |
| 130 | void *token() const { assert(m_token != NULL); return m_token; } | |
| 105 | DECLARE_READ8_MEMBER( data_r ); | |
| 106 | DECLARE_WRITE8_MEMBER( address_w ); | |
| 107 | DECLARE_WRITE8_MEMBER( data_w ); | |
| 108 | ||
| 109 | /* /RES */ | |
| 110 | DECLARE_WRITE8_MEMBER( reset_w ); | |
| 111 | ||
| 112 | /* use this when BC1 == A0; here, BC1=0 selects 'data' and BC1=1 selects 'latch address' */ | |
| 113 | DECLARE_WRITE8_MEMBER( data_address_w ); | |
| 114 | ||
| 115 | /* use this when BC1 == !A0; here, BC1=0 selects 'latch address' and BC1=1 selects 'data' */ | |
| 116 | DECLARE_WRITE8_MEMBER( address_data_w ); | |
| 117 | ||
| 118 | void set_volume(int channel,int volume); | |
| 119 | ||
| 131 | 120 | protected: |
| 132 | 121 | // device-level overrides |
| 133 | 122 | virtual void device_config_complete(); |
| r22781 | r22782 | |
| 137 | 126 | |
| 138 | 127 | // sound stream update overrides |
| 139 | 128 | virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); |
| 140 | ||
| 129 | ||
| 141 | 130 | // internal state |
| 142 | void *m_token; | |
| 131 | const ay8910_interface *m_ay8910_config; | |
| 132 | void *m_psg; | |
| 143 | 133 | }; |
| 144 | 134 | |
| 145 | 135 | extern const device_type AY8910; |
| r22781 | r22782 | |
| 148 | 138 | { |
| 149 | 139 | public: |
| 150 | 140 | ay8912_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 151 | ||
| 152 | // sound stream update overrides | |
| 153 | virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); | |
| 154 | 141 | }; |
| 155 | 142 | |
| 156 | 143 | extern const device_type AY8912; |
| r22781 | r22782 | |
| 159 | 146 | { |
| 160 | 147 | public: |
| 161 | 148 | ay8913_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 162 | ||
| 163 | // sound stream update overrides | |
| 164 | virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); | |
| 165 | 149 | }; |
| 166 | 150 | |
| 167 | 151 | extern const device_type AY8913; |
| r22781 | r22782 | |
| 171 | 155 | public: |
| 172 | 156 | ay8914_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 173 | 157 | |
| 174 | // sound stream update overrides | |
| 175 | virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); | |
| 158 | /* AY8914 handlers needed due to different register map */ | |
| 159 | DECLARE_READ8_MEMBER( read ); | |
| 160 | DECLARE_WRITE8_MEMBER( write ); | |
| 176 | 161 | }; |
| 177 | 162 | |
| 178 | 163 | extern const device_type AY8914; |
| r22781 | r22782 | |
| 181 | 166 | { |
| 182 | 167 | public: |
| 183 | 168 | ay8930_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 184 | ||
| 185 | // sound stream update overrides | |
| 186 | virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); | |
| 187 | 169 | }; |
| 188 | 170 | |
| 189 | 171 | extern const device_type AY8930; |
| r22781 | r22782 | |
| 196 | 178 | protected: |
| 197 | 179 | // device-level overrides |
| 198 | 180 | virtual void device_start(); |
| 199 | ||
| 200 | // sound stream update overrides | |
| 201 | virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); | |
| 202 | 181 | }; |
| 203 | 182 | |
| 204 | 183 | extern const device_type YM2149; |
| r22781 | r22782 | |
| 207 | 186 | { |
| 208 | 187 | public: |
| 209 | 188 | ym3439_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 210 | ||
| 211 | // sound stream update overrides | |
| 212 | virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); | |
| 213 | 189 | }; |
| 214 | 190 | |
| 215 | 191 | extern const device_type YM3439; |
| r22781 | r22782 | |
| 218 | 194 | { |
| 219 | 195 | public: |
| 220 | 196 | ymz284_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 221 | ||
| 222 | // sound stream update overrides | |
| 223 | virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); | |
| 224 | 197 | }; |
| 225 | 198 | |
| 226 | 199 | extern const device_type YMZ284; |
| r22781 | r22782 | |
| 229 | 202 | { |
| 230 | 203 | public: |
| 231 | 204 | ymz294_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 232 | ||
| 233 | // sound stream update overrides | |
| 234 | virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); | |
| 235 | 205 | }; |
| 236 | 206 | |
| 237 | 207 | extern const device_type YMZ294; |
| r22781 | r22782 | |
|---|---|---|
| 585 | 585 | switch (offset & 0x6000) |
| 586 | 586 | { |
| 587 | 587 | case 0x4000: |
| 588 | | |
| 588 | m_ym2149->address_w(space, 0, data & 0x0f); | |
| 589 | 589 | break; |
| 590 | 590 | case 0x6000: |
| 591 | | |
| 591 | m_ym2149->data_w(space, 0, data); | |
| 592 | 592 | break; |
| 593 | 593 | default: |
| 594 | 594 | fme7_write(space, offset, data, mem_mask); |
| r22781 | r22782 | |
|---|---|---|
| 108 | 108 | 6 - AY data |
| 109 | 109 | */ |
| 110 | 110 | |
| 111 | ||
| 111 | UINT8 a2bus_arcboard_device::read_c0nx(address_space &space, UINT8 offset) | |
| 112 | 112 | { |
| 113 | 113 | switch (offset) |
| 114 | 114 | { |
| r22781 | r22782 | |
| 119 | 119 | return m_tms->register_read(space, 0); |
| 120 | 120 | |
| 121 | 121 | case 6: |
| 122 | return ay | |
| 122 | return m_ay->data_r(space, 0); | |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | return 0xff; |
| r22781 | r22782 | |
| 138 | 138 | break; |
| 139 | 139 | |
| 140 | 140 | case 5: |
| 141 | ay | |
| 141 | m_ay->address_w(space, 0, data); | |
| 142 | 142 | break; |
| 143 | 143 | |
| 144 | 144 | case 6: |
| 145 | ay | |
| 145 | m_ay->data_w(space, 0, data); | |
| 146 | 146 | break; |
| 147 | 147 | } |
| 148 | 148 | } |
| r22781 | r22782 | |
|---|---|---|
| 506 | 506 | { |
| 507 | 507 | case 0x0000: // Load PSG register |
| 508 | 508 | { |
| 509 | ay8910_address_w(m_ay, generic_space(), 0, (command & 0x0f00) >> 8); | |
| 510 | ay8910_data_w(m_ay, generic_space(), 0, command & 0x00ff); | |
| 511 | ay8910_address_w(m_ay, generic_space(), 0, m_prev_reg); | |
| 509 | m_ay->address_w(generic_space(), 0, (command & 0x0f00) >> 8); | |
| 510 | m_ay->data_w(generic_space(), 0, command & 0x00ff); | |
| 511 | m_ay->address_w(generic_space(), 0, m_prev_reg); | |
| 512 | 512 | } |
| 513 | 513 | logerror("DMA %i: LOAD %i, %i\n",channel,(command & 0x0f00) >> 8, command & 0x00ff); |
| 514 | 514 | break; |
| r22781 | r22782 | |
| 2259 | 2259 | /* PSG */ |
| 2260 | 2260 | for (i=0; i<16; i++) |
| 2261 | 2261 | { |
| 2262 | ay8910_address_w(m_ay, space, 0, i); | |
| 2263 | ay8910_data_w(m_ay, space, 0, pSnapshot[0x05b + i] & 0x0ff); | |
| 2262 | m_ay->address_w(space, 0, i); | |
| 2263 | m_ay->data_w(space, 0, pSnapshot[0x05b + i] & 0x0ff); | |
| 2264 | 2264 | } |
| 2265 | 2265 | |
| 2266 | ay | |
| 2266 | m_ay->address_w(space, 0, pSnapshot[0x05a]); | |
| 2267 | 2267 | |
| 2268 | 2268 | { |
| 2269 | 2269 | int MemSize; |
| r22781 | r22782 | |
| 2461 | 2461 | } break; |
| 2462 | 2462 | case 1: |
| 2463 | 2463 | {/* b6 = 1 ? : Read from selected PSG register and make the register data available to PPI Port A */ |
| 2464 | m_ppi_port_inputs[amstrad_ppi_PortA] = ay | |
| 2464 | m_ppi_port_inputs[amstrad_ppi_PortA] = m_ay->data_r(space, 0); | |
| 2465 | 2465 | } |
| 2466 | 2466 | break; |
| 2467 | 2467 | case 2: |
| 2468 | 2468 | {/* b7 = 1 ? : Write to selected PSG register and write data to PPI Port A */ |
| 2469 | ay | |
| 2469 | m_ay->data_w(space, 0, m_ppi_port_outputs[amstrad_ppi_PortA]); | |
| 2470 | 2470 | } |
| 2471 | 2471 | break; |
| 2472 | 2472 | case 3: |
| 2473 | 2473 | {/* b6 and b7 = 1 ? : The register will now be selected and the user can read from or write to it. The register will remain selected until another is chosen.*/ |
| 2474 | ay | |
| 2474 | m_ay->address_w(space, 0, m_ppi_port_outputs[amstrad_ppi_PortA]); | |
| 2475 | 2475 | m_prev_reg = m_ppi_port_outputs[amstrad_ppi_PortA]; |
| 2476 | 2476 | } |
| 2477 | 2477 | break; |
| r22781 | r22782 | |
|---|---|---|
| 239 | 239 | case 0x00: /* Inactive, do nothing */ |
| 240 | 240 | break; |
| 241 | 241 | case 0x01: /* Write to selected port */ |
| 242 | ay891 | |
| 242 | m_ay8912->data_w(space, 0, m_pia_2->b_output()); | |
| 243 | 243 | break; |
| 244 | 244 | case 0x02: /* Read from selected port */ |
| 245 | m_pia_2->portb_w( | |
| 245 | m_pia_2->portb_w(m_ay8912->data_r(space, 0)); | |
| 246 | 246 | break; |
| 247 | 247 | case 0x03: /* Select port to write to */ |
| 248 | ay891 | |
| 248 | m_ay8912->address_w(space, 0, m_pia_2->b_output()); | |
| 249 | 249 | break; |
| 250 | 250 | } |
| 251 | 251 | } |
| r22781 | r22782 | |
|---|---|---|
| 157 | 157 | /* if psg is in read register state return reg data */ |
| 158 | 158 | if (m_psg_control==0x01) |
| 159 | 159 | { |
| 160 | return | |
| 160 | return m_ay8912->data_r(space, 0); | |
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | /* return high-impedance */ |
| r22781 | r22782 | |
| 199 | 199 | |
| 200 | 200 | /* write register data */ |
| 201 | 201 | case 2: |
| 202 | ay891 | |
| 202 | m_ay8912->data_w(space, 0, m_via_port_a_data); | |
| 203 | 203 | break; |
| 204 | 204 | |
| 205 | 205 | /* write register index */ |
| 206 | 206 | case 3: |
| 207 | ay891 | |
| 207 | m_ay8912->address_w(space, 0, m_via_port_a_data); | |
| 208 | 208 | break; |
| 209 | 209 | |
| 210 | 210 | default: |
| r22781 | r22782 | |
|---|---|---|
| 331 | 331 | { |
| 332 | 332 | if (!(data & 4)) |
| 333 | 333 | { |
| 334 | ay | |
| 334 | m_ay1->reset_w(space, 0, 0); | |
| 335 | 335 | if (m_isPhasor && m_PhasorNative) |
| 336 | 336 | { |
| 337 | ay | |
| 337 | m_ay2->reset_w(space, 0, 0); | |
| 338 | 338 | } |
| 339 | 339 | } |
| 340 | 340 | else |
| r22781 | r22782 | |
| 347 | 347 | break; |
| 348 | 348 | |
| 349 | 349 | case 1: // BDIR=0, BC1=1 (read PSG) |
| 350 | m_porta1 = ay | |
| 350 | m_porta1 = m_ay1->data_r(space, 0); | |
| 351 | 351 | break; |
| 352 | 352 | |
| 353 | 353 | case 2: // BDIR=1, BC1=0 (write PSG) |
| 354 | ay | |
| 354 | m_ay1->data_w(space, 0, m_porta1); | |
| 355 | 355 | break; |
| 356 | 356 | |
| 357 | 357 | case 3: // BDIR=1, BC1=1 (latch) |
| 358 | ay | |
| 358 | m_ay1->address_w(space, 0, m_porta1); | |
| 359 | 359 | break; |
| 360 | 360 | } |
| 361 | 361 | } |
| r22781 | r22782 | |
| 381 | 381 | case 1: // BDIR=0, BC1=1 (read PSG) |
| 382 | 382 | if (chipSel & 1) |
| 383 | 383 | { |
| 384 | m_porta1 = ay | |
| 384 | m_porta1 = m_ay1->data_r(space, 0); | |
| 385 | 385 | } |
| 386 | 386 | if (chipSel & 2) |
| 387 | 387 | { |
| 388 | m_porta1 = | |
| 388 | m_porta1 = m_ay2->data_r(space, 0); | |
| 389 | 389 | } |
| 390 | 390 | break; |
| 391 | 391 | |
| 392 | 392 | case 2: // BDIR=1, BC1=0 (write PSG) |
| 393 | 393 | if (chipSel & 1) |
| 394 | 394 | { |
| 395 | ay | |
| 395 | m_ay1->data_w(space, 0, m_porta1); | |
| 396 | 396 | } |
| 397 | 397 | if (chipSel & 2) |
| 398 | 398 | { |
| 399 | ay | |
| 399 | m_ay2->data_w(space, 0, m_porta1); | |
| 400 | 400 | } |
| 401 | 401 | break; |
| 402 | 402 | |
| 403 | 403 | case 3: // BDIR=1, BC1=1 (latch) |
| 404 | 404 | if (chipSel & 1) |
| 405 | 405 | { |
| 406 | ay | |
| 406 | m_ay1->address_w(space, 0, m_porta1); | |
| 407 | 407 | } |
| 408 | 408 | if (chipSel & 2) |
| 409 | 409 | { |
| 410 | ay | |
| 410 | m_ay2->address_w(space, 0, m_porta1); | |
| 411 | 411 | } |
| 412 | 412 | break; |
| 413 | 413 | } |
| r22781 | r22782 | |
| 436 | 436 | { |
| 437 | 437 | if (m_isPhasor && m_PhasorNative) |
| 438 | 438 | { |
| 439 | ay8910_reset_w(m_ay3, space, 0, 0); | |
| 440 | ay8910_reset_w(m_ay4, space, 0, 0); | |
| 439 | m_ay3->reset_w(space, 0, 0); | |
| 440 | m_ay4->reset_w(space, 0, 0); | |
| 441 | 441 | } |
| 442 | 442 | else |
| 443 | 443 | { |
| 444 | ay | |
| 444 | m_ay2->reset_w(space, 0, 0); | |
| 445 | 445 | } |
| 446 | 446 | } |
| 447 | 447 | else |
| r22781 | r22782 | |
| 454 | 454 | break; |
| 455 | 455 | |
| 456 | 456 | case 1: // BDIR=0, BC1=1 (read PSG) |
| 457 | m_porta2 = | |
| 457 | m_porta2 = m_ay2->data_r(space, 0); | |
| 458 | 458 | break; |
| 459 | 459 | |
| 460 | 460 | case 2: // BDIR=1, BC1=0 (write PSG) |
| 461 | ay | |
| 461 | m_ay2->data_w(space, 0, m_porta2); | |
| 462 | 462 | break; |
| 463 | 463 | |
| 464 | 464 | case 3: // BDIR=1, BC1=1 (latch) |
| 465 | ay | |
| 465 | m_ay2->address_w(space, 0, m_porta2); | |
| 466 | 466 | break; |
| 467 | 467 | } |
| 468 | 468 | } |
| r22781 | r22782 | |
| 488 | 488 | case 1: // BDIR=0, BC1=1 (read PSG) |
| 489 | 489 | if (chipSel & 1) |
| 490 | 490 | { |
| 491 | m_porta2 = | |
| 491 | m_porta2 = m_ay3->data_r(space, 0); | |
| 492 | 492 | } |
| 493 | 493 | if (chipSel & 2) |
| 494 | 494 | { |
| 495 | m_porta2 = | |
| 495 | m_porta2 = m_ay4->data_r(space, 0); | |
| 496 | 496 | } |
| 497 | 497 | break; |
| 498 | 498 | |
| 499 | 499 | case 2: // BDIR=1, BC1=0 (write PSG) |
| 500 | 500 | if (chipSel & 1) |
| 501 | 501 | { |
| 502 | ay | |
| 502 | m_ay3->data_w(space, 0, m_porta2); | |
| 503 | 503 | } |
| 504 | 504 | if (chipSel & 2) |
| 505 | 505 | { |
| 506 | ay | |
| 506 | m_ay4->data_w(space, 0, m_porta2); | |
| 507 | 507 | } |
| 508 | 508 | break; |
| 509 | 509 | |
| 510 | 510 | case 3: // BDIR=1, BC1=1 (latch) |
| 511 | 511 | if (chipSel & 1) |
| 512 | 512 | { |
| 513 | ay | |
| 513 | m_ay3->address_w(space, 0, m_porta2); | |
| 514 | 514 | } |
| 515 | 515 | if (chipSel & 2) |
| 516 | 516 | { |
| 517 | ay | |
| 517 | m_ay4->address_w(space, 0, m_porta2); | |
| 518 | 518 | } |
| 519 | 519 | break; |
| 520 | 520 | } |
| r22781 | r22782 | |
|---|---|---|
| 13 | 13 | #include "machine/wd17xx.h" |
| 14 | 14 | #include "imagedev/cartslot.h" |
| 15 | 15 | #include "imagedev/cassette.h" |
| 16 | #include "sound/ay8910.h" | |
| 17 | 16 | #include "sound/dac.h" |
| 18 | 17 | #include "imagedev/flopdrv.h" |
| 19 | 18 | #include "machine/ram.h" |
| 20 | 19 | |
| 21 | 20 | #define AYWriteReg(chip,port,value) \ |
| 22 | ay8910_address_w(ay8910, space, 0,port); \ | |
| 23 | ay8910_data_w(ay8910, space, 0,value) | |
| 21 | m_ay8910->address_w(space, 0,port); \ | |
| 22 | m_ay8910->data_w(space, 0,value) | |
| 24 | 23 | |
| 25 | 24 | #define TAPE_HEADER "Colour Genie - Virtual Tape File" |
| 26 | 25 | |
| r22781 | r22782 | |
| 47 | 46 | void cgenie_state::machine_reset() |
| 48 | 47 | { |
| 49 | 48 | address_space &space = m_maincpu->space(AS_PROGRAM); |
| 50 | device_t *ay8910 = machine().device("ay8910"); | |
| 51 | 49 | UINT8 *ROM = memregion("maincpu")->base(); |
| 52 | 50 | |
| 53 | 51 | /* reset the AY8910 to be quiet, since the cgenie BIOS doesn't */ |
| r22781 | r22782 | |
| 594 | 592 | WRITE8_MEMBER(cgenie_state::cgenie_sh_control_port_w) |
| 595 | 593 | { |
| 596 | 594 | m_control_port = data; |
| 597 | ay8910 | |
| 595 | m_ay8910->address_w(space, offset, data); | |
| 598 | 596 | } |
| r22781 | r22782 | |
|---|---|---|
| 68 | 68 | #include "machine/ctronics.h" |
| 69 | 69 | #include "machine/6522via.h" |
| 70 | 70 | #include "machine/scsibus.h" |
| 71 | #include "sound/ay8910.h" | |
| 72 | 71 | #include "sound/msm5205.h" |
| 73 | 72 | |
| 74 | 73 | #include "includes/rmnimbus.h" |
| r22781 | r22782 | |
| 2719 | 2718 | |
| 2720 | 2719 | READ8_MEMBER(rmnimbus_state::nimbus_sound_ay8910_r) |
| 2721 | 2720 | { |
| 2722 | device_t *ay8910 = machine().device(AY8910_TAG); | |
| 2723 | 2721 | UINT8 result=0; |
| 2724 | 2722 | |
| 2725 | 2723 | if ((offset*2)==0) |
| 2726 | result=ay8910_r( | |
| 2724 | result = m_ay8910->data_r(space, 0); | |
| 2727 | 2725 | |
| 2728 | 2726 | return result; |
| 2729 | 2727 | } |
| r22781 | r22782 | |
| 2731 | 2729 | WRITE8_MEMBER(rmnimbus_state::nimbus_sound_ay8910_w) |
| 2732 | 2730 | { |
| 2733 | 2731 | int pc=space.device().safe_pc(); |
| 2734 | device_t *ay8910 = machine().device(AY8910_TAG); | |
| 2735 | 2732 | |
| 2736 | 2733 | if(LOG_SOUND) |
| 2737 | 2734 | logerror("Nimbus SoundW %05X write of %02X to %04X\n",pc,data,(offset*2)+0xE0); |
| 2738 | 2735 | |
| 2739 | 2736 | switch (offset*2) |
| 2740 | 2737 | { |
| 2741 | case 0x00 : ay8910_data_address_w(ay8910, space, 1, data); break; | |
| 2742 | case 0x02 : ay8910_data_address_w(ay8910, space, 0, data); break; | |
| 2738 | case 0x00 : m_ay8910->data_address_w(space, 1, data); break; | |
| 2739 | case 0x02 : m_ay8910->data_address_w(space, 0, data); break; | |
| 2743 | 2740 | } |
| 2744 | 2741 | |
| 2745 | 2742 | } |
| r22781 | r22782 | |
|---|---|---|
| 774 | 774 | address_space &space = m_maincpu->space(AS_PROGRAM); |
| 775 | 775 | via6522_device *via_0 = machine().device<via6522_device>("via6522_0"); |
| 776 | 776 | via6522_device *via_1 = machine().device<via6522_device>("via6522_1"); |
| 777 | device | |
| 777 | ay8910_device *ay8910 = machine().device<ay8910_device>("ay8910.1"); | |
| 778 | 778 | |
| 779 | 779 | /* check for .DMP file format */ |
| 780 | 780 | if (snapshot_size == 8263) |
| r22781 | r22782 | |
| 850 | 850 | /* first set of AY8910 registers */ |
| 851 | 851 | for (i = 0; i < 16; i++ ) |
| 852 | 852 | { |
| 853 | ay8910_address_w(ay8910, generic_space(), 0, i); | |
| 854 | ay8910_data_w(ay8910, generic_space(), 0, snapshot_buff[base++]); | |
| 853 | ay8910->address_w(generic_space(), 0, i); | |
| 854 | ay8910->data_w(generic_space(), 0, snapshot_buff[base++]); | |
| 855 | 855 | } |
| 856 | 856 | |
| 857 | 857 | /* second set of AY8910 registers */ |
| 858 | 858 | for (i = 0; i < 16; i++ ) |
| 859 | 859 | { |
| 860 | ay8910_address_w(ay8910, generic_space(), 0, i); | |
| 861 | ay8910_data_w(ay8910, generic_space(), 0, snapshot_buff[base++]); | |
| 860 | ay8910->address_w(generic_space(), 0, i); | |
| 861 | ay8910->data_w(generic_space(), 0, snapshot_buff[base++]); | |
| 862 | 862 | } |
| 863 | 863 | |
| 864 | 864 | for (i = 0; i < 32*16; i++) |
| r22781 | r22782 | |
|---|---|---|
| 2354 | 2354 | |
| 2355 | 2355 | if ((z80_type == SPECTRUM_Z80_SNAPSHOT_128K) || ((z80_type == SPECTRUM_Z80_SNAPSHOT_TS2068) && !strcmp(machine.system().name,"ts2068"))) |
| 2356 | 2356 | { |
| 2357 | device | |
| 2357 | ay8910_device *ay8912 = machine.device<ay8910_device>("ay8912"); | |
| 2358 | 2358 | |
| 2359 | 2359 | /* Only set up sound registers for 128K machine or TS2068! */ |
| 2360 | 2360 | for (i = 0; i < 16; i++) |
| 2361 | 2361 | { |
| 2362 | ay8910_address_w(ay8912, state->generic_space(), 0, i); | |
| 2363 | ay8910_data_w(ay8912, state->generic_space(), 0, snapdata[39 + i]); | |
| 2362 | ay8912->address_w(state->generic_space(), 0, i); | |
| 2363 | ay8912->data_w(state->generic_space(), 0, snapdata[39 + i]); | |
| 2364 | 2364 | } |
| 2365 | ay891 | |
| 2365 | ay8912->address_w(state->generic_space(), 0, snapdata[38]); | |
| 2366 | 2366 | } |
| 2367 | 2367 | |
| 2368 | 2368 | pSource = snapdata + header_size; |
| r22781 | r22782 | |
|---|---|---|
| 12 | 12 | #include "cpu/i8085/i8085.h" |
| 13 | 13 | #include "imagedev/cassette.h" |
| 14 | 14 | #include "sound/speaker.h" |
| 15 | #include "sound/ay8910.h" | |
| 16 | 15 | #include "includes/orion.h" |
| 17 | 16 | |
| 18 | 17 | #define SCREEN_WIDTH_384 48 |
| r22781 | r22782 | |
| 363 | 362 | { |
| 364 | 363 | if (offset == 0xFFFD) |
| 365 | 364 | { |
| 366 | return | |
| 365 | return m_ay8912->data_r(space, 0); | |
| 367 | 366 | } |
| 368 | 367 | return 0xff; |
| 369 | 368 | } |
| r22781 | r22782 | |
| 381 | 380 | } |
| 382 | 381 | switch(offset) |
| 383 | 382 | { |
| 384 | case 0xfffd : ay891 | |
| 383 | case 0xfffd : m_ay8912->address_w(space, 0, data); | |
| 385 | 384 | break; |
| 386 | 385 | case 0xbffd : |
| 387 | case 0xbefd : ay891 | |
| 386 | case 0xbefd : m_ay8912->data_w(space, 0, data); | |
| 388 | 387 | break; |
| 389 | 388 | } |
| 390 | 389 | } |
| r22781 | r22782 | |
| 554 | 553 | } |
| 555 | 554 | if (offset == 0xFFFD) |
| 556 | 555 | { |
| 557 | return | |
| 556 | return m_ay8912->data_r(space, 0); | |
| 558 | 557 | } |
| 559 | 558 | return 0xff; |
| 560 | 559 | } |
| r22781 | r22782 | |
| 592 | 591 | } |
| 593 | 592 | switch(offset) |
| 594 | 593 | { |
| 595 | case 0xfffd : ay891 | |
| 594 | case 0xfffd : m_ay8912->address_w(space, 0, data); | |
| 596 | 595 | break; |
| 597 | 596 | case 0xbffd : |
| 598 | case 0xbefd : ay891 | |
| 597 | case 0xbefd : m_ay8912->data_w(space, 0, data); | |
| 599 | 598 | break; |
| 600 | 599 | } |
| 601 | 600 | } |
| r22781 | r22782 | |
|---|---|---|
| 114 | 114 | m_x86(*this, "x86"), |
| 115 | 115 | m_cassette(*this, "cassette"), |
| 116 | 116 | m_beeper(*this, "beeper"), |
| 117 | m_ym(*this, "ym") | |
| 117 | m_ym(*this, "ym"), | |
| 118 | m_psg(*this, "psg") | |
| 118 | 119 | { |
| 119 | 120 | } |
| 120 | 121 | |
| r22781 | r22782 | |
| 270 | 271 | required_device<cassette_image_device> m_cassette; |
| 271 | 272 | required_device<beep_device> m_beeper; |
| 272 | 273 | optional_device<ym2203_device> m_ym; |
| 274 | optional_device<ay8910_device> m_psg; | |
| 273 | 275 | void fm7_alu_mask_write(UINT32 offset, int bank, UINT8 dat); |
| 274 | 276 | void fm7_alu_function_compare(UINT32 offset); |
| 275 | 277 | void fm7_alu_function_pset(UINT32 offset); |
| r22781 | r22782 | |
|---|---|---|
| 10 | 10 | #include "machine/wd17xx.h" |
| 11 | 11 | #include "imagedev/cassette.h" |
| 12 | 12 | #include "machine/ram.h" |
| 13 | #include "sound/ay8910.h" | |
| 13 | 14 | |
| 14 | 15 | // CRTC 6845 |
| 15 | 16 | struct CRTC6845 |
| r22781 | r22782 | |
| 45 | 46 | m_fontram(*this, "fontram"), |
| 46 | 47 | m_maincpu(*this, "maincpu"), |
| 47 | 48 | m_cassette(*this, "cassette"), |
| 48 | m_ram(*this, RAM_TAG) { } | |
| 49 | m_ram(*this, RAM_TAG), | |
| 50 | m_ay8910(*this, "ay8910") | |
| 51 | { | |
| 52 | } | |
| 49 | 53 | |
| 50 | 54 | required_shared_ptr<UINT8> m_colorram; |
| 51 | 55 | required_shared_ptr<UINT8> m_fontram; |
| r22781 | r22782 | |
| 85 | 89 | required_device<cpu_device> m_maincpu; |
| 86 | 90 | required_device<cassette_image_device> m_cassette; |
| 87 | 91 | required_device<ram_device> m_ram; |
| 92 | required_device<ay8910_device> m_ay8910; | |
| 88 | 93 | |
| 89 | 94 | void cgenie_offset_xy(); |
| 90 | 95 | int cgenie_get_register(int indx); |
| r22781 | r22782 | |
|---|---|---|
| 11 | 11 | #include "machine/scsicb.h" |
| 12 | 12 | #include "machine/6522via.h" |
| 13 | 13 | #include "machine/ram.h" |
| 14 | #include "sound/ay8910.h" | |
| 14 | 15 | |
| 15 | 16 | #define MAINCPU_TAG "maincpu" |
| 16 | 17 | #define IOCPU_TAG "iocpu" |
| r22781 | r22782 | |
| 395 | 396 | : driver_device(mconfig, type, tag), |
| 396 | 397 | m_scsibus(*this, SCSIBUS_TAG ":host"), |
| 397 | 398 | m_maincpu(*this, "maincpu"), |
| 398 | m_ram(*this, RAM_TAG) { | |
| 399 | m_ram(*this, RAM_TAG), | |
| 400 | m_ay8910(*this, AY8910_TAG) | |
| 401 | { | |
| 399 | 402 | } |
| 400 | 403 | |
| 401 | 404 | required_device<scsicb_device> m_scsibus; |
| r22781 | r22782 | |
| 472 | 475 | IRQ_CALLBACK_MEMBER(int_callback); |
| 473 | 476 | required_device<cpu_device> m_maincpu; |
| 474 | 477 | required_device<ram_device> m_ram; |
| 478 | required_device<ay8910_device> m_ay8910; | |
| 475 | 479 | UINT8 get_pixel(UINT16 x, UINT16 y); |
| 476 | 480 | UINT16 read_pixel_line(UINT16 x, UINT16 y, UINT8 width); |
| 477 | 481 | UINT16 read_pixel_data(UINT16 x, UINT16 y); |
| r22781 | r22782 | |
|---|---|---|
| 140 | 140 | required_device<cpu_device> m_maincpu; |
| 141 | 141 | optional_device<v9938_device> m_v9938; |
| 142 | 142 | required_device<cassette_image_device> m_cassette; |
| 143 | required_device<device | |
| 143 | required_device<ay8910_device> m_ay8910; | |
| 144 | 144 | required_device<ym2413_device> m_ym; |
| 145 | 145 | optional_device<k051649_device> m_k051649; |
| 146 | 146 | required_device<dac_device> m_dac; |
| r22781 | r22782 | |
|---|---|---|
| 13 | 13 | #include "machine/ram.h" |
| 14 | 14 | #include "machine/mc146818.h" |
| 15 | 15 | #include "sound/speaker.h" |
| 16 | #include "sound/ay8910.h" | |
| 16 | 17 | |
| 17 | 18 | |
| 18 | 19 | class orion_state : public radio86_state |
| r22781 | r22782 | |
| 102 | 103 | required_device<floppy_connector> m_fd3; |
| 103 | 104 | optional_device<mc146818_device> m_rtc; |
| 104 | 105 | optional_device<device_t> m_speaker; |
| 105 | optional_device<device | |
| 106 | optional_device<ay8910_device> m_ay8912; | |
| 106 | 107 | required_memory_bank m_bank2; |
| 107 | 108 | optional_memory_bank m_bank3; |
| 108 | 109 | optional_memory_bank m_bank4; |
| r22781 | r22782 | |
|---|---|---|
| 154 | 154 | |
| 155 | 155 | protected: |
| 156 | 156 | required_device<cpu_device> m_maincpu; |
| 157 | required_device<device | |
| 157 | required_device<ay8910_device> m_ay8912; | |
| 158 | 158 | required_device<centronics_device> m_centronics; |
| 159 | 159 | required_device<cassette_image_device> m_cassette; |
| 160 | 160 | required_device<via6522_device> m_via6522_0; |
| r22781 | r22782 | |
|---|---|---|
| 1596 | 1596 | else if(offset >= 0x1400 && offset <= 0x17ff) { return x1_pcg_r(space, offset-0x1400); } |
| 1597 | 1597 | else if(offset >= 0x1900 && offset <= 0x19ff) { return x1_sub_io_r(space, 0); } |
| 1598 | 1598 | else if(offset >= 0x1a00 && offset <= 0x1aff) { return machine().device<i8255_device>("ppi8255_0")->read(space, (offset-0x1a00) & 3); } |
| 1599 | else if(offset >= 0x1b00 && offset <= 0x1bff) { return | |
| 1599 | else if(offset >= 0x1b00 && offset <= 0x1bff) { return machine().device<ay8910_device>("ay")->data_r(space, 0); } | |
| 1600 | 1600 | // else if(offset >= 0x1f80 && offset <= 0x1f8f) { return z80dma_r(machine().device("dma"), 0); } |
| 1601 | 1601 | // else if(offset >= 0x1f90 && offset <= 0x1f91) { return z80sio_c_r(machine().device("sio"), (offset-0x1f90) & 1); } |
| 1602 | 1602 | // else if(offset >= 0x1f92 && offset <= 0x1f93) { return z80sio_d_r(machine().device("sio"), (offset-0x1f92) & 1); } |
| r22781 | r22782 | |
| 1632 | 1632 | else if(offset == 0x1800 || offset == 0x1801) { x1_6845_w(space, offset-0x1800, data); } |
| 1633 | 1633 | else if(offset >= 0x1900 && offset <= 0x19ff) { x1_sub_io_w(space, 0,data); } |
| 1634 | 1634 | else if(offset >= 0x1a00 && offset <= 0x1aff) { machine().device<i8255_device>("ppi8255_0")->write(space, (offset-0x1a00) & 3,data); } |
| 1635 | else if(offset >= 0x1b00 && offset <= 0x1bff) { ay8910_data_w(machine().device("ay"), space, 0,data); } | |
| 1636 | else if(offset >= 0x1c00 && offset <= 0x1cff) { ay8910_address_w(machine().device("ay"), space, 0,data); } | |
| 1635 | else if(offset >= 0x1b00 && offset <= 0x1bff) { machine().device<ay8910_device>("ay")->data_w(space, 0,data); } | |
| 1636 | else if(offset >= 0x1c00 && offset <= 0x1cff) { machine().device<ay8910_device>("ay")->address_w(space, 0,data); } | |
| 1637 | 1637 | else if(offset >= 0x1d00 && offset <= 0x1dff) { x1_rom_bank_1_w(space,0,data); } |
| 1638 | 1638 | else if(offset >= 0x1e00 && offset <= 0x1eff) { x1_rom_bank_0_w(space,0,data); } |
| 1639 | 1639 | // else if(offset >= 0x1f80 && offset <= 0x1f8f) { z80dma_w(machine().device("dma"), 0,data); } |
| r22781 | r22782 | |
| 1680 | 1680 | else if(offset >= 0x1400 && offset <= 0x17ff) { return x1_pcg_r(space, offset-0x1400); } |
| 1681 | 1681 | else if(offset >= 0x1900 && offset <= 0x19ff) { return x1_sub_io_r(space, 0); } |
| 1682 | 1682 | else if(offset >= 0x1a00 && offset <= 0x1aff) { return machine().device<i8255_device>("ppi8255_0")->read(space, (offset-0x1a00) & 3); } |
| 1683 | else if(offset >= 0x1b00 && offset <= 0x1bff) { return | |
| 1683 | else if(offset >= 0x1b00 && offset <= 0x1bff) { return machine().device<ay8910_device>("ay")->data_r(space, 0); } | |
| 1684 | 1684 | else if(offset >= 0x1f80 && offset <= 0x1f8f) { return z80dma_r(machine().device("dma"), space, 0); } |
| 1685 | 1685 | else if(offset >= 0x1f90 && offset <= 0x1f93) { return z80dart_ba_cd_r(machine().device("sio"), space, (offset-0x1f90) & 3); } |
| 1686 | 1686 | else if(offset >= 0x1f98 && offset <= 0x1f9f) { printf("Extended SIO/CTC read %04x\n",offset); return 0xff; } |
| r22781 | r22782 | |
| 1730 | 1730 | else if(offset == 0x1800 || offset == 0x1801) { x1_6845_w(space, offset-0x1800, data); } |
| 1731 | 1731 | else if(offset >= 0x1900 && offset <= 0x19ff) { x1_sub_io_w(space, 0,data); } |
| 1732 | 1732 | else if(offset >= 0x1a00 && offset <= 0x1aff) { machine().device<i8255_device>("ppi8255_0")->write(space, (offset-0x1a00) & 3,data); } |
| 1733 | else if(offset >= 0x1b00 && offset <= 0x1bff) { ay8910_data_w(machine().device("ay"), space, 0,data); } | |
| 1734 | else if(offset >= 0x1c00 && offset <= 0x1cff) { ay8910_address_w(machine().device("ay"), space, 0,data); } | |
| 1733 | else if(offset >= 0x1b00 && offset <= 0x1bff) { machine().device<ay8910_device>("ay")->data_w(space, 0,data); } | |
| 1734 | else if(offset >= 0x1c00 && offset <= 0x1cff) { machine().device<ay8910_device>("ay")->address_w(space, 0,data); } | |
| 1735 | 1735 | else if(offset >= 0x1d00 && offset <= 0x1dff) { x1_rom_bank_1_w(space,0,data); } |
| 1736 | 1736 | else if(offset >= 0x1e00 && offset <= 0x1eff) { x1_rom_bank_0_w(space,0,data); } |
| 1737 | 1737 | else if(offset >= 0x1f80 && offset <= 0x1f8f) { z80dma_w(machine().device("dma"), space, 0,data); } |
| r22781 | r22782 | |
|---|---|---|
| 345 | 345 | WRITE8_MEMBER(msx_state::msx_ay8910_w) |
| 346 | 346 | { |
| 347 | 347 | if ( offset & 1 ) |
| 348 | ay8910 | |
| 348 | m_ay8910->data_w( space, offset, data ); | |
| 349 | 349 | else |
| 350 | ay8910 | |
| 350 | m_ay8910->address_w( space, offset, data ); | |
| 351 | 351 | } |
| 352 | 352 | |
| 353 | 353 | |
| r22781 | r22782 | |
| 358 | 358 | AM_RANGE( 0x7c, 0x7d) AM_WRITE(msx_fmpac_w) |
| 359 | 359 | AM_RANGE( 0x90, 0x90) AM_READWRITE(msx_printer_status_r, msx_printer_strobe_w) |
| 360 | 360 | AM_RANGE( 0x91, 0x91) AM_WRITE(msx_printer_data_w) |
| 361 | AM_RANGE( 0xa0, 0xa7) AM_DEVREAD | |
| 361 | AM_RANGE( 0xa0, 0xa7) AM_DEVREAD("ay8910", ay8910_device, data_r) AM_WRITE(msx_ay8910_w) | |
| 362 | 362 | AM_RANGE( 0xa8, 0xab) AM_DEVREADWRITE("ppi8255", i8255_device, read, write) |
| 363 | 363 | AM_RANGE( 0x98, 0x98) AM_DEVREADWRITE("tms9928a", tms9928a_device, vram_read, vram_write) |
| 364 | 364 | AM_RANGE( 0x99, 0x99) AM_DEVREADWRITE("tms9928a", tms9928a_device, register_read, register_write) |
| r22781 | r22782 | |
| 373 | 373 | AM_RANGE( 0x7c, 0x7d) AM_WRITE(msx_fmpac_w) |
| 374 | 374 | AM_RANGE( 0x90, 0x90) AM_READWRITE(msx_printer_status_r, msx_printer_strobe_w) |
| 375 | 375 | AM_RANGE( 0x91, 0x91) AM_WRITE(msx_printer_data_w) |
| 376 | AM_RANGE( 0xa0, 0xa7) AM_DEVREAD | |
| 376 | AM_RANGE( 0xa0, 0xa7) AM_DEVREAD("ay8910", ay8910_device, data_r) AM_WRITE(msx_ay8910_w) | |
| 377 | 377 | AM_RANGE( 0xa8, 0xab) AM_DEVREADWRITE("ppi8255", i8255_device, read, write) |
| 378 | 378 | AM_RANGE( 0x98, 0x9b) AM_DEVREADWRITE("v9938", v9938_device, read, write) |
| 379 | 379 | AM_RANGE( 0xb4, 0xb4) AM_WRITE(msx_rtc_latch_w) |
| r22781 | r22782 | |
|---|---|---|
| 931 | 931 | AM_RANGE(0x80, 0x80) AM_DEVREADWRITE("uart", i8251_device, data_r, data_w) |
| 932 | 932 | AM_RANGE(0x81, 0x81) AM_DEVREADWRITE("uart", i8251_device, status_r, control_w) |
| 933 | 933 | AM_RANGE(0x90, 0x93) AM_MIRROR(0x0c) AM_READWRITE(nec_ppi8255_r, nec_ppi8255_w) |
| 934 | AM_RANGE(0xa0, 0xa0) AM_MIRROR(0x0c) AM_DEVWRITE_LEGACY("ay8910", ay8910_address_w) | |
| 935 | AM_RANGE(0xa1, 0xa1) AM_MIRROR(0x0c) AM_DEVWRITE_LEGACY("ay8910", ay8910_data_w) | |
| 936 | AM_RANGE(0xa2, 0xa2) AM_MIRROR(0x0c) AM_DEVREAD_LEGACY("ay8910", ay8910_r) | |
| 934 | AM_RANGE(0xa0, 0xa0) AM_MIRROR(0x0c) AM_DEVWRITE("ay8910", ay8910_device, address_w) | |
| 935 | AM_RANGE(0xa1, 0xa1) AM_MIRROR(0x0c) AM_DEVWRITE("ay8910", ay8910_device, data_w) | |
| 936 | AM_RANGE(0xa2, 0xa2) AM_MIRROR(0x0c) AM_DEVREAD("ay8910", ay8910_device, data_r) | |
| 937 | 937 | AM_RANGE(0xa3, 0xa3) AM_MIRROR(0x0c) AM_WRITENOP |
| 938 | 938 | AM_RANGE(0xb0, 0xb0) AM_MIRROR(0x0f) AM_WRITE(pc6001_system_latch_w) |
| 939 | 939 | AM_RANGE(0xd0, 0xd3) AM_MIRROR(0x0c) AM_NOP // disk device |
| r22781 | r22782 | |
| 1467 | 1467 | |
| 1468 | 1468 | AM_RANGE(0x90, 0x93) AM_MIRROR(0x0c) AM_READWRITE(nec_ppi8255_r, necmk2_ppi8255_w) |
| 1469 | 1469 | |
| 1470 | AM_RANGE(0xa0, 0xa0) AM_MIRROR(0x0c) AM_DEVWRITE_LEGACY("ay8910", ay8910_address_w) | |
| 1471 | AM_RANGE(0xa1, 0xa1) AM_MIRROR(0x0c) AM_DEVWRITE_LEGACY("ay8910", ay8910_data_w) | |
| 1472 | AM_RANGE(0xa2, 0xa2) AM_MIRROR(0x0c) AM_DEVREAD_LEGACY("ay8910", ay8910_r) | |
| 1470 | AM_RANGE(0xa0, 0xa0) AM_MIRROR(0x0c) AM_DEVWRITE("ay8910", ay8910_device, address_w) | |
| 1471 | AM_RANGE(0xa1, 0xa1) AM_MIRROR(0x0c) AM_DEVWRITE("ay8910", ay8910_device, data_w) | |
| 1472 | AM_RANGE(0xa2, 0xa2) AM_MIRROR(0x0c) AM_DEVREAD("ay8910", ay8910_device, data_r) | |
| 1473 | 1473 | AM_RANGE(0xa3, 0xa3) AM_MIRROR(0x0c) AM_NOP |
| 1474 | 1474 | |
| 1475 | 1475 | AM_RANGE(0xb0, 0xb0) AM_MIRROR(0x0f) AM_WRITE(pc6001m2_system_latch_w) |
| r22781 | r22782 | |
| 1510 | 1510 | |
| 1511 | 1511 | AM_RANGE(0x90, 0x93) AM_MIRROR(0x0c) AM_READWRITE(nec_ppi8255_r, necmk2_ppi8255_w) |
| 1512 | 1512 | |
| 1513 | AM_RANGE(0xa0, 0xa0) AM_MIRROR(0x0c) AM_DEVWRITE_LEGACY("ay8910", ay8910_address_w) | |
| 1514 | AM_RANGE(0xa1, 0xa1) AM_MIRROR(0x0c) AM_DEVWRITE_LEGACY("ay8910", ay8910_data_w) | |
| 1515 | AM_RANGE(0xa2, 0xa2) AM_MIRROR(0x0c) AM_DEVREAD_LEGACY("ay8910", ay8910_r) | |
| 1513 | AM_RANGE(0xa0, 0xa0) AM_MIRROR(0x0c) AM_DEVWRITE("ay8910", ay8910_device, address_w) | |
| 1514 | AM_RANGE(0xa1, 0xa1) AM_MIRROR(0x0c) AM_DEVWRITE("ay8910", ay8910_device, data_w) | |
| 1515 | AM_RANGE(0xa2, 0xa2) AM_MIRROR(0x0c) AM_DEVREAD("ay8910", ay8910_device, data_r) | |
| 1516 | 1516 | AM_RANGE(0xa3, 0xa3) AM_MIRROR(0x0c) AM_NOP |
| 1517 | 1517 | |
| 1518 | 1518 | AM_RANGE(0xb0, 0xb0) AM_WRITE(pc6001m2_system_latch_w) |
| r22781 | r22782 | |
| 1711 | 1711 | |
| 1712 | 1712 | AM_RANGE(0x90, 0x93) AM_MIRROR(0x0c) AM_READWRITE(nec_ppi8255_r, necsr_ppi8255_w) |
| 1713 | 1713 | |
| 1714 | AM_RANGE(0xa0, 0xa0) AM_MIRROR(0x0c) AM_DEVWRITE_LEGACY("ay8910", ay8910_address_w) | |
| 1715 | AM_RANGE(0xa1, 0xa1) AM_MIRROR(0x0c) AM_DEVWRITE_LEGACY("ay8910", ay8910_data_w) | |
| 1716 | AM_RANGE(0xa2, 0xa2) AM_MIRROR(0x0c) AM_DEVREAD_LEGACY("ay8910", ay8910_r) | |
| 1714 | AM_RANGE(0xa0, 0xa0) AM_MIRROR(0x0c) AM_DEVWRITE("ay8910", ay8910_device, address_w) | |
| 1715 | AM_RANGE(0xa1, 0xa1) AM_MIRROR(0x0c) AM_DEVWRITE("ay8910", ay8910_device, data_w) | |
| 1716 | AM_RANGE(0xa2, 0xa2) AM_MIRROR(0x0c) AM_DEVREAD("ay8910", ay8910_device, data_r) | |
| 1717 | 1717 | AM_RANGE(0xa3, 0xa3) AM_MIRROR(0x0c) AM_NOP |
| 1718 | 1718 | |
| 1719 | 1719 | AM_RANGE(0xb0, 0xb0) AM_WRITE(pc6001sr_system_latch_w) |
| r22781 | r22782 | |
|---|---|---|
| 49 | 49 | AM_RANGE( 0x81, 0x81) AM_DEVWRITE( "tms9928a", tms9928a_device, register_write ) |
| 50 | 50 | AM_RANGE( 0x84, 0x84) AM_DEVREAD( "tms9928a", tms9928a_device, vram_read ) |
| 51 | 51 | AM_RANGE( 0x85, 0x85) AM_DEVREAD( "tms9928a", tms9928a_device, register_read ) |
| 52 | AM_RANGE( 0x88, 0x88) AM_DEVWRITE_LEGACY("ay8910", ay8910_address_w ) | |
| 53 | AM_RANGE( 0x8c, 0x8c) AM_DEVWRITE_LEGACY("ay8910", ay8910_data_w ) | |
| 54 | AM_RANGE( 0x90, 0x90) AM_DEVREAD_LEGACY("ay8910", ay8910_r ) | |
| 52 | AM_RANGE( 0x88, 0x88) AM_DEVWRITE("ay8910", ay8910_device, address_w ) | |
| 53 | AM_RANGE( 0x8c, 0x8c) AM_DEVWRITE("ay8910", ay8910_device, data_w ) | |
| 54 | AM_RANGE( 0x90, 0x90) AM_DEVREAD("ay8910", ay8910_device, data_r ) | |
| 55 | 55 | AM_RANGE( 0x96, 0x97) AM_WRITE(svi318_ppi_w) |
| 56 | 56 | AM_RANGE( 0x98, 0x9a) AM_DEVREAD("ppi8255", i8255_device, read) |
| 57 | 57 | ADDRESS_MAP_END |
| r22781 | r22782 | |
| 64 | 64 | AM_RANGE( 0x81, 0x81) AM_DEVWRITE( "tms9928a", tms9928a_device, register_write ) |
| 65 | 65 | AM_RANGE( 0x84, 0x84) AM_DEVREAD( "tms9928a", tms9928a_device, vram_read ) |
| 66 | 66 | AM_RANGE( 0x85, 0x85) AM_DEVREAD( "tms9928a", tms9928a_device, register_read ) |
| 67 | AM_RANGE( 0x88, 0x88) AM_DEVWRITE_LEGACY("ay8910", ay8910_address_w ) | |
| 68 | AM_RANGE( 0x8c, 0x8c) AM_DEVWRITE_LEGACY("ay8910", ay8910_data_w ) | |
| 69 | AM_RANGE( 0x90, 0x90) AM_DEVREAD_LEGACY("ay8910", ay8910_r ) | |
| 67 | AM_RANGE( 0x88, 0x88) AM_DEVWRITE("ay8910", ay8910_device, address_w ) | |
| 68 | AM_RANGE( 0x8c, 0x8c) AM_DEVWRITE("ay8910", ay8910_device, data_w ) | |
| 69 | AM_RANGE( 0x90, 0x90) AM_DEVREAD("ay8910", ay8910_device, data_r ) | |
| 70 | 70 | AM_RANGE( 0x96, 0x97) AM_WRITE(svi318_ppi_w) |
| 71 | 71 | AM_RANGE( 0x98, 0x9a) AM_DEVREAD("ppi8255", i8255_device, read) |
| 72 | 72 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 135 | 135 | AM_RANGE(0x86, 0x86) AM_READ_PORT("KEY6") |
| 136 | 136 | AM_RANGE(0x87, 0x87) AM_READ_PORT("KEY7") |
| 137 | 137 | AM_RANGE(0x88, 0x88) AM_READ_PORT("KEY8") |
| 138 | AM_RANGE(0xc0, 0xc0) AM_DEVWRITE_LEGACY(AY8910_TAG, ay8910_address_w) | |
| 139 | AM_RANGE(0xc1, 0xc1) AM_DEVREADWRITE_LEGACY(AY8910_TAG, ay8910_r, ay8910_data_w) | |
| 138 | AM_RANGE(0xc0, 0xc0) AM_DEVWRITE(AY8910_TAG, ay8910_device, address_w) | |
| 139 | AM_RANGE(0xc1, 0xc1) AM_DEVREADWRITE(AY8910_TAG, ay8910_device, data_r, data_w) | |
| 140 | 140 | ADDRESS_MAP_END |
| 141 | 141 | |
| 142 | 142 | /* Input Ports */ |
| r22781 | r22782 | |
|---|---|---|
| 128 | 128 | AM_RANGE(0x2000, 0x3fff) AM_READWRITE(spc1000_gmode_r, spc1000_gmode_w) |
| 129 | 129 | AM_RANGE(0x8000, 0x8009) AM_READ(spc1000_keyboard_r) |
| 130 | 130 | AM_RANGE(0xA000, 0xA000) AM_READWRITE(spc1000_iplk_r, spc1000_iplk_w) |
| 131 | AM_RANGE(0x4000, 0x4000) AM_DEVWRITE_LEGACY("ay8910", ay8910_address_w) | |
| 132 | AM_RANGE(0x4001, 0x4001) AM_DEVREADWRITE_LEGACY("ay8910", ay8910_r, ay8910_data_w) | |
| 131 | AM_RANGE(0x4000, 0x4000) AM_DEVWRITE("ay8910", ay8910_device, address_w) | |
| 132 | AM_RANGE(0x4001, 0x4001) AM_DEVREADWRITE("ay8910", ay8910_device, data_r, data_w) | |
| 133 | 133 | ADDRESS_MAP_END |
| 134 | 134 | |
| 135 | 135 | /* Input ports */ |
| r22781 | r22782 | |
|---|---|---|
| 1212 | 1212 | AM_RANGE(0xff8604, 0xff8605) AM_READWRITE(fdc_data_r, fdc_data_w) |
| 1213 | 1213 | AM_RANGE(0xff8606, 0xff8607) AM_READWRITE(dma_status_r, dma_mode_w) |
| 1214 | 1214 | AM_RANGE(0xff8608, 0xff860d) AM_READWRITE8(dma_counter_r, dma_base_w, 0x00ff) |
| 1215 | AM_RANGE(0xff8800, 0xff8801) AM_DEVREADWRITE8_LEGACY(YM2149_TAG, ay8910_r, ay8910_address_w, 0xff00) AM_MIRROR(0xfc) | |
| 1216 | AM_RANGE(0xff8802, 0xff8803) AM_DEVREADWRITE8_LEGACY(YM2149_TAG, ay8910_r, ay8910_data_w, 0xff00) AM_MIRROR(0xfc) | |
| 1215 | AM_RANGE(0xff8800, 0xff8801) AM_DEVREADWRITE8(YM2149_TAG, ay8910_device, data_r, address_w, 0xff00) AM_MIRROR(0xfc) | |
| 1216 | AM_RANGE(0xff8802, 0xff8803) AM_DEVREADWRITE8(YM2149_TAG, ay8910_device, data_r, data_w, 0xff00) AM_MIRROR(0xfc) | |
| 1217 | 1217 | #if 0 |
| 1218 | 1218 | AM_RANGE(0xff8a00, 0xff8a1f) AM_READWRITE(blitter_halftone_r, blitter_halftone_w) |
| 1219 | 1219 | AM_RANGE(0xff8a20, 0xff8a21) AM_READWRITE(blitter_src_inc_x_r, blitter_src_inc_x_w) |
| r22781 | r22782 | |
| 1257 | 1257 | AM_RANGE(0xff8604, 0xff8605) AM_READWRITE(fdc_data_r, fdc_data_w) |
| 1258 | 1258 | AM_RANGE(0xff8606, 0xff8607) AM_READWRITE(dma_status_r, dma_mode_w) |
| 1259 | 1259 | AM_RANGE(0xff8608, 0xff860d) AM_READWRITE8(dma_counter_r, dma_base_w, 0x00ff) |
| 1260 | AM_RANGE(0xff8800, 0xff8801) AM_DEVREADWRITE8_LEGACY(YM2149_TAG, ay8910_r, ay8910_address_w, 0xff00) | |
| 1261 | AM_RANGE(0xff8802, 0xff8803) AM_DEVWRITE8_LEGACY(YM2149_TAG, ay8910_data_w, 0xff00) | |
| 1260 | AM_RANGE(0xff8800, 0xff8801) AM_DEVREADWRITE8(YM2149_TAG, ay8910_device, data_r, address_w, 0xff00) | |
| 1261 | AM_RANGE(0xff8802, 0xff8803) AM_DEVWRITE8(YM2149_TAG, ay8910_device, data_w, 0xff00) | |
| 1262 | 1262 | AM_RANGE(0xff8a00, 0xff8a1f) AM_READWRITE(blitter_halftone_r, blitter_halftone_w) |
| 1263 | 1263 | AM_RANGE(0xff8a20, 0xff8a21) AM_READWRITE(blitter_src_inc_x_r, blitter_src_inc_x_w) |
| 1264 | 1264 | AM_RANGE(0xff8a22, 0xff8a23) AM_READWRITE(blitter_src_inc_y_r, blitter_src_inc_y_w) |
| r22781 | r22782 | |
| 1382 | 1382 | AM_RANGE(0xff8260, 0xff8261) AM_READWRITE8(stbook_shifter_mode_r, stbook_shifter_mode_w, 0xff00) |
| 1383 | 1383 | AM_RANGE(0xff8264, 0xff8265) AM_READWRITE(stbook_shifter_pixelofs_r, stbook_shifter_pixelofs_w) |
| 1384 | 1384 | AM_RANGE(0xff827e, 0xff827f) AM_WRITE(lcd_control_w)*/ |
| 1385 | AM_RANGE(0xff8800, 0xff8801) AM_DEVREADWRITE8_LEGACY(YM3439_TAG, ay8910_r, ay8910_address_w, 0xff00) | |
| 1386 | AM_RANGE(0xff8802, 0xff8803) AM_DEVWRITE8_LEGACY(YM3439_TAG, ay8910_data_w, 0xff00) | |
| 1385 | AM_RANGE(0xff8800, 0xff8801) AM_DEVREADWRITE8(YM3439_TAG, ay8910_device, data_r, address_w, 0xff00) | |
| 1386 | AM_RANGE(0xff8802, 0xff8803) AM_DEVWRITE8(YM3439_TAG, ay8910_device, data_w, 0xff00) | |
| 1387 | 1387 | /* AM_RANGE(0xff8900, 0xff8901) AM_READWRITE8(sound_dma_control_r, sound_dma_control_w, 0x00ff) |
| 1388 | 1388 | AM_RANGE(0xff8902, 0xff8907) AM_READWRITE8(sound_dma_base_r, sound_dma_base_w, 0x00ff) |
| 1389 | 1389 | AM_RANGE(0xff8908, 0xff890d) AM_READ8(sound_dma_counter_r, 0x00ff) |
| r22781 | r22782 | |
|---|---|---|
| 236 | 236 | AM_RANGE(0x007f, 0x007f) AM_READ(spectrum_port_7f_r) AM_MIRROR(0xff00) |
| 237 | 237 | AM_RANGE(0x00df, 0x00df) AM_READ(spectrum_port_df_r) AM_MIRROR(0xff00) |
| 238 | 238 | AM_RANGE(0x4000, 0x4000) AM_WRITE(spectrum_128_port_7ffd_w) AM_MIRROR(0x3ffd) |
| 239 | AM_RANGE(0x8000, 0x8000) AM_DEVWRITE_LEGACY("ay8912", ay8910_data_w) AM_MIRROR(0x3ffd) | |
| 240 | AM_RANGE(0xc000, 0xc000) AM_DEVREADWRITE_LEGACY("ay8912", ay8910_r, ay8910_address_w) AM_MIRROR(0x3ffd) | |
| 239 | AM_RANGE(0x8000, 0x8000) AM_DEVWRITE("ay8912", ay8910_device, data_w) AM_MIRROR(0x3ffd) | |
| 240 | AM_RANGE(0xc000, 0xc000) AM_DEVREADWRITE("ay8912", ay8910_device, data_r, address_w) AM_MIRROR(0x3ffd) | |
| 241 | 241 | AM_RANGE(0x0001, 0x0001) AM_READ(spectrum_128_ula_r) AM_MIRROR(0xfffe) |
| 242 | 242 | ADDRESS_MAP_END |
| 243 | 243 |
| r22781 | r22782 | |
|---|---|---|
| 824 | 824 | break; |
| 825 | 825 | case 0x01: |
| 826 | 826 | // Data read |
| 827 | m_psg_data = | |
| 827 | m_psg_data = m_psg->data_r(space, 0); | |
| 828 | 828 | break; |
| 829 | 829 | case 0x02: |
| 830 | 830 | // Data write |
| 831 | | |
| 831 | m_psg->data_w(space, 0,m_psg_data); | |
| 832 | 832 | break; |
| 833 | 833 | case 0x03: |
| 834 | 834 | // Address latch |
| 835 | | |
| 835 | m_psg->address_w(space, 0,m_psg_data); | |
| 836 | 836 | break; |
| 837 | 837 | } |
| 838 | 838 | } |
| r22781 | r22782 | |
|---|---|---|
| 208 | 208 | |
| 209 | 209 | static ADDRESS_MAP_START( aquarius_io, AS_IO, 8, aquarius_state ) |
| 210 | 210 | // AM_RANGE(0x7e, 0x7f) AM_MIRROR(0xff00) AM_READWRITE(modem_r, modem_w) |
| 211 | AM_RANGE(0xf6, 0xf6) AM_MIRROR(0xff00) AM_DEVREADWRITE_LEGACY("ay8910", ay8910_r, ay8910_data_w) | |
| 212 | AM_RANGE(0xf7, 0xf7) AM_MIRROR(0xff00) AM_DEVWRITE_LEGACY("ay8910", ay8910_address_w) | |
| 211 | AM_RANGE(0xf6, 0xf6) AM_MIRROR(0xff00) AM_DEVREADWRITE("ay8910", ay8910_device, data_r, data_w) | |
| 212 | AM_RANGE(0xf7, 0xf7) AM_MIRROR(0xff00) AM_DEVWRITE("ay8910", ay8910_device, address_w) | |
| 213 | 213 | AM_RANGE(0xfc, 0xfc) AM_MIRROR(0xff00) AM_READWRITE(cassette_r, cassette_w) |
| 214 | 214 | AM_RANGE(0xfd, 0xfd) AM_MIRROR(0xff00) AM_READWRITE(vsync_r, mapper_w) |
| 215 | 215 | AM_RANGE(0xfe, 0xfe) AM_MIRROR(0xff00) AM_READWRITE(printer_r, printer_w) |
| r22781 | r22782 | |
|---|---|---|
| 273 | 273 | // AM_RANGE(0xff8246, 0xff8247) Buffer memory parity check |
| 274 | 274 | // AM_RANGE(0xff8248, 0xff8249) Buffer memory parity set/reset |
| 275 | 275 | AM_RANGE(0xff824a, 0xff824b) AM_READ(sync_r) |
| 276 | AM_RANGE(0xff83c0, 0xff83c1) AM_DEVWRITE8_LEGACY(AY8910_TAG, ay8910_address_w, 0xff00) | |
| 277 | AM_RANGE(0xff83c2, 0xff83c3) AM_DEVREAD8_LEGACY(AY8910_TAG, ay8910_r, 0xff00) | |
| 278 | AM_RANGE(0xff83c4, 0xff83c5) AM_DEVWRITE8_LEGACY(AY8910_TAG, ay8910_data_w, 0xff00) | |
| 276 | AM_RANGE(0xff83c0, 0xff83c1) AM_DEVWRITE8(AY8910_TAG, ay8910_device, address_w, 0xff00) | |
| 277 | AM_RANGE(0xff83c2, 0xff83c3) AM_DEVREAD8(AY8910_TAG, ay8910_device, data_r, 0xff00) | |
| 278 | AM_RANGE(0xff83c4, 0xff83c5) AM_DEVWRITE8(AY8910_TAG, ay8910_device, data_w, 0xff00) | |
| 279 | 279 | // AM_RANGE(0xff8500, 0xff8501) Disk DMA Command Register |
| 280 | 280 | // AM_RANGE(0xff8502, 0xff8503) Disk DMA Address Register |
| 281 | 281 | // AM_RANGE(0xff8507, 0xff8507) Disk DMA Control/Status Register |
| r22781 | r22782 | |
|---|---|---|
| 218 | 218 | AM_RANGE(0x0c, 0x0c) AM_MIRROR(0x03) AM_WRITE(video_mode_w) |
| 219 | 219 | AM_RANGE(0x10, 0x13) AM_DEVREADWRITE(FD1797_TAG, fd1797_t, read, write) |
| 220 | 220 | AM_RANGE(0x14, 0x14) AM_MIRROR(0x01) AM_WRITE(palette_w) |
| 221 | AM_RANGE(0x16, 0x16) AM_DEVWRITE_LEGACY(AY8912_TAG, ay8910_address_w) | |
| 222 | AM_RANGE(0x17, 0x17) AM_DEVREADWRITE_LEGACY(AY8912_TAG, ay8910_r, ay8910_data_w) | |
| 221 | AM_RANGE(0x16, 0x16) AM_DEVWRITE(AY8912_TAG, ay8910_device, address_w) | |
| 222 | AM_RANGE(0x17, 0x17) AM_DEVREADWRITE(AY8912_TAG, ay8910_device, data_r, data_w) | |
| 223 | 223 | AM_RANGE(0x18, 0x1b) AM_DEVREADWRITE(Z80CTC_TAG, z80ctc_device, read, write) |
| 224 | 224 | AM_RANGE(0x1c, 0x1c) AM_MIRROR(0x03) AM_WRITE(system_w) |
| 225 | 225 | AM_RANGE(0x20, 0x27) AM_NOP // winchester controller |
| r22781 | r22782 | |
|---|---|---|
| 138 | 138 | // AM_RANGE(0x10, 0x10) AM_DEVWRITE_LEGACY(MC6845_TAG, mc6845_address_w) |
| 139 | 139 | // AM_RANGE(0x11, 0x11) AM_DEVREADWRITE_LEGACY(MC6845_TAG, mc6845_register_r, mc6845_register_w) |
| 140 | 140 | AM_RANGE(0x12, 0x12) AM_WRITE(mc6845_ctrl_w) |
| 141 | AM_RANGE(0x20, 0x20) AM_DEVWRITE_LEGACY(AY8910_TAG, ay8910_address_w) | |
| 142 | AM_RANGE(0x40, 0x40) AM_DEVREAD_LEGACY(AY8910_TAG, ay8910_r) | |
| 143 | AM_RANGE(0x60, 0x60) AM_DEVWRITE_LEGACY(AY8910_TAG, ay8910_data_w) | |
| 141 | AM_RANGE(0x20, 0x20) AM_DEVWRITE(AY8910_TAG, ay8910_device, address_w) | |
| 142 | AM_RANGE(0x40, 0x40) AM_DEVREAD(AY8910_TAG, ay8910_device, data_r) | |
| 143 | AM_RANGE(0x60, 0x60) AM_DEVWRITE(AY8910_TAG, ay8910_device, data_w) | |
| 144 | 144 | AM_RANGE(0x80, 0x80) AM_WRITE(mc6847_attr_w) |
| 145 | 145 | ADDRESS_MAP_END |
| 146 | 146 |
| r22781 | r22782 | |
|---|---|---|
| 555 | 555 | AM_RANGE(0x7f, 0x7f) AM_READ(spectrum_port_7f_r ) AM_MIRROR(0xff00) |
| 556 | 556 | AM_RANGE(0xdf, 0xdf) AM_READ(spectrum_port_df_r ) AM_MIRROR(0xff00) |
| 557 | 557 | AM_RANGE(0xf4, 0xf4) AM_READWRITE(ts2068_port_f4_r,ts2068_port_f4_w ) AM_MIRROR(0xff00) |
| 558 | AM_RANGE(0xf5, 0xf5) AM_DEVWRITE_LEGACY("ay8912", ay8910_address_w ) AM_MIRROR(0xff00) | |
| 559 | AM_RANGE(0xf6, 0xf6) AM_DEVREADWRITE_LEGACY("ay8912", ay8910_r, ay8910_data_w ) AM_MIRROR(0xff00) | |
| 558 | AM_RANGE(0xf5, 0xf5) AM_DEVWRITE("ay8912", ay8910_device, address_w ) AM_MIRROR(0xff00) | |
| 559 | AM_RANGE(0xf6, 0xf6) AM_DEVREADWRITE("ay8912", ay8910_device, data_r, data_w ) AM_MIRROR(0xff00) | |
| 560 | 560 | AM_RANGE(0xfe, 0xfe) AM_READWRITE(spectrum_port_fe_r,spectrum_port_fe_w ) AM_MIRROR(0xff00) AM_MASK(0xffff) |
| 561 | 561 | AM_RANGE(0xff, 0xff) AM_READWRITE(ts2068_port_ff_r,ts2068_port_ff_w ) AM_MIRROR(0xff00) |
| 562 | 562 | ADDRESS_MAP_END |
| r22781 | r22782 | |
|---|---|---|
| 320 | 320 | AM_RANGE(0x00fe, 0x00fe) AM_READWRITE(spectrum_port_fe_r,spectrum_port_fe_w) AM_MIRROR(0xff00) AM_MASK(0xffff) |
| 321 | 321 | AM_RANGE(0x00ff, 0x00ff) AM_DEVREADWRITE_LEGACY(BETA_DISK_TAG, betadisk_state_r, betadisk_param_w) AM_MIRROR(0xff00) |
| 322 | 322 | AM_RANGE(0x4000, 0x4000) AM_WRITE(scorpion_port_7ffd_w) AM_MIRROR(0x3ffd) |
| 323 | AM_RANGE(0x8000, 0x8000) AM_DEVWRITE_LEGACY("ay8912", ay8910_data_w) AM_MIRROR(0x3ffd) | |
| 324 | AM_RANGE(0xc000, 0xc000) AM_DEVREADWRITE_LEGACY("ay8912", ay8910_r, ay8910_address_w) AM_MIRROR(0x3ffd) | |
| 323 | AM_RANGE(0x8000, 0x8000) AM_DEVWRITE("ay8912", ay8910_device, data_w) AM_MIRROR(0x3ffd) | |
| 324 | AM_RANGE(0xc000, 0xc000) AM_DEVREADWRITE("ay8912", ay8910_device, data_r, address_w) AM_MIRROR(0x3ffd) | |
| 325 | 325 | AM_RANGE(0x1000, 0x1000) AM_WRITE(scorpion_port_1ffd_w) AM_MIRROR(0x0ffd) |
| 326 | 326 | ADDRESS_MAP_END |
| 327 | 327 |
| r22781 | r22782 | |
|---|---|---|
| 327 | 327 | } |
| 328 | 328 | } |
| 329 | 329 | |
| 330 | READ8_MEMBER(multi8_state::ay8912_0_r){ return ay8910_r(machine().device("aysnd"),space, 0); } | |
| 331 | READ8_MEMBER(multi8_state::ay8912_1_r){ return ay8910_r(machine().device("aysnd"),space, 1); } | |
| 330 | READ8_MEMBER(multi8_state::ay8912_0_r){ return machine().device<ay8910_device>("aysnd")->data_r(space, 0); } | |
| 331 | READ8_MEMBER(multi8_state::ay8912_1_r){ return machine().device<ay8910_device>("aysnd")->data_r(space, 1); } | |
| 332 | 332 | |
| 333 | 333 | READ8_MEMBER( multi8_state::multi8_kanji_r ) |
| 334 | 334 | { |
| r22781 | r22782 | |
| 352 | 352 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 353 | 353 | AM_RANGE(0x00, 0x00) AM_READ(key_input_r) AM_WRITENOP//keyboard |
| 354 | 354 | AM_RANGE(0x01, 0x01) AM_READ(key_status_r) AM_WRITENOP//keyboard |
| 355 | AM_RANGE(0x18, 0x19) AM_DEVWRITE | |
| 355 | AM_RANGE(0x18, 0x19) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) | |
| 356 | 356 | AM_RANGE(0x18, 0x18) AM_READ(ay8912_0_r) |
| 357 | 357 | AM_RANGE(0x1a, 0x1a) AM_READ(ay8912_1_r) |
| 358 | 358 | AM_RANGE(0x1c, 0x1d) AM_WRITE(multi8_6845_w) |
| r22781 | r22782 | |
|---|---|---|
| 54 | 54 | static ADDRESS_MAP_START( microtan_map, AS_PROGRAM, 8, microtan_state ) |
| 55 | 55 | AM_RANGE(0x0000, 0x01ff) AM_RAM |
| 56 | 56 | AM_RANGE(0x0200, 0x03ff) AM_RAM_WRITE(microtan_videoram_w) AM_SHARE("videoram") |
| 57 | AM_RANGE(0xbc00, 0xbc00) AM_DEVWRITE_LEGACY("ay8910.1", ay8910_address_w) | |
| 58 | AM_RANGE(0xbc01, 0xbc01) AM_DEVREADWRITE_LEGACY("ay8910.1", ay8910_r, ay8910_data_w) | |
| 59 | AM_RANGE(0xbc02, 0xbc02) AM_DEVWRITE_LEGACY("ay8910.2", ay8910_address_w) | |
| 60 | AM_RANGE(0xbc03, 0xbc03) AM_DEVREADWRITE_LEGACY("ay8910.2", ay8910_r, ay8910_data_w) | |
| 57 | AM_RANGE(0xbc00, 0xbc00) AM_DEVWRITE("ay8910.1", ay8910_device, address_w) | |
| 58 | AM_RANGE(0xbc01, 0xbc01) AM_DEVREADWRITE("ay8910.1", ay8910_device, data_r, data_w) | |
| 59 | AM_RANGE(0xbc02, 0xbc02) AM_DEVWRITE("ay8910.2", ay8910_device, address_w) | |
| 60 | AM_RANGE(0xbc03, 0xbc03) AM_DEVREADWRITE("ay8910.2", ay8910_device, data_r, data_w) | |
| 61 | 61 | AM_RANGE(0xbfc0, 0xbfcf) AM_DEVREADWRITE("via6522_0", via6522_device, read, write) |
| 62 | 62 | AM_RANGE(0xbfd0, 0xbfd3) AM_DEVREADWRITE("acia", mos6551_device, read, write) |
| 63 | 63 | AM_RANGE(0xbfe0, 0xbfef) AM_DEVREADWRITE("via6522_1", via6522_device, read, write) |
| r22781 | r22782 | |
|---|---|---|
| 475 | 475 | /* The I/O ports are decoded into 8 blocks using address lines A3 to A7 */ |
| 476 | 476 | static ADDRESS_MAP_START( einstein_io, AS_IO, 8, einstein_state ) |
| 477 | 477 | /* block 0, ay8910 psg */ |
| 478 | AM_RANGE(0x02, 0x02) AM_MIRROR(0xff04) AM_DEVREADWRITE_LEGACY(IC_I030, ay8910_r, ay8910_address_w) | |
| 479 | AM_RANGE(0x03, 0x03) AM_MIRROR(0xff04) AM_DEVWRITE_LEGACY(IC_I030, ay8910_data_w) | |
| 478 | AM_RANGE(0x02, 0x02) AM_MIRROR(0xff04) AM_DEVREADWRITE(IC_I030, ay8910_device, data_r, address_w) | |
| 479 | AM_RANGE(0x03, 0x03) AM_MIRROR(0xff04) AM_DEVWRITE(IC_I030, ay8910_device, data_w) | |
| 480 | 480 | /* block 1, tms9928a vdp */ |
| 481 | 481 | AM_RANGE(0x08, 0x08) AM_MIRROR(0xff06) AM_DEVREADWRITE("tms9929a", tms9929a_device, vram_read, vram_write) |
| 482 | 482 | AM_RANGE(0x09, 0x09) AM_MIRROR(0xff06) AM_DEVREADWRITE("tms9929a", tms9929a_device, register_read, register_write) |
| r22781 | r22782 | |
|---|---|---|
| 34 | 34 | static ADDRESS_MAP_START (galaxyp_io, AS_IO, 8, galaxy_state ) |
| 35 | 35 | ADDRESS_MAP_GLOBAL_MASK(0x01) |
| 36 | 36 | ADDRESS_MAP_UNMAP_HIGH |
| 37 | AM_RANGE(0xbe, 0xbe) AM_DEVWRITE_LEGACY("ay8910", ay8910_address_w) | |
| 38 | AM_RANGE(0xbf, 0xbf) AM_DEVWRITE_LEGACY("ay8910", ay8910_data_w) | |
| 37 | AM_RANGE(0xbe, 0xbe) AM_DEVWRITE("ay8910", ay8910_device, address_w) | |
| 38 | AM_RANGE(0xbf, 0xbf) AM_DEVWRITE("ay8910", ay8910_device, data_w) | |
| 39 | 39 | ADDRESS_MAP_END |
| 40 | 40 | |
| 41 | 41 |
| r22781 | r22782 | |
|---|---|---|
| 347 | 347 | AM_RANGE(0x83, 0x83) AM_MIRROR(0xff38) AM_READWRITE(pio_bd_r, pio_bd_w) |
| 348 | 348 | AM_RANGE(0x85, 0x85) AM_MIRROR(0xff38) AM_READWRITE(pio_ac_r, pio_ac_w) |
| 349 | 349 | AM_RANGE(0x87, 0x87) AM_MIRROR(0xff38) AM_READWRITE(pio_bc_r, pio_bc_w) |
| 350 | AM_RANGE(0xfd, 0xfd) AM_MIRROR(0xff00) AM_DEVWRITE_LEGACY(AY8910_TAG, ay8910_address_w) | |
| 351 | AM_RANGE(0xff, 0xff) AM_MIRROR(0xff00) AM_DEVREADWRITE_LEGACY(AY8910_TAG, ay8910_r, ay8910_data_w) | |
| 350 | AM_RANGE(0xfd, 0xfd) AM_MIRROR(0xff00) AM_DEVWRITE(AY8910_TAG, ay8910_device, address_w) | |
| 351 | AM_RANGE(0xff, 0xff) AM_MIRROR(0xff00) AM_DEVREADWRITE(AY8910_TAG, ay8910_device, data_r, data_w) | |
| 352 | 352 | ADDRESS_MAP_END |
| 353 | 353 | |
| 354 | 354 |
| r22781 | r22782 | |
|---|---|---|
| 88 | 88 | AM_RANGE(0x0002, 0x0002) AM_READWRITE(a2_r,a2_w) |
| 89 | 89 | AM_RANGE(0x0003, 0xdfff) AM_RAM |
| 90 | 90 | AM_RANGE(0xE000, 0xE00F) AM_MIRROR(0x1f0) AM_DEVREADWRITE_LEGACY("cia6526", mos6526_r, mos6526_w) |
| 91 | AM_RANGE(0xE800, 0xE800) AM_MIRROR(0x1ff) AM_DEVWRITE_LEGACY("ay8910", ay8910_address_w) | |
| 92 | AM_RANGE(0xEA00, 0xEA00) AM_MIRROR(0x1ff) AM_DEVREADWRITE_LEGACY("ay8910", ay8910_r, ay8910_data_w) | |
| 91 | AM_RANGE(0xE800, 0xE800) AM_MIRROR(0x1ff) AM_DEVWRITE("ay8910", ay8910_device, address_w) | |
| 92 | AM_RANGE(0xEA00, 0xEA00) AM_MIRROR(0x1ff) AM_DEVREADWRITE("ay8910", ay8910_device, data_r, data_w) | |
| 93 | 93 | AM_RANGE(0xf000, 0xffff) AM_ROM |
| 94 | 94 | ADDRESS_MAP_END |
| 95 | 95 |
| r22781 | r22782 | |
|---|---|---|
| 61 | 61 | static ADDRESS_MAP_START (cgenie_io, AS_IO, 8, cgenie_state ) |
| 62 | 62 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 63 | 63 | AM_RANGE(0xf8, 0xf8) AM_READWRITE(cgenie_sh_control_port_r, cgenie_sh_control_port_w ) |
| 64 | AM_RANGE(0xf9, 0xf9) AM_DEVREADWRITE | |
| 64 | AM_RANGE(0xf9, 0xf9) AM_DEVREADWRITE("ay8910", ay8910_device, data_r, data_w) | |
| 65 | 65 | AM_RANGE(0xfa, 0xfa) AM_READWRITE(cgenie_index_r, cgenie_index_w ) |
| 66 | 66 | AM_RANGE(0xfb, 0xfb) AM_READWRITE(cgenie_register_r, cgenie_register_w ) |
| 67 | 67 | AM_RANGE(0xff, 0xff) AM_READWRITE(cgenie_port_ff_r, cgenie_port_ff_w ) |
| r22781 | r22782 | |
|---|---|---|
| 121 | 121 | AM_RANGE(0x00fe, 0x00fe) AM_READWRITE(spectrum_port_fe_r,spectrum_port_fe_w) AM_MIRROR(0xff00) AM_MASK(0xffff) |
| 122 | 122 | AM_RANGE(0x00ff, 0x00ff) AM_DEVREADWRITE_LEGACY(BETA_DISK_TAG, betadisk_state_r, betadisk_param_w) AM_MIRROR(0xff00) |
| 123 | 123 | AM_RANGE(0x4000, 0x4000) AM_WRITE(pentagon_port_7ffd_w) AM_MIRROR(0x3ffd) |
| 124 | AM_RANGE(0x8000, 0x8000) AM_DEVWRITE_LEGACY("ay8912", ay8910_data_w) AM_MIRROR(0x3ffd) | |
| 125 | AM_RANGE(0xc000, 0xc000) AM_DEVREADWRITE_LEGACY("ay8912", ay8910_r, ay8910_address_w) AM_MIRROR(0x3ffd) | |
| 124 | AM_RANGE(0x8000, 0x8000) AM_DEVWRITE("ay8912", ay8910_device, data_w) AM_MIRROR(0x3ffd) | |
| 125 | AM_RANGE(0xc000, 0xc000) AM_DEVREADWRITE("ay8912", ay8910_device, data_r, address_w) AM_MIRROR(0x3ffd) | |
| 126 | 126 | ADDRESS_MAP_END |
| 127 | 127 | |
| 128 | 128 | MACHINE_RESET_MEMBER(pentagon_state,pentagon) |
| r22781 | r22782 | |
|---|---|---|
| 714 | 714 | AM_RANGE(0x0000, 0x003f) AM_READWRITE( intv_stic_r, intv_stic_w ) |
| 715 | 715 | AM_RANGE(0x0080, 0x0081) AM_DEVREADWRITE_LEGACY("sp0256_speech", spb640_r, spb640_w ) /* Intellivoice */ |
| 716 | 716 | AM_RANGE(0x0100, 0x01ef) AM_READWRITE( intv_ram8_r, intv_ram8_w ) |
| 717 | AM_RANGE(0x01f0, 0x01ff) AM_DEVREADWRITE8 | |
| 717 | AM_RANGE(0x01f0, 0x01ff) AM_DEVREADWRITE8("ay8914.1", ay8914_device, read, write, 0x00ff ) | |
| 718 | 718 | AM_RANGE(0x0200, 0x035f) AM_READWRITE( intv_ram16_r, intv_ram16_w ) |
| 719 | 719 | AM_RANGE(0x1000, 0x1fff) AM_ROM AM_REGION("maincpu", 0x1000<<1) /* Exec ROM, 10-bits wide */ |
| 720 | 720 | AM_RANGE(0x3000, 0x37ff) AM_ROM AM_REGION("maincpu", 0x3000<<1) /* GROM, 8-bits wide */ |
| r22781 | r22782 | |
| 731 | 731 | AM_RANGE(0x0000, 0x003f) AM_READWRITE( intv_stic_r, intv_stic_w ) |
| 732 | 732 | AM_RANGE(0x0080, 0x0081) AM_DEVREADWRITE_LEGACY("sp0256_speech", spb640_r, spb640_w ) /* Intellivoice */ |
| 733 | 733 | AM_RANGE(0x0100, 0x01ef) AM_READWRITE( intv_ram8_r, intv_ram8_w ) |
| 734 | AM_RANGE(0x01f0, 0x01ff) AM_DEVREADWRITE8 | |
| 734 | AM_RANGE(0x01f0, 0x01ff) AM_DEVREADWRITE8("ay8914.1", ay8914_device, read, write, 0x00ff ) | |
| 735 | 735 | AM_RANGE(0x0200, 0x035f) AM_READWRITE( intv_ram16_r, intv_ram16_w ) |
| 736 | 736 | AM_RANGE(0x0400, 0x04ff) AM_ROM AM_REGION("maincpu", 0x400<<1) /* Exec ROM, 10-bits wide */ |
| 737 | 737 | AM_RANGE(0x1000, 0x1fff) AM_ROM AM_REGION("maincpu", 0x1000<<1) /* Exec ROM, 10-bits wide */ |
| r22781 | r22782 | |
| 749 | 749 | AM_RANGE(0x0000, 0x003f) AM_READWRITE( intv_stic_r, intv_stic_w ) |
| 750 | 750 | AM_RANGE(0x0080, 0x0081) AM_DEVREADWRITE_LEGACY("sp0256_speech", spb640_r, spb640_w ) /* Intellivoice */ |
| 751 | 751 | // AM_RANGE(0x00E0, 0x00E3) AM_READWRITE( intv_ecs_uart_r, intv_ecs_uart_w ) |
| 752 | AM_RANGE(0x00f0, 0x00ff) AM_DEVREADWRITE8 | |
| 752 | AM_RANGE(0x00f0, 0x00ff) AM_DEVREADWRITE8("ay8914.2", ay8914_device, read, write, 0x00ff ) /* ecs psg */ | |
| 753 | 753 | AM_RANGE(0x0100, 0x01ef) AM_READWRITE( intv_ram8_r, intv_ram8_w ) |
| 754 | AM_RANGE(0x01f0, 0x01ff) AM_DEVREADWRITE8 | |
| 754 | AM_RANGE(0x01f0, 0x01ff) AM_DEVREADWRITE8("ay8914.1", ay8914_device, read, write, 0x00ff ) | |
| 755 | 755 | AM_RANGE(0x0200, 0x035f) AM_READWRITE( intv_ram16_r, intv_ram16_w ) |
| 756 | 756 | AM_RANGE(0x1000, 0x1fff) AM_ROM AM_REGION("maincpu", 0x1000<<1) /* Exec ROM, 10-bits wide */ |
| 757 | 757 | AM_RANGE(0x2000, 0x2fff) AM_READ_BANK("bank1") AM_WRITE( ecs_bank1_page_select ); |
| r22781 | r22782 | |
| 773 | 773 | AM_RANGE(0x0000, 0x003f) AM_READWRITE( intv_stic_r, intv_stic_w ) |
| 774 | 774 | AM_RANGE(0x0080, 0x0081) AM_DEVREADWRITE_LEGACY("sp0256_speech", spb640_r, spb640_w ) /* Intellivoice */ |
| 775 | 775 | AM_RANGE(0x0100, 0x01ef) AM_READWRITE( intv_ram8_r, intv_ram8_w ) |
| 776 | AM_RANGE(0x01f0, 0x01ff) AM_DEVREADWRITE8 | |
| 776 | AM_RANGE(0x01f0, 0x01ff) AM_DEVREADWRITE8("ay8914.1", ay8914_device, read, write, 0x00ff ) | |
| 777 | 777 | AM_RANGE(0x0200, 0x035f) AM_READWRITE( intv_ram16_r, intv_ram16_w ) |
| 778 | 778 | AM_RANGE(0x1000, 0x1fff) AM_ROM AM_REGION("maincpu", 0x1000<<1) /* Exec ROM, 10-bits wide */ |
| 779 | 779 | AM_RANGE(0x3000, 0x37ff) AM_ROM AM_REGION("maincpu", 0x3000<<1) /* GROM, 8-bits wide */ |
| r22781 | r22782 | |
|---|---|---|
| 127 | 127 | AM_RANGE(0x00fe, 0x00fe) AM_READWRITE(spectrum_port_fe_r,spectrum_port_fe_w) AM_MIRROR(0xff00) AM_MASK(0xffff) |
| 128 | 128 | AM_RANGE(0x00ff, 0x00ff) AM_DEVREADWRITE_LEGACY(BETA_DISK_TAG, betadisk_state_r, betadisk_param_w) AM_MIRROR(0xff00) |
| 129 | 129 | AM_RANGE(0x4000, 0x4000) AM_WRITE(atm_port_7ffd_w) AM_MIRROR(0x3ffd) |
| 130 | AM_RANGE(0x8000, 0x8000) AM_DEVWRITE_LEGACY("ay8912", ay8910_data_w) AM_MIRROR(0x3ffd) | |
| 131 | AM_RANGE(0xc000, 0xc000) AM_DEVREADWRITE_LEGACY("ay8912", ay8910_r, ay8910_address_w) AM_MIRROR(0x3ffd) | |
| 130 | AM_RANGE(0x8000, 0x8000) AM_DEVWRITE("ay8912", ay8910_device, data_w) AM_MIRROR(0x3ffd) | |
| 131 | AM_RANGE(0xc000, 0xc000) AM_DEVREADWRITE("ay8912", ay8910_device, data_r, address_w) AM_MIRROR(0x3ffd) | |
| 132 | 132 | ADDRESS_MAP_END |
| 133 | 133 | |
| 134 | 134 | MACHINE_RESET_MEMBER(atm_state,atm) |
| r22781 | r22782 | |
|---|---|---|
| 326 | 326 | AM_RANGE(0x0000, 0x0000) AM_READWRITE(spectrum_port_fe_r,spectrum_port_fe_w) AM_MIRROR(0xfffe) AM_MASK(0xffff) |
| 327 | 327 | AM_RANGE(0x001f, 0x001f) AM_READ(spectrum_port_1f_r) AM_MIRROR(0xff00) |
| 328 | 328 | AM_RANGE(0x4000, 0x4000) AM_WRITE(spectrum_plus3_port_7ffd_w) AM_MIRROR(0x3ffd) |
| 329 | AM_RANGE(0x8000, 0x8000) AM_DEVWRITE_LEGACY("ay8912", ay8910_data_w) AM_MIRROR(0x3ffd) | |
| 330 | AM_RANGE(0xc000, 0xc000) AM_DEVREADWRITE_LEGACY("ay8912", ay8910_r, ay8910_address_w) AM_MIRROR(0x3ffd) | |
| 329 | AM_RANGE(0x8000, 0x8000) AM_DEVWRITE("ay8912", ay8910_device, data_w) AM_MIRROR(0x3ffd) | |
| 330 | AM_RANGE(0xc000, 0xc000) AM_DEVREADWRITE("ay8912", ay8910_device, data_r, address_w) AM_MIRROR(0x3ffd) | |
| 331 | 331 | AM_RANGE(0x1000, 0x1000) AM_WRITE(spectrum_plus3_port_1ffd_w) AM_MIRROR(0x0ffd) |
| 332 | 332 | AM_RANGE(0x2000, 0x2000) AM_READ(spectrum_plus3_port_2ffd_r) AM_MIRROR(0x0ffd) |
| 333 | 333 | AM_RANGE(0x3000, 0x3000) AM_READWRITE(spectrum_plus3_port_3ffd_r,spectrum_plus3_port_3ffd_w) AM_MIRROR(0x0ffd) |
| Previous | 199869 Revisions | Next |