From a440a8e0200a36491ae540f6f00beae59c148549 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Mon, 11 Feb 2013 07:44:56 +0000 Subject: Cleanups and version bump --- src/emu/cpu/arm7/arm7core.h | 12 +- src/emu/cpu/arm7/arm7drc.c | 742 ++++++++++----------- src/emu/cpu/arm7/arm7help.h | 126 ++-- src/emu/cpu/arm7/arm7tdrc.c | 258 ++++---- src/emu/cpu/cpu.mak | 2 +- src/emu/cpu/dsp16/dsp16.c | 86 +-- src/emu/cpu/dsp16/dsp16.h | 22 +- src/emu/cpu/dsp16/dsp16dis.c | 6 +- src/emu/cpu/dsp16/dsp16ops.c | 126 ++-- src/emu/cpu/es5510/es5510.c | 1288 ++++++++++++++++++------------------ src/emu/cpu/es5510/es5510.h | 314 ++++----- src/emu/cpu/lr35902/lr35902.h | 9 +- src/emu/cpu/m6502/m6502.h | 2 +- src/emu/cpu/mips/r3000.c | 156 ++--- src/emu/cpu/mips/r3000.h | 34 +- src/emu/cpu/scudsp/scudspdasm.c | 6 +- src/emu/cpu/sh2/sh2.c | 2 +- src/emu/cpu/sh2/sh2comn.c | 18 +- src/emu/cpu/sh2/sh2drc.c | 2 +- src/emu/cpu/sharc/sharcdsm.c | 2 +- src/emu/cpu/sm8500/sm8500.c | 1 - src/emu/cpu/sm8500/sm8500.h | 6 +- src/emu/debug/debugvw.c | 58 +- src/emu/debug/debugvw.h | 122 ++-- src/emu/debug/dvdisasm.c | 38 +- src/emu/debug/dvdisasm.h | 32 +- src/emu/debug/dvmemory.c | 82 +-- src/emu/debug/dvmemory.h | 46 +- src/emu/diimage.c | 4 +- src/emu/diimage.h | 4 +- src/emu/imagedev/midiin.c | 15 +- src/emu/imagedev/midiout.c | 3 +- src/emu/machine/mos6551.c | 20 +- src/emu/machine/mos6551.h | 10 +- src/emu/machine/n68681.c | 1 - src/emu/machine/s3c24xx.c | 2 +- src/emu/machine/wd_fdc.c | 4 +- src/emu/softlist.c | 2 +- src/emu/sound/digitalk.c | 47 +- src/emu/sound/digitalk.h | 2 +- src/emu/sound/flt_rc.c | 11 +- src/emu/sound/flt_rc.h | 6 +- src/emu/sound/flt_vol.c | 7 +- src/emu/sound/flt_vol.h | 4 +- src/emu/sound/iremga20.c | 8 +- src/emu/sound/iremga20.h | 6 +- src/emu/sound/k005289.c | 4 +- src/emu/sound/k005289.h | 8 +- src/emu/sound/k056800.c | 2 - src/emu/sound/n63701x.c | 9 +- src/emu/sound/n63701x.h | 14 +- src/emu/sound/spu.c | 4 +- src/emu/sound/t6721a.h | 2 +- src/emu/sound/tiaintf.c | 6 +- src/emu/sound/tiaintf.h | 4 +- src/emu/video/ef9340_1.c | 3 +- src/emu/video/ef9340_1.h | 8 +- src/emu/video/i8244.c | 35 +- src/emu/video/i8244.h | 33 +- src/emu/video/mc6845.h | 2 +- src/emu/video/pc_cga.c | 20 +- src/emu/video/tlc34076.c | 2 +- src/emu/video/tlc34076.h | 2 +- src/lib/formats/d64_dsk.c | 7 +- src/lib/formats/d81_dsk.c | 80 +-- src/lib/formats/flopimg.h | 6 +- src/lib/formats/g64_dsk.c | 4 +- src/lib/portmidi/readbinaryplist.c | 34 +- src/mame/drivers/4roses.c | 2 +- src/mame/drivers/5clown.c | 2 +- src/mame/drivers/albazg.c | 2 +- src/mame/drivers/amaticmg.c | 2 +- src/mame/drivers/aristmk4.c | 4 +- src/mame/drivers/atvtrack.c | 4 +- src/mame/drivers/avt.c | 2 +- src/mame/drivers/belatra.c | 2 +- src/mame/drivers/blitz.c | 2 +- src/mame/drivers/blitz68k.c | 6 +- src/mame/drivers/buster.c | 2 +- src/mame/drivers/calomega.c | 2 +- src/mame/drivers/carrera.c | 2 +- src/mame/drivers/ccastles.c | 1 - src/mame/drivers/chance32.c | 2 +- src/mame/drivers/cloud9.c | 1 - src/mame/drivers/coinmstr.c | 2 +- src/mame/drivers/coolridr.c | 6 +- src/mame/drivers/cps1.c | 8 +- src/mame/drivers/cps3.c | 1 - src/mame/drivers/dkong.c | 1 - src/mame/drivers/equites.c | 1 - src/mame/drivers/fcrash.c | 8 +- src/mame/drivers/flipjack.c | 2 +- src/mame/drivers/fortecar.c | 2 +- src/mame/drivers/fresh.c | 42 +- src/mame/drivers/funworld.c | 36 +- src/mame/drivers/ghosteo.c | 2 +- src/mame/drivers/goldnpkr.c | 2 +- src/mame/drivers/gticlub.c | 8 +- src/mame/drivers/highvdeo.c | 58 +- src/mame/drivers/hitpoker.c | 2 +- src/mame/drivers/igs_m036.c | 13 +- src/mame/drivers/imolagp.c | 24 +- src/mame/drivers/jaguar.c | 2 +- src/mame/drivers/jokrwild.c | 2 +- src/mame/drivers/jubilee.c | 2 +- src/mame/drivers/kingdrby.c | 2 +- src/mame/drivers/laserbas.c | 2 +- src/mame/drivers/lordgun.c | 12 +- src/mame/drivers/luckgrln.c | 2 +- src/mame/drivers/lucky74.c | 68 +- src/mame/drivers/lwings.c | 1 - src/mame/drivers/magicfly.c | 70 +- src/mame/drivers/majorpkr.c | 2 +- src/mame/drivers/merit.c | 2 +- src/mame/drivers/miniboy7.c | 2 +- src/mame/drivers/missile.c | 2 +- src/mame/drivers/mpu12wbk.c | 2 +- src/mame/drivers/mpu4dealem.c | 2 +- src/mame/drivers/murogem.c | 2 +- src/mame/drivers/namcops2.c | 8 +- src/mame/drivers/namcos22.c | 14 +- src/mame/drivers/nyny.c | 2 +- src/mame/drivers/othello.c | 2 +- src/mame/drivers/peplus.c | 2 +- src/mame/drivers/pgm.c | 2 +- src/mame/drivers/pgm2.c | 203 +++--- src/mame/drivers/progolf.c | 2 +- src/mame/drivers/r2dtank.c | 2 +- src/mame/drivers/rgum.c | 2 +- src/mame/drivers/sanremo.c | 78 +-- src/mame/drivers/skeetsht.c | 4 +- src/mame/drivers/slotcarn.c | 2 +- src/mame/drivers/snk6502.c | 2 +- src/mame/drivers/spbactn.c | 8 +- src/mame/drivers/speedatk.c | 2 +- src/mame/drivers/spiders.c | 2 +- src/mame/drivers/supercrd.c | 2 +- src/mame/drivers/taitosj.c | 2 +- src/mame/drivers/taitotz.c | 68 +- src/mame/drivers/tapatune.c | 2 +- src/mame/drivers/tmspoker.c | 2 +- src/mame/drivers/tp84.c | 2 +- src/mame/drivers/truco.c | 2 +- src/mame/drivers/usgames.c | 2 +- src/mame/drivers/vastar.c | 2 +- src/mame/drivers/vcombat.c | 2 +- src/mame/drivers/vlc.c | 6 +- src/mame/drivers/whitestar.c | 2 +- src/mame/drivers/wwfsstar.c | 8 +- src/mame/drivers/xexex.c | 2 +- src/mame/drivers/xtheball.c | 10 +- src/mame/drivers/zn.c | 2 +- src/mame/includes/20pacgal.h | 4 +- src/mame/includes/4enraya.h | 2 +- src/mame/includes/8080bw.h | 2 +- src/mame/includes/alpha68k.h | 2 - src/mame/includes/amiga.h | 2 +- src/mame/includes/armedf.h | 2 +- src/mame/includes/btime.h | 2 +- src/mame/includes/carpolo.h | 2 +- src/mame/includes/cps3.h | 2 +- src/mame/includes/deco32.h | 2 +- src/mame/includes/eolith.h | 2 +- src/mame/includes/galaga.h | 10 +- src/mame/includes/galaxian.h | 6 +- src/mame/includes/itech32.h | 1 - src/mame/includes/itech8.h | 2 +- src/mame/includes/ladybug.h | 2 +- src/mame/includes/n64.h | 2 +- src/mame/includes/stv.h | 5 +- src/mame/includes/tecmosys.h | 1 - src/mame/machine/amiga.c | 2 +- src/mame/machine/chaknpop.c | 1 - src/mame/machine/megadriv.c | 2 +- src/mame/machine/scudsp.c | 20 +- src/mame/machine/smpc.c | 6 +- src/mame/machine/snes7110.c | 8 +- src/mame/machine/snessdd1.c | 2 +- src/mame/machine/stvcd.c | 26 +- src/mame/machine/tecmosys.c | 2 +- src/mame/mame.lst | 38 +- src/mame/video/ccastles.c | 1 - src/mame/video/cchasm.c | 1 - src/mame/video/centiped.c | 1 - src/mame/video/cloud9.c | 1 - src/mame/video/cps1.c | 2 - src/mame/video/dday.c | 1 - src/mame/video/dkong.c | 2 - src/mame/video/fromanc2.c | 1 - src/mame/video/fromance.c | 1 - src/mame/video/galaga.c | 1 - src/mame/video/galaxold.c | 1 - src/mame/video/konicdev.c | 4 +- src/mame/video/lastduel.c | 1 - src/mame/video/lockon.c | 1 - src/mame/video/madalien.c | 2 +- src/mame/video/qix.c | 2 +- src/mame/video/redclash.c | 2 +- src/mame/video/spbactn.c | 2 +- src/mame/video/stvvdp1.c | 8 +- src/mame/video/stvvdp2.c | 36 +- src/mame/video/taitoic.c | 4 +- src/mame/video/tecmo_spr.c | 4 +- src/mame/video/tecmo_spr.h | 1 - src/mame/video/twincobr.c | 2 +- src/mess/drivers/apc.c | 14 +- src/mess/drivers/apple2.c | 4 +- src/mess/drivers/apple2gs.c | 195 +++--- src/mess/drivers/apricotp.c | 2 +- src/mess/drivers/aquarius.c | 2 +- src/mess/drivers/b16.c | 2 +- src/mess/drivers/binbug.c | 2 +- src/mess/drivers/bml3.c | 2 +- src/mess/drivers/c128.c | 4 +- src/mess/drivers/c64.c | 12 +- src/mess/drivers/cat.c | 42 +- src/mess/drivers/cbm2.c | 34 +- src/mess/drivers/clcd.c | 2 +- src/mess/drivers/esq1.c | 6 +- src/mess/drivers/esq5505.c | 134 ++-- src/mess/drivers/esqkt.c | 4 +- src/mess/drivers/fp1100.c | 2 +- src/mess/drivers/fp6000.c | 2 +- src/mess/drivers/gb.c | 2 +- src/mess/drivers/gba.c | 6 +- src/mess/drivers/m20.c | 2 +- src/mess/drivers/mac.c | 2 +- src/mess/drivers/megadriv.c | 14 +- src/mess/drivers/microvsn.c | 6 +- src/mess/drivers/multi16.c | 2 +- src/mess/drivers/multi8.c | 2 +- src/mess/drivers/myb3k.c | 2 +- src/mess/drivers/mycom.c | 22 +- src/mess/drivers/mz2500.c | 4 +- src/mess/drivers/odyssey2.c | 10 +- src/mess/drivers/paso1600.c | 2 +- src/mess/drivers/pasopia.c | 20 +- src/mess/drivers/pasopia7.c | 2 +- src/mess/drivers/pet.c | 10 +- src/mess/drivers/pet2001.c | 120 ++-- src/mess/drivers/plus4.c | 14 +- src/mess/drivers/portfoli.c | 6 +- src/mess/drivers/prof180x.c | 42 +- src/mess/drivers/prof80.c | 2 +- src/mess/drivers/sage2.c | 2 +- src/mess/drivers/smc777.c | 8 +- src/mess/drivers/super80.c | 16 +- src/mess/drivers/tek405x.c | 14 +- src/mess/drivers/ti89.c | 2 +- src/mess/drivers/tk80bs.c | 2 +- src/mess/drivers/tmc1800.c | 8 +- src/mess/drivers/tmc600.c | 2 +- src/mess/drivers/vboy.c | 17 +- src/mess/drivers/vic10.c | 4 +- src/mess/drivers/vidbrain.c | 2 +- src/mess/drivers/x1.c | 6 +- src/mess/drivers/x1twin.c | 20 +- src/mess/drivers/z100.c | 2 +- src/mess/includes/abc1600.h | 2 +- src/mess/includes/abc80x.h | 4 +- src/mess/includes/amstrad.h | 2 +- src/mess/includes/apple2.h | 2 +- src/mess/includes/apple2gs.h | 50 +- src/mess/includes/aquarius.h | 32 +- src/mess/includes/atarist.h | 4 +- src/mess/includes/cbm2.h | 2 +- src/mess/includes/gb.h | 8 +- src/mess/includes/md.h | 12 +- src/mess/includes/nes.h | 2 +- src/mess/includes/pc1512.h | 6 +- src/mess/includes/pcw16.h | 18 +- src/mess/includes/pet2001.h | 12 +- src/mess/includes/plus4.h | 4 +- src/mess/includes/portfoli.h | 2 +- src/mess/includes/psion.h | 2 +- src/mess/includes/sapi1.h | 2 +- src/mess/includes/tiki100.h | 2 +- src/mess/includes/trs80m2.h | 4 +- src/mess/includes/wangpc.h | 2 +- src/mess/machine/a2eauxslot.h | 2 +- src/mess/machine/a2eext80col.c | 1 - src/mess/machine/a2eext80col.h | 1 - src/mess/machine/a2eramworks3.c | 7 +- src/mess/machine/a2eramworks3.h | 1 - src/mess/machine/a2estd80col.c | 1 - src/mess/machine/a2estd80col.h | 3 +- src/mess/machine/a2midi.c | 23 +- src/mess/machine/a2ssc.c | 1 - src/mess/machine/a2videoterm.c | 2 +- src/mess/machine/a2vulcan.c | 124 ++-- src/mess/machine/amstrad.c | 4 +- src/mess/machine/apollo.c | 2 +- src/mess/machine/apple2.c | 4 +- src/mess/machine/apple2gs.c | 264 ++++---- src/mess/machine/ataricrt.c | 2 - src/mess/machine/ay3600.c | 4 +- src/mess/machine/c1581.c | 4 +- src/mess/machine/c64_fcc.c | 58 +- src/mess/machine/c64_magic_voice.c | 4 +- src/mess/machine/c64_magic_voice.h | 2 +- src/mess/machine/c64_sw8k.c | 2 +- src/mess/machine/c64_sw8k.h | 2 +- src/mess/machine/c64_swiftlink.c | 6 +- src/mess/machine/c64_turbo232.c | 6 +- src/mess/machine/c64_vizastar.c | 2 +- src/mess/machine/comxpl80.h | 2 +- src/mess/machine/ecb_grip.c | 2 +- src/mess/machine/gb.c | 3 +- src/mess/machine/gb_mbc.c | 57 +- src/mess/machine/gb_mbc.h | 36 +- src/mess/machine/gb_rom.c | 11 +- src/mess/machine/gb_rom.h | 28 +- src/mess/machine/gb_slot.c | 113 ++-- src/mess/machine/gb_slot.h | 18 +- src/mess/machine/isa_gus.c | 8 +- src/mess/machine/isa_sblaster.c | 29 +- src/mess/machine/kb_msnat.h | 2 +- src/mess/machine/lisa.c | 2 +- src/mess/machine/mac.c | 2 +- src/mess/machine/macadb.c | 2 +- src/mess/machine/md_eeprom.c | 71 +- src/mess/machine/md_eeprom.h | 30 +- src/mess/machine/md_jcart.c | 31 +- src/mess/machine/md_jcart.h | 10 +- src/mess/machine/md_rom.c | 118 ++-- src/mess/machine/md_rom.h | 136 ++-- src/mess/machine/md_sk.c | 17 +- src/mess/machine/md_sk.h | 6 +- src/mess/machine/md_slot.c | 289 ++++---- src/mess/machine/md_slot.h | 32 +- src/mess/machine/md_stm95.c | 13 +- src/mess/machine/md_stm95.h | 16 +- src/mess/machine/megasvp.c | 24 +- src/mess/machine/nes_mmc.c | 2 +- src/mess/machine/psxanalog.c | 1 - src/mess/machine/psxanalog.h | 2 +- src/mess/machine/psxcard.c | 1 - src/mess/machine/psxcard.h | 2 +- src/mess/machine/psxcd.c | 6 +- src/mess/machine/psxcport.h | 4 +- src/mess/machine/southbridge.c | 2 +- src/mess/machine/superpet.c | 30 +- src/mess/machine/terminal.c | 8 +- src/mess/machine/trs80m2kb.c | 262 ++++---- src/mess/machine/vcs_joybooster.h | 2 +- src/mess/machine/vcs_keypad.h | 2 +- src/mess/mess.lst | 2 +- src/mess/mess.mak | 4 +- src/mess/video/bbc.c | 32 +- src/mess/video/gb.c | 1 - src/mess/video/gime.c | 2 +- src/mess/video/isa_cga.c | 2 +- src/mess/video/isa_mda.c | 4 +- src/mess/video/mbc55x.c | 2 +- src/mess/video/mc6847.c | 18 +- src/mess/video/mos6566.c | 8 +- src/mess/video/pc_aga.c | 2 +- src/mess/video/pc_t1t.c | 4 +- src/osd/portmedia/pmmidi.c | 62 +- src/osd/sdl/debugqt.c | 8 +- src/osd/sdl/debugqtmainwindow.c | 532 +++++++-------- src/osd/sdl/debugqtview.c | 386 ++++++----- src/osd/sdl/debugqtview.h | 38 +- src/osd/sdl/debugqtwindow.h | 4 +- src/osd/sdl/sdlsocket.c | 10 +- src/osd/windows/d3dcomm.h | 4 +- src/osd/windows/d3dhlsl.c | 954 +++++++++++++------------- src/osd/windows/d3dhlsl.h | 42 +- src/osd/windows/drawd3d.c | 262 ++++---- src/osd/windows/drawd3d.h | 14 +- src/osd/windows/winmain.c | 18 +- src/osd/windows/winmain.h | 10 +- src/osd/windows/winsocket.c | 12 +- src/version.c | 2 +- 374 files changed, 5259 insertions(+), 5351 deletions(-) (limited to 'src') diff --git a/src/emu/cpu/arm7/arm7core.h b/src/emu/cpu/arm7/arm7core.h index 73dcd4d5593..8c803237065 100644 --- a/src/emu/cpu/arm7/arm7core.h +++ b/src/emu/cpu/arm7/arm7core.h @@ -93,7 +93,7 @@ enum }; /* Coprocessor-related macros */ -#define COPRO_TLB_BASE arm->tlbBase +#define COPRO_TLB_BASE arm->tlbBase #define COPRO_TLB_BASE_MASK 0xffffc000 #define COPRO_TLB_VADDR_FLTI_MASK 0xfff00000 #define COPRO_TLB_VADDR_FLTI_MASK_SHIFT 18 @@ -117,7 +117,7 @@ enum #define COPRO_TLB_SECTION_TABLE 2 #define COPRO_TLB_FINE_TABLE 3 -#define COPRO_CTRL arm->control +#define COPRO_CTRL arm->control #define COPRO_CTRL_MMU_EN 0x00000001 #define COPRO_CTRL_ADDRFAULT_EN 0x00000002 #define COPRO_CTRL_DCACHE_EN 0x00000004 @@ -143,12 +143,12 @@ enum #define COPRO_DOMAIN_ACCESS_CONTROL arm->domainAccessControl -#define COPRO_FAULT_STATUS_D arm->faultStatus[0] -#define COPRO_FAULT_STATUS_P arm->faultStatus[1] +#define COPRO_FAULT_STATUS_D arm->faultStatus[0] +#define COPRO_FAULT_STATUS_P arm->faultStatus[1] -#define COPRO_FAULT_ADDRESS arm->faultAddress +#define COPRO_FAULT_ADDRESS arm->faultAddress -#define COPRO_FCSE_PID arm->fcsePID +#define COPRO_FCSE_PID arm->fcsePID /* Coprocessor Registers */ #define ARM7COPRO_REGS \ diff --git a/src/emu/cpu/arm7/arm7drc.c b/src/emu/cpu/arm7/arm7drc.c index 858173f88a5..26ead621a2b 100644 --- a/src/emu/cpu/arm7/arm7drc.c +++ b/src/emu/cpu/arm7/arm7drc.c @@ -120,7 +120,7 @@ struct arm7imp_state /* core state */ drc_cache * cache; /* pointer to the DRC code cache */ drcuml_state * drcuml; /* DRC UML generator state */ - arm7_frontend * drcfe; /* pointer to the DRC front-end state */ + arm7_frontend * drcfe; /* pointer to the DRC front-end state */ UINT32 drcoptions; /* configurable DRC options */ /* internal stuff */ @@ -143,13 +143,13 @@ struct arm7imp_state code_handle * out_of_cycles; /* out of cycles exception handler */ code_handle * tlb_translate; /* tlb translation handler */ code_handle * detect_fault; /* tlb fault detection handler */ - code_handle * check_irq; /* irq check handler */ - code_handle * read8; /* read byte */ - code_handle * write8; /* write byte */ - code_handle * read16; /* read half */ - code_handle * write16; /* write half */ - code_handle * read32; /* read word */ - code_handle * write32; /* write word */ + code_handle * check_irq; /* irq check handler */ + code_handle * read8; /* read byte */ + code_handle * write8; /* write byte */ + code_handle * read16; /* read half */ + code_handle * write16; /* write half */ + code_handle * read32; /* read word */ + code_handle * write32; /* write word */ /* fast RAM */ UINT32 fastram_select; @@ -335,15 +335,15 @@ static void arm7_init(arm7_flavor flavor, int bigendian, legacy_cpu_device *devi { arm->impstate->drcuml->get_backend_info(beinfo); if (beinfo.direct_iregs > 4) - { // PC + { // PC arm->impstate->regmap[eR15] = I4; } if (beinfo.direct_iregs > 5) - { // Status + { // Status arm->impstate->regmap[eCPSR] = I5; } if (beinfo.direct_iregs > 6) - { // SP + { // SP arm->impstate->regmap[eR13] = I6; } } @@ -1340,8 +1340,8 @@ static void code_compile_block(arm_state *arm, UINT8 mode, offs_t pc) /* if the last instruction can change modes, use a variable mode; otherwise, assume the same mode */ /*if (seqlast->flags & OPFLAG_CAN_CHANGE_MODES) - UML_HASHJMP(block, mem(&arm->impstate->mode), nextpc, *arm->impstate->nocode); - // hashjmp ,nextpc,nocode + UML_HASHJMP(block, mem(&arm->impstate->mode), nextpc, *arm->impstate->nocode); + // hashjmp ,nextpc,nocode else*/ if (seqlast->next() == NULL || seqlast->next()->pc != nextpc) UML_HASHJMP(block, arm->impstate->mode, nextpc, *arm->impstate->nocode); // hashjmp ,nextpc,nocode @@ -1422,7 +1422,7 @@ static void static_generate_entry_point(arm_state *arm) alloc_handle(drcuml, &arm->impstate->tlb_translate, "tlb_translate"); alloc_handle(drcuml, &arm->impstate->entry, "entry"); - UML_HANDLE(block, *arm->impstate->entry); // handle entry + UML_HANDLE(block, *arm->impstate->entry); // handle entry /* load fast integer registers */ load_fast_iregs(arm, block); @@ -1430,7 +1430,7 @@ static void static_generate_entry_point(arm_state *arm) UML_CALLH(block, *arm->impstate->check_irq); /* generate a hash jump via the current mode and PC */ - UML_HASHJMP(block, 0, mem(&arm->pc), *arm->impstate->nocode); // hashjmp 0,,nocode + UML_HASHJMP(block, 0, mem(&arm->pc), *arm->impstate->nocode); // hashjmp 0,,nocode block->end(); } @@ -1458,7 +1458,7 @@ static void static_generate_check_irq(arm_state *arm) /* generate a hash jump via the current mode and PC */ alloc_handle(drcuml, &arm->impstate->check_irq, "check_irq"); - UML_HANDLE(block, *arm->impstate->check_irq); // handle check_irq + UML_HANDLE(block, *arm->impstate->check_irq); // handle check_irq /* Exception priorities: Reset @@ -1470,135 +1470,135 @@ static void static_generate_check_irq(arm_state *arm) Software Interrupt */ - UML_ADD(block, I0, mem(&R15), 4); // add i0, PC, 4 ;insn pc + UML_ADD(block, I0, mem(&R15), 4); // add i0, PC, 4 ;insn pc // Data Abort - UML_TEST(block, mem(&arm->pendingAbtD, 1); // test pendingAbtD, 1 - UML_JMPc(block, COND_Z, nodabt = label++); // jmpz nodabt - - UML_ROLINS(block, mem(&GET_CPSR), eARM7_MODE_ABT, 0, MODE_FLAG) // rolins CPSR, eARM7_MODE_ABT, 0, MODE_FLAG - UML_MOV(block, mem(&GET_REGISTER(arm, 14)), I0); // mov LR, i0 - UML_MOV(block, mem(&GET_REGISTER(arm, SPSR)), mem(&GET_CPSR)); // mov SPSR, CPSR - UML_OR(block, mem(&GET_CPSR), mem(&GET_CPSR), I_MASK); // or CPSR, CPSR, I_MASK - UML_ROLAND(block, mem(&GET_CPSR), mem(&GET_CPSR), 0, ~T_MASK); // roland CPSR, CPSR, 0, ~T_MASK - UML_MOV(block, mem(&R15), 0x00000010); // mov PC, 0x10 (Data Abort vector address) - UML_MOV(block, mem(&arm->pendingAbtD, 0); // mov pendingAbtD, 0 - UML_JMP(block, irqadjust = label++); // jmp irqadjust + UML_TEST(block, mem(&arm->pendingAbtD, 1); // test pendingAbtD, 1 + UML_JMPc(block, COND_Z, nodabt = label++); // jmpz nodabt + + UML_ROLINS(block, mem(&GET_CPSR), eARM7_MODE_ABT, 0, MODE_FLAG) // rolins CPSR, eARM7_MODE_ABT, 0, MODE_FLAG + UML_MOV(block, mem(&GET_REGISTER(arm, 14)), I0); // mov LR, i0 + UML_MOV(block, mem(&GET_REGISTER(arm, SPSR)), mem(&GET_CPSR)); // mov SPSR, CPSR + UML_OR(block, mem(&GET_CPSR), mem(&GET_CPSR), I_MASK); // or CPSR, CPSR, I_MASK + UML_ROLAND(block, mem(&GET_CPSR), mem(&GET_CPSR), 0, ~T_MASK); // roland CPSR, CPSR, 0, ~T_MASK + UML_MOV(block, mem(&R15), 0x00000010); // mov PC, 0x10 (Data Abort vector address) + UML_MOV(block, mem(&arm->pendingAbtD, 0); // mov pendingAbtD, 0 + UML_JMP(block, irqadjust = label++); // jmp irqadjust UML_LABEL(block, nodabt); // nodabt: // FIQ - UML_TEST(block, mem(&arm->pendingFiq, 1); // test pendingFiq, 1 - UML_JMPc(block, COND_Z, nofiq = label++); // jmpz nofiq - UML_TEST(block, mem(&GET_CPSR), F_MASK); // test CPSR, F_MASK - UML_JMPc(block, COND_Z, nofiq); // jmpz nofiq + UML_TEST(block, mem(&arm->pendingFiq, 1); // test pendingFiq, 1 + UML_JMPc(block, COND_Z, nofiq = label++); // jmpz nofiq + UML_TEST(block, mem(&GET_CPSR), F_MASK); // test CPSR, F_MASK + UML_JMPc(block, COND_Z, nofiq); // jmpz nofiq - UML_MOV(block, mem(&GET_REGISTER(arm, 14)), I0); // mov LR, i0 - UML_MOV(block, mem(&GET_REGISTER(arm, SPSR)), mem(&GET_CPSR)); // mov SPSR, CPSR - UML_OR(block, mem(&GET_CPSR), mem(&GET_CPSR), I_MASK | F_MASK); // or CPSR, CPSR, I_MASK | F_MASK - UML_ROLAND(block, mem(&GET_CPSR), mem(&CPSR), 0, ~T_MASK); // roland CPSR, CPSR, 0, ~T_MASK - UML_MOV(block, mem(&R15), 0x0000001c); // mov PC, 0x1c (FIQ vector address) - UML_MOV(block, mem(&arm->pendingFiq, 0); // mov pendingFiq, 0 - UML_JMP(block, irqadjust); // jmp irqadjust + UML_MOV(block, mem(&GET_REGISTER(arm, 14)), I0); // mov LR, i0 + UML_MOV(block, mem(&GET_REGISTER(arm, SPSR)), mem(&GET_CPSR)); // mov SPSR, CPSR + UML_OR(block, mem(&GET_CPSR), mem(&GET_CPSR), I_MASK | F_MASK); // or CPSR, CPSR, I_MASK | F_MASK + UML_ROLAND(block, mem(&GET_CPSR), mem(&CPSR), 0, ~T_MASK); // roland CPSR, CPSR, 0, ~T_MASK + UML_MOV(block, mem(&R15), 0x0000001c); // mov PC, 0x1c (FIQ vector address) + UML_MOV(block, mem(&arm->pendingFiq, 0); // mov pendingFiq, 0 + UML_JMP(block, irqadjust); // jmp irqadjust - UML_LABEL(block, nofiq); // nofiq: + UML_LABEL(block, nofiq); // nofiq: // IRQ - UML_TEST(block, mem(&arm->pendingIrq, 1); // test pendingIrq, 1 - UML_JMPc(block, COND_Z, noirq = label++); // jmpz noirq - UML_TEST(block, mem(&GET_CPSR), I_MASK); // test CPSR, I_MASK - UML_JMPc(block, COND_Z, noirq); // jmpz noirq - - UML_MOV(block, mem(&GET_REGISTER(arm, 14)), I0); // mov LR, i0 - UML_TEST(block, mem(&GET_CPSR), SR_MODE32); // test CPSR, MODE32 - UML_JMPc(block, COND_NZ, irq32 = label++); // jmpnz irq32 - UML_AND(block, I1, I0, 0xf4000000); // and i1, i0, 0xf4000000 - UML_OR(block, mem(&R15), I1, 0x0800001a); // or PC, i1, 0x0800001a - UML_AND(block, I1, mem(&GET_CPSR), 0x0fffff3f); // and i1, CPSR, 0x0fffff3f - UML_ROLAND(block, I0, mem(&R15), 32-20, 0x0000000c); // roland i0, R15, 32-20, 0x0000000c - UML_ROLINS(block, I0, mem(&R15), 0, 0xf0000000); // rolins i0, R15, 0, 0xf0000000 - UML_OR(block, mem(&GET_CPSR), I0, I1); // or CPSR, i0, i1 - UML_JMP(block, irqadjust); // jmp irqadjust - - UML_LABEL(block, irq32); // irq32: - UML_MOV(block, mem(&GET_REGISTER(arm, SPSR)), mem(&GET_CPSR)); // mov SPSR, CPSR - UML_OR(block, mem(&GET_CPSR), mem(&GET_CPSR), I_MASK); // or CPSR, CPSR, I_MASK - UML_ROLAND(block, mem(&GET_CPSR), mem(&CPSR), 0, ~T_MASK); // roland CPSR, CPSR, 0, ~T_MASK - UML_MOV(block, mem(&R15), 0x00000018); // mov PC, 0x18 (IRQ vector address) - - UML_JMP(block, irqadjust); // jmp irqadjust - - UML_LABEL(block, noirq); // noirq: + UML_TEST(block, mem(&arm->pendingIrq, 1); // test pendingIrq, 1 + UML_JMPc(block, COND_Z, noirq = label++); // jmpz noirq + UML_TEST(block, mem(&GET_CPSR), I_MASK); // test CPSR, I_MASK + UML_JMPc(block, COND_Z, noirq); // jmpz noirq + + UML_MOV(block, mem(&GET_REGISTER(arm, 14)), I0); // mov LR, i0 + UML_TEST(block, mem(&GET_CPSR), SR_MODE32); // test CPSR, MODE32 + UML_JMPc(block, COND_NZ, irq32 = label++); // jmpnz irq32 + UML_AND(block, I1, I0, 0xf4000000); // and i1, i0, 0xf4000000 + UML_OR(block, mem(&R15), I1, 0x0800001a); // or PC, i1, 0x0800001a + UML_AND(block, I1, mem(&GET_CPSR), 0x0fffff3f); // and i1, CPSR, 0x0fffff3f + UML_ROLAND(block, I0, mem(&R15), 32-20, 0x0000000c); // roland i0, R15, 32-20, 0x0000000c + UML_ROLINS(block, I0, mem(&R15), 0, 0xf0000000); // rolins i0, R15, 0, 0xf0000000 + UML_OR(block, mem(&GET_CPSR), I0, I1); // or CPSR, i0, i1 + UML_JMP(block, irqadjust); // jmp irqadjust + + UML_LABEL(block, irq32); // irq32: + UML_MOV(block, mem(&GET_REGISTER(arm, SPSR)), mem(&GET_CPSR)); // mov SPSR, CPSR + UML_OR(block, mem(&GET_CPSR), mem(&GET_CPSR), I_MASK); // or CPSR, CPSR, I_MASK + UML_ROLAND(block, mem(&GET_CPSR), mem(&CPSR), 0, ~T_MASK); // roland CPSR, CPSR, 0, ~T_MASK + UML_MOV(block, mem(&R15), 0x00000018); // mov PC, 0x18 (IRQ vector address) + + UML_JMP(block, irqadjust); // jmp irqadjust + + UML_LABEL(block, noirq); // noirq: // Prefetch Abort - UML_TEST(block, mem(&arm->pendingAbtP, 1); // test pendingAbtP, 1 - UML_JMPc(block, COND_Z, nopabt = label++); // jmpz nopabt - - UML_ROLINS(block, mem(&GET_CPSR), eARM7_MODE_ABT, 0, MODE_FLAG) // rolins CPSR, eARM7_MODE_ABT, 0, MODE_FLAG - UML_MOV(block, mem(&GET_REGISTER(arm, 14)), I0); // mov LR, i0 - UML_MOV(block, mem(&GET_REGISTER(arm, SPSR)), mem(&GET_CPSR)); // mov SPSR, CPSR - UML_OR(block, mem(&GET_CPSR), mem(&GET_CPSR), I_MASK); // or CPSR, CPSR, I_MASK - UML_ROLAND(block, mem(&GET_CPSR), mem(&CPSR), 0, ~T_MASK); // roland CPSR, CPSR, 0, ~T_MASK - UML_MOV(block, mem(&R15), 0x0000000c); // mov PC, 0x0c (Prefetch Abort vector address) - UML_MOV(block, mem(&arm->pendingAbtP, 0); // mov pendingAbtP, 0 - UML_JMP(block, irqadjust); // jmp irqadjust + UML_TEST(block, mem(&arm->pendingAbtP, 1); // test pendingAbtP, 1 + UML_JMPc(block, COND_Z, nopabt = label++); // jmpz nopabt + + UML_ROLINS(block, mem(&GET_CPSR), eARM7_MODE_ABT, 0, MODE_FLAG) // rolins CPSR, eARM7_MODE_ABT, 0, MODE_FLAG + UML_MOV(block, mem(&GET_REGISTER(arm, 14)), I0); // mov LR, i0 + UML_MOV(block, mem(&GET_REGISTER(arm, SPSR)), mem(&GET_CPSR)); // mov SPSR, CPSR + UML_OR(block, mem(&GET_CPSR), mem(&GET_CPSR), I_MASK); // or CPSR, CPSR, I_MASK + UML_ROLAND(block, mem(&GET_CPSR), mem(&CPSR), 0, ~T_MASK); // roland CPSR, CPSR, 0, ~T_MASK + UML_MOV(block, mem(&R15), 0x0000000c); // mov PC, 0x0c (Prefetch Abort vector address) + UML_MOV(block, mem(&arm->pendingAbtP, 0); // mov pendingAbtP, 0 + UML_JMP(block, irqadjust); // jmp irqadjust UML_LABEL(block, nopabt); // nopabt: // Undefined instruction - UML_TEST(block, mem(&arm->pendingUnd, 1); // test pendingUnd, 1 - UML_JMPc(block, COND_Z, nopabt = label++); // jmpz nound - - UML_ROLINS(block, mem(&GET_CPSR), eARM7_MODE_UND, 0, MODE_FLAG) // rolins CPSR, eARM7_MODE_UND, 0, MODE_FLAG - UML_MOV(block, I1, -4); // mov i1, -4 - UML_TEST(block, mem(&GET_CPSR), T_MASK); // test CPSR, T_MASK - UML_MOVc(block, COND_NZ, I1, -2); // movnz i1, -2 - UML_ADD(block, mem(&GET_REGISTER(arm, 14)), I0, I1); // add LR, i0, i1 - UML_MOV(block, mem(&GET_REGISTER(arm, SPSR)), mem(&GET_CPSR)); // mov SPSR, CPSR - UML_OR(block, mem(&GET_CPSR), mem(&GET_CPSR), I_MASK); // or CPSR, CPSR, I_MASK - UML_ROLAND(block, mem(&GET_CPSR), mem(&CPSR), 0, ~T_MASK); // roland CPSR, CPSR, 0, ~T_MASK - UML_MOV(block, mem(&R15), 0x00000004); // mov PC, 0x0c (Undefined Insn vector address) - UML_MOV(block, mem(&arm->pendingUnd, 0); // mov pendingUnd, 0 - UML_JMP(block, irqadjust); // jmp irqadjust + UML_TEST(block, mem(&arm->pendingUnd, 1); // test pendingUnd, 1 + UML_JMPc(block, COND_Z, nopabt = label++); // jmpz nound + + UML_ROLINS(block, mem(&GET_CPSR), eARM7_MODE_UND, 0, MODE_FLAG) // rolins CPSR, eARM7_MODE_UND, 0, MODE_FLAG + UML_MOV(block, I1, -4); // mov i1, -4 + UML_TEST(block, mem(&GET_CPSR), T_MASK); // test CPSR, T_MASK + UML_MOVc(block, COND_NZ, I1, -2); // movnz i1, -2 + UML_ADD(block, mem(&GET_REGISTER(arm, 14)), I0, I1); // add LR, i0, i1 + UML_MOV(block, mem(&GET_REGISTER(arm, SPSR)), mem(&GET_CPSR)); // mov SPSR, CPSR + UML_OR(block, mem(&GET_CPSR), mem(&GET_CPSR), I_MASK); // or CPSR, CPSR, I_MASK + UML_ROLAND(block, mem(&GET_CPSR), mem(&CPSR), 0, ~T_MASK); // roland CPSR, CPSR, 0, ~T_MASK + UML_MOV(block, mem(&R15), 0x00000004); // mov PC, 0x0c (Undefined Insn vector address) + UML_MOV(block, mem(&arm->pendingUnd, 0); // mov pendingUnd, 0 + UML_JMP(block, irqadjust); // jmp irqadjust UML_LABEL(block, nopabt); // nopabt: // Software Interrupt - UML_TEST(block, mem(&arm->pendingSwi, 1); // test pendingSwi, 1 - UML_JMPc(block, COND_Z, done = label++); // jmpz done - - UML_ROLINS(block, mem(&GET_CPSR), eARM7_MODE_SVC, 0, MODE_FLAG) // rolins CPSR, eARM7_MODE_SVC, 0, MODE_FLAG - UML_MOV(block, I1, -4); // mov i1, -4 - UML_TEST(block, mem(&GET_CPSR), T_MASK); // test CPSR, T_MASK - UML_MOVc(block, COND_NZ, I1, -2); // movnz i1, -2 - UML_ADD(block, mem(&GET_REGISTER(arm, 14)), I0, I1); // add LR, i0, i1 - - UML_TEST(block, mem(&GET_CPSR), SR_MODE32); // test CPSR, MODE32 - UML_JMPc(block, COND_NZ, swi32 = label++); // jmpnz swi32 - UML_AND(block, I1, I0, 0xf4000000); // and i1, i0, 0xf4000000 - UML_OR(block, mem(&R15), I1, 0x0800001b); // or PC, i1, 0x0800001b - UML_AND(block, I1, mem(&GET_CPSR), 0x0fffff3f); // and i1, CPSR, 0x0fffff3f - UML_ROLAND(block, I0, mem(&R15), 32-20, 0x0000000c); // roland i0, R15, 32-20, 0x0000000c - UML_ROLINS(block, I0, mem(&R15), 0, 0xf0000000); // rolins i0, R15, 0, 0xf0000000 - UML_OR(block, mem(&GET_CPSR), I0, I1); // or CPSR, i0, i1 - UML_MOV(block, mem(&arm->pendingSwi, 0); // mov pendingSwi, 0 - UML_JMP(block, irqadjust); // jmp irqadjust - - UML_LABEL(block, swi32); // irq32: - UML_MOV(block, mem(&GET_REGISTER(arm, SPSR)), mem(&GET_CPSR)); // mov SPSR, CPSR - UML_OR(block, mem(&GET_CPSR), mem(&GET_CPSR), I_MASK); // or CPSR, CPSR, I_MASK - UML_ROLAND(block, mem(&GET_CPSR), mem(&CPSR), 0, ~T_MASK); // roland CPSR, CPSR, 0, ~T_MASK - UML_MOV(block, mem(&R15), 0x00000008); // mov PC, 0x08 (SWI vector address) - UML_MOV(block, mem(&arm->pendingSwi, 0); // mov pendingSwi, 0 - UML_JMP(block, irqadjust); // jmp irqadjust - - UML_LABEL(block, irqadjust); // irqadjust: - UML_MOV(block, I1, 0); // mov i1, 0 - UML_TEST(block, mem(&COPRO_CTRL), COPRO_CTRL_MMU_EN | COPRO_CTRL_INTVEC_ADJUST); // test COPRO_CTRL, MMU_EN | INTVEC_ADJUST - UML_MOVc(block, COND_NZ, I1, 0xffff0000); // movnz i1, 0xffff0000 - UML_OR(block, mem(&R15), mem(R15), I1); // or PC, i1 - - UML_LABEL(block, done); // done: + UML_TEST(block, mem(&arm->pendingSwi, 1); // test pendingSwi, 1 + UML_JMPc(block, COND_Z, done = label++); // jmpz done + + UML_ROLINS(block, mem(&GET_CPSR), eARM7_MODE_SVC, 0, MODE_FLAG) // rolins CPSR, eARM7_MODE_SVC, 0, MODE_FLAG + UML_MOV(block, I1, -4); // mov i1, -4 + UML_TEST(block, mem(&GET_CPSR), T_MASK); // test CPSR, T_MASK + UML_MOVc(block, COND_NZ, I1, -2); // movnz i1, -2 + UML_ADD(block, mem(&GET_REGISTER(arm, 14)), I0, I1); // add LR, i0, i1 + + UML_TEST(block, mem(&GET_CPSR), SR_MODE32); // test CPSR, MODE32 + UML_JMPc(block, COND_NZ, swi32 = label++); // jmpnz swi32 + UML_AND(block, I1, I0, 0xf4000000); // and i1, i0, 0xf4000000 + UML_OR(block, mem(&R15), I1, 0x0800001b); // or PC, i1, 0x0800001b + UML_AND(block, I1, mem(&GET_CPSR), 0x0fffff3f); // and i1, CPSR, 0x0fffff3f + UML_ROLAND(block, I0, mem(&R15), 32-20, 0x0000000c); // roland i0, R15, 32-20, 0x0000000c + UML_ROLINS(block, I0, mem(&R15), 0, 0xf0000000); // rolins i0, R15, 0, 0xf0000000 + UML_OR(block, mem(&GET_CPSR), I0, I1); // or CPSR, i0, i1 + UML_MOV(block, mem(&arm->pendingSwi, 0); // mov pendingSwi, 0 + UML_JMP(block, irqadjust); // jmp irqadjust + + UML_LABEL(block, swi32); // irq32: + UML_MOV(block, mem(&GET_REGISTER(arm, SPSR)), mem(&GET_CPSR)); // mov SPSR, CPSR + UML_OR(block, mem(&GET_CPSR), mem(&GET_CPSR), I_MASK); // or CPSR, CPSR, I_MASK + UML_ROLAND(block, mem(&GET_CPSR), mem(&CPSR), 0, ~T_MASK); // roland CPSR, CPSR, 0, ~T_MASK + UML_MOV(block, mem(&R15), 0x00000008); // mov PC, 0x08 (SWI vector address) + UML_MOV(block, mem(&arm->pendingSwi, 0); // mov pendingSwi, 0 + UML_JMP(block, irqadjust); // jmp irqadjust + + UML_LABEL(block, irqadjust); // irqadjust: + UML_MOV(block, I1, 0); // mov i1, 0 + UML_TEST(block, mem(&COPRO_CTRL), COPRO_CTRL_MMU_EN | COPRO_CTRL_INTVEC_ADJUST); // test COPRO_CTRL, MMU_EN | INTVEC_ADJUST + UML_MOVc(block, COND_NZ, I1, 0xffff0000); // movnz i1, 0xffff0000 + UML_OR(block, mem(&R15), mem(R15), I1); // or PC, i1 + + UML_LABEL(block, done); // done: block->end(); }; @@ -1620,7 +1620,7 @@ static void static_generate_nocode_handler(arm_state *arm) alloc_handle(drcuml, &arm->impstate->nocode, "nocode"); UML_HANDLE(block, *arm->impstate->nocode); // handle nocode UML_GETEXP(block, I0); // getexp i0 - UML_MOV(block, mem(&R15), I0); // mov [pc],i0 + UML_MOV(block, mem(&R15), I0); // mov [pc],i0 save_fast_iregs(arm, block); UML_EXIT(block, EXECUTE_MISSING_CODE); // exit EXECUTE_MISSING_CODE @@ -1643,9 +1643,9 @@ static void static_generate_out_of_cycles(arm_state *arm) /* generate a hash jump via the current mode and PC */ alloc_handle(drcuml, &arm->impstate->out_of_cycles, "out_of_cycles"); - UML_HANDLE(block, *arm->impstate->out_of_cycles); // handle out_of_cycles + UML_HANDLE(block, *arm->impstate->out_of_cycles); // handle out_of_cycles UML_GETEXP(block, I0); // getexp i0 - UML_MOV(block, mem(&R15), I0); // mov ,i0 + UML_MOV(block, mem(&R15), I0); // mov ,i0 save_fast_iregs(arm, block); UML_EXIT(block, EXECUTE_OUT_OF_CYCLES); // exit EXECUTE_OUT_OF_CYCLES @@ -1672,63 +1672,63 @@ static void static_generate_detect_fault(arm_state *arm, code_handle **handleptr /* add a global entry for this */ alloc_handle(drcuml, &arm->impstate->detect_fault, "detect_fault"); - UML_HANDLE(block, *arm->impstate->detect_fault); // handle detect_fault + UML_HANDLE(block, *arm->impstate->detect_fault); // handle detect_fault - UML_ROLAND(block, I6, I4, 32-4, 0x0f<<1); // roland i6, i4, 32-4, 0xf<<1 - UML_ROLAND(block, I6, mem(&COPRO_DOMAIN_ACCESS_CONTROL), I6, 3);// roland i6, COPRO_DOMAIN_ACCESS_CONTROL, i6, 3 + UML_ROLAND(block, I6, I4, 32-4, 0x0f<<1); // roland i6, i4, 32-4, 0xf<<1 + UML_ROLAND(block, I6, mem(&COPRO_DOMAIN_ACCESS_CONTROL), I6, 3);// roland i6, COPRO_DOMAIN_ACCESS_CONTROL, i6, 3 // if permission == 3, FAULT_NONE - UML_CMP(block, I6, 3); // cmp i6, 3 - UML_MOVc(block, COND_E, I6, FAULT_NONE); // move i6, FAULT_NONE - UML_JMPc(block, COND_E, donefault = label++); // jmpe donefault + UML_CMP(block, I6, 3); // cmp i6, 3 + UML_MOVc(block, COND_E, I6, FAULT_NONE); // move i6, FAULT_NONE + UML_JMPc(block, COND_E, donefault = label++); // jmpe donefault // if permission == 0 || permission == 2, FAULT_DOMAIN - UML_CMP(block, I6, 1); // cmp i6, 1 - UML_MOVc(block, COND_NE, I6, FAULT_DOMAIN); // movne i6, FAULT_DOMAIN - UML_JMPc(block, COND_NE, donefault); // jmpne donefault + UML_CMP(block, I6, 1); // cmp i6, 1 + UML_MOVc(block, COND_NE, I6, FAULT_DOMAIN); // movne i6, FAULT_DOMAIN + UML_JMPc(block, COND_NE, donefault); // jmpne donefault // if permission == 1 - UML_CMP(block, I5, 3); // cmp i5, 3 - UML_MOVc(block, COND_E, I6, FAULT_NONE); // move i6, FAULT_NONE - UML_JMPc(block, COND_E, donefault); // jmpe donefault - UML_CMP(block, I5, 0); // cmp i5, 1 - UML_JMPc(block, COND_NE, checkuser = label++); // jmpne checkuser - UML_ROLAND(block, I6, mem(&COPRO_CTRL), // roland i6, COPRO_CTRL, 32 - COPRO_CTRL_SYSTEM_SHIFT, - 32 - COPRO_CTRL_SYSTEM_SHIFT, // COPRO_CTRL_SYSTEM | COPRO_CTRL_ROM + UML_CMP(block, I5, 3); // cmp i5, 3 + UML_MOVc(block, COND_E, I6, FAULT_NONE); // move i6, FAULT_NONE + UML_JMPc(block, COND_E, donefault); // jmpe donefault + UML_CMP(block, I5, 0); // cmp i5, 1 + UML_JMPc(block, COND_NE, checkuser = label++); // jmpne checkuser + UML_ROLAND(block, I6, mem(&COPRO_CTRL), // roland i6, COPRO_CTRL, 32 - COPRO_CTRL_SYSTEM_SHIFT, + 32 - COPRO_CTRL_SYSTEM_SHIFT, // COPRO_CTRL_SYSTEM | COPRO_CTRL_ROM COPRO_CTRL_SYSTEM | COPRO_CTRL_ROM); // if s == 0 && r == 0, FAULT_PERMISSION - UML_CMP(block, I6, 0); // cmp i6, 0 - UML_MOVc(block, COND_E, I6, FAULT_PERMISSION); // move i6, FAULT_PERMISSION - UML_JMPc(block, COND_E, donefault); // jmpe donefault + UML_CMP(block, I6, 0); // cmp i6, 0 + UML_MOVc(block, COND_E, I6, FAULT_PERMISSION); // move i6, FAULT_PERMISSION + UML_JMPc(block, COND_E, donefault); // jmpe donefault // if s == 1 && r == 1, FAULT_PERMISSION - UML_CMP(block, I6, 3); // cmp i6, 3 - UML_MOVc(block, COND_E, I6, FAULT_PERMISSION); // move i6, FAULT_PERMISSION - UML_JMPc(block, COND_E, donefault); // jmpe donefault + UML_CMP(block, I6, 3); // cmp i6, 3 + UML_MOVc(block, COND_E, I6, FAULT_PERMISSION); // move i6, FAULT_PERMISSION + UML_JMPc(block, COND_E, donefault); // jmpe donefault // if flags & TLB_WRITE, FAULT_PERMISSION - UML_TEST(block, I2, ARM7_TLB_WRITE); // test i2, ARM7_TLB_WRITE - UML_MOVc(block, COND_NZ, I6, FAULT_PERMISSION); // move i6, FAULT_PERMISSION - UML_JMPc(block, COND_NZ, donefault); // jmpe donefault + UML_TEST(block, I2, ARM7_TLB_WRITE); // test i2, ARM7_TLB_WRITE + UML_MOVc(block, COND_NZ, I6, FAULT_PERMISSION); // move i6, FAULT_PERMISSION + UML_JMPc(block, COND_NZ, donefault); // jmpe donefault // if r == 1 && s == 0, FAULT_NONE - UML_CMP(block, I6, 2); // cmp i6, 2 - UML_MOVc(block, COND_E, I6, FAULT_NONE); // move i6, FAULT_NONE - UML_JMPc(block, COND_E, donefault); // jmpe donefault - UML_AND(block, I6, mem(&GET_CPSR), MODE_FLAG); // and i6, GET_CPSR, MODE_FLAG - UML_CMP(block, I6, eARM7_MODE_USER); // cmp i6, eARM7_MODE_USER + UML_CMP(block, I6, 2); // cmp i6, 2 + UML_MOVc(block, COND_E, I6, FAULT_NONE); // move i6, FAULT_NONE + UML_JMPc(block, COND_E, donefault); // jmpe donefault + UML_AND(block, I6, mem(&GET_CPSR), MODE_FLAG); // and i6, GET_CPSR, MODE_FLAG + UML_CMP(block, I6, eARM7_MODE_USER); // cmp i6, eARM7_MODE_USER // if r == 0 && s == 1 && usermode, FAULT_PERMISSION - UML_MOVc(block, COND_E, I6, FAULT_PERMISSION); // move i6, FAULT_PERMISSION - UML_MOVc(block, COND_NE, I6, FAULT_NONE); // movne i6, FAULT_NONE - UML_JMP(block, donefault); // jmp donefault + UML_MOVc(block, COND_E, I6, FAULT_PERMISSION); // move i6, FAULT_PERMISSION + UML_MOVc(block, COND_NE, I6, FAULT_NONE); // movne i6, FAULT_NONE + UML_JMP(block, donefault); // jmp donefault - UML_LABEL(block, checkuser); // checkuser: + UML_LABEL(block, checkuser); // checkuser: // if !write, FAULT_NONE - UML_TEST(block, I2, ARM7_TLB_WRITE); // test i2, ARM7_TLB_WRITE - UML_MOVc(block, COND_Z, I6, FAULT_NONE); // movz i6, FAULT_NONE - UML_JMPc(block, COND_Z, donefault); // jmp donefault - UML_AND(block, I6, mem(&GET_CPSR), MODE_FLAG); // and i6, GET_CPSR, MODE_FLAG - UML_CMP(block, I6, eARM7_MODE_USER); // cmp i6, eARM7_MODE_USER - UML_MOVc(block, COND_E, I6, FAULT_PERMISSION); // move i6, FAULT_PERMISSION - UML_MOVc(block, COND_NE, I6, FAULT_NONE); // move i6, FAULT_NONE - - UML_LABEL(block, donefault); // donefault: - UML_RET(block); // ret + UML_TEST(block, I2, ARM7_TLB_WRITE); // test i2, ARM7_TLB_WRITE + UML_MOVc(block, COND_Z, I6, FAULT_NONE); // movz i6, FAULT_NONE + UML_JMPc(block, COND_Z, donefault); // jmp donefault + UML_AND(block, I6, mem(&GET_CPSR), MODE_FLAG); // and i6, GET_CPSR, MODE_FLAG + UML_CMP(block, I6, eARM7_MODE_USER); // cmp i6, eARM7_MODE_USER + UML_MOVc(block, COND_E, I6, FAULT_PERMISSION); // move i6, FAULT_PERMISSION + UML_MOVc(block, COND_NE, I6, FAULT_NONE); // move i6, FAULT_NONE + + UML_LABEL(block, donefault); // donefault: + UML_RET(block); // ret } /*------------------------------------------------------------------ @@ -1761,179 +1761,179 @@ static void static_generate_tlb_translate(arm_state *arm, code_handle **handlept block = drcuml->begin_block(170); alloc_handle(drcuml, &arm->impstate->tlb_translate, "tlb_translate"); - UML_HANDLE(block, *arm->impstate->tlb_translate); // handle tlb_translate + UML_HANDLE(block, *arm->impstate->tlb_translate); // handle tlb_translate // I3: vaddr - UML_CMP(block, I0, 32 * 1024 * 1024); // cmp i0, 32*1024*1024 - UML_JMPc(block, COND_GE, nopid = label++); // jmpge nopid - UML_AND(block, I3, mem(&COPRO_FCSE_PID), 0xfe000000); // and i3, COPRO_FCSE_PID, 0xfe000000 - UML_ADD(block, I3, I3, I0); // add i3, i3, i0 + UML_CMP(block, I0, 32 * 1024 * 1024); // cmp i0, 32*1024*1024 + UML_JMPc(block, COND_GE, nopid = label++); // jmpge nopid + UML_AND(block, I3, mem(&COPRO_FCSE_PID), 0xfe000000); // and i3, COPRO_FCSE_PID, 0xfe000000 + UML_ADD(block, I3, I3, I0); // add i3, i3, i0 // I4: desc_lvl1 - UML_AND(block, I4, mem(&COPRO_TLB_BASE), COPRO_TLB_BASE_MASK); // and i4, COPRO_TLB_BASE, COPRO_TLB_BASE_MASK - UML_ROLINS(block, I4, I3, 32 - COPRO_TLB_VADDR_FLTI_MASK_SHIFT, // rolins i4, i3, 32-COPRO_TLB_VADDR_FLTI_MASK_SHIFT, - COPRO_TLB_VADDR_FLTI_MASK); // COPRO_TLB_VADDR_FLTI_MASK - UML_READ(block, I4, I4, SIZE_DWORD, SPACE_PROGRAM); // read32 i4, i4, PROGRAM + UML_AND(block, I4, mem(&COPRO_TLB_BASE), COPRO_TLB_BASE_MASK); // and i4, COPRO_TLB_BASE, COPRO_TLB_BASE_MASK + UML_ROLINS(block, I4, I3, 32 - COPRO_TLB_VADDR_FLTI_MASK_SHIFT, // rolins i4, i3, 32-COPRO_TLB_VADDR_FLTI_MASK_SHIFT, + COPRO_TLB_VADDR_FLTI_MASK); // COPRO_TLB_VADDR_FLTI_MASK + UML_READ(block, I4, I4, SIZE_DWORD, SPACE_PROGRAM); // read32 i4, i4, PROGRAM // I7: desc_lvl1 & 3 - UML_AND(block, I7, I4, 3); // and i7, i4, 3 + UML_AND(block, I7, I4, 3); // and i7, i4, 3 - UML_CMP(block, I7, COPRO_TLB_UNMAPPED); // cmp i7, COPRO_TLB_UNMAPPED - UML_JMPc(block, COND_NE, nounmapped = label++); // jmpne nounmapped + UML_CMP(block, I7, COPRO_TLB_UNMAPPED); // cmp i7, COPRO_TLB_UNMAPPED + UML_JMPc(block, COND_NE, nounmapped = label++); // jmpne nounmapped // TLB Unmapped - UML_TEST(block, I2, ARM7_TLB_ABORT_D); // test i2, ARM7_TLB_ABORT_D - UML_MOVc(block, COND_E, mem(&COPRO_FAULT_STATUS_D), (5 << 0)); // move COPRO_FAULT_STATUS_D, (5 << 0) - UML_MOVc(block, COND_E, mem(&COPRO_FAULT_ADDRESS), I3); // move COPRO_FAULT_ADDRESS, i3 - UML_MOVc(block, COND_E, mem(&arm->pendingAbtD), 1); // move pendingAbtD, 1 - UML_MOVc(block, COND_E, I2, 0); // move i2, 0 + UML_TEST(block, I2, ARM7_TLB_ABORT_D); // test i2, ARM7_TLB_ABORT_D + UML_MOVc(block, COND_E, mem(&COPRO_FAULT_STATUS_D), (5 << 0)); // move COPRO_FAULT_STATUS_D, (5 << 0) + UML_MOVc(block, COND_E, mem(&COPRO_FAULT_ADDRESS), I3); // move COPRO_FAULT_ADDRESS, i3 + UML_MOVc(block, COND_E, mem(&arm->pendingAbtD), 1); // move pendingAbtD, 1 + UML_MOVc(block, COND_E, I2, 0); // move i2, 0 UML_RETc(block, COND_E); // rete - UML_TEST(block, I2, ARM7_TLB_ABORT_P); // test i2, ARM7_TLB_ABORT_P - UML_MOVc(block, COND_E, mem(&arm->pendingAbtP), 1); // move pendingAbtP, 1 - UML_MOV(block, I2, 0); // mov i2, 0 - UML_RET(block); // ret + UML_TEST(block, I2, ARM7_TLB_ABORT_P); // test i2, ARM7_TLB_ABORT_P + UML_MOVc(block, COND_E, mem(&arm->pendingAbtP), 1); // move pendingAbtP, 1 + UML_MOV(block, I2, 0); // mov i2, 0 + UML_RET(block); // ret - UML_LABEL(block, nounmapped); // nounmapped: - UML_CMP(block, I7, COPRO_TLB_COARSE_TABLE); // cmp i7, COPRO_TLB_COARSE_TABLE - UML_JMPc(block, COND_NE, nocoarse = label++); // jmpne nocoarse + UML_LABEL(block, nounmapped); // nounmapped: + UML_CMP(block, I7, COPRO_TLB_COARSE_TABLE); // cmp i7, COPRO_TLB_COARSE_TABLE + UML_JMPc(block, COND_NE, nocoarse = label++); // jmpne nocoarse - UML_ROLAND(block, I5, I4, 32-4, 0x0f<<1); // roland i5, i4, 32-4, 0xf<<1 - UML_ROLAND(block, I5, mem(&COPRO_DOMAIN_ACCESS_CONTROL), I5, 3);// roland i5, COPRO_DOMAIN_ACCESS_CONTROL, i5, 3 - UML_CMP(block, I5, 1); // cmp i5, 1 - UML_JMPc(block, COND_E, level2 = label++); // jmpe level2 - UML_CMP(block, I5, 3); // cmp i5, 3 - UML_JMPc(block, COND_NE, nofine = label++); // jmpne nofine - UML_LABEL(block, level2); // level2: + UML_ROLAND(block, I5, I4, 32-4, 0x0f<<1); // roland i5, i4, 32-4, 0xf<<1 + UML_ROLAND(block, I5, mem(&COPRO_DOMAIN_ACCESS_CONTROL), I5, 3);// roland i5, COPRO_DOMAIN_ACCESS_CONTROL, i5, 3 + UML_CMP(block, I5, 1); // cmp i5, 1 + UML_JMPc(block, COND_E, level2 = label++); // jmpe level2 + UML_CMP(block, I5, 3); // cmp i5, 3 + UML_JMPc(block, COND_NE, nofine = label++); // jmpne nofine + UML_LABEL(block, level2); // level2: // I7: desc_level2 - UML_AND(block, I7, I4, COPRO_TLB_CFLD_ADDR_MASK); // and i7, i4, COPRO_TLB_CFLD_ADDR_MASK - UML_ROLINS(block, I7, I3, 32 - COPRO_TLB_VADDR_CSLTI_MASK_SHIFT,// rolins i7, i3, 32 - COPRO_TLB_VADDR_CSLTI_MASK_SHIFT - COPRO_TLB_VADDR_CSLTI_MASK); // COPRO_TLB_VADDR_CSLTI_MASK - UML_READ(block, I7, I7, SIZE_DWORD, SPACE_PROGRAM); // read32 i7, i7, PROGRAM - UML_JMP(block, nofine); // jmp nofine + UML_AND(block, I7, I4, COPRO_TLB_CFLD_ADDR_MASK); // and i7, i4, COPRO_TLB_CFLD_ADDR_MASK + UML_ROLINS(block, I7, I3, 32 - COPRO_TLB_VADDR_CSLTI_MASK_SHIFT,// rolins i7, i3, 32 - COPRO_TLB_VADDR_CSLTI_MASK_SHIFT + COPRO_TLB_VADDR_CSLTI_MASK); // COPRO_TLB_VADDR_CSLTI_MASK + UML_READ(block, I7, I7, SIZE_DWORD, SPACE_PROGRAM); // read32 i7, i7, PROGRAM + UML_JMP(block, nofine); // jmp nofine - UML_LABEL(block, nocoarse); // nocoarse: - UML_CMP(block, I7, COPRO_TLB_SECTION_TABLE); // cmp i7, COPRO_TLB_SECTION_TABLE - UML_JMPc(block, COND_NE, nosection = label++); // jmpne nosection + UML_LABEL(block, nocoarse); // nocoarse: + UML_CMP(block, I7, COPRO_TLB_SECTION_TABLE); // cmp i7, COPRO_TLB_SECTION_TABLE + UML_JMPc(block, COND_NE, nosection = label++); // jmpne nosection - UML_ROLAND(block, I5, I4, 32-10, 3); // roland i7, i4, 32-10, 3 + UML_ROLAND(block, I5, I4, 32-10, 3); // roland i7, i4, 32-10, 3 // result in I6 - UML_CALLH(block, *arm->impstate->detect_fault); // callh detect_fault - UML_CMP(block, I6, FAULT_NONE); // cmp i6, FAULT_NONE - UML_JMPc(block, COND_NE, handlefault = label++); // jmpne handlefault + UML_CALLH(block, *arm->impstate->detect_fault); // callh detect_fault + UML_CMP(block, I6, FAULT_NONE); // cmp i6, FAULT_NONE + UML_JMPc(block, COND_NE, handlefault = label++); // jmpne handlefault // no fault, return translated address - UML_AND(block, I0, I3, ~COPRO_TLB_SECTION_PAGE_MASK); // and i0, i3, ~COPRO_TLB_SECTION_PAGE_MASK - UML_ROLINS(block, I0, I4, 0, COPRO_TLB_SECTION_PAGE_MASK); // rolins i0, i4, COPRO_TLB_SECTION_PAGE_MASK - UML_MOV(block, I2, 1); // mov i2, 1 - UML_RET(block); // ret - - UML_LABEL(block, handlefault); // handlefault: - UML_TEST(block, I2, ARM7_TLB_ABORT_D); // test i2, ARM7_TLB_ABORT_D - UML_JMPc(block, COND_Z, prefetch = label++); // jmpz prefetch - UML_MOV(block, mem(&COPRO_FAULT_ADDRESS), I3); // mov COPRO_FAULT_ADDRESS, i3 - UML_MOV(block, mem(&arm->pendingAbtD), 1); // mov arm->pendingAbtD, 1 - UML_ROLAND(block, I5, I4, 31, 0xf0); // roland i5, i4, 31, 0xf0 - UML_CMP(block, I6, FAULT_DOMAIN); // cmp i6, FAULT_DOMAIN - UML_MOVc(block, COND_E, I6, 9 << 0); // move i6, 9 << 0 - UML_MOVc(block, COND_NE, I6, 13 << 0); // movne i6, 13 << 0 - UML_OR(block, mem(&COPRO_FAULT_STATUS_D), I5, I6); // or COPRO_FAULT_STATUS_D, i5, i6 - UML_MOV(block, I2, 0); // mov i2, 0 - UML_RET(block); // ret - - UML_LABEL(block, prefetch); // prefetch: - UML_MOV(block, mem(&arm->pendingAbtP), 1); // mov arm->pendingAbtP, 1 - UML_MOV(block, I2, 0); // mov i2, 0 - UML_RET(block); // ret - - UML_LABEL(block, nosection); // nosection: - UML_CMP(block, I7, COPRO_TLB_FINE_TABLE); // cmp i7, COPRO_TLB_FINE_TABLE - UML_JMPc(block, COND_NE, nofine); // jmpne nofine + UML_AND(block, I0, I3, ~COPRO_TLB_SECTION_PAGE_MASK); // and i0, i3, ~COPRO_TLB_SECTION_PAGE_MASK + UML_ROLINS(block, I0, I4, 0, COPRO_TLB_SECTION_PAGE_MASK); // rolins i0, i4, COPRO_TLB_SECTION_PAGE_MASK + UML_MOV(block, I2, 1); // mov i2, 1 + UML_RET(block); // ret + + UML_LABEL(block, handlefault); // handlefault: + UML_TEST(block, I2, ARM7_TLB_ABORT_D); // test i2, ARM7_TLB_ABORT_D + UML_JMPc(block, COND_Z, prefetch = label++); // jmpz prefetch + UML_MOV(block, mem(&COPRO_FAULT_ADDRESS), I3); // mov COPRO_FAULT_ADDRESS, i3 + UML_MOV(block, mem(&arm->pendingAbtD), 1); // mov arm->pendingAbtD, 1 + UML_ROLAND(block, I5, I4, 31, 0xf0); // roland i5, i4, 31, 0xf0 + UML_CMP(block, I6, FAULT_DOMAIN); // cmp i6, FAULT_DOMAIN + UML_MOVc(block, COND_E, I6, 9 << 0); // move i6, 9 << 0 + UML_MOVc(block, COND_NE, I6, 13 << 0); // movne i6, 13 << 0 + UML_OR(block, mem(&COPRO_FAULT_STATUS_D), I5, I6); // or COPRO_FAULT_STATUS_D, i5, i6 + UML_MOV(block, I2, 0); // mov i2, 0 + UML_RET(block); // ret + + UML_LABEL(block, prefetch); // prefetch: + UML_MOV(block, mem(&arm->pendingAbtP), 1); // mov arm->pendingAbtP, 1 + UML_MOV(block, I2, 0); // mov i2, 0 + UML_RET(block); // ret + + UML_LABEL(block, nosection); // nosection: + UML_CMP(block, I7, COPRO_TLB_FINE_TABLE); // cmp i7, COPRO_TLB_FINE_TABLE + UML_JMPc(block, COND_NE, nofine); // jmpne nofine // Not yet implemented - UML_MOV(block, I2, 1); // mov i2, 1 - UML_RET(block); // ret + UML_MOV(block, I2, 1); // mov i2, 1 + UML_RET(block); // ret - UML_LABEL(block, nofine); // nofine: + UML_LABEL(block, nofine); // nofine: // I7: desc_lvl2 - UML_AND(block, I6, I7, 3); // and i6, i7, 3 - UML_CMP(block, I6, COPRO_TLB_UNMAPPED); // cmp i6, COPRO_TLB_UNMAPPED - UML_JMPc(block, COND_NE, nounmapped2 = label++); // jmpne nounmapped2 - - UML_TEST(block, I2, ARM7_TLB_ABORT_D); // test i2, ARM7_TLB_ABORT_D - UML_JMPc(block, COND_Z, prefetch2 = label++); // jmpz prefetch2 - UML_MOV(block, mem(&COPRO_FAULT_ADDRESS), I3); // mov COPRO_FAULT_ADDRESS, i3 - UML_MOV(block, mem(&arm->pendingAbtD), 1); // mov arm->pendingAbtD, 1 - UML_ROLAND(block, I5, I4, 31, 0xf0); // roland i5, i4, 31, 0xf0 - UML_OR(block, I5, I5, 7 << 0); // or i5, i5, 7 << 0 - UML_OR(block, mem(&COPRO_FAULT_STATUS_D), I5, I6); // or COPRO_FAULT_STATUS_D, i5, i6 - UML_MOV(block, I2, 0); // mov i2, 0 - UML_RET(block); // ret - - UML_LABEL(block, prefetch2); // prefetch2: - UML_MOV(block, mem(&arm->pendingAbtP), 1); // mov arm->pendingAbtP, 1 - UML_MOV(block, I2, 0); // mov i2, 0 - UML_RET(block); // ret - - UML_LABEL(block, nounmapped2); // nounmapped2: - UML_CMP(block, I6, COPRO_TLB_LARGE_PAGE); // cmp i6, COPRO_TLB_LARGE_PAGE - UML_JMPc(block, COND_NE, nolargepage = label++); // jmpne nolargepage - - UML_AND(block, I0, I3, ~COPRO_TLB_LARGE_PAGE_MASK); // and i0, i3, ~COPRO_TLB_LARGE_PAGE_MASK - UML_ROLINS(block, I0, I7, 0, COPRO_TLB_LARGE_PAGE_MASK); // rolins i0, i7, 0, COPRO_TLB_LARGE_PAGE_MASK - UML_MOV(block, I2, 1); // mov i2, 1 - UML_RET(block); // ret - - UML_LABEL(block, nolargepage); // nolargepage: - UML_CMP(block, I6, COPRO_TLB_SMALL_PAGE); // cmp i6, COPRO_TLB_SMALL_PAGE - UML_JMPc(block, COND_NE, nosmallpage = label++); // jmpne nosmallpage - - UML_ROLAND(block, I5, I3, 32-9, 3<<1); // roland i5, i3, 32-9, 3<<1 - UML_ROLAND(block, I6, I7, 32-4, 0xff); // roland i6, i7, 32-4, 0xff - UML_SHR(block, I5, I7, I5); // shr i5, i7, i5 - UML_AND(block, I5, I5, 3); // and i5, i5, 3 + UML_AND(block, I6, I7, 3); // and i6, i7, 3 + UML_CMP(block, I6, COPRO_TLB_UNMAPPED); // cmp i6, COPRO_TLB_UNMAPPED + UML_JMPc(block, COND_NE, nounmapped2 = label++); // jmpne nounmapped2 + + UML_TEST(block, I2, ARM7_TLB_ABORT_D); // test i2, ARM7_TLB_ABORT_D + UML_JMPc(block, COND_Z, prefetch2 = label++); // jmpz prefetch2 + UML_MOV(block, mem(&COPRO_FAULT_ADDRESS), I3); // mov COPRO_FAULT_ADDRESS, i3 + UML_MOV(block, mem(&arm->pendingAbtD), 1); // mov arm->pendingAbtD, 1 + UML_ROLAND(block, I5, I4, 31, 0xf0); // roland i5, i4, 31, 0xf0 + UML_OR(block, I5, I5, 7 << 0); // or i5, i5, 7 << 0 + UML_OR(block, mem(&COPRO_FAULT_STATUS_D), I5, I6); // or COPRO_FAULT_STATUS_D, i5, i6 + UML_MOV(block, I2, 0); // mov i2, 0 + UML_RET(block); // ret + + UML_LABEL(block, prefetch2); // prefetch2: + UML_MOV(block, mem(&arm->pendingAbtP), 1); // mov arm->pendingAbtP, 1 + UML_MOV(block, I2, 0); // mov i2, 0 + UML_RET(block); // ret + + UML_LABEL(block, nounmapped2); // nounmapped2: + UML_CMP(block, I6, COPRO_TLB_LARGE_PAGE); // cmp i6, COPRO_TLB_LARGE_PAGE + UML_JMPc(block, COND_NE, nolargepage = label++); // jmpne nolargepage + + UML_AND(block, I0, I3, ~COPRO_TLB_LARGE_PAGE_MASK); // and i0, i3, ~COPRO_TLB_LARGE_PAGE_MASK + UML_ROLINS(block, I0, I7, 0, COPRO_TLB_LARGE_PAGE_MASK); // rolins i0, i7, 0, COPRO_TLB_LARGE_PAGE_MASK + UML_MOV(block, I2, 1); // mov i2, 1 + UML_RET(block); // ret + + UML_LABEL(block, nolargepage); // nolargepage: + UML_CMP(block, I6, COPRO_TLB_SMALL_PAGE); // cmp i6, COPRO_TLB_SMALL_PAGE + UML_JMPc(block, COND_NE, nosmallpage = label++); // jmpne nosmallpage + + UML_ROLAND(block, I5, I3, 32-9, 3<<1); // roland i5, i3, 32-9, 3<<1 + UML_ROLAND(block, I6, I7, 32-4, 0xff); // roland i6, i7, 32-4, 0xff + UML_SHR(block, I5, I7, I5); // shr i5, i7, i5 + UML_AND(block, I5, I5, 3); // and i5, i5, 3 // result in I6 - UML_CALLH(block, *arm->impstate->detect_fault); // callh detect_fault - - UML_CMP(block, I6, FAULT_NONE); // cmp i6, FAULT_NONE - UML_JMPc(block, COND_NE, smallfault = label++); // jmpne smallfault - UML_AND(block, I0, I7, COPRO_TLB_SMALL_PAGE_MASK); // and i0, i7, COPRO_TLB_SMALL_PAGE_MASK - UML_ROLINS(block, I0, I3, 0, ~COPRO_TLB_SMALL_PAGE_MASK); // rolins i0, i3, 0, ~COPRO_TLB_SMALL_PAGE_MASK - UML_MOV(block, I2, 1); // mov i2, 1 - UML_RET(block); // ret - - UML_LABEL(block, smallfault); // smallfault: - UML_TEST(block, I2, ARM7_TLB_ABORT_D); // test i2, ARM7_TLB_ABORT_D - UML_JMPc(block, COND_NZ, smallprefetch = label++); // jmpnz smallprefetch - UML_MOV(block, mem(&COPRO_FAULT_ADDRESS), I3); // mov COPRO_FAULT_ADDRESS, i3 - UML_MOV(block, mem(&arm->pendingAbtD), 1); // mov pendingAbtD, 1 - UML_CMP(block, I6, FAULT_DOMAIN); // cmp i6, FAULT_DOMAIN - UML_MOVc(block, COND_E, I5, 11 << 0); // move i5, 11 << 0 - UML_MOVc(block, COND_NE, I5, 15 << 0); // movne i5, 15 << 0 - UML_ROLINS(block, I5, I4, 31, 0xf0); // rolins i5, i4, 31, 0xf0 - UML_MOV(block, mem(&COPRO_FAULT_STATUS_D), I5); // mov COPRO_FAULT_STATUS_D, i5 - UML_MOV(block, I2, 0); // mov i2, 0 - UML_RET(block); // ret - - UML_LABEL(block, smallprefetch); // smallprefetch: - UML_MOV(block, mem(&arm->pendingAbtP), 1); // mov pendingAbtP, 1 - UML_MOV(block, I2, 0); // mov i2, 0 - UML_RET(block); // ret - - UML_LABEL(block, nosmallpage); // nosmallpage: - UML_CMP(block, I6, COPRO_TLB_TINY_PAGE); // cmp i6, COPRO_TLB_TINY_PAGE - UML_JMPc(block, COND_NE, notinypage = label++); // jmpne notinypage - - UML_AND(block, I0, I3, ~COPRO_TLB_TINY_PAGE_MASK); // and i0, i3, ~COPRO_TLB_TINY_PAGE_MASK - UML_ROLINS(block, I0, I7, 0, COPRO_TLB_TINY_PAGE_MASK); // rolins i0, i7, 0, COPRO_TLB_TINY_PAGE_MASK - UML_MOV(block, I2, 1); // mov i2, 1 - UML_RET(block); // ret - - UML_LABEL(block, notinypage); // notinypage: - UML_MOV(block, I0, I3); // mov i0, i3 - UML_RET(block); // ret + UML_CALLH(block, *arm->impstate->detect_fault); // callh detect_fault + + UML_CMP(block, I6, FAULT_NONE); // cmp i6, FAULT_NONE + UML_JMPc(block, COND_NE, smallfault = label++); // jmpne smallfault + UML_AND(block, I0, I7, COPRO_TLB_SMALL_PAGE_MASK); // and i0, i7, COPRO_TLB_SMALL_PAGE_MASK + UML_ROLINS(block, I0, I3, 0, ~COPRO_TLB_SMALL_PAGE_MASK); // rolins i0, i3, 0, ~COPRO_TLB_SMALL_PAGE_MASK + UML_MOV(block, I2, 1); // mov i2, 1 + UML_RET(block); // ret + + UML_LABEL(block, smallfault); // smallfault: + UML_TEST(block, I2, ARM7_TLB_ABORT_D); // test i2, ARM7_TLB_ABORT_D + UML_JMPc(block, COND_NZ, smallprefetch = label++); // jmpnz smallprefetch + UML_MOV(block, mem(&COPRO_FAULT_ADDRESS), I3); // mov COPRO_FAULT_ADDRESS, i3 + UML_MOV(block, mem(&arm->pendingAbtD), 1); // mov pendingAbtD, 1 + UML_CMP(block, I6, FAULT_DOMAIN); // cmp i6, FAULT_DOMAIN + UML_MOVc(block, COND_E, I5, 11 << 0); // move i5, 11 << 0 + UML_MOVc(block, COND_NE, I5, 15 << 0); // movne i5, 15 << 0 + UML_ROLINS(block, I5, I4, 31, 0xf0); // rolins i5, i4, 31, 0xf0 + UML_MOV(block, mem(&COPRO_FAULT_STATUS_D), I5); // mov COPRO_FAULT_STATUS_D, i5 + UML_MOV(block, I2, 0); // mov i2, 0 + UML_RET(block); // ret + + UML_LABEL(block, smallprefetch); // smallprefetch: + UML_MOV(block, mem(&arm->pendingAbtP), 1); // mov pendingAbtP, 1 + UML_MOV(block, I2, 0); // mov i2, 0 + UML_RET(block); // ret + + UML_LABEL(block, nosmallpage); // nosmallpage: + UML_CMP(block, I6, COPRO_TLB_TINY_PAGE); // cmp i6, COPRO_TLB_TINY_PAGE + UML_JMPc(block, COND_NE, notinypage = label++); // jmpne notinypage + + UML_AND(block, I0, I3, ~COPRO_TLB_TINY_PAGE_MASK); // and i0, i3, ~COPRO_TLB_TINY_PAGE_MASK + UML_ROLINS(block, I0, I7, 0, COPRO_TLB_TINY_PAGE_MASK); // rolins i0, i7, 0, COPRO_TLB_TINY_PAGE_MASK + UML_MOV(block, I2, 1); // mov i2, 1 + UML_RET(block); // ret + + UML_LABEL(block, notinypage); // notinypage: + UML_MOV(block, I0, I3); // mov i0, i3 + UML_RET(block); // ret block->end(); } @@ -1957,21 +1957,21 @@ static void static_generate_memory_accessor(arm_state *arm, int size, bool istlb /* add a global entry for this */ alloc_handle(drcuml, handleptr, name); - UML_HANDLE(block, **handleptr); // handle *handleptr + UML_HANDLE(block, **handleptr); // handle *handleptr if (istlb) { - UML_TEST(block, mem(&COPRO_CTRL), COPRO_CTRL_MMU_EN); // test COPRO_CTRL, COPRO_CTRL_MMU_EN + UML_TEST(block, mem(&COPRO_CTRL), COPRO_CTRL_MMU_EN); // test COPRO_CTRL, COPRO_CTRL_MMU_EN if (iswrite) { - UML_MOVc(block, COND_NZ, I3, ARM7_TLB_WRITE); // movnz i3, ARM7_TLB_WRITE + UML_MOVc(block, COND_NZ, I3, ARM7_TLB_WRITE); // movnz i3, ARM7_TLB_WRITE } else { - UML_MOVc(block, COND_NZ, I3, ARM7_TLB_READ); // movnz i3, ARM7_TLB_READ + UML_MOVc(block, COND_NZ, I3, ARM7_TLB_READ); // movnz i3, ARM7_TLB_READ } - UML_OR(block, I2, I2, I3); // or i2, i2, i3 - UML_CALLHc(block, COND_NZ, *arm->impstate->tlb_translate); // callhnz tlb_translate + UML_OR(block, I2, I2, I3); // or i2, i2, i3 + UML_CALLHc(block, COND_NZ, *arm->impstate->tlb_translate); // callhnz tlb_translate } /* general case: assume paging and perform a translation */ @@ -1985,13 +1985,13 @@ static void static_generate_memory_accessor(arm_state *arm, int size, bool istlb UINT32 skip = label++; if (arm->impstate->fastram[ramnum].end != 0xffffffff) { - UML_CMP(block, I0, arm->impstate->fastram[ramnum].end); // cmp i0, end - UML_JMPc(block, COND_A, skip); // ja skip + UML_CMP(block, I0, arm->impstate->fastram[ramnum].end); // cmp i0, end + UML_JMPc(block, COND_A, skip); // ja skip } if (arm->impstate->fastram[ramnum].start != 0x00000000) { - UML_CMP(block, I0, arm->impstate->fastram[ramnum].start); // cmp i0, fastram_start - UML_JMPc(block, COND_B, skip); // jb skip + UML_CMP(block, I0, arm->impstate->fastram[ramnum].start); // cmp i0, fastram_start + UML_JMPc(block, COND_B, skip); // jb skip } if (!iswrite) @@ -2000,19 +2000,19 @@ static void static_generate_memory_accessor(arm_state *arm, int size, bool istlb { UML_XOR(block, I0, I0, (arm->endianess == ENDIANNESS_BIG) ? BYTE4_XOR_BE(0) : BYTE4_XOR_LE(0)); // xor i0, i0, bytexor - UML_LOAD(block, I0, fastbase, I0, SIZE_BYTE, SCALE_x1); // load i0, fastbase, i0, byte + UML_LOAD(block, I0, fastbase, I0, SIZE_BYTE, SCALE_x1); // load i0, fastbase, i0, byte } else if (size == 2) { UML_XOR(block, I0, I0, (arm->endianess == ENDIANNESS_BIG) ? WORD_XOR_BE(0) : WORD_XOR_LE(0)); // xor i0, i0, wordxor - UML_LOAD(block, I0, fastbase, I0, SIZE_WORD, SCALE_x1); // load i0, fastbase, i0, word_x1 + UML_LOAD(block, I0, fastbase, I0, SIZE_WORD, SCALE_x1); // load i0, fastbase, i0, word_x1 } else if (size == 4) { - UML_LOAD(block, I0, fastbase, I0, SIZE_DWORD, SCALE_x1); // load i0, fastbase, i0, dword_x1 + UML_LOAD(block, I0, fastbase, I0, SIZE_DWORD, SCALE_x1); // load i0, fastbase, i0, dword_x1 } - UML_RET(block); // ret + UML_RET(block); // ret } else { @@ -2020,22 +2020,22 @@ static void static_generate_memory_accessor(arm_state *arm, int size, bool istlb { UML_XOR(block, I0, I0, (arm->endianess == ENDIANNESS_BIG) ? BYTE4_XOR_BE(0) : BYTE4_XOR_LE(0)); // xor i0, i0, bytexor - UML_STORE(block, fastbase, I0, I1, SIZE_BYTE, SCALE_x1); // store fastbase, i0, i1, byte + UML_STORE(block, fastbase, I0, I1, SIZE_BYTE, SCALE_x1); // store fastbase, i0, i1, byte } else if (size == 2) { UML_XOR(block, I0, I0, arm->bigendian ? WORD_XOR_BE(0) : WORD_XOR_LE(0)); // xor i0, i0, wordxor - UML_STORE(block, fastbase, I0, I1, SIZE_WORD, SCALE_x1); // store fastbase, i0, i1, word_x1 + UML_STORE(block, fastbase, I0, I1, SIZE_WORD, SCALE_x1); // store fastbase, i0, i1, word_x1 } else if (size == 4) { - UML_STORE(block, fastbase, I0, I1, SIZE_DWORD, SCALE_x1); // store fastbase,i0,i1,dword_x1 + UML_STORE(block, fastbase, I0, I1, SIZE_DWORD, SCALE_x1); // store fastbase,i0,i1,dword_x1 } UML_RET(block); // ret } - UML_LABEL(block, skip); // skip: + UML_LABEL(block, skip); // skip: } } } @@ -2045,33 +2045,33 @@ static void static_generate_memory_accessor(arm_state *arm, int size, bool istlb case 1: if (iswrite) { - UML_WRITE(block, I0, I1, SIZE_BYTE, SPACE_PROGRAM); // write i0, i1, program_byte + UML_WRITE(block, I0, I1, SIZE_BYTE, SPACE_PROGRAM); // write i0, i1, program_byte } else { - UML_READ(block, I0, I0, SIZE_BYTE, SPACE_PROGRAM); // read i0, i0, program_byte + UML_READ(block, I0, I0, SIZE_BYTE, SPACE_PROGRAM); // read i0, i0, program_byte } break; case 2: if (iswrite) { - UML_WRITE(block, I0, I1, SIZE_WORD, SPACE_PROGRAM); // write i0,i1,program_word + UML_WRITE(block, I0, I1, SIZE_WORD, SPACE_PROGRAM); // write i0,i1,program_word } else { - UML_READ(block, I0, I0, SIZE_WORD, SPACE_PROGRAM); // read i0,i0,program_word + UML_READ(block, I0, I0, SIZE_WORD, SPACE_PROGRAM); // read i0,i0,program_word } break; case 4: if (iswrite) { - UML_WRITE(block, I0, I1, SIZE_DWORD, SPACE_PROGRAM); // write i0,i1,program_dword + UML_WRITE(block, I0, I1, SIZE_DWORD, SPACE_PROGRAM); // write i0,i1,program_dword } else { - UML_READ(block, I0, I0, SIZE_DWORD, SPACE_PROGRAM); // read i0,i0,program_dword + UML_READ(block, I0, I0, SIZE_DWORD, SPACE_PROGRAM); // read i0,i0,program_dword } break; } @@ -2106,7 +2106,7 @@ static void generate_update_cycles(arm_state *arm, drcuml_block *block, compiler { UML_SUB(block, mem(&arm->icount), mem(&arm->icount), MAPVAR_CYCLES); // sub icount,icount,cycles UML_MAPVAR(block, MAPVAR_CYCLES, 0); // mapvar cycles,0 - UML_EXHc(block, COND_S, *arm->impstate->out_of_cycles, param); // exh out_of_cycles,nextpc + UML_EXHc(block, COND_S, *arm->impstate->out_of_cycles, param); // exh out_of_cycles,nextpc } compiler->cycles = 0; } @@ -2132,19 +2132,19 @@ static void generate_checksum_block(arm_state *arm, drcuml_block *block, compile { UINT32 sum = seqhead->opptr.l[0]; void *base = arm->direct->read_decrypted_ptr(seqhead->physpc); - UML_LOAD(block, I0, base, 0, SIZE_DWORD, SCALE_x4); // load i0,base,0,dword + UML_LOAD(block, I0, base, 0, SIZE_DWORD, SCALE_x4); // load i0,base,0,dword if (seqhead->delay.first() != NULL && seqhead->physpc != seqhead->delay.first()->physpc) { base = arm->direct->read_decrypted_ptr(seqhead->delay.first()->physpc); - UML_LOAD(block, I1, base, 0, SIZE_DWORD, SCALE_x4); // load i1,base,dword - UML_ADD(block, I0, I0, I1); // add i0,i0,i1 + UML_LOAD(block, I1, base, 0, SIZE_DWORD, SCALE_x4); // load i1,base,dword + UML_ADD(block, I0, I0, I1); // add i0,i0,i1 sum += seqhead->delay.first()->opptr.l[0]; } - UML_CMP(block, I0, sum); // cmp i0,opptr[0] - UML_EXHc(block, COND_NE, *arm->impstate->nocode, epc(seqhead)); // exne nocode,seqhead->pc + UML_CMP(block, I0, sum); // cmp i0,opptr[0] + UML_EXHc(block, COND_NE, *arm->impstate->nocode, epc(seqhead)); // exne nocode,seqhead->pc } } @@ -2153,26 +2153,26 @@ static void generate_checksum_block(arm_state *arm, drcuml_block *block, compile { UINT32 sum = 0; void *base = arm->direct->read_decrypted_ptr(seqhead->physpc); - UML_LOAD(block, I0, base, 0, SIZE_DWORD, SCALE_x4); // load i0,base,0,dword + UML_LOAD(block, I0, base, 0, SIZE_DWORD, SCALE_x4); // load i0,base,0,dword sum += seqhead->opptr.l[0]; for (curdesc = seqhead->next(); curdesc != seqlast->next(); curdesc = curdesc->next()) if (!(curdesc->flags & OPFLAG_VIRTUAL_NOOP)) { base = arm->direct->read_decrypted_ptr(curdesc->physpc); - UML_LOAD(block, I1, base, 0, SIZE_DWORD, SCALE_x4); // load i1,base,dword - UML_ADD(block, I0, I0, I1); // add i0,i0,i1 + UML_LOAD(block, I1, base, 0, SIZE_DWORD, SCALE_x4); // load i1,base,dword + UML_ADD(block, I0, I0, I1); // add i0,i0,i1 sum += curdesc->opptr.l[0]; if (curdesc->delay.first() != NULL && (curdesc == seqlast || (curdesc->next() != NULL && curdesc->next()->physpc != curdesc->delay.first()->physpc))) { base = arm->direct->read_decrypted_ptr(curdesc->delay.first()->physpc); - UML_LOAD(block, I1, base, 0, SIZE_DWORD, SCALE_x4); // load i1,base,dword - UML_ADD(block, I0, I0, I1); // add i0,i0,i1 + UML_LOAD(block, I1, base, 0, SIZE_DWORD, SCALE_x4); // load i1,base,dword + UML_ADD(block, I0, I0, I1); // add i0,i0,i1 sum += curdesc->delay.first()->opptr.l[0]; } } - UML_CMP(block, I0, sum); // cmp i0,sum - UML_EXHc(block, COND_NE, *arm->impstate->nocode, epc(seqhead)); // exne nocode,seqhead->pc + UML_CMP(block, I0, sum); // cmp i0,sum + UML_EXHc(block, COND_NE, *arm->impstate->nocode, epc(seqhead)); // exne nocode,seqhead->pc } } @@ -2199,7 +2199,7 @@ static void generate_sequence_instruction(arm_state *arm, drcuml_block *block, c compiler->cycles += desc->cycles; /* update the icount map variable */ - UML_MAPVAR(block, MAPVAR_CYCLES, compiler->cycles); // mapvar CYCLES,compiler->cycles + UML_MAPVAR(block, MAPVAR_CYCLES, compiler->cycles); // mapvar CYCLES,compiler->cycles /* is this a hotspot? */ for (hotnum = 0; hotnum < MIPS3_MAX_HOTSPOTS; hotnum++) @@ -2212,22 +2212,22 @@ static void generate_sequence_instruction(arm_state *arm, drcuml_block *block, c } /* update the icount map variable */ - UML_MAPVAR(block, MAPVAR_CYCLES, compiler->cycles); // mapvar CYCLES,compiler->cycles + UML_MAPVAR(block, MAPVAR_CYCLES, compiler->cycles); // mapvar CYCLES,compiler->cycles /* if we are debugging, call the debugger */ if ((arm->device->machine().debug_flags & DEBUG_FLAG_ENABLED) != 0) { - UML_MOV(block, mem(&R15), desc->pc); // mov [pc],desc->pc + UML_MOV(block, mem(&R15), desc->pc); // mov [pc],desc->pc save_fast_iregs(arm, block); - UML_DEBUG(block, desc->pc); // debug desc->pc + UML_DEBUG(block, desc->pc); // debug desc->pc } /* if we hit an unmapped address, fatal error */ if (desc->flags & OPFLAG_COMPILER_UNMAPPED) { - UML_MOV(block, mem(&R15), desc->pc); // mov R15,desc->pc + UML_MOV(block, mem(&R15), desc->pc); // mov R15,desc->pc save_fast_iregs(arm, block); - UML_EXIT(block, EXECUTE_UNMAPPED_CODE); // exit EXECUTE_UNMAPPED_CODE + UML_EXIT(block, EXECUTE_UNMAPPED_CODE); // exit EXECUTE_UNMAPPED_CODE } /* otherwise, unless this is a virtual no-op, it's a regular instruction */ @@ -2236,9 +2236,9 @@ static void generate_sequence_instruction(arm_state *arm, drcuml_block *block, c /* compile the instruction */ if (!generate_opcode(arm, block, compiler, desc)) { - UML_MOV(block, mem(&R15), desc->pc); // mov R15,desc->pc - UML_MOV(block, mem(&arm->impstate->arg0), desc->opptr.l[0]); // mov [arg0],desc->opptr.l - UML_CALLC(block, cfunc_unimplemented, arm); // callc cfunc_unimplemented + UML_MOV(block, mem(&R15), desc->pc); // mov R15,desc->pc + UML_MOV(block, mem(&arm->impstate->arg0), desc->opptr.l[0]); // mov [arg0],desc->opptr.l + UML_CALLC(block, cfunc_unimplemented, arm); // callc cfunc_unimplemented } } } @@ -2256,7 +2256,7 @@ static void generate_delay_slot_and_branch(arm_state *arm, drcuml_block *block, /* update the cycles and jump through the hash table to the target */ if (desc->targetpc != BRANCH_TARGET_DYNAMIC) { - generate_update_cycles(arm, block, &compiler_temp, desc->targetpc, TRUE); // + generate_update_cycles(arm, block, &compiler_temp, desc->targetpc, TRUE); // UML_HASHJMP(block, 0, desc->targetpc, *arm->impstate->nocode); // hashjmp 0,desc->targetpc,nocode } @@ -2627,13 +2627,13 @@ static int generate_opcode(arm_state *arm, drcuml_block *block, compiler_state * UML_AND(block, I0, DRC_PC, ~3); } - UML_TEST(block, mem(&COPRO_CTRL), COPRO_CTRL_MMU_EN); // test COPRO_CTRL, COPRO_CTRL_MMU_EN - UML_MOVc(block, COND_NZ, I2, ARM7_TLB_ABORT_P | ARM7_TLB_READ); // movnz i0, ARM7_TLB_ABORT_P | ARM7_TLB_READ - UML_CALLHc(block, COND_NZ, *arm->impstate->tlb_translate); // callhnz tlb_translate); + UML_TEST(block, mem(&COPRO_CTRL), COPRO_CTRL_MMU_EN); // test COPRO_CTRL, COPRO_CTRL_MMU_EN + UML_MOVc(block, COND_NZ, I2, ARM7_TLB_ABORT_P | ARM7_TLB_READ); // movnz i0, ARM7_TLB_ABORT_P | ARM7_TLB_READ + UML_CALLHc(block, COND_NZ, *arm->impstate->tlb_translate); // callhnz tlb_translate); if (T_IS_SET(GET_CPSR)) { - UML_CALLH(block, *arm->impstate->drcthumb[(op & 0xffc0) >> 6); // callh drcthumb[op] + UML_CALLH(block, *arm->impstate->drcthumb[(op & 0xffc0) >> 6); // callh drcthumb[op] return TRUE; } @@ -2739,7 +2739,7 @@ static int generate_opcode(arm_state *arm, drcuml_block *block, compiler_state * UML_LABEL(block, unexecuted); UML_ADD(block, DRC_PC, DRC_PC, 4); - UML_ADD(block, MAPVAR_CYCLES, MAPVAR_CYCLES, 2); // add cycles, cycles, 2 + UML_ADD(block, MAPVAR_CYCLES, MAPVAR_CYCLES, 2); // add cycles, cycles, 2 UML_LABEL(block, skip); diff --git a/src/emu/cpu/arm7/arm7help.h b/src/emu/cpu/arm7/arm7help.h index e425014928b..6b67dbf6885 100644 --- a/src/emu/cpu/arm7/arm7help.h +++ b/src/emu/cpu/arm7/arm7help.h @@ -42,22 +42,22 @@ extern void SwitchMode(arm_state *arm, int cpsr_mode_val); | HandleALUNZFlags(rd))); \ R15 += 2; -#define DRCHandleThumbALUAddFlags(rd, rn, op2) \ - UML_AND(block, DRC_CPSR, DRC_CPSR, ~(N_MASK | Z_MASK | V_MASK | C_MASK)); \ - DRCHandleALUNZFlags(rd); \ - UML_XOR(block, I1, rn, ~0); \ - UML_CMP(block, I1, op2); \ - UML_MOVc(block, COND_B, I1, C_BIT); \ - UML_MOVc(block, COND_AE, I1, 0); \ - UML_OR(block, I0, I0, I1); \ - UML_XOR(block, I1, rn, op2); \ - UML_XOR(block, I2, rn, rd); \ - UML_AND(block, I1, I1, I2); \ - UML_TEST(block, I1, 1 << 31); \ - UML_MOVc(block, COND_NZ, I1, V_BIT); \ - UML_MOVc(block, COND_Z, I1, 0); \ - UML_OR(block, I0, I0, I1); \ - UML_OR(block, DRC_CPSR, DRC_CPSR, I0); \ +#define DRCHandleThumbALUAddFlags(rd, rn, op2) \ + UML_AND(block, DRC_CPSR, DRC_CPSR, ~(N_MASK | Z_MASK | V_MASK | C_MASK)); \ + DRCHandleALUNZFlags(rd); \ + UML_XOR(block, I1, rn, ~0); \ + UML_CMP(block, I1, op2); \ + UML_MOVc(block, COND_B, I1, C_BIT); \ + UML_MOVc(block, COND_AE, I1, 0); \ + UML_OR(block, I0, I0, I1); \ + UML_XOR(block, I1, rn, op2); \ + UML_XOR(block, I2, rn, rd); \ + UML_AND(block, I1, I1, I2); \ + UML_TEST(block, I1, 1 << 31); \ + UML_MOVc(block, COND_NZ, I1, V_BIT); \ + UML_MOVc(block, COND_Z, I1, 0); \ + UML_OR(block, I0, I0, I1); \ + UML_OR(block, DRC_CPSR, DRC_CPSR, I0); \ UML_ADD(block, DRC_PC, DRC_PC, 2); #define HandleALUSubFlags(rd, rn, op2) \ @@ -75,31 +75,31 @@ extern void SwitchMode(arm_state *arm, int cpsr_mode_val); | HandleALUNZFlags(rd))); \ R15 += 2; -#define DRCHandleThumbALUSubFlags(rd, rn, op2) \ - UML_AND(block, DRC_CPSR, DRC_CPSR, ~(N_MASK | Z_MASK | V_MASK | C_MASK)); \ - DRCHandleALUNZFlags(rd); \ - UML_XOR(block, I1, rn, op2); \ - UML_XOR(block, I2, rn, rd); \ - UML_AND(block, I1, I1, I2); \ - UML_TEST(block, I1, 1 << 31); \ - UML_MOVc(block, COND_NZ, I1, V_BIT); \ - UML_MOVc(block, COND_Z, I1, 0); \ - UML_OR(block, I0, I0, I1); \ - UML_OR(block, DRC_CPSR, DRC_CPSR, I0); \ - UML_AND(block, I0, rd, 1 << 31); \ - UML_AND(block, I1, op2, 1 << 31); \ - UML_AND(block, I2, rn, 1 << 31); \ - UML_XOR(block, I2, I2, ~0); \ - UML_AND(block, I1, I1, I2); \ - UML_AND(block, I2, I2, I0); \ - UML_OR(block, I1, I1, I2); \ - UML_AND(block, I2, op2, 1 << 31); \ - UML_AND(block, I2, I2, I0); \ - UML_OR(block, I1, I1, I2); \ - UML_TEST(block, I1, 1 << 31); \ - UML_MOVc(block, COND_NZ, I0, C_MASK); \ - UML_MOVc(block, COND_Z, I0, 0); \ - UML_OR(block, DRC_CPSR, DRC_CPSR, I0); \ +#define DRCHandleThumbALUSubFlags(rd, rn, op2) \ + UML_AND(block, DRC_CPSR, DRC_CPSR, ~(N_MASK | Z_MASK | V_MASK | C_MASK)); \ + DRCHandleALUNZFlags(rd); \ + UML_XOR(block, I1, rn, op2); \ + UML_XOR(block, I2, rn, rd); \ + UML_AND(block, I1, I1, I2); \ + UML_TEST(block, I1, 1 << 31); \ + UML_MOVc(block, COND_NZ, I1, V_BIT); \ + UML_MOVc(block, COND_Z, I1, 0); \ + UML_OR(block, I0, I0, I1); \ + UML_OR(block, DRC_CPSR, DRC_CPSR, I0); \ + UML_AND(block, I0, rd, 1 << 31); \ + UML_AND(block, I1, op2, 1 << 31); \ + UML_AND(block, I2, rn, 1 << 31); \ + UML_XOR(block, I2, I2, ~0); \ + UML_AND(block, I1, I1, I2); \ + UML_AND(block, I2, I2, I0); \ + UML_OR(block, I1, I1, I2); \ + UML_AND(block, I2, op2, 1 << 31); \ + UML_AND(block, I2, I2, I0); \ + UML_OR(block, I1, I1, I2); \ + UML_TEST(block, I1, 1 << 31); \ + UML_MOVc(block, COND_NZ, I0, C_MASK); \ + UML_MOVc(block, COND_Z, I0, 0); \ + UML_OR(block, DRC_CPSR, DRC_CPSR, I0); \ UML_ADD(block, DRC_PC, DRC_PC, 2); /* Set NZC flags for logical operations. */ @@ -109,11 +109,11 @@ extern void SwitchMode(arm_state *arm, int cpsr_mode_val); #define HandleALUNZFlags(rd) \ (((rd) & SIGN_BIT) | ((!(rd)) << Z_BIT)) -#define DRCHandleALUNZFlags(rd) \ - UML_AND(block, I0, rd, SIGN_BIT); \ - UML_CMP(block, rd, 0); \ - UML_MOVc(block, COND_E, I1, 1); \ - UML_MOVc(block, COND_NE, I1, 0); \ +#define DRCHandleALUNZFlags(rd) \ + UML_AND(block, I0, rd, SIGN_BIT); \ + UML_CMP(block, rd, 0); \ + UML_MOVc(block, COND_E, I1, 1); \ + UML_MOVc(block, COND_NE, I1, 0); \ UML_ROLINS(block, I0, I1, Z_BIT, 1 << Z_BIT); // Long ALU Functions use bit 63 @@ -127,23 +127,23 @@ extern void SwitchMode(arm_state *arm, int cpsr_mode_val); | (((sc) != 0) << C_BIT))); \ R15 += 4; -#define DRC_RD mem(&GET_REGISTER(arm, rd)) -#define DRC_RS mem(&GET_REGISTER(arm, rs)) -#define DRC_CPSR mem(&GET_CPSR) -#define DRC_PC mem(&R15) -#define DRC_REG(i) mem(&arm->r[(i)]); - -#define DRCHandleALULogicalFlags(rd, sc) \ - if (insn & INSN_S) \ - { \ - UML_AND(block, DRC_CPSR, DRC_CPSR, ~(N_MASK | Z_MASK | C_MASK); \ - DRCHandleALUNZFlags(rd); \ - UML_TEST(block, sc, ~0); \ - UML_MOVc(block, COND_Z, I1, C_BIT); \ - UML_MOVc(block, COND_NZ, I1, 0); \ - UML_OR(block, I0, I0, I1); \ - UML_OR(block, DRC_CPSR, DRC_CPSR, I0); \ - } \ +#define DRC_RD mem(&GET_REGISTER(arm, rd)) +#define DRC_RS mem(&GET_REGISTER(arm, rs)) +#define DRC_CPSR mem(&GET_CPSR) +#define DRC_PC mem(&R15) +#define DRC_REG(i) mem(&arm->r[(i)]); + +#define DRCHandleALULogicalFlags(rd, sc) \ + if (insn & INSN_S) \ + { \ + UML_AND(block, DRC_CPSR, DRC_CPSR, ~(N_MASK | Z_MASK | C_MASK); \ + DRCHandleALUNZFlags(rd); \ + UML_TEST(block, sc, ~0); \ + UML_MOVc(block, COND_Z, I1, C_BIT); \ + UML_MOVc(block, COND_NZ, I1, 0); \ + UML_OR(block, I0, I0, I1); \ + UML_OR(block, DRC_CPSR, DRC_CPSR, I0); \ + } \ UML_ADD(block, DRC_PC, DRC_PC, 4); void set_cpsr( arm_state *arm, UINT32 val); diff --git a/src/emu/cpu/arm7/arm7tdrc.c b/src/emu/cpu/arm7/arm7tdrc.c index b22ac905fd0..7159b63bc0a 100644 --- a/src/emu/cpu/arm7/arm7tdrc.c +++ b/src/emu/cpu/arm7/arm7tdrc.c @@ -8,149 +8,149 @@ arm7thumb_drcophandler drcthumb_handler[0x40*0x10] = { // #define THUMB_SHIFT_R ((UINT16)0x0800) - drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, - drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, - drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, - drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, - drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, - drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, - drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, - drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, + drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, + drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, + drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, + drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, drctg00_0, + drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, + drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, + drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, + drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, drctg00_1, // #define THUMB_INSN_ADDSUB ((UINT16)0x0800) // #define THUMB_ADDSUB_TYPE ((UINT16)0x0600) - drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, - drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, - drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, - drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, - drctg01_10, drctg01_10, drctg01_10, drctg01_10, drctg01_10, drctg01_10, drctg01_10, drctg01_10, - drctg01_11, drctg01_11, drctg01_11, drctg01_11, drctg01_11, drctg01_11, drctg01_11, drctg01_11, - drctg01_12, drctg01_12, drctg01_12, drctg01_12, drctg01_12, drctg01_12, drctg01_12, drctg01_12, - drctg01_13, drctg01_13, drctg01_13, drctg01_13, drctg01_13, drctg01_13, drctg01_13, drctg01_13, + drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, + drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, + drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, + drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, drctg01_0, + drctg01_10, drctg01_10, drctg01_10, drctg01_10, drctg01_10, drctg01_10, drctg01_10, drctg01_10, + drctg01_11, drctg01_11, drctg01_11, drctg01_11, drctg01_11, drctg01_11, drctg01_11, drctg01_11, + drctg01_12, drctg01_12, drctg01_12, drctg01_12, drctg01_12, drctg01_12, drctg01_12, drctg01_12, + drctg01_13, drctg01_13, drctg01_13, drctg01_13, drctg01_13, drctg01_13, drctg01_13, drctg01_13, // #define THUMB_INSN_CMP ((UINT16)0x0800) - drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, - drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, - drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, - drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, - drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, - drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, - drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, - drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, + drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, + drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, + drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, + drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, drctg02_0, + drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, + drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, + drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, + drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, drctg02_1, // #define THUMB_INSN_SUB ((UINT16)0x0800) - drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, - drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, - drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, - drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, - drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, - drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, - drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, - drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, + drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, + drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, + drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, + drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, drctg03_0, + drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, + drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, + drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, + drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, drctg03_1, //#define THUMB_GROUP4_TYPE ((UINT16)0x0c00) //#define THUMB_ALUOP_TYPE ((UINT16)0x03c0) // #define THUMB_HIREG_OP ((UINT16)0x0300) // #define THUMB_HIREG_H ((UINT16)0x00c0) - drctg04_00_00, drctg04_00_01, drctg04_00_02, drctg04_00_03, drctg04_00_04, drctg04_00_05, drctg04_00_06, drctg04_00_07, - drctg04_00_08, drctg04_00_09, drctg04_00_0a, drctg04_00_0b, drctg04_00_0c, drctg04_00_0d, drctg04_00_0e, drctg04_00_0f, - drctg04_01_00, drctg04_01_01, drctg04_01_02, drctg04_01_03, drctg04_01_10, drctg04_01_11, drctg04_01_12, drctg04_01_13, - drctg04_01_20, drctg04_01_21, drctg04_01_22, drctg04_01_23, drctg04_01_30, drctg04_01_31, drctg04_01_32, drctg04_01_33, - drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, - drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, - drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, - drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, + drctg04_00_00, drctg04_00_01, drctg04_00_02, drctg04_00_03, drctg04_00_04, drctg04_00_05, drctg04_00_06, drctg04_00_07, + drctg04_00_08, drctg04_00_09, drctg04_00_0a, drctg04_00_0b, drctg04_00_0c, drctg04_00_0d, drctg04_00_0e, drctg04_00_0f, + drctg04_01_00, drctg04_01_01, drctg04_01_02, drctg04_01_03, drctg04_01_10, drctg04_01_11, drctg04_01_12, drctg04_01_13, + drctg04_01_20, drctg04_01_21, drctg04_01_22, drctg04_01_23, drctg04_01_30, drctg04_01_31, drctg04_01_32, drctg04_01_33, + drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, + drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, + drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, + drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, drctg04_0203, //#define THUMB_GROUP5_TYPE ((UINT16)0x0e00) - drctg05_0, drctg05_0, drctg05_0, drctg05_0, drctg05_0, drctg05_0, drctg05_0, drctg05_0, - drctg05_1, drctg05_1, drctg05_1, drctg05_1, drctg05_1, drctg05_1, drctg05_1, drctg05_1, - drctg05_2, drctg05_2, drctg05_2, drctg05_2, drctg05_2, drctg05_2, drctg05_2, drctg05_2, - drctg05_3, drctg05_3, drctg05_3, drctg05_3, drctg05_3, drctg05_3, drctg05_3, drctg05_3, - drctg05_4, drctg05_4, drctg05_4, drctg05_4, drctg05_4, drctg05_4, drctg05_4, drctg05_4, - drctg05_5, drctg05_5, drctg05_5, drctg05_5, drctg05_5, drctg05_5, drctg05_5, drctg05_5, - drctg05_6, drctg05_6, drctg05_6, drctg05_6, drctg05_6, drctg05_6, drctg05_6, drctg05_6, - drctg05_7, drctg05_7, drctg05_7, drctg05_7, drctg05_7, drctg05_7, drctg05_7, drctg05_7, + drctg05_0, drctg05_0, drctg05_0, drctg05_0, drctg05_0, drctg05_0, drctg05_0, drctg05_0, + drctg05_1, drctg05_1, drctg05_1, drctg05_1, drctg05_1, drctg05_1, drctg05_1, drctg05_1, + drctg05_2, drctg05_2, drctg05_2, drctg05_2, drctg05_2, drctg05_2, drctg05_2, drctg05_2, + drctg05_3, drctg05_3, drctg05_3, drctg05_3, drctg05_3, drctg05_3, drctg05_3, drctg05_3, + drctg05_4, drctg05_4, drctg05_4, drctg05_4, drctg05_4, drctg05_4, drctg05_4, drctg05_4, + drctg05_5, drctg05_5, drctg05_5, drctg05_5, drctg05_5, drctg05_5, drctg05_5, drctg05_5, + drctg05_6, drctg05_6, drctg05_6, drctg05_6, drctg05_6, drctg05_6, drctg05_6, drctg05_6, + drctg05_7, drctg05_7, drctg05_7, drctg05_7, drctg05_7, drctg05_7, drctg05_7, drctg05_7, //#define THUMB_LSOP_L ((UINT16)0x0800) - drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, - drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, - drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, - drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, - drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, - drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, - drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, - drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, + drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, + drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, + drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, + drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, drctg06_0, + drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, + drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, + drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, + drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, drctg06_1, //#define THUMB_LSOP_L ((UINT16)0x0800) - drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, - drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, - drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, - drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, - drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, - drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, - drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, - drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, + drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, + drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, + drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, + drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, drctg07_0, + drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, + drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, + drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, + drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, drctg07_1, // #define THUMB_HALFOP_L ((UINT16)0x0800) - drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, - drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, - drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, - drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, - drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, - drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, - drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, - drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, + drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, + drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, + drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, + drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, drctg08_0, + drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, + drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, + drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, + drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, drctg08_1, // #define THUMB_STACKOP_L ((UINT16)0x0800) - drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, - drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, - drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, - drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, - drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, - drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, - drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, - drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, + drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, + drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, + drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, + drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, drctg09_0, + drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, + drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, + drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, + drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, drctg09_1, // #define THUMB_RELADDR_SP ((UINT16)0x0800) - drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, - drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, - drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, - drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, - drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, - drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, - drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, - drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, + drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, + drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, + drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, + drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, drctg0a_0, + drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, + drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, + drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, + drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, drctg0a_1, // #define THUMB_STACKOP_TYPE ((UINT16)0x0f00) - drctg0b_0, drctg0b_0, drctg0b_0, drctg0b_0, drctg0b_1, drctg0b_1, drctg0b_1, drctg0b_1, - drctg0b_2, drctg0b_2, drctg0b_2, drctg0b_2, drctg0b_3, drctg0b_3, drctg0b_3, drctg0b_3, - drctg0b_4, drctg0b_4, drctg0b_4, drctg0b_4, drctg0b_5, drctg0b_5, drctg0b_5, drctg0b_5, - drctg0b_6, drctg0b_6, drctg0b_6, drctg0b_6, drctg0b_7, drctg0b_7, drctg0b_7, drctg0b_7, - drctg0b_8, drctg0b_8, drctg0b_8, drctg0b_8, drctg0b_9, drctg0b_9, drctg0b_9, drctg0b_9, - drctg0b_a, drctg0b_a, drctg0b_a, drctg0b_a, drctg0b_b, drctg0b_b, drctg0b_b, drctg0b_b, - drctg0b_c, drctg0b_c, drctg0b_c, drctg0b_c, drctg0b_d, drctg0b_d, drctg0b_d, drctg0b_d, - drctg0b_e, drctg0b_e, drctg0b_e, drctg0b_e, drctg0b_f, drctg0b_f, drctg0b_f, drctg0b_f, + drctg0b_0, drctg0b_0, drctg0b_0, drctg0b_0, drctg0b_1, drctg0b_1, drctg0b_1, drctg0b_1, + drctg0b_2, drctg0b_2, drctg0b_2, drctg0b_2, drctg0b_3, drctg0b_3, drctg0b_3, drctg0b_3, + drctg0b_4, drctg0b_4, drctg0b_4, drctg0b_4, drctg0b_5, drctg0b_5, drctg0b_5, drctg0b_5, + drctg0b_6, drctg0b_6, drctg0b_6, drctg0b_6, drctg0b_7, drctg0b_7, drctg0b_7, drctg0b_7, + drctg0b_8, drctg0b_8, drctg0b_8, drctg0b_8, drctg0b_9, drctg0b_9, drctg0b_9, drctg0b_9, + drctg0b_a, drctg0b_a, drctg0b_a, drctg0b_a, drctg0b_b, drctg0b_b, drctg0b_b, drctg0b_b, + drctg0b_c, drctg0b_c, drctg0b_c, drctg0b_c, drctg0b_d, drctg0b_d, drctg0b_d, drctg0b_d, + drctg0b_e, drctg0b_e, drctg0b_e, drctg0b_e, drctg0b_f, drctg0b_f, drctg0b_f, drctg0b_f, // #define THUMB_MULTLS ((UINT16)0x0800) - drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, - drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, - drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, - drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, - drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, - drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, - drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, - drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, + drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, + drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, + drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, + drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, drctg0c_0, + drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, + drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, + drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, + drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, drctg0c_1, // #define THUMB_COND_TYPE ((UINT16)0x0f00) - drctg0d_0, drctg0d_0, drctg0d_0, drctg0d_0, drctg0d_1, drctg0d_1, drctg0d_1, drctg0d_1, - drctg0d_2, drctg0d_2, drctg0d_2, drctg0d_2, drctg0d_3, drctg0d_3, drctg0d_3, drctg0d_3, - drctg0d_4, drctg0d_4, drctg0d_4, drctg0d_4, drctg0d_5, drctg0d_5, drctg0d_5, drctg0d_5, - drctg0d_6, drctg0d_6, drctg0d_6, drctg0d_6, drctg0d_7, drctg0d_7, drctg0d_7, drctg0d_7, - drctg0d_8, drctg0d_8, drctg0d_8, drctg0d_8, drctg0d_9, drctg0d_9, drctg0d_9, drctg0d_9, - drctg0d_a, drctg0d_a, drctg0d_a, drctg0d_a, drctg0d_b, drctg0d_b, drctg0d_b, drctg0d_b, - drctg0d_c, drctg0d_c, drctg0d_c, drctg0d_c, drctg0d_d, drctg0d_d, drctg0d_d, drctg0d_d, - drctg0d_e, drctg0d_e, drctg0d_e, drctg0d_e, drctg0d_f, drctg0d_f, drctg0d_f, drctg0d_f, + drctg0d_0, drctg0d_0, drctg0d_0, drctg0d_0, drctg0d_1, drctg0d_1, drctg0d_1, drctg0d_1, + drctg0d_2, drctg0d_2, drctg0d_2, drctg0d_2, drctg0d_3, drctg0d_3, drctg0d_3, drctg0d_3, + drctg0d_4, drctg0d_4, drctg0d_4, drctg0d_4, drctg0d_5, drctg0d_5, drctg0d_5, drctg0d_5, + drctg0d_6, drctg0d_6, drctg0d_6, drctg0d_6, drctg0d_7, drctg0d_7, drctg0d_7, drctg0d_7, + drctg0d_8, drctg0d_8, drctg0d_8, drctg0d_8, drctg0d_9, drctg0d_9, drctg0d_9, drctg0d_9, + drctg0d_a, drctg0d_a, drctg0d_a, drctg0d_a, drctg0d_b, drctg0d_b, drctg0d_b, drctg0d_b, + drctg0d_c, drctg0d_c, drctg0d_c, drctg0d_c, drctg0d_d, drctg0d_d, drctg0d_d, drctg0d_d, + drctg0d_e, drctg0d_e, drctg0d_e, drctg0d_e, drctg0d_f, drctg0d_f, drctg0d_f, drctg0d_f, // #define THUMB_BLOP_LO ((UINT16)0x0800) - drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, - drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, - drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, - drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, - drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, - drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, - drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, - drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, + drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, + drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, + drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, + drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, drctg0e_0, + drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, + drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, + drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, + drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, drctg0e_1, // #define THUMB_BLOP_LO ((UINT16)0x0800) - drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, - drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, - drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, - drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, - drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, - drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, - drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, - drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, + drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, + drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, + drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, + drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, drctg0f_0, + drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, + drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, + drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, + drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, drctg0f_1, }; /* Shift operations */ @@ -1578,4 +1578,4 @@ const void drctg0f_1(arm_state *arm, drcuml_block *block, compiler_state *compil UML_MOV(block, DRC_PC, I0); } -#endif // ARM7_USE_DRC \ No newline at end of file +#endif // ARM7_USE_DRC diff --git a/src/emu/cpu/cpu.mak b/src/emu/cpu/cpu.mak index 7164e95e61e..f2026947a68 100644 --- a/src/emu/cpu/cpu.mak +++ b/src/emu/cpu/cpu.mak @@ -287,7 +287,7 @@ OBJDIRS += $(CPUOBJ)/es5510 CPUOBJS += $(CPUOBJ)/es5510/es5510.o endif -$(CPUOBJ)/es5510.o: $(CPUSRC)/es5510/es5510.c \ +$(CPUOBJ)/es5510.o: $(CPUSRC)/es5510/es5510.c \ $(CPUSRC)/es5510/es5510.h diff --git a/src/emu/cpu/dsp16/dsp16.c b/src/emu/cpu/dsp16/dsp16.c index d8a0ecf6190..f2ba79621a8 100644 --- a/src/emu/cpu/dsp16/dsp16.c +++ b/src/emu/cpu/dsp16/dsp16.c @@ -30,46 +30,46 @@ const device_type DSP16 = &device_creator; dsp16_device::dsp16_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : cpu_device(mconfig, DSP16, "DSP16", tag, owner, clock), - m_program_config("program", ENDIANNESS_LITTLE, 16, 16, -1), - m_data_config("data", ENDIANNESS_LITTLE, 16, 16, -1), - m_i(0), - m_pc(0), - m_pt(0), - m_pr(0), - m_pi(0), - m_j(0), - m_k(0), - m_rb(0), - m_re(0), - m_r0(0), - m_r1(0), - m_r2(0), - m_r3(0), - m_x(0), - m_y(0), - m_p(0), - m_a0(0), - m_a1(0), - m_auc(0), - m_psw(0), - m_c0(0), - m_c1(0), - m_c2(0), - m_sioc(0), - m_srta(0), - m_sdx(0), - m_pioc(0), - m_pdx0(0), - m_pdx1(0), - m_ppc(0), - m_cacheStart(CACHE_INVALID), - m_cacheEnd(CACHE_INVALID), - m_cacheRedoNextPC(CACHE_INVALID), - m_cacheIterations(0), - m_program(NULL), - m_data(NULL), - m_direct(NULL), - m_icount(0) + m_program_config("program", ENDIANNESS_LITTLE, 16, 16, -1), + m_data_config("data", ENDIANNESS_LITTLE, 16, 16, -1), + m_i(0), + m_pc(0), + m_pt(0), + m_pr(0), + m_pi(0), + m_j(0), + m_k(0), + m_rb(0), + m_re(0), + m_r0(0), + m_r1(0), + m_r2(0), + m_r3(0), + m_x(0), + m_y(0), + m_p(0), + m_a0(0), + m_a1(0), + m_auc(0), + m_psw(0), + m_c0(0), + m_c1(0), + m_c2(0), + m_sioc(0), + m_srta(0), + m_sdx(0), + m_pioc(0), + m_pdx0(0), + m_pdx1(0), + m_ppc(0), + m_cacheStart(CACHE_INVALID), + m_cacheEnd(CACHE_INVALID), + m_cacheRedoNextPC(CACHE_INVALID), + m_cacheIterations(0), + m_program(NULL), + m_data(NULL), + m_direct(NULL), + m_icount(0) { // Allocate & setup } @@ -195,8 +195,8 @@ void dsp16_device::device_reset() const address_space_config *dsp16_device::memory_space_config(address_spacenum spacenum) const { return (spacenum == AS_PROGRAM) ? &m_program_config : - (spacenum == AS_DATA) ? &m_data_config : - NULL; + (spacenum == AS_DATA) ? &m_data_config : + NULL; } @@ -325,7 +325,7 @@ void dsp16_device::execute_run() do { // debugging - m_ppc = m_pc; // copy PC to previous PC + m_ppc = m_pc; // copy PC to previous PC debugger_instruction_hook(this, m_pc); // instruction fetch & execute diff --git a/src/emu/cpu/dsp16/dsp16.h b/src/emu/cpu/dsp16/dsp16.h index b87f775a8e7..274f6f72f57 100644 --- a/src/emu/cpu/dsp16/dsp16.h +++ b/src/emu/cpu/dsp16/dsp16.h @@ -55,7 +55,7 @@ protected: // CPU registers // ROM Address Arithmetic Unit (XAAU) - UINT16 m_i; // 12 bits + UINT16 m_i; // 12 bits UINT16 m_pc; UINT16 m_pt; UINT16 m_pr; @@ -73,9 +73,9 @@ protected: UINT16 m_x; UINT32 m_y; UINT32 m_p; - UINT64 m_a0; // 36 bits - UINT64 m_a1; // 36 bits - UINT8 m_auc; // 6 bits + UINT64 m_a0; // 36 bits + UINT64 m_a1; // 36 bits + UINT8 m_auc; // 6 bits UINT16 m_psw; UINT8 m_c0; UINT8 m_c1; @@ -85,8 +85,8 @@ protected: UINT16 m_srta; UINT16 m_sdx; UINT16 m_pioc; - UINT16 m_pdx0; // pdx0 & pdx1 refer to the same physical register (page 6-1) - UINT16 m_pdx1; // but we keep them seperate for logic's sake. + UINT16 m_pdx0; // pdx0 & pdx1 refer to the same physical register (page 6-1) + UINT16 m_pdx1; // but we keep them seperate for logic's sake. // internal stuff UINT16 m_ppc; @@ -143,12 +143,12 @@ extern const device_type DSP16; enum { - DSP16_I, // ROM Address Arithmetic Unit (XAAU) + DSP16_I, // ROM Address Arithmetic Unit (XAAU) DSP16_PC, DSP16_PT, DSP16_PR, DSP16_PI, - DSP16_J, // RAM Address Arithmetic Unit (YAAU) + DSP16_J, // RAM Address Arithmetic Unit (YAAU) DSP16_K, DSP16_RB, DSP16_RE, @@ -156,7 +156,7 @@ enum DSP16_R1, DSP16_R2, DSP16_R3, - DSP16_X, // Data Arithmetic Unit (DAU) + DSP16_X, // Data Arithmetic Unit (DAU) DSP16_Y, DSP16_P, DSP16_A0, @@ -170,8 +170,8 @@ enum DSP16_SRTA, DSP16_SDX, DSP16_PIOC, - DSP16_PDX0, - DSP16_PDX1 + DSP16_PDX0, + DSP16_PDX1 }; diff --git a/src/emu/cpu/dsp16/dsp16dis.c b/src/emu/cpu/dsp16/dsp16dis.c index 9b58d190306..8b648f7a6d3 100644 --- a/src/emu/cpu/dsp16/dsp16dis.c +++ b/src/emu/cpu/dsp16/dsp16dis.c @@ -234,8 +234,8 @@ bool disasmSIField(const UINT8& SI) { switch (SI) { - case 0x00: return 0; // Not a software interrupt - case 0x01: return 1; // Software Interrupt + case 0x00: return 0; // Not a software interrupt + case 0x01: return 1; // Software Interrupt } return false; } @@ -505,7 +505,7 @@ CPU_DISASSEMBLE( dsp16a ) const UINT8 R = (op & 0x03f0) >> 4; astring yString = disasmYField(Y); astring rString = disasmRField(R); - // TODO: page 3-31 "special function encoding" + // TODO: page 3-31 "special function encoding" sprintf(buffer, "%s = %s", yString.cstr(), rString.cstr()); break; } diff --git a/src/emu/cpu/dsp16/dsp16ops.c b/src/emu/cpu/dsp16/dsp16ops.c index 778d0b7b1af..4bd704bade9 100644 --- a/src/emu/cpu/dsp16/dsp16ops.c +++ b/src/emu/cpu/dsp16/dsp16ops.c @@ -49,24 +49,24 @@ bool dsp16_device::conditionTest(const UINT8& CON) { switch (CON) { - case 0x00: return (m_psw & 0x8000); // mi (negative result) - case 0x01: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // pl (positive result) - case 0x02: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // eq (result == 0) - case 0x03: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // ne (result != 0) - case 0x04: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // lvs (logical overflow set) - case 0x05: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // lvc (logical overflow clear) - case 0x06: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // mvs (math. overflow set) - case 0x07: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // mvc (math. overflow clear) - case 0x08: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // heads (random bit set) - case 0x09: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // tails (random bit clear) - case 0x0a: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // c0ge (counter0 >= 0) - case 0x0b: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // c0lt (counter0 < 0) - case 0x0c: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // c1ge (counter1 >= 0) - case 0x0d: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // c1lt (counter1 < 0) - case 0x0e: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // true (always) - case 0x0f: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // false (never) - case 0x10: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // gt (result > 0 - case 0x11: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // le (result <= 0) + case 0x00: return (m_psw & 0x8000); // mi (negative result) + case 0x01: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // pl (positive result) + case 0x02: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // eq (result == 0) + case 0x03: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // ne (result != 0) + case 0x04: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // lvs (logical overflow set) + case 0x05: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // lvc (logical overflow clear) + case 0x06: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // mvs (math. overflow set) + case 0x07: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // mvc (math. overflow clear) + case 0x08: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // heads (random bit set) + case 0x09: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // tails (random bit clear) + case 0x0a: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // c0ge (counter0 >= 0) + case 0x0b: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // c0lt (counter0 < 0) + case 0x0c: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // c1ge (counter1 >= 0) + case 0x0d: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // c1lt (counter1 < 0) + case 0x0e: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // true (always) + case 0x0f: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // false (never) + case 0x10: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // gt (result > 0 + case 0x11: printf("UNIMPLEMENTED condition check @ PC 0x%04x\n", m_pc); return false; // le (result <= 0) default: logerror("Unrecognized condition at PC=0x%04x\n", m_pc); break; } return false; @@ -112,11 +112,11 @@ void* dsp16_device::registerFromRTable(const UINT8 &R) case 0x10: return (void*)&m_x; case 0x11: return (void*)&m_y; case 0x12: return (void*)addressYL(); - case 0x13: return (void*)&m_auc; // zero extended + case 0x13: return (void*)&m_auc; // zero extended case 0x14: return (void*)&m_psw; - case 0x15: return (void*)&m_c0; // sign extended - case 0x16: return (void*)&m_c1; // sign extended - case 0x17: return (void*)&m_c2; // sign extended + case 0x15: return (void*)&m_c0; // sign extended + case 0x16: return (void*)&m_c1; // sign extended + case 0x17: return (void*)&m_c2; // sign extended case 0x18: return (void*)&m_sioc; case 0x19: return (void*)&m_srta; case 0x1a: return (void*)&m_sdx; @@ -137,20 +137,20 @@ void dsp16_device::executeF1Field(const UINT8& F1, const UINT8& D, const UINT8& //UINT64* destinationReg = NULL; //switch (D) //{ - // case 0x00: destinationReg = &m_a0; - // case 0x01: destinationReg = &m_a1; - // default: break; + // case 0x00: destinationReg = &m_a0; + // case 0x01: destinationReg = &m_a1; + // default: break; //} // Which source is being used? //UINT64* sourceReg = NULL; //switch (S) //{ - // case 0x00: sourceReg = &m_a0; - // case 0x01: sourceReg = &m_a1; - // default: break; + // case 0x00: sourceReg = &m_a0; + // case 0x01: sourceReg = &m_a1; + // default: break; //} - + switch (F1) { case 0x00: printf("UNIMPLEMENTED F1 operation @ PC 0x%04x\n", m_pc); break; @@ -201,7 +201,7 @@ void dsp16_device::executeYFieldPost(const UINT8& Y) case 0x03: opReg = &m_r3; break; default: break; } - + const UINT8 lower = Y & 0x03; switch (lower) { @@ -341,7 +341,7 @@ void dsp16_device::execute_one(const UINT16& op, UINT8& cycles, UINT8& pcAdvance case 0x00: m_pt++; break; case 0x01: m_pt += m_i; break; } - cycles = 2; // TODO: 1 if cached + cycles = 2; // TODO: 1 if cached pcAdvance = 1; break; } @@ -355,15 +355,15 @@ void dsp16_device::execute_one(const UINT16& op, UINT8& cycles, UINT8& pcAdvance const UINT8 F1 = (op & 0x01e0) >> 5; bool useA1 = (opcode == 0x1b); if (Y != 0x00) printf("Unknown opcode @ PC=0x%04x", m_pc); - m_y = (useA1) ? (m_a1 & 0xffffffff) : (m_a0 & 0xffffffff); // TODO: What happens to Ax when it goes 32 bit (pc=3f & pc=47)? + m_y = (useA1) ? (m_a1 & 0xffffffff) : (m_a0 & 0xffffffff); // TODO: What happens to Ax when it goes 32 bit (pc=3f & pc=47)? executeF1Field(F1, D, S); - writeRegister(&m_x, data_read(m_pt)); // TODO: EXM Pin & internal/external ROM? Research. + writeRegister(&m_x, data_read(m_pt)); // TODO: EXM Pin & internal/external ROM? Research. switch (X) { case 0x00: m_pt++; break; case 0x01: m_pt += m_i; break; } - cycles = 2; // TODO: 1 if cached + cycles = 2; // TODO: 1 if cached pcAdvance = 1; break; } @@ -425,30 +425,30 @@ void dsp16_device::execute_one(const UINT16& op, UINT8& cycles, UINT8& pcAdvance const UINT8 S = (op & 0x0200) >> 9; const UINT8 D = (op & 0x0400) >> 10; const UINT8 F1 = (op & 0x01e0) >> 5; - executeF1Field(F1, D, S); - UINT16 temp = 0x0000; - UINT16* rN = (UINT16*)registerFromYFieldUpper(Z); - switch (X) - { - case 0x00: - temp = m_y & 0x0000ffff; - m_y &= 0xffff0000; - m_y |= data_read(*rN); - executeZFieldPartOne(Z, rN); - data_write(*rN, temp); - executeZFieldPartTwo(Z, rN); - break; - case 0x01: - temp = (m_y & 0xffff0000) >> 16; - m_y &= 0x0000ffff; - m_y |= (data_read(*rN) << 16); - executeZFieldPartOne(Z, rN); - data_write(*rN, temp); - executeZFieldPartTwo(Z, rN); - break; - } - cycles = 2; - pcAdvance = 1; + executeF1Field(F1, D, S); + UINT16 temp = 0x0000; + UINT16* rN = (UINT16*)registerFromYFieldUpper(Z); + switch (X) + { + case 0x00: + temp = m_y & 0x0000ffff; + m_y &= 0xffff0000; + m_y |= data_read(*rN); + executeZFieldPartOne(Z, rN); + data_write(*rN, temp); + executeZFieldPartTwo(Z, rN); + break; + case 0x01: + temp = (m_y & 0xffff0000) >> 16; + m_y &= 0x0000ffff; + m_y |= (data_read(*rN) << 16); + executeZFieldPartOne(Z, rN); + data_write(*rN, temp); + executeZFieldPartTwo(Z, rN); + break; + } + cycles = 2; + pcAdvance = 1; break; } case 0x1d: @@ -539,7 +539,7 @@ void dsp16_device::execute_one(const UINT16& op, UINT8& cycles, UINT8& pcAdvance // if CON [goto/call/return] : (page 3-22) const UINT8 CON = (op & 0x001f); bool conditionFulfilled = conditionTest(CON); - cycles = 3; // TODO: This may need to interact with the next opcode to make sure it doesn't exceed 3? + cycles = 3; // TODO: This may need to interact with the next opcode to make sure it doesn't exceed 3? pcAdvance = 1; if (!conditionFulfilled) { @@ -577,7 +577,7 @@ void dsp16_device::execute_one(const UINT16& op, UINT8& cycles, UINT8& pcAdvance } void* sourceReg = registerFromRTable(R); *destinationReg &= U64(0x00000ffff); - *destinationReg |= (*(UINT16*)sourceReg) << 16; // TODO: Fix for all registers + *destinationReg |= (*(UINT16*)sourceReg) << 16; // TODO: Fix for all registers if (*(UINT16*)sourceReg & 0x8000) *destinationReg |= U64(0xf00000000); // TODO: Special function encoding @@ -639,7 +639,7 @@ void dsp16_device::execute_one(const UINT16& op, UINT8& cycles, UINT8& pcAdvance const INT8 M = (op & 0x00ff); const UINT8 R = (op & 0x0e00) >> 9; void* reg = registerFromRImmediateField(R); - writeRegister(reg, (INT16)M); // Sign extend 8 bit int + writeRegister(reg, (INT16)M); // Sign extend 8 bit int cycles = 1; pcAdvance = 1; break; @@ -656,14 +656,14 @@ void dsp16_device::execute_one(const UINT16& op, UINT8& cycles, UINT8& pcAdvance // Do m_cacheStart = m_pc + 1; m_cacheEnd = m_pc + NI + 1; - m_cacheIterations = K-1; // -1 because we check the counter @ the end + m_cacheIterations = K-1; // -1 because we check the counter @ the end cycles = 1; pcAdvance = 1; } else { // Redo - m_cacheIterations = K-1; // -1 because we check the counter @ the end + m_cacheIterations = K-1; // -1 because we check the counter @ the end m_cacheRedoNextPC = m_pc + 1; m_pc = m_cacheStart; pcAdvance = 0; diff --git a/src/emu/cpu/es5510/es5510.c b/src/emu/cpu/es5510/es5510.c index 72705b188cd..0e1a6590f18 100644 --- a/src/emu/cpu/es5510/es5510.c +++ b/src/emu/cpu/es5510/es5510.c @@ -29,106 +29,106 @@ char *stpcpy_int (char *dst, const char *src) } inline static UINT8 setFlag(UINT8 ccr, UINT8 flag) { - return ccr | flag; + return ccr | flag; } inline static UINT8 clearFlag(UINT8 ccr, UINT8 flag) { - return ccr & ~flag; + return ccr & ~flag; } inline static UINT8 setFlagTo(UINT8 ccr, UINT8 flag, bool set) { - return set ? setFlag(ccr, flag) : clearFlag(ccr, flag); + return set ? setFlag(ccr, flag) : clearFlag(ccr, flag); } inline static bool isFlagSet(UINT8 ccr, UINT8 flag) { - return (ccr & flag) != 0; + return (ccr & flag) != 0; } inline static INT32 add(INT32 a, INT32 b, UINT8 &flags) { - INT32 aSign = a & 0x00800000; - INT32 bSign = (b & 0x00800000) == 0; - INT32 result = a + b; - INT32 resultSign = result & 0x00800000; - bool overflow = (aSign == bSign) && (aSign != resultSign); - bool carry = result & 0x01000000; - bool negative = resultSign != 0; - bool lessThan = (overflow && !negative) || (!overflow && negative); - flags = setFlagTo(flags, FLAG_C, carry); - flags = setFlagTo(flags, FLAG_N, negative); - flags = setFlagTo(flags, FLAG_Z, result == 0); - flags = setFlagTo(flags, FLAG_V, overflow); - flags = setFlagTo(flags, FLAG_LT, lessThan); - return result; + INT32 aSign = a & 0x00800000; + INT32 bSign = (b & 0x00800000) == 0; + INT32 result = a + b; + INT32 resultSign = result & 0x00800000; + bool overflow = (aSign == bSign) && (aSign != resultSign); + bool carry = result & 0x01000000; + bool negative = resultSign != 0; + bool lessThan = (overflow && !negative) || (!overflow && negative); + flags = setFlagTo(flags, FLAG_C, carry); + flags = setFlagTo(flags, FLAG_N, negative); + flags = setFlagTo(flags, FLAG_Z, result == 0); + flags = setFlagTo(flags, FLAG_V, overflow); + flags = setFlagTo(flags, FLAG_LT, lessThan); + return result; } inline static INT32 saturate(INT32 value, UINT8 &flags) { - if (isFlagSet(flags, FLAG_V)) { - return isFlagSet(flags, FLAG_N) ? 0x00800000 : 0x007fffff; - } else { - return value; - } + if (isFlagSet(flags, FLAG_V)) { + return isFlagSet(flags, FLAG_N) ? 0x00800000 : 0x007fffff; + } else { + return value; + } } inline static INT32 negate(INT32 value) { - return (value ^ 0x00ffffff) + 1; + return (value ^ 0x00ffffff) + 1; } inline static INT32 asl(INT32 value, int shift, UINT8 &flags) { - INT32 signBefore = value & 0x00800000; - INT32 result = (value << shift) & 0x00ffffff; - INT32 signAfter = result & 0x00800000; - bool overflow = signBefore != signAfter; - flags = setFlagTo(flags, FLAG_V, overflow); - return saturate(result, flags); + INT32 signBefore = value & 0x00800000; + INT32 result = (value << shift) & 0x00ffffff; + INT32 signAfter = result & 0x00800000; + bool overflow = signBefore != signAfter; + flags = setFlagTo(flags, FLAG_V, overflow); + return saturate(result, flags); } es5510_device::es5510_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : cpu_device(mconfig, ES5510, "ES5510", tag, owner, clock) + : cpu_device(mconfig, ES5510, "ES5510", tag, owner, clock) { - // Initialize ESP to mostly zeroed, configured for 64k samples of delay line memory, running (not halted) - icount = 0; - pc = 0; - state = STATE_HALTED; - memset(gpr, 0, 0xc0 * sizeof(gpr[0])); - ser0r = 0; - ser0l = 0; - ser1r = 0; - ser1l = 0; - ser2r = 0; - ser2l = 0; - ser3r = 0; - ser3l = 0; - machl = 0; - dil = 0; - memsiz = 0x00ffffff; - memmask = 0x00000000; - memincrement = 0x01000000; - memshift = 24; - dlength = 0; - abase = 0; - bbase = 0; - dbase = 0; - sigreg = 1; - mulshift = 1; - ccr = 0; - cmr = 0; - dol[0] = dol[1] = 0; - dol_count = 0; - - memset(instr, 0, 160 * sizeof(instr[0])); - memset(dram, 0, (1<<20) * sizeof(dram[0])); - - dol_latch = 0; - dil_latch = 0; - dadr_latch = 0; - gpr_latch = 0; - instr_latch = 0; - ram_sel = 0; - host_control = 0; - - memset(&alu, 0, sizeof(alu)); - memset(&mulacc, 0, sizeof(mulacc)); + // Initialize ESP to mostly zeroed, configured for 64k samples of delay line memory, running (not halted) + icount = 0; + pc = 0; + state = STATE_HALTED; + memset(gpr, 0, 0xc0 * sizeof(gpr[0])); + ser0r = 0; + ser0l = 0; + ser1r = 0; + ser1l = 0; + ser2r = 0; + ser2l = 0; + ser3r = 0; + ser3l = 0; + machl = 0; + dil = 0; + memsiz = 0x00ffffff; + memmask = 0x00000000; + memincrement = 0x01000000; + memshift = 24; + dlength = 0; + abase = 0; + bbase = 0; + dbase = 0; + sigreg = 1; + mulshift = 1; + ccr = 0; + cmr = 0; + dol[0] = dol[1] = 0; + dol_count = 0; + + memset(instr, 0, 160 * sizeof(instr[0])); + memset(dram, 0, (1<<20) * sizeof(dram[0])); + + dol_latch = 0; + dil_latch = 0; + dadr_latch = 0; + gpr_latch = 0; + instr_latch = 0; + ram_sel = 0; + host_control = 0; + + memset(&alu, 0, sizeof(alu)); + memset(&mulacc, 0, sizeof(mulacc)); } typedef es5510_device::alu_op_t alu_op_t; @@ -141,733 +141,733 @@ static inline INT64 SX64(INT64 x) { return (x & U64(0x0000800000000000)) ? x | U static inline INT64 SC64(INT64 x) { return x & U64(0x0000ffffffffffff); } static inline const char * const REGNAME(UINT8 r) { - static char rn[8]; - if (r < 234) { sprintf(rn, "GPR_%02x", r); return rn; } - switch(r) { - case 234: return "SER0R"; - case 235: return "SER0L"; - case 236: return "SER1R"; - case 237: return "SER1L"; - case 238: return "SER2R"; - case 239: return "SER2L"; - case 240: return "SER3R"; - case 241: return "SER3L"; - case 242: return "MACL"; - case 243: return "MACH"; - case 244: return "DIL/MEMSIZ"; - case 245: return "DLENGTH"; - case 246: return "ABASE"; - case 247: return "BBASE"; - case 248: return "DBASE"; - case 249: return "SIGREG"; - case 250: return "CCR"; - case 251: return "CMR"; - case 252: return "MINUS1"; - case 253: return "MIN"; - case 254: return "MAX"; - case 255: return "ZERO"; - } - return NULL; + static char rn[8]; + if (r < 234) { sprintf(rn, "GPR_%02x", r); return rn; } + switch(r) { + case 234: return "SER0R"; + case 235: return "SER0L"; + case 236: return "SER1R"; + case 237: return "SER1L"; + case 238: return "SER2R"; + case 239: return "SER2L"; + case 240: return "SER3R"; + case 241: return "SER3L"; + case 242: return "MACL"; + case 243: return "MACH"; + case 244: return "DIL/MEMSIZ"; + case 245: return "DLENGTH"; + case 246: return "ABASE"; + case 247: return "BBASE"; + case 248: return "DBASE"; + case 249: return "SIGREG"; + case 250: return "CCR"; + case 251: return "CMR"; + case 252: return "MINUS1"; + case 253: return "MIN"; + case 254: return "MAX"; + case 255: return "ZERO"; + } + return NULL; } static inline char * DESCRIBE_REG(char *s, UINT8 r) { - return stpcpy_int(s, REGNAME(r)); + return stpcpy_int(s, REGNAME(r)); } const alu_op_t es5510_device::ALU_OPS[16] = { - { 2, "ADD" }, - { 2, "SUB" }, - { 2, "ADDU" }, - { 2, "SUBU" }, - { 2, "CMP" }, - { 2, "AND" }, - { 2, "OR" }, - { 2, "XOR" }, - { 1, "ABS" }, - { 1, "MOV" }, - { 1, "ASL2" }, - { 1, "ASL8" }, - { 1, "LS15" }, - { 2, "DIFF" }, - { 1, "ASR" }, - { 0, "END" }, + { 2, "ADD" }, + { 2, "SUB" }, + { 2, "ADDU" }, + { 2, "SUBU" }, + { 2, "CMP" }, + { 2, "AND" }, + { 2, "OR" }, + { 2, "XOR" }, + { 1, "ABS" }, + { 1, "MOV" }, + { 1, "ASL2" }, + { 1, "ASL8" }, + { 1, "LS15" }, + { 2, "DIFF" }, + { 1, "ASR" }, + { 0, "END" }, }; // The CMP operation is not affected by being skippable #define OP_CMP (4) const op_select_t es5510_device::OPERAND_SELECT[16] = { - { es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG }, - { es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_DELAY }, - { es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_BOTH }, - { es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_REG }, - { es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_BOTH }, - { es5510_device::SRC_DST_REG, es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG }, - { es5510_device::SRC_DST_REG, es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_REG }, - { es5510_device::SRC_DST_REG, es5510_device::SRC_DST_BOTH, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG }, - { es5510_device::SRC_DST_REG, es5510_device::SRC_DST_BOTH, es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_REG }, - { es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG }, - { es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_DELAY }, - { es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_BOTH }, - { es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_REG }, - { es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_BOTH }, - { es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_BOTH, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG }, - { es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_BOTH, es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_REG }, + { es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG }, + { es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_DELAY }, + { es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_BOTH }, + { es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_REG }, + { es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_BOTH }, + { es5510_device::SRC_DST_REG, es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG }, + { es5510_device::SRC_DST_REG, es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_REG }, + { es5510_device::SRC_DST_REG, es5510_device::SRC_DST_BOTH, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG }, + { es5510_device::SRC_DST_REG, es5510_device::SRC_DST_BOTH, es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_REG }, + { es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG }, + { es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_DELAY }, + { es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_BOTH }, + { es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_REG }, + { es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_BOTH }, + { es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_BOTH, es5510_device::SRC_DST_REG, es5510_device::SRC_DST_REG }, + { es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_BOTH, es5510_device::SRC_DST_DELAY, es5510_device::SRC_DST_REG }, }; static inline char * DESCRIBE_SRC_DST(char *s, UINT8 reg, op_src_dst_t src_dst) { - switch (src_dst) { - case es5510_device::SRC_DST_REG: - return DESCRIBE_REG(s, reg); - case es5510_device::SRC_DST_DELAY: - return stpcpy_int(s, "Delay"); - case es5510_device::SRC_DST_BOTH: - s = DESCRIBE_REG(s, reg); - return stpcpy_int(s, ",Delay"); - } - // should never happen! - return s; + switch (src_dst) { + case es5510_device::SRC_DST_REG: + return DESCRIBE_REG(s, reg); + case es5510_device::SRC_DST_DELAY: + return stpcpy_int(s, "Delay"); + case es5510_device::SRC_DST_BOTH: + s = DESCRIBE_REG(s, reg); + return stpcpy_int(s, ",Delay"); + } + // should never happen! + return s; } const es5510_device::ram_control_t es5510_device::RAM_CONTROL[8] = { - { es5510_device::RAM_CYCLE_READ, es5510_device::RAM_CONTROL_DELAY, "Read Delay+%06x" }, - { es5510_device::RAM_CYCLE_WRITE, es5510_device::RAM_CONTROL_DELAY, "Write Delay+%06x" }, - { es5510_device::RAM_CYCLE_READ, es5510_device::RAM_CONTROL_TABLE_A, "Read Table A+%06x" }, - { es5510_device::RAM_CYCLE_WRITE, es5510_device::RAM_CONTROL_TABLE_A, "Write Table A+%06x" }, - { es5510_device::RAM_CYCLE_READ, es5510_device::RAM_CONTROL_TABLE_B, "Read Table B+%06x" }, - { es5510_device::RAM_CYCLE_DUMP_FIFO, es5510_device::RAM_CONTROL_DELAY, "Read Delay+%06x and Dump FIFO" }, - { es5510_device::RAM_CYCLE_READ, es5510_device::RAM_CONTROL_IO, "Read I/O at %06x" }, - { es5510_device::RAM_CYCLE_WRITE, es5510_device::RAM_CONTROL_IO, "Write I/o %06x" }, + { es5510_device::RAM_CYCLE_READ, es5510_device::RAM_CONTROL_DELAY, "Read Delay+%06x" }, + { es5510_device::RAM_CYCLE_WRITE, es5510_device::RAM_CONTROL_DELAY, "Write Delay+%06x" }, + { es5510_device::RAM_CYCLE_READ, es5510_device::RAM_CONTROL_TABLE_A, "Read Table A+%06x" }, + { es5510_device::RAM_CYCLE_WRITE, es5510_device::RAM_CONTROL_TABLE_A, "Write Table A+%06x" }, + { es5510_device::RAM_CYCLE_READ, es5510_device::RAM_CONTROL_TABLE_B, "Read Table B+%06x" }, + { es5510_device::RAM_CYCLE_DUMP_FIFO, es5510_device::RAM_CONTROL_DELAY, "Read Delay+%06x and Dump FIFO" }, + { es5510_device::RAM_CYCLE_READ, es5510_device::RAM_CONTROL_IO, "Read I/O at %06x" }, + { es5510_device::RAM_CYCLE_WRITE, es5510_device::RAM_CONTROL_IO, "Write I/o %06x" }, }; static inline char * DESCRIBE_RAM(char *s, UINT8 ramControl, UINT32 gprContents) { - return s + sprintf(s, es5510_device::RAM_CONTROL[ramControl].description, SC(gprContents)); + return s + sprintf(s, es5510_device::RAM_CONTROL[ramControl].description, SC(gprContents)); } static inline char * DESCRIBE_ALU(char *s, UINT8 opcode, UINT8 aReg, UINT8 bReg, const op_select_t &opSelect) { - const alu_op_t &op = es5510_device::ALU_OPS[opcode]; + const alu_op_t &op = es5510_device::ALU_OPS[opcode]; - switch (op.operands) { - case 0: - return stpcpy_int(s, op.opcode); + switch (op.operands) { + case 0: + return stpcpy_int(s, op.opcode); - case 1: - s += sprintf(s, "%s %s >", op.opcode, REGNAME(bReg)); - return DESCRIBE_SRC_DST(s, aReg, opSelect.alu_dst); - - case 2: - s += sprintf(s, "%s %s,", op.opcode, REGNAME(bReg)); - s = DESCRIBE_SRC_DST(s, aReg, opSelect.alu_src); - s += sprintf(s, " >"); - return DESCRIBE_SRC_DST(s, aReg, opSelect.alu_dst); - } - return s; + case 1: + s += sprintf(s, "%s %s >", op.opcode, REGNAME(bReg)); + return DESCRIBE_SRC_DST(s, aReg, opSelect.alu_dst); + + case 2: + s += sprintf(s, "%s %s,", op.opcode, REGNAME(bReg)); + s = DESCRIBE_SRC_DST(s, aReg, opSelect.alu_src); + s += sprintf(s, " >"); + return DESCRIBE_SRC_DST(s, aReg, opSelect.alu_dst); + } + return s; } static inline char * DESCRIBE_MAC(char *s, UINT8 mac, UINT8 cReg, UINT8 dReg, const op_select_t &opSelect) { - if (mac) - { - s += sprintf(s, "MAC + "); - } - s = DESCRIBE_REG(s, dReg); - s += sprintf(s, " * "); - s = DESCRIBE_SRC_DST(s, cReg, opSelect.mac_src); - s += sprintf(s, " >"); - return DESCRIBE_SRC_DST(s, cReg, opSelect.mac_dst); + if (mac) + { + s += sprintf(s, "MAC + "); + } + s = DESCRIBE_REG(s, dReg); + s += sprintf(s, " * "); + s = DESCRIBE_SRC_DST(s, cReg, opSelect.mac_src); + s += sprintf(s, " >"); + return DESCRIBE_SRC_DST(s, cReg, opSelect.mac_dst); } static inline char * DESCRIBE_INSTR(char *s, UINT64 instr, UINT32 gpr) { - UINT8 dReg = (UINT8)((instr >> 40) & 0xff); - UINT8 cReg = (UINT8)((instr >> 32) & 0xff); - UINT8 bReg = (UINT8)((instr >> 24) & 0xff); - UINT8 aReg = (UINT8)((instr >> 16) & 0xff); - UINT8 aluOpcode = (UINT8)((instr >> 12) & 0x0f); - UINT8 operandSelect = (UINT8)((instr >> 8) & 0x0f); - UINT8 skip = (UINT8)((instr >> 7) & 0x01); - UINT8 mac = (UINT8)((instr >> 6) & 0x01); - UINT8 ramControl = (UINT8)((instr >> 3) & 0x07); - - const op_select_t &opSelect = es5510_device::OPERAND_SELECT[operandSelect]; - - s = DESCRIBE_ALU(s, aluOpcode, aReg, bReg, opSelect); - s += sprintf(s, "; "); - s = DESCRIBE_MAC(s, mac, cReg, dReg, opSelect); - s += sprintf(s, "; "); - s = DESCRIBE_RAM(s, ramControl, gpr); - if (skip) { - s += sprintf(s, "; skippable"); - } + UINT8 dReg = (UINT8)((instr >> 40) & 0xff); + UINT8 cReg = (UINT8)((instr >> 32) & 0xff); + UINT8 bReg = (UINT8)((instr >> 24) & 0xff); + UINT8 aReg = (UINT8)((instr >> 16) & 0xff); + UINT8 aluOpcode = (UINT8)((instr >> 12) & 0x0f); + UINT8 operandSelect = (UINT8)((instr >> 8) & 0x0f); + UINT8 skip = (UINT8)((instr >> 7) & 0x01); + UINT8 mac = (UINT8)((instr >> 6) & 0x01); + UINT8 ramControl = (UINT8)((instr >> 3) & 0x07); + + const op_select_t &opSelect = es5510_device::OPERAND_SELECT[operandSelect]; + + s = DESCRIBE_ALU(s, aluOpcode, aReg, bReg, opSelect); + s += sprintf(s, "; "); + s = DESCRIBE_MAC(s, mac, cReg, dReg, opSelect); + s += sprintf(s, "; "); + s = DESCRIBE_RAM(s, ramControl, gpr); + if (skip) { + s += sprintf(s, "; skippable"); + } - return s; + return s; } READ8_MEMBER(es5510_device::host_r) { - // printf("%06x: DSP read offset %04x (data is %04x)\n",space.device().safe_pc(),offset,dsp_ram[offset]); - - // VFX hack - if (mame_stricmp(space.machine().system().name, "vfx") == 0) - { - if (space.device().safe_pc() == 0xc091f0) - { - return space.device().state().state_int(M68K_D2); - } - } - - switch(offset) - { - case 0x00: logerror("ES5510: Read GPR latch[2]: %02x\n", (gpr_latch >> 16) & 0xff); return (gpr_latch >> 16) & 0xff; - case 0x01: logerror("ES5510: Read GPR latch[1]: %02x\n", (gpr_latch >> 8) & 0xff); return (gpr_latch >> 8) & 0xff; - case 0x02: logerror("ES5510: Read GPR latch[0]: %02x\n", (gpr_latch >> 0) & 0xff); return (gpr_latch >> 0) & 0xff; - - case 0x03: logerror("ES5510: Read INSTR latch[5]: %02x\n", (UINT8)((instr_latch >> 40) & 0xff)); return (instr_latch >> 40) & 0xff; - case 0x04: logerror("ES5510: Read INSTR latch[4]: %02x\n", (UINT8)((instr_latch >> 32) & 0xff)); return (instr_latch >> 32) & 0xff; - case 0x05: logerror("ES5510: Read INSTR latch[3]: %02x\n", (UINT8)((instr_latch >> 24) & 0xff)); return (instr_latch >> 24) & 0xff; - case 0x06: logerror("ES5510: Read INSTR latch[2]: %02x\n", (UINT8)((instr_latch >> 16) & 0xff)); return (instr_latch >> 16) & 0xff; - case 0x07: logerror("ES5510: Read INSTR latch[1]: %02x\n", (UINT8)((instr_latch >> 8) & 0xff)); return (instr_latch >> 8) & 0xff; - case 0x08: logerror("ES5510: Read INSTR latch[0]: %02x\n", (UINT8)((instr_latch >> 0) & 0xff)); return (instr_latch >> 0) & 0xff; - - case 0x09: logerror("ES5510: Read DIL latch[2]: %02x\n", (dil_latch >> 16) & 0xff); return (dil_latch >> 16) & 0xff; - case 0x0a: logerror("ES5510: Read DIL latch[1]: %02x\n", (dil_latch >> 8) & 0xff); return (dil_latch >> 8) & 0xff; - case 0x0b: logerror("ES5510: Read DIL latch[0]: %02x\n", (dil_latch >> 0) & 0xff); return (dil_latch >> 0) & 0xff; //TODO: docs says that this always returns 0 - - case 0x0c: logerror("ES5510: Read DOL latch[2]: %02x\n", (dol_latch >> 16) & 0xff); return (dol_latch >> 16) & 0xff; - case 0x0d: logerror("ES5510: Read DOL latch[1]: %02x\n", (dol_latch >> 8) & 0xff); return (dol_latch >> 8) & 0xff; - case 0x0e: logerror("ES5510: Read DOL latch[0]: %02x\n", (dol_latch >> 0) & 0xff); return (dol_latch >> 0) & 0xff; //TODO: docs says that this always returns 0 - - case 0x0f: logerror("ES5510: Read DADR latch[2]: %02x\n", (dadr_latch >> 16) & 0xff); return (dadr_latch >> 16) & 0xff; - case 0x10: logerror("ES5510: Read DADR latch[1]: %02x\n", (dadr_latch >> 8) & 0xff); return (dadr_latch >> 8) & 0xff; - case 0x11: logerror("ES5510: Read DADR latch[0]: %02x\n", (dadr_latch >> 0) & 0xff); return (dadr_latch >> 0) & 0xff; - - case 0x12: logerror("ES5510: Reading Host Control\n"); return 0; // Host Control - - case 0x16: return 0x27; // Program Counter, for test purposes only - } - - // default: 0. - return 0x00; + // printf("%06x: DSP read offset %04x (data is %04x)\n",space.device().safe_pc(),offset,dsp_ram[offset]); + + // VFX hack + if (mame_stricmp(space.machine().system().name, "vfx") == 0) + { + if (space.device().safe_pc() == 0xc091f0) + { + return space.device().state().state_int(M68K_D2); + } + } + + switch(offset) + { + case 0x00: logerror("ES5510: Read GPR latch[2]: %02x\n", (gpr_latch >> 16) & 0xff); return (gpr_latch >> 16) & 0xff; + case 0x01: logerror("ES5510: Read GPR latch[1]: %02x\n", (gpr_latch >> 8) & 0xff); return (gpr_latch >> 8) & 0xff; + case 0x02: logerror("ES5510: Read GPR latch[0]: %02x\n", (gpr_latch >> 0) & 0xff); return (gpr_latch >> 0) & 0xff; + + case 0x03: logerror("ES5510: Read INSTR latch[5]: %02x\n", (UINT8)((instr_latch >> 40) & 0xff)); return (instr_latch >> 40) & 0xff; + case 0x04: logerror("ES5510: Read INSTR latch[4]: %02x\n", (UINT8)((instr_latch >> 32) & 0xff)); return (instr_latch >> 32) & 0xff; + case 0x05: logerror("ES5510: Read INSTR latch[3]: %02x\n", (UINT8)((instr_latch >> 24) & 0xff)); return (instr_latch >> 24) & 0xff; + case 0x06: logerror("ES5510: Read INSTR latch[2]: %02x\n", (UINT8)((instr_latch >> 16) & 0xff)); return (instr_latch >> 16) & 0xff; + case 0x07: logerror("ES5510: Read INSTR latch[1]: %02x\n", (UINT8)((instr_latch >> 8) & 0xff)); return (instr_latch >> 8) & 0xff; + case 0x08: logerror("ES5510: Read INSTR latch[0]: %02x\n", (UINT8)((instr_latch >> 0) & 0xff)); return (instr_latch >> 0) & 0xff; + + case 0x09: logerror("ES5510: Read DIL latch[2]: %02x\n", (dil_latch >> 16) & 0xff); return (dil_latch >> 16) & 0xff; + case 0x0a: logerror("ES5510: Read DIL latch[1]: %02x\n", (dil_latch >> 8) & 0xff); return (dil_latch >> 8) & 0xff; + case 0x0b: logerror("ES5510: Read DIL latch[0]: %02x\n", (dil_latch >> 0) & 0xff); return (dil_latch >> 0) & 0xff; //TODO: docs says that this always returns 0 + + case 0x0c: logerror("ES5510: Read DOL latch[2]: %02x\n", (dol_latch >> 16) & 0xff); return (dol_latch >> 16) & 0xff; + case 0x0d: logerror("ES5510: Read DOL latch[1]: %02x\n", (dol_latch >> 8) & 0xff); return (dol_latch >> 8) & 0xff; + case 0x0e: logerror("ES5510: Read DOL latch[0]: %02x\n", (dol_latch >> 0) & 0xff); return (dol_latch >> 0) & 0xff; //TODO: docs says that this always returns 0 + + case 0x0f: logerror("ES5510: Read DADR latch[2]: %02x\n", (dadr_latch >> 16) & 0xff); return (dadr_latch >> 16) & 0xff; + case 0x10: logerror("ES5510: Read DADR latch[1]: %02x\n", (dadr_latch >> 8) & 0xff); return (dadr_latch >> 8) & 0xff; + case 0x11: logerror("ES5510: Read DADR latch[0]: %02x\n", (dadr_latch >> 0) & 0xff); return (dadr_latch >> 0) & 0xff; + + case 0x12: logerror("ES5510: Reading Host Control\n"); return 0; // Host Control + + case 0x16: return 0x27; // Program Counter, for test purposes only + } + + // default: 0. + return 0x00; } WRITE8_MEMBER(es5510_device::host_w) { - static char buf[1024]; - switch (offset) { - case 0x00: - gpr_latch = (gpr_latch&0x00ffff) | ((data&0xff)<<16); - logerror("ES5510: Write GPR latch[2] = %02x -> %06x (%d)\n", data, gpr_latch, SX(gpr_latch)); - break; - case 0x01: - gpr_latch = (gpr_latch&0xff00ff) | ((data&0xff)<< 8); - logerror("ES5510: Write GPR latch[1] = %02x -> %06x (%d)\n", data, gpr_latch, SX(gpr_latch)); - break; - case 0x02: - gpr_latch = (gpr_latch&0xffff00) | ((data&0xff)<< 0); - logerror("ES5510: Write GPR latch[0] = %02x -> %06x (%d)\n", data, gpr_latch, SX(gpr_latch)); - break; - - /* 0x03 to 0x08 INSTR Register */ - case 0x03: instr_latch = ((instr_latch&U64(0x00ffffffffff)) | ((INT64)data&0xff)<<40); logerror("ES5510: Write INSTR latch[5] = %02x -> %012" I64FMT "x\n", data, instr_latch); break; - case 0x04: instr_latch = ((instr_latch&U64(0xff00ffffffff)) | ((INT64)data&0xff)<<32); logerror("ES5510: Write INSTR latch[4] = %02x -> %012" I64FMT "x\n", data, instr_latch); break; - case 0x05: instr_latch = ((instr_latch&U64(0xffff00ffffff)) | ((INT64)data&0xff)<<24); logerror("ES5510: Write INSTR latch[3] = %02x -> %012" I64FMT "x\n", data, instr_latch); break; - case 0x06: instr_latch = ((instr_latch&U64(0xffffff00ffff)) | ((INT64)data&0xff)<<16); logerror("ES5510: Write INSTR latch[2] = %02x -> %012" I64FMT "x\n", data, instr_latch); break; - case 0x07: instr_latch = ((instr_latch&U64(0xffffffff00ff)) | ((INT64)data&0xff)<< 8); logerror("ES5510: Write INSTR latch[1] = %02x -> %012" I64FMT "x\n", data, instr_latch); break; - case 0x08: instr_latch = ((instr_latch&U64(0xffffffffff00)) | ((INT64)data&0xff)<< 0); logerror("ES5510: Write INSTR latch[0] = %02x -> %012" I64FMT "x\n", data, instr_latch); break; - - /* 0x09 to 0x0b DIL Register (r/o) */ - - case 0x0c: dol_latch = (dol_latch&0x00ffff) | ((data&0xff)<<16); logerror("ES5510: Write DOL latch[2] = %02x -> %06x (%d)\n", data, dol_latch, SX(dol_latch)); break; - case 0x0d: dol_latch = (dol_latch&0xff00ff) | ((data&0xff)<< 8); logerror("ES5510: Write DOL latch[1] = %02x -> %06x (%d)\n", data, dol_latch, SX(dol_latch)); break; - case 0x0e: dol_latch = (dol_latch&0xffff00) | ((data&0xff)<< 0); logerror("ES5510: Write DOL latch[0] = %02x -> %06x (%d)\n", data, dol_latch, SX(dol_latch)); break; //TODO: docs says that this always returns 0xff - - case 0x0f: - dadr_latch = (dadr_latch&0x00ffff) | ((data&0xff)<<16); - if (ram_sel) - { - dil_latch = dram[dadr_latch]; - } - else - { - dram[dadr_latch] = dol_latch; - } - break; - - case 0x10: dadr_latch = (dadr_latch&0xff00ff) | ((data&0xff)<< 8); break; - case 0x11: dadr_latch = (dadr_latch&0xffff00) | ((data&0xff)<< 0); break; - - /* 0x12 Host Control */ - - case 0x14: ram_sel = data & 0x80; /* bit 6 is i/o select, everything else is undefined */break; - - /* 0x16 Program Counter (test purpose, r/o?) */ - /* 0x17 Internal Refresh counter (test purpose) */ - /* 0x18 Host Serial Control */ - case 0x18: - logerror("ES5510: Write Host Serial control %02x: %s, %s, ser3 %s, ser2 %s, ser1 %s, ser0 %s\n", data, - data&0x80 ? "Master" : "Slave", - data&0x40 ? "Sony" : "I2S", - data & 0x20 ? "Out" : "In", - data & 0x10 ? "Out" : "In", - data & 0x08 ? "Out" : "In", - data & 0x04 ? "Out" : "In"); - break; - - /* 0x1f Halt enable (w) / Frame Counter (r) */ - case 0x1F: - logerror("ES5510: Write Halt Enable %02x; HALT line is %d\n", data, input_state(ES5510_HALT)); - if (input_state(ES5510_HALT)) { - logerror("ES5510: Write to Halt Enable while HALT line is asserted: Halting!\n"); - state = STATE_HALTED; - } - break; - - case 0x80: /* Read select - GPR + INSTR */ - logerror("ES5510: Read INSTR+GPR %02x (%s): %012" I64FMT "x %06x (%d)\n", data, REGNAME(data & 0xff), instr[data] & U64(0xffffffffffff), gpr[data] & 0xffffff, gpr[data]); - - /* Check if an INSTR address is selected */ - if (data < 0xa0) { - instr_latch = instr[data]; - } - if (data < 0xc0) { - gpr_latch = gpr[data] & 0xffffff; - } else if (data >= 0xea) { - gpr_latch = read_reg(data); - } - break; - - case 0xa0: /* Write select - GPR */ - logerror("ES5510: Write GPR %02x (%s): %06x (%d)\n",data, REGNAME(data&0xff), gpr_latch, SX(gpr_latch)); - write_reg(data, gpr_latch); - break; - - case 0xc0: /* Write select - INSTR */ - DESCRIBE_INSTR(buf, instr_latch, gpr[data]); - logerror("ES5510: Write INSTR %02x %012" I64FMT "x: %s\n",data, instr_latch&U64(0xffffffffffff), buf); - if (data < 0xa0) { - instr[data] = instr_latch&U64(0xffffffffffff); - } - break; - - case 0xe0: /* Write select - GPR + INSTR */ - DESCRIBE_INSTR(buf, instr_latch, gpr_latch); - logerror("ES5510: Write INSTR+GPR %02x (%s): %012" I64FMT "x %06x (%d): %s\n",data, REGNAME(data&0xff), instr_latch, gpr_latch, SX(gpr_latch), buf); - if (data < 0xa0) { - instr[data] = instr_latch; - } - write_reg(data, gpr_latch); - break; - } + static char buf[1024]; + switch (offset) { + case 0x00: + gpr_latch = (gpr_latch&0x00ffff) | ((data&0xff)<<16); + logerror("ES5510: Write GPR latch[2] = %02x -> %06x (%d)\n", data, gpr_latch, SX(gpr_latch)); + break; + case 0x01: + gpr_latch = (gpr_latch&0xff00ff) | ((data&0xff)<< 8); + logerror("ES5510: Write GPR latch[1] = %02x -> %06x (%d)\n", data, gpr_latch, SX(gpr_latch)); + break; + case 0x02: + gpr_latch = (gpr_latch&0xffff00) | ((data&0xff)<< 0); + logerror("ES5510: Write GPR latch[0] = %02x -> %06x (%d)\n", data, gpr_latch, SX(gpr_latch)); + break; + + /* 0x03 to 0x08 INSTR Register */ + case 0x03: instr_latch = ((instr_latch&U64(0x00ffffffffff)) | ((INT64)data&0xff)<<40); logerror("ES5510: Write INSTR latch[5] = %02x -> %012" I64FMT "x\n", data, instr_latch); break; + case 0x04: instr_latch = ((instr_latch&U64(0xff00ffffffff)) | ((INT64)data&0xff)<<32); logerror("ES5510: Write INSTR latch[4] = %02x -> %012" I64FMT "x\n", data, instr_latch); break; + case 0x05: instr_latch = ((instr_latch&U64(0xffff00ffffff)) | ((INT64)data&0xff)<<24); logerror("ES5510: Write INSTR latch[3] = %02x -> %012" I64FMT "x\n", data, instr_latch); break; + case 0x06: instr_latch = ((instr_latch&U64(0xffffff00ffff)) | ((INT64)data&0xff)<<16); logerror("ES5510: Write INSTR latch[2] = %02x -> %012" I64FMT "x\n", data, instr_latch); break; + case 0x07: instr_latch = ((instr_latch&U64(0xffffffff00ff)) | ((INT64)data&0xff)<< 8); logerror("ES5510: Write INSTR latch[1] = %02x -> %012" I64FMT "x\n", data, instr_latch); break; + case 0x08: instr_latch = ((instr_latch&U64(0xffffffffff00)) | ((INT64)data&0xff)<< 0); logerror("ES5510: Write INSTR latch[0] = %02x -> %012" I64FMT "x\n", data, instr_latch); break; + + /* 0x09 to 0x0b DIL Register (r/o) */ + + case 0x0c: dol_latch = (dol_latch&0x00ffff) | ((data&0xff)<<16); logerror("ES5510: Write DOL latch[2] = %02x -> %06x (%d)\n", data, dol_latch, SX(dol_latch)); break; + case 0x0d: dol_latch = (dol_latch&0xff00ff) | ((data&0xff)<< 8); logerror("ES5510: Write DOL latch[1] = %02x -> %06x (%d)\n", data, dol_latch, SX(dol_latch)); break; + case 0x0e: dol_latch = (dol_latch&0xffff00) | ((data&0xff)<< 0); logerror("ES5510: Write DOL latch[0] = %02x -> %06x (%d)\n", data, dol_latch, SX(dol_latch)); break; //TODO: docs says that this always returns 0xff + + case 0x0f: + dadr_latch = (dadr_latch&0x00ffff) | ((data&0xff)<<16); + if (ram_sel) + { + dil_latch = dram[dadr_latch]; + } + else + { + dram[dadr_latch] = dol_latch; + } + break; + + case 0x10: dadr_latch = (dadr_latch&0xff00ff) | ((data&0xff)<< 8); break; + case 0x11: dadr_latch = (dadr_latch&0xffff00) | ((data&0xff)<< 0); break; + + /* 0x12 Host Control */ + + case 0x14: ram_sel = data & 0x80; /* bit 6 is i/o select, everything else is undefined */break; + + /* 0x16 Program Counter (test purpose, r/o?) */ + /* 0x17 Internal Refresh counter (test purpose) */ + /* 0x18 Host Serial Control */ + case 0x18: + logerror("ES5510: Write Host Serial control %02x: %s, %s, ser3 %s, ser2 %s, ser1 %s, ser0 %s\n", data, + data&0x80 ? "Master" : "Slave", + data&0x40 ? "Sony" : "I2S", + data & 0x20 ? "Out" : "In", + data & 0x10 ? "Out" : "In", + data & 0x08 ? "Out" : "In", + data & 0x04 ? "Out" : "In"); + break; + + /* 0x1f Halt enable (w) / Frame Counter (r) */ + case 0x1F: + logerror("ES5510: Write Halt Enable %02x; HALT line is %d\n", data, input_state(ES5510_HALT)); + if (input_state(ES5510_HALT)) { + logerror("ES5510: Write to Halt Enable while HALT line is asserted: Halting!\n"); + state = STATE_HALTED; + } + break; + + case 0x80: /* Read select - GPR + INSTR */ + logerror("ES5510: Read INSTR+GPR %02x (%s): %012" I64FMT "x %06x (%d)\n", data, REGNAME(data & 0xff), instr[data] & U64(0xffffffffffff), gpr[data] & 0xffffff, gpr[data]); + + /* Check if an INSTR address is selected */ + if (data < 0xa0) { + instr_latch = instr[data]; + } + if (data < 0xc0) { + gpr_latch = gpr[data] & 0xffffff; + } else if (data >= 0xea) { + gpr_latch = read_reg(data); + } + break; + + case 0xa0: /* Write select - GPR */ + logerror("ES5510: Write GPR %02x (%s): %06x (%d)\n",data, REGNAME(data&0xff), gpr_latch, SX(gpr_latch)); + write_reg(data, gpr_latch); + break; + + case 0xc0: /* Write select - INSTR */ + DESCRIBE_INSTR(buf, instr_latch, gpr[data]); + logerror("ES5510: Write INSTR %02x %012" I64FMT "x: %s\n",data, instr_latch&U64(0xffffffffffff), buf); + if (data < 0xa0) { + instr[data] = instr_latch&U64(0xffffffffffff); + } + break; + + case 0xe0: /* Write select - GPR + INSTR */ + DESCRIBE_INSTR(buf, instr_latch, gpr_latch); + logerror("ES5510: Write INSTR+GPR %02x (%s): %012" I64FMT "x %06x (%d): %s\n",data, REGNAME(data&0xff), instr_latch, gpr_latch, SX(gpr_latch), buf); + if (data < 0xa0) { + instr[data] = instr_latch; + } + write_reg(data, gpr_latch); + break; + } } void es5510_device::device_start() { - m_icountptr = &icount; - state_add(STATE_GENPC,"GENPC", pc).noshow(); + m_icountptr = &icount; + state_add(STATE_GENPC,"GENPC", pc).noshow(); } void es5510_device::device_reset() { - pc = 0x00; - memset(gpr, 0, sizeof(*gpr) * 0xc0); - memset(instr, 0, sizeof(*instr) * 0xa0); - memset(dram, 0, sizeof(*dram) * (1<<20)); - state = STATE_RUNNING; - dil_latch = dol_latch = dadr_latch = gpr_latch = 0; - instr_latch = UINT64(0); - ram_sel = 0; - host_control = 0; - memset(&ram, 0, sizeof(ram_t)); - memset(&ram_p, 0, sizeof(ram_t)); - memset(&ram_pp, 0, sizeof(ram_t)); + pc = 0x00; + memset(gpr, 0, sizeof(*gpr) * 0xc0); + memset(instr, 0, sizeof(*instr) * 0xa0); + memset(dram, 0, sizeof(*dram) * (1<<20)); + state = STATE_RUNNING; + dil_latch = dol_latch = dadr_latch = gpr_latch = 0; + instr_latch = UINT64(0); + ram_sel = 0; + host_control = 0; + memset(&ram, 0, sizeof(ram_t)); + memset(&ram_p, 0, sizeof(ram_t)); + memset(&ram_pp, 0, sizeof(ram_t)); } const address_space_config *es5510_device::memory_space_config(address_spacenum spacenum) const { - return 0; + return 0; } UINT64 es5510_device::execute_clocks_to_cycles(UINT64 clocks) const { - return clocks / 3; + return clocks / 3; } UINT64 es5510_device::execute_cycles_to_clocks(UINT64 cycles) const { - return cycles * 3; + return cycles * 3; } UINT32 es5510_device::execute_min_cycles() const { - return 1; + return 1; } UINT32 es5510_device::execute_max_cycles() const { - return 1; + return 1; } UINT32 es5510_device::execute_input_lines() const { - return 1; + return 1; } void es5510_device::execute_run() { - while (icount > 0) { - if (state == STATE_HALTED) { - // Currently halted, sample the HALT line - if (input_state(ES5510_HALT)) { + while (icount > 0) { + if (state == STATE_HALTED) { + // Currently halted, sample the HALT line + if (input_state(ES5510_HALT)) { // remain halted host_control |= 0x04; // Signal Host Access OK - } else { + } else { logerror("ES5501: Starting!\n"); state = STATE_RUNNING; - + UINT8 addr; char buf[1024]; for (addr = 0; addr < 0xa0; addr++) { - DESCRIBE_INSTR(buf, instr[addr], gpr[addr]); - logerror("%02x: %012" I64FMT "x %06x %s\n", addr, instr[addr], gpr[addr]&0xffffff, buf); + DESCRIBE_INSTR(buf, instr[addr], gpr[addr]); + logerror("%02x: %012" I64FMT "x %06x %s\n", addr, instr[addr], gpr[addr]&0xffffff, buf); } for (; addr < 0xc0; addr++) { - logerror("%02x: %06x (%d)\n", addr, gpr[addr]&0xffffff, gpr[addr]); + logerror("%02x: %06x (%d)\n", addr, gpr[addr]&0xffffff, gpr[addr]); } - } - } else { - // currently running, execute one instruction. + } + } else { + // currently running, execute one instruction. + + ram_pp = ram_p; + ram_p = ram; - ram_pp = ram_p; - ram_p = ram; - - // *** T0, clock high - // --- nothing to do! + // *** T0, clock high + // --- nothing to do! - // *** T0, clock low - // --- Read instruction N - UINT64 instr = this->instr[pc]; + // *** T0, clock low + // --- Read instruction N + UINT64 instr = this->instr[pc]; - // --- RAM cycle N-2 (if a Read cycle): data read from bus is stored in DIL - if (ram_pp.cycle != RAM_CYCLE_WRITE) { + // --- RAM cycle N-2 (if a Read cycle): data read from bus is stored in DIL + if (ram_pp.cycle != RAM_CYCLE_WRITE) { if (ram_pp.io) { // read from I/O and store into DIL - dil = 0; // read_io(ram_pp.address);; + dil = 0; // read_io(ram_pp.address);; } else { // read from DRAM and store into DIL - dil = dram[ram_pp.address]; + dil = dram[ram_pp.address]; } - } + } - // --- start of RAM cycle N - ram_control_t ramControl = RAM_CONTROL[((instr >> 3) & 0x07)]; - ram.cycle = ramControl.cycle; - ram.io = ramControl.access == RAM_CONTROL_IO; + // --- start of RAM cycle N + ram_control_t ramControl = RAM_CONTROL[((instr >> 3) & 0x07)]; + ram.cycle = ramControl.cycle; + ram.io = ramControl.access == RAM_CONTROL_IO; - // --- RAM cycle N: read offset N - INT32 offset = gpr[pc]; - switch(ramControl.access) { - case RAM_CONTROL_DELAY: + // --- RAM cycle N: read offset N + INT32 offset = gpr[pc]; + switch(ramControl.access) { + case RAM_CONTROL_DELAY: ram.address = (((dbase + offset) % (dlength + 1)) & memmask) >> memshift; break; - case RAM_CONTROL_TABLE_A: + case RAM_CONTROL_TABLE_A: ram.address = ((abase + offset) & memmask) >> memshift; break; - case RAM_CONTROL_TABLE_B: + case RAM_CONTROL_TABLE_B: ram.address = ((bbase + offset) & memmask) >> memshift; break; - case RAM_CONTROL_IO: + case RAM_CONTROL_IO: ram.address = offset & 0x00fffff0; // mask off the low 4 bits break; - } - - // *** T1, clock high - // --- Decode instruction N; - // we will do this both here and in stages as the different parts of the instruction complete & recommence. - - UINT8 operandSelect = (UINT8)((instr >> 8) & 0x0f); - const op_select_t &opSelect = OPERAND_SELECT[operandSelect]; - bool skip = false; - bool skippable = ((instr >> 7) & 0x01) != 0; // aka the 'SKIP' bit in the instruction word - if (skippable) { + } + + // *** T1, clock high + // --- Decode instruction N; + // we will do this both here and in stages as the different parts of the instruction complete & recommence. + + UINT8 operandSelect = (UINT8)((instr >> 8) & 0x0f); + const op_select_t &opSelect = OPERAND_SELECT[operandSelect]; + bool skip = false; + bool skippable = ((instr >> 7) & 0x01) != 0; // aka the 'SKIP' bit in the instruction word + if (skippable) { bool skipConditionSatisfied = (ccr & cmr & FLAG_MASK) != 0; if (isFlagSet(cmr, FLAG_NOT)) { - skipConditionSatisfied = !skipConditionSatisfied; + skipConditionSatisfied = !skipConditionSatisfied; } skip = skipConditionSatisfied; - } + } - // --- Write Multiplier result N-1 - if (mulacc.write_result) { + // --- Write Multiplier result N-1 + if (mulacc.write_result) { mulacc.product = (mulacc.cValue * mulacc.dValue) << mulshift; mulacc.result = (mulacc.accumulate ? machl : 0) + mulacc.product; INT32 tmp = (mulacc.result & U64(0x0000ffffff000000)) >> 24; if (mulacc.dst & SRC_DST_REG) { - machl = mulacc.result; - write_reg(mulacc.cReg, tmp); + machl = mulacc.result; + write_reg(mulacc.cReg, tmp); } if (mulacc.dst & SRC_DST_DELAY) { - write_to_dol(tmp); + write_to_dol(tmp); } - } - - // *** T1, clock low - // --- Start of multiplier cycle N - mulacc.cReg = (UINT8)((instr >> 32) & 0xff); - mulacc.dReg = (UINT8)((instr >> 40) & 0xff); - mulacc.src = opSelect.mac_src; - mulacc.dst = opSelect.mac_dst; - mulacc.accumulate = ((instr >> 6) & 0x01) != 0; - mulacc.write_result = skip; - - // --- Read Multiplier Operands N - if (mulacc.src == SRC_DST_REG) { + } + + // *** T1, clock low + // --- Start of multiplier cycle N + mulacc.cReg = (UINT8)((instr >> 32) & 0xff); + mulacc.dReg = (UINT8)((instr >> 40) & 0xff); + mulacc.src = opSelect.mac_src; + mulacc.dst = opSelect.mac_dst; + mulacc.accumulate = ((instr >> 6) & 0x01) != 0; + mulacc.write_result = skip; + + // --- Read Multiplier Operands N + if (mulacc.src == SRC_DST_REG) { mulacc.cValue = read_reg(mulacc.cReg); - } else { // must be SRC_DST_DELAY + } else { // must be SRC_DST_DELAY mulacc.cValue = dil; - } - mulacc.dValue = read_reg(mulacc.dReg); - - // *** T2, clock high - // --- Write ALU Result N-1 - if (alu.write_result) { + } + mulacc.dValue = read_reg(mulacc.dReg); + + // *** T2, clock high + // --- Write ALU Result N-1 + if (alu.write_result) { UINT8 flags = ccr; alu.result = alu_operation(alu.op, alu.aValue, alu.bValue, flags); if (alu.dst & SRC_DST_REG) { - write_reg(alu.aReg, alu.result); + write_reg(alu.aReg, alu.result); } if (alu.dst & SRC_DST_DELAY) { - write_to_dol(alu.result); + write_to_dol(alu.result); } if (alu.update_ccr) { - ccr = flags; - } - } - - // *** T2, clock low - // --- Start of ALU cycle N - alu.aReg = (instr >> 16) & 0xff; - alu.bReg = (instr >> 24) & 0xff; - alu.op = (instr >> 12) & 0x0f; - alu.src = opSelect.alu_src; - alu.dst = opSelect.alu_dst; - alu.write_result = skip; - alu.update_ccr = !skippable || (alu.op == OP_CMP); - - // --- Read ALU Operands N - alu_op_t aluOp = ALU_OPS[alu.op]; - if (aluOp.operands == 2) { + ccr = flags; + } + } + + // *** T2, clock low + // --- Start of ALU cycle N + alu.aReg = (instr >> 16) & 0xff; + alu.bReg = (instr >> 24) & 0xff; + alu.op = (instr >> 12) & 0x0f; + alu.src = opSelect.alu_src; + alu.dst = opSelect.alu_dst; + alu.write_result = skip; + alu.update_ccr = !skippable || (alu.op == OP_CMP); + + // --- Read ALU Operands N + alu_op_t aluOp = ALU_OPS[alu.op]; + if (aluOp.operands == 2) { if (alu.src == SRC_DST_REG) { - alu.aValue = read_reg(alu.aReg); + alu.aValue = read_reg(alu.aReg); } else { // must be SRC_DST_DELAY - alu.aValue = dil; + alu.aValue = dil; } - } - if (aluOp.operands >= 1) { + } + if (aluOp.operands >= 1) { alu.bValue = read_reg(alu.bReg); - } + } - // --- RAM cycle N-1 - if (ram_p.cycle != RAM_CYCLE_READ) { + // --- RAM cycle N-1 + if (ram_p.cycle != RAM_CYCLE_READ) { if (ram_p.cycle == RAM_CYCLE_WRITE) { - // If this is a write cycle, write the frontmost DOL value to RAM or I/O - if (ram_p.io) { - // write_io(ram_p.io, dol[0]); - } else { - dram[ram_p.address] = dol[0]; - } + // If this is a write cycle, write the frontmost DOL value to RAM or I/O + if (ram_p.io) { + // write_io(ram_p.io, dol[0]); + } else { + dram[ram_p.address] = dol[0]; + } } // If this is a Write or Dump cycle, eject the frontmost DL value. dol[0] = dol[1]; if (dol_count > 0) { - --dol_count; + --dol_count; } - } + } - ++pc; - } - --icount; - } + ++pc; + } + --icount; + } } UINT32 es5510_device::disasm_min_opcode_bytes() const { - return 6; + return 6; } UINT32 es5510_device::disasm_max_opcode_bytes() const { - return 6; + return 6; } offs_t es5510_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) { - return pc; + return pc; } INT32 es5510_device::read_reg(UINT8 reg) { - if (reg < 0xc0) { - return gpr[reg]; - } else { - switch(reg) - { - case 234: return ser0r; - case 235: return ser0l; - case 236: return ser1r; - case 237: return ser1l; - case 238: return ser2r; - case 239: return ser2l; - case 240: return ser3r; - case 241: return ser3l; - case 242: return (machl >> 0) & 0x00ffffff; - case 243: return (machl >> 24) & 0x00ffffff; - case 244: return dil; // DIL when reading - case 245: return dlength; - case 246: return abase; - case 247: return bbase; - case 248: return dbase; - case 249: return sigreg; - case 250: return ccr; - case 251: return cmr; - case 252: return 0x00ffffff; - case 253: return 0x00800000; - case 254: return 0x007fffff; - case 255: return 0x00000000; - default: - // unknown SPR - return 0; - } - } + if (reg < 0xc0) { + return gpr[reg]; + } else { + switch(reg) + { + case 234: return ser0r; + case 235: return ser0l; + case 236: return ser1r; + case 237: return ser1l; + case 238: return ser2r; + case 239: return ser2l; + case 240: return ser3r; + case 241: return ser3l; + case 242: return (machl >> 0) & 0x00ffffff; + case 243: return (machl >> 24) & 0x00ffffff; + case 244: return dil; // DIL when reading + case 245: return dlength; + case 246: return abase; + case 247: return bbase; + case 248: return dbase; + case 249: return sigreg; + case 250: return ccr; + case 251: return cmr; + case 252: return 0x00ffffff; + case 253: return 0x00800000; + case 254: return 0x007fffff; + case 255: return 0x00000000; + default: + // unknown SPR + return 0; + } + } } INT8 countLowOnes(INT32 x) { - INT8 n = 0; - while ((x & 1) == 1) { - ++n; - x >>= 1; - } - return n; + INT8 n = 0; + while ((x & 1) == 1) { + ++n; + x >>= 1; + } + return n; } void es5510_device::write_reg(UINT8 reg, INT32 value) { - value &= 0x00ffffff; - if (reg < 0xc0) { - gpr[reg] = value; - } else { - switch(reg) - { - case 234: ser0r = value; - case 235: ser0l = value; - case 236: ser1r = value; - case 237: ser1l = value; - case 238: ser2r = value; - case 239: ser2l = value; - case 240: ser3r = value; - case 241: ser3l = value; - case 242: machl = (machl & ~((INT64)0x00ffffff << 0)) | (value << 0); - case 243: machl = (machl & ~((INT64)0x00ffffff << 24)) | (value << 24); - case 244: - memshift = countLowOnes(value); - memsiz = 0x00ffffff >> (24 - memshift); - memmask = 0x00ffffff & ~memsiz; - memincrement = 1 << memshift; - case 245: dlength = value; - case 246: abase = value; - case 247: bbase = value; - case 248: dbase = value; - case 249: sigreg = (value != 0); - case 250: ccr = (value >> 16) & FLAG_MASK; - case 251: cmr = (value >> 16) & (FLAG_MASK | FLAG_NOT); - case 252: // no-op - case 253: // no-op - case 254: // no-op - case 255: // no-op - default: - // unknown register - ; - } - } + value &= 0x00ffffff; + if (reg < 0xc0) { + gpr[reg] = value; + } else { + switch(reg) + { + case 234: ser0r = value; + case 235: ser0l = value; + case 236: ser1r = value; + case 237: ser1l = value; + case 238: ser2r = value; + case 239: ser2l = value; + case 240: ser3r = value; + case 241: ser3l = value; + case 242: machl = (machl & ~((INT64)0x00ffffff << 0)) | (value << 0); + case 243: machl = (machl & ~((INT64)0x00ffffff << 24)) | (value << 24); + case 244: + memshift = countLowOnes(value); + memsiz = 0x00ffffff >> (24 - memshift); + memmask = 0x00ffffff & ~memsiz; + memincrement = 1 << memshift; + case 245: dlength = value; + case 246: abase = value; + case 247: bbase = value; + case 248: dbase = value; + case 249: sigreg = (value != 0); + case 250: ccr = (value >> 16) & FLAG_MASK; + case 251: cmr = (value >> 16) & (FLAG_MASK | FLAG_NOT); + case 252: // no-op + case 253: // no-op + case 254: // no-op + case 255: // no-op + default: + // unknown register + ; + } + } } void es5510_device::write_to_dol(INT32 value) { - if (dol_count >= 2) { - dol[0] = dol[1]; - dol[1] = value; - } else { - dol[dol_count++] = value; - } + if (dol_count >= 2) { + dol[0] = dol[1]; + dol[1] = value; + } else { + dol[dol_count++] = value; + } } INT32 es5510_device::alu_operation(UINT8 op, INT32 a, INT32 b, UINT8 &flags) { - switch(op) { - case 0x0: // ADD - return saturate(add(a, b, flags), flags); - - case 0x1: // SUB - return saturate(add(a, negate(b), flags), flags); - - case 0x2: // ADDU - return add(a, b, flags); - - case 0x3: // SUBU - return add(a, negate(b), flags); - - case 0x4: // CMP - add(a, negate(b), flags); - return a; - - case 0x5: // AND - a &= b; - setFlagTo(flags, FLAG_N, (a & 0x0080000000) != 0); - setFlagTo(flags, FLAG_Z, a == 0); - return a; - - case 0x6: // OR - a |= b; - setFlagTo(flags, FLAG_N, (a & 0x0080000000) != 0); - setFlagTo(flags, FLAG_Z, a == 0); - return a; - - case 0x7: // XOR - a ^= b; - setFlagTo(flags, FLAG_N, (a & 0x0080000000) != 0); - setFlagTo(flags, FLAG_Z, a == 0); - return a; - - case 0x8: // ABS - { - clearFlag(flags, FLAG_N); - bool isNegative = (a & 0x00800000) != 0; - setFlagTo(flags, FLAG_C, isNegative); - if (isNegative) { - a = (a ^ 0x00ffffff) + 1; - } - return a; - } - - case 0x9: // MOV - return b; - - case 0xA: // ASL2 - return asl(b, 2, flags); - - case 0xB: // ASL8 - return asl(b, 8, flags); - - case 0xC: // LS15 - return (b << 15) & 0x007fffff; - - case 0xD: // DIFF - return add(0x007fffff, negate(b), flags); - - case 0xE: // ASR - return (b >> 1) | (b & 0x00800000); - - case 0xF: // END - // sample the HALT line - if (input_state(ES5510_HALT)) { - // halt - state = STATE_HALTED; - host_control |= 0x04; // Signal Host Access OK - } - // update the delay line base pointer - dbase -= memincrement; - if (dbase < 0) { - dbase = dlength; - } - - default: - return 0; - } + switch(op) { + case 0x0: // ADD + return saturate(add(a, b, flags), flags); + + case 0x1: // SUB + return saturate(add(a, negate(b), flags), flags); + + case 0x2: // ADDU + return add(a, b, flags); + + case 0x3: // SUBU + return add(a, negate(b), flags); + + case 0x4: // CMP + add(a, negate(b), flags); + return a; + + case 0x5: // AND + a &= b; + setFlagTo(flags, FLAG_N, (a & 0x0080000000) != 0); + setFlagTo(flags, FLAG_Z, a == 0); + return a; + + case 0x6: // OR + a |= b; + setFlagTo(flags, FLAG_N, (a & 0x0080000000) != 0); + setFlagTo(flags, FLAG_Z, a == 0); + return a; + + case 0x7: // XOR + a ^= b; + setFlagTo(flags, FLAG_N, (a & 0x0080000000) != 0); + setFlagTo(flags, FLAG_Z, a == 0); + return a; + + case 0x8: // ABS + { + clearFlag(flags, FLAG_N); + bool isNegative = (a & 0x00800000) != 0; + setFlagTo(flags, FLAG_C, isNegative); + if (isNegative) { + a = (a ^ 0x00ffffff) + 1; + } + return a; + } + + case 0x9: // MOV + return b; + + case 0xA: // ASL2 + return asl(b, 2, flags); + + case 0xB: // ASL8 + return asl(b, 8, flags); + + case 0xC: // LS15 + return (b << 15) & 0x007fffff; + + case 0xD: // DIFF + return add(0x007fffff, negate(b), flags); + + case 0xE: // ASR + return (b >> 1) | (b & 0x00800000); + + case 0xF: // END + // sample the HALT line + if (input_state(ES5510_HALT)) { + // halt + state = STATE_HALTED; + host_control |= 0x04; // Signal Host Access OK + } + // update the delay line base pointer + dbase -= memincrement; + if (dbase < 0) { + dbase = dlength; + } + + default: + return 0; + } } diff --git a/src/emu/cpu/es5510/es5510.h b/src/emu/cpu/es5510/es5510.h index 0ebb2462357..cdc42b27a0c 100644 --- a/src/emu/cpu/es5510/es5510.h +++ b/src/emu/cpu/es5510/es5510.h @@ -13,163 +13,163 @@ #include "emu.h" class es5510_device : public cpu_device { - public: - es5510_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - - DECLARE_READ8_MEMBER(host_r); - DECLARE_WRITE8_MEMBER(host_w); - - DECLARE_READ16_MEMBER(ser_r); - DECLARE_WRITE16_MEMBER(ser_w); - - enum line_t { - ES5510_HALT = 0 - }; - - enum state_t { - STATE_RUNNING = 0, - STATE_HALTED = 1 - }; - - struct alu_op_t { - int operands; - const char * const opcode; - }; - - enum op_src_dst_t { - SRC_DST_REG = 1 << 0, - SRC_DST_DELAY = 1 << 1, - SRC_DST_BOTH = (1 << 0) | (1 << 1) - }; - - struct op_select_t { - const op_src_dst_t alu_src; - const op_src_dst_t alu_dst; - const op_src_dst_t mac_src; - const op_src_dst_t mac_dst; - }; - - enum ram_control_access_t { - RAM_CONTROL_DELAY = 0, - RAM_CONTROL_TABLE_A, - RAM_CONTROL_TABLE_B, - RAM_CONTROL_IO - }; - - enum ram_cycle_t { - RAM_CYCLE_READ = 0, - RAM_CYCLE_WRITE = 1, - RAM_CYCLE_DUMP_FIFO = 2 - }; - - struct ram_control_t { - ram_cycle_t cycle; - ram_control_access_t access; - const char * const description; - }; - - static const alu_op_t ALU_OPS[16]; - static const op_select_t OPERAND_SELECT[16]; - static const ram_control_t RAM_CONTROL[8]; - - struct alu_t { - UINT8 aReg; - UINT8 bReg; - op_src_dst_t src; - op_src_dst_t dst; - UINT8 op; - INT32 aValue; - INT32 bValue; - INT32 result; - bool update_ccr; - bool write_result; - }; - - struct mulacc_t { - UINT8 cReg; - UINT8 dReg; - op_src_dst_t src; - op_src_dst_t dst; - bool accumulate; - INT64 cValue; - INT64 dValue; - INT64 product; - INT64 result; - bool write_result; - }; - - struct ram_t { - INT32 address; // up to 20 bits, left-justified within the right 24 bits of the 32-bit word - bool io; // I/O space, rather than delay line memory - ram_cycle_t cycle; // cycle type - }; - - protected: - virtual void device_start(); - virtual void device_reset(); - virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const; - virtual UINT64 execute_clocks_to_cycles(UINT64 clocks) const; - virtual UINT64 execute_cycles_to_clocks(UINT64 cycles) const; - virtual UINT32 execute_min_cycles() const; - virtual UINT32 execute_max_cycles() const; - virtual UINT32 execute_input_lines() const; - virtual void execute_run(); - virtual UINT32 disasm_min_opcode_bytes() const; - virtual UINT32 disasm_max_opcode_bytes() const; - virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); - - INT32 read_reg(UINT8 reg); - void write_reg(UINT8 reg, INT32 value); - void write_to_dol(INT32 value); - - INT32 alu_operation(UINT8 op, INT32 aValue, INT32 bValue, UINT8 &flags); - - private: - int icount; - UINT8 pc; - state_t state; - INT32 gpr[0xc0]; // 24 bits, right justified and sign extended - INT32 ser0r; - INT32 ser0l; - INT32 ser1r; - INT32 ser1l; - INT32 ser2r; - INT32 ser2l; - INT32 ser3r; - INT32 ser3l; - INT64 machl; // 48 bits, right justified and sign extended - INT32 dil; - INT32 memsiz; - INT32 memmask; - INT32 memincrement; - INT8 memshift; - INT32 dlength; - INT32 abase; - INT32 bbase; - INT32 dbase; - INT32 sigreg; - int mulshift; - INT8 ccr; // really, 5 bits, left justified - INT8 cmr; // really, 6 bits, left justified - INT32 dol[2]; - int dol_count; - - UINT64 instr[160]; // 48 bits, right justified - UINT16 dram[1<<20]; // there are up to 20 address bits (at least 16 expected), left justified within the 24 bits of a gpr or dadr; we preallocate all of it. - - // latch registers for host interaction - INT32 dol_latch; // 24 bits - INT32 dil_latch; // 24 bits - UINT32 dadr_latch; // 24 bits - INT32 gpr_latch; // 24 bits, holding up to 20 address bits, left justified - UINT64 instr_latch; // 48 bits, right justified - UINT8 ram_sel; // effectively a boolean - UINT8 host_control; // - - // currently executing instruction(s) - alu_t alu; - mulacc_t mulacc; - ram_t ram, ram_p, ram_pp; // ram operations for cycles N, N-1 and N-2 + public: + es5510_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + DECLARE_READ8_MEMBER(host_r); + DECLARE_WRITE8_MEMBER(host_w); + + DECLARE_READ16_MEMBER(ser_r); + DECLARE_WRITE16_MEMBER(ser_w); + + enum line_t { + ES5510_HALT = 0 + }; + + enum state_t { + STATE_RUNNING = 0, + STATE_HALTED = 1 + }; + + struct alu_op_t { + int operands; + const char * const opcode; + }; + + enum op_src_dst_t { + SRC_DST_REG = 1 << 0, + SRC_DST_DELAY = 1 << 1, + SRC_DST_BOTH = (1 << 0) | (1 << 1) + }; + + struct op_select_t { + const op_src_dst_t alu_src; + const op_src_dst_t alu_dst; + const op_src_dst_t mac_src; + const op_src_dst_t mac_dst; + }; + + enum ram_control_access_t { + RAM_CONTROL_DELAY = 0, + RAM_CONTROL_TABLE_A, + RAM_CONTROL_TABLE_B, + RAM_CONTROL_IO + }; + + enum ram_cycle_t { + RAM_CYCLE_READ = 0, + RAM_CYCLE_WRITE = 1, + RAM_CYCLE_DUMP_FIFO = 2 + }; + + struct ram_control_t { + ram_cycle_t cycle; + ram_control_access_t access; + const char * const description; + }; + + static const alu_op_t ALU_OPS[16]; + static const op_select_t OPERAND_SELECT[16]; + static const ram_control_t RAM_CONTROL[8]; + + struct alu_t { + UINT8 aReg; + UINT8 bReg; + op_src_dst_t src; + op_src_dst_t dst; + UINT8 op; + INT32 aValue; + INT32 bValue; + INT32 result; + bool update_ccr; + bool write_result; + }; + + struct mulacc_t { + UINT8 cReg; + UINT8 dReg; + op_src_dst_t src; + op_src_dst_t dst; + bool accumulate; + INT64 cValue; + INT64 dValue; + INT64 product; + INT64 result; + bool write_result; + }; + + struct ram_t { + INT32 address; // up to 20 bits, left-justified within the right 24 bits of the 32-bit word + bool io; // I/O space, rather than delay line memory + ram_cycle_t cycle; // cycle type + }; + + protected: + virtual void device_start(); + virtual void device_reset(); + virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const; + virtual UINT64 execute_clocks_to_cycles(UINT64 clocks) const; + virtual UINT64 execute_cycles_to_clocks(UINT64 cycles) const; + virtual UINT32 execute_min_cycles() const; + virtual UINT32 execute_max_cycles() const; + virtual UINT32 execute_input_lines() const; + virtual void execute_run(); + virtual UINT32 disasm_min_opcode_bytes() const; + virtual UINT32 disasm_max_opcode_bytes() const; + virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); + + INT32 read_reg(UINT8 reg); + void write_reg(UINT8 reg, INT32 value); + void write_to_dol(INT32 value); + + INT32 alu_operation(UINT8 op, INT32 aValue, INT32 bValue, UINT8 &flags); + + private: + int icount; + UINT8 pc; + state_t state; + INT32 gpr[0xc0]; // 24 bits, right justified and sign extended + INT32 ser0r; + INT32 ser0l; + INT32 ser1r; + INT32 ser1l; + INT32 ser2r; + INT32 ser2l; + INT32 ser3r; + INT32 ser3l; + INT64 machl; // 48 bits, right justified and sign extended + INT32 dil; + INT32 memsiz; + INT32 memmask; + INT32 memincrement; + INT8 memshift; + INT32 dlength; + INT32 abase; + INT32 bbase; + INT32 dbase; + INT32 sigreg; + int mulshift; + INT8 ccr; // really, 5 bits, left justified + INT8 cmr; // really, 6 bits, left justified + INT32 dol[2]; + int dol_count; + + UINT64 instr[160]; // 48 bits, right justified + UINT16 dram[1<<20]; // there are up to 20 address bits (at least 16 expected), left justified within the 24 bits of a gpr or dadr; we preallocate all of it. + + // latch registers for host interaction + INT32 dol_latch; // 24 bits + INT32 dil_latch; // 24 bits + UINT32 dadr_latch; // 24 bits + INT32 gpr_latch; // 24 bits, holding up to 20 address bits, left justified + UINT64 instr_latch; // 48 bits, right justified + UINT8 ram_sel; // effectively a boolean + UINT8 host_control; // + + // currently executing instruction(s) + alu_t alu; + mulacc_t mulacc; + ram_t ram, ram_p, ram_pp; // ram operations for cycles N, N-1 and N-2 }; extern const device_type ES5510; diff --git a/src/emu/cpu/lr35902/lr35902.h b/src/emu/cpu/lr35902/lr35902.h index 8a9da5cdaa5..95e8f4a16a7 100644 --- a/src/emu/cpu/lr35902/lr35902.h +++ b/src/emu/cpu/lr35902/lr35902.h @@ -5,15 +5,12 @@ #define MCFG_LR35902_TIMER_CB(_devcb) \ - lr35902_cpu_device::set_timer_cb(*device, DEVCB2_##_devcb); \ - + lr35902_cpu_device::set_timer_cb(*device, DEVCB2_##_devcb); #define MCFG_LR35902_HALT_BUG \ - lr35902_cpu_device::set_halt_bug(*device); \ - + lr35902_cpu_device::set_halt_bug(*device); // This should be removed/improved once all gameboy boot roms have been dumped #define MCFG_LR35902_RESET_VALUES(_regs) \ - lr35902_cpu_device::set_reset_values(*device, _regs); \ - + lr35902_cpu_device::set_reset_values(*device, _regs); enum { diff --git a/src/emu/cpu/m6502/m6502.h b/src/emu/cpu/m6502/m6502.h index 9fe6c9180a9..97b662fe8ee 100644 --- a/src/emu/cpu/m6502/m6502.h +++ b/src/emu/cpu/m6502/m6502.h @@ -128,7 +128,7 @@ protected: DASM_imz, /* load immediate byte, store to zero page address (M740) */ DASM_spg, /* "special page": implied FF00 plus immediate value (M740)*/ DASM_biz, /* bit, zero page (M740) */ - DASM_bzr /* bit, zero page, relative offset (M740) */ + DASM_bzr /* bit, zero page, relative offset (M740) */ }; enum { diff --git a/src/emu/cpu/mips/r3000.c b/src/emu/cpu/mips/r3000.c index 9366100810b..f2583757106 100644 --- a/src/emu/cpu/mips/r3000.c +++ b/src/emu/cpu/mips/r3000.c @@ -75,36 +75,36 @@ HELPER MACROS ***************************************************************************/ -#define RSREG ((m_op >> 21) & 31) -#define RTREG ((m_op >> 16) & 31) -#define RDREG ((m_op >> 11) & 31) -#define SHIFT ((m_op >> 6) & 31) +#define RSREG ((m_op >> 21) & 31) +#define RTREG ((m_op >> 16) & 31) +#define RDREG ((m_op >> 11) & 31) +#define SHIFT ((m_op >> 6) & 31) -#define RSVAL m_r[RSREG] -#define RTVAL m_r[RTREG] -#define RDVAL m_r[RDREG] +#define RSVAL m_r[RSREG] +#define RTVAL m_r[RTREG] +#define RDVAL m_r[RDREG] -#define SIMMVAL ((INT16)m_op) -#define UIMMVAL ((UINT16)m_op) -#define LIMMVAL (m_op & 0x03ffffff) +#define SIMMVAL ((INT16)m_op) +#define UIMMVAL ((UINT16)m_op) +#define LIMMVAL (m_op & 0x03ffffff) -#define ADDPC(x) do { m_nextpc = m_pc + ((x) << 2); } while (0) -#define ADDPCL(x,l) do { m_nextpc = m_pc + ((x) << 2); m_r[l] = m_pc + 4; } while (0) -#define ABSPC(x) do { m_nextpc = (m_pc & 0xf0000000) | ((x) << 2); } while (0) -#define ABSPCL(x,l) do { m_nextpc = (m_pc & 0xf0000000) | ((x) << 2); m_r[l] = m_pc + 4; } while (0) -#define SETPC(x) do { m_nextpc = (x); } while (0) -#define SETPCL(x,l) do { m_nextpc = (x); m_r[l] = m_pc + 4; } while (0) +#define ADDPC(x) do { m_nextpc = m_pc + ((x) << 2); } while (0) +#define ADDPCL(x,l) do { m_nextpc = m_pc + ((x) << 2); m_r[l] = m_pc + 4; } while (0) +#define ABSPC(x) do { m_nextpc = (m_pc & 0xf0000000) | ((x) << 2); } while (0) +#define ABSPCL(x,l) do { m_nextpc = (m_pc & 0xf0000000) | ((x) << 2); m_r[l] = m_pc + 4; } while (0) +#define SETPC(x) do { m_nextpc = (x); } while (0) +#define SETPCL(x,l) do { m_nextpc = (x); m_r[l] = m_pc + 4; } while (0) -#define RBYTE(x) (this->*m_cur->m_read_byte)(x) -#define RWORD(x) (this->*m_cur->m_read_word)(x) -#define RLONG(x) (this->*m_cur->m_read_dword)(x) +#define RBYTE(x) (this->*m_cur->m_read_byte)(x) +#define RWORD(x) (this->*m_cur->m_read_word)(x) +#define RLONG(x) (this->*m_cur->m_read_dword)(x) -#define WBYTE(x,v) (this->*m_cur->m_write_byte)(x, v) -#define WWORD(x,v) (this->*m_cur->m_write_word)(x, v) -#define WLONG(x,v) (this->*m_cur->m_write_dword)(x, v) +#define WBYTE(x,v) (this->*m_cur->m_write_byte)(x, v) +#define WWORD(x,v) (this->*m_cur->m_write_word)(x, v) +#define WLONG(x,v) (this->*m_cur->m_write_dword)(x, v) -#define SR m_cpr[0][COP0_Status] -#define CAUSE m_cpr[0][COP0_Cause] +#define SR m_cpr[0][COP0_Status] +#define CAUSE m_cpr[0][COP0_Cause] //************************************************************************** @@ -227,7 +227,7 @@ void r3000_device::device_start() m_icache_size = 4096; m_dcache_size = 2048; break; - } + } case CHIP_TYPE_R3052: { m_icache_size = 8192; @@ -238,17 +238,17 @@ void r3000_device::device_start() // TODO: R3071 and R3081 have configurable cache sizes case CHIP_TYPE_R3071: { - m_icache_size = 16384; // or 8kB - m_dcache_size = 4096; // or 8kB + m_icache_size = 16384; // or 8kB + m_dcache_size = 4096; // or 8kB break; } case CHIP_TYPE_R3081: { - m_icache_size = 16384; // or 8kB - m_dcache_size = 4096; // or 8kB + m_icache_size = 16384; // or 8kB + m_dcache_size = 4096; // or 8kB m_hasfpu = true; break; - } + } } // allocate cache memory @@ -286,7 +286,7 @@ void r3000_device::device_start() m_lwr = &r3000_device::lwr_le; m_swl = &r3000_device::swl_le; m_swr = &r3000_device::swr_le; - + m_cache_hand.m_read_byte = &r3000_device::readcache_le; m_cache_hand.m_read_word = &r3000_device::readcache_le_word; m_cache_hand.m_read_dword = &r3000_device::readcache_le_dword; @@ -302,44 +302,44 @@ void r3000_device::device_start() m_in_brcond3.resolve_safe(0); // register our state for the debugger - state_add(STATE_GENPC, "GENPC", m_pc).noshow(); - state_add(STATE_GENPCBASE, "GENPCBASE", m_ppc).noshow(); - state_add(STATE_GENSP, "GENSP", m_r[31]).noshow(); - state_add(STATE_GENFLAGS, "GENFLAGS", SR).callimport().callexport().formatstr("%6s").noshow(); - state_add(R3000_PC, "PC", m_pc); - state_add(R3000_SR, "SR", SR); - state_add(R3000_R0, "R0", m_r[0]); - state_add(R3000_R1, "R1", m_r[1]); - state_add(R3000_R2, "R2", m_r[2]); - state_add(R3000_R3, "R3", m_r[3]); - state_add(R3000_R4, "R4", m_r[4]); - state_add(R3000_R5, "R5", m_r[5]); - state_add(R3000_R6, "R6", m_r[6]); - state_add(R3000_R7, "R7", m_r[7]); - state_add(R3000_R8, "R8", m_r[8]); - state_add(R3000_R9, "R9", m_r[9]); - state_add(R3000_R10, "R10", m_r[10]); - state_add(R3000_R11, "R11", m_r[11]); - state_add(R3000_R12, "R12", m_r[12]); - state_add(R3000_R13, "R13", m_r[13]); - state_add(R3000_R14, "R14", m_r[14]); - state_add(R3000_R15, "R15", m_r[15]); - state_add(R3000_R16, "R16", m_r[16]); - state_add(R3000_R17, "R17", m_r[17]); - state_add(R3000_R18, "R18", m_r[18]); - state_add(R3000_R19, "R19", m_r[19]); - state_add(R3000_R20, "R20", m_r[20]); - state_add(R3000_R21, "R21", m_r[21]); - state_add(R3000_R22, "R22", m_r[22]); - state_add(R3000_R23, "R23", m_r[23]); - state_add(R3000_R24, "R24", m_r[24]); - state_add(R3000_R25, "R25", m_r[25]); - state_add(R3000_R26, "R26", m_r[26]); - state_add(R3000_R27, "R27", m_r[27]); - state_add(R3000_R28, "R28", m_r[28]); - state_add(R3000_R29, "R29", m_r[29]); - state_add(R3000_R30, "R30", m_r[30]); - state_add(R3000_R31, "R31", m_r[31]); + state_add(STATE_GENPC, "GENPC", m_pc).noshow(); + state_add(STATE_GENPCBASE, "GENPCBASE", m_ppc).noshow(); + state_add(STATE_GENSP, "GENSP", m_r[31]).noshow(); + state_add(STATE_GENFLAGS, "GENFLAGS", SR).callimport().callexport().formatstr("%6s").noshow(); + state_add(R3000_PC, "PC", m_pc); + state_add(R3000_SR, "SR", SR); + state_add(R3000_R0, "R0", m_r[0]); + state_add(R3000_R1, "R1", m_r[1]); + state_add(R3000_R2, "R2", m_r[2]); + state_add(R3000_R3, "R3", m_r[3]); + state_add(R3000_R4, "R4", m_r[4]); + state_add(R3000_R5, "R5", m_r[5]); + state_add(R3000_R6, "R6", m_r[6]); + state_add(R3000_R7, "R7", m_r[7]); + state_add(R3000_R8, "R8", m_r[8]); + state_add(R3000_R9, "R9", m_r[9]); + state_add(R3000_R10, "R10", m_r[10]); + state_add(R3000_R11, "R11", m_r[11]); + state_add(R3000_R12, "R12", m_r[12]); + state_add(R3000_R13, "R13", m_r[13]); + state_add(R3000_R14, "R14", m_r[14]); + state_add(R3000_R15, "R15", m_r[15]); + state_add(R3000_R16, "R16", m_r[16]); + state_add(R3000_R17, "R17", m_r[17]); + state_add(R3000_R18, "R18", m_r[18]); + state_add(R3000_R19, "R19", m_r[19]); + state_add(R3000_R20, "R20", m_r[20]); + state_add(R3000_R21, "R21", m_r[21]); + state_add(R3000_R22, "R22", m_r[22]); + state_add(R3000_R23, "R23", m_r[23]); + state_add(R3000_R24, "R24", m_r[24]); + state_add(R3000_R25, "R25", m_r[25]); + state_add(R3000_R26, "R26", m_r[26]); + state_add(R3000_R27, "R27", m_r[27]); + state_add(R3000_R28, "R28", m_r[28]); + state_add(R3000_R29, "R29", m_r[29]); + state_add(R3000_R30, "R30", m_r[30]); + state_add(R3000_R31, "R31", m_r[31]); // register our state for saving save_item(NAME(m_pc)); @@ -358,7 +358,7 @@ void r3000_device::device_start() //------------------------------------------------- -// device_post_load - +// device_post_load - //------------------------------------------------- void r3000_device::device_post_load() { @@ -749,8 +749,8 @@ inline void r3000_device::handle_cop0() case 0x08: /* BC */ switch (RTREG) { - case 0x00: /* BCzF */ if (!m_in_brcond0()) ADDPC(SIMMVAL); break; - case 0x01: /* BCzT */ if (m_in_brcond0()) ADDPC(SIMMVAL); break; + case 0x00: /* BCzF */ if (!m_in_brcond0()) ADDPC(SIMMVAL); break; + case 0x01: /* BCzT */ if (m_in_brcond0()) ADDPC(SIMMVAL); break; case 0x02: /* BCzFL */ invalid_instruction(); break; case 0x03: /* BCzTL */ invalid_instruction(); break; default: invalid_instruction(); break; @@ -828,8 +828,8 @@ inline void r3000_device::handle_cop1() case 0x08: /* BC */ switch (RTREG) { - case 0x00: /* BCzF */ if (!m_in_brcond1()) ADDPC(SIMMVAL); break; - case 0x01: /* BCzT */ if (m_in_brcond1()) ADDPC(SIMMVAL); break; + case 0x00: /* BCzF */ if (!m_in_brcond1()) ADDPC(SIMMVAL); break; + case 0x01: /* BCzT */ if (m_in_brcond1()) ADDPC(SIMMVAL); break; case 0x02: /* BCzFL */ invalid_instruction(); break; case 0x03: /* BCzTL */ invalid_instruction(); break; default: invalid_instruction(); break; @@ -894,8 +894,8 @@ inline void r3000_device::handle_cop2() case 0x08: /* BC */ switch (RTREG) { - case 0x00: /* BCzF */ if (!m_in_brcond2()) ADDPC(SIMMVAL); break; - case 0x01: /* BCzT */ if (m_in_brcond2()) ADDPC(SIMMVAL); break; + case 0x00: /* BCzF */ if (!m_in_brcond2()) ADDPC(SIMMVAL); break; + case 0x01: /* BCzT */ if (m_in_brcond2()) ADDPC(SIMMVAL); break; case 0x02: /* BCzFL */ invalid_instruction(); break; case 0x03: /* BCzTL */ invalid_instruction(); break; default: invalid_instruction(); break; @@ -960,8 +960,8 @@ inline void r3000_device::handle_cop3() case 0x08: /* BC */ switch (RTREG) { - case 0x00: /* BCzF */ if (!m_in_brcond3()) ADDPC(SIMMVAL); break; - case 0x01: /* BCzT */ if (m_in_brcond3()) ADDPC(SIMMVAL); break; + case 0x00: /* BCzF */ if (!m_in_brcond3()) ADDPC(SIMMVAL); break; + case 0x01: /* BCzT */ if (m_in_brcond3()) ADDPC(SIMMVAL); break; case 0x02: /* BCzFL */ invalid_instruction(); break; case 0x03: /* BCzTL */ invalid_instruction(); break; default: invalid_instruction(); break; diff --git a/src/emu/cpu/mips/r3000.h b/src/emu/cpu/mips/r3000.h index 07711920f3b..edbc823d27c 100644 --- a/src/emu/cpu/mips/r3000.h +++ b/src/emu/cpu/mips/r3000.h @@ -13,7 +13,7 @@ /*************************************************************************** INTERFACE CONFIGURATION MACROS ***************************************************************************/ - + #define MCFG_R3000_ENDIANNESS(_endianness) \ r3000_device::static_set_endianness(*device, _endianness); @@ -134,12 +134,12 @@ protected: // memory accessors struct r3000_data_accessors { - UINT8 (r3000_device::*m_read_byte)(offs_t byteaddress); - UINT16 (r3000_device::*m_read_word)(offs_t byteaddress); - UINT32 (r3000_device::*m_read_dword)(offs_t byteaddress); - void (r3000_device::*m_write_byte)(offs_t byteaddress, UINT8 data); - void (r3000_device::*m_write_word)(offs_t byteaddress, UINT16 data); - void (r3000_device::*m_write_dword)(offs_t byteaddress, UINT32 data); + UINT8 (r3000_device::*m_read_byte)(offs_t byteaddress); + UINT16 (r3000_device::*m_read_word)(offs_t byteaddress); + UINT32 (r3000_device::*m_read_dword)(offs_t byteaddress); + void (r3000_device::*m_write_byte)(offs_t byteaddress, UINT8 data); + void (r3000_device::*m_write_word)(offs_t byteaddress, UINT16 data); + void (r3000_device::*m_write_dword)(offs_t byteaddress, UINT32 data); }; UINT32 readop(offs_t pc); @@ -213,13 +213,13 @@ protected: direct_read_data *m_direct; // configuration - chip_type m_chip_type; - bool m_hasfpu; - endianness_t m_endianness; + chip_type m_chip_type; + bool m_hasfpu; + endianness_t m_endianness; // core registers UINT32 m_pc; - UINT32 m_nextpc; + UINT32 m_nextpc; UINT32 m_hi; UINT32 m_lo; UINT32 m_r[32]; @@ -229,8 +229,8 @@ protected: UINT32 m_ccr[4][32]; // internal stuff - UINT32 m_ppc; - UINT32 m_op; + UINT32 m_ppc; + UINT32 m_op; int m_icount; int m_interrupt_cycles; @@ -254,10 +254,10 @@ protected: size_t m_dcache_size; // I/O - devcb2_read_line m_in_brcond0; - devcb2_read_line m_in_brcond1; - devcb2_read_line m_in_brcond2; - devcb2_read_line m_in_brcond3; + devcb2_read_line m_in_brcond0; + devcb2_read_line m_in_brcond1; + devcb2_read_line m_in_brcond2; + devcb2_read_line m_in_brcond3; }; diff --git a/src/emu/cpu/scudsp/scudspdasm.c b/src/emu/cpu/scudsp/scudspdasm.c index afb750cf5ed..a69d86f83e5 100644 --- a/src/emu/cpu/scudsp/scudspdasm.c +++ b/src/emu/cpu/scudsp/scudspdasm.c @@ -239,9 +239,9 @@ static UINT8 add_table(UINT32 cur_opcode) static UINT32 decode_opcode(UINT32 pc, const SCUDSP_OPCODE *op_table,UINT32 cur_opcode) { -// INT8 rel8; -// UINT32 imm32; -// UINT8 op2; +// INT8 rel8; +// UINT32 imm32; +// UINT8 op2; UINT32 flags = 0; //if (!strcmp(op_table->mnemonic, "jsr") || !strcmp(op_table->mnemonic, "bsr")) diff --git a/src/emu/cpu/sh2/sh2.c b/src/emu/cpu/sh2/sh2.c index 88156208635..23e0d2d05c5 100644 --- a/src/emu/cpu/sh2/sh2.c +++ b/src/emu/cpu/sh2/sh2.c @@ -1860,7 +1860,7 @@ INLINE void op0000(sh2_state *sh2, UINT16 opcode) case 0x06: MOVLS0(sh2, Rm, Rn); break; case 0x07: MULL(sh2, Rm, Rn); break; case 0x08: CLRT(sh2); break; - case 0x09: NOP(); break; + case 0x09: NOP(); break; case 0x0a: STSMACH(sh2, Rn); break; case 0x0b: RTS(sh2); break; case 0x0c: MOVBL0(sh2, Rm, Rn); break; diff --git a/src/emu/cpu/sh2/sh2comn.c b/src/emu/cpu/sh2/sh2comn.c index 0d6f798f79e..b692018df1c 100644 --- a/src/emu/cpu/sh2/sh2comn.c +++ b/src/emu/cpu/sh2/sh2comn.c @@ -32,7 +32,7 @@ INLINE UINT32 RL(sh2_state *sh2, offs_t A) if (A >= 0xc0000000) /* Cache Data Array */ return sh2->program->read_dword(A); - /* 0x60000000 Cache Address Data Array */ + /* 0x60000000 Cache Address Data Array */ if (A >= 0x40000000) /* Cache Associative Purge Area */ return 0xa5a5a5a5; @@ -56,7 +56,7 @@ INLINE void WL(sh2_state *sh2, offs_t A, UINT32 V) return; } - /* 0x60000000 Cache Address Data Array */ + /* 0x60000000 Cache Address Data Array */ if (A >= 0x40000000) /* Cache Associative Purge Area */ return; @@ -575,13 +575,13 @@ WRITE32_HANDLER( sh2_internal_w ) // Standby and cache case 0x24: // SBYCR, CCR /* - CCR - xx-- ---- ---- ---- Way 0/1 - ---x ---- ---- ---- Cache Purge (CP) - ---- x--- ---- ---- Two-Way Mode (TW) - ---- -x-- ---- ---- Data Replacement Disable (OD) - ---- --x- ---- ---- Instruction Replacement Disable (ID) - ---- ---x ---- ---- Cache Enable (CE) + CCR + xx-- ---- ---- ---- Way 0/1 + ---x ---- ---- ---- Cache Purge (CP) + ---- x--- ---- ---- Two-Way Mode (TW) + ---- -x-- ---- ---- Data Replacement Disable (OD) + ---- --x- ---- ---- Instruction Replacement Disable (ID) + ---- ---x ---- ---- Cache Enable (CE) */ break; diff --git a/src/emu/cpu/sh2/sh2drc.c b/src/emu/cpu/sh2/sh2drc.c index b56ced65b56..ecb0c98cc66 100644 --- a/src/emu/cpu/sh2/sh2drc.c +++ b/src/emu/cpu/sh2/sh2drc.c @@ -1807,7 +1807,7 @@ static int generate_group_0(sh2_state *sh2, drcuml_block *block, compiler_state { switch (opcode & 0x3F) { - case 0x00: // these are all illegal + case 0x00: // these are all illegal case 0x01: case 0x10: case 0x11: diff --git a/src/emu/cpu/sharc/sharcdsm.c b/src/emu/cpu/sharc/sharcdsm.c index cfd09a3314f..320bd56746a 100644 --- a/src/emu/cpu/sharc/sharcdsm.c +++ b/src/emu/cpu/sharc/sharcdsm.c @@ -493,7 +493,7 @@ static UINT32 dasm_compute_dreg_dmpm(UINT32 pc, UINT64 opcode) compute(comp); print(", "); } - if (dmd) + if (dmd) { print("DM(%s, %s) = R%d, ", GET_DAG1_I(dmi), GET_DAG1_M(dmm), dmdreg); } diff --git a/src/emu/cpu/sm8500/sm8500.c b/src/emu/cpu/sm8500/sm8500.c index 19d05724109..6bf07b7fb39 100644 --- a/src/emu/cpu/sm8500/sm8500.c +++ b/src/emu/cpu/sm8500/sm8500.c @@ -419,4 +419,3 @@ void sm8500_cpu_device::execute_set_input( int inptnum, int state ) m_program->write_byte(0x12, m_IR0); m_program->write_byte(0x13, m_IR1); } - diff --git a/src/emu/cpu/sm8500/sm8500.h b/src/emu/cpu/sm8500/sm8500.h index 104b94a60e6..9ac92d7fcdc 100644 --- a/src/emu/cpu/sm8500/sm8500.h +++ b/src/emu/cpu/sm8500/sm8500.h @@ -4,12 +4,10 @@ #define __SM8500_H__ #define MCFG_SM8500_DMA_CB(_devcb) \ - sm8500_cpu_device::set_dma_cb(*device, DEVCB2_##_devcb); \ - + sm8500_cpu_device::set_dma_cb(*device, DEVCB2_##_devcb); #define MCFG_SM8500_TIMER_CB(_devcb) \ - sm8500_cpu_device::set_timer_cb(*device, DEVCB2_##_devcb); \ - + sm8500_cpu_device::set_timer_cb(*device, DEVCB2_##_devcb); enum { diff --git a/src/emu/debug/debugvw.c b/src/emu/debug/debugvw.c index 7cf655d908f..307d9575fe8 100644 --- a/src/emu/debug/debugvw.c +++ b/src/emu/debug/debugvw.c @@ -61,9 +61,9 @@ debug_view_source::debug_view_source(const char *name, device_t *device) : m_next(NULL), - m_name(name), - m_device(device), - m_is_octal(false) + m_name(name), + m_device(device), + m_is_octal(false) { device_execute_interface *intf; if (device && device->interface(intf)) @@ -92,9 +92,9 @@ debug_view_source::~debug_view_source() debug_view_source_list::debug_view_source_list(running_machine &machine) : m_machine(machine), - m_head(NULL), - m_tail(NULL), - m_count(0) + m_head(NULL), + m_tail(NULL), + m_count(0) { } @@ -206,24 +206,24 @@ const debug_view_source *debug_view_source_list::match_device(device_t *device) debug_view::debug_view(running_machine &machine, debug_view_type type, debug_view_osd_update_func osdupdate, void *osdprivate) : m_next(NULL), - m_type(type), - m_source(NULL), - m_source_list(machine), - m_osdupdate(osdupdate), - m_osdprivate(osdprivate), - m_visible(10,10), - m_total(10,10), - m_topleft(0,0), - m_cursor(0,0), - m_supports_cursor(false), - m_cursor_visible(false), - m_recompute(true), - m_update_level(0), - m_update_pending(true), - m_osd_update_pending(true), - m_viewdata(NULL), - m_viewdata_size(0), - m_machine(machine) + m_type(type), + m_source(NULL), + m_source_list(machine), + m_osdupdate(osdupdate), + m_osdprivate(osdprivate), + m_visible(10,10), + m_total(10,10), + m_topleft(0,0), + m_cursor(0,0), + m_supports_cursor(false), + m_cursor_visible(false), + m_recompute(true), + m_update_level(0), + m_update_pending(true), + m_osd_update_pending(true), + m_viewdata(NULL), + m_viewdata_size(0), + m_machine(machine) { // allocate memory for the buffer m_viewdata_size = m_visible.y * m_visible.x; @@ -451,7 +451,7 @@ void debug_view::view_click(const int button, const debug_view_xy& pos) debug_view_manager::debug_view_manager(running_machine &machine) : m_machine(machine), - m_viewlist(NULL) + m_viewlist(NULL) { } @@ -573,10 +573,10 @@ debug_view *debug_view_manager::append(debug_view *view) debug_view_expression::debug_view_expression(running_machine &machine) : m_machine(machine), - m_dirty(true), - m_result(0), - m_parsed(debug_cpu_get_global_symtable(machine)), - m_string("0") + m_dirty(true), + m_result(0), + m_parsed(debug_cpu_get_global_symtable(machine)), + m_string("0") { } diff --git a/src/emu/debug/debugvw.h b/src/emu/debug/debugvw.h index aba8094aebe..e5f4df80966 100644 --- a/src/emu/debug/debugvw.h +++ b/src/emu/debug/debugvw.h @@ -72,35 +72,35 @@ enum debug_view_notification // attribute bits for debug_view_char.attrib -const UINT8 DCA_NORMAL = 0x00; // in Windows: black on white -const UINT8 DCA_CHANGED = 0x01; // in Windows: red foreground -const UINT8 DCA_SELECTED = 0x02; // in Windows: light red background -const UINT8 DCA_INVALID = 0x04; // in Windows: dark blue foreground -const UINT8 DCA_DISABLED = 0x08; // in Windows: darker foreground -const UINT8 DCA_ANCILLARY = 0x10; // in Windows: grey background -const UINT8 DCA_CURRENT = 0x20; // in Windows: yellow background -const UINT8 DCA_COMMENT = 0x40; // in Windows: green foreground +const UINT8 DCA_NORMAL = 0x00; // in Windows: black on white +const UINT8 DCA_CHANGED = 0x01; // in Windows: red foreground +const UINT8 DCA_SELECTED = 0x02; // in Windows: light red background +const UINT8 DCA_INVALID = 0x04; // in Windows: dark blue foreground +const UINT8 DCA_DISABLED = 0x08; // in Windows: darker foreground +const UINT8 DCA_ANCILLARY = 0x10; // in Windows: grey background +const UINT8 DCA_CURRENT = 0x20; // in Windows: yellow background +const UINT8 DCA_COMMENT = 0x40; // in Windows: green foreground // special characters that can be passed to process_char() -const int DCH_UP = 1; // up arrow -const int DCH_DOWN = 2; // down arrow -const int DCH_LEFT = 3; // left arrow -const int DCH_RIGHT = 4; // right arrow -const int DCH_PUP = 5; // page up -const int DCH_PDOWN = 6; // page down -const int DCH_HOME = 7; // home -const int DCH_CTRLHOME = 8; // ctrl+home -const int DCH_END = 9; // end -const int DCH_CTRLEND = 10; // ctrl+end -const int DCH_CTRLRIGHT = 11; // ctrl+right -const int DCH_CTRLLEFT = 12; // ctrl+left +const int DCH_UP = 1; // up arrow +const int DCH_DOWN = 2; // down arrow +const int DCH_LEFT = 3; // left arrow +const int DCH_RIGHT = 4; // right arrow +const int DCH_PUP = 5; // page up +const int DCH_PDOWN = 6; // page down +const int DCH_HOME = 7; // home +const int DCH_CTRLHOME = 8; // ctrl+home +const int DCH_END = 9; // end +const int DCH_CTRLEND = 10; // ctrl+end +const int DCH_CTRLRIGHT = 11; // ctrl+right +const int DCH_CTRLLEFT = 12; // ctrl+left // special characters that can be passed to process_click() -const int DCK_LEFT_CLICK = 1; // left instantaneous click -const int DCK_RIGHT_CLICK = 2; // right instantaneous click -const int DCK_MIDDLE_CLICK = 3; // middle instantaneous click +const int DCK_LEFT_CLICK = 1; // left instantaneous click +const int DCK_RIGHT_CLICK = 2; // right instantaneous click +const int DCK_MIDDLE_CLICK = 3; // middle instantaneous click //************************************************************************** @@ -118,8 +118,8 @@ typedef void (*debug_view_osd_update_func)(debug_view &view, void *osdprivate); // a single "character" in the debug view has an ASCII value and an attribute byte struct debug_view_char { - UINT8 byte; - UINT8 attrib; + UINT8 byte; + UINT8 attrib; }; @@ -129,8 +129,8 @@ class debug_view_xy public: debug_view_xy(int _x = 0, int _y = 0) : x(_x), y(_y) { } - INT32 x; - INT32 y; + INT32 x; + INT32 y; }; @@ -154,10 +154,10 @@ public: private: // internal state - debug_view_source * m_next; // link to next item - astring m_name; // name of the source item - device_t * m_device; // associated device (if applicable) - bool m_is_octal; // is view in octal or hex + debug_view_source * m_next; // link to next item + astring m_name; // name of the source item + device_t * m_device; // associated device (if applicable) + bool m_is_octal; // is view in octal or hex }; @@ -186,10 +186,10 @@ public: private: // internal state - running_machine & m_machine; // reference to our machine - debug_view_source * m_head; // head of the list - debug_view_source * m_tail; // end of the tail - UINT32 m_count; // number of items in the list + running_machine & m_machine; // reference to our machine + debug_view_source * m_head; // head of the list + debug_view_source * m_tail; // end of the tail + UINT32 m_count; // number of items in the list }; @@ -248,33 +248,33 @@ protected: protected: // core view data - debug_view * m_next; // link to the next view - debug_view_type m_type; // type of view - const debug_view_source *m_source; // currently selected data source - debug_view_source_list m_source_list; // list of available data sources + debug_view * m_next; // link to the next view + debug_view_type m_type; // type of view + const debug_view_source *m_source; // currently selected data source + debug_view_source_list m_source_list; // list of available data sources // OSD data - debug_view_osd_update_func m_osdupdate; // callback for the update - void * m_osdprivate; // OSD-managed private data + debug_view_osd_update_func m_osdupdate; // callback for the update + void * m_osdprivate; // OSD-managed private data // visibility info - debug_view_xy m_visible; // visible size (in rows and columns) - debug_view_xy m_total; // total size (in rows and columns) - debug_view_xy m_topleft; // top-left visible position (in rows and columns) - debug_view_xy m_cursor; // cursor position - bool m_supports_cursor; // does this view support a cursor? - bool m_cursor_visible; // is the cursor visible? + debug_view_xy m_visible; // visible size (in rows and columns) + debug_view_xy m_total; // total size (in rows and columns) + debug_view_xy m_topleft; // top-left visible position (in rows and columns) + debug_view_xy m_cursor; // cursor position + bool m_supports_cursor; // does this view support a cursor? + bool m_cursor_visible; // is the cursor visible? // update info - bool m_recompute; // does this view require a recomputation? - UINT8 m_update_level; // update level; updates when this hits 0 - bool m_update_pending; // true if there is a pending update - bool m_osd_update_pending; // true if there is a pending update - debug_view_char * m_viewdata; // current array of view data - int m_viewdata_size; // number of elements of the viewdata array + bool m_recompute; // does this view require a recomputation? + UINT8 m_update_level; // update level; updates when this hits 0 + bool m_update_pending; // true if there is a pending update + bool m_osd_update_pending; // true if there is a pending update + debug_view_char * m_viewdata; // current array of view data + int m_viewdata_size; // number of elements of the viewdata array private: - running_machine & m_machine; // machine associated with this view + running_machine & m_machine; // machine associated with this view }; @@ -302,8 +302,8 @@ private: debug_view *append(debug_view *view); // internal state - running_machine & m_machine; // reference to our machine - debug_view * m_viewlist; // list of views + running_machine & m_machine; // reference to our machine + debug_view * m_viewlist; // list of views }; @@ -333,11 +333,11 @@ private: bool recompute(); // internal state - running_machine & m_machine; // reference to the machine - bool m_dirty; // true if the expression needs to be re-evaluated - UINT64 m_result; // last result from the expression - parsed_expression m_parsed; // parsed expression data - astring m_string; // copy of the expression string + running_machine & m_machine; // reference to the machine + bool m_dirty; // true if the expression needs to be re-evaluated + UINT64 m_result; // last result from the expression + parsed_expression m_parsed; // parsed expression data + astring m_string; // copy of the expression string }; diff --git a/src/emu/debug/dvdisasm.c b/src/emu/debug/dvdisasm.c index 53ecf9c5dd0..ba3955030f3 100644 --- a/src/emu/debug/dvdisasm.c +++ b/src/emu/debug/dvdisasm.c @@ -54,9 +54,9 @@ debug_view_disasm_source::debug_view_disasm_source(const char *name, device_t &device) : debug_view_source(name, &device), - m_device(device), - m_disasmintf(dynamic_cast(&device)), - m_space(device.memory().space(AS_PROGRAM)) + m_device(device), + m_disasmintf(dynamic_cast(&device)), + m_space(device.memory().space(AS_PROGRAM)) { } @@ -72,20 +72,20 @@ debug_view_disasm_source::debug_view_disasm_source(const char *name, device_t &d debug_view_disasm::debug_view_disasm(running_machine &machine, debug_view_osd_update_func osdupdate, void *osdprivate) : debug_view(machine, DVT_DISASSEMBLY, osdupdate, osdprivate), - m_right_column(DASM_RIGHTCOL_RAW), - m_backwards_steps(3), - m_dasm_width(DEFAULT_DASM_WIDTH), - m_last_direct_raw(NULL), - m_last_direct_decrypted(NULL), - m_last_change_count(0), - m_last_pcbyte(0), - m_divider1(0), - m_divider2(0), - m_divider3(0), - m_expression(machine), - m_allocated(0,0), - m_byteaddress(NULL), - m_dasm(NULL) + m_right_column(DASM_RIGHTCOL_RAW), + m_backwards_steps(3), + m_dasm_width(DEFAULT_DASM_WIDTH), + m_last_direct_raw(NULL), + m_last_direct_decrypted(NULL), + m_last_change_count(0), + m_last_pcbyte(0), + m_divider1(0), + m_divider2(0), + m_divider3(0), + m_expression(machine), + m_allocated(0,0), + m_byteaddress(NULL), + m_dasm(NULL) { // fail if no available sources enumerate_sources(); @@ -199,7 +199,7 @@ void debug_view_disasm::view_char(int chval) m_cursor.y = temp; break; - case DCH_HOME: // set the active column to the PC + case DCH_HOME: // set the active column to the PC { const debug_view_disasm_source &source = downcast(*m_source); offs_t pc = source.m_space.address_to_byte(source.m_device.safe_pc()) & source.m_space.logbytemask(); @@ -393,7 +393,7 @@ bool debug_view_disasm::recompute(offs_t pc, int startline, int lines) m_total.x = m_divider2 + 1 + char_num * maxbytes_clamped + (maxbytes_clamped / minbytes - 1) + 1; } else if (m_right_column == DASM_RIGHTCOL_COMMENTS) - m_total.x = m_divider2 + 1 + 50; // DEBUG_COMMENT_MAX_LINE_LENGTH + m_total.x = m_divider2 + 1 + 50; // DEBUG_COMMENT_MAX_LINE_LENGTH else m_total.x = m_divider2 + 1; diff --git a/src/emu/debug/dvdisasm.h b/src/emu/debug/dvdisasm.h index 64d25295d2d..1bfdbaf5ad7 100644 --- a/src/emu/debug/dvdisasm.h +++ b/src/emu/debug/dvdisasm.h @@ -77,9 +77,9 @@ public: private: // internal state - device_t & m_device; // underlying device - device_disasm_interface *m_disasmintf; // disassembly interface - address_space & m_space; // address space to display + device_t & m_device; // underlying device + device_disasm_interface *m_disasmintf; // disassembly interface + address_space & m_space; // address space to display }; @@ -123,19 +123,19 @@ private: bool recompute(offs_t pc, int startline, int lines); // internal state - disasm_right_column m_right_column; // right column contents - UINT32 m_backwards_steps; // number of backwards steps - UINT32 m_dasm_width; // width of the disassembly area - UINT8 * m_last_direct_raw; // last direct raw value - UINT8 * m_last_direct_decrypted;// last direct decrypted value - UINT32 m_last_change_count; // last comment change count - offs_t m_last_pcbyte; // last PC byte value - int m_divider1, m_divider2; // left and right divider columns - int m_divider3; // comment divider column - debug_view_expression m_expression; // expression-related information - debug_view_xy m_allocated; // allocated rows/columns - offs_t * m_byteaddress; // addresses of the instructions - char * m_dasm; // disassembled instructions + disasm_right_column m_right_column; // right column contents + UINT32 m_backwards_steps; // number of backwards steps + UINT32 m_dasm_width; // width of the disassembly area + UINT8 * m_last_direct_raw; // last direct raw value + UINT8 * m_last_direct_decrypted;// last direct decrypted value + UINT32 m_last_change_count; // last comment change count + offs_t m_last_pcbyte; // last PC byte value + int m_divider1, m_divider2; // left and right divider columns + int m_divider3; // comment divider column + debug_view_expression m_expression; // expression-related information + debug_view_xy m_allocated; // allocated rows/columns + offs_t * m_byteaddress; // addresses of the instructions + char * m_dasm; // disassembled instructions // constants static const int DEFAULT_DASM_LINES = 1000; diff --git a/src/emu/debug/dvmemory.c b/src/emu/debug/dvmemory.c index c0a6b045bd4..7782bb6c073 100644 --- a/src/emu/debug/dvmemory.c +++ b/src/emu/debug/dvmemory.c @@ -74,37 +74,37 @@ const debug_view_memory::memory_view_pos debug_view_memory::s_memory_pos_table[9 debug_view_memory_source::debug_view_memory_source(const char *name, address_space &space) : debug_view_source(name, &space.device()), - m_space(&space), - m_memintf(dynamic_cast(&space.device())), - m_base(NULL), - m_length(0), - m_offsetxor(0), - m_endianness(space.endianness()), - m_prefsize(space.data_width() / 8) + m_space(&space), + m_memintf(dynamic_cast(&space.device())), + m_base(NULL), + m_length(0), + m_offsetxor(0), + m_endianness(space.endianness()), + m_prefsize(space.data_width() / 8) { } debug_view_memory_source::debug_view_memory_source(const char *name, memory_region ®ion) : debug_view_source(name), - m_space(NULL), - m_memintf(NULL), - m_base(region), - m_length(region.bytes()), - m_offsetxor(NATIVE_ENDIAN_VALUE_LE_BE(region.width() - 1, 0)), - m_endianness(region.endianness()), - m_prefsize(MIN(region.width(), 8)) + m_space(NULL), + m_memintf(NULL), + m_base(region), + m_length(region.bytes()), + m_offsetxor(NATIVE_ENDIAN_VALUE_LE_BE(region.width() - 1, 0)), + m_endianness(region.endianness()), + m_prefsize(MIN(region.width(), 8)) { } debug_view_memory_source::debug_view_memory_source(const char *name, void *base, int element_size, int num_elements) : debug_view_source(name), - m_space(NULL), - m_memintf(NULL), - m_base(base), - m_length(element_size * num_elements), - m_offsetxor(0), - m_endianness(ENDIANNESS_NATIVE), - m_prefsize(MIN(element_size, 8)) + m_space(NULL), + m_memintf(NULL), + m_base(base), + m_length(element_size * num_elements), + m_offsetxor(0), + m_endianness(ENDIANNESS_NATIVE), + m_prefsize(MIN(element_size, 8)) { } @@ -120,15 +120,15 @@ debug_view_memory_source::debug_view_memory_source(const char *name, void *base, debug_view_memory::debug_view_memory(running_machine &machine, debug_view_osd_update_func osdupdate, void *osdprivate) : debug_view(machine, DVT_MEMORY, osdupdate, osdprivate), - m_expression(machine), - m_chunks_per_row(16), - m_bytes_per_chunk(1), - m_reverse_view(false), - m_ascii_view(true), - m_no_translation(false), - m_maxaddr(0), - m_bytes_per_row(16), - m_byte_offset(0) + m_expression(machine), + m_chunks_per_row(16), + m_bytes_per_chunk(1), + m_reverse_view(false), + m_ascii_view(true), + m_no_translation(false), + m_maxaddr(0), + m_bytes_per_row(16), + m_byte_offset(0) { // fail if no available sources enumerate_sources(); @@ -181,10 +181,10 @@ void debug_view_memory::enumerate_sources() break; // add pretty much anything that's not a timer (we may wish to cull other items later) - // also, don't trim the front of the name, it's important to know which VIA6522 we're looking at, e.g. - if (strncmp(itemname, "timer/", 6)) + // also, don't trim the front of the name, it's important to know which VIA6522 we're looking at, e.g. + if (strncmp(itemname, "timer/", 6)) { - name.cpy(itemname); + name.cpy(itemname); m_source_list.append(*auto_alloc(machine(), debug_view_memory_source(name, base, valsize, valcount))); } } @@ -653,10 +653,10 @@ bool debug_view_memory::read(UINT8 size, offs_t offs, UINT64 &data) { switch (size) { - case 1: data = debug_read_byte(*source.m_space, offs, !m_no_translation); break; - case 2: data = debug_read_word(*source.m_space, offs, !m_no_translation); break; - case 4: data = debug_read_dword(*source.m_space, offs, !m_no_translation); break; - case 8: data = debug_read_qword(*source.m_space, offs, !m_no_translation); break; + case 1: data = debug_read_byte(*source.m_space, offs, !m_no_translation); break; + case 2: data = debug_read_word(*source.m_space, offs, !m_no_translation); break; + case 4: data = debug_read_dword(*source.m_space, offs, !m_no_translation); break; + case 8: data = debug_read_qword(*source.m_space, offs, !m_no_translation); break; } } return ismapped; @@ -700,10 +700,10 @@ void debug_view_memory::write(UINT8 size, offs_t offs, UINT64 data) { switch (size) { - case 1: debug_write_byte(*source.m_space, offs, data, !m_no_translation); break; - case 2: debug_write_word(*source.m_space, offs, data, !m_no_translation); break; - case 4: debug_write_dword(*source.m_space, offs, data, !m_no_translation); break; - case 8: debug_write_qword(*source.m_space, offs, data, !m_no_translation); break; + case 1: debug_write_byte(*source.m_space, offs, data, !m_no_translation); break; + case 2: debug_write_word(*source.m_space, offs, data, !m_no_translation); break; + case 4: debug_write_dword(*source.m_space, offs, data, !m_no_translation); break; + case 8: debug_write_qword(*source.m_space, offs, data, !m_no_translation); break; } return; } diff --git a/src/emu/debug/dvmemory.h b/src/emu/debug/dvmemory.h index b370fdb51a9..06a9bcb9f16 100644 --- a/src/emu/debug/dvmemory.h +++ b/src/emu/debug/dvmemory.h @@ -60,13 +60,13 @@ public: address_space *space() const { return m_space; } private: - address_space *m_space; // address space we reference (if any) - device_memory_interface *m_memintf; // pointer to the memory interface of the device - void * m_base; // pointer to memory base - offs_t m_length; // length of memory - offs_t m_offsetxor; // XOR to apply to offsets - endianness_t m_endianness; // endianness of memory - UINT8 m_prefsize; // preferred bytes per chunk + address_space *m_space; // address space we reference (if any) + device_memory_interface *m_memintf; // pointer to the memory interface of the device + void * m_base; // pointer to memory base + offs_t m_length; // length of memory + offs_t m_offsetxor; // XOR to apply to offsets + endianness_t m_endianness; // endianness of memory + UINT8 m_prefsize; // preferred bytes per chunk }; @@ -127,31 +127,31 @@ private: void write(UINT8 size, offs_t offs, UINT64 data); // internal state - debug_view_expression m_expression; // expression describing the start address - UINT32 m_chunks_per_row; // number of chunks displayed per line - UINT8 m_bytes_per_chunk; // bytes per chunk - bool m_reverse_view; // reverse-endian view? - bool m_ascii_view; // display ASCII characters? - bool m_no_translation; // don't run addresses through the cpu translation hook - offs_t m_maxaddr; // (derived) maximum address to display - UINT32 m_bytes_per_row; // (derived) number of bytes displayed per line - UINT32 m_byte_offset; // (derived) offset of starting visible byte - astring m_addrformat; // (derived) format string to use to print addresses + debug_view_expression m_expression; // expression describing the start address + UINT32 m_chunks_per_row; // number of chunks displayed per line + UINT8 m_bytes_per_chunk; // bytes per chunk + bool m_reverse_view; // reverse-endian view? + bool m_ascii_view; // display ASCII characters? + bool m_no_translation; // don't run addresses through the cpu translation hook + offs_t m_maxaddr; // (derived) maximum address to display + UINT32 m_bytes_per_row; // (derived) number of bytes displayed per line + UINT32 m_byte_offset; // (derived) offset of starting visible byte + astring m_addrformat; // (derived) format string to use to print addresses struct section { bool contains(int x) const { return x >= m_pos && x < m_pos + m_width; } - INT32 m_pos; /* starting position */ - INT32 m_width; /* width of this section */ + INT32 m_pos; /* starting position */ + INT32 m_width; /* width of this section */ }; - section m_section[3]; // (derived) 3 sections to manage + section m_section[3]; // (derived) 3 sections to manage struct memory_view_pos { - UINT8 m_spacing; /* spacing between each entry */ - UINT8 m_shift[24]; /* shift for each character */ + UINT8 m_spacing; /* spacing between each entry */ + UINT8 m_shift[24]; /* shift for each character */ }; - static const memory_view_pos s_memory_pos_table[9]; // table for rendering at different chunk sizes + static const memory_view_pos s_memory_pos_table[9]; // table for rendering at different chunk sizes // constants static const int MEM_MAX_LINE_WIDTH = 1024; diff --git a/src/emu/diimage.c b/src/emu/diimage.c index ddfccce0a7f..c435e8df00e 100644 --- a/src/emu/diimage.c +++ b/src/emu/diimage.c @@ -67,8 +67,8 @@ const image_device_type_info device_image_interface::m_device_info_array[] = { IO_CDROM, "cdrom", "cdrm" }, /* 13 */ { IO_MAGTAPE, "magtape", "magt" }, /* 14 */ { IO_ROM, "romimage", "rom" }, /* 15 */ - { IO_MIDIIN, "midiin", "min" }, /* 16 */ - { IO_MIDIOUT, "midiout", "mout" } /* 17 */ + { IO_MIDIIN, "midiin", "min" }, /* 16 */ + { IO_MIDIOUT, "midiout", "mout" } /* 17 */ }; diff --git a/src/emu/diimage.h b/src/emu/diimage.h index 70da52c9263..15f75019a13 100644 --- a/src/emu/diimage.h +++ b/src/emu/diimage.h @@ -70,8 +70,8 @@ enum iodevice_t IO_CDROM, /* 14 - optical CD-ROM disc */ IO_MAGTAPE, /* 15 - Magentic tape */ IO_ROM, /* 16 - Individual ROM image - the Amstrad CPC has a few applications that were sold on 16kB ROMs */ - IO_MIDIIN, /* 17 - MIDI In port */ - IO_MIDIOUT, /* 18 - MIDI Out port */ + IO_MIDIIN, /* 17 - MIDI In port */ + IO_MIDIOUT, /* 18 - MIDI Out port */ IO_COUNT /* 19 - Total Number of IO_devices for searching */ }; diff --git a/src/emu/imagedev/midiin.c b/src/emu/imagedev/midiin.c index 97ed349cd64..75dfd047cdd 100644 --- a/src/emu/imagedev/midiin.c +++ b/src/emu/imagedev/midiin.c @@ -21,8 +21,8 @@ const device_type MIDIIN = &device_creator; midiin_device::midiin_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, MIDIIN, "MIDI In image device", tag, owner, clock), - device_image_interface(mconfig, *this), - device_serial_interface(mconfig, *this) + device_image_interface(mconfig, *this), + device_serial_interface(mconfig, *this) { } @@ -77,7 +77,7 @@ void midiin_device::device_timer(emu_timer &timer, device_timer_id id, int param int bytesRead; if (m_midi == NULL) { - return; + return; } while (osd_poll_midi_channel(m_midi)) @@ -122,8 +122,8 @@ void midiin_device::call_unload(void) { osd_close_midi_channel(m_midi); } - m_timer->enable(false); - m_midi = NULL; + m_timer->enable(false); + m_midi = NULL; } void midiin_device::tra_complete() @@ -131,7 +131,7 @@ void midiin_device::tra_complete() // is there more waiting to send? if (m_xmit_read != m_xmit_write) { -// printf("tx1 %02x\n", m_xmitring[m_xmit_read]); +// printf("tx1 %02x\n", m_xmitring[m_xmit_read]); transmit_register_setup(m_xmitring[m_xmit_read++]); if (m_xmit_read >= XMIT_RING_SIZE) { @@ -158,7 +158,7 @@ void midiin_device::xmit_char(UINT8 data) if (!m_tx_busy) { m_tx_busy = true; -// printf("tx0 %02x\n", data); +// printf("tx0 %02x\n", data); transmit_register_setup(data); } else @@ -175,4 +175,3 @@ void midiin_device::xmit_char(UINT8 data) void midiin_device::input_callback(UINT8 state) { } - diff --git a/src/emu/imagedev/midiout.c b/src/emu/imagedev/midiout.c index 3155a9b7057..c0de35d906d 100644 --- a/src/emu/imagedev/midiout.c +++ b/src/emu/imagedev/midiout.c @@ -44,7 +44,7 @@ void midiout_device::device_reset() } /*------------------------------------------------- - device_config_complete + device_config_complete -------------------------------------------------*/ void midiout_device::device_config_complete(void) @@ -94,4 +94,3 @@ void midiout_device::rcv_complete() // Rx completed receiving byte void midiout_device::input_callback(UINT8 state) { } - diff --git a/src/emu/machine/mos6551.c b/src/emu/machine/mos6551.c index 06c3927c95a..a20e1aebc9b 100644 --- a/src/emu/machine/mos6551.c +++ b/src/emu/machine/mos6551.c @@ -9,12 +9,12 @@ /* - TODO: + TODO: - - receiver disable - - IRQ on DCD/DSR change - - parity - - framing error + - receiver disable + - IRQ on DCD/DSR change + - parity + - framing error */ @@ -100,7 +100,7 @@ void mos6551_device::tra_complete() { transmit_register_setup(m_tdr); m_st |= ST_TDRE; - + if ((m_cmd & CMD_TC_MASK) == CMD_TC_TIE_RTS_LO) { m_st |= ST_IRQ; @@ -120,7 +120,7 @@ void mos6551_device::rcv_complete() { m_st |= ST_OR; } - + m_st &= ~(ST_FE | ST_PE); m_st |= ST_RDRF; @@ -159,7 +159,7 @@ void mos6551_device::update_serial() else { int baud = clock() / brg_divider[brg] / 16; - + set_tra_rate(baud); if (m_ctrl & CTRL_RXC_BRG) @@ -250,12 +250,12 @@ WRITE8_MEMBER( mos6551_device::write ) case 0: m_tdr = data; m_st &= ~ST_TDRE; - + if (is_transmit_register_empty()) { transmit_register_setup(m_tdr); m_st |= ST_TDRE; - + if ((m_cmd & CMD_TC_MASK) == CMD_TC_TIE_RTS_LO) { m_st |= ST_IRQ; diff --git a/src/emu/machine/mos6551.h b/src/emu/machine/mos6551.h index b3b1367461a..d11ec355328 100644 --- a/src/emu/machine/mos6551.h +++ b/src/emu/machine/mos6551.h @@ -93,17 +93,17 @@ protected: CTRL_BRG_9600, CTRL_BRG_19200, CTRL_BRG_MASK = 0x0f, - + CTRL_RXC_EXT = 0x00, CTRL_RXC_BRG = 0x10, CTRL_RXC_MASK = 0x10, - + CTRL_WL_8 = 0x00, CTRL_WL_7 = 0x20, CTRL_WL_6 = 0x40, CTRL_WL_5 = 0x60, CTRL_WL_MASK = 0x60, - + CTRL_SB_1 = 0x00, CTRL_SB_2 = 0x80, CTRL_SB_MASK = 0x80 @@ -112,9 +112,9 @@ protected: enum { CMD_DTR = 0x01, - + CMD_RIE = 0x02, - + CMD_TC_RTS_HI = 0x00, CMD_TC_TIE_RTS_LO = 0x04, CMD_TC_RTS_LO = 0x08, diff --git a/src/emu/machine/n68681.c b/src/emu/machine/n68681.c index 10dd04f86a6..e8d01d700c6 100644 --- a/src/emu/machine/n68681.c +++ b/src/emu/machine/n68681.c @@ -976,4 +976,3 @@ void duart68681_channel::ACR_updated() { write_chan_reg(1, CSR); } - diff --git a/src/emu/machine/s3c24xx.c b/src/emu/machine/s3c24xx.c index 4cbd9d9b3de..521effa5c8e 100644 --- a/src/emu/machine/s3c24xx.c +++ b/src/emu/machine/s3c24xx.c @@ -3679,7 +3679,7 @@ static DEVICE_RESET( s3c24xx ) static DEVICE_START( s3c24xx ) { s3c24xx_t *s3c24xx = get_token( device); - + s3c24xx->m_cpu = device->machine().device( "maincpu"); verboselog( device->machine(), 1, "s3c24xx device start\n"); diff --git a/src/emu/machine/wd_fdc.c b/src/emu/machine/wd_fdc.c index 0711626d948..bb353c176c6 100644 --- a/src/emu/machine/wd_fdc.c +++ b/src/emu/machine/wd_fdc.c @@ -1002,10 +1002,10 @@ void wd_fdc_t::sector_w(UINT8 val) if (inverted_bus) val ^= 0xff; // No more than one write in flight - // C1581 accesses this register with an INC opcode, + // C1581 accesses this register with an INC opcode, // i.e. write old value, write new value, and the new value gets ignored by this //if(sector_buffer != -1) - // return; + // return; sector_buffer = val; delay_cycles(t_sector, dden ? delay_register_commit*2 : delay_register_commit); diff --git a/src/emu/softlist.c b/src/emu/softlist.c index 501eca9c37d..1ebb56e4ba7 100644 --- a/src/emu/softlist.c +++ b/src/emu/softlist.c @@ -1478,7 +1478,7 @@ static struct rom_entry *software_find_romdata(software_part *swpart, const char data++; } - + if (data && !data->_name) data = NULL; } diff --git a/src/emu/sound/digitalk.c b/src/emu/sound/digitalk.c index ea78a5f807d..3af96b6eb13 100644 --- a/src/emu/sound/digitalk.c +++ b/src/emu/sound/digitalk.c @@ -263,29 +263,29 @@ const device_type DIGITALKER = &device_creator; digitalker_device::digitalker_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, DIGITALKER, "Digitalker", tag, owner, clock), - device_sound_interface(mconfig, *this), - m_rom(NULL), - m_stream(NULL), - m_data(0), - m_cs(0), - m_cms(0), - m_wr(0), - m_intr(0), - m_bpos(0), - m_apos(0), - m_mode(0), - m_cur_segment(0), - m_cur_repeat(0), - m_segments(0), - m_repeats(0), - m_prev_pitch(0), - m_pitch(0), - m_pitch_pos(0), - m_stop_after(0), - m_cur_dac(0), - m_cur_bits(0), - m_zero_count(0), - m_dac_index(0) + device_sound_interface(mconfig, *this), + m_rom(NULL), + m_stream(NULL), + m_data(0), + m_cs(0), + m_cms(0), + m_wr(0), + m_intr(0), + m_bpos(0), + m_apos(0), + m_mode(0), + m_cur_segment(0), + m_cur_repeat(0), + m_segments(0), + m_repeats(0), + m_prev_pitch(0), + m_pitch(0), + m_pitch_pos(0), + m_stop_after(0), + m_cur_dac(0), + m_cur_bits(0), + m_zero_count(0), + m_dac_index(0) { } @@ -688,4 +688,3 @@ WRITE8_MEMBER( digitalker_device::digitalker_data_w ) { m_data = data; } - diff --git a/src/emu/sound/digitalk.h b/src/emu/sound/digitalk.h index d293fabb9a9..70fc392764c 100644 --- a/src/emu/sound/digitalk.h +++ b/src/emu/sound/digitalk.h @@ -19,7 +19,7 @@ // ======================> digitalker_device class digitalker_device : public device_t, - public device_sound_interface + public device_sound_interface { public: digitalker_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); diff --git a/src/emu/sound/flt_rc.c b/src/emu/sound/flt_rc.c index 7d026a65253..f05cc63883e 100644 --- a/src/emu/sound/flt_rc.c +++ b/src/emu/sound/flt_rc.c @@ -19,11 +19,11 @@ const device_type FILTER_RC = &device_creator; filter_rc_device::filter_rc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, FILTER_RC, "RC Filter", tag, owner, clock), - device_sound_interface(mconfig, *this), - m_stream(NULL), - m_k(0), - m_memory(0), - m_type(0) + device_sound_interface(mconfig, *this), + m_stream(NULL), + m_k(0), + m_memory(0), + m_type(0) { } @@ -119,4 +119,3 @@ void filter_rc_device::filter_rc_set_RC(int type, double R1, double R2, double R m_stream->update(); set_RC_info(type, R1, R2, R3, C); } - diff --git a/src/emu/sound/flt_rc.h b/src/emu/sound/flt_rc.h index aeb18716632..acf5c628baa 100644 --- a/src/emu/sound/flt_rc.h +++ b/src/emu/sound/flt_rc.h @@ -73,13 +73,13 @@ extern const flt_rc_config flt_rc_ac_default; // ======================> filter_rc_device class filter_rc_device : public device_t, - public device_sound_interface + public device_sound_interface { public: filter_rc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); ~filter_rc_device() { } - void filter_rc_set_RC(int type, double R1, double R2, double R3, double C); + void filter_rc_set_RC(int type, double R1, double R2, double R3, double C); protected: // device-level overrides @@ -89,7 +89,7 @@ protected: virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); private: - void set_RC_info(int type, double R1, double R2, double R3, double C); + void set_RC_info(int type, double R1, double R2, double R3, double C); private: sound_stream* m_stream; diff --git a/src/emu/sound/flt_vol.c b/src/emu/sound/flt_vol.c index 2532371ecb9..eac2ca7ac7a 100644 --- a/src/emu/sound/flt_vol.c +++ b/src/emu/sound/flt_vol.c @@ -11,9 +11,9 @@ const device_type FILTER_VOLUME = &device_creator; filter_volume_device::filter_volume_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, FILTER_VOLUME, "Volume Filter", tag, owner, clock), - device_sound_interface(mconfig, *this), - m_stream(NULL), - m_gain(0) + device_sound_interface(mconfig, *this), + m_stream(NULL), + m_gain(0) { } @@ -48,4 +48,3 @@ void filter_volume_device::flt_volume_set_volume(float volume) { m_gain = (int)(volume * 256); } - diff --git a/src/emu/sound/flt_vol.h b/src/emu/sound/flt_vol.h index 7836930247c..8440989764a 100644 --- a/src/emu/sound/flt_vol.h +++ b/src/emu/sound/flt_vol.h @@ -22,13 +22,13 @@ // ======================> filter_volume_device class filter_volume_device : public device_t, - public device_sound_interface + public device_sound_interface { public: filter_volume_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); ~filter_volume_device() { } - void flt_volume_set_volume(float volume); + void flt_volume_set_volume(float volume); protected: // device-level overrides diff --git a/src/emu/sound/iremga20.c b/src/emu/sound/iremga20.c index c2e32675731..9314760f57c 100644 --- a/src/emu/sound/iremga20.c +++ b/src/emu/sound/iremga20.c @@ -46,10 +46,10 @@ const device_type IREMGA20 = &device_creator; iremga20_device::iremga20_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, IREMGA20, "Irem GA20", tag, owner, clock), - device_sound_interface(mconfig, *this), - m_rom(NULL), - m_rom_size(0), - m_stream(NULL) + device_sound_interface(mconfig, *this), + m_rom(NULL), + m_rom_size(0), + m_stream(NULL) { } diff --git a/src/emu/sound/iremga20.h b/src/emu/sound/iremga20.h index 02a70f5aaa4..f919065e749 100644 --- a/src/emu/sound/iremga20.h +++ b/src/emu/sound/iremga20.h @@ -56,12 +56,12 @@ protected: virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); public: - DECLARE_WRITE8_MEMBER( irem_ga20_w ); - DECLARE_READ8_MEMBER( irem_ga20_r ); + DECLARE_WRITE8_MEMBER( irem_ga20_w ); + DECLARE_READ8_MEMBER( irem_ga20_r ); private: void iremga20_reset(); - + private: UINT8 *m_rom; INT32 m_rom_size; diff --git a/src/emu/sound/k005289.c b/src/emu/sound/k005289.c index c3f492e6df2..710f7b4369a 100644 --- a/src/emu/sound/k005289.c +++ b/src/emu/sound/k005289.c @@ -45,11 +45,11 @@ const device_type K005289 = &device_creator; k005289_device::k005289_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, K005289, "K005289", tag, owner, clock), - device_sound_interface(mconfig, *this), + device_sound_interface(mconfig, *this), m_sound_prom(NULL), m_stream(NULL), m_mclock(0), - m_rate(0), + m_rate(0), m_mixer_table(NULL), m_mixer_lookup(NULL), m_mixer_buffer(NULL), diff --git a/src/emu/sound/k005289.h b/src/emu/sound/k005289.h index cef1781df7c..349bb57281b 100644 --- a/src/emu/sound/k005289.h +++ b/src/emu/sound/k005289.h @@ -30,7 +30,7 @@ struct k005289_sound_channel // ======================> k005289_device class k005289_device : public device_t, - public device_sound_interface + public device_sound_interface { public: k005289_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); @@ -52,8 +52,8 @@ public: DECLARE_WRITE8_MEMBER( k005289_keylatch_B_w ); private: - void make_mixer_table(int voices); - void k005289_recompute(); + void make_mixer_table(int voices); + void k005289_recompute(); private: k005289_sound_channel m_channel_list[2]; @@ -61,7 +61,7 @@ private: const unsigned char *m_sound_prom; sound_stream *m_stream; int m_mclock; - int m_rate; + int m_rate; /* mixer tables and internal buffers */ INT16 *m_mixer_table; diff --git a/src/emu/sound/k056800.c b/src/emu/sound/k056800.c index 1d587d92c18..5623fc20354 100644 --- a/src/emu/sound/k056800.c +++ b/src/emu/sound/k056800.c @@ -198,5 +198,3 @@ void k056800_device::device_reset() { DEVICE_RESET_NAME( k056800 )(this); } - - diff --git a/src/emu/sound/n63701x.c b/src/emu/sound/n63701x.c index 3b4acf8dc61..22ebcc3385b 100644 --- a/src/emu/sound/n63701x.c +++ b/src/emu/sound/n63701x.c @@ -24,16 +24,16 @@ silence compression: '00 nn' must be replaced by nn+1 times '80'. inside 16 bits without overflowing. */ static const int vol_table[4] = { 26, 84, 200, 258 }; - + // device type definition const device_type NAMCO_63701X = &device_creator; namco_63701x_device::namco_63701x_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, NAMCO_63701X, "Namco 63701X", tag, owner, clock), - device_sound_interface(mconfig, *this), - m_stream(NULL), - m_rom(NULL) + device_sound_interface(mconfig, *this), + m_stream(NULL), + m_rom(NULL) { } @@ -140,4 +140,3 @@ WRITE8_MEMBER( namco_63701x_device::namco_63701x_w ) } } } - diff --git a/src/emu/sound/n63701x.h b/src/emu/sound/n63701x.h index 3493a2a7767..3ea3c60c5ba 100644 --- a/src/emu/sound/n63701x.h +++ b/src/emu/sound/n63701x.h @@ -21,12 +21,12 @@ struct voice_63701x { voice_63701x() : select(0), - playing(0), - base_addr(0), - position(0), - volume(0), - silence_counter(0) {} - + playing(0), + base_addr(0), + position(0), + volume(0), + silence_counter(0) {} + int select; int playing; int base_addr; @@ -58,7 +58,7 @@ public: private: voice_63701x m_voices[2]; sound_stream *m_stream; /* channel assigned by the mixer */ - UINT8 *m_rom; /* pointer to sample ROM */ + UINT8 *m_rom; /* pointer to sample ROM */ }; extern const device_type NAMCO_63701X; diff --git a/src/emu/sound/spu.c b/src/emu/sound/spu.c index 1a0c25cf170..072bd0b0502 100644 --- a/src/emu/sound/spu.c +++ b/src/emu/sound/spu.c @@ -2338,7 +2338,7 @@ void spu_device::key_on(const int v) void spu_device::set_xa_format(const float _freq, const int channels) { // Adjust frequency to compensate for slightly slower/faster frame rate -// float freq=44100.0; //(_freq*get_adjusted_frame_rate())/ps1hw.rcnt->get_vertical_refresh(); +// float freq=44100.0; //(_freq*get_adjusted_frame_rate())/ps1hw.rcnt->get_vertical_refresh(); xa_freq=(unsigned int)((_freq/44100.0)*4096.0f); xa_channels=channels; @@ -2499,7 +2499,7 @@ void spu_device::generate_cdda(void *ptr, const unsigned int sz) if (! cdda_buffer->get_bytes_in()) cdda_playing=false; -// if (n>0) printf("cdda buffer underflow (n=%d cdda_in=%d spf=%d)\n",n,cdda_buffer->get_bytes_in(),cdda_spf); +// if (n>0) printf("cdda buffer underflow (n=%d cdda_in=%d spf=%d)\n",n,cdda_buffer->get_bytes_in(),cdda_spf); } } diff --git a/src/emu/sound/t6721a.h b/src/emu/sound/t6721a.h index 66cc6c593db..9005f596da6 100644 --- a/src/emu/sound/t6721a.h +++ b/src/emu/sound/t6721a.h @@ -62,7 +62,7 @@ // ======================> t6721a_device class t6721a_device : public device_t, - public device_sound_interface + public device_sound_interface { public: t6721a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); diff --git a/src/emu/sound/tiaintf.c b/src/emu/sound/tiaintf.c index 2b1fe9963a2..ccc9abee31b 100644 --- a/src/emu/sound/tiaintf.c +++ b/src/emu/sound/tiaintf.c @@ -16,9 +16,9 @@ const device_type TIA = &device_creator; tia_device::tia_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, TIA, "TIA", tag, owner, clock), - device_sound_interface(mconfig, *this), - m_channel(NULL), - m_chip(NULL) + device_sound_interface(mconfig, *this), + m_channel(NULL), + m_chip(NULL) { } diff --git a/src/emu/sound/tiaintf.h b/src/emu/sound/tiaintf.h index 89ef8abe527..726ff2df21b 100644 --- a/src/emu/sound/tiaintf.h +++ b/src/emu/sound/tiaintf.h @@ -20,7 +20,7 @@ // ======================> tia_device class tia_device : public device_t, - public device_sound_interface + public device_sound_interface { public: tia_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); @@ -35,7 +35,7 @@ protected: virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); public: - DECLARE_WRITE8_MEMBER( tia_sound_w ); + DECLARE_WRITE8_MEMBER( tia_sound_w ); private: sound_stream *m_channel; diff --git a/src/emu/video/ef9340_1.c b/src/emu/video/ef9340_1.c index 25b65a23e7e..3001c5af9b5 100644 --- a/src/emu/video/ef9340_1.c +++ b/src/emu/video/ef9340_1.c @@ -17,7 +17,7 @@ const device_type EF9340_1 = &device_creator; static const UINT8 bgr2rgb[8] = { - 0x00, 0x04, 0x02, 0x06, 0x01, 0x05, 0x03, 0x07 + 0x00, 0x04, 0x02, 0x06, 0x01, 0x05, 0x03, 0x07 }; @@ -390,4 +390,3 @@ void ef9340_1_device::ef9340_scanline(int vpos) } } } - diff --git a/src/emu/video/ef9340_1.h b/src/emu/video/ef9340_1.h index 7431240f1e1..de91d62b364 100644 --- a/src/emu/video/ef9340_1.h +++ b/src/emu/video/ef9340_1.h @@ -17,14 +17,13 @@ #define MCFG_EF9340_1_ADD(_tag, _clock, _screen_tag) \ MCFG_DEVICE_ADD(_tag, EF9340_1, _clock) \ - ef9340_1_device::set_screen_tag(*device, _screen_tag); \ - + ef9340_1_device::set_screen_tag(*device, _screen_tag); class ef9340_1_device : public device_t { public: - // construction/destruction - ef9340_1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + // construction/destruction + ef9340_1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // static configuration helpers static void set_screen_tag(device_t &device, const char *screen_tag) { downcast(device).m_screen_tag = screen_tag; } @@ -82,4 +81,3 @@ protected: extern const device_type EF9340_1; #endif /* __EF9340_1_H__ */ - diff --git a/src/emu/video/i8244.c b/src/emu/video/i8244.c index a4fb9e4c7fb..5320fc066ab 100644 --- a/src/emu/video/i8244.c +++ b/src/emu/video/i8244.c @@ -318,20 +318,20 @@ READ8_MEMBER(i8244_device::read) break; - case 0xa5: - if ((m_vdc.s.control & VDC_CONTROL_REG_STROBE_XY)) + case 0xa5: + if ((m_vdc.s.control & VDC_CONTROL_REG_STROBE_XY)) { - m_x_beam_pos = get_x_beam(); + m_x_beam_pos = get_x_beam(); } - data = m_x_beam_pos; - break; + data = m_x_beam_pos; + break; - default: - data = m_vdc.reg[offset]; + default: + data = m_vdc.reg[offset]; break; - } + } - return data; + return data; } @@ -348,7 +348,7 @@ WRITE8_MEMBER(i8244_device::write) if (offset == 0xa0) { if ( ( m_vdc.s.control & VDC_CONTROL_REG_STROBE_XY ) - && !(data & VDC_CONTROL_REG_STROBE_XY)) + && !(data & VDC_CONTROL_REG_STROBE_XY)) { /* Toggling strobe bit, tuck away values */ m_x_beam_pos = get_x_beam(); @@ -409,7 +409,7 @@ void i8244_device::render_scanline(int vpos) //static const UINT8 COLLISION_EXTERNAL_UNUSED = 0x40; static const UINT8 COLLISION_CHARACTERS = 0x80; - UINT8 collision_map[160]; + UINT8 collision_map[160]; if ( vpos == m_start_vpos ) @@ -501,8 +501,8 @@ void i8244_device::render_scanline(int vpos) /* Regular foreground objects */ for ( int i = 0; i < ARRAY_LENGTH( m_vdc.s.foreground ); i++ ) { - int y = m_vdc.s.foreground[i].y & 0xFE; - int height = 8 - ( ( ( y >> 1 ) + m_vdc.s.foreground[i].ptr ) & 7 ); + int y = m_vdc.s.foreground[i].y & 0xFE; + int height = 8 - ( ( ( y >> 1 ) + m_vdc.s.foreground[i].ptr ) & 7 ); if ( y >= 0x0E && y <= scanline && scanline < y + height * 2 ) { @@ -544,7 +544,7 @@ void i8244_device::render_scanline(int vpos) if ( y <= scanline && scanline < y + height * 2 ) { - int x = m_vdc.s.quad[i].single[0].x; + int x = m_vdc.s.quad[i].single[0].x; // Charaecter height is always determined by the height of the 4th character int char_height = 8 - ( ( ( y >> 1 ) + m_vdc.s.quad[i].single[3].ptr ) & 7 ); @@ -553,7 +553,6 @@ void i8244_device::render_scanline(int vpos) { if ( y <= scanline && scanline < y + char_height * 2 ) { - UINT16 color = 8 + bgr2rgb[ ( ( m_vdc.s.quad[i].single[j].color >> 1 ) & 0x07 ) ]; int offset = ( m_vdc.s.quad[i].single[j].ptr | ( ( m_vdc.s.quad[i].single[j].color & 0x01 ) << 8 ) ) + ( y >> 1 ) + ( ( scanline - y ) >> 1 ); UINT8 chr = c_shape[ offset & 0x1FF ]; @@ -605,7 +604,7 @@ void i8244_device::render_scanline(int vpos) int x = m_vdc.s.sprites[i].x; int x_shift = 0; - switch ( m_vdc.s.sprites[i].color & 0x03 ) + switch ( m_vdc.s.sprites[i].color & 0x03 ) { case 1: // Xg attribute set x_shift = 2; @@ -736,7 +735,7 @@ void i8244_device::sound_stream_update(sound_stream &stream, stream_sample_t **i /* Generate the signal */ old_signal = signal = m_vdc.s.shift3 | (m_vdc.s.shift2 << 8) | (m_vdc.s.shift1 << 16); - if( m_vdc.s.sound & 0x80 ) /* Sound is enabled */ + if( m_vdc.s.sound & 0x80 ) /* Sound is enabled */ { for( ii = 0; ii < samples; ii++, buffer++ ) { @@ -791,5 +790,3 @@ UINT32 i8244_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, return 0; } - - diff --git a/src/emu/video/i8244.h b/src/emu/video/i8244.h index ed73f86e4b7..76e22a69172 100644 --- a/src/emu/video/i8244.h +++ b/src/emu/video/i8244.h @@ -22,23 +22,18 @@ MCFG_DEVICE_ADD(_tag, I8244, _clock) \ MCFG_I8244_SCREEN_TAG(_screen_tag) \ MCFG_I8244_IRQ_CB(_irq_cb) \ - MCFG_I8244_POSTPROCESS_CB(_postprocess_cb) \ - + MCFG_I8244_POSTPROCESS_CB(_postprocess_cb) #define MCFG_I8244_SCREEN_TAG(_screen_tag) \ - i8244_device::set_screen_tag(*device, _screen_tag); \ - + i8244_device::set_screen_tag(*device, _screen_tag); #define MCFG_I8244_IRQ_CB(_devcb) \ - devcb = &i8244_device::set_irq_cb(*device, DEVCB2_##_devcb); \ - + devcb = &i8244_device::set_irq_cb(*device, DEVCB2_##_devcb); #define MCFG_I8244_POSTPROCESS_CB(_devcb) \ - devcb = &i8244_device::set_postprocess_cb(*device, DEVCB2_##_devcb); \ - + devcb = &i8244_device::set_postprocess_cb(*device, DEVCB2_##_devcb); #define MCFG_I8245_ADD(_tag, _clock, _screen_tag, _irq_cb, _postprocess_cb) \ MCFG_DEVICE_ADD(_tag, I8245, _clock) \ MCFG_I8244_SCREEN_TAG(_screen_tag) \ MCFG_I8244_IRQ_CB(_irq_cb) \ - MCFG_I8244_POSTPROCESS_CB(_postprocess_cb ) \ - + MCFG_I8244_POSTPROCESS_CB(_postprocess_cb ) /*************************************************************************** TYPE DEFINITIONS @@ -48,15 +43,15 @@ union vdc_t { UINT8 reg[0x100]; struct { struct { - UINT8 y,x,color,res; + UINT8 y,x,color,res; } sprites[4]; struct { - UINT8 y,x,ptr,color; + UINT8 y,x,ptr,color; } foreground[12]; struct { - struct { + struct { UINT8 y,x,ptr,color; - } single[4]; + } single[4]; } quad[4]; UINT8 shape[4][8]; UINT8 control; @@ -83,8 +78,8 @@ class i8244_device : public device_t , public device_sound_interface { public: - // construction/destruction - i8244_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + // construction/destruction + i8244_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); i8244_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, int lines); // static configuration helpers @@ -103,7 +98,7 @@ public: inline bitmap_ind16 *get_bitmap() { return &m_tmp_bitmap; } - // Global constants + // Global constants static const int START_ACTIVE_SCAN = 42; static const int BORDER_SIZE = 10; static const int END_ACTIVE_SCAN = 42 + 10 + 320 + 10; @@ -133,8 +128,8 @@ protected: static const device_timer_id TIMER_LINE = 0; static const device_timer_id TIMER_HBLANK = 1; - // callbacks - devcb2_write_line m_irq_func; + // callbacks + devcb2_write_line m_irq_func; devcb2_write16 m_postprocess_func; const char *m_screen_tag; diff --git a/src/emu/video/mc6845.h b/src/emu/video/mc6845.h index c75ee6d5927..0a364b440bc 100644 --- a/src/emu/video/mc6845.h +++ b/src/emu/video/mc6845.h @@ -70,7 +70,7 @@ typedef void (*mc6845_on_update_addr_changed_func)(mc6845_device *device, int ad struct mc6845_interface { const char *m_screen_tag; /* screen we are acting on */ - bool m_show_border_area; /* visible screen area (false) active display (true) active display + blanking */ + bool m_show_border_area; /* visible screen area (false) active display (true) active display + blanking */ int m_hpixels_per_column; /* number of pixels per video memory address */ /* if specified, this gets called before any pixel update, diff --git a/src/emu/video/pc_cga.c b/src/emu/video/pc_cga.c index 34c63d23e49..50a2219baea 100644 --- a/src/emu/video/pc_cga.c +++ b/src/emu/video/pc_cga.c @@ -182,16 +182,16 @@ static VIDEO_START( cga_mc1502 ); static MC6845_INTERFACE( mc6845_cga_intf ) { - CGA_SCREEN_NAME, /* screen number */ - false, /* show border area */ - 8, /* numbers of pixels per video memory address */ - NULL, /* begin_update */ - cga_update_row, /* update_row */ - NULL, /* end_update */ - DEVCB_NULL, /* on_de_changed */ - DEVCB_NULL, /* on_cur_changed */ - DEVCB_LINE(cga_hsync_changed), /* on_hsync_changed */ - DEVCB_LINE(cga_vsync_changed), /* on_vsync_changed */ + CGA_SCREEN_NAME, /* screen number */ + false, /* show border area */ + 8, /* numbers of pixels per video memory address */ + NULL, /* begin_update */ + cga_update_row, /* update_row */ + NULL, /* end_update */ + DEVCB_NULL, /* on_de_changed */ + DEVCB_NULL, /* on_cur_changed */ + DEVCB_LINE(cga_hsync_changed), /* on_hsync_changed */ + DEVCB_LINE(cga_vsync_changed), /* on_vsync_changed */ NULL }; diff --git a/src/emu/video/tlc34076.c b/src/emu/video/tlc34076.c index 03ec2214460..ed812ee8d34 100644 --- a/src/emu/video/tlc34076.c +++ b/src/emu/video/tlc34076.c @@ -40,7 +40,7 @@ const device_type TLC34076 = &device_creator; // tlc34076_device - constructor //------------------------------------------------- tlc34076_device::tlc34076_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : device_t(mconfig, TLC34076, "TLC34076", tag, owner, clock), + : device_t(mconfig, TLC34076, "TLC34076", tag, owner, clock), m_dacbits(6) { } diff --git a/src/emu/video/tlc34076.h b/src/emu/video/tlc34076.h index d73967d0a9f..a2aac64aec9 100644 --- a/src/emu/video/tlc34076.h +++ b/src/emu/video/tlc34076.h @@ -38,7 +38,7 @@ public: static void static_set_bits(device_t &device, tlc34076_bits bits); // public interface - const pen_t *get_pens(); + const pen_t *get_pens(); DECLARE_READ8_MEMBER(read); DECLARE_WRITE8_MEMBER(write); diff --git a/src/lib/formats/d64_dsk.c b/src/lib/formats/d64_dsk.c index 9d2ac61d289..9186f07d510 100644 --- a/src/lib/formats/d64_dsk.c +++ b/src/lib/formats/d64_dsk.c @@ -234,7 +234,7 @@ bool d64_format::load(io_generic *io, UINT32 form_factor, floppy_image *image) floppy_image_format_t::desc_e *desc; desc_s sectors[40]; int track_offset = 0, error_offset = 0; - + UINT8 id1 = 0, id2 = 0; get_disk_id(f, io, id1, id2); @@ -251,7 +251,7 @@ bool d64_format::load(io_generic *io, UINT32 form_factor, floppy_image *image) int remaining_size = total_size - current_size; if(remaining_size < 0) throw emu_fatalerror("d64_format: Incorrect track layout, max_size=%d, current_size=%d", total_size, current_size); - + // Fixup the end gap desc[21].p2 = remaining_size / 8; desc[22].p2 = remaining_size & 7; @@ -259,7 +259,7 @@ bool d64_format::load(io_generic *io, UINT32 form_factor, floppy_image *image) build_sector_description(f, &img[track_offset], sectors, sector_count, &img[f.sector_count*f.sector_base_size + error_offset]); generate_track(desc, physical_track, head, sectors, sector_count, total_size, image); - + track_offset += track_size; error_offset += sector_count; } @@ -272,7 +272,6 @@ bool d64_format::load(io_generic *io, UINT32 form_factor, floppy_image *image) void d64_format::extract_sectors(floppy_image *image, const format &f, desc_s *sdesc, int track, int head) { - } bool d64_format::save(io_generic *io, floppy_image *image) diff --git a/src/lib/formats/d81_dsk.c b/src/lib/formats/d81_dsk.c index 1d5bfcb767b..b3924ab6a36 100644 --- a/src/lib/formats/d81_dsk.c +++ b/src/lib/formats/d81_dsk.c @@ -137,46 +137,46 @@ const d81_format::format d81_format::formats[] = { floppy_image_format_t::desc_e* d81_format::get_desc_mfm(const format &f, int ¤t_size, int &end_gap_index) { - static floppy_image_format_t::desc_e desc[25] = { - /* 00 */ { MFM, 0x4e, f.gap_1 }, - /* 01 */ { SECTOR_LOOP_START, 0, f.sector_count-1 }, - /* 02 */ { MFM, 0x00, 12 }, - /* 03 */ { CRC_CCITT_START, 1 }, - /* 04 */ { RAW, 0x4489, 3 }, - /* 05 */ { MFM, 0xfe, 1 }, - /* 06 */ { TRACK_ID }, - /* 07 */ { HEAD_ID_SWAP }, - /* 08 */ { SECTOR_ID }, - /* 09 */ { SIZE_ID }, - /* 10 */ { CRC_END, 1 }, - /* 11 */ { CRC, 1 }, - /* 12 */ { MFM, 0x4e, f.gap_2 }, - /* 13 */ { MFM, 0x00, 12 }, - /* 14 */ { CRC_CCITT_START, 2 }, - /* 15 */ { RAW, 0x4489, 3 }, - /* 16 */ { MFM, 0xfb, 1 }, - /* 17 */ { SECTOR_DATA, -1 }, - /* 18 */ { CRC_END, 2 }, - /* 19 */ { CRC, 2 }, - /* 20 */ { MFM, 0x4e, f.gap_3 }, - /* 21 */ { SECTOR_LOOP_END }, - /* 22 */ { MFM, 0x4e, 0 }, - /* 23 */ { RAWBITS, 0x9254, 0 }, - /* 24 */ { END } - }; - - current_size = f.gap_1*16; - if(f.sector_base_size) - current_size += f.sector_base_size * f.sector_count * 16; - else { - for(int j=0; j != f.sector_count; j++) - current_size += f.per_sector_size[j] * 16; - } - current_size += (12+3+1+4+2+f.gap_2+12+3+1+2+f.gap_3) * f.sector_count * 16; - - end_gap_index = 22; - - return desc; + static floppy_image_format_t::desc_e desc[25] = { + /* 00 */ { MFM, 0x4e, f.gap_1 }, + /* 01 */ { SECTOR_LOOP_START, 0, f.sector_count-1 }, + /* 02 */ { MFM, 0x00, 12 }, + /* 03 */ { CRC_CCITT_START, 1 }, + /* 04 */ { RAW, 0x4489, 3 }, + /* 05 */ { MFM, 0xfe, 1 }, + /* 06 */ { TRACK_ID }, + /* 07 */ { HEAD_ID_SWAP }, + /* 08 */ { SECTOR_ID }, + /* 09 */ { SIZE_ID }, + /* 10 */ { CRC_END, 1 }, + /* 11 */ { CRC, 1 }, + /* 12 */ { MFM, 0x4e, f.gap_2 }, + /* 13 */ { MFM, 0x00, 12 }, + /* 14 */ { CRC_CCITT_START, 2 }, + /* 15 */ { RAW, 0x4489, 3 }, + /* 16 */ { MFM, 0xfb, 1 }, + /* 17 */ { SECTOR_DATA, -1 }, + /* 18 */ { CRC_END, 2 }, + /* 19 */ { CRC, 2 }, + /* 20 */ { MFM, 0x4e, f.gap_3 }, + /* 21 */ { SECTOR_LOOP_END }, + /* 22 */ { MFM, 0x4e, 0 }, + /* 23 */ { RAWBITS, 0x9254, 0 }, + /* 24 */ { END } + }; + + current_size = f.gap_1*16; + if(f.sector_base_size) + current_size += f.sector_base_size * f.sector_count * 16; + else { + for(int j=0; j != f.sector_count; j++) + current_size += f.per_sector_size[j] * 16; + } + current_size += (12+3+1+4+2+f.gap_2+12+3+1+2+f.gap_3) * f.sector_count * 16; + + end_gap_index = 22; + + return desc; } const floppy_format_type FLOPPY_D81_FORMAT = &floppy_image_format_creator; diff --git a/src/lib/formats/flopimg.h b/src/lib/formats/flopimg.h index fdf0a1d97c2..d693188f606 100644 --- a/src/lib/formats/flopimg.h +++ b/src/lib/formats/flopimg.h @@ -301,7 +301,7 @@ protected: FM, //!< One byte in p1 to be fm-encoded, msb first, repeated p2 times MFM, //!< One byte in p1 to be mfm-encoded, msb first, repeated p2 times MFMBITS, //!< A value of p2 bits in p1 to be mfm-encoded, msb first - GCR5, //!< One byte in p1 to be gcr5-encoded, repeated p2 times + GCR5, //!< One byte in p1 to be gcr5-encoded, repeated p2 times RAW, //!< One 16 bits word in p1 to be written raw, msb first, repeated p2 times RAWBYTE, //!< One 8 bit byte in p1 to be written raw, msb first, repeated p2 times RAWBITS, //!< A value of p2 bits in p1 to be copied as-is, msb first @@ -330,13 +330,13 @@ protected: SECTOR_DATA_FM, //!< Sector data to fm-encode, which in p1, -1 for the current one per the sector id SECTOR_DATA_O, //!< Sector data to mfm-encode, odd bits only, which in p1, -1 for the current one per the sector id SECTOR_DATA_E, //!< Sector data to mfm-encode, even bits only, which in p1, -1 for the current one per the sector id - SECTOR_DATA_GCR5, //!< Sector data to gcr5-encode, which in p1, -1 for the current one per the sector id + SECTOR_DATA_GCR5, //!< Sector data to gcr5-encode, which in p1, -1 for the current one per the sector id SECTOR_DATA_MAC, //!< Transformed sector data + checksum, mac style, id in p1, -1 for the current one per the sector id CRC_CCITT_START, //!< Start a CCITT CRC calculation, with the usual x^16 + x^12 + x^5 + 1 (11021) polynomial, p1 = crc id CRC_CCITT_FM_START, //!< Start a CCITT CRC calculation, with the usual x^16 + x^12 + x^5 + 1 (11021) polynomial, p1 = crc id CRC_AMIGA_START, //!< Start an amiga checksum calculation, p1 = crc id - CRC_CBM_START, // 0) { track_size = pick_integer_le(img, pos, 2); pos +=2; - + if (speed_zone_offset[track] > 3) throw emu_fatalerror("g64_format: Unsupported variable speed zones on track %d", track); diff --git a/src/lib/portmidi/readbinaryplist.c b/src/lib/portmidi/readbinaryplist.c index 7f94270d86c..cd9beb02bb6 100644 --- a/src/lib/portmidi/readbinaryplist.c +++ b/src/lib/portmidi/readbinaryplist.c @@ -384,23 +384,23 @@ value_ptr bplist_read_file(char *filename) #ifdef OSX_PPC value_ptr bplist_read_pref(char *filename, OSType folder_type) { - FSRef prefdir; - char cstr[MAXPATHLEN]; - - OSErr err = FSFindFolder(kOnAppropriateDisk, folder_type, - FALSE, &prefdir); - if (err) { - bplist_log("Error finding preferences folder: %d\n", err); - return NULL; - } - err = FSRefMakePath(&prefdir, (UInt8 *) cstr, (UInt32) (MAXPATHLEN - 1)); - if (err) { - bplist_log("Error making path name for preferences folder: %d\n", err); - return NULL; - } - strlcat(cstr, "/", MAXPATHLEN); - strlcat(cstr, filename, MAXPATHLEN); - return bplist_read_file(cstr); + FSRef prefdir; + char cstr[MAXPATHLEN]; + + OSErr err = FSFindFolder(kOnAppropriateDisk, folder_type, + FALSE, &prefdir); + if (err) { + bplist_log("Error finding preferences folder: %d\n", err); + return NULL; + } + err = FSRefMakePath(&prefdir, (UInt8 *) cstr, (UInt32) (MAXPATHLEN - 1)); + if (err) { + bplist_log("Error making path name for preferences folder: %d\n", err); + return NULL; + } + strlcat(cstr, "/", MAXPATHLEN); + strlcat(cstr, filename, MAXPATHLEN); + return bplist_read_file(cstr); } #else value_ptr bplist_read_pref(char *filename, OSType folder_type) diff --git a/src/mame/drivers/4roses.c b/src/mame/drivers/4roses.c index 8c7c0b2884c..4fc1ed2c6c1 100644 --- a/src/mame/drivers/4roses.c +++ b/src/mame/drivers/4roses.c @@ -365,7 +365,7 @@ static const ay8910_interface ay8910_intf = static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/5clown.c b/src/mame/drivers/5clown.c index 1ffa9a399d9..e3fcd048735 100644 --- a/src/mame/drivers/5clown.c +++ b/src/mame/drivers/5clown.c @@ -991,7 +991,7 @@ GFXDECODE_END static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/albazg.c b/src/mame/drivers/albazg.c index fb4960948ba..076cd604a9a 100644 --- a/src/mame/drivers/albazg.c +++ b/src/mame/drivers/albazg.c @@ -210,7 +210,7 @@ static const ay8910_interface ay8910_config = static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/amaticmg.c b/src/mame/drivers/amaticmg.c index 0faf46441f6..4f17de6718e 100644 --- a/src/mame/drivers/amaticmg.c +++ b/src/mame/drivers/amaticmg.c @@ -804,7 +804,7 @@ static const ym3812_interface ym3812_config = static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 4, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/aristmk4.c b/src/mame/drivers/aristmk4.c index 43e3c0e42f2..b003f30a01e 100644 --- a/src/mame/drivers/aristmk4.c +++ b/src/mame/drivers/aristmk4.c @@ -1551,8 +1551,8 @@ static MC6845_INTERFACE( mc6845_intf ) that's why the big horizontal parameters */ "screen", /* screen we are acting on */ - false, /* show border area */ - 4, /* number of pixels per video memory address */ + false, /* show border area */ + 4, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ NULL, /* after pixel update callback */ diff --git a/src/mame/drivers/atvtrack.c b/src/mame/drivers/atvtrack.c index 32da20a2729..70ea24c8944 100644 --- a/src/mame/drivers/atvtrack.c +++ b/src/mame/drivers/atvtrack.c @@ -85,11 +85,11 @@ public: UINT32 screen_update_atvtrack(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); inline UINT32 decode64_32(offs_t offset64, UINT64 data, UINT64 mem_mask, offs_t &offset32); void logbinary(UINT32 data,int high,int low); - + memory_region *m_nandregion; int m_nandcommand[4], m_nandoffset[4], m_nandaddressstep, m_nandaddress[4]; UINT32 m_area1_data[4]; - + }; void atvtrack_state::logbinary(UINT32 data,int high=31,int low=0) diff --git a/src/mame/drivers/avt.c b/src/mame/drivers/avt.c index 358c900ca42..1afa22e038b 100644 --- a/src/mame/drivers/avt.c +++ b/src/mame/drivers/avt.c @@ -850,7 +850,7 @@ GFXDECODE_END static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/belatra.c b/src/mame/drivers/belatra.c index 6254c9a357f..77ab22b7721 100644 --- a/src/mame/drivers/belatra.c +++ b/src/mame/drivers/belatra.c @@ -4,7 +4,7 @@ These appear to run on Acorn Archimedes-compatible hardware, similar to ertictac.c. That would make the SoC an ARM7500 or similar. - + */ /* diff --git a/src/mame/drivers/blitz.c b/src/mame/drivers/blitz.c index 477a91c79e4..87b289f2143 100644 --- a/src/mame/drivers/blitz.c +++ b/src/mame/drivers/blitz.c @@ -741,7 +741,7 @@ static const pia6821_interface megadpkr_pia1_intf = static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/blitz68k.c b/src/mame/drivers/blitz68k.c index a67a0770485..c990d517274 100644 --- a/src/mame/drivers/blitz68k.c +++ b/src/mame/drivers/blitz68k.c @@ -1666,7 +1666,7 @@ WRITE_LINE_MEMBER(blitz68k_state::crtc_vsync_irq5) static MC6845_INTERFACE( mc6845_intf_irq1 ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 4, /* number of pixels per video memory address */ /* Horizontal Display programmed to 160 characters */ NULL, /* before pixel update callback */ NULL, /* row update callback */ @@ -1681,7 +1681,7 @@ static MC6845_INTERFACE( mc6845_intf_irq1 ) static MC6845_INTERFACE( mc6845_intf_irq3 ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 4, /* number of pixels per video memory address */ /* Horizontal Display programmed to 160 characters */ NULL, /* before pixel update callback */ NULL, /* row update callback */ @@ -1696,7 +1696,7 @@ static MC6845_INTERFACE( mc6845_intf_irq3 ) static MC6845_INTERFACE( mc6845_intf_irq5 ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 4, /* number of pixels per video memory address */ /* Horizontal Display programmed to 160 characters */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/buster.c b/src/mame/drivers/buster.c index bc644c8c354..9ed4c6b7a0a 100644 --- a/src/mame/drivers/buster.c +++ b/src/mame/drivers/buster.c @@ -309,7 +309,7 @@ GFXDECODE_END static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/calomega.c b/src/mame/drivers/calomega.c index db6dcc724a9..08bf14e8f3f 100644 --- a/src/mame/drivers/calomega.c +++ b/src/mame/drivers/calomega.c @@ -2717,7 +2717,7 @@ static const ay8910_interface sys906_ay8912_intf = static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/carrera.c b/src/mame/drivers/carrera.c index 25e3ae77bb1..e33ca521cf2 100644 --- a/src/mame/drivers/carrera.c +++ b/src/mame/drivers/carrera.c @@ -312,7 +312,7 @@ void carrera_state::palette_init() static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/ccastles.c b/src/mame/drivers/ccastles.c index 6dd0f4a1295..9e545cc79b8 100644 --- a/src/mame/drivers/ccastles.c +++ b/src/mame/drivers/ccastles.c @@ -140,7 +140,6 @@ inline void ccastles_state::schedule_next_irq( int curscanline ) { - /* scan for a rising edge on the IRQCK signal */ for (curscanline++; ; curscanline = (curscanline + 1) & 0xff) if ((m_syncprom[(curscanline - 1) & 0xff] & 8) == 0 && (m_syncprom[curscanline] & 8) != 0) diff --git a/src/mame/drivers/chance32.c b/src/mame/drivers/chance32.c index 561dea3e996..344846a03fe 100644 --- a/src/mame/drivers/chance32.c +++ b/src/mame/drivers/chance32.c @@ -449,7 +449,7 @@ void chance32_state::machine_reset() static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 16, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/cloud9.c b/src/mame/drivers/cloud9.c index f3abe97e64c..fc2aeb1bd17 100644 --- a/src/mame/drivers/cloud9.c +++ b/src/mame/drivers/cloud9.c @@ -112,7 +112,6 @@ inline void cloud9_state::schedule_next_irq(int curscanline) { - /* IRQ is clocked by /32V, so every 64 scanlines */ curscanline = (curscanline + 64) & 255; diff --git a/src/mame/drivers/coinmstr.c b/src/mame/drivers/coinmstr.c index 287657778b4..8efa74c597c 100644 --- a/src/mame/drivers/coinmstr.c +++ b/src/mame/drivers/coinmstr.c @@ -995,7 +995,7 @@ static const ay8910_interface ay8912_interface = static MC6845_INTERFACE( h46505_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/coolridr.c b/src/mame/drivers/coolridr.c index c2ed8bd9a62..8b71501da7f 100644 --- a/src/mame/drivers/coolridr.c +++ b/src/mame/drivers/coolridr.c @@ -1164,9 +1164,9 @@ static I8237_INTERFACE( dmac_intf ) { DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL }, { DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL }, { DEVCB_NULL /*DEVCB_DRIVER_LINE_MEMBER(coolridr_state, coolridr_dack0_w)*/, - DEVCB_NULL/*DEVCB_DRIVER_LINE_MEMBER(coolridr_state, coolridr_dack1_w)*/, - DEVCB_NULL/*DEVCB_DRIVER_LINE_MEMBER(coolridr_state, coolridr_dack2_w)*/, - DEVCB_NULL/*DEVCB_DRIVER_LINE_MEMBER(coolridr_state, coolridr_dack3_w)*/ } + DEVCB_NULL/*DEVCB_DRIVER_LINE_MEMBER(coolridr_state, coolridr_dack1_w)*/, + DEVCB_NULL/*DEVCB_DRIVER_LINE_MEMBER(coolridr_state, coolridr_dack2_w)*/, + DEVCB_NULL/*DEVCB_DRIVER_LINE_MEMBER(coolridr_state, coolridr_dack3_w)*/ } }; #define MAIN_CLOCK XTAL_28_63636MHz diff --git a/src/mame/drivers/cps1.c b/src/mame/drivers/cps1.c index 1ded3c3f7f1..72d989ae5e9 100644 --- a/src/mame/drivers/cps1.c +++ b/src/mame/drivers/cps1.c @@ -5679,7 +5679,7 @@ ROM_START( nemoj ) ROMX_LOAD( "nm_33.9f", 0x100007, 0x20000, CRC(c469dc74) SHA1(d06956eef5f9b31779f218d597a1a504c1e16bad) , ROM_SKIP(7) ) // == nm-3m.5a ROM_REGION( 0x18000, "audiocpu", 0 ) /* 64k for the audio CPU (+banks) */ - ROM_LOAD( "nm_23.13b", 0x00000, 0x08000, CRC(0f4b0581) SHA1(2e5a2885149c632abfaf4292a1bf032c13c8da6c) ) // == nme_09.12b + ROM_LOAD( "nm_23.13b", 0x00000, 0x08000, CRC(0f4b0581) SHA1(2e5a2885149c632abfaf4292a1bf032c13c8da6c) ) // == nme_09.12b ROM_CONTINUE( 0x10000, 0x08000 ) ROM_REGION( 0x40000, "oki", 0 ) /* Samples */ @@ -8627,7 +8627,7 @@ ROM_START( sf2dongb ) ROM_REGION( CODE_SIZE, "maincpu", 0 ) /* 68000 code */ ROM_LOAD16_WORD_SWAP( "1.8f", 0x000000, 0x80000, CRC(19fffa37) SHA1(db464c64de3aebe929c85ee167961de05d2c16be) ) ROM_LOAD16_WORD_SWAP( "1.7f", 0x080000, 0x80000, CRC(99f1cca4) SHA1(64111eba81d743fc3fd51d7a89cd0b2eefcc900d) ) // same as sf2ceea - ROM_LOAD16_WORD_SWAP( "1.6f", 0x100000, 0x80000, CRC(65c2c719) SHA1(d407cae5f04fc8d05776d478a6eb4363b3c36805) ) + ROM_LOAD16_WORD_SWAP( "1.6f", 0x100000, 0x80000, CRC(65c2c719) SHA1(d407cae5f04fc8d05776d478a6eb4363b3c36805) ) ROM_REGION( 0x600000, "gfx", 0 ) ROMX_LOAD( "s92-1m.3a", 0x000000, 0x80000, CRC(03b0d852) SHA1(f370f25c96ad2b94f8c53d6b7139100285a25bef) , ROM_GROUPWORD | ROM_SKIP(6) ) @@ -8647,7 +8647,7 @@ ROM_START( sf2dongb ) ROM_LOAD( "s92_09.11a", 0x00000, 0x08000, CRC(08f6b60e) SHA1(8258fcaca4ac419312531eec67079b97f471179c) ) ROM_CONTINUE( 0x10000, 0x08000 ) - ROM_REGION( 0x40000, "oki", 0 ) /* Samples */ + ROM_REGION( 0x40000, "oki", 0 ) /* Samples */ ROM_LOAD( "s92_18.11c", 0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) ) ROM_LOAD( "s92_19.12c", 0x20000, 0x20000, CRC(beade53f) SHA1(277c397dc12752719ec6b47d2224750bd1c07f79) ) @@ -11246,7 +11246,7 @@ GAME( 1992, sf2m7, sf2ce, cps1_12MHz, sf2hack, cps_state, sf2hack, GAME( 1992, sf2m8, sf2ce, cps1_12MHz, sf2hack, cps_state, sf2hack, ROT0, "bootleg", "Street Fighter II': Champion Edition (M8, bootleg)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_SUPPORTS_SAVE ) GAME( 1992, sf2yyc, sf2ce, cps1_12MHz, sf2hack, cps_state, sf2hack, ROT0, "bootleg", "Street Fighter II': Champion Edition (YYC, bootleg)", GAME_SUPPORTS_SAVE ) // 920313 - based on World version GAME( 1992, sf2koryu, sf2ce, cps1_12MHz, sf2hack, cps_state, sf2hack, ROT0, "bootleg", "Street Fighter II': Champion Edition (Xiang Long, Chinese bootleg)", GAME_SUPPORTS_SAVE ) // 811102 !!! - based on World version -GAME( 1992, sf2dongb, sf2ce, cps1_12MHz, sf2, cps_state, sf2dongb, ROT0, "bootleg", "Street Fighter II': Champion Edition (Dongfang Bubai protection, bootleg)", GAME_SUPPORTS_SAVE ) // 920313 - based on World version +GAME( 1992, sf2dongb, sf2ce, cps1_12MHz, sf2, cps_state, sf2dongb, ROT0, "bootleg", "Street Fighter II': Champion Edition (Dongfang Bubai protection, bootleg)", GAME_SUPPORTS_SAVE ) // 920313 - based on World version GAME( 1992, cworld2j, 0, cps1_12MHz, cworld2j, cps_state, cps1, ROT0, "Capcom", "Adventure Quiz Capcom World 2 (Japan 920611)", GAME_SUPPORTS_SAVE ) GAME( 1992, varth, 0, cps1_12MHz, varth, cps_state, cps1, ROT270, "Capcom", "Varth: Operation Thunderstorm (World 920714)", GAME_SUPPORTS_SAVE ) // "ETC" // 12MHz verified GAME( 1992, varthr1, varth, cps1_12MHz, varth, cps_state, cps1, ROT270, "Capcom", "Varth: Operation Thunderstorm (World 920612)", GAME_SUPPORTS_SAVE ) // "ETC" diff --git a/src/mame/drivers/cps3.c b/src/mame/drivers/cps3.c index 3d19197849c..2bd0cb0866a 100644 --- a/src/mame/drivers/cps3.c +++ b/src/mame/drivers/cps3.c @@ -692,7 +692,6 @@ void cps3_state::cps3_decrypt_bios() void cps3_state::init_common(UINT32 key1, UINT32 key2, int altEncryption) { - m_key1 = key1; m_key2 = key2; m_altEncryption = altEncryption; diff --git a/src/mame/drivers/dkong.c b/src/mame/drivers/dkong.c index a4eb6e2f831..719c928d3dc 100644 --- a/src/mame/drivers/dkong.c +++ b/src/mame/drivers/dkong.c @@ -402,7 +402,6 @@ INTERRUPT_GEN_MEMBER(dkong_state::s2650_interrupt) void dkong_state::dkong_init_device_driver_data( ) { - m_dev_n2a03a = machine().device("n2a03a"); m_dev_n2a03b = machine().device("n2a03b"); m_dev_6h = machine().device("ls259.6h"); diff --git a/src/mame/drivers/equites.c b/src/mame/drivers/equites.c index 4b6a4e394ca..09cc4eb2dbd 100644 --- a/src/mame/drivers/equites.c +++ b/src/mame/drivers/equites.c @@ -536,7 +536,6 @@ WRITE8_MEMBER(equites_state::equites_cymbal_ctrl_w) void equites_state::equites_update_dac( ) { - // there is only one latch, which is used to drive two DAC channels. // When the channel is enabled in the 4066, it goes to a series of // low-pass filters. The channel is kept enabled only for a short time, diff --git a/src/mame/drivers/fcrash.c b/src/mame/drivers/fcrash.c index 20602bb9075..8ce9f4972ae 100644 --- a/src/mame/drivers/fcrash.c +++ b/src/mame/drivers/fcrash.c @@ -457,12 +457,12 @@ static ADDRESS_MAP_START( knightsb_map, AS_PROGRAM, 16, cps_state ) AM_RANGE(0x000000, 0x3fffff) AM_ROM AM_RANGE(0x800000, 0x800001) AM_READ_PORT("IN1") /* Player input ports */ AM_RANGE(0x800002, 0x800003) AM_READ_PORT("IN2")//(cps1_in2_r) /* Player 3 controls */ - AM_RANGE(0x800006, 0x800007) AM_WRITE(cps1_soundlatch_w) /* Sound command */ + AM_RANGE(0x800006, 0x800007) AM_WRITE(cps1_soundlatch_w) /* Sound command */ AM_RANGE(0x800018, 0x80001f) AM_READ(cps1_dsw_r) /* System input ports / Dip Switches */ AM_RANGE(0x800030, 0x800037) AM_WRITENOP //AM_WRITE(cps1_coinctrl_w) only writes bit 15 - AM_RANGE(0x800100, 0x80013f) AM_WRITE(cps1_cps_a_w) AM_SHARE("cps_a_regs") /* CPS-A custom */ - AM_RANGE(0x800140, 0x80017f) AM_READWRITE(cps1_cps_b_r, cps1_cps_b_w) AM_SHARE("cps_b_regs") /* CPS-B custom */ - AM_RANGE(0x800180, 0x800181) AM_WRITE(cps1_soundlatch2_w) /* Sound timer fade */ + AM_RANGE(0x800100, 0x80013f) AM_WRITE(cps1_cps_a_w) AM_SHARE("cps_a_regs") /* CPS-A custom */ + AM_RANGE(0x800140, 0x80017f) AM_READWRITE(cps1_cps_b_r, cps1_cps_b_w) AM_SHARE("cps_b_regs") /* CPS-B custom */ + AM_RANGE(0x800180, 0x800181) AM_WRITE(cps1_soundlatch2_w) /* Sound timer fade */ AM_RANGE(0x880000, 0x880001) AM_WRITENOP //? AM_RANGE(0x900000, 0x93ffff) AM_RAM_WRITE(cps1_gfxram_w) AM_SHARE("gfxram") AM_RANGE(0x980000, 0x98002f) AM_WRITE(knightsb_layer_w) diff --git a/src/mame/drivers/flipjack.c b/src/mame/drivers/flipjack.c index 84b4ce8a42c..629f57c3a44 100644 --- a/src/mame/drivers/flipjack.c +++ b/src/mame/drivers/flipjack.c @@ -430,7 +430,7 @@ static AY8910_INTERFACE( ay8910_config_2 ) static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/fortecar.c b/src/mame/drivers/fortecar.c index 509a7ef9ec1..dc4859a005b 100644 --- a/src/mame/drivers/fortecar.c +++ b/src/mame/drivers/fortecar.c @@ -538,7 +538,7 @@ static const ay8910_interface ay8910_config = static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/fresh.c b/src/mame/drivers/fresh.c index e4df1f9c072..1dada4254c4 100644 --- a/src/mame/drivers/fresh.c +++ b/src/mame/drivers/fresh.c @@ -37,7 +37,7 @@ public: m_attr_2_videoram(*this, "attr_videoram_2"), m_paletteram_1(*this, "paletteram_1"), m_paletteram_2(*this, "paletteram_2") - + { } tilemap_t *m_bg_tilemap; @@ -79,11 +79,11 @@ public: DECLARE_WRITE16_MEMBER( c75000_write ) { logerror("c75000_write (scroll 2) %04x (m_d30000_value = %04x)\n", data, m_d30000_value); - } + } DECLARE_WRITE16_MEMBER( c76000_write ) { logerror("c76000_write (scroll 3) %04x (m_d30000_value = %04x)\n", data, m_d30000_value); - } + } void update_palette(int offset); DECLARE_READ16_MEMBER( unk_r ) @@ -195,29 +195,29 @@ static ADDRESS_MAP_START( fresh_map, AS_PROGRAM, 16, fresh_state ) AM_RANGE(0xC20000, 0xC2ffff) AM_RAM_WRITE( fresh_bg_videoram_w ) AM_SHARE( "bg_videoram" ) AM_RANGE(0xC30000, 0xC3ffff) AM_RAM_WRITE( fresh_attr_videoram_w ) AM_SHARE( "attr_videoram" ) -// AM_RANGE(0xC70000, 0xC70001) AM_RAM -// AM_RANGE(0xC70002, 0xC70003) AM_RAM +// AM_RANGE(0xC70000, 0xC70001) AM_RAM +// AM_RANGE(0xC70002, 0xC70003) AM_RAM AM_RANGE(0xC71000, 0xC71001) AM_WRITE(c71000_write) -// AM_RANGE(0xC72000, 0xC72001) AM_RAM -// AM_RANGE(0xC72002, 0xC72003) AM_RAM -// AM_RANGE(0xC73000, 0xC73001) AM_RAM -// AM_RANGE(0xC73002, 0xC73003) AM_RAM +// AM_RANGE(0xC72000, 0xC72001) AM_RAM +// AM_RANGE(0xC72002, 0xC72003) AM_RAM +// AM_RANGE(0xC73000, 0xC73001) AM_RAM +// AM_RANGE(0xC73002, 0xC73003) AM_RAM AM_RANGE(0xC74000, 0xC74001) AM_WRITE(c74000_write) AM_RANGE(0xC75000, 0xC75001) AM_WRITE(c75000_write) AM_RANGE(0xC76000, 0xC76001) AM_WRITE(c76000_write) -// AM_RANGE(0xC77000, 0xC77001) AM_RAM -// AM_RANGE(0xC77002, 0xC77003) AM_RAM - +// AM_RANGE(0xC77000, 0xC77001) AM_RAM +// AM_RANGE(0xC77002, 0xC77003) AM_RAM + // written together AM_RANGE(0xC40000, 0xC417ff) AM_RAM_WRITE(fresh_paletteram_1_w) AM_SHARE( "paletteram_1" ) // 16-bit AM_RANGE(0xC50000, 0xC517ff) AM_RAM_WRITE(fresh_paletteram_2_w) AM_SHARE( "paletteram_2" ) // 8-bit -// AM_RANGE(0xD00000, 0xD00001) AM_RAM -// AM_RANGE(0xD10000, 0xD10001) AM_RAM +// AM_RANGE(0xD00000, 0xD00001) AM_RAM +// AM_RANGE(0xD10000, 0xD10001) AM_RAM AM_RANGE(0xD30000, 0xD30001) AM_WRITE(d30000_write) AM_RANGE(0xD40000, 0xD40001) AM_READ_PORT("IN0") //AM_WRITENOP // checks for 0x10 -// AM_RANGE(0xD40002, 0xD40003) AM_WRITENOP +// AM_RANGE(0xD40002, 0xD40003) AM_WRITENOP AM_RANGE(0xD70000, 0xD70001) AM_READ_PORT("IN1") // checks for 0x10, dead loop if fail AM_RANGE(0xE00000, 0xE00001) AM_READ_PORT("DSW0") //AM_WRITENOP @@ -336,7 +336,7 @@ static INPUT_PORTS_START( fresh ) PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x8000, DEF_STR( On ) ) - PORT_START("DSW0") + PORT_START("DSW0") PORT_DIPNAME( 0x0001, 0x0000, "DSW-0:0" ) // SWITCH 1 in test mode PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0001, DEF_STR( On ) ) @@ -593,14 +593,14 @@ TIMER_DEVICE_CALLBACK_MEMBER(fresh_state::fake_scanline) } -// if(scanline == 32) -// machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE); +// if(scanline == 32) +// machine().device("maincpu")->execute().set_input_line(4, HOLD_LINE); if(scanline == 64) machine().device("maincpu")->execute().set_input_line(5, HOLD_LINE); -// if(scanline == 96) -// machine().device("maincpu")->execute().set_input_line(5, HOLD_LINE); +// if(scanline == 96) +// machine().device("maincpu")->execute().set_input_line(5, HOLD_LINE); if(scanline == 200) // vbl? @@ -646,5 +646,5 @@ ROM_END -// title shows Fruit Fresh but on resetting you get text strings of 'Dream World V2.41SI 97. 1.28' +// title shows Fruit Fresh but on resetting you get text strings of 'Dream World V2.41SI 97. 1.28' GAME( 1996, fresh, 0, fresh, fresh, driver_device, 0, ROT0, "Chain Leisure", "Fruit Fresh (Italy)", GAME_NOT_WORKING|GAME_NO_SOUND ) diff --git a/src/mame/drivers/funworld.c b/src/mame/drivers/funworld.c index e2900e83838..58c424e57f6 100644 --- a/src/mame/drivers/funworld.c +++ b/src/mame/drivers/funworld.c @@ -817,8 +817,8 @@ - Added a Jolly Card (Italian) set from an encrypted blue TAB bootleg board. This one allows to play in both 'remote' and 'normal' mode. The game could pay through regular hopper, or - through manual switch/button, discharging the credits one - by one. + through manual switch/button, discharging the credits one + by one. *** TO DO *** @@ -1317,29 +1317,29 @@ static INPUT_PORTS_START( jolycdic ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("DSW") // place '10000000' for NVRAM creation. - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:8") + PORT_START("DSW") // place '10000000' for NVRAM creation. + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:8") PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, "Remote Value" ) PORT_DIPLOCATION("SW1:7") + PORT_DIPNAME( 0x02, 0x02, "Remote Value" ) PORT_DIPLOCATION("SW1:7") PORT_DIPSETTING( 0x00, "10 Points/Pulse" ) PORT_DIPSETTING( 0x02, "100 Points/Pulse" ) - PORT_DIPNAME( 0x04, 0x04, "Coinage B" ) PORT_DIPLOCATION("SW1:6") + PORT_DIPNAME( 0x04, 0x04, "Coinage B" ) PORT_DIPLOCATION("SW1:6") PORT_DIPSETTING( 0x04, "10 Credits" ) PORT_DIPSETTING( 0x00, "5 Credits" ) - PORT_DIPNAME( 0x08, 0x08, "Coinage A" ) PORT_DIPLOCATION("SW1:5") + PORT_DIPNAME( 0x08, 0x08, "Coinage A" ) PORT_DIPLOCATION("SW1:5") PORT_DIPSETTING( 0x08, "20 Credits" ) PORT_DIPSETTING( 0x00, "1 Credit" ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4") + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4") PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x00, "Joker" ) PORT_DIPLOCATION("SW1:3") + PORT_DIPNAME( 0x20, 0x00, "Joker" ) PORT_DIPLOCATION("SW1:3") PORT_DIPSETTING( 0x00, "With Joker" ) /* also enables Five of a Kind */ PORT_DIPSETTING( 0x20, "Without Joker" ) - PORT_DIPNAME( 0x40, 0x00, "Auto Hold" ) PORT_DIPLOCATION("SW1:2") + PORT_DIPNAME( 0x40, 0x00, "Auto Hold" ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) /* when is ON, allow the player to activate/deactivate the autohold through CANCEL button */ - PORT_DIPNAME( 0x80, 0x00, "Payout" ) PORT_DIPLOCATION("SW1:1") + PORT_DIPNAME( 0x80, 0x00, "Payout" ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, "Hopper" ) PORT_DIPSETTING( 0x80, "Manual Payout SW" ) INPUT_PORTS_END @@ -2526,7 +2526,7 @@ static const ay8910_interface funquiz_ay8910_intf = static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 4, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ @@ -3015,15 +3015,15 @@ ROM_END Jolly Card (italian encrypted bootleg, set 2) --------------------------------------------- - This program works in both 'normal' and 'remote' modes, + This program works in both 'normal' and 'remote' modes, allowing to pay through hopper, or just through manual - switch/button. + switch/button. To initialize the NVRAM, DIP switches should be placed - at factory default: (On On On On On On On Off), then - keep pressed both service buttons (key 9 & 0), reset - using F3 key, and then finally releasing the service - buttons. + at factory default: (On On On On On On On Off), then + keep pressed both service buttons (key 9 & 0), reset + using F3 key, and then finally releasing the service + buttons. */ ROM_START( jolycdic ) /* another bootleg PCB, encrypted graphics */ diff --git a/src/mame/drivers/ghosteo.c b/src/mame/drivers/ghosteo.c index 20322a1ade7..4e5974e1008 100644 --- a/src/mame/drivers/ghosteo.c +++ b/src/mame/drivers/ghosteo.c @@ -106,7 +106,7 @@ public: virtual void machine_reset(); }; - + /* diff --git a/src/mame/drivers/goldnpkr.c b/src/mame/drivers/goldnpkr.c index 86a17522ff6..8f60a8421c6 100644 --- a/src/mame/drivers/goldnpkr.c +++ b/src/mame/drivers/goldnpkr.c @@ -3402,7 +3402,7 @@ static const pia6821_interface wcfalcon_pia1_intf = static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/gticlub.c b/src/mame/drivers/gticlub.c index 2805f400087..4cb4d56735b 100644 --- a/src/mame/drivers/gticlub.c +++ b/src/mame/drivers/gticlub.c @@ -509,10 +509,10 @@ ADDRESS_MAP_END static INPUT_PORTS_START( gticlub ) PORT_START("IN0") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("View switch") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Shift Down") - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Shift Up") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("AT/MT switch") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("View switch") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Shift Down") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Shift Up") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("AT/MT switch") PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Service Button") PORT_CODE(KEYCODE_8) PORT_BIT( 0x0b, IP_ACTIVE_LOW, IPT_UNKNOWN ) diff --git a/src/mame/drivers/highvdeo.c b/src/mame/drivers/highvdeo.c index 0f875a091d5..c8d5f961860 100644 --- a/src/mame/drivers/highvdeo.c +++ b/src/mame/drivers/highvdeo.c @@ -394,10 +394,10 @@ static ADDRESS_MAP_START( nyjoker_map, AS_PROGRAM, 16, highvdeo_state ) ADDRESS_MAP_END static ADDRESS_MAP_START( nyjoker_io, AS_IO, 16, highvdeo_state ) - AM_RANGE(0x0000, 0x0001) AM_WRITE(write1_w ) // lamps - AM_RANGE(0x0002, 0x0003) AM_WRITENOP // alternate coin counter (bits 0 and 2) + AM_RANGE(0x0000, 0x0001) AM_WRITE(write1_w ) // lamps + AM_RANGE(0x0002, 0x0003) AM_WRITENOP // alternate coin counter (bits 0 and 2) AM_RANGE(0x0004, 0x0005) AM_WRITE(nyj_write2_w ) // coin and note counter -// AM_RANGE(0x0006, 0x0007) AM_WRITENOP +// AM_RANGE(0x0006, 0x0007) AM_WRITENOP AM_RANGE(0x0008, 0x0009) AM_WRITE(tv_ncf_oki6376_w ) AM_RANGE(0x000a, 0x000b) AM_WRITE(tv_ncf_oki6376_st_w ) AM_RANGE(0x000c, 0x000d) AM_READ_PORT("IN0") @@ -419,9 +419,9 @@ WRITE16_MEMBER(highvdeo_state::nyj_write2_w) ---x ---- Note counter. xxx- ---- Unknown. */ -// popmessage("%04x",data); - coin_counter_w(machine(), 0, ~data & 0x0f); // Coins (all) - coin_counter_w(machine(), 1, ~data & 0x10); // Notes (all) +// popmessage("%04x",data); + coin_counter_w(machine(), 0, ~data & 0x0f); // Coins (all) + coin_counter_w(machine(), 1, ~data & 0x10); // Notes (all) } @@ -727,44 +727,44 @@ static INPUT_PORTS_START( nyjoker ) PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) // Coin 2 PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 ) // Coin 3 PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_COIN4 ) // Coin 4 <--- This one has non-timed pulse, so maybe was designed to be KEY IN. - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_COIN5 ) PORT_NAME("Note 1") PORT_CODE(KEYCODE_1_PAD) // Note 1 - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_COIN6 ) PORT_NAME("Note 2") PORT_CODE(KEYCODE_2_PAD) // Note 2 - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_COIN7 ) PORT_NAME("Note 3") PORT_CODE(KEYCODE_3_PAD) // Note 3 - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN8 ) PORT_NAME("Note 4") PORT_CODE(KEYCODE_4_PAD) // Note 4 + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_COIN5 ) PORT_NAME("Note 1") PORT_CODE(KEYCODE_1_PAD) // Note 1 + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_COIN6 ) PORT_NAME("Note 2") PORT_CODE(KEYCODE_2_PAD) // Note 2 + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_COIN7 ) PORT_NAME("Note 3") PORT_CODE(KEYCODE_3_PAD) // Note 3 + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN8 ) PORT_NAME("Note 4") PORT_CODE(KEYCODE_4_PAD) // Note 4 PORT_START("IN3") - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Bookkeeping") // Account - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_NAME("Key") // Key - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Ticket") PORT_CODE(KEYCODE_T) // Ticket - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Unknown") PORT_CODE(KEYCODE_U) // Unknown - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hopper 1") PORT_CODE(KEYCODE_H) // Hopper 1 - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hopper 2") PORT_CODE(KEYCODE_J) // Hopper 2 - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Level 2") PORT_CODE(KEYCODE_K) // Level 2 - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Level 1") PORT_CODE(KEYCODE_L) // Level 1 - - PORT_START("DSW") // DIP switches bank - PORT_DIPNAME( 0x0001, 0x0000, "DSW 8" ) PORT_DIPLOCATION("DSW:!8") + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Bookkeeping") // Account + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_NAME("Key") // Key + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Ticket") PORT_CODE(KEYCODE_T) // Ticket + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Unknown") PORT_CODE(KEYCODE_U) // Unknown + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hopper 1") PORT_CODE(KEYCODE_H) // Hopper 1 + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hopper 2") PORT_CODE(KEYCODE_J) // Hopper 2 + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Level 2") PORT_CODE(KEYCODE_K) // Level 2 + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Level 1") PORT_CODE(KEYCODE_L) // Level 1 + + PORT_START("DSW") // DIP switches bank + PORT_DIPNAME( 0x0001, 0x0000, "DSW 8" ) PORT_DIPLOCATION("DSW:!8") PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0001, DEF_STR( On ) ) - PORT_DIPNAME( 0x0002, 0x0002, "Test Mode" ) PORT_DIPLOCATION("DSW:!7") + PORT_DIPNAME( 0x0002, 0x0002, "Test Mode" ) PORT_DIPLOCATION("DSW:!7") PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0004, 0x0000, "DSW 6" ) PORT_DIPLOCATION("DSW:!6") + PORT_DIPNAME( 0x0004, 0x0000, "DSW 6" ) PORT_DIPLOCATION("DSW:!6") PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0004, DEF_STR( On ) ) - PORT_DIPNAME( 0x0008, 0x0000, "DSW 5" ) PORT_DIPLOCATION("DSW:!5") + PORT_DIPNAME( 0x0008, 0x0000, "DSW 5" ) PORT_DIPLOCATION("DSW:!5") PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0008, DEF_STR( On ) ) - PORT_DIPNAME( 0x0010, 0x0000, "DSW 4" ) PORT_DIPLOCATION("DSW:!4") + PORT_DIPNAME( 0x0010, 0x0000, "DSW 4" ) PORT_DIPLOCATION("DSW:!4") PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0010, DEF_STR( On ) ) - PORT_DIPNAME( 0x0020, 0x0000, "DSW 3" ) PORT_DIPLOCATION("DSW:!3") + PORT_DIPNAME( 0x0020, 0x0000, "DSW 3" ) PORT_DIPLOCATION("DSW:!3") PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0020, DEF_STR( On ) ) - PORT_DIPNAME( 0x0040, 0x0000, "DSW 2" ) PORT_DIPLOCATION("DSW:!2") + PORT_DIPNAME( 0x0040, 0x0000, "DSW 2" ) PORT_DIPLOCATION("DSW:!2") PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0040, DEF_STR( On ) ) - PORT_DIPNAME( 0x0080, 0x0000, "DSW 1" ) PORT_DIPLOCATION("DSW:!1") + PORT_DIPNAME( 0x0080, 0x0000, "DSW 1" ) PORT_DIPLOCATION("DSW:!1") PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0080, DEF_STR( On ) ) INPUT_PORTS_END @@ -1244,7 +1244,7 @@ ROM_END adv476kp35 CMOS Monolithic 256x18 Color Palette RAM-DAC Xtal 16Mhz oki m6376 - Lattice isplsi1032e + Lattice isplsi1032e model TV vers 2.0 diff --git a/src/mame/drivers/hitpoker.c b/src/mame/drivers/hitpoker.c index cf6138a5ce5..bc37a4a76eb 100644 --- a/src/mame/drivers/hitpoker.c +++ b/src/mame/drivers/hitpoker.c @@ -458,7 +458,7 @@ GFXDECODE_END static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/igs_m036.c b/src/mame/drivers/igs_m036.c index 79428f7065d..b04e3b8ede2 100644 --- a/src/mame/drivers/igs_m036.c +++ b/src/mame/drivers/igs_m036.c @@ -15,7 +15,7 @@ but with GFX processor integrated I dont know the CPU core (should ARM based due to fail test) the chip has internal rom build-in the the FLASH(u33, EV29LV160AB-90PCR) is external rom and encrypted -if the external rom decrypted then we can +if the external rom decrypted then we can try to trojan the internal rom here we offer several revision a same game to see if anyone could find any clue, these 4 revision can @@ -43,11 +43,11 @@ CPU: IGS036 GFX: IGS036 SND: TT5665 ---------------------------------------------------------------------------- -Filename TYPE CRC32 SHA1 -cjddzsp_s122cn.u27 GFX 797e5ba3 784fae513ac8cfd1143f0d0ce0936f74e2e64e48 -cjddzsp_s122cn.u28 GFX d0441a6b e1c948f94472398aa5887963cf8e87be28dd66e0 -cjddzsp_s122cn.u30 SND e0e02a57 96074a5226dd24d0bc150adff7324b5349cb5dc2 -cjddzsp_s122cn.u18 PRG 4a42aad6 96805e5bfbd50686177fe50020229ea8787ade17 +Filename TYPE CRC32 SHA1 +cjddzsp_s122cn.u27 GFX 797e5ba3 784fae513ac8cfd1143f0d0ce0936f74e2e64e48 +cjddzsp_s122cn.u28 GFX d0441a6b e1c948f94472398aa5887963cf8e87be28dd66e0 +cjddzsp_s122cn.u30 SND e0e02a57 96074a5226dd24d0bc150adff7324b5349cb5dc2 +cjddzsp_s122cn.u18 PRG 4a42aad6 96805e5bfbd50686177fe50020229ea8787ade17 ---------------------------------------------------------------------------- check more info and photo from cjdh2.zip!!! @@ -252,4 +252,3 @@ GAME( 200?, cjdh2c, cjdh2, igs_m036, igs_m036, igs_m036_state, igs_m036, GAME( 200?, cjddzsp, 0, igs_m036_tt, igs_m036, igs_m036_state, igs_m036, ROT0, "IGS", "Super Dou Di Zhu Special (V122CN)", GAME_IS_SKELETON ) GAME( 200?, igsm312, 0, igs_m036_tt, igs_m036, igs_m036_state, igs_m036, ROT0, "IGS", "Unknown IGS036 CPU game (V312CN)", GAME_IS_SKELETON ) - diff --git a/src/mame/drivers/imolagp.c b/src/mame/drivers/imolagp.c index ce382422df4..a4991f58104 100644 --- a/src/mame/drivers/imolagp.c +++ b/src/mame/drivers/imolagp.c @@ -206,7 +206,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(imolagp_state::imolagp_pot_callback) steer = -steer; m_steerlatch = (m_steerlatch << 1) | (~m_steerlatch >> 1 & 1); } - + // steering speed is determined by timer period // these values(in usec) may need tweaking: const int base = 6500; @@ -262,15 +262,15 @@ WRITE8_MEMBER(imolagp_state::imola_led_board_w) output_set_digit_value(offset, ls48_map[data & 0x0f]); /* - score: 0, 1, 2, 3 - time: 4, 5 - result: 10, 11 - credits: 12, 13 - highscore 1: 32, 33, 34, 35 - highscore 2: 36, 37, 24, 25 - highscore 3: 26, 27, 28, 29 - highscore 4: 16, 17, 18, 19 - highscore 5: 20, 21, 8, 9 + score: 0, 1, 2, 3 + time: 4, 5 + result: 10, 11 + credits: 12, 13 + highscore 1: 32, 33, 34, 35 + highscore 2: 36, 37, 24, 25 + highscore 3: 26, 27, 28, 29 + highscore 4: 16, 17, 18, 19 + highscore 5: 20, 21, 8, 9 */ } @@ -302,7 +302,7 @@ WRITE8_MEMBER(imolagp_state::screenram_w) // when in tunnel: $81/$82 -> sprite ram? if (m_draw_mode & 0x80) m_videoram[1][offset] = data; - + // sprites: $05 else if (m_draw_mode & 0x01) m_videoram[1][offset] = data; @@ -325,7 +325,7 @@ static ADDRESS_MAP_START( imolagp_master_map, AS_PROGRAM, 8, imolagp_state ) AM_RANGE(0x2800, 0x2803) AM_DEVREADWRITE("ppi8255", i8255_device, read, write) AM_RANGE(0x3000, 0x3000) AM_WRITE(vreg_control_w) AM_RANGE(0x37f0, 0x37f0) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) -// AM_RANGE(0x37f7, 0x37f7) AM_NOP +// AM_RANGE(0x37f7, 0x37f7) AM_NOP AM_RANGE(0x3800, 0x3800) AM_READWRITE(vreg_data_r, vreg_data_w) AM_RANGE(0x3810, 0x3810) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) AM_RANGE(0x4000, 0x4000) AM_READ_PORT("DSWA") diff --git a/src/mame/drivers/jaguar.c b/src/mame/drivers/jaguar.c index bc7321f5f41..b50938e2ee1 100644 --- a/src/mame/drivers/jaguar.c +++ b/src/mame/drivers/jaguar.c @@ -1542,7 +1542,7 @@ INPUT_PORTS_END * *************************************/ - static const jaguar_cpu_config gpu_config = + static const jaguar_cpu_config gpu_config = { &jaguar_state::gpu_cpu_int }; diff --git a/src/mame/drivers/jokrwild.c b/src/mame/drivers/jokrwild.c index c65a2131a3c..2dec682e270 100644 --- a/src/mame/drivers/jokrwild.c +++ b/src/mame/drivers/jokrwild.c @@ -459,7 +459,7 @@ static const pia6821_interface pia1_intf = static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/jubilee.c b/src/mame/drivers/jubilee.c index 93cd21dc82b..14e06a6d30b 100644 --- a/src/mame/drivers/jubilee.c +++ b/src/mame/drivers/jubilee.c @@ -395,7 +395,7 @@ GFXDECODE_END static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/kingdrby.c b/src/mame/drivers/kingdrby.c index 7a7933c3e8c..741c1efeb4e 100644 --- a/src/mame/drivers/kingdrby.c +++ b/src/mame/drivers/kingdrby.c @@ -915,7 +915,7 @@ GFXDECODE_END static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/laserbas.c b/src/mame/drivers/laserbas.c index 28d8af05a13..66ae8ef5b93 100644 --- a/src/mame/drivers/laserbas.c +++ b/src/mame/drivers/laserbas.c @@ -239,7 +239,7 @@ void laserbas_state::machine_reset() static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/lordgun.c b/src/mame/drivers/lordgun.c index f8f8da75308..ebcebf7e8f0 100644 --- a/src/mame/drivers/lordgun.c +++ b/src/mame/drivers/lordgun.c @@ -157,12 +157,12 @@ READ16_MEMBER(lordgun_state::aliencha_protection_r) WRITE8_MEMBER(lordgun_state::fake_w) { -// popmessage("%02x",data); +// popmessage("%02x",data); } WRITE8_MEMBER(lordgun_state::fake2_w) { -// popmessage("%02x",data); +// popmessage("%02x",data); } WRITE8_MEMBER(lordgun_state::lordgun_eeprom_w) @@ -172,7 +172,7 @@ WRITE8_MEMBER(lordgun_state::lordgun_eeprom_w) if (data & ~0xfd) { -// popmessage("EE: %02x", data); +// popmessage("EE: %02x", data); logerror("%s: Unknown EEPROM bit written %02X\n",machine().describe_context(),data); } @@ -203,7 +203,7 @@ WRITE8_MEMBER(lordgun_state::aliencha_eeprom_w) if (~data & ~0xf8) { -// popmessage("EE: %02x", data); +// popmessage("EE: %02x", data); logerror("%s: Unknown EEPROM bit written %02X\n",machine().describe_context(),data); } @@ -354,7 +354,7 @@ WRITE8_MEMBER(lordgun_state::lordgun_okibank_w) device_t *device = machine().device("oki"); downcast(device)->set_bank_base((data & 2) ? 0x40000 : 0); if (data & ~3) logerror("%s: unknown okibank bits %02x\n", machine().describe_context(), data); -// popmessage("OKI %x", data); +// popmessage("OKI %x", data); } static ADDRESS_MAP_START( lordgun_soundio_map, AS_IO, 8, lordgun_state ) @@ -565,7 +565,7 @@ static INPUT_PORTS_START( aliencha ) PORT_DIPSETTING( 0x01, "3" ) PORT_DIPSETTING( 0x02, "4" ) PORT_DIPSETTING( 0x03, "6" ) -// PORT_DIPSETTING( 0x00, "6" ) +// PORT_DIPSETTING( 0x00, "6" ) PORT_DIPNAME( 0x04, 0x04, "Vs. Rounds" ) PORT_DIPLOCATION("SW3:3") PORT_DIPSETTING( 0x00, "3" ) PORT_DIPSETTING( 0x04, "5" ) diff --git a/src/mame/drivers/luckgrln.c b/src/mame/drivers/luckgrln.c index 175cb6302f1..a9045627d5e 100644 --- a/src/mame/drivers/luckgrln.c +++ b/src/mame/drivers/luckgrln.c @@ -976,7 +976,7 @@ GFXDECODE_END static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/lucky74.c b/src/mame/drivers/lucky74.c index 336a3d5326c..00e33b2a864 100644 --- a/src/mame/drivers/lucky74.c +++ b/src/mame/drivers/lucky74.c @@ -661,7 +661,7 @@ [2013-01-15] - Added another set of Lucky'74 (reclassified as bootleg set 2). This one has - a different payrate table that match 100% the one from the manual... + a different payrate table that match 100% the one from the manual... [2012-06-05] @@ -1202,14 +1202,14 @@ INPUT_PORTS_END static INPUT_PORTS_START( excitbj ) PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_1) PORT_NAME("1BET") // Bet 1 - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_2) PORT_NAME("10BET") // Bet 10 + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_1) PORT_NAME("1BET") // Bet 1 + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_2) PORT_NAME("10BET") // Bet 10 PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_3) PORT_NAME("CNT") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_4) PORT_NAME("HIT") // Hit - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_5) PORT_NAME("SND") // Sound? - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_6) PORT_NAME("DWN") // Double Down? - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_7) PORT_NAME("SPT") // Split? - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_8) PORT_NAME("INS") // Insurance? + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_4) PORT_NAME("HIT") // Hit + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_5) PORT_NAME("SND") // Sound? + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_6) PORT_NAME("DWN") // Double Down? + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_7) PORT_NAME("SPT") // Split? + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_8) PORT_NAME("INS") // Insurance? PORT_START("IN1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Q) PORT_NAME("IN1-1") @@ -1224,9 +1224,9 @@ static INPUT_PORTS_START( excitbj ) PORT_START("IN2") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_A) PORT_NAME("HCN") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_S) PORT_NAME("EMP") - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_D) PORT_NAME("BOK") // Bookkeeping - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test Mode") PORT_CODE(KEYCODE_F2) PORT_TOGGLE - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_G) PORT_NAME("PAY") // Payout + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_D) PORT_NAME("BOK") // Bookkeeping + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test Mode") PORT_CODE(KEYCODE_F2) PORT_TOGGLE + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_G) PORT_NAME("PAY") // Payout PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_H) PORT_NAME("KSW") PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_J) PORT_NAME("IN2-7") PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_K) PORT_NAME("IN2-8") @@ -1676,31 +1676,31 @@ ROM_END */ ROM_START( lucky74a ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "10.cpu", 0x0000, 0x10000, CRC(663d139e) SHA1(259c36d741c13bf06f317dc893f46e2cfca15ace) ) + ROM_LOAD( "10.cpu", 0x0000, 0x10000, CRC(663d139e) SHA1(259c36d741c13bf06f317dc893f46e2cfca15ace) ) ROM_REGION( 0x20000, "fgtiles", 0 ) - ROM_LOAD( "2.2j", 0x00000, 0x8000, CRC(ff934c20) SHA1(07cd2225dfc0e5b74be2e1b379c6b180e37660db) ) - ROM_LOAD( "1.2f", 0x08000, 0x8000, CRC(2fd6fb8a) SHA1(1a910e0a2e6db22a8d9a65d7b932f9ca39601e9c) ) - ROM_LOAD( "3.2k", 0x10000, 0x8000, CRC(c70a6da3) SHA1(195772ef649e21a5c54c5871e7b858967b6ebee8) ) - ROM_LOAD( "4.2m", 0x18000, 0x8000, CRC(b5813b67) SHA1(cce38e33a5218d6839d956174807d88e7c070d5a) ) + ROM_LOAD( "2.2j", 0x00000, 0x8000, CRC(ff934c20) SHA1(07cd2225dfc0e5b74be2e1b379c6b180e37660db) ) + ROM_LOAD( "1.2f", 0x08000, 0x8000, CRC(2fd6fb8a) SHA1(1a910e0a2e6db22a8d9a65d7b932f9ca39601e9c) ) + ROM_LOAD( "3.2k", 0x10000, 0x8000, CRC(c70a6da3) SHA1(195772ef649e21a5c54c5871e7b858967b6ebee8) ) + ROM_LOAD( "4.2m", 0x18000, 0x8000, CRC(b5813b67) SHA1(cce38e33a5218d6839d956174807d88e7c070d5a) ) ROM_REGION( 0x20000, "bgtiles", 0 ) - ROM_LOAD( "7.1j", 0x00000, 0x8000, CRC(010ffa4a) SHA1(8856d61b71e951509073bc359851f47c39c4274d) ) - ROM_LOAD( "6.1f", 0x08000, 0x8000, CRC(15104810) SHA1(586df734740209e2a05932e31d2a301d330e8cbd) ) - ROM_LOAD( "8.1k", 0x10000, 0x8000, CRC(f2d45e76) SHA1(46df7bf98434c836fd38539575a35bf67c9ec2c6) ) - ROM_LOAD( "9.1m", 0x18000, 0x8000, CRC(6b0196f3) SHA1(277049279dcfcf07189dbdb20935c2a71b2f6061) ) + ROM_LOAD( "7.1j", 0x00000, 0x8000, CRC(010ffa4a) SHA1(8856d61b71e951509073bc359851f47c39c4274d) ) + ROM_LOAD( "6.1f", 0x08000, 0x8000, CRC(15104810) SHA1(586df734740209e2a05932e31d2a301d330e8cbd) ) + ROM_LOAD( "8.1k", 0x10000, 0x8000, CRC(f2d45e76) SHA1(46df7bf98434c836fd38539575a35bf67c9ec2c6) ) + ROM_LOAD( "9.1m", 0x18000, 0x8000, CRC(6b0196f3) SHA1(277049279dcfcf07189dbdb20935c2a71b2f6061) ) - ROM_REGION( 0x20000, "adpcm", 0 ) /* 4-bits ADPCM samples @ 8kHz */ - ROM_LOAD( "5.2n", 0x00000, 0x10000, CRC(b896c87f) SHA1(985e625a937abd6353218f0cace14d3adec4c1bf) ) /* location 2n */ - ROM_FILL( 0x10000, 0x10000, 0xff ) /* empty socket @ 1n */ + ROM_REGION( 0x20000, "adpcm", 0 ) /* 4-bits ADPCM samples @ 8kHz */ + ROM_LOAD( "5.2n", 0x00000, 0x10000, CRC(b896c87f) SHA1(985e625a937abd6353218f0cace14d3adec4c1bf) ) /* location 2n */ + ROM_FILL( 0x10000, 0x10000, 0xff ) /* empty socket @ 1n */ ROM_REGION( 0x0600, "proms", 0 ) - ROM_LOAD( "82s129.e6", 0x0000, 0x0100, CRC(ae793fef) SHA1(e4e2d2dccabad7d756811fb2d5e123bf30f106f3) ) - ROM_LOAD( "82s129.e7", 0x0100, 0x0100, CRC(7c772d0c) SHA1(9c99daa01ca56c7ebd48945505fcbae184998b13) ) - ROM_LOAD( "82s129.d6", 0x0200, 0x0100, CRC(61716584) SHA1(7a3e17f47ce173d79c12b2394edb8f32b7509e39) ) - ROM_LOAD( "82s129.d7", 0x0300, 0x0100, CRC(4003bc8f) SHA1(f830203c22a4f94b8b9f0b24e287204a742a8322) ) - ROM_LOAD( "82s129.c6", 0x0400, 0x0100, CRC(a8d2b3db) SHA1(7b346797bedc627fb2d49f19b18860a81c69e122) ) - ROM_LOAD( "82s129.c7", 0x0500, 0x0100, CRC(e62fd192) SHA1(86a189df2e2ccef6bd2a4e6d969e777fbba8cdf7) ) + ROM_LOAD( "82s129.e6", 0x0000, 0x0100, CRC(ae793fef) SHA1(e4e2d2dccabad7d756811fb2d5e123bf30f106f3) ) + ROM_LOAD( "82s129.e7", 0x0100, 0x0100, CRC(7c772d0c) SHA1(9c99daa01ca56c7ebd48945505fcbae184998b13) ) + ROM_LOAD( "82s129.d6", 0x0200, 0x0100, CRC(61716584) SHA1(7a3e17f47ce173d79c12b2394edb8f32b7509e39) ) + ROM_LOAD( "82s129.d7", 0x0300, 0x0100, CRC(4003bc8f) SHA1(f830203c22a4f94b8b9f0b24e287204a742a8322) ) + ROM_LOAD( "82s129.c6", 0x0400, 0x0100, CRC(a8d2b3db) SHA1(7b346797bedc627fb2d49f19b18860a81c69e122) ) + ROM_LOAD( "82s129.c7", 0x0500, 0x0100, CRC(e62fd192) SHA1(86a189df2e2ccef6bd2a4e6d969e777fbba8cdf7) ) ROM_END /* @@ -1715,7 +1715,7 @@ ROM_END */ ROM_START( lucky74b ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "luckygde.00", 0x0000, 0x10000, CRC(e3f7db99) SHA1(5c7d9d3fed9eb19d3d666c8c08b34968a9996a96) ) /* bad dump? */ + ROM_LOAD( "luckygde.00", 0x0000, 0x10000, CRC(e3f7db99) SHA1(5c7d9d3fed9eb19d3d666c8c08b34968a9996a96) ) /* bad dump? */ ROM_REGION( 0x20000, "fgtiles", 0 ) ROM_LOAD( "luckygde.12", 0x00000, 0x8000, CRC(7127465b) SHA1(3f72f91652fcab52c073744b1651fdfe772c584a) ) @@ -1730,8 +1730,8 @@ ROM_START( lucky74b ) ROM_LOAD( "luckygde.19", 0x18000, 0x8000, CRC(bb4608ae) SHA1(cc8ec596f445fe0364f254241227de368f309ebb) ) ROM_REGION( 0x20000, "adpcm", 0 ) /* 4-bits ADPCM samples @ 8kHz */ - ROM_LOAD( "luckyson.15", 0x00000, 0x10000, CRC(b896c87f) SHA1(985e625a937abd6353218f0cace14d3adec4c1bf) ) /* location 2n */ - ROM_FILL( 0x10000, 0x10000, 0xff ) /* empty socket @ 1n */ + ROM_LOAD( "luckyson.15", 0x00000, 0x10000, CRC(b896c87f) SHA1(985e625a937abd6353218f0cace14d3adec4c1bf) ) /* location 2n */ + ROM_FILL( 0x10000, 0x10000, 0xff ) /* empty socket @ 1n */ ROM_REGION( 0x0600, "proms", 0 ) ROM_LOAD( "luckyprom.e6", 0x0000, 0x0100, CRC(ae793fef) SHA1(e4e2d2dccabad7d756811fb2d5e123bf30f106f3) ) @@ -1785,8 +1785,8 @@ ROM_START( excitbj ) ROM_LOAD( "ebj_s9.1l", 0x30000, 0x10000, CRC(79ba7d75) SHA1(7301143a019d5e79eff7941a1a34fe96036acffa) ) ROM_REGION( 0x20000, "adpcm", 0 ) /* 4-bits ADPCM samples @ 8kHz */ - ROM_LOAD( "ebj_s5.2n", 0x00000, 0x10000, CRC(9b4a10a2) SHA1(843ab5955ba96bb1b1a5367652d0f6424ba23bdf) ) /* location 2n */ - ROM_LOAD( "ebj_s10.1n", 0x10000, 0x10000, CRC(2fa7401d) SHA1(80a5dfd2b7c183acd2fc124d220de4a4921178b2) ) /* location 1n */ + ROM_LOAD( "ebj_s5.2n", 0x00000, 0x10000, CRC(9b4a10a2) SHA1(843ab5955ba96bb1b1a5367652d0f6424ba23bdf) ) /* location 2n */ + ROM_LOAD( "ebj_s10.1n", 0x10000, 0x10000, CRC(2fa7401d) SHA1(80a5dfd2b7c183acd2fc124d220de4a4921178b2) ) /* location 1n */ ROM_REGION( 0x0600, "proms", 0 ) ROM_LOAD( "6e-a.6e", 0x0000, 0x0100, CRC(bcaa7a0d) SHA1(75554d539bf67effb862234cdf89e4df4e2193ed) ) diff --git a/src/mame/drivers/lwings.c b/src/mame/drivers/lwings.c index 9d7a7264869..74eb9ccac0a 100644 --- a/src/mame/drivers/lwings.c +++ b/src/mame/drivers/lwings.c @@ -133,7 +133,6 @@ WRITE8_MEMBER(lwings_state::avengers_prot_bank_w) int lwings_state::avengers_fetch_paldata( ) { - static const char pal_data[] = /* page 1: 0x03,0x02,0x01,0x00 */ "0000000000000000" "A65486A6364676D6" "C764C777676778A7" "A574E5E5C5756AE5" diff --git a/src/mame/drivers/magicfly.c b/src/mame/drivers/magicfly.c index 0ad88ccb124..96baae3b287 100644 --- a/src/mame/drivers/magicfly.c +++ b/src/mame/drivers/magicfly.c @@ -330,7 +330,7 @@ With the default DIP switches positions, the game is totally in French, and is titled 'BONNE CHANCE!'. Turning the 4th DIP switch ON, the game switch to English, - and the title changes to 'GOOD LUCK!' (as the above mentioned games). + and the title changes to 'GOOD LUCK!' (as the above mentioned games). To enter the test mode, press SERVICE (key 9). You can see an input-test matrix to test all the valid inputs. Pressing BET (key M) and START (Key 1) simultaneou- @@ -416,7 +416,7 @@ [2013-01-17] - Added Bonne Chance!. A French/English poker game prototype of - the well known 'Golden Poker' and 'Jack Potten Poker'. + the well known 'Golden Poker' and 'Jack Potten Poker'. - Worked complete inputs from the scratch. Promoted to working. - Added proper palette. Now the game seems to get accurate colors. - Added some notes. @@ -608,8 +608,8 @@ PALETTE_INIT_MEMBER(magicfly_state, bchance) palette_set_color(machine(), i + 15, MAKE_RGB(0xff, 0xff, 0xff)); } - palette_set_color(machine(), 0x08 , MAKE_RGB(0xff, 0xff, 0xff)); // white for the cards back logo background. - palette_set_color(machine(), 0x12 , MAKE_RGB(0x00, 0x00, 0x00)); // black for the cards corners (should be transparent) + palette_set_color(machine(), 0x08 , MAKE_RGB(0xff, 0xff, 0xff)); // white for the cards back logo background. + palette_set_color(machine(), 0x12 , MAKE_RGB(0x00, 0x00, 0x00)); // black for the cards corners (should be transparent) } @@ -814,42 +814,42 @@ static INPUT_PORTS_START( bchance ) R4C1 + R4C5 to exit... */ PORT_START("IN0-0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) // input test R1C1 (coin 1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) // input test R1C2 (coin 2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_D) PORT_NAME("IN0-3") // input test R1C3 (unknown) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_F) PORT_NAME("IN0-4") // input test R1C4 (unknown) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) // input test R1C1 (coin 1) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) // input test R1C2 (coin 2) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_D) PORT_NAME("IN0-3") // input test R1C3 (unknown) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_F) PORT_NAME("IN0-4") // input test R1C4 (unknown) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_G) PORT_NAME("IN0-6") // input test R1C5 (unknown) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_G) PORT_NAME("IN0-6") // input test R1C5 (unknown) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("IN0-1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small") // input test R2C1 (small) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big") // input test R2C2 (big) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Payout") // input test R2C3 (payout) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) // input test R2C4 (take) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small") // input test R2C1 (small) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big") // input test R2C2 (big) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Payout") // input test R2C3 (payout) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) // input test R2C4 (take) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_H) PORT_NAME("IN1-6") // input test R2C5 (unknown) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_H) PORT_NAME("IN1-6") // input test R2C5 (unknown) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("IN0-2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) // input test R3C1 (hold 4) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) // input test R3C2 (hold 5) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) // input test R3C3 (hold 2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) // input test R3C4 (hold 3) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) // input test R3C1 (hold 4) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) // input test R3C2 (hold 5) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) // input test R3C3 (hold 2) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) // input test R3C4 (hold 3) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) // input test R3C5 (hold 1) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) // input test R3C5 (hold 1) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("IN0-3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start") // input test R4C1 (start/deal) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) // input test R4C2 (cancel) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) // input test R4C3 (service/test) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) // input test R4C4 (d-up) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start") // input test R4C1 (start/deal) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) // input test R4C2 (cancel) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) // input test R4C3 (service/test) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) // input test R4C4 (d-up) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) // input test R4C5 (bet) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) // input test R4C5 (bet) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -918,7 +918,7 @@ GFXDECODE_END static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ @@ -1031,23 +1031,23 @@ ROM_END ROM_START( bchance ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "v-pk-4gag.bin", 0xc000, 0x4000, CRC(7c2dd908) SHA1(97b1390fb4c8c838a0d5b78d6904d597a9abe27f) ) + ROM_LOAD( "v-pk-4gag.bin", 0xc000, 0x4000, CRC(7c2dd908) SHA1(97b1390fb4c8c838a0d5b78d6904d597a9abe27f) ) - ROM_REGION( 0x6000, "gfx", 0 ) /* ROM n-pk-2.bin was created from an exhaustive analysis of 25 different bad dumps */ - ROM_LOAD( "n-pk-2.bin", 0x0000, 0x2000, BAD_DUMP CRC(462c3dd7) SHA1(fb30d6147e0d607b3fb631d8bdca35e98eccfd2d) ) - ROM_LOAD( "n-pk-1.bin", 0x2000, 0x2000, CRC(e35cebd6) SHA1(b0dd86fd4c06f98e486b04e09808985bfa4f0e9c) ) - ROM_LOAD( "n-pk-0.bin", 0x4000, 0x2000, CRC(3c64edc4) SHA1(97b677b7c4999b502ab4b4f70c33b40050843796) ) + ROM_REGION( 0x6000, "gfx", 0 ) /* ROM n-pk-2.bin was created from an exhaustive analysis of 25 different bad dumps */ + ROM_LOAD( "n-pk-2.bin", 0x0000, 0x2000, BAD_DUMP CRC(462c3dd7) SHA1(fb30d6147e0d607b3fb631d8bdca35e98eccfd2d) ) + ROM_LOAD( "n-pk-1.bin", 0x2000, 0x2000, CRC(e35cebd6) SHA1(b0dd86fd4c06f98e486b04e09808985bfa4f0e9c) ) + ROM_LOAD( "n-pk-0.bin", 0x4000, 0x2000, CRC(3c64edc4) SHA1(97b677b7c4999b502ab4b4f70c33b40050843796) ) ROM_REGION( 0x0800, "gfxbnk0", 0 ) - ROM_COPY( "gfx", 0x1800, 0x0000, 0x0800 ) /* chars */ + ROM_COPY( "gfx", 0x1800, 0x0000, 0x0800 ) /* chars */ ROM_REGION( 0x1800, "gfxbnk1", 0 ) - ROM_COPY( "gfx", 0x1000, 0x0000, 0x0800 ) /* 3bpp tiles, bitplane 1 */ - ROM_COPY( "gfx", 0x3800, 0x0800, 0x0800 ) /* 3bpp tiles, bitplane 2 */ - ROM_COPY( "gfx", 0x5800, 0x1000, 0x0800 ) /* 3bpp tiles, bitplane 3 */ + ROM_COPY( "gfx", 0x1000, 0x0000, 0x0800 ) /* 3bpp tiles, bitplane 1 */ + ROM_COPY( "gfx", 0x3800, 0x0800, 0x0800 ) /* 3bpp tiles, bitplane 2 */ + ROM_COPY( "gfx", 0x5800, 0x1000, 0x0800 ) /* 3bpp tiles, bitplane 3 */ ROM_REGION( 0x0200, "plds", 0 ) - ROM_LOAD( "gal16v8-bchance.bin", 0x0000, 0x0104, NO_DUMP ) /* protected */ + ROM_LOAD( "gal16v8-bchance.bin", 0x0000, 0x0104, NO_DUMP ) /* protected */ ROM_END diff --git a/src/mame/drivers/majorpkr.c b/src/mame/drivers/majorpkr.c index 26d0ffce967..befd214af3d 100644 --- a/src/mame/drivers/majorpkr.c +++ b/src/mame/drivers/majorpkr.c @@ -1002,7 +1002,7 @@ GFXDECODE_END static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 16, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/merit.c b/src/mame/drivers/merit.c index b8fa8533c81..00b704e60f0 100644 --- a/src/mame/drivers/merit.c +++ b/src/mame/drivers/merit.c @@ -316,7 +316,7 @@ WRITE_LINE_MEMBER(merit_state::vsync_changed) static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ begin_update, /* before pixel update callback */ update_row, /* row update callback */ diff --git a/src/mame/drivers/miniboy7.c b/src/mame/drivers/miniboy7.c index 507b6394a9a..7223da3469e 100644 --- a/src/mame/drivers/miniboy7.c +++ b/src/mame/drivers/miniboy7.c @@ -394,7 +394,7 @@ GFXDECODE_END static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/missile.c b/src/mame/drivers/missile.c index 73f276e9c22..c2eac681ffb 100644 --- a/src/mame/drivers/missile.c +++ b/src/mame/drivers/missile.c @@ -513,7 +513,7 @@ TIMER_CALLBACK_MEMBER(missile_state::adjust_cpu_speed) void missile_state::machine_start() { /* initialize globals */ - m_mainrom = memregion("maincpu")->base(); + m_mainrom = memregion("maincpu")->base(); m_writeprom = memregion("proms")->base(); m_flipscreen = 0; diff --git a/src/mame/drivers/mpu12wbk.c b/src/mame/drivers/mpu12wbk.c index 9dde807e763..ed8ac8007b2 100644 --- a/src/mame/drivers/mpu12wbk.c +++ b/src/mame/drivers/mpu12wbk.c @@ -494,7 +494,7 @@ static const ay8910_interface ay8910_config = static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 4, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/mpu4dealem.c b/src/mame/drivers/mpu4dealem.c index 6092a0ea392..5baa6b7b42d 100644 --- a/src/mame/drivers/mpu4dealem.c +++ b/src/mame/drivers/mpu4dealem.c @@ -147,7 +147,7 @@ WRITE_LINE_MEMBER(mpu4dealem_state::dealem_vsync_changed) static MC6845_INTERFACE( hd6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/murogem.c b/src/mame/drivers/murogem.c index cb73c0085d5..ae88e20bbd9 100644 --- a/src/mame/drivers/murogem.c +++ b/src/mame/drivers/murogem.c @@ -231,7 +231,7 @@ UINT32 murogem_state::screen_update_murogem(screen_device &screen, bitmap_ind16 static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/namcops2.c b/src/mame/drivers/namcops2.c index db8e2d6fa7b..e4f8e361eaf 100644 --- a/src/mame/drivers/namcops2.c +++ b/src/mame/drivers/namcops2.c @@ -455,11 +455,11 @@ ROM_START( rrvac ) ROM_LOAD( "rrv3vera.ic002", 0x000000, 0x800000, CRC(dd20c4a2) SHA1(07bddaac958ac62d9fc29671fc83bd1e3b27f4b8) ) ROM_LOAD( "rrv3vera_spr.ic002", 0x800000, 0x040000, CRC(712e0e9a) SHA1(d396aaf918036ff7f909a84daefe8f651fdf9b05) ) - ROM_REGION(0x4010, "jvsio", 0) // Namco "FCA" JVS I/O board PIC16F84 code (see namcos23.c for FCA details) - ROM_LOAD( "fcap11.ic2", 0x000000, 0x004010, CRC(1b2592ce) SHA1(a1a487361053af564f6ec67e545413e370a3b38c) ) + ROM_REGION(0x4010, "jvsio", 0) // Namco "FCA" JVS I/O board PIC16F84 code (see namcos23.c for FCA details) + ROM_LOAD( "fcap11.ic2", 0x000000, 0x004010, CRC(1b2592ce) SHA1(a1a487361053af564f6ec67e545413e370a3b38c) ) - ROM_REGION(0x80000, "steering", 0) // Steering I/O board MB90242A code (see namcos23.c for steering board details) - ROM_LOAD( "rrv3_str-0a.ic16", 0x000000, 0x080000, CRC(df8b6cac) SHA1(d45e150678218084925673e1d77edefc04135035) ) + ROM_REGION(0x80000, "steering", 0) // Steering I/O board MB90242A code (see namcos23.c for steering board details) + ROM_LOAD( "rrv3_str-0a.ic16", 0x000000, 0x080000, CRC(df8b6cac) SHA1(d45e150678218084925673e1d77edefc04135035) ) DISK_REGION("dvd") DISK_IMAGE_READONLY( "rrv1-a", 0, SHA1(77bb70407511cbb12ab999410e797dcaf0779229) ) diff --git a/src/mame/drivers/namcos22.c b/src/mame/drivers/namcos22.c index 14e481e9f96..6019c2523ec 100644 --- a/src/mame/drivers/namcos22.c +++ b/src/mame/drivers/namcos22.c @@ -2749,20 +2749,20 @@ TIMER_DEVICE_CALLBACK_MEMBER(namcos22_state::adillor_trackball_update) iy = 0x7f; double x = (double)(ix - 0x80) / 127.0; double y = (double)(0x80 - iy) / 127.0; - + // normalize double a = atan(x/y); double p = sqrt(x*x + y*y); double v = (fabs(a) < (M_PI / 4.0)) ? p*cos(a) : p*sin(a); v = fabs(v); - + // note that it is rotated by 45 degrees, so instead of axes like (+), they are like (x) a += (M_PI / 4.0); if (a < 0) a = 0; else if (a > (M_PI / 2.0)) a = M_PI / 2.0; - + // tied to mcu A2/A3 timer (speed determines frequency) // these values(in usec) may need tweaking: const int base = 1000; @@ -2771,7 +2771,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(namcos22_state::adillor_trackball_update) double t[2]; t[0] = v*sin(a); // y -> A2 t[1] = v*cos(a); // x -> A3 - + for (int axis = 0; axis < 2; axis++) { if (t[axis] > (1.0 / (double)(range))) @@ -2822,7 +2822,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(namcos22_state::propcycl_pedal_update) { // arbitrary timer for reading optical pedal UINT8 i = ioport("PEDAL")->read(); - + if (i != 0) { // the pedal has a simple 1-bit "light interrupted" sensor. the faster you pedal, @@ -3082,7 +3082,7 @@ static MACHINE_CONFIG_START( namcos22, namcos22_state ) MCFG_CPU_PROGRAM_MAP( mcu_s22_program) MCFG_CPU_IO_MAP( mcu_s22_io) - MCFG_CPU_ADD("iomcu", M37702, XTAL_6_144MHz) // 6.144MHz XTAL on I/O board, not sure if it has a divider + MCFG_CPU_ADD("iomcu", M37702, XTAL_6_144MHz) // 6.144MHz XTAL on I/O board, not sure if it has a divider MCFG_CPU_PROGRAM_MAP( iomcu_s22_program) MCFG_CPU_IO_MAP( iomcu_s22_io) @@ -4916,7 +4916,7 @@ static INPUT_PORTS_START( adillor ) PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_NAME("Dev Service Up") PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_NAME("Dev Service Down") PORT_BIT( 0xffc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) - + PORT_START("MCUP5A") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) diff --git a/src/mame/drivers/nyny.c b/src/mame/drivers/nyny.c index 445e1eea57d..a6847f101f7 100644 --- a/src/mame/drivers/nyny.c +++ b/src/mame/drivers/nyny.c @@ -425,7 +425,7 @@ WRITE_LINE_MEMBER(nyny_state::display_enable_changed) static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ begin_update, /* before pixel update callback */ update_row, /* row update callback */ diff --git a/src/mame/drivers/othello.c b/src/mame/drivers/othello.c index 5c58e1088ff..3204c170c2e 100644 --- a/src/mame/drivers/othello.c +++ b/src/mame/drivers/othello.c @@ -367,7 +367,7 @@ INPUT_PORTS_END static MC6845_INTERFACE( h46505_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ TILE_WIDTH, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ update_row, /* row update callback */ diff --git a/src/mame/drivers/peplus.c b/src/mame/drivers/peplus.c index 10d9bb0ff7f..66c5817e70c 100644 --- a/src/mame/drivers/peplus.c +++ b/src/mame/drivers/peplus.c @@ -294,7 +294,7 @@ static MC6845_ON_UPDATE_ADDR_CHANGED(crtc_addr); static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/pgm.c b/src/mame/drivers/pgm.c index 9a090490aef..4ff1784e33e 100644 --- a/src/mame/drivers/pgm.c +++ b/src/mame/drivers/pgm.c @@ -3860,7 +3860,7 @@ GAME( 2002, dmnfrnta, dmnfrnt, pgm_arm_type3, pgm, pgm_arm_type3_state GAME( 2002, dmnfrntpcb, dmnfrnt, pgm_arm_type3, pgm, pgm_arm_type3_state, dmnfrnt, ROT0, "IGS", "Demon Front (68k label V107KR, ROM M107KR 11/03/03) (ARM label V106KR, ROM 10/16/03 S106KR) (JAMMA PCB)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) // works but reports version mismatch (wants internal rom version and region to match external?) - + /* these don't use an External ARM rom, and don't have any weak internal functions which would allow the internal ROM to be read out */ GAME( 2002, ddpdoj, 0, pgm_arm_type1_cave, pgm, pgm_arm_type1_state, ddp3, ROT270, "Cave", "DoDonPachi Dai-Ou-Jou V101 (2002.04.05.Master Ver)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // is there a v101 without the . after 05? GAME( 2002, ddpdoja, ddpdoj, pgm_arm_type1_cave, pgm, pgm_arm_type1_state, ddp3, ROT270, "Cave", "DoDonPachi Dai-Ou-Jou V100 (2002.04.05.Master Ver)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/pgm2.c b/src/mame/drivers/pgm2.c index 9f6a675bd3d..c404880e4b2 100644 --- a/src/mame/drivers/pgm2.c +++ b/src/mame/drivers/pgm2.c @@ -176,165 +176,165 @@ MACHINE_CONFIG_END ROM_START( orleg2 ) ROM_REGION( 0x04000, "maincpu", 0 ) - ROM_LOAD( "xyj2_igs036.rom", 0x00000000, 0x0004000, NO_DUMP ) + ROM_LOAD( "xyj2_igs036.rom", 0x00000000, 0x0004000, NO_DUMP ) - ROM_REGION( 0x800000, "user1", 0 ) - ROM_LOAD( "xyj2_v104cn.u7", 0x00000000, 0x0800000, CRC(7c24a4f5) SHA1(3cd9f9264ef2aad0869afdf096e88eb8d74b2570) ) + ROM_REGION( 0x800000, "user1", 0 ) + ROM_LOAD( "xyj2_v104cn.u7", 0x00000000, 0x0800000, CRC(7c24a4f5) SHA1(3cd9f9264ef2aad0869afdf096e88eb8d74b2570) ) - ROM_REGION( 0x200000, "tiles", ROMREGION_ERASEFF ) - ROM_LOAD( "ig-a_text.u4", 0x00000000, 0x0200000, CRC(fa444c32) SHA1(31e5e3efa92d52bf9ab97a0ece51e3b77f52ce8a) ) + ROM_REGION( 0x200000, "tiles", ROMREGION_ERASEFF ) + ROM_LOAD( "ig-a_text.u4", 0x00000000, 0x0200000, CRC(fa444c32) SHA1(31e5e3efa92d52bf9ab97a0ece51e3b77f52ce8a) ) - ROM_REGION( 0x1000000, "bgtile", 0 ) - ROM_LOAD32_WORD( "ig-a_bgl.u35", 0x00000000, 0x0800000, CRC(083a8315) SHA1(0dba25e132fbb12faa59ced648c27b881dc73478) ) - ROM_LOAD32_WORD( "ig-a_bgh.u36", 0x00000002, 0x0800000, CRC(e197221d) SHA1(5574b1e3da4b202db725be906dd868edc2fd4634) ) + ROM_REGION( 0x1000000, "bgtile", 0 ) + ROM_LOAD32_WORD( "ig-a_bgl.u35", 0x00000000, 0x0800000, CRC(083a8315) SHA1(0dba25e132fbb12faa59ced648c27b881dc73478) ) + ROM_LOAD32_WORD( "ig-a_bgh.u36", 0x00000002, 0x0800000, CRC(e197221d) SHA1(5574b1e3da4b202db725be906dd868edc2fd4634) ) - ROM_REGION( 0x2000000, "spritesa", 0 ) // 1bpp sprite mask data - ROM_LOAD32_WORD( "ig-a_bml.u12", 0x00000000, 0x1000000, CRC(113a331c) SHA1(ee6b31bb2b052cc8799573de0d2f0a83f0ab4f6a) ) - ROM_LOAD32_WORD( "ig-a_bmh.u16", 0x00000002, 0x1000000, CRC(fbf411c8) SHA1(5089b5cc9bbf6496ef1367c6255e63e9ab895117) ) + ROM_REGION( 0x2000000, "spritesa", 0 ) // 1bpp sprite mask data + ROM_LOAD32_WORD( "ig-a_bml.u12", 0x00000000, 0x1000000, CRC(113a331c) SHA1(ee6b31bb2b052cc8799573de0d2f0a83f0ab4f6a) ) + ROM_LOAD32_WORD( "ig-a_bmh.u16", 0x00000002, 0x1000000, CRC(fbf411c8) SHA1(5089b5cc9bbf6496ef1367c6255e63e9ab895117) ) - ROM_REGION( 0x4000000, "spritesb", 0 ) // sprite colour data - ROM_LOAD32_WORD( "ig-a_cgl.u18", 0x00000000, 0x2000000, CRC(43501fa6) SHA1(58ccce6d393964b771fec3f5c583e3ede57482a3) ) - ROM_LOAD32_WORD( "ig-a_cgh.u26", 0x00000002, 0x2000000, CRC(7051d020) SHA1(3d9b24c6fda4c9699bb9f00742e0888059b623e1) ) + ROM_REGION( 0x4000000, "spritesb", 0 ) // sprite colour data + ROM_LOAD32_WORD( "ig-a_cgl.u18", 0x00000000, 0x2000000, CRC(43501fa6) SHA1(58ccce6d393964b771fec3f5c583e3ede57482a3) ) + ROM_LOAD32_WORD( "ig-a_cgh.u26", 0x00000002, 0x2000000, CRC(7051d020) SHA1(3d9b24c6fda4c9699bb9f00742e0888059b623e1) ) - ROM_REGION( 0x1000000, "ymz770", ROMREGION_ERASEFF ) /* ymz770 */ - ROM_LOAD16_WORD_SWAP( "ig-a_sp.u2", 0x00000000, 0x1000000, CRC(8250688c) SHA1(d2488477afc528aeee96826065deba2bce4f0a7d) ) + ROM_REGION( 0x1000000, "ymz770", ROMREGION_ERASEFF ) /* ymz770 */ + ROM_LOAD16_WORD_SWAP( "ig-a_sp.u2", 0x00000000, 0x1000000, CRC(8250688c) SHA1(d2488477afc528aeee96826065deba2bce4f0a7d) ) ROM_END ROM_START( orleg2o ) - ROM_REGION( 0x04000, "maincpu", 0 ) - ROM_LOAD( "xyj2_igs036.rom", 0x00000000, 0x0004000, NO_DUMP ) + ROM_REGION( 0x04000, "maincpu", 0 ) + ROM_LOAD( "xyj2_igs036.rom", 0x00000000, 0x0004000, NO_DUMP ) - ROM_REGION( 0x800000, "user1", 0 ) - ROM_LOAD( "xyj2_v103cn.u7", 0x000000, 0x800000, CRC(21c1fae8) SHA1(36eeb7a5e8dc8ee7c834f3ff1173c28cf6c2f1a3) ) + ROM_REGION( 0x800000, "user1", 0 ) + ROM_LOAD( "xyj2_v103cn.u7", 0x000000, 0x800000, CRC(21c1fae8) SHA1(36eeb7a5e8dc8ee7c834f3ff1173c28cf6c2f1a3) ) - ROM_REGION( 0x200000, "tiles", ROMREGION_ERASEFF ) - ROM_LOAD( "ig-a_text.u4", 0x00000000, 0x0200000, CRC(fa444c32) SHA1(31e5e3efa92d52bf9ab97a0ece51e3b77f52ce8a) ) + ROM_REGION( 0x200000, "tiles", ROMREGION_ERASEFF ) + ROM_LOAD( "ig-a_text.u4", 0x00000000, 0x0200000, CRC(fa444c32) SHA1(31e5e3efa92d52bf9ab97a0ece51e3b77f52ce8a) ) - ROM_REGION( 0x1000000, "bgtile", 0 ) - ROM_LOAD32_WORD( "ig-a_bgl.u35", 0x00000000, 0x0800000, CRC(083a8315) SHA1(0dba25e132fbb12faa59ced648c27b881dc73478) ) - ROM_LOAD32_WORD( "ig-a_bgh.u36", 0x00000002, 0x0800000, CRC(e197221d) SHA1(5574b1e3da4b202db725be906dd868edc2fd4634) ) + ROM_REGION( 0x1000000, "bgtile", 0 ) + ROM_LOAD32_WORD( "ig-a_bgl.u35", 0x00000000, 0x0800000, CRC(083a8315) SHA1(0dba25e132fbb12faa59ced648c27b881dc73478) ) + ROM_LOAD32_WORD( "ig-a_bgh.u36", 0x00000002, 0x0800000, CRC(e197221d) SHA1(5574b1e3da4b202db725be906dd868edc2fd4634) ) - ROM_REGION( 0x2000000, "spritesa", 0 ) // 1bpp sprite mask data - ROM_LOAD32_WORD( "ig-a_bml.u12", 0x00000000, 0x1000000, CRC(113a331c) SHA1(ee6b31bb2b052cc8799573de0d2f0a83f0ab4f6a) ) - ROM_LOAD32_WORD( "ig-a_bmh.u16", 0x00000002, 0x1000000, CRC(fbf411c8) SHA1(5089b5cc9bbf6496ef1367c6255e63e9ab895117) ) + ROM_REGION( 0x2000000, "spritesa", 0 ) // 1bpp sprite mask data + ROM_LOAD32_WORD( "ig-a_bml.u12", 0x00000000, 0x1000000, CRC(113a331c) SHA1(ee6b31bb2b052cc8799573de0d2f0a83f0ab4f6a) ) + ROM_LOAD32_WORD( "ig-a_bmh.u16", 0x00000002, 0x1000000, CRC(fbf411c8) SHA1(5089b5cc9bbf6496ef1367c6255e63e9ab895117) ) - ROM_REGION( 0x4000000, "spritesb", 0 ) // sprite colour data - ROM_LOAD32_WORD( "ig-a_cgl.u18", 0x00000000, 0x2000000, CRC(43501fa6) SHA1(58ccce6d393964b771fec3f5c583e3ede57482a3) ) - ROM_LOAD32_WORD( "ig-a_cgh.u26", 0x00000002, 0x2000000, CRC(7051d020) SHA1(3d9b24c6fda4c9699bb9f00742e0888059b623e1) ) + ROM_REGION( 0x4000000, "spritesb", 0 ) // sprite colour data + ROM_LOAD32_WORD( "ig-a_cgl.u18", 0x00000000, 0x2000000, CRC(43501fa6) SHA1(58ccce6d393964b771fec3f5c583e3ede57482a3) ) + ROM_LOAD32_WORD( "ig-a_cgh.u26", 0x00000002, 0x2000000, CRC(7051d020) SHA1(3d9b24c6fda4c9699bb9f00742e0888059b623e1) ) - ROM_REGION( 0x1000000, "ymz770", ROMREGION_ERASEFF ) /* ymz770 */ - ROM_LOAD16_WORD_SWAP( "ig-a_sp.u2", 0x00000000, 0x1000000, CRC(8250688c) SHA1(d2488477afc528aeee96826065deba2bce4f0a7d) ) + ROM_REGION( 0x1000000, "ymz770", ROMREGION_ERASEFF ) /* ymz770 */ + ROM_LOAD16_WORD_SWAP( "ig-a_sp.u2", 0x00000000, 0x1000000, CRC(8250688c) SHA1(d2488477afc528aeee96826065deba2bce4f0a7d) ) ROM_END ROM_START( kov2nl ) - ROM_REGION( 0x04000, "maincpu", 0 ) - ROM_LOAD( "gsyx_igs036.rom", 0x00000000, 0x0004000, NO_DUMP ) + ROM_REGION( 0x04000, "maincpu", 0 ) + ROM_LOAD( "gsyx_igs036.rom", 0x00000000, 0x0004000, NO_DUMP ) - ROM_REGION( 0x800000, "user1", 0 ) - ROM_LOAD( "gsyx_v302cn.u7", 0x00000000, 0x0800000, CRC(b19cf540) SHA1(25da5804bbfd7ef2cdf5cc5aabaa803d18b98929) ) + ROM_REGION( 0x800000, "user1", 0 ) + ROM_LOAD( "gsyx_v302cn.u7", 0x00000000, 0x0800000, CRC(b19cf540) SHA1(25da5804bbfd7ef2cdf5cc5aabaa803d18b98929) ) - ROM_REGION( 0x200000, "tiles", ROMREGION_ERASEFF ) - ROM_LOAD( "ig-a3_text.u4", 0x00000000, 0x0200000, CRC(214530ff) SHA1(4231a02054b0345392a077042b95779fd45d6c22) ) + ROM_REGION( 0x200000, "tiles", ROMREGION_ERASEFF ) + ROM_LOAD( "ig-a3_text.u4", 0x00000000, 0x0200000, CRC(214530ff) SHA1(4231a02054b0345392a077042b95779fd45d6c22) ) - ROM_REGION( 0x1000000, "bgtile", 0 ) - ROM_LOAD32_WORD( "ig-a3_bgl.u35", 0x00000000, 0x0800000, CRC(2d46b1f6) SHA1(ea8c805eda6292e86a642e9633d8fee7054d10b1) ) - ROM_LOAD32_WORD( "ig-a3_bgh.u36", 0x00000002, 0x0800000, CRC(df710c36) SHA1(f826c3f496c4f17b46d18af1d8e02cac7b7027ac) ) + ROM_REGION( 0x1000000, "bgtile", 0 ) + ROM_LOAD32_WORD( "ig-a3_bgl.u35", 0x00000000, 0x0800000, CRC(2d46b1f6) SHA1(ea8c805eda6292e86a642e9633d8fee7054d10b1) ) + ROM_LOAD32_WORD( "ig-a3_bgh.u36", 0x00000002, 0x0800000, CRC(df710c36) SHA1(f826c3f496c4f17b46d18af1d8e02cac7b7027ac) ) - ROM_REGION( 0x2000000, "spritesa", 0 ) // 1bpp sprite mask data - ROM_LOAD32_WORD( "ig-a3_bml.u12", 0x00000000, 0x1000000, CRC(0bf63836) SHA1(b8e4f1951f8074b475b795bd7840c5a375b6f5ef) ) - ROM_LOAD32_WORD( "ig-a3_bmh.u16", 0x00000002, 0x1000000, CRC(4a378542) SHA1(5d06a8a8796285a786ebb690c34610f923ef5570) ) + ROM_REGION( 0x2000000, "spritesa", 0 ) // 1bpp sprite mask data + ROM_LOAD32_WORD( "ig-a3_bml.u12", 0x00000000, 0x1000000, CRC(0bf63836) SHA1(b8e4f1951f8074b475b795bd7840c5a375b6f5ef) ) + ROM_LOAD32_WORD( "ig-a3_bmh.u16", 0x00000002, 0x1000000, CRC(4a378542) SHA1(5d06a8a8796285a786ebb690c34610f923ef5570) ) - ROM_REGION( 0x4000000, "spritesb", 0 ) // sprite colour data - ROM_LOAD32_WORD( "ig-a3_cgl.u18", 0x00000000, 0x2000000, CRC(8d923e1f) SHA1(14371cf385dd8857017d3111cd4710f4291b1ae2) ) - ROM_LOAD32_WORD( "ig-a3_cgh.u26", 0x00000002, 0x2000000, CRC(5b6fbf3f) SHA1(d1f52e230b91ee6cde939d7c2b74da7fd6527e73) ) + ROM_REGION( 0x4000000, "spritesb", 0 ) // sprite colour data + ROM_LOAD32_WORD( "ig-a3_cgl.u18", 0x00000000, 0x2000000, CRC(8d923e1f) SHA1(14371cf385dd8857017d3111cd4710f4291b1ae2) ) + ROM_LOAD32_WORD( "ig-a3_cgh.u26", 0x00000002, 0x2000000, CRC(5b6fbf3f) SHA1(d1f52e230b91ee6cde939d7c2b74da7fd6527e73) ) - ROM_REGION( 0x2000000, "ymz770", ROMREGION_ERASEFF ) /* ymz770 */ - ROM_LOAD16_WORD_SWAP( "ig-a3_sp.u37", 0x00000000, 0x2000000, CRC(45cdf422) SHA1(8005d284bcee73cff37a147fcd1c3e9f039a7203) ) + ROM_REGION( 0x2000000, "ymz770", ROMREGION_ERASEFF ) /* ymz770 */ + ROM_LOAD16_WORD_SWAP( "ig-a3_sp.u37", 0x00000000, 0x2000000, CRC(45cdf422) SHA1(8005d284bcee73cff37a147fcd1c3e9f039a7203) ) ROM_END ROM_START( kov2nlo ) - ROM_REGION( 0x04000, "maincpu", 0 ) - ROM_LOAD( "gsyx_igs036.rom", 0x00000000, 0x0004000, NO_DUMP ) + ROM_REGION( 0x04000, "maincpu", 0 ) + ROM_LOAD( "gsyx_igs036.rom", 0x00000000, 0x0004000, NO_DUMP ) - ROM_REGION( 0x800000, "user1", 0 ) - ROM_LOAD( "gsyx_v301cn.u7", 0x000000, 0x800000, CRC(c4595c2c) SHA1(09e379556ef76f81a63664f46d3f1415b315f384) ) + ROM_REGION( 0x800000, "user1", 0 ) + ROM_LOAD( "gsyx_v301cn.u7", 0x000000, 0x800000, CRC(c4595c2c) SHA1(09e379556ef76f81a63664f46d3f1415b315f384) ) - ROM_REGION( 0x200000, "tiles", ROMREGION_ERASEFF ) - ROM_LOAD( "ig-a3_text.u4", 0x00000000, 0x0200000, CRC(214530ff) SHA1(4231a02054b0345392a077042b95779fd45d6c22) ) + ROM_REGION( 0x200000, "tiles", ROMREGION_ERASEFF ) + ROM_LOAD( "ig-a3_text.u4", 0x00000000, 0x0200000, CRC(214530ff) SHA1(4231a02054b0345392a077042b95779fd45d6c22) ) - ROM_REGION( 0x1000000, "bgtile", 0 ) - ROM_LOAD32_WORD( "ig-a3_bgl.u35", 0x00000000, 0x0800000, CRC(2d46b1f6) SHA1(ea8c805eda6292e86a642e9633d8fee7054d10b1) ) - ROM_LOAD32_WORD( "ig-a3_bgh.u36", 0x00000002, 0x0800000, CRC(df710c36) SHA1(f826c3f496c4f17b46d18af1d8e02cac7b7027ac) ) + ROM_REGION( 0x1000000, "bgtile", 0 ) + ROM_LOAD32_WORD( "ig-a3_bgl.u35", 0x00000000, 0x0800000, CRC(2d46b1f6) SHA1(ea8c805eda6292e86a642e9633d8fee7054d10b1) ) + ROM_LOAD32_WORD( "ig-a3_bgh.u36", 0x00000002, 0x0800000, CRC(df710c36) SHA1(f826c3f496c4f17b46d18af1d8e02cac7b7027ac) ) - ROM_REGION( 0x2000000, "spritesa", 0 ) // 1bpp sprite mask data - ROM_LOAD32_WORD( "ig-a3_bml.u12", 0x00000000, 0x1000000, CRC(0bf63836) SHA1(b8e4f1951f8074b475b795bd7840c5a375b6f5ef) ) - ROM_LOAD32_WORD( "ig-a3_bmh.u16", 0x00000002, 0x1000000, CRC(4a378542) SHA1(5d06a8a8796285a786ebb690c34610f923ef5570) ) + ROM_REGION( 0x2000000, "spritesa", 0 ) // 1bpp sprite mask data + ROM_LOAD32_WORD( "ig-a3_bml.u12", 0x00000000, 0x1000000, CRC(0bf63836) SHA1(b8e4f1951f8074b475b795bd7840c5a375b6f5ef) ) + ROM_LOAD32_WORD( "ig-a3_bmh.u16", 0x00000002, 0x1000000, CRC(4a378542) SHA1(5d06a8a8796285a786ebb690c34610f923ef5570) ) - ROM_REGION( 0x4000000, "spritesb", 0 ) // sprite colour data - ROM_LOAD32_WORD( "ig-a3_cgl.u18", 0x00000000, 0x2000000, CRC(8d923e1f) SHA1(14371cf385dd8857017d3111cd4710f4291b1ae2) ) - ROM_LOAD32_WORD( "ig-a3_cgh.u26", 0x00000002, 0x2000000, CRC(5b6fbf3f) SHA1(d1f52e230b91ee6cde939d7c2b74da7fd6527e73) ) + ROM_REGION( 0x4000000, "spritesb", 0 ) // sprite colour data + ROM_LOAD32_WORD( "ig-a3_cgl.u18", 0x00000000, 0x2000000, CRC(8d923e1f) SHA1(14371cf385dd8857017d3111cd4710f4291b1ae2) ) + ROM_LOAD32_WORD( "ig-a3_cgh.u26", 0x00000002, 0x2000000, CRC(5b6fbf3f) SHA1(d1f52e230b91ee6cde939d7c2b74da7fd6527e73) ) - ROM_REGION( 0x2000000, "ymz770", ROMREGION_ERASEFF ) /* ymz770 */ - ROM_LOAD16_WORD_SWAP( "ig-a3_sp.u37", 0x00000000, 0x2000000, CRC(45cdf422) SHA1(8005d284bcee73cff37a147fcd1c3e9f039a7203) ) + ROM_REGION( 0x2000000, "ymz770", ROMREGION_ERASEFF ) /* ymz770 */ + ROM_LOAD16_WORD_SWAP( "ig-a3_sp.u37", 0x00000000, 0x2000000, CRC(45cdf422) SHA1(8005d284bcee73cff37a147fcd1c3e9f039a7203) ) ROM_END #ifdef OTHER_PGM2_SETS ROM_START( ddpdojh ) - ROM_REGION( 0x04000, "maincpu", 0 ) - ROM_LOAD( "ddpdoj_igs036.rom", 0x00000000, 0x0004000, NO_DUMP ) + ROM_REGION( 0x04000, "maincpu", 0 ) + ROM_LOAD( "ddpdoj_igs036.rom", 0x00000000, 0x0004000, NO_DUMP ) - ROM_REGION( 0x800000, "user1", 0 ) - ROM_LOAD( "ddpdoj_v201cn.u4", 0x00000000, 0x0200000, CRC(89e4b760) SHA1(9fad1309da31d12a413731b416a8bbfdb304ed9e) ) + ROM_REGION( 0x800000, "user1", 0 ) + ROM_LOAD( "ddpdoj_v201cn.u4", 0x00000000, 0x0200000, CRC(89e4b760) SHA1(9fad1309da31d12a413731b416a8bbfdb304ed9e) ) - ROM_REGION( 0x200000, "tiles", ROMREGION_ERASEFF ) - ROM_LOAD( "ddpdoj_text.u1", 0x00000000, 0x0200000, CRC(f18141d1) SHA1(a16e0a76bc926a158bb92dfd35aca749c569ef50) ) + ROM_REGION( 0x200000, "tiles", ROMREGION_ERASEFF ) + ROM_LOAD( "ddpdoj_text.u1", 0x00000000, 0x0200000, CRC(f18141d1) SHA1(a16e0a76bc926a158bb92dfd35aca749c569ef50) ) - ROM_REGION( 0x2000000, "bgtile", 0 ) - ROM_LOAD32_WORD( "ddpdoj_bgl.u23", 0x00000000, 0x1000000, CRC(ff65fdab) SHA1(abdd5ca43599a2daa722547a999119123dd9bb28) ) - ROM_LOAD32_WORD( "ddpdoj_bgh.u24", 0x00000002, 0x1000000, CRC(bb84d2a6) SHA1(a576a729831b5946287fa8f0d923016f43a9bedb) ) + ROM_REGION( 0x2000000, "bgtile", 0 ) + ROM_LOAD32_WORD( "ddpdoj_bgl.u23", 0x00000000, 0x1000000, CRC(ff65fdab) SHA1(abdd5ca43599a2daa722547a999119123dd9bb28) ) + ROM_LOAD32_WORD( "ddpdoj_bgh.u24", 0x00000002, 0x1000000, CRC(bb84d2a6) SHA1(a576a729831b5946287fa8f0d923016f43a9bedb) ) - ROM_REGION( 0x1000000, "spritesa", 0 ) // 1bpp sprite mask data - ROM_LOAD32_WORD( "ddpdoj_mapl0.u13", 0x00000000, 0x800000, CRC(bcfbb0fc) SHA1(9ec478eba9905913cf997bd9b46c70c1ad383630) ) - ROM_LOAD32_WORD( "ddpdoj_maph0.u15", 0x00000002, 0x800000, CRC(0cc75d4e) SHA1(6d1b5ef0fdebf1e84fa199b939ffa07b810b12c9) ) + ROM_REGION( 0x1000000, "spritesa", 0 ) // 1bpp sprite mask data + ROM_LOAD32_WORD( "ddpdoj_mapl0.u13", 0x00000000, 0x800000, CRC(bcfbb0fc) SHA1(9ec478eba9905913cf997bd9b46c70c1ad383630) ) + ROM_LOAD32_WORD( "ddpdoj_maph0.u15", 0x00000002, 0x800000, CRC(0cc75d4e) SHA1(6d1b5ef0fdebf1e84fa199b939ffa07b810b12c9) ) - ROM_REGION( 0x2000000, "spritesb", 0 ) // sprite colour data - ROM_LOAD32_WORD( "ddpdoj_spa0.u9", 0x00000000, 0x1000000, CRC(1232c1b4) SHA1(ecc1c549ae19d2f052a85fe4a993608aedf49a25) ) - ROM_LOAD32_WORD( "ddpdoj_spb0.u18", 0x00000002, 0x1000000, CRC(6a9e2cbf) SHA1(8e0a4ea90f5ef534820303d62f0873f8ac9f080e) ) + ROM_REGION( 0x2000000, "spritesb", 0 ) // sprite colour data + ROM_LOAD32_WORD( "ddpdoj_spa0.u9", 0x00000000, 0x1000000, CRC(1232c1b4) SHA1(ecc1c549ae19d2f052a85fe4a993608aedf49a25) ) + ROM_LOAD32_WORD( "ddpdoj_spb0.u18", 0x00000002, 0x1000000, CRC(6a9e2cbf) SHA1(8e0a4ea90f5ef534820303d62f0873f8ac9f080e) ) - ROM_REGION( 0x1000000, "ymz770", ROMREGION_ERASEFF ) /* ymz770 */ - ROM_LOAD16_WORD_SWAP( "ddpdoj_wave0.u12", 0x00000000, 0x1000000, CRC(2b71a324) SHA1(f69076cc561f40ca564d804bc7bd455066f8d77c) ) + ROM_REGION( 0x1000000, "ymz770", ROMREGION_ERASEFF ) /* ymz770 */ + ROM_LOAD16_WORD_SWAP( "ddpdoj_wave0.u12", 0x00000000, 0x1000000, CRC(2b71a324) SHA1(f69076cc561f40ca564d804bc7bd455066f8d77c) ) ROM_END ROM_START( kov3 ) - ROM_REGION( 0x04000, "maincpu", 0 ) - ROM_LOAD( "kov3_igs036.rom", 0x00000000, 0x0004000, NO_DUMP ) + ROM_REGION( 0x04000, "maincpu", 0 ) + ROM_LOAD( "kov3_igs036.rom", 0x00000000, 0x0004000, NO_DUMP ) - ROM_REGION( 0x800000, "user1", 0 ) /* custom ROM module instead of regular ROMs, this might be incorrect - same module is used on newer gambling boards */ + ROM_REGION( 0x800000, "user1", 0 ) /* custom ROM module instead of regular ROMs, this might be incorrect - same module is used on newer gambling boards */ // this was an attempt to read the ROM module directly and could be bad - ROM_LOAD( "kov3_v102cn_direct.bin", 0x00000000, 0x0800000, CRC(2568cca4) SHA1(3f0e949bc0ae5d7ec0109f2748b30024dcd19ac4) ) + ROM_LOAD( "kov3_v102cn_direct.bin", 0x00000000, 0x0800000, CRC(2568cca4) SHA1(3f0e949bc0ae5d7ec0109f2748b30024dcd19ac4) ) // this was read with a logic analyser after booting, you can't however replace the module directly with this because some kind of // additional check / communication with the module is done on startup resulting in the internal ROM refusing to boot it ROM_LOAD( "kov3_v102cn.bin", 0x00000000, 0x0800000, CRC(1fcedff3) SHA1(522538510c5f94e8b1f641250c25a2a58962ca42) ) - ROM_REGION( 0x200000, "tiles", ROMREGION_ERASEFF ) - ROM_LOAD( "kov3_text.u1", 0x00000000, 0x0200000, CRC(198b52d6) SHA1(e4502abe7ba01053d16c02114f0c88a3f52f6f40) ) + ROM_REGION( 0x200000, "tiles", ROMREGION_ERASEFF ) + ROM_LOAD( "kov3_text.u1", 0x00000000, 0x0200000, CRC(198b52d6) SHA1(e4502abe7ba01053d16c02114f0c88a3f52f6f40) ) - ROM_REGION( 0x2000000, "bgtile", 0 ) - ROM_LOAD32_WORD( "kov3_bgl.u6", 0x00000000, 0x1000000, CRC(49a4c5bc) SHA1(26b7da91067bda196252520e9b4893361c2fc675) ) - ROM_LOAD32_WORD( "kov3_bgh.u7", 0x00000002, 0x1000000, CRC(adc1aff1) SHA1(b10490f0dbef9905cdb064168c529f0b5a2b28b8) ) + ROM_REGION( 0x2000000, "bgtile", 0 ) + ROM_LOAD32_WORD( "kov3_bgl.u6", 0x00000000, 0x1000000, CRC(49a4c5bc) SHA1(26b7da91067bda196252520e9b4893361c2fc675) ) + ROM_LOAD32_WORD( "kov3_bgh.u7", 0x00000002, 0x1000000, CRC(adc1aff1) SHA1(b10490f0dbef9905cdb064168c529f0b5a2b28b8) ) - ROM_REGION( 0x4000000, "spritesa", 0 ) // 1bpp sprite mask data - ROM_LOAD32_WORD( "kov3_mapl0.u15", 0x00000000, 0x2000000, CRC(9e569bf7) SHA1(03d26e000e9d8e744546be9649628d2130f2ec4c) ) - ROM_LOAD32_WORD( "kov3_maph0.u16", 0x00000002, 0x2000000, CRC(6f200ad8) SHA1(cd12c136d4f5d424bd7daeeacd5c4127beb3d565) ) + ROM_REGION( 0x4000000, "spritesa", 0 ) // 1bpp sprite mask data + ROM_LOAD32_WORD( "kov3_mapl0.u15", 0x00000000, 0x2000000, CRC(9e569bf7) SHA1(03d26e000e9d8e744546be9649628d2130f2ec4c) ) + ROM_LOAD32_WORD( "kov3_maph0.u16", 0x00000002, 0x2000000, CRC(6f200ad8) SHA1(cd12c136d4f5d424bd7daeeacd5c4127beb3d565) ) - ROM_REGION( 0x8000000, "spritesb", 0 ) // sprite colour data - ROM_LOAD32_WORD( "kov3_spa0.u17", 0x00000000, 0x4000000, CRC(3a1e58a9) SHA1(6ba251407c69ee62f7ea0baae91bc133acc70c6f) ) - ROM_LOAD32_WORD( "kov3_spb0.u10", 0x00000002, 0x4000000, CRC(90396065) SHA1(01bf9f69d77a792d5b39afbba70fbfa098e194f1) ) + ROM_REGION( 0x8000000, "spritesb", 0 ) // sprite colour data + ROM_LOAD32_WORD( "kov3_spa0.u17", 0x00000000, 0x4000000, CRC(3a1e58a9) SHA1(6ba251407c69ee62f7ea0baae91bc133acc70c6f) ) + ROM_LOAD32_WORD( "kov3_spb0.u10", 0x00000002, 0x4000000, CRC(90396065) SHA1(01bf9f69d77a792d5b39afbba70fbfa098e194f1) ) - ROM_REGION( 0x4000000, "ymz770", ROMREGION_ERASEFF ) /* ymz770 */ - ROM_LOAD16_WORD_SWAP( "kov3_wave0.u13", 0x00000000, 0x4000000, CRC(aa639152) SHA1(2314c6bd05524525a31a2a4668a36a938b924ba4) ) + ROM_REGION( 0x4000000, "ymz770", ROMREGION_ERASEFF ) /* ymz770 */ + ROM_LOAD16_WORD_SWAP( "kov3_wave0.u13", 0x00000000, 0x4000000, CRC(aa639152) SHA1(2314c6bd05524525a31a2a4668a36a938b924ba4) ) ROM_END #endif @@ -435,4 +435,3 @@ GAME( 2009, ddpdojh, 0, pgm2, pgm2, pgm2_state, ddpdojh, ROT27 GAME( 2009, kov3, 0, pgm2, pgm2, pgm2_state, kov3, ROT0, "IGS", "Knights of Valour 3 (V102, China)", GAME_IS_SKELETON ) #endif - diff --git a/src/mame/drivers/progolf.c b/src/mame/drivers/progolf.c index fcc5b755603..ae1cce42586 100644 --- a/src/mame/drivers/progolf.c +++ b/src/mame/drivers/progolf.c @@ -371,7 +371,7 @@ GFXDECODE_END static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/r2dtank.c b/src/mame/drivers/r2dtank.c index 391046d30f1..dc593b0fc53 100644 --- a/src/mame/drivers/r2dtank.c +++ b/src/mame/drivers/r2dtank.c @@ -395,7 +395,7 @@ WRITE_LINE_MEMBER(r2dtank_state::display_enable_changed) static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ begin_update, /* before pixel update callback */ update_row, /* row update callback */ diff --git a/src/mame/drivers/rgum.c b/src/mame/drivers/rgum.c index ff43e1a4194..dbe98ed73e3 100644 --- a/src/mame/drivers/rgum.c +++ b/src/mame/drivers/rgum.c @@ -231,7 +231,7 @@ GFXDECODE_END static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/sanremo.c b/src/mame/drivers/sanremo.c index ad268fefce9..7e84749ee8d 100644 --- a/src/mame/drivers/sanremo.c +++ b/src/mame/drivers/sanremo.c @@ -89,11 +89,11 @@ *******************************************************************************/ -#define MASTER_CLOCK XTAL_18MHz +#define MASTER_CLOCK XTAL_18MHz -#define CPU_CLOCK MASTER_CLOCK/3 -#define SND_CLOCK MASTER_CLOCK/12 -#define CRTC_CLOCK MASTER_CLOCK/12 +#define CPU_CLOCK MASTER_CLOCK/3 +#define SND_CLOCK MASTER_CLOCK/12 +#define CRTC_CLOCK MASTER_CLOCK/12 #include "emu.h" #include "cpu/z80/z80.h" @@ -187,13 +187,13 @@ WRITE8_MEMBER(sanremo_state::lamps_w) -x-- ---- BET x--- ---- (always on) */ - output_set_lamp_value(0, (data >> 0) & 1); /* DISCARD 1 */ - output_set_lamp_value(1, (data >> 1) & 1); /* DISCARD 2 */ - output_set_lamp_value(2, (data >> 2) & 1); /* DISCARD 3 */ - output_set_lamp_value(3, (data >> 3) & 1); /* DISCARD 4 */ - output_set_lamp_value(4, (data >> 4) & 1); /* DISCARD 5 */ - output_set_lamp_value(5, (data >> 5) & 1); /* START */ - output_set_lamp_value(6, (data >> 6) & 1); /* BET */ + output_set_lamp_value(0, (data >> 0) & 1); /* DISCARD 1 */ + output_set_lamp_value(1, (data >> 1) & 1); /* DISCARD 2 */ + output_set_lamp_value(2, (data >> 2) & 1); /* DISCARD 3 */ + output_set_lamp_value(3, (data >> 3) & 1); /* DISCARD 4 */ + output_set_lamp_value(4, (data >> 4) & 1); /* DISCARD 5 */ + output_set_lamp_value(5, (data >> 5) & 1); /* START */ + output_set_lamp_value(6, (data >> 6) & 1); /* BET */ } WRITE8_MEMBER(sanremo_state::banksel_w) @@ -214,8 +214,8 @@ WRITE8_MEMBER(sanremo_state::banksel_w) static ADDRESS_MAP_START( sanremo_map, AS_PROGRAM, 8, sanremo_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM - AM_RANGE(0x8000, 0x87ff) AM_RAM_WRITE(sanremo_videoram_w) AM_SHARE("videoram") // 2x 76C28 (1x accessed directly, latched bank written to other like subsino etc.) - AM_RANGE(0xc000, 0xc7ff) AM_RAM AM_SHARE("nvram") // battery backed UM6116 + AM_RANGE(0x8000, 0x87ff) AM_RAM_WRITE(sanremo_videoram_w) AM_SHARE("videoram") // 2x 76C28 (1x accessed directly, latched bank written to other like subsino etc.) + AM_RANGE(0xc000, 0xc7ff) AM_RAM AM_SHARE("nvram") // battery backed UM6116 ADDRESS_MAP_END static ADDRESS_MAP_START( sanremo_portmap, AS_IO, 8, sanremo_state ) @@ -255,49 +255,49 @@ ADDRESS_MAP_END *********************************************/ static INPUT_PORTS_START( number1 ) - PORT_START("IN0") // from I/O port 01h. - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN1-1") PORT_CODE(KEYCODE_A) + PORT_START("IN0") // from I/O port 01h. + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN1-1") PORT_CODE(KEYCODE_A) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN1-4") PORT_CODE(KEYCODE_S) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN1-5") PORT_CODE(KEYCODE_D) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN1-6") PORT_CODE(KEYCODE_F) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN1-4") PORT_CODE(KEYCODE_S) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN1-5") PORT_CODE(KEYCODE_D) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN1-6") PORT_CODE(KEYCODE_F) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN1-8") PORT_CODE(KEYCODE_G) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN1-8") PORT_CODE(KEYCODE_G) - PORT_START("IN1") // from I/O port 02h. + PORT_START("IN1") // from I/O port 02h. PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start") PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_NAME("Discard 2 / Basso (Low) / Left Card") PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("Discard 4 / Alto (High) / Right Card") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-5") PORT_CODE(KEYCODE_H) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-5") PORT_CODE(KEYCODE_H) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("Discard 3") PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("Discard 5") PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Discard 1") - PORT_START("DSW") // from AY-8910 por A. - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW:1") + PORT_START("DSW") // from AY-8910 por A. + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW:1") PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW:2") + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW:2") PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW:3") + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW:3") PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW:4") + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW:4") PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x00, "Auto Hold" ) PORT_DIPLOCATION("DSW:5") + PORT_DIPNAME( 0x10, 0x00, "Auto Hold" ) PORT_DIPLOCATION("DSW:5") PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW:6") + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW:6") PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x00, "Test Mode" ) PORT_DIPLOCATION("DSW:7") + PORT_DIPNAME( 0x40, 0x00, "Test Mode" ) PORT_DIPLOCATION("DSW:7") PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x40, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW:8") + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW:8") PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -344,7 +344,7 @@ static const mc6845_interface mc6845_intf = */ { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ @@ -413,21 +413,21 @@ MACHINE_CONFIG_END ROM_START( number1 ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "no_g0.ic26", 0x0000, 0x8000, CRC(2d83646f) SHA1(d1fafcce44ed3ec3dd53d84338c42244ebfca820) ) + ROM_LOAD( "no_g0.ic26", 0x0000, 0x8000, CRC(2d83646f) SHA1(d1fafcce44ed3ec3dd53d84338c42244ebfca820) ) ROM_REGION( 0x40000, "gfx", 0 ) - ROM_LOAD( "no_i4.ic30", 0x00000, 0x10000, CRC(55b351a4) SHA1(b0c8a30dde076520234281da051f21f1b7cb3166) ) // I - ROM_LOAD( "no_b4.ic27", 0x10000, 0x10000, CRC(e48b1c8a) SHA1(88f60268fd43c06e146d936a1bdc078c44e2a213) ) // B - ROM_LOAD( "no_g4.ic28", 0x20000, 0x10000, CRC(4eea9a9b) SHA1(c86c083ccf08c3c310028920f9a0fe809fd7ccbe) ) // G - ROM_LOAD( "no_r4.ic29", 0x30000, 0x10000, CRC(ab08cdaf) SHA1(e0518403039b6bada79ffe4c6bc22fbb64d16e43) ) // R + ROM_LOAD( "no_i4.ic30", 0x00000, 0x10000, CRC(55b351a4) SHA1(b0c8a30dde076520234281da051f21f1b7cb3166) ) // I + ROM_LOAD( "no_b4.ic27", 0x10000, 0x10000, CRC(e48b1c8a) SHA1(88f60268fd43c06e146d936a1bdc078c44e2a213) ) // B + ROM_LOAD( "no_g4.ic28", 0x20000, 0x10000, CRC(4eea9a9b) SHA1(c86c083ccf08c3c310028920f9a0fe809fd7ccbe) ) // G + ROM_LOAD( "no_r4.ic29", 0x30000, 0x10000, CRC(ab08cdaf) SHA1(e0518403039b6bada79ffe4c6bc22fbb64d16e43) ) // R ROM_REGION( 0x0800, "nvram", 0 ) /* default NVRAM */ ROM_LOAD( "number1_nvram.bin", 0x0000, 0x0800, CRC(4ece7b39) SHA1(49815571d75a39ab67d26691f902dfbd4e05feb4) ) ROM_REGION( 0x0600, "plds", 0 ) - ROM_LOAD( "palce1.bin", 0x0000, 0x0104, NO_DUMP ) /* PALCE is read protected */ - ROM_LOAD( "palce2.bin", 0x0200, 0x0104, NO_DUMP ) /* PALCE is read protected */ - ROM_LOAD( "palce3.bin", 0x0400, 0x0104, NO_DUMP ) /* PALCE is read protected */ + ROM_LOAD( "palce1.bin", 0x0000, 0x0104, NO_DUMP ) /* PALCE is read protected */ + ROM_LOAD( "palce2.bin", 0x0200, 0x0104, NO_DUMP ) /* PALCE is read protected */ + ROM_LOAD( "palce3.bin", 0x0400, 0x0104, NO_DUMP ) /* PALCE is read protected */ ROM_END diff --git a/src/mame/drivers/skeetsht.c b/src/mame/drivers/skeetsht.c index 483cfa8cd25..c99d4c87460 100644 --- a/src/mame/drivers/skeetsht.c +++ b/src/mame/drivers/skeetsht.c @@ -2,8 +2,8 @@ Dynamo Skeet Shot - Notes: - Pop Shot is a prototype sequal (or upgrade) to Skeet Shot + Notes: + Pop Shot is a prototype sequal (or upgrade) to Skeet Shot ***************************************************************************/ diff --git a/src/mame/drivers/slotcarn.c b/src/mame/drivers/slotcarn.c index d1f9af092de..f76d7f1bc27 100644 --- a/src/mame/drivers/slotcarn.c +++ b/src/mame/drivers/slotcarn.c @@ -169,7 +169,7 @@ WRITE_LINE_MEMBER(slotcarn_state::vsync_changed) static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ begin_update, /* before pixel update callback */ update_row, /* row update callback */ diff --git a/src/mame/drivers/snk6502.c b/src/mame/drivers/snk6502.c index 32ee777d41f..0632cccdefa 100644 --- a/src/mame/drivers/snk6502.c +++ b/src/mame/drivers/snk6502.c @@ -758,7 +758,7 @@ INTERRUPT_GEN_MEMBER(snk6502_state::snk6502_interrupt) static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/spbactn.c b/src/mame/drivers/spbactn.c index c823e93995d..26d6c538f28 100644 --- a/src/mame/drivers/spbactn.c +++ b/src/mame/drivers/spbactn.c @@ -212,7 +212,7 @@ static ADDRESS_MAP_START( spbactnp_map, AS_PROGRAM, 16, spbactn_state ) AM_RANGE(0x90124, 0x90125) AM_WRITE( spbatnp_90124_w ) // bg scroll AM_RANGE(0x9012c, 0x9012d) AM_WRITE( spbatnp_9012c_w ) // bg scroll - + AM_RANGE(0x90000, 0x900ff) AM_READ(temp_read_handler_r) // temp @@ -461,7 +461,7 @@ static MACHINE_CONFIG_START( spbactnp, spbactn_state ) MCFG_CPU_ADD("extracpu", Z80, XTAL_4MHz) MCFG_CPU_PROGRAM_MAP(spbactnp_extra_map) MCFG_CPU_VBLANK_INT_DRIVER("screen", spbactn_state, irq0_line_hold) -// MCFG_CPU_VBLANK_INT_DRIVER("screen", spbactn_state, nmi_line_pulse) +// MCFG_CPU_VBLANK_INT_DRIVER("screen", spbactn_state, nmi_line_pulse) /* video hardware */ @@ -552,7 +552,7 @@ ROM_START( spbactnp ) ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "spa.17g", 0x00000, 0x10000, CRC(445fc2c5) SHA1(c0e40496cfcaa0a8c90fb05111fadee74582f91a) ) - + ROM_REGION( 0x40000, "oki", 0 ) ROM_LOAD( "spa_data_2-21-a10.8e", 0x00000, 0x20000, CRC(87427d7d) SHA1(f76b0dc3f0d87deb0f0c81084aff9756b236e867) ) // same as regular @@ -573,7 +573,7 @@ ROM_START( spbactnp ) ROM_REGION( 0x10000, "extracpu", 0 ) // what? it's annother z80 rom... unused for now ROM_LOAD( "6204_6-6.29c", 0x00000, 0x10000, CRC(e8250c26) SHA1(9b669878790c8e3c5d80f165b5ffa1d6830f4696) ) - ROM_REGION( 0x080000, "gfx4", 0 ) /* 8x8 BG Tiles */ // more 8x8 tiles, with the girl graphics? unused for now .. for horizontal orientation?? + ROM_REGION( 0x080000, "gfx4", 0 ) /* 8x8 BG Tiles */ // more 8x8 tiles, with the girl graphics? unused for now .. for horizontal orientation?? ROM_LOAD( "spa.25c", 0x00000, 0x20000, CRC(02b69ab9) SHA1(368e774693a6fab756faaeec4ffd42406816e6e2) ) ROM_REGION( 0x10000, "misc", 0 ) //misc diff --git a/src/mame/drivers/speedatk.c b/src/mame/drivers/speedatk.c index 0209eff4437..65a9dbdb514 100644 --- a/src/mame/drivers/speedatk.c +++ b/src/mame/drivers/speedatk.c @@ -286,7 +286,7 @@ GFXDECODE_END static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/spiders.c b/src/mame/drivers/spiders.c index 6dff19d1a22..b3115659faf 100644 --- a/src/mame/drivers/spiders.c +++ b/src/mame/drivers/spiders.c @@ -508,7 +508,7 @@ WRITE_LINE_MEMBER(spiders_state::display_enable_changed) static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ begin_update, /* before pixel update callback */ update_row, /* row update callback */ diff --git a/src/mame/drivers/supercrd.c b/src/mame/drivers/supercrd.c index ffc795a50d2..828c0c4c6af 100644 --- a/src/mame/drivers/supercrd.c +++ b/src/mame/drivers/supercrd.c @@ -402,7 +402,7 @@ GFXDECODE_END //static MC6845_INTERFACE( mc6845_intf ) //{ // "screen", /* screen we are acting on */ -// false, +// false, // 4, /* number of pixels per video memory address */ // NULL, /* before pixel update callback */ // NULL, /* row update callback */ diff --git a/src/mame/drivers/taitosj.c b/src/mame/drivers/taitosj.c index fb2b4d3d6ed..ac228b2b066 100644 --- a/src/mame/drivers/taitosj.c +++ b/src/mame/drivers/taitosj.c @@ -2749,7 +2749,7 @@ void taitosj_state::init_common() save_item(NAME(m_kikstart_gears)); save_item(NAME(m_dac_out)); save_item(NAME(m_dac_vol)); - + machine().add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(FUNC(taitosj_state::reset_common), this)); } diff --git a/src/mame/drivers/taitotz.c b/src/mame/drivers/taitotz.c index 37fba119d81..5b94e295443 100644 --- a/src/mame/drivers/taitotz.c +++ b/src/mame/drivers/taitotz.c @@ -619,42 +619,42 @@ public: /* static void taitotz_exit(running_machine &machine) { - - taitotz_state *state = machine.driver_data(); - - FILE *file; - int i; - - file = fopen("screen_ram.bin","wb"); - for (i=0; i < 0x200000; i++) - { - fputc((UINT8)(state->m_screen_ram[i] >> 24), file); - fputc((UINT8)(state->m_screen_ram[i] >> 16), file); - fputc((UINT8)(state->m_screen_ram[i] >> 8), file); - fputc((UINT8)(state->m_screen_ram[i] >> 0), file); - } - fclose(file); - file = fopen("frame_ram.bin","wb"); - for (i=0; i < 0x80000; i++) - { - fputc((UINT8)(state->m_frame_ram[i] >> 24), file); - fputc((UINT8)(state->m_frame_ram[i] >> 16), file); - fputc((UINT8)(state->m_frame_ram[i] >> 8), file); - fputc((UINT8)(state->m_frame_ram[i] >> 0), file); - } - fclose(file); + taitotz_state *state = machine.driver_data(); + + FILE *file; + int i; + + file = fopen("screen_ram.bin","wb"); + for (i=0; i < 0x200000; i++) + { + fputc((UINT8)(state->m_screen_ram[i] >> 24), file); + fputc((UINT8)(state->m_screen_ram[i] >> 16), file); + fputc((UINT8)(state->m_screen_ram[i] >> 8), file); + fputc((UINT8)(state->m_screen_ram[i] >> 0), file); + } + fclose(file); + + file = fopen("frame_ram.bin","wb"); + for (i=0; i < 0x80000; i++) + { + fputc((UINT8)(state->m_frame_ram[i] >> 24), file); + fputc((UINT8)(state->m_frame_ram[i] >> 16), file); + fputc((UINT8)(state->m_frame_ram[i] >> 8), file); + fputc((UINT8)(state->m_frame_ram[i] >> 0), file); + } + fclose(file); + + file = fopen("texture_ram.bin","wb"); + for (i=0; i < 0x800000; i++) + { + fputc((UINT8)(state->m_texture_ram[i] >> 24), file); + fputc((UINT8)(state->m_texture_ram[i] >> 16), file); + fputc((UINT8)(state->m_texture_ram[i] >> 8), file); + fputc((UINT8)(state->m_texture_ram[i] >> 0), file); + } + fclose(file); - file = fopen("texture_ram.bin","wb"); - for (i=0; i < 0x800000; i++) - { - fputc((UINT8)(state->m_texture_ram[i] >> 24), file); - fputc((UINT8)(state->m_texture_ram[i] >> 16), file); - fputc((UINT8)(state->m_texture_ram[i] >> 8), file); - fputc((UINT8)(state->m_texture_ram[i] >> 0), file); - } - fclose(file); - } */ void taitotz_state::video_start() diff --git a/src/mame/drivers/tapatune.c b/src/mame/drivers/tapatune.c index 8408ac9761c..6af31e0b761 100644 --- a/src/mame/drivers/tapatune.c +++ b/src/mame/drivers/tapatune.c @@ -362,7 +362,7 @@ WRITE_LINE_MEMBER(tapatune_state::crtc_vsync) static MC6845_INTERFACE( h46505_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 5, /* number of pixels per video memory address */ begin_update,/* before pixel update callback */ update_row, /* row update callback */ diff --git a/src/mame/drivers/tmspoker.c b/src/mame/drivers/tmspoker.c index 2ac3698daef..6954f084d67 100644 --- a/src/mame/drivers/tmspoker.c +++ b/src/mame/drivers/tmspoker.c @@ -547,7 +547,7 @@ GFXDECODE_END static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/tp84.c b/src/mame/drivers/tp84.c index 4d291b6df38..0e998c6e262 100644 --- a/src/mame/drivers/tp84.c +++ b/src/mame/drivers/tp84.c @@ -104,7 +104,7 @@ WRITE8_MEMBER(tp84_state::tp84_filter_w) C = 0; if (offset & 0x020) C += 47000; /* 47000pF = 0.047uF */ if (offset & 0x040) C += 470000; /* 470000pF = 0.47uF */ - // dynamic_cast(machine().device("filter2"))->filter_rc_set_RC(,1000,2200,1000,C); + // dynamic_cast(machine().device("filter2"))->filter_rc_set_RC(,1000,2200,1000,C); /* 76489 #2 */ C = 0; diff --git a/src/mame/drivers/truco.c b/src/mame/drivers/truco.c index 6f0b25234c2..18e17f12d52 100644 --- a/src/mame/drivers/truco.c +++ b/src/mame/drivers/truco.c @@ -435,7 +435,7 @@ static const pia6821_interface pia0_intf = static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 4, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/usgames.c b/src/mame/drivers/usgames.c index d52f97a8f23..e93f1879e39 100644 --- a/src/mame/drivers/usgames.c +++ b/src/mame/drivers/usgames.c @@ -217,7 +217,7 @@ GFXDECODE_END static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/vastar.c b/src/mame/drivers/vastar.c index f34f0676a28..aa7cd3cc41e 100644 --- a/src/mame/drivers/vastar.c +++ b/src/mame/drivers/vastar.c @@ -548,7 +548,7 @@ ROM_START( vastar3 ) ROM_REGION( 0x10000, "sub", 0 ) /* 64k for the second CPU */ ROM_LOAD( "vst_0.2f", 0x0000, 0x1000, CRC(713478d8) SHA1(9cbd1fb689d93a8964f48e59d4effaa4878b2945) ) - ROM_LOAD( "vst_1.2j", 0x1000, 0x1000, CRC(e4535442) SHA1(280d93bec5cf6183250827ce70ed5ddff968bba5) ) + ROM_LOAD( "vst_1.2j", 0x1000, 0x1000, CRC(e4535442) SHA1(280d93bec5cf6183250827ce70ed5ddff968bba5) ) ROM_REGION( 0x2000, "gfx1", 0 ) ROM_LOAD( "c_c9.rom", 0x0000, 0x2000, CRC(34f067b6) SHA1(45d7f8be5bd1dc9e5e511aa2e99c216c5ff12273) ) diff --git a/src/mame/drivers/vcombat.c b/src/mame/drivers/vcombat.c index 1c926526f7a..443e7eb3507 100644 --- a/src/mame/drivers/vcombat.c +++ b/src/mame/drivers/vcombat.c @@ -569,7 +569,7 @@ WRITE_LINE_MEMBER(vcombat_state::sound_update) static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 16, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/drivers/vlc.c b/src/mame/drivers/vlc.c index 71030cc16a9..ab33524fa7e 100644 --- a/src/mame/drivers/vlc.c +++ b/src/mame/drivers/vlc.c @@ -217,9 +217,9 @@ static const UINT8 pal35[256] = { static MC6845_INTERFACE( mc6845_intf ) { - "screen", /* screen we are acting on */ - false, /* show border area */ - 8, /* number of pixels per video memory address */ + "screen", /* screen we are acting on */ + false, /* show border area */ + 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ NULL, /* after pixel update callback */ diff --git a/src/mame/drivers/whitestar.c b/src/mame/drivers/whitestar.c index 9c21e71f695..799b9bd5a27 100644 --- a/src/mame/drivers/whitestar.c +++ b/src/mame/drivers/whitestar.c @@ -247,7 +247,7 @@ MC6845_UPDATE_ROW( whitestar_update_row ) static MC6845_INTERFACE( whitestar_crtc6845_interface ) { NULL, - false, /* show border area */ + false, /* show border area */ 1, NULL, whitestar_update_row, diff --git a/src/mame/drivers/wwfsstar.c b/src/mame/drivers/wwfsstar.c index 994de49d59c..d306500305d 100644 --- a/src/mame/drivers/wwfsstar.c +++ b/src/mame/drivers/wwfsstar.c @@ -142,10 +142,10 @@ Notes: Offset WWFS47.BIN 24j6-0.112 (first 0x10000 bytes) -------------------------------------------------------- - 0xBB03 F8 F0 - 0xD9B1 0F 07 - 0xED63 4C 44 - 0xEE00 3B 33 + 0xBB03 F8 F0 + 0xD9B1 0F 07 + 0xED63 4C 44 + 0xEE00 3B 33 0xF8B8 F8 F0 *******************************************************************************/ diff --git a/src/mame/drivers/xexex.c b/src/mame/drivers/xexex.c index 93bc95236a8..192149b9699 100644 --- a/src/mame/drivers/xexex.c +++ b/src/mame/drivers/xexex.c @@ -462,7 +462,7 @@ void xexex_state::machine_start() m_k056832 = machine().device("k056832"); m_k054338 = machine().device("k054338"); m_k054539 = machine().device("k054539"); - m_filter1l = machine().device("filter1l"); + m_filter1l = machine().device("filter1l"); m_filter1r = machine().device("filter1r"); m_filter2l = machine().device("filter2l"); m_filter2r = machine().device("filter2r"); diff --git a/src/mame/drivers/xtheball.c b/src/mame/drivers/xtheball.c index e7c172902de..48c72577f80 100644 --- a/src/mame/drivers/xtheball.c +++ b/src/mame/drivers/xtheball.c @@ -19,11 +19,11 @@ class xtheball_state : public driver_device public: xtheball_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , - m_tlc34076(*this, "tlc34076"), - m_vram_bg(*this, "vrabg"), - m_vram_fg(*this, "vrafg"), - m_analog_x(*this, "ANALOGX"), - m_analog_y(*this, "ANALOGY") + m_tlc34076(*this, "tlc34076"), + m_vram_bg(*this, "vrabg"), + m_vram_fg(*this, "vrafg"), + m_analog_x(*this, "ANALOGX"), + m_analog_y(*this, "ANALOGY") { } required_device m_tlc34076; diff --git a/src/mame/drivers/zn.c b/src/mame/drivers/zn.c index 95f8becad11..31acbbb6d1d 100644 --- a/src/mame/drivers/zn.c +++ b/src/mame/drivers/zn.c @@ -2890,7 +2890,7 @@ ROM_START( sfexa ) CPZN1_BIOS ROM_REGION32_LE( 0x80000, "user3", 0 ) - ROM_LOAD( "sfea_04a.2h", 0x0000000, 0x080000, CRC(08247bd4) SHA1(07f356ef2827b3fbd0bfaf2010915315d9d60ef1) ) // could be sfea_04.2h + ROM_LOAD( "sfea_04a.2h", 0x0000000, 0x080000, CRC(08247bd4) SHA1(07f356ef2827b3fbd0bfaf2010915315d9d60ef1) ) // could be sfea_04.2h ROM_REGION32_LE( 0x2400000, "user2", 0 ) ROM_LOAD( "sfe-05m.3h", 0x0000000, 0x400000, CRC(eab781fe) SHA1(205476cb72c8dac915e140fb32243dfc5d209ba4) ) diff --git a/src/mame/includes/20pacgal.h b/src/mame/includes/20pacgal.h index 5e1f5143da0..29b5cefdde7 100644 --- a/src/mame/includes/20pacgal.h +++ b/src/mame/includes/20pacgal.h @@ -63,8 +63,8 @@ public: void draw_chars(bitmap_rgb32 &bitmap); void draw_stars(bitmap_rgb32 &bitmap, const rectangle &cliprect ); void draw_sprite(bitmap_rgb32 &bitmap, int y, int x, - UINT8 code, UINT8 color, int flip_y, int flip_x); - + UINT8 code, UINT8 color, int flip_y, int flip_x); + }; diff --git a/src/mame/includes/4enraya.h b/src/mame/includes/4enraya.h index 049582e02e8..a840ef6954b 100644 --- a/src/mame/includes/4enraya.h +++ b/src/mame/includes/4enraya.h @@ -15,7 +15,7 @@ public: m_snd_latch_bit(4) { } - + required_device m_ay; /* memory pointers */ diff --git a/src/mame/includes/8080bw.h b/src/mame/includes/8080bw.h index bf098f8fe4e..e02bc004aa3 100644 --- a/src/mame/includes/8080bw.h +++ b/src/mame/includes/8080bw.h @@ -131,7 +131,7 @@ public: DECLARE_WRITE8_MEMBER(polaris_sh_port_1_w); DECLARE_WRITE8_MEMBER(polaris_sh_port_2_w); DECLARE_WRITE8_MEMBER(polaris_sh_port_3_w); - + void schaser_reinit_555_time_remain(); void invadpt2_get_pens( pen_t *pens ); void sflush_get_pens( pen_t *pens ); diff --git a/src/mame/includes/alpha68k.h b/src/mame/includes/alpha68k.h index 44460b650cc..48a9041c336 100644 --- a/src/mame/includes/alpha68k.h +++ b/src/mame/includes/alpha68k.h @@ -123,5 +123,3 @@ enum ALPHA68K_JONGBOU, // used in kyros_alpha_trigger_r & kyros_draw_sprites ALPHA68K_KYROS // used in kyros_draw_sprites }; - - diff --git a/src/mame/includes/amiga.h b/src/mame/includes/amiga.h index 2d9e5b748cd..77e7735d58b 100644 --- a/src/mame/includes/amiga.h +++ b/src/mame/includes/amiga.h @@ -410,7 +410,7 @@ public: optional_ioport m_p2joy_port; optional_memory_bank m_bank1; - + const amiga_machine_interface *m_intf; autoconfig_device *m_autoconfig_list; diff --git a/src/mame/includes/armedf.h b/src/mame/includes/armedf.h index 066e0e17f18..52bc259962e 100644 --- a/src/mame/includes/armedf.h +++ b/src/mame/includes/armedf.h @@ -84,7 +84,7 @@ public: void armedf_drawgfx(bitmap_ind16 &dest_bmp,const rectangle &clip,gfx_element *gfx, UINT32 code,UINT32 color, UINT32 clut,int flipx,int flipy,int offsx,int offsy, int transparent_color); - + }; class bigfghtr_state : public armedf_state diff --git a/src/mame/includes/btime.h b/src/mame/includes/btime.h index e0659320301..23b66a3dcf8 100644 --- a/src/mame/includes/btime.h +++ b/src/mame/includes/btime.h @@ -121,5 +121,5 @@ public: void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, UINT8 color, UINT8 sprite_y_adjust, UINT8 sprite_y_adjust_flip_screen, UINT8 *sprite_ram, offs_t interleave ); - + }; diff --git a/src/mame/includes/carpolo.h b/src/mame/includes/carpolo.h index eb1215b860f..4b95ae40e03 100644 --- a/src/mame/includes/carpolo.h +++ b/src/mame/includes/carpolo.h @@ -98,7 +98,7 @@ public: int check_sprite_sprite_collision(int x1, int y1, int code1, int flipy1, int x2, int y2, int code2, int flipy2, int *col_x, int *col_y); - + }; diff --git a/src/mame/includes/cps3.h b/src/mame/includes/cps3.h index 7b3e2258c62..9a846ec4260 100644 --- a/src/mame/includes/cps3.h +++ b/src/mame/includes/cps3.h @@ -127,7 +127,7 @@ public: unsigned int code,unsigned int color,int flipx,int flipy,int sx,int sy, int transparency,int transparent_color, int scalex, int scaley,bitmap_ind8 *pri_buffer,UINT32 pri_mask); - + }; diff --git a/src/mame/includes/deco32.h b/src/mame/includes/deco32.h index 1ea6df6fae8..fca13a018c5 100644 --- a/src/mame/includes/deco32.h +++ b/src/mame/includes/deco32.h @@ -151,7 +151,7 @@ public: DECLARE_VIDEO_START(lockload); UINT32 screen_update_dragngun(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void screen_eof_dragngun(screen_device &screen, bool state); - void dragngun_draw_sprites( bitmap_rgb32 &bitmap, const rectangle &cliprect, const UINT32 *spritedata); + void dragngun_draw_sprites( bitmap_rgb32 &bitmap, const rectangle &cliprect, const UINT32 *spritedata); }; /*----------- defined in video/deco32.c -----------*/ diff --git a/src/mame/includes/eolith.h b/src/mame/includes/eolith.h index 17ce9f6db73..2042f04c61a 100644 --- a/src/mame/includes/eolith.h +++ b/src/mame/includes/eolith.h @@ -35,7 +35,7 @@ public: optional_ioport m_penx2port; optional_ioport m_peny2port; optional_memory_bank m_sndbank; - + DECLARE_READ32_MEMBER(eolith_custom_r); DECLARE_WRITE32_MEMBER(systemcontrol_w); diff --git a/src/mame/includes/galaga.h b/src/mame/includes/galaga.h index 0b64315d2a5..000a39011d7 100644 --- a/src/mame/includes/galaga.h +++ b/src/mame/includes/galaga.h @@ -116,7 +116,7 @@ public: DECLARE_WRITE8_MEMBER( xevious_vh_latch_w ); DECLARE_WRITE8_MEMBER( xevious_bs_w ); DECLARE_READ8_MEMBER( xevious_bb_r ); - + // Custom I/O void battles_customio_init(); @@ -132,7 +132,7 @@ public: DECLARE_WRITE8_MEMBER( battles_customio_data3_w ); DECLARE_WRITE8_MEMBER( battles_CPU4_coin_w ); DECLARE_WRITE8_MEMBER( battles_noise_sound_w ); - + UINT8 m_customio[16]; char m_battles_customio_command; char m_battles_customio_prev_command; @@ -170,11 +170,11 @@ public: DECLARE_PALETTE_INIT(bosco); UINT32 screen_update_bosco(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_bosco(screen_device &screen, bool state); - + inline void get_tile_info_bosco(tile_data &tileinfo,int tile_index,int ram_offs); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_bullets(bitmap_ind16 &bitmap, const rectangle &cliprect); - void draw_stars(bitmap_ind16 &bitmap, const rectangle &cliprect, int flip); + void draw_stars(bitmap_ind16 &bitmap, const rectangle &cliprect, int flip); DECLARE_WRITE8_MEMBER( bosco_videoram_w ); DECLARE_WRITE8_MEMBER( bosco_scrollx_w ); DECLARE_WRITE8_MEMBER( bosco_scrolly_w ); @@ -207,7 +207,7 @@ public: UINT32 screen_update_digdug(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE8_MEMBER( digdug_videoram_w ); - DECLARE_WRITE8_MEMBER( digdug_PORT_w ); + DECLARE_WRITE8_MEMBER( digdug_PORT_w ); }; /*----------- defined in audio/galaga.c -----------*/ diff --git a/src/mame/includes/galaxian.h b/src/mame/includes/galaxian.h index f45881c5e8d..a37d0daba4d 100644 --- a/src/mame/includes/galaxian.h +++ b/src/mame/includes/galaxian.h @@ -64,18 +64,18 @@ public: int m_tenspot_current_game; UINT8 m_frogger_adjust; UINT8 m_sfx_tilemap; - + /* video extension callbacks */ typedef void (galaxian_state::*galaxian_extend_tile_info_func)(UINT16 *code, UINT8 *color, UINT8 attrib, UINT8 x); typedef void (galaxian_state::*galaxian_extend_sprite_info_func)(const UINT8 *base, UINT8 *sx, UINT8 *sy, UINT8 *flipx, UINT8 *flipy, UINT16 *code, UINT8 *color); typedef void (galaxian_state::*galaxian_draw_bullet_func)(bitmap_rgb32 &bitmap, const rectangle &cliprect, int offs, int x, int y); typedef void (galaxian_state::*galaxian_draw_background_func)(bitmap_rgb32 &bitmap, const rectangle &cliprect); - + galaxian_extend_tile_info_func m_extend_tile_info_ptr; galaxian_extend_sprite_info_func m_extend_sprite_info_ptr; galaxian_draw_bullet_func m_draw_bullet_ptr; galaxian_draw_background_func m_draw_background_ptr; - + tilemap_t *m_bg_tilemap; UINT8 m_flipscreen_x; UINT8 m_flipscreen_y; diff --git a/src/mame/includes/itech32.h b/src/mame/includes/itech32.h index 125379b8485..ad8f11ba454 100644 --- a/src/mame/includes/itech32.h +++ b/src/mame/includes/itech32.h @@ -184,4 +184,3 @@ public: void install_timekeeper(); void init_gt_common(); }; - diff --git a/src/mame/includes/itech8.h b/src/mame/includes/itech8.h index e182d543e7b..a6c4dab6ebd 100644 --- a/src/mame/includes/itech8.h +++ b/src/mame/includes/itech8.h @@ -18,7 +18,7 @@ public: m_tlc34076(*this, "tlc34076"), m_visarea(0, 0, 0, 0){ } - required_device m_tlc34076; + required_device m_tlc34076; rectangle m_visarea; UINT8 m_grom_bank; diff --git a/src/mame/includes/ladybug.h b/src/mame/includes/ladybug.h index 251c67114b4..57294ee6080 100644 --- a/src/mame/includes/ladybug.h +++ b/src/mame/includes/ladybug.h @@ -96,7 +96,7 @@ public: void redclash_set_stars_enable(UINT8 on); void redclash_update_stars_state(); void redclash_set_stars_speed(UINT8 speed); - void redclash_draw_stars(bitmap_ind16 &bitmap, const rectangle &cliprect, UINT8 palette_offset, UINT8 sraider, UINT8 firstx, UINT8 lastx); + void redclash_draw_stars(bitmap_ind16 &bitmap, const rectangle &cliprect, UINT8 palette_offset, UINT8 sraider, UINT8 firstx, UINT8 lastx); void redclash_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); void redclash_draw_bullets( bitmap_ind16 &bitmap, const rectangle &cliprect ); }; diff --git a/src/mame/includes/n64.h b/src/mame/includes/n64.h index fbcdec359fc..8651c5b3069 100644 --- a/src/mame/includes/n64.h +++ b/src/mame/includes/n64.h @@ -24,7 +24,7 @@ public: virtual void machine_reset(); virtual void video_start(); void n64_machine_stop(); - + UINT32 screen_update_n64(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); }; diff --git a/src/mame/includes/stv.h b/src/mame/includes/stv.h index 9c0e5e24e9c..ff2db978995 100644 --- a/src/mame/includes/stv.h +++ b/src/mame/includes/stv.h @@ -297,7 +297,7 @@ public: void drawpixel_4bpp_trans(int x, int y, int patterndata, int offsetcnt); void drawpixel_generic(int x, int y, int patterndata, int offsetcnt); void vdp1_fill_slope(const rectangle &cliprect, int patterndata, int xsize, - INT32 x1, INT32 x2, INT32 sl1, INT32 sl2, INT32 *nx1, INT32 *nx2, + INT32 x1, INT32 x2, INT32 sl1, INT32 sl2, INT32 *nx1, INT32 *nx2, INT32 u1, INT32 u2, INT32 slu1, INT32 slu2, INT32 *nu1, INT32 *nu2, INT32 v1, INT32 v2, INT32 slv1, INT32 slv2, INT32 *nv1, INT32 *nv2, INT32 _y1, INT32 y2); @@ -390,7 +390,7 @@ public: void stv_vdp2_draw_basic_bitmap(bitmap_rgb32 &bitmap, const rectangle &cliprect); void draw_4bpp_bitmap(bitmap_rgb32 &bitmap, const rectangle &cliprect); void draw_8bpp_bitmap(bitmap_rgb32 &bitmap, const rectangle &cliprect); -// void draw_11bpp_bitmap(bitmap_rgb32 &bitmap, const rectangle &cliprect); +// void draw_11bpp_bitmap(bitmap_rgb32 &bitmap, const rectangle &cliprect); void draw_rgb15_bitmap(bitmap_rgb32 &bitmap, const rectangle &cliprect); void draw_rgb32_bitmap(bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -714,4 +714,3 @@ public: #define IRQ_DMAILL 1 << 12 #define IRQ_VDP1_END 1 << 13 #define IRQ_ABUS 1 << 15 - diff --git a/src/mame/includes/tecmosys.h b/src/mame/includes/tecmosys.h index cbdfb0285db..f414870ff89 100644 --- a/src/mame/includes/tecmosys.h +++ b/src/mame/includes/tecmosys.h @@ -83,4 +83,3 @@ public: void tecmosys_prot_init(int which); void tecmosys_prot_reset(); }; - diff --git a/src/mame/machine/amiga.c b/src/mame/machine/amiga.c index 0a27656f4d2..45fcf71df66 100644 --- a/src/mame/machine/amiga.c +++ b/src/mame/machine/amiga.c @@ -1192,7 +1192,7 @@ READ16_HANDLER( amiga_custom_r ) case REG_JOY1DAT: if (state->m_intf->joy1dat_r != NULL) return (*state->m_intf->joy1dat_r)(space.machine()); - + if (state->m_joy1dat_port) return state->m_joy1dat_port->read(); else return 0xffff; diff --git a/src/mame/machine/chaknpop.c b/src/mame/machine/chaknpop.c index fc7f1771ae6..9e448061eee 100644 --- a/src/mame/machine/chaknpop.c +++ b/src/mame/machine/chaknpop.c @@ -47,7 +47,6 @@ static const UINT8 mcu_data[256] = { void chaknpop_state::mcu_update_seed( UINT8 data ) { - if (!(data & 0x80)) { m_mcu_seed += 0x83; diff --git a/src/mame/machine/megadriv.c b/src/mame/machine/megadriv.c index 90998e1252d..4ceeba6e41e 100644 --- a/src/mame/machine/megadriv.c +++ b/src/mame/machine/megadriv.c @@ -306,7 +306,7 @@ UINT8 megadrive_io_read_data_port_3button(running_machine &machine, int portnum) { UINT8 retdata, helper = (megadrive_io_ctrl_regs[portnum] & 0x7f) | 0x80; // bit 7 always comes from megadrive_io_data_regs static const char *const pad3names[] = { "PAD1", "PAD2", "IN0", "UNK" }; - + if (megadrive_io_data_regs[portnum] & 0x40) { /* here we read B, C & the directional buttons */ diff --git a/src/mame/machine/scudsp.c b/src/mame/machine/scudsp.c index 5aa197567ed..4a9c59097ac 100644 --- a/src/mame/machine/scudsp.c +++ b/src/mame/machine/scudsp.c @@ -66,17 +66,17 @@ Changelog: - Add control flags - Croc: has a bug somewhere that never allows it to trip the ENDI opcode. Snippet of interest is: - 08 00823500 CLR A MOV M0,PL - 09 08040000 OR MOV ALU,A - 0A D208000D JMP NZ,$D - 0B 00000000 NOP - 0C F8000000 ENDI + 08 00823500 CLR A MOV M0,PL + 09 08040000 OR MOV ALU,A + 0A D208000D JMP NZ,$D + 0B 00000000 NOP + 0C F8000000 ENDI ... - 40 00863502 MOV M0,A MOV M2,PL - 41 10003009 ADD MOV ALL,MC0 - 42 D3400042 JMP T0,$42 - 43 00000000 NOP - 44 D0000007 JMP $7 + 40 00863502 MOV M0,A MOV M2,PL + 41 10003009 ADD MOV ALL,MC0 + 42 D3400042 JMP T0,$42 + 43 00000000 NOP + 44 D0000007 JMP $7 ******************************************************************************************/ #include "emu.h" diff --git a/src/mame/machine/smpc.c b/src/mame/machine/smpc.c index c470aea7dda..5754bc72be8 100644 --- a/src/mame/machine/smpc.c +++ b/src/mame/machine/smpc.c @@ -226,7 +226,7 @@ static TIMER_CALLBACK( smpc_slave_enable ) state->m_smpc.OREG[31] = param + 0x02; //read-back for last command issued state->m_smpc.SF = 0x00; //clear hand-shake flag state->m_smpc.slave_on = param; -// printf("%d %d\n",machine.primary_screen->hpos(),machine.primary_screen->vpos()); +// printf("%d %d\n",machine.primary_screen->hpos(),machine.primary_screen->vpos()); } static TIMER_CALLBACK( smpc_sound_enable ) @@ -618,7 +618,7 @@ static TIMER_CALLBACK( smpc_nmi_set ) { saturn_state *state = machine.driver_data(); -// printf("%d %d\n",machine.primary_screen->hpos(),machine.primary_screen->vpos()); +// printf("%d %d\n",machine.primary_screen->hpos(),machine.primary_screen->vpos()); state->m_NMI_reset = param; /* put issued command in OREG31 */ state->m_smpc.OREG[31] = 0x19 + param; @@ -878,7 +878,7 @@ UINT8 saturn_state::smpc_th_control_mode(UINT8 pad_n) break; case 2: res = th<<6; - // 1 C B Right Left Down Up + // 1 C B Right Left Down Up res|= (((machine().root_device().ioport(padnames[pad_n])->read()>>4)) & 0x30); // C & B res|= (((machine().root_device().ioport(padnames[pad_n])->read()>>12)) & 0xf); break; diff --git a/src/mame/machine/snes7110.c b/src/mame/machine/snes7110.c index ad27cd0ac65..0aa5299f591 100644 --- a/src/mame/machine/snes7110.c +++ b/src/mame/machine/snes7110.c @@ -127,7 +127,7 @@ public: void init(running_machine &machine, UINT8 *ROM, UINT32 mode, UINT32 offset, UINT32 index); void reset(); - + UINT8 read(UINT8 *ROM); void write(UINT8 data); void mode0(UINT8 init, UINT8 *ROM); @@ -159,7 +159,7 @@ public: UINT32 m_morton16[2][256]; UINT32 m_morton32[4][256]; - + private: running_machine& m_machine; UINT32 m_rom_size; @@ -238,10 +238,10 @@ UINT8 SPC7110Decomp::read(UINT8 *ROM) { UINT8 data; - if (m_decomp_buffer_length == 0) + if (m_decomp_buffer_length == 0) { //decompress at least (SPC7110_DECOMP_BUFFER_SIZE / 2) bytes to the buffer - switch (m_decomp_mode) + switch (m_decomp_mode) { case 0: mode0(0, ROM); diff --git a/src/mame/machine/snessdd1.c b/src/mame/machine/snessdd1.c index 943c9c02e02..91608a857b8 100644 --- a/src/mame/machine/snessdd1.c +++ b/src/mame/machine/snessdd1.c @@ -485,7 +485,7 @@ SDD1emu::SDD1emu(running_machine &machine) m_BG6 = auto_alloc(machine, SDD1_BG(m_GCD, 6)); m_BG7 = auto_alloc(machine, SDD1_BG(m_GCD, 7)); m_PEM = auto_alloc(machine, SDD1_PEM(m_BG0, m_BG1, m_BG2, m_BG3, - m_BG4, m_BG5, m_BG6, m_BG7)); + m_BG4, m_BG5, m_BG6, m_BG7)); m_CM = auto_alloc(machine, SDD1_CM(m_PEM)); m_OL = auto_alloc(machine, SDD1_OL(m_CM)); } diff --git a/src/mame/machine/stvcd.c b/src/mame/machine/stvcd.c index f7f15be6bae..6ec36582670 100644 --- a/src/mame/machine/stvcd.c +++ b/src/mame/machine/stvcd.c @@ -103,10 +103,10 @@ void saturn_state::cd_exec_command( void ) UINT32 temp; if(cr1 != 0 && - ((cr1 & 0xff00) != 0x5100) && - ((cr1 & 0xff00) != 0x5200) && - ((cr1 & 0xff00) != 0x5300) && - 1) + ((cr1 & 0xff00) != 0x5100) && + ((cr1 & 0xff00) != 0x5200) && + ((cr1 & 0xff00) != 0x5300) && + 1) printf("CD: command exec %04x %04x %04x %04x %04x (stat %04x)\n", hirqreg, cr1, cr2, cr3, cr4, cd_stat); switch (cr1 & 0xff00) @@ -1222,8 +1222,8 @@ void saturn_state::cd_exec_command( void ) CDROM_LOG(("%s:CD: Verify copy protection\n", machine.describe_context())) if(((cd_stat & 0x0f00) != CD_STAT_NODISC) && ((cd_stat & 0x0f00) != CD_STAT_OPEN)) cd_stat = CD_STAT_PAUSE; -// cr1 = cd_stat; // necessary to pass -// cr2 = 0x4; +// cr1 = cd_stat; // necessary to pass +// cr2 = 0x4; // hirqreg |= (CMOK|EFLS|CSCT); sectorstore = 1; hirqreg = 0xfc5; @@ -1239,7 +1239,7 @@ void saturn_state::cd_exec_command( void ) cr3 = 0; cr4 = 0; hirqreg |= (CMOK); -// cr_standard_return(cd_stat); +// cr_standard_return(cd_stat); break; default: @@ -1489,7 +1489,7 @@ UINT16 saturn_state::cd_readWord(UINT32 addr) case 0x000c: case 0x000e: -// CDROM_LOG(("RW HIRM: %04x\n", hirqmask)) +// CDROM_LOG(("RW HIRM: %04x\n", hirqmask)) printf("RW HIRM: %04x\n", hirqmask); return hirqmask; @@ -1636,9 +1636,9 @@ UINT32 saturn_state::cd_readLong(UINT32 addr) { // get next longword rv = (transpart->blocks[xfersectpos+xfersect]->data[xferoffs + 0]<<24) | - (transpart->blocks[xfersectpos+xfersect]->data[xferoffs + 1]<<16) | - (transpart->blocks[xfersectpos+xfersect]->data[xferoffs + 2]<<8) | - (transpart->blocks[xfersectpos+xfersect]->data[xferoffs + 3]<<0); + (transpart->blocks[xfersectpos+xfersect]->data[xferoffs + 1]<<16) | + (transpart->blocks[xfersectpos+xfersect]->data[xferoffs + 2]<<8) | + (transpart->blocks[xfersectpos+xfersect]->data[xferoffs + 3]<<0); xferdnum += 4; xferoffs += 4; @@ -1699,7 +1699,7 @@ void saturn_state::cd_writeWord(UINT32 addr, UINT16 data) { case 0x0008: case 0x000a: -// CDROM_LOG(("%s:WW HIRQ: %04x & %04x => %04x\n", machine().describe_context(), hirqreg, data, hirqreg & data)) +// CDROM_LOG(("%s:WW HIRQ: %04x & %04x => %04x\n", machine().describe_context(), hirqreg, data, hirqreg & data)) hirqreg &= data; if(!(hirqreg & CMOK)) { @@ -1709,7 +1709,7 @@ void saturn_state::cd_writeWord(UINT32 addr, UINT16 data) return; case 0x000c: case 0x000e: -// CDROM_LOG(("WW HIRM: %04x => %04x\n", hirqmask, data)) +// CDROM_LOG(("WW HIRM: %04x => %04x\n", hirqmask, data)) printf("WW HIRM: %04x => %04x\n", hirqmask, data); hirqmask = data; return; diff --git a/src/mame/machine/tecmosys.c b/src/mame/machine/tecmosys.c index c38f3bace4a..bd1678d9dc1 100644 --- a/src/mame/machine/tecmosys.c +++ b/src/mame/machine/tecmosys.c @@ -104,7 +104,7 @@ static const struct prot_data tkdensha_data = void tecmosys_state::tecmosys_prot_reset() -{ +{ m_device_read_ptr = 0; m_device_status = DS_IDLE; m_device_value = 0xff; diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 2d1965b132a..73256970bbe 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -701,7 +701,7 @@ nrallyx // (c) 1981 Namco nrallyxb // (c) 1981 Namco jungler // GX327 (c) 1981 Konami junglers // GX327 (c) 1981 Stern -jackler // 1 9 8 2 (Jungler Bootleg) +jackler // 1 9 8 2 (Jungler Bootleg) savanna // Olympia (c) 1982 (Jungler bootleg) tactcian // GX335 (c) 1982 Sega tactcian2 // GX335 (c) 1981 Sega @@ -2974,7 +2974,7 @@ sf2m7 // hack sf2m8 // bootleg sf2yyc // hack sf2koryu // hack -sf2dongb // hack +sf2dongb // hack sf2mdt // bootleg sf2mdta // bootleg cworld2j // 11/06/1992 (c) 1992 (Japan) @@ -4156,8 +4156,8 @@ wbmljo // (c) 1987 Sega/Westone (S2) wbmljb // (c) 1987 Sega/Westone (S2) wbmlb // bootleg? (S2) wbmlbg // bootleg (Galaxy Electronics) -wbmlbge // bootleg (Gecas) -wbmlvc // Virtual Console +wbmlbge // bootleg (Gecas) +wbmlvc // Virtual Console dakkochn // 836-6483 (S2) ufosensi // 834-6659 (S2) ufosensib // bootleg @@ -4619,7 +4619,7 @@ pclub2 // 1997.09 Print Club 2 thunt // 1997.09 Puzzle & Action Treasure Hunt (Sega (Deniam License)) thuntk winterht // 1997.10 Winter Heat (Data East) -pclb297w // 1997.10 Print Club 2 '97 Winter Ver +pclb297w // 1997.10 Print Club 2 '97 Winter Ver pclub298 // 1997.10 Print Club 2 '98 Spring Ver cotton2 // 1997.11 Cotton 2 (Success) hanagumi // 1997.11 Sakura Taisen Hanagumi Taisen Columns @@ -5804,7 +5804,7 @@ wc90b1 // bootleg wc90b2 // bootleg spbactn // 9002 - (c) 1991 Tecmo spbactnj // 9002 - (c) 1991 Tecmo -spbactnp // prototype +spbactnp // prototype fstarfrc // (c) 1992 Tecmo fstarfrcj // (c) 1992 Tecmo ginkun // (c) 1995 Tecmo @@ -8294,7 +8294,7 @@ netwars // (c) 1983 Orca + Esco Trading Co license // the name "Orca" vastar // (c) 1983 Sesame Japan vastar2 // (c) 1983 Sesame Japan -vastar3 // (c) 1983 Sesame Japan +vastar3 // (c) 1983 Sesame Japan /* other Orca games: 82 Battle Cross Kit 2P @@ -8770,7 +8770,7 @@ wbeachvl2 // (c) 1995 wbeachvl3 // (c) 1995 excelsr // (c) 1995 hotmind // (c) 1995 -luckboomh // (c) 1995 +luckboomh // (c) 1995 hrdtimes // (c) 1994 hrdtimesa // (c) 1994 drtomy // (c) 1993 no copyright message (1993 on pcb), some code taken from 'Big Karnak' @@ -9186,12 +9186,12 @@ haunthig // (c) 200? fearless // (c) 2006 // IGS036 Cpu Games -cjdh2 // (c) 200? -cjdh2a // (c) 200? -cjdh2b // (c) 200? -cjdh2c // (c) 200? -cjddzsp // (c) 200? -igsm312 // (c) 200? +cjdh2 // (c) 200? +cjdh2a // (c) 200? +cjdh2b // (c) 200? +cjdh2c // (c) 200? +cjddzsp // (c) 200? +igsm312 // (c) 200? // IGS PGM System Games pgm // Base Unit @@ -9256,10 +9256,10 @@ py2k2 // (c) 2001 Photo Y2K2 pgm3in1 // (c) 2004 Photo Y2K2 3-in-1 dmnfrnt // (c) 2002 Demon Front dmnfrnta // -dmnfrntb // +dmnfrntb // dmnfrntpcb // kovshp // (c) 200? Knights of Valor Superheroes PLUS -kovytzy // (c) 1999 Knights of Valour: Yi Tong Zhong Yuan +kovytzy // (c) 1999 Knights of Valour: Yi Tong Zhong Yuan kovshxas // bootleg kovlsqh // bootleg kovlsqh2 // bootleg @@ -9848,7 +9848,7 @@ quake // (c) 19?? Lazer-Tron / iD Software majorpkr // (c) 1994 PAL System. su2000 // (c) 1993 Virtuality boonggab // (c) 2001 Taff System -fresh // (c) Chain Leisure +fresh // (c) Chain Leisure // Success tonton // (c) 199? Success / Taiyo Jidoki. @@ -10519,7 +10519,7 @@ cfever51 // (c) 2000 High Video cfever61 // (c) 2000 High Video cfever1k // (c) 2000 High Video girotutt // (c) 2000 High Video -nyjoker // +nyjoker // // Sure games mil4000 // (c) 2000 Sure Milano @@ -10701,7 +10701,7 @@ nfb96a // (c) 1996 Amcoe nfb96b // (c) 1996 Amcoe nfb96c // (c) 1996 Amcoe nfb96txt // (c) 2000 Amcoe -fb2010 // (c) 2009 Amcoe +fb2010 // (c) 2009 Amcoe nfb96se // bootleg nfb96sea // bootleg nfb96seb // bootleg diff --git a/src/mame/video/ccastles.c b/src/mame/video/ccastles.c index 860067abe80..c6c7b49bd12 100644 --- a/src/mame/video/ccastles.c +++ b/src/mame/video/ccastles.c @@ -163,7 +163,6 @@ inline void ccastles_state::ccastles_write_vram( UINT16 addr, UINT8 data, UINT8 inline void ccastles_state::bitmode_autoinc( ) { - /* auto increment in the x-direction if it's enabled */ if (!m_video_control[0]) /* /AX */ { diff --git a/src/mame/video/cchasm.c b/src/mame/video/cchasm.c index e69992dba34..d97df1fa06a 100644 --- a/src/mame/video/cchasm.c +++ b/src/mame/video/cchasm.c @@ -26,7 +26,6 @@ TIMER_CALLBACK_MEMBER(cchasm_state::cchasm_refresh_end) void cchasm_state::cchasm_refresh () { - int pc = 0; int done = 0; int opcode, data; diff --git a/src/mame/video/centiped.c b/src/mame/video/centiped.c index b964bb15b28..76ba7849369 100644 --- a/src/mame/video/centiped.c +++ b/src/mame/video/centiped.c @@ -80,7 +80,6 @@ void centiped_state::init_penmask() void centiped_state::init_common() { - save_item(NAME(m_flipscreen)); save_item(NAME(m_gfx_bank)); save_item(NAME(m_bullsdrt_sprites_bank)); diff --git a/src/mame/video/cloud9.c b/src/mame/video/cloud9.c index 473220449e3..9bfa978b817 100644 --- a/src/mame/video/cloud9.c +++ b/src/mame/video/cloud9.c @@ -156,7 +156,6 @@ inline void cloud9_state::cloud9_write_vram( UINT16 addr, UINT8 data, UINT8 bitm inline void cloud9_state::bitmode_autoinc( ) { - /* auto increment in the x-direction if it's enabled */ if (!m_video_control[0]) /* /AX */ m_bitmode_addr[0]++; diff --git a/src/mame/video/cps1.c b/src/mame/video/cps1.c index 3a4f294d75a..a7624c4e113 100644 --- a/src/mame/video/cps1.c +++ b/src/mame/video/cps1.c @@ -2276,7 +2276,6 @@ void cps_state::cps1_find_last_sprite() /* Find the offset of last sprite */ void cps_state::cps1_render_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ) { - #define DRAWSPRITE(CODE,COLOR,FLIPX,FLIPY,SX,SY) \ { \ if (flip_screen()) \ @@ -2510,7 +2509,6 @@ void cps_state::cps2_find_last_sprite() /* Find the offset of last sprite */ void cps_state::cps2_render_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int *primasks ) { - #define DRAWSPRITE(CODE,COLOR,FLIPX,FLIPY,SX,SY) \ { \ if (flip_screen()) \ diff --git a/src/mame/video/dday.c b/src/mame/video/dday.c index dc6b9a83be4..c18596db1b3 100644 --- a/src/mame/video/dday.c +++ b/src/mame/video/dday.c @@ -33,7 +33,6 @@ TIMER_CALLBACK_MEMBER(dday_state::countdown_timer_callback) void dday_state::start_countdown_timer() { - m_timer_value = 0; machine().scheduler().timer_pulse(attotime::from_seconds(1), timer_expired_delegate(FUNC(dday_state::countdown_timer_callback),this)); diff --git a/src/mame/video/dkong.c b/src/mame/video/dkong.c index f35e8adade5..86f0a2bf5b5 100644 --- a/src/mame/video/dkong.c +++ b/src/mame/video/dkong.c @@ -669,7 +669,6 @@ void dkong_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, inline double dkong_state::CD4049(double x) { - if (x>0) return exp(-m_cd4049_a * pow(x,m_cd4049_b)); else @@ -690,7 +689,6 @@ inline double dkong_state::CD4049(double x) void dkong_state::radarscp_step(int line_cnt) { - /* Condensator is illegible in schematics for TRS2 board. * TRS1 board states 3.3u. */ diff --git a/src/mame/video/fromanc2.c b/src/mame/video/fromanc2.c index f0d1128d7f7..75354c27e03 100644 --- a/src/mame/video/fromanc2.c +++ b/src/mame/video/fromanc2.c @@ -288,7 +288,6 @@ WRITE16_MEMBER(fromanc2_state::fromancr_gfxreg_1_w) void fromanc2_state::fromancr_gfxbank_w( int data ) { - m_gfxbank[0][0] = (data & 0x0010) >> 4; // BG (1P) m_gfxbank[0][1] = (data & 0xf000) >> 12; // FG (1P) m_gfxbank[1][0] = (data & 0x0008) >> 3; // BG (2P) diff --git a/src/mame/video/fromance.c b/src/mame/video/fromance.c index 54865729da9..44e62c22b97 100644 --- a/src/mame/video/fromance.c +++ b/src/mame/video/fromance.c @@ -55,7 +55,6 @@ TILE_GET_INFO_MEMBER(fromance_state::get_nekkyoku_fg_tile_info){ get_nekkyoku_ti void fromance_state::init_common( ) { - /* allocate local videoram */ m_local_videoram[0] = auto_alloc_array(machine(), UINT8, 0x1000 * 3); m_local_videoram[1] = auto_alloc_array(machine(), UINT8, 0x1000 * 3); diff --git a/src/mame/video/galaga.c b/src/mame/video/galaga.c index fce68cdc943..e7d12d8a78e 100644 --- a/src/mame/video/galaga.c +++ b/src/mame/video/galaga.c @@ -472,7 +472,6 @@ WRITE8_MEMBER(galaga_state::gatsbee_bank_w) void galaga_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ) { - UINT8 *spriteram = m_galaga_ram1 + 0x380; UINT8 *spriteram_2 = m_galaga_ram2 + 0x380; UINT8 *spriteram_3 = m_galaga_ram3 + 0x380; diff --git a/src/mame/video/galaxold.c b/src/mame/video/galaxold.c index 4528ddc1692..e6f831a6f05 100644 --- a/src/mame/video/galaxold.c +++ b/src/mame/video/galaxold.c @@ -1305,7 +1305,6 @@ void galaxold_state::dambustr_draw_background(bitmap_ind16 &bitmap, const rectan void galaxold_state::dambustr_draw_upper_background(bitmap_ind16 &bitmap, const rectangle &cliprect) { - if (flip_screen_x()) { rectangle clip(254 - m_dambustr_bg_split_line, m_dambustr_bg_split_line, 0, 255); diff --git a/src/mame/video/konicdev.c b/src/mame/video/konicdev.c index 24f1ab937cc..3c59c5f9990 100644 --- a/src/mame/video/konicdev.c +++ b/src/mame/video/konicdev.c @@ -10327,7 +10327,7 @@ void k001604_draw_back_layer( device_t *device, bitmap_rgb32 &bitmap, const rect window_x = ((k001604->reg[0x1b] >> 1) & 3) * 512; else window_x = ((k001604->reg[0x1b] >> 1) & 1) * 512; - + window_y = 0; switch (layer_size) @@ -10339,7 +10339,7 @@ void k001604_draw_back_layer( device_t *device, bitmap_rgb32 &bitmap, const rect } window_ymask = pixmap.height() - 1; - + // loop over rows while (sy <= ey) diff --git a/src/mame/video/lastduel.c b/src/mame/video/lastduel.c index 4ccde683063..de2cb93285c 100644 --- a/src/mame/video/lastduel.c +++ b/src/mame/video/lastduel.c @@ -199,7 +199,6 @@ WRITE16_MEMBER(lastduel_state::lastduel_palette_word_w) void lastduel_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int pri ) { - UINT16 *buffered_spriteram16 = m_spriteram->buffer(); int offs; diff --git a/src/mame/video/lockon.c b/src/mame/video/lockon.c index 4a9613c8a12..07ef300ba24 100644 --- a/src/mame/video/lockon.c +++ b/src/mame/video/lockon.c @@ -300,7 +300,6 @@ TIMER_CALLBACK_MEMBER(lockon_state::bufend_callback) void lockon_state::ground_draw( ) { - /* ROM pointers */ const UINT8 *const gfx_rom = memregion("gfx4")->base(); const UINT8 *const lut_rom = gfx_rom + 0x30000 + ((m_ground_ctrl >> 2) & 0x3 ? 0x10000 : 0); diff --git a/src/mame/video/madalien.c b/src/mame/video/madalien.c index 6efa6face08..f61d58a23ec 100644 --- a/src/mame/video/madalien.c +++ b/src/mame/video/madalien.c @@ -380,7 +380,7 @@ GFXDECODE_END static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mame/video/qix.c b/src/mame/video/qix.c index 2cd3db62a27..70a7ba9dce3 100644 --- a/src/mame/video/qix.c +++ b/src/mame/video/qix.c @@ -385,7 +385,7 @@ ADDRESS_MAP_END static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ begin_update, /* before pixel update callback */ update_row, /* row update callback */ diff --git a/src/mame/video/redclash.c b/src/mame/video/redclash.c index c5d327df41f..0d8ed261796 100644 --- a/src/mame/video/redclash.c +++ b/src/mame/video/redclash.c @@ -286,7 +286,7 @@ void ladybug_state::redclash_draw_bullets( bitmap_ind16 &bitmap, const rectangle /* This line can reset the LFSR to zero and disables the star generator */ void ladybug_state::redclash_set_stars_enable(UINT8 on) -{ +{ if ((m_stars_enable == 0) && (on == 1)) { m_stars_offset = 0; diff --git a/src/mame/video/spbactn.c b/src/mame/video/spbactn.c index c2213592bda..2cec9383b79 100644 --- a/src/mame/video/spbactn.c +++ b/src/mame/video/spbactn.c @@ -59,7 +59,7 @@ TILE_GET_INFO_MEMBER(spbactn_state::get_fg_tile_info) int tileno = m_fgvideoram[tile_index+0x2000]; int color = ((attr & 0x00f0)>>4); - + /* blending */ if (attr & 0x0008) color += 0x00f0; diff --git a/src/mame/video/stvvdp1.c b/src/mame/video/stvvdp1.c index 15100909b9a..98365f8a1e8 100644 --- a/src/mame/video/stvvdp1.c +++ b/src/mame/video/stvvdp1.c @@ -239,7 +239,7 @@ void saturn_state::stv_vdp1_change_framebuffers( void ) void saturn_state::stv_set_framebuffer_config( void ) { if ( m_vdp1.framebuffer_mode == STV_VDP1_TVM && - m_vdp1.framebuffer_double_interlace == STV_VDP1_DIE ) return; + m_vdp1.framebuffer_double_interlace == STV_VDP1_DIE ) return; if ( VDP1_LOG ) logerror( "Setting framebuffer config\n" ); m_vdp1.framebuffer_mode = STV_VDP1_TVM; @@ -1908,7 +1908,7 @@ void saturn_state::stv_vdp1_process_list( void ) break; case 0x0005: -// case 0x0007: // mirror? Baroque uses it, crashes for whatever reason +// case 0x0007: // mirror? Baroque uses it, crashes for whatever reason if (VDP1_LOG) logerror ("Sprite List Polyline\n"); stv2_current_sprite.ispoly = 1; stv_vdp1_draw_poly_line(*cliprect); @@ -1921,7 +1921,7 @@ void saturn_state::stv_vdp1_process_list( void ) break; case 0x0008: -// case 0x000b: // mirror? Bug 2 +// case 0x000b: // mirror? Bug 2 if (VDP1_LOG) logerror ("Sprite List Set Command for User Clipping (%d,%d),(%d,%d)\n", stv2_current_sprite.CMDXA, stv2_current_sprite.CMDYA, stv2_current_sprite.CMDXC, stv2_current_sprite.CMDYC); m_vdp1.user_cliprect.set(stv2_current_sprite.CMDXA, stv2_current_sprite.CMDXC, stv2_current_sprite.CMDYA, stv2_current_sprite.CMDYC); break; @@ -2021,7 +2021,7 @@ void saturn_state::video_update_vdp1( void ) /* TODO: Slam n Jam 96 & Cross Romance doesn't like this, investigate. */ framebuffer_changed = 1; } - // framebuffer_changed = 1; + // framebuffer_changed = 1; break; } m_vdp1.fbcr_accessed = 0; diff --git a/src/mame/video/stvvdp2.c b/src/mame/video/stvvdp2.c index 4e27cbac89f..e22ea9cd652 100644 --- a/src/mame/video/stvvdp2.c +++ b/src/mame/video/stvvdp2.c @@ -2604,9 +2604,9 @@ void saturn_state::stv_vdp2_drawgfxzoom_rgb555( myclip = clip; myclip &= dest_bmp.cliprect(); -// if( gfx ) +// if( gfx ) { -// const UINT8 *source_base = gfx->get_data(code % gfx->elements()); +// const UINT8 *source_base = gfx->get_data(code % gfx->elements()); //int sprite_screen_height = (scaley*gfx->height()+0x8000)>>16; //int sprite_screen_width = (scalex*gfx->width()+0x8000)>>16; @@ -3264,27 +3264,27 @@ void saturn_state::stv_vdp2_draw_basic_bitmap(bitmap_rgb32 &bitmap, const rectan /* intentional fall-through*/ popmessage("%d %s %s %s %s",stv2_current_tilemap.colour_depth, - stv2_current_tilemap.transparency == STV_TRANSPARENCY_NONE ? "no trans" : "trans", - stv2_current_tilemap.window_control & 6 ? "window" : "no window", - stv2_current_tilemap.colour_calculation_enabled ? "cc" : "no cc", - (stv2_current_tilemap.incx == 0x10000 && stv2_current_tilemap.incy == 0x10000) ? "no zoom" : "zoom"); + stv2_current_tilemap.transparency == STV_TRANSPARENCY_NONE ? "no trans" : "trans", + stv2_current_tilemap.window_control & 6 ? "window" : "no window", + stv2_current_tilemap.colour_calculation_enabled ? "cc" : "no cc", + (stv2_current_tilemap.incx == 0x10000 && stv2_current_tilemap.incy == 0x10000) ? "no zoom" : "zoom"); } else { switch(stv2_current_tilemap.colour_depth) { - // case 0: draw_4bpp_bitmap(bitmap,cliprect); return; + // case 0: draw_4bpp_bitmap(bitmap,cliprect); return; case 1: draw_8bpp_bitmap(bitmap,cliprect); return; case 3: draw_rgb15_bitmap(bitmap,cliprect); return; - // case 4: draw_rgb32_bitmap(bitmap,cliprect); return; + // case 4: draw_rgb32_bitmap(bitmap,cliprect); return; } /* intentional fall-through*/ popmessage("%d %s %s %s %s",stv2_current_tilemap.colour_depth, - stv2_current_tilemap.transparency == STV_TRANSPARENCY_NONE ? "no trans" : "trans", - stv2_current_tilemap.window_control & 6 ? "window" : "no window", - stv2_current_tilemap.colour_calculation_enabled ? "cc" : "no cc", - (stv2_current_tilemap.incx == 0x10000 && stv2_current_tilemap.incy == 0x10000) ? "no zoom" : "zoom"); + stv2_current_tilemap.transparency == STV_TRANSPARENCY_NONE ? "no trans" : "trans", + stv2_current_tilemap.window_control & 6 ? "window" : "no window", + stv2_current_tilemap.colour_calculation_enabled ? "cc" : "no cc", + (stv2_current_tilemap.incx == 0x10000 && stv2_current_tilemap.incy == 0x10000) ? "no zoom" : "zoom"); } /* size for n0 / n1 */ @@ -4319,11 +4319,11 @@ void saturn_state::stv_vdp2_check_tilemap_with_linescroll(bitmap_rgb32 &bitmap, // prepare linescroll flags linescroll_enable = stv2_current_tilemap.linescroll_enable; -// stv2_current_tilemap.linescroll_enable = 0; +// stv2_current_tilemap.linescroll_enable = 0; vertical_linescroll_enable = stv2_current_tilemap.vertical_linescroll_enable; -// stv2_current_tilemap.vertical_linescroll_enable = 0; +// stv2_current_tilemap.vertical_linescroll_enable = 0; linezoom_enable = stv2_current_tilemap.linezoom_enable; -// stv2_current_tilemap.linezoom_enable = 0; +// stv2_current_tilemap.linezoom_enable = 0; // prepare working clipping rectangle memcpy( &mycliprect, &cliprect, sizeof(rectangle) ); @@ -4542,8 +4542,8 @@ void saturn_state::stv_vdp2_check_tilemap(bitmap_rgb32 &bitmap, const rectangle if(stv2_current_tilemap.colour_depth == 2 && !stv2_current_tilemap.bitmap_enable) popmessage("2048 color mode used on a non-bitmap plane"); -// if(STV_VDP2_SCXDN0 || STV_VDP2_SCXDN1 || STV_VDP2_SCYDN0 || STV_VDP2_SCYDN1) -// popmessage("Fractional part scrolling write, contact MAMEdev"); +// if(STV_VDP2_SCXDN0 || STV_VDP2_SCXDN1 || STV_VDP2_SCYDN0 || STV_VDP2_SCYDN1) +// popmessage("Fractional part scrolling write, contact MAMEdev"); /* Pukunpa */ //if(STV_VDP2_SPWINEN) @@ -7023,5 +7023,3 @@ UINT32 saturn_state::screen_update_stv_vdp2(screen_device &screen, bitmap_rgb32 #endif return 0; } - - diff --git a/src/mame/video/taitoic.c b/src/mame/video/taitoic.c index 9b4edef9f02..78028da3ac5 100644 --- a/src/mame/video/taitoic.c +++ b/src/mame/video/taitoic.c @@ -1883,7 +1883,7 @@ READ_LINE_DEVICE_HANDLER( tc0080vco_flipscreen_r ) void tc0080vco_device::tc0080vco_postload() { tc0080vco_state *tc0080vco = tc0080vco_get_safe_token(this); - + tc0080vco->flipscreen = tc0080vco->scroll_ram[0] & 0x0c00; tc0080vco->tilemap[0]->set_flip(tc0080vco->flipscreen ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0); @@ -3716,7 +3716,7 @@ READ8_DEVICE_HANDLER( tc0480scp_pri_reg_r ) void tc0480scp_device::tc0480scp_postload() { tc0480scp_state *tc0480scp = tc0480scp_get_safe_token(this); - + int reg; int flip = tc0480scp->ctrl[0xf] & 0x40; diff --git a/src/mame/video/tecmo_spr.c b/src/mame/video/tecmo_spr.c index c9580ee36f7..25e53edd7d0 100644 --- a/src/mame/video/tecmo_spr.c +++ b/src/mame/video/tecmo_spr.c @@ -79,7 +79,7 @@ int spbactn_draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const r attr = spriteram[offs]; int pri = (spriteram[offs] & 0x0030); -// int pri = (spriteram[offs+2] & 0x0030); +// int pri = (spriteram[offs+2] & 0x0030); if ((attr & 0x0004) && @@ -542,5 +542,3 @@ void raiga_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap_bg, bitm source -= 8; } } - - diff --git a/src/mame/video/tecmo_spr.h b/src/mame/video/tecmo_spr.h index 693e933e565..8af6da82a1d 100644 --- a/src/mame/video/tecmo_spr.h +++ b/src/mame/video/tecmo_spr.h @@ -5,4 +5,3 @@ void tecmo16_draw_sprites(running_machine &machine, bitmap_ind16 &bitmap_bg, bit void gaiden_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap_bg, bitmap_ind16 &bitmap_fg, bitmap_ind16 &bitmap_sp, const rectangle &cliprect, UINT16* spriteram, int sprite_sizey, int spr_offset_y, int flipscreen ); void raiga_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap_bg, bitmap_ind16 &bitmap_fg, bitmap_ind16 &bitmap_sp, const rectangle &cliprect, UINT16* spriteram, int sprite_sizey, int spr_offset_y, int flipscreen ); int spbactn_draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int priority, bool alt_sprites, UINT16* spriteram); - diff --git a/src/mame/video/twincobr.c b/src/mame/video/twincobr.c index e20c36db9ae..6a43d1d4644 100644 --- a/src/mame/video/twincobr.c +++ b/src/mame/video/twincobr.c @@ -21,7 +21,7 @@ MC6845_INTERFACE( twincobr_mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 2, /* number of pixels per video memory address */ /* Horizontal Display programmed to 160 characters */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mess/drivers/apc.c b/src/mess/drivers/apc.c index 8d6a86353c8..5d8308a2a17 100644 --- a/src/mess/drivers/apc.c +++ b/src/mess/drivers/apc.c @@ -403,10 +403,10 @@ WRITE8_MEMBER(apc_state::apc_dma_w) WRITE8_MEMBER(apc_state::apc_irq_ack_w) { /* - x--- GDC - -x-- TM - --x- APU - ---x CRT + x--- GDC + -x-- TM + --x- APU + ---x CRT */ if(data & 4) pic8259_ir3_w(machine().device("pic8259_master"), 0); @@ -464,7 +464,7 @@ RTC write bits: 76543210 static ADDRESS_MAP_START( apc_map, AS_PROGRAM, 16, apc_state ) AM_RANGE(0x00000, 0x9ffff) AM_RAM AM_RANGE(0xa0000, 0xa0fff) AM_RAM AM_SHARE("cmos") -// AM_RANGE(0xa1000, 0xbffff) mirror CMOS +// AM_RANGE(0xa1000, 0xbffff) mirror CMOS // AM_RANGE(0xc0000, 0xcffff) standard character ROM AM_RANGE(0xd8000, 0xd9fff) AM_RAM AM_REGION("aux_pcg", 0) // AUX character RAM // AM_RANGE(0xe0000, 0xeffff) Special Character RAM @@ -483,7 +483,7 @@ static ADDRESS_MAP_START( apc_io, AS_IO, 16, apc_state ) AM_RANGE(0x48, 0x4f) AM_READWRITE8(apc_kbd_r, apc_kbd_w, 0x00ff) AM_RANGE(0x50, 0x53) AM_DEVICE8("upd765", upd765a_device, map, 0x00ff ) // upd765 AM_RANGE(0x58, 0x59) AM_READWRITE8(apc_rtc_r, apc_rtc_w, 0x00ff) -// 0x59 CMOS enable +// 0x59 CMOS enable // 0x5a APU data (Arithmetic Processing Unit!) // 0x5b, Power Off // 0x5e APU status/command @@ -492,7 +492,7 @@ static ADDRESS_MAP_START( apc_io, AS_IO, 16, apc_state ) // 0x70, 0x76 AM_DEVREADWRITE8("upd7220_btm", upd7220_device, read, write, 0x00ff) // 0x71, 0x77 IDA Controller // 0x80, 0x90 Communication Adapter -// 0xf0, 0xf6 ASOP Controller +// 0xf0, 0xf6 ASOP Controller ADDRESS_MAP_END /* TODO: key repeat, remove port impulse! */ diff --git a/src/mess/drivers/apple2.c b/src/mess/drivers/apple2.c index 7c6c40fbce7..2c04a0dc02f 100644 --- a/src/mess/drivers/apple2.c +++ b/src/mess/drivers/apple2.c @@ -633,7 +633,7 @@ static SLOT_INTERFACE_START(apple2_cards) SLOT_INTERFACE("vtc1", A2BUS_VTC1) /* Unknown VideoTerm clone #1 */ SLOT_INTERFACE("vtc2", A2BUS_VTC2) /* Unknown VideoTerm clone #2 */ SLOT_INTERFACE("arcbd", A2BUS_ARCADEBOARD) /* Third Millenium Engineering Arcade Board */ - SLOT_INTERFACE("midi", A2BUS_MIDI) /* Generic 6840+6850 MIDI board */ + SLOT_INTERFACE("midi", A2BUS_MIDI) /* Generic 6840+6850 MIDI board */ // SLOT_INTERFACE("scsi", A2BUS_SCSI) /* Apple II SCSI Card */ SLOT_INTERFACE_END @@ -727,7 +727,7 @@ static MACHINE_CONFIG_DERIVED( apple2e, apple2_common ) MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl0", A2BUS_LANG, NULL) MCFG_A2EAUXSLOT_BUS_ADD(AUXSLOT_TAG, "maincpu", a2eauxbus_intf) - MCFG_A2EAUXSLOT_SLOT_ADD(AUXSLOT_TAG, "aux", apple2eaux_cards, "ext80", NULL) // default to an extended 80-column card + MCFG_A2EAUXSLOT_SLOT_ADD(AUXSLOT_TAG, "aux", apple2eaux_cards, "ext80", NULL) // default to an extended 80-column card MACHINE_CONFIG_END diff --git a/src/mess/drivers/apple2gs.c b/src/mess/drivers/apple2gs.c index 2a87471f1c4..88265b5b723 100644 --- a/src/mess/drivers/apple2gs.c +++ b/src/mess/drivers/apple2gs.c @@ -72,24 +72,24 @@ static const gfx_layout apple2gs_text_layout = { - 14,8, /* 14*8 characters */ - 512, /* 256 characters */ - 1, /* 1 bits per pixel */ - { 0 }, /* no bitplanes; 1 bit per pixel */ + 14,8, /* 14*8 characters */ + 512, /* 256 characters */ + 1, /* 1 bits per pixel */ + { 0 }, /* no bitplanes; 1 bit per pixel */ { 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1 }, /* x offsets */ { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, - 8*8 /* every char takes 8 bytes */ + 8*8 /* every char takes 8 bytes */ }; static const gfx_layout apple2gs_dbltext_layout = { - 7,8, /* 7*8 characters */ - 512, /* 256 characters */ - 1, /* 1 bits per pixel */ - { 0 }, /* no bitplanes; 1 bit per pixel */ + 7,8, /* 7*8 characters */ + 512, /* 256 characters */ + 1, /* 1 bits per pixel */ + { 0 }, /* no bitplanes; 1 bit per pixel */ { 7, 6, 5, 4, 3, 2, 1 }, /* x offsets */ { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, - 8*8 /* every char takes 8 bytes */ + 8*8 /* every char takes 8 bytes */ }; static GFXDECODE_START( apple2gs ) @@ -99,22 +99,22 @@ GFXDECODE_END static const unsigned char apple2gs_palette[] = { - 0x0, 0x0, 0x0, /* Black $0 $0000 */ - 0xD, 0x0, 0x3, /* Deep Red $1 $0D03 */ - 0x0, 0x0, 0x9, /* Dark Blue $2 $0009 */ - 0xD, 0x2, 0xD, /* Purple $3 $0D2D */ - 0x0, 0x7, 0x2, /* Dark Green $4 $0072 */ - 0x5, 0x5, 0x5, /* Dark Gray $5 $0555 */ - 0x2, 0x2, 0xF, /* Medium Blue $6 $022F */ - 0x6, 0xA, 0xF, /* Light Blue $7 $06AF */ - 0x8, 0x5, 0x0, /* Brown $8 $0850 */ - 0xF, 0x6, 0x0, /* Orange $9 $0F60 */ - 0xA, 0xA, 0xA, /* Light Gray $A $0AAA */ - 0xF, 0x9, 0x8, /* Pink $B $0F98 */ - 0x1, 0xD, 0x0, /* Light Green $C $01D0 */ - 0xF, 0xF, 0x0, /* Yellow $D $0FF0 */ - 0x4, 0xF, 0x9, /* Aquamarine $E $04F9 */ - 0xF, 0xF, 0xF /* White $F $0FFF */ + 0x0, 0x0, 0x0, /* Black $0 $0000 */ + 0xD, 0x0, 0x3, /* Deep Red $1 $0D03 */ + 0x0, 0x0, 0x9, /* Dark Blue $2 $0009 */ + 0xD, 0x2, 0xD, /* Purple $3 $0D2D */ + 0x0, 0x7, 0x2, /* Dark Green $4 $0072 */ + 0x5, 0x5, 0x5, /* Dark Gray $5 $0555 */ + 0x2, 0x2, 0xF, /* Medium Blue $6 $022F */ + 0x6, 0xA, 0xF, /* Light Blue $7 $06AF */ + 0x8, 0x5, 0x0, /* Brown $8 $0850 */ + 0xF, 0x6, 0x0, /* Orange $9 $0F60 */ + 0xA, 0xA, 0xA, /* Light Gray $A $0AAA */ + 0xF, 0x9, 0x8, /* Pink $B $0F98 */ + 0x1, 0xD, 0x0, /* Light Green $C $01D0 */ + 0xF, 0xF, 0x0, /* Yellow $D $0FF0 */ + 0x4, 0xF, 0x9, /* Aquamarine $E $04F9 */ + 0xF, 0xF, 0xF /* White $F $0FFF */ }; static INPUT_PORTS_START( apple2gs ) @@ -195,7 +195,7 @@ READ8_MEMBER(apple2gs_state::adbmicro_p1_in) { if (m_is_rom3) { - return 0x06; // indicate ROM 3 + return 0x06; // indicate ROM 3 } return 0; @@ -203,12 +203,12 @@ READ8_MEMBER(apple2gs_state::adbmicro_p1_in) READ8_MEMBER(apple2gs_state::adbmicro_p2_in) { - return (m_adb_line) ? 0x80 : 0x00; + return (m_adb_line) ? 0x80 : 0x00; } READ8_MEMBER(apple2gs_state::adbmicro_p3_in) { - return (m_adb_line) ? 0x08 : 0x00; + return (m_adb_line) ? 0x08 : 0x00; } WRITE8_MEMBER(apple2gs_state::adbmicro_p0_out) @@ -223,12 +223,12 @@ WRITE8_MEMBER(apple2gs_state::adbmicro_p1_out) WRITE8_MEMBER(apple2gs_state::adbmicro_p2_out) { if (!(data & 0x10)) - { + { if (m_adbmicro->are_port_bits_output(0, 0xff)) { keyglu_mcu_write(data & 7, m_glu_bus); } - else // read GLU + else // read GLU { m_glu_bus = keyglu_mcu_read(data & 7); } @@ -255,47 +255,47 @@ static const struct m5074x_interface adbmicro_intf = WRITE8_MEMBER(apple2gs_state::a2bus_irq_w) { - if (data) - { - apple2gs_add_irq(machine(), IRQ_SLOT); - } - else - { - apple2gs_remove_irq(machine(), IRQ_SLOT); - } + if (data) + { + apple2gs_add_irq(machine(), IRQ_SLOT); + } + else + { + apple2gs_remove_irq(machine(), IRQ_SLOT); + } } WRITE8_MEMBER(apple2gs_state::a2bus_nmi_w) { - m_maincpu->set_input_line(INPUT_LINE_NMI, data); + m_maincpu->set_input_line(INPUT_LINE_NMI, data); } WRITE8_MEMBER(apple2gs_state::a2bus_inh_w) { - m_inh_slot = data; - apple2_update_memory(); + m_inh_slot = data; + apple2_update_memory(); } static const struct a2bus_interface a2bus_intf = { - // interrupt lines - DEVCB_DRIVER_MEMBER(apple2gs_state,a2bus_irq_w), - DEVCB_DRIVER_MEMBER(apple2gs_state,a2bus_nmi_w), - DEVCB_DRIVER_MEMBER(apple2gs_state,a2bus_inh_w) + // interrupt lines + DEVCB_DRIVER_MEMBER(apple2gs_state,a2bus_irq_w), + DEVCB_DRIVER_MEMBER(apple2gs_state,a2bus_nmi_w), + DEVCB_DRIVER_MEMBER(apple2gs_state,a2bus_inh_w) }; static SLOT_INTERFACE_START(apple2_cards) - SLOT_INTERFACE("diskii", A2BUS_DISKII) /* Disk II Controller Card */ - SLOT_INTERFACE("mockingboard", A2BUS_MOCKINGBOARD) /* Sweet Micro Systems Mockingboard */ - SLOT_INTERFACE("phasor", A2BUS_PHASOR) /* Applied Engineering Phasor */ - SLOT_INTERFACE("cffa2", A2BUS_CFFA2) /* CFFA2000 Compact Flash for Apple II (www.dreher.net), 65C02/65816 firmware */ - SLOT_INTERFACE("cffa202", A2BUS_CFFA2_6502) /* CFFA2000 Compact Flash for Apple II (www.dreher.net), 6502 firmware */ - SLOT_INTERFACE("memexp", A2BUS_MEMEXP) /* Apple II Memory Expansion Card */ - SLOT_INTERFACE("ramfactor", A2BUS_RAMFACTOR) /* Applied Engineering RamFactor */ - SLOT_INTERFACE("sam", A2BUS_SAM) /* SAM Software Automated Mouth (8-bit DAC + speaker) */ - SLOT_INTERFACE("alfam2", A2BUS_ALFAM2) /* ALF Apple Music II */ - SLOT_INTERFACE("midi", A2BUS_MIDI) /* Generic 6840+6850 MIDI board */ - SLOT_INTERFACE("vulcan", A2BUS_VULCAN) /* AE Vulcan IDE card */ + SLOT_INTERFACE("diskii", A2BUS_DISKII) /* Disk II Controller Card */ + SLOT_INTERFACE("mockingboard", A2BUS_MOCKINGBOARD) /* Sweet Micro Systems Mockingboard */ + SLOT_INTERFACE("phasor", A2BUS_PHASOR) /* Applied Engineering Phasor */ + SLOT_INTERFACE("cffa2", A2BUS_CFFA2) /* CFFA2000 Compact Flash for Apple II (www.dreher.net), 65C02/65816 firmware */ + SLOT_INTERFACE("cffa202", A2BUS_CFFA2_6502) /* CFFA2000 Compact Flash for Apple II (www.dreher.net), 6502 firmware */ + SLOT_INTERFACE("memexp", A2BUS_MEMEXP) /* Apple II Memory Expansion Card */ + SLOT_INTERFACE("ramfactor", A2BUS_RAMFACTOR) /* Applied Engineering RamFactor */ + SLOT_INTERFACE("sam", A2BUS_SAM) /* SAM Software Automated Mouth (8-bit DAC + speaker) */ + SLOT_INTERFACE("alfam2", A2BUS_ALFAM2) /* ALF Apple Music II */ + SLOT_INTERFACE("midi", A2BUS_MIDI) /* Generic 6840+6850 MIDI board */ + SLOT_INTERFACE("vulcan", A2BUS_VULCAN) /* AE Vulcan IDE card */ // SLOT_INTERFACE("softcard", A2BUS_SOFTCARD) /* Microsoft SoftCard */ // appears not to be IIgs compatible? // SLOT_INTERFACE("scsi", A2BUS_SCSI) /* Apple II SCSI Card */ SLOT_INTERFACE_END @@ -310,7 +310,7 @@ static MACHINE_CONFIG_START( apple2gs, apple2gs_state ) MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ - MCFG_SCREEN_SIZE(704, 262) // 640+32+32 for the borders + MCFG_SCREEN_SIZE(704, 262) // 640+32+32 for the borders MCFG_SCREEN_VISIBLE_AREA(0,703,0,230) MCFG_SCREEN_UPDATE_DRIVER(apple2gs_state, screen_update_apple2gs) @@ -338,17 +338,17 @@ static MACHINE_CONFIG_START( apple2gs, apple2gs_state ) #endif /* slot devices */ - MCFG_A2BUS_BUS_ADD("a2bus", "maincpu", a2bus_intf) - MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl0", A2BUS_LANG, NULL) - MCFG_A2BUS_SLOT_ADD("a2bus", "sl1", apple2_cards, NULL, NULL) - MCFG_A2BUS_SLOT_ADD("a2bus", "sl2", apple2_cards, NULL, NULL) - MCFG_A2BUS_SLOT_ADD("a2bus", "sl3", apple2_cards, NULL, NULL) - MCFG_A2BUS_SLOT_ADD("a2bus", "sl4", apple2_cards, NULL, NULL) - MCFG_A2BUS_SLOT_ADD("a2bus", "sl5", apple2_cards, NULL, NULL) - MCFG_A2BUS_SLOT_ADD("a2bus", "sl6", apple2_cards, NULL, NULL) - MCFG_A2BUS_SLOT_ADD("a2bus", "sl7", apple2_cards, NULL, NULL) - - MCFG_IWM_ADD("fdc", apple2_fdc_interface) + MCFG_A2BUS_BUS_ADD("a2bus", "maincpu", a2bus_intf) + MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl0", A2BUS_LANG, NULL) + MCFG_A2BUS_SLOT_ADD("a2bus", "sl1", apple2_cards, NULL, NULL) + MCFG_A2BUS_SLOT_ADD("a2bus", "sl2", apple2_cards, NULL, NULL) + MCFG_A2BUS_SLOT_ADD("a2bus", "sl3", apple2_cards, NULL, NULL) + MCFG_A2BUS_SLOT_ADD("a2bus", "sl4", apple2_cards, NULL, NULL) + MCFG_A2BUS_SLOT_ADD("a2bus", "sl5", apple2_cards, NULL, NULL) + MCFG_A2BUS_SLOT_ADD("a2bus", "sl6", apple2_cards, NULL, NULL) + MCFG_A2BUS_SLOT_ADD("a2bus", "sl7", apple2_cards, NULL, NULL) + + MCFG_IWM_ADD("fdc", apple2_fdc_interface) /* SCC */ MCFG_SCC8530_ADD("scc", APPLE2GS_14M/2, line_cb_t()) @@ -365,7 +365,7 @@ static MACHINE_CONFIG_START( apple2gs, apple2gs_state ) MCFG_RAM_DEFAULT_VALUE(0x00) MCFG_SOFTWARE_LIST_ADD("flop35_list","apple2gs") - MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("flop525_list", "apple2") + MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("flop525_list", "apple2") MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( apple2gsr1, apple2gs ) @@ -376,7 +376,7 @@ static MACHINE_CONFIG_DERIVED( apple2gsr1, apple2gs ) MCFG_M50740_ADD(ADBMICRO_TAG, XTAL_3_579545MHz, adbmicro_intf) #endif - MCFG_RAM_MODIFY(RAM_TAG) + MCFG_RAM_MODIFY(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("1280K") // 256K on board + 1M in the expansion slot was common for ROM 01 MCFG_RAM_EXTRA_OPTIONS("256K,512K,768K,1M,2M,3M,4M,5M,6M,7M,8M") MCFG_RAM_DEFAULT_VALUE(0x00) @@ -389,18 +389,18 @@ MACHINE_CONFIG_END ***************************************************************************/ ROM_START(apple2gs) - // M50740/50741 ADB MCU inside the IIgs system unit + // M50740/50741 ADB MCU inside the IIgs system unit ROM_REGION(0x1000,"m50741",0) ROM_LOAD( "341s0632-2.bin", 0x000000, 0x001000, CRC(e1c11fb0) SHA1(141d18c36a617ab9dce668445440d34354be0672) ) - // i8048 microcontroller inside the IIgs ADB Standard Keyboard - ROM_REGION(0x400, "kmcu", 0) - // from early-production ROM 00 Woz Limited Edition IIgs. keyboard "Part Number 658-4081 825-1301-A" - // ROM is marked "NEC Japan 8626XD 341-0232A 543" so 26th week of 1986 - ROM_LOAD( "341-0232a.bin", 0x000000, 0x000400, CRC(6a158b9f) SHA1(e8744180075182849d431fd8023a52a062a6da76) ) - // from later non-Woz ROM 01. keyboard "Model A9M0330" - // ROM is marked "NEC Japan 8806HD 8048HC610 341-0124-A (c) APPLE 87" so 6th week of 1988 - ROM_LOAD( "341-0124a.bin", 0x000000, 0x000400, CRC(2a3576bf) SHA1(58fbf770d3801a02d0944039829f9241b5279013) ) + // i8048 microcontroller inside the IIgs ADB Standard Keyboard + ROM_REGION(0x400, "kmcu", 0) + // from early-production ROM 00 Woz Limited Edition IIgs. keyboard "Part Number 658-4081 825-1301-A" + // ROM is marked "NEC Japan 8626XD 341-0232A 543" so 26th week of 1986 + ROM_LOAD( "341-0232a.bin", 0x000000, 0x000400, CRC(6a158b9f) SHA1(e8744180075182849d431fd8023a52a062a6da76) ) + // from later non-Woz ROM 01. keyboard "Model A9M0330" + // ROM is marked "NEC Japan 8806HD 8048HC610 341-0124-A (c) APPLE 87" so 6th week of 1988 + ROM_LOAD( "341-0124a.bin", 0x000000, 0x000400, CRC(2a3576bf) SHA1(58fbf770d3801a02d0944039829f9241b5279013) ) ROM_REGION(0x1000,"gfx1",0) ROM_LOAD ( "apple2gs.chr", 0x0000, 0x1000, CRC(91e53cd8) SHA1(34e2443e2ef960a36c047a09ed5a93f471797f89)) /* need label/part number */ @@ -409,16 +409,16 @@ ROM_START(apple2gs) ROM_LOAD("341-0737", 0x0000, 0x20000, CRC(8d410067) SHA1(c0f4704233ead14cb8e1e8a68fbd7063c56afd27)) /* Needs verification; 341-0737: IIgs ROM03 FC-FD */ ROM_LOAD("341-0748", 0x20000, 0x20000, CRC(d4c50550) SHA1(2784cdd7ac7094b3e494409db3e72b4e6d2d9e81)) /* Needs verification; 341-0748: IIgs ROM03 FE-FF */ - ROM_REGION(0x20000, "es5503", ROMREGION_ERASE00) + ROM_REGION(0x20000, "es5503", ROMREGION_ERASE00) ROM_END ROM_START(apple2gsr3p) ROM_REGION(0x1000,"m50741",0) ROM_LOAD( "341s0632-2.bin", 0x000000, 0x001000, CRC(e1c11fb0) SHA1(141d18c36a617ab9dce668445440d34354be0672) ) - ROM_REGION(0x400, "kmcu", 0) - ROM_LOAD( "341-0232a.bin", 0x000000, 0x000400, CRC(6a158b9f) SHA1(e8744180075182849d431fd8023a52a062a6da76) ) - ROM_LOAD( "341-0124a.bin", 0x000000, 0x000400, CRC(2a3576bf) SHA1(58fbf770d3801a02d0944039829f9241b5279013) ) + ROM_REGION(0x400, "kmcu", 0) + ROM_LOAD( "341-0232a.bin", 0x000000, 0x000400, CRC(6a158b9f) SHA1(e8744180075182849d431fd8023a52a062a6da76) ) + ROM_LOAD( "341-0124a.bin", 0x000000, 0x000400, CRC(2a3576bf) SHA1(58fbf770d3801a02d0944039829f9241b5279013) ) ROM_REGION(0x1000,"gfx1",0) ROM_LOAD ( "apple2gs.chr", 0x0000, 0x1000, CRC(91e53cd8) SHA1(34e2443e2ef960a36c047a09ed5a93f471797f89)) /* need label/part number */ @@ -427,16 +427,16 @@ ROM_START(apple2gsr3p) ROM_LOAD("341-0728", 0x0000, 0x20000, NO_DUMP) /* 341-0728: IIgs ROM03 prototype FC-FD */ ROM_LOAD("341-0729", 0x20000, 0x20000, NO_DUMP) /* 341-0729: IIgs ROM03 prototype FE-FF */ - ROM_REGION(0x20000, "es5503", ROMREGION_ERASE00) + ROM_REGION(0x20000, "es5503", ROMREGION_ERASE00) ROM_END ROM_START(apple2gsr3lp) ROM_REGION(0x1000,"m50741",0) ROM_LOAD( "341s0632-2.bin", 0x000000, 0x001000, CRC(e1c11fb0) SHA1(141d18c36a617ab9dce668445440d34354be0672) ) - ROM_REGION(0x400, "kmcu", 0) - ROM_LOAD( "341-0232a.bin", 0x000000, 0x000400, CRC(6a158b9f) SHA1(e8744180075182849d431fd8023a52a062a6da76) ) - ROM_LOAD( "341-0124a.bin", 0x000000, 0x000400, CRC(2a3576bf) SHA1(58fbf770d3801a02d0944039829f9241b5279013) ) + ROM_REGION(0x400, "kmcu", 0) + ROM_LOAD( "341-0232a.bin", 0x000000, 0x000400, CRC(6a158b9f) SHA1(e8744180075182849d431fd8023a52a062a6da76) ) + ROM_LOAD( "341-0124a.bin", 0x000000, 0x000400, CRC(2a3576bf) SHA1(58fbf770d3801a02d0944039829f9241b5279013) ) ROM_REGION(0x1000,"gfx1",0) ROM_LOAD ( "apple2gs.chr", 0x0000, 0x1000, CRC(91e53cd8) SHA1(34e2443e2ef960a36c047a09ed5a93f471797f89)) /* need label/part number */ @@ -445,16 +445,16 @@ ROM_START(apple2gsr3lp) ROM_LOAD("341-0737", 0x0000, 0x20000, CRC(8d410067) SHA1(c0f4704233ead14cb8e1e8a68fbd7063c56afd27)) /* 341-0737: IIgs ROM03 FC-FD */ ROM_LOAD("341-0749", 0x20000, 0x20000, NO_DUMP) /* 341-0749: unknown ?post? ROM03 IIgs prototype? FE-FF */ - ROM_REGION(0x20000, "es5503", ROMREGION_ERASE00) + ROM_REGION(0x20000, "es5503", ROMREGION_ERASE00) ROM_END ROM_START(apple2gsr1) ROM_REGION(0xc00,"m50740",0) ROM_LOAD( "341s0345.bin", 0x000000, 0x000c00, CRC(48cd5779) SHA1(97e421f5247c00a0ca34cd08b6209df573101480) ) - ROM_REGION(0x400, "kmcu", 0) - ROM_LOAD( "341-0232a.bin", 0x000000, 0x000400, CRC(6a158b9f) SHA1(e8744180075182849d431fd8023a52a062a6da76) ) - ROM_LOAD( "341-0124a.bin", 0x000000, 0x000400, CRC(2a3576bf) SHA1(58fbf770d3801a02d0944039829f9241b5279013) ) + ROM_REGION(0x400, "kmcu", 0) + ROM_LOAD( "341-0232a.bin", 0x000000, 0x000400, CRC(6a158b9f) SHA1(e8744180075182849d431fd8023a52a062a6da76) ) + ROM_LOAD( "341-0124a.bin", 0x000000, 0x000400, CRC(2a3576bf) SHA1(58fbf770d3801a02d0944039829f9241b5279013) ) ROM_REGION(0x1000,"gfx1",0) ROM_LOAD ( "apple2gs.chr", 0x0000, 0x1000, CRC(91e53cd8) SHA1(34e2443e2ef960a36c047a09ed5a93f471797f89)) /* need label/part number */ @@ -462,16 +462,16 @@ ROM_START(apple2gsr1) ROM_REGION(0x20000,"maincpu",0) ROM_LOAD("342-0077-b", 0x0000, 0x20000, CRC(42f124b0) SHA1(e4fc7560b69d062cb2da5b1ffbe11cd1ca03cc37)) /* 342-0077-B: IIgs ROM01 */ - ROM_REGION(0x20000, "es5503", ROMREGION_ERASE00) + ROM_REGION(0x20000, "es5503", ROMREGION_ERASE00) ROM_END ROM_START(apple2gsr0) ROM_REGION(0xc00,"m50740",0) ROM_LOAD( "341s0345.bin", 0x000000, 0x000c00, CRC(48cd5779) SHA1(97e421f5247c00a0ca34cd08b6209df573101480) ) - ROM_REGION(0x400, "kmcu", 0) - ROM_LOAD( "341-0232a.bin", 0x000000, 0x000400, CRC(6a158b9f) SHA1(e8744180075182849d431fd8023a52a062a6da76) ) - ROM_LOAD( "341-0124a.bin", 0x000000, 0x000400, CRC(2a3576bf) SHA1(58fbf770d3801a02d0944039829f9241b5279013) ) + ROM_REGION(0x400, "kmcu", 0) + ROM_LOAD( "341-0232a.bin", 0x000000, 0x000400, CRC(6a158b9f) SHA1(e8744180075182849d431fd8023a52a062a6da76) ) + ROM_LOAD( "341-0124a.bin", 0x000000, 0x000400, CRC(2a3576bf) SHA1(58fbf770d3801a02d0944039829f9241b5279013) ) ROM_REGION(0x1000,"gfx1",0) ROM_LOAD ( "apple2gs.chr", 0x0000, 0x1000, CRC(91e53cd8) SHA1(34e2443e2ef960a36c047a09ed5a93f471797f89)) @@ -483,7 +483,7 @@ ROM_START(apple2gsr0) ROM_LOAD("rom0c.bin", 0x10000, 0x8000, CRC(94c32caa) SHA1(4806d50d676b06f5213b181693fc1585956b98bb)) ROM_LOAD("rom0d.bin", 0x18000, 0x8000, CRC(200a15b8) SHA1(0c2890bb169ead63369738bbd5f33b869f24c42a)) - ROM_REGION(0x20000, "es5503", ROMREGION_ERASE00) + ROM_REGION(0x20000, "es5503", ROMREGION_ERASE00) ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ @@ -492,4 +492,3 @@ COMP( 198?, apple2gsr3p, apple2gs, 0, apple2gs, apple2gs, driver_device, 0, COMP( 1989, apple2gsr3lp, apple2gs, 0, apple2gs, apple2gs, driver_device, 0, "Apple Computer", "Apple IIgs (ROM03 late prototype?)", GAME_NOT_WORKING ) COMP( 1987, apple2gsr1, apple2gs, 0, apple2gsr1, apple2gs, driver_device, 0, "Apple Computer", "Apple IIgs (ROM01)", GAME_SUPPORTS_SAVE ) COMP( 1986, apple2gsr0, apple2gs, 0, apple2gsr1, apple2gs, driver_device, 0, "Apple Computer", "Apple IIgs (ROM00)", GAME_SUPPORTS_SAVE ) - diff --git a/src/mess/drivers/apricotp.c b/src/mess/drivers/apricotp.c index 0839ad2fb88..daa33003395 100644 --- a/src/mess/drivers/apricotp.c +++ b/src/mess/drivers/apricotp.c @@ -416,7 +416,7 @@ static APRICOT_KEYBOARD_INTERFACE( kb_intf ) // pic8259_interface pic_intf //------------------------------------------------- - IRQ_CALLBACK_MEMBER(fp_state::fp_irq_callback) + IRQ_CALLBACK_MEMBER(fp_state::fp_irq_callback) { return m_pic->inta_r(); } diff --git a/src/mess/drivers/aquarius.c b/src/mess/drivers/aquarius.c index 793f83cf71e..d60ab73de2b 100644 --- a/src/mess/drivers/aquarius.c +++ b/src/mess/drivers/aquarius.c @@ -5,7 +5,7 @@ TODO: - - slot interface for cartridges + - slot interface for cartridges - hand controllers - scramble RAM also - CAQ tape support diff --git a/src/mess/drivers/b16.c b/src/mess/drivers/b16.c index 66994ac89bb..c6e5f64e87e 100644 --- a/src/mess/drivers/b16.c +++ b/src/mess/drivers/b16.c @@ -250,7 +250,7 @@ void b16_state::machine_reset() static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mess/drivers/binbug.c b/src/mess/drivers/binbug.c index 8cfc8147a82..e6f6b051b2d 100644 --- a/src/mess/drivers/binbug.c +++ b/src/mess/drivers/binbug.c @@ -355,7 +355,7 @@ Port 8 controls some kind of memory protection scheme. The code indicates that B is the page to protect, and A is the code (0x08 = inhibit; 0x0B = unprotect; 0x0C = enable; 0x0E = protect). There are 256 pages so -each page is 256 bytes. +each page is 256 bytes. To turn the clock on (if it was working), put a non-zero into D80D. diff --git a/src/mess/drivers/bml3.c b/src/mess/drivers/bml3.c index e821b71f434..995247e0e85 100644 --- a/src/mess/drivers/bml3.c +++ b/src/mess/drivers/bml3.c @@ -568,7 +568,7 @@ INPUT_PORTS_END static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mess/drivers/c128.c b/src/mess/drivers/c128.c index ffc7d954564..4a63515e07e 100644 --- a/src/mess/drivers/c128.c +++ b/src/mess/drivers/c128.c @@ -1014,7 +1014,7 @@ READ8_MEMBER( c128_state::cia1_pa_r ) // keyboard UINT8 cia1_pb = m_cia1->pb_r(); UINT8 row[8] = { m_row0->read(), m_row1->read() & m_lock->read(), m_row2->read(), m_row3->read(), - m_row4->read(), m_row5->read(), m_row6->read(), m_row7->read() }; + m_row4->read(), m_row5->read(), m_row6->read(), m_row7->read() }; for (int i = 0; i < 8; i++) { @@ -1055,7 +1055,7 @@ READ8_MEMBER( c128_state::cia1_pb_r ) // joystick UINT8 joy_a = m_joy1->joy_r(); - + data &= (0xf0 | (joy_a & 0x0f)); data &= ~(!BIT(joy_a, 5) << 4); diff --git a/src/mess/drivers/c64.c b/src/mess/drivers/c64.c index 14345119482..225624f60c4 100644 --- a/src/mess/drivers/c64.c +++ b/src/mess/drivers/c64.c @@ -608,7 +608,7 @@ READ8_MEMBER( c64_state::cia1_pa_r ) // keyboard UINT8 cia1_pb = m_cia1->pb_r(); UINT8 row[8] = { m_row0->read(), m_row1->read() & m_lock->read(), m_row2->read(), m_row3->read(), - m_row4->read(), m_row5->read(), m_row6->read(), m_row7->read() }; + m_row4->read(), m_row5->read(), m_row6->read(), m_row7->read() }; for (int i = 0; i < 8; i++) { @@ -649,7 +649,7 @@ READ8_MEMBER( c64_state::cia1_pb_r ) // joystick UINT8 joy_a = m_joy1->joy_r(); - + data &= (0xf0 | (joy_a & 0x0f)); data &= ~(!BIT(joy_a, 5) << 4); @@ -711,9 +711,9 @@ READ8_MEMBER( c64gs_state::cia1_pa_r ) PA2 JOY B2 PA3 JOY B3 PA4 BTNB - PA5 - PA6 - PA7 + PA5 + PA6 + PA7 */ @@ -749,7 +749,7 @@ READ8_MEMBER( c64gs_state::cia1_pb_r ) // joystick UINT8 joy_a = m_joy1->joy_r(); - + data &= (0xf0 | (joy_a & 0x0f)); data &= ~(!BIT(joy_a, 5) << 4); diff --git a/src/mess/drivers/cat.c b/src/mess/drivers/cat.c index 2a864522af0..536148d46c7 100644 --- a/src/mess/drivers/cat.c +++ b/src/mess/drivers/cat.c @@ -66,9 +66,9 @@ In MESS, to activate it as above: * simultaneously press both alt keys for a moment and release both (the whole "Enable Forth Language" line will be selected) * press control(use front) and press backspace(ERASE) (If beeping actually worked the cat would beep here) * press control(use front), shift, and space (the cursor should stop blinking) -* press enter and the forth "ok" prompt should appear. you can type 'page' and enter to clear the screen +* press enter and the forth "ok" prompt should appear. you can type 'page' and enter to clear the screen Optional further steps: -* type without quotes "-1 wheel! savesetup re" at the forth prompt to permanently +* type without quotes "-1 wheel! savesetup re" at the forth prompt to permanently enable shift + use front + space to dump to forth mode easily * change the keyboard setting in the setup menu (use front + [ ) to ASCII so you can type < and > * after doing the -1 wheel! thing, you can compile a selected forth program in the editor @@ -177,13 +177,13 @@ ToDo: - (would-be-really-nice-but-totally-unnecessary feature): due to open bus, the svrom1 and svrom2 checksums in diagnostics read as 01A80000 and 01020000 respectively on a real machine (and hence appear inverted/'fail'-state). - This requires sub-cycle accurate 68k open bus emulation to pull off, as well + This requires sub-cycle accurate 68k open bus emulation to pull off, as well as emulating the fact that UDS/LDS are ?not connected? (unclear because this happens inside an asic) for the SVROMS (or the svram or the code roms, for that matter!) - Hook Battery Low input to a dipswitch. - Document what every IPx and OPx bit on the DUART connects to. - + * Swyft - Figure out the keyboard (interrupts are involved? or maybe an NMI on a @@ -307,7 +307,7 @@ public: this causes the DUART to fire an interrupt, which makes the 68000 read the keyboard. */ - UINT16 m_6ms_counter; + UINT16 m_6ms_counter; UINT8 m_video_enable; UINT8 m_video_invert; UINT16 m_pr_cont; @@ -323,18 +323,18 @@ public: /* DRIVER_INIT_MEMBER( cat_state,cat ) { - UINT8 *svrom = machine().root_device().memregion("svrom")->base(); - int i; - // fill svrom with the correct 2e80 pattern except where svrom1 sits - // first half - for (i = 0; i < 0x20000; i+=2) - svrom[i] = 0x2E; - // second half - for (i = 0x20000; i < 0x40000; i+=2) - { - svrom[i] = 0x2E; - svrom[i+1] = 0x80; - } + UINT8 *svrom = machine().root_device().memregion("svrom")->base(); + int i; + // fill svrom with the correct 2e80 pattern except where svrom1 sits + // first half + for (i = 0; i < 0x20000; i+=2) + svrom[i] = 0x2E; + // second half + for (i = 0x20000; i < 0x40000; i+=2) + { + svrom[i] = 0x2E; + svrom[i+1] = 0x80; + } }*/ /* 0x600000-0x65ffff Write: Video Generator (AKA NH4-5001 AKA Gate Array #1 @ IC30) @@ -607,7 +607,7 @@ a23 a22 a21 a20 a19 a18 a17 a16 a15 a14 a13 a12 a11 a10 a9 a8 a7 a6 a5 a4 0 0 1 x x 1 * * * * * * * * * * * * * * * * * 1 R SVROM 1 ic8 (not present on cat as sold, open bus reads as 0x80) [controlled via GA2 /SVCS1] *SEE BELOW* *NOTE: on Dwight E's user-made developer unit, two 128K SRAMS are mapped in place of the two entries immediately above!* (this involves some creative wiring+sockets); the official IAI 'shadow ram board' maps the ram to the A00000-A3FFFF area instead) 0 1 * * * * * * * * * * * * * * * * * * * * * * *BOTH GATE ARRAYS 1 and 2 DECODE THIS AREA; 2 DEALS WITH ADDR AND 1 WITH DATA/CAS/RAS* -0 1 0 x x a b * * * * * * * * * * * * * * * * * RW VIDEO/SYSTEM DRAM (ab: 00=row 0, ic26-29; 01=row 1, ic22-25; 10=row 2; ic18-21; 11=row 3; ic14-17) +0 1 0 x x a b * * * * * * * * * * * * * * * * * RW VIDEO/SYSTEM DRAM (ab: 00=row 0, ic26-29; 01=row 1, ic22-25; 10=row 2; ic18-21; 11=row 3; ic14-17) *NOTE: DRAM rows 2 and 3 above are only usually populated in cat developer units!* 0 1 1 ? ? * * * ? ? ? ? ? ? ? * * * * * * * * x W VIDEO CONTRL REGISTERS (reads as 0x2e80) 1 x x x x x x x x x x x x x x x x x x * * * * * *GATE ARRAY 3 DECODES THIS AREA, GA3 IS ENABLED BY /IOCS1 FROM GA2* @@ -626,7 +626,7 @@ a23 a22 a21 a20 a19 a18 a17 a16 a15 a14 a13 a12 a11 a10 a9 a8 a7 a6 a5 a4 1 0 0 x x 0 1 0 x x x x x x x x x x * * * * * 0 RW {'modem'} Modem Chip AMI S35213 @ IC37 DATA BIT 7 ONLY [controlled via GA2 /SMCS] 1 0 0 x x 0 1 1 x x x x x x x x x x x x x x x * R {'timer'} Read: Fixed 16-bit counter from ga2. increments every 6.5535ms when another 16-bit counter clocked at 10mhz overflows 1 0 0 x x 1 0 0 x x x x x x x x x x x x x x x * W {'opr'} Output Port (Video/Sync enable and watchdog reset?) register (screen enable on bit 3?) (reads as 0x2e80) -1 0 0 x x 1 0 1 x x x x x x x x x x x x x x x * R {'wdt'} Watchdog timer reads as 0x0100 0x0101 or 0x0102, some sort of test register or video status register? +1 0 0 x x 1 0 1 x x x x x x x x x x x x x x x * R {'wdt'} Watchdog timer reads as 0x0100 0x0101 or 0x0102, some sort of test register or video status register? 1 0 0 x x 1 1 0 x x x x x x x x x x x x x x x * R?W {'tcb'} test control bits: powerfail status in bit (reads as 0x0000) 1 0 0 x x 1 1 1 x x x x x x x x x x x x x x x * ? Unknown (reads as 0x2e80) @@ -1010,12 +1010,12 @@ ROM_START( cat ) * populated, as opposed to 256k-standard (2 rows) and 512k-max with all * 4 rows populated on a "released" cat. */ - ROM_SYSTEM_BIOS( 0, "r240", "Canon Cat V2.40 US Firmware") + ROM_SYSTEM_BIOS( 0, "r240", "Canon Cat V2.40 US Firmware") ROMX_LOAD( "boultl0.ic2", 0x00001, 0x10000, CRC(77b66208) SHA1(9D718C0A521FEFE4F86EF328805B7921BADE9D89), ROM_SKIP(1) | ROM_BIOS(1)) ROMX_LOAD( "boulth0.ic4", 0x00000, 0x10000, CRC(f1e1361a) SHA1(0A85385527E2CC55790DE9F9919EB44AC32D7F62), ROM_SKIP(1) | ROM_BIOS(1)) ROMX_LOAD( "boultl1.ic3", 0x20001, 0x10000, CRC(c61dafb0) SHA1(93216c26c2d5fc71412acc548c96046a996ea668), ROM_SKIP(1) | ROM_BIOS(1)) ROMX_LOAD( "boulth1.ic5", 0x20000, 0x10000, CRC(bed1f761) SHA1(D177E1D3A39B005DD94A6BDA186221D597129AF4), ROM_SKIP(1) | ROM_BIOS(1)) - /* This 2.40 code was compiled by Dwight Elvey based on the v2.40 source + /* This 2.40 code was compiled by Dwight Elvey based on the v2.40 source * code disks recovered around 2004. It does NOT exactly match the above * set exactly but has a few small differences. * It is as of yet unknown whether it is earlier or later code than the diff --git a/src/mess/drivers/cbm2.c b/src/mess/drivers/cbm2.c index 227f839cc7e..676d17b85b3 100644 --- a/src/mess/drivers/cbm2.c +++ b/src/mess/drivers/cbm2.c @@ -2732,20 +2732,20 @@ ROM_END // SYSTEM DRIVERS //************************************************************************** -// YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS -COMP( 1983, p500, 0, 0, p500_ntsc, cbm2, driver_device, 0, "Commodore Business Machines", "P500 (NTSC)", GAME_SUPPORTS_SAVE ) -COMP( 1983, p500p, p500, 0, p500_pal, cbm2, driver_device, 0, "Commodore Business Machines", "P500 (PAL)", GAME_SUPPORTS_SAVE ) -COMP( 1983, b500, 0, 0, b128, cbm2, driver_device, 0, "Commodore Business Machines", "B500", GAME_SUPPORTS_SAVE ) -COMP( 1983, b128, b500, 0, b128, cbm2, driver_device, 0, "Commodore Business Machines", "B128", GAME_SUPPORTS_SAVE ) -COMP( 1983, b256, b500, 0, b256, cbm2, driver_device, 0, "Commodore Business Machines", "B256", GAME_SUPPORTS_SAVE ) -COMP( 1983, cbm610, b500, 0, cbm610, cbm2, driver_device, 0, "Commodore Business Machines", "CBM 610", GAME_SUPPORTS_SAVE ) -COMP( 1983, cbm620, b500, 0, cbm620, cbm2, driver_device, 0, "Commodore Business Machines", "CBM 620", GAME_SUPPORTS_SAVE ) -COMP( 1983, cbm620_hu, b500, 0, cbm620, cbm2_hu, driver_device, 0, "Commodore Business Machines", "CBM 620 (Hungary)", GAME_SUPPORTS_SAVE ) -COMP( 1983, b128hp, 0, 0, b128hp, cbm2, driver_device, 0, "Commodore Business Machines", "B128-80HP", GAME_SUPPORTS_SAVE ) -COMP( 1983, b256hp, b128hp, 0, b256hp, cbm2, driver_device, 0, "Commodore Business Machines", "B256-80HP", GAME_SUPPORTS_SAVE ) -COMP( 1983, bx256hp, b128hp, 0, bx256hp, cbm2, driver_device, 0, "Commodore Business Machines", "BX256-80HP", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) // 8088 co-processor is missing -COMP( 1983, cbm710, b128hp, 0, cbm710, cbm2, driver_device, 0, "Commodore Business Machines", "CBM 710", GAME_SUPPORTS_SAVE ) -COMP( 1983, cbm720, b128hp, 0, cbm720, cbm2, driver_device, 0, "Commodore Business Machines", "CBM 720", GAME_SUPPORTS_SAVE ) -COMP( 1983, cbm720_de, b128hp, 0, cbm720, cbm2_de, driver_device, 0, "Commodore Business Machines", "CBM 720 (Germany)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) -COMP( 1983, cbm720_se, b128hp, 0, cbm720, cbm2_se, driver_device, 0, "Commodore Business Machines", "CBM 720 (Sweden/Finland)", GAME_SUPPORTS_SAVE ) -COMP( 1983, cbm730, b128hp, 0, cbm730, cbm2, driver_device, 0, "Commodore Business Machines", "CBM 730", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) // 8088 co-processor is missing +// YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS +COMP( 1983, p500, 0, 0, p500_ntsc, cbm2, driver_device, 0, "Commodore Business Machines", "P500 (NTSC)", GAME_SUPPORTS_SAVE ) +COMP( 1983, p500p, p500, 0, p500_pal, cbm2, driver_device, 0, "Commodore Business Machines", "P500 (PAL)", GAME_SUPPORTS_SAVE ) +COMP( 1983, b500, 0, 0, b128, cbm2, driver_device, 0, "Commodore Business Machines", "B500", GAME_SUPPORTS_SAVE ) +COMP( 1983, b128, b500, 0, b128, cbm2, driver_device, 0, "Commodore Business Machines", "B128", GAME_SUPPORTS_SAVE ) +COMP( 1983, b256, b500, 0, b256, cbm2, driver_device, 0, "Commodore Business Machines", "B256", GAME_SUPPORTS_SAVE ) +COMP( 1983, cbm610, b500, 0, cbm610, cbm2, driver_device, 0, "Commodore Business Machines", "CBM 610", GAME_SUPPORTS_SAVE ) +COMP( 1983, cbm620, b500, 0, cbm620, cbm2, driver_device, 0, "Commodore Business Machines", "CBM 620", GAME_SUPPORTS_SAVE ) +COMP( 1983, cbm620_hu, b500, 0, cbm620, cbm2_hu, driver_device, 0, "Commodore Business Machines", "CBM 620 (Hungary)", GAME_SUPPORTS_SAVE ) +COMP( 1983, b128hp, 0, 0, b128hp, cbm2, driver_device, 0, "Commodore Business Machines", "B128-80HP", GAME_SUPPORTS_SAVE ) +COMP( 1983, b256hp, b128hp, 0, b256hp, cbm2, driver_device, 0, "Commodore Business Machines", "B256-80HP", GAME_SUPPORTS_SAVE ) +COMP( 1983, bx256hp, b128hp, 0, bx256hp, cbm2, driver_device, 0, "Commodore Business Machines", "BX256-80HP", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) // 8088 co-processor is missing +COMP( 1983, cbm710, b128hp, 0, cbm710, cbm2, driver_device, 0, "Commodore Business Machines", "CBM 710", GAME_SUPPORTS_SAVE ) +COMP( 1983, cbm720, b128hp, 0, cbm720, cbm2, driver_device, 0, "Commodore Business Machines", "CBM 720", GAME_SUPPORTS_SAVE ) +COMP( 1983, cbm720_de, b128hp, 0, cbm720, cbm2_de, driver_device, 0, "Commodore Business Machines", "CBM 720 (Germany)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) +COMP( 1983, cbm720_se, b128hp, 0, cbm720, cbm2_se, driver_device, 0, "Commodore Business Machines", "CBM 720 (Sweden/Finland)", GAME_SUPPORTS_SAVE ) +COMP( 1983, cbm730, b128hp, 0, cbm730, cbm2, driver_device, 0, "Commodore Business Machines", "CBM 730", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) // 8088 co-processor is missing diff --git a/src/mess/drivers/clcd.c b/src/mess/drivers/clcd.c index 1bbf5101d44..0e7af199fc1 100644 --- a/src/mess/drivers/clcd.c +++ b/src/mess/drivers/clcd.c @@ -81,7 +81,7 @@ public: { case 0: return m_col0->read(); - + case 1: return m_col1->read(); diff --git a/src/mess/drivers/esq1.c b/src/mess/drivers/esq1.c index 463fdb543a7..30910cb3b55 100644 --- a/src/mess/drivers/esq1.c +++ b/src/mess/drivers/esq1.c @@ -231,7 +231,7 @@ static ADDRESS_MAP_START( esq1_map, AS_PROGRAM, 8, esq1_state ) AM_RANGE(0x0000, 0x1fff) AM_RAM // OSRAM AM_RANGE(0x4000, 0x5fff) AM_RAM // SEQRAM AM_RANGE(0x6000, 0x63ff) AM_DEVREADWRITE("es5503", es5503_device, read, write) - AM_RANGE(0x6400, 0x640f) AM_DEVREADWRITE("duart", duartn68681_device, read, write) + AM_RANGE(0x6400, 0x640f) AM_DEVREADWRITE("duart", duartn68681_device, read, write) AM_RANGE(0x6800, 0x68ff) AM_NOP AM_RANGE(0x7000, 0x7fff) AM_ROMBANK("osbank") @@ -323,7 +323,7 @@ SLOT_INTERFACE_END static const serial_port_interface midiin_intf = { - DEVCB_DEVICE_LINE_MEMBER("duart", duartn68681_device, rx_a_w) // route MIDI Tx send directly to 68681 channel A Rx + DEVCB_DEVICE_LINE_MEMBER("duart", duartn68681_device, rx_a_w) // route MIDI Tx send directly to 68681 channel A Rx }; static SLOT_INTERFACE_START(midiout_slot) @@ -332,7 +332,7 @@ SLOT_INTERFACE_END static const serial_port_interface midiout_intf = { - DEVCB_NULL // midi out ports don't transmit inward + DEVCB_NULL // midi out ports don't transmit inward }; static const duartn68681_config duart_config = diff --git a/src/mess/drivers/esq5505.c b/src/mess/drivers/esq5505.c index e108be87323..4fae3c4a6de 100644 --- a/src/mess/drivers/esq5505.c +++ b/src/mess/drivers/esq5505.c @@ -192,29 +192,29 @@ static SLOT_INTERFACE_START( ensoniq_floppies ) SLOT_INTERFACE_END static int maincpu_irq_acknowledge_callback(device_t *device, int irqnum) { - // We immediately update the interrupt presented to the CPU, so that it doesn't - // end up retrying the same interrupt over and over. We then return the appropriate vector. - esq5505_state *esq5505 = device->machine().driver_data(); - int vector = 0; - switch(irqnum) { - case 1: - esq5505->otis_irq_state = 0; - vector = M68K_INT_ACK_AUTOVECTOR; - break; - case 2: - esq5505->dmac_irq_state = 0; - vector = esq5505->dmac_irq_vector; - break; - case 3: - esq5505->duart_irq_state = 0; - vector = esq5505->duart_irq_vector; - break; - default: - printf("\nUnexpected IRQ ACK Callback: IRQ %d\n", irqnum); - return 0; - } - esq5505->update_irq_to_maincpu(); - return vector; + // We immediately update the interrupt presented to the CPU, so that it doesn't + // end up retrying the same interrupt over and over. We then return the appropriate vector. + esq5505_state *esq5505 = device->machine().driver_data(); + int vector = 0; + switch(irqnum) { + case 1: + esq5505->otis_irq_state = 0; + vector = M68K_INT_ACK_AUTOVECTOR; + break; + case 2: + esq5505->dmac_irq_state = 0; + vector = esq5505->dmac_irq_vector; + break; + case 3: + esq5505->duart_irq_state = 0; + vector = esq5505->duart_irq_vector; + break; + default: + printf("\nUnexpected IRQ ACK Callback: IRQ %d\n", irqnum); + return 0; + } + esq5505->update_irq_to_maincpu(); + return vector; } void esq5505_state::machine_reset() @@ -225,24 +225,24 @@ void esq5505_state::machine_reset() } void esq5505_state::update_irq_to_maincpu() { - //printf("\nupdating IRQ state: have OTIS=%d, DMAC=%d, DUART=%d\n", otis_irq_state, dmac_irq_state, duart_irq_state); - if (duart_irq_state) { - m_maincpu->set_input_line(M68K_IRQ_2, CLEAR_LINE); - m_maincpu->set_input_line(M68K_IRQ_1, CLEAR_LINE); - m_maincpu->set_input_line_and_vector(M68K_IRQ_3, ASSERT_LINE, duart_irq_vector); - } else if (dmac_irq_state) { - m_maincpu->set_input_line(M68K_IRQ_3, CLEAR_LINE); - m_maincpu->set_input_line(M68K_IRQ_1, CLEAR_LINE); - m_maincpu->set_input_line_and_vector(M68K_IRQ_2, ASSERT_LINE, dmac_irq_vector); - } else if (otis_irq_state) { - m_maincpu->set_input_line(M68K_IRQ_3, CLEAR_LINE); - m_maincpu->set_input_line(M68K_IRQ_2, CLEAR_LINE); - m_maincpu->set_input_line(M68K_IRQ_1, ASSERT_LINE); - } else { - m_maincpu->set_input_line(M68K_IRQ_3, CLEAR_LINE); - m_maincpu->set_input_line(M68K_IRQ_2, CLEAR_LINE); - m_maincpu->set_input_line(M68K_IRQ_1, CLEAR_LINE); - } + //printf("\nupdating IRQ state: have OTIS=%d, DMAC=%d, DUART=%d\n", otis_irq_state, dmac_irq_state, duart_irq_state); + if (duart_irq_state) { + m_maincpu->set_input_line(M68K_IRQ_2, CLEAR_LINE); + m_maincpu->set_input_line(M68K_IRQ_1, CLEAR_LINE); + m_maincpu->set_input_line_and_vector(M68K_IRQ_3, ASSERT_LINE, duart_irq_vector); + } else if (dmac_irq_state) { + m_maincpu->set_input_line(M68K_IRQ_3, CLEAR_LINE); + m_maincpu->set_input_line(M68K_IRQ_1, CLEAR_LINE); + m_maincpu->set_input_line_and_vector(M68K_IRQ_2, ASSERT_LINE, dmac_irq_vector); + } else if (otis_irq_state) { + m_maincpu->set_input_line(M68K_IRQ_3, CLEAR_LINE); + m_maincpu->set_input_line(M68K_IRQ_2, CLEAR_LINE); + m_maincpu->set_input_line(M68K_IRQ_1, ASSERT_LINE); + } else { + m_maincpu->set_input_line(M68K_IRQ_3, CLEAR_LINE); + m_maincpu->set_input_line(M68K_IRQ_2, CLEAR_LINE); + m_maincpu->set_input_line(M68K_IRQ_1, CLEAR_LINE); + } } READ16_MEMBER(esq5505_state::lower_r) @@ -252,17 +252,17 @@ READ16_MEMBER(esq5505_state::lower_r) // get pointers when 68k resets if (!m_rom) { - m_rom = (UINT16 *)(void *)machine().root_device().memregion("osrom")->base(); - m_ram = (UINT16 *)(void *)machine().root_device().memshare("osram")->ptr(); + m_rom = (UINT16 *)(void *)machine().root_device().memregion("osrom")->base(); + m_ram = (UINT16 *)(void *)machine().root_device().memshare("osram")->ptr(); } - if (m68k_get_fc(m_maincpu) == 0x6) // supervisor mode = ROM + if (m68k_get_fc(m_maincpu) == 0x6) // supervisor mode = ROM { - return m_rom[offset]; + return m_rom[offset]; } else { - return m_ram[offset]; + return m_ram[offset]; } } @@ -360,10 +360,10 @@ static UINT16 esq5505_read_adc(device_t *device) return 0x7fff; case 2: // volume control - return 0xffff; + return 0xffff; case 3: // pedal - return 0xffff; + return 0xffff; case 5: // mod wheel return 0xffff; @@ -390,7 +390,7 @@ WRITE_LINE_MEMBER(esq5505_state::duart_irq_handler) } else { - duart_irq_state = 0; + duart_irq_state = 0; } update_irq_to_maincpu(); }; @@ -446,20 +446,20 @@ WRITE8_MEMBER(esq5505_state::duart_output) bit 7 = SACK (?) */ - if (data & 0x40) { - if (!m_esp->input_state(es5510_device::ES5510_HALT)) { + if (data & 0x40) { + if (!m_esp->input_state(es5510_device::ES5510_HALT)) { logerror("ESQ5505: Asserting ESPHALT\n"); m_esp->set_input_line(es5510_device::ES5510_HALT, ASSERT_LINE); - } - } else { - if (m_esp->input_state(es5510_device::ES5510_HALT)) { + } + } else { + if (m_esp->input_state(es5510_device::ES5510_HALT)) { logerror("ESQ5505: Clearing ESPHALT\n"); m_esp->set_input_line(es5510_device::ES5510_HALT, CLEAR_LINE); - } - } + } + } - if (floppy) - { + if (floppy) + { if (m_system_type == EPS) { floppy->ss_w((data & 2)>>1); @@ -566,13 +566,13 @@ INPUT_CHANGED_MEMBER(esq5505_state::key_stroke) shift += 32; printf("New shift %d\n", shift); } - else if (val == 0x02) + else if (val == 0x02) { - printf("Analog tests!\n"); - m_panel->xmit_char(54 | 0x80); m_panel->xmit_char(0); // Preset down - m_panel->xmit_char(8 | 0x80); m_panel->xmit_char(0); // Compare down - m_panel->xmit_char(8); m_panel->xmit_char(0); // Compare up - m_panel->xmit_char(54); m_panel->xmit_char(0); // Preset up + printf("Analog tests!\n"); + m_panel->xmit_char(54 | 0x80); m_panel->xmit_char(0); // Preset down + m_panel->xmit_char(8 | 0x80); m_panel->xmit_char(0); // Compare down + m_panel->xmit_char(8); m_panel->xmit_char(0); // Compare up + m_panel->xmit_char(54); m_panel->xmit_char(0); // Preset up } } } @@ -611,7 +611,7 @@ static const es5505_interface es5505_config = "waverom", /* Bank 0 */ "waverom2", /* Bank 1 */ esq5505_otis_irq, /* irq */ - esq5505_read_adc + esq5505_read_adc }; static const esqpanel_interface esqpanel_config = @@ -625,7 +625,7 @@ SLOT_INTERFACE_END static const serial_port_interface midiin_intf = { - DEVCB_DEVICE_LINE_MEMBER("duart", duartn68681_device, rx_a_w) // route MIDI Tx send directly to 68681 channel A Rx + DEVCB_DEVICE_LINE_MEMBER("duart", duartn68681_device, rx_a_w) // route MIDI Tx send directly to 68681 channel A Rx }; static SLOT_INTERFACE_START(midiout_slot) @@ -634,7 +634,7 @@ SLOT_INTERFACE_END static const serial_port_interface midiout_intf = { - DEVCB_NULL // midi out ports don't transmit inward + DEVCB_NULL // midi out ports don't transmit inward }; static MACHINE_CONFIG_START( vfx, esq5505_state ) diff --git a/src/mess/drivers/esqkt.c b/src/mess/drivers/esqkt.c index 9d0d8859672..52a4a73b58b 100644 --- a/src/mess/drivers/esqkt.c +++ b/src/mess/drivers/esqkt.c @@ -435,7 +435,7 @@ SLOT_INTERFACE_END static const serial_port_interface midiin_intf = { - DEVCB_DEVICE_LINE_MEMBER("duart", duartn68681_device, rx_a_w) // route MIDI Tx send directly to 68681 channel A Rx + DEVCB_DEVICE_LINE_MEMBER("duart", duartn68681_device, rx_a_w) // route MIDI Tx send directly to 68681 channel A Rx }; static SLOT_INTERFACE_START(midiout_slot) @@ -444,7 +444,7 @@ SLOT_INTERFACE_END static const serial_port_interface midiout_intf = { - DEVCB_NULL // midi out ports don't transmit inward + DEVCB_NULL // midi out ports don't transmit inward }; static MACHINE_CONFIG_START( kt, esqkt_state ) diff --git a/src/mess/drivers/fp1100.c b/src/mess/drivers/fp1100.c index f0e36eadf08..c2fd8ab888b 100644 --- a/src/mess/drivers/fp1100.c +++ b/src/mess/drivers/fp1100.c @@ -385,7 +385,7 @@ static const UPD7810_CONFIG fp1100_slave_cpu_config = { TYPE_7801, NULL }; static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ fp1100_update_row, /* row update callback */ diff --git a/src/mess/drivers/fp6000.c b/src/mess/drivers/fp6000.c index 2276d356177..ee8d4f30774 100644 --- a/src/mess/drivers/fp6000.c +++ b/src/mess/drivers/fp6000.c @@ -283,7 +283,7 @@ void fp6000_state::machine_reset() static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mess/drivers/gb.c b/src/mess/drivers/gb.c index d894ad8cd6c..5c34ebbf8e9 100644 --- a/src/mess/drivers/gb.c +++ b/src/mess/drivers/gb.c @@ -618,7 +618,7 @@ static ADDRESS_MAP_START(megaduck_map, AS_PROGRAM, 8, megaduck_state ) AM_RANGE(0x0000, 0x7fff) AM_READWRITE(cart_r, bank1_w) AM_RANGE(0x8000, 0x9fff) AM_READWRITE(gb_vram_r, gb_vram_w ) /* 8k VRAM */ AM_RANGE(0xa000, 0xafff) AM_NOP /* unused? */ - AM_RANGE(0xb000, 0xb000) AM_WRITE(bank2_w) + AM_RANGE(0xb000, 0xb000) AM_WRITE(bank2_w) AM_RANGE(0xb001, 0xbfff) AM_NOP /* unused? */ AM_RANGE(0xc000, 0xfe9f) AM_RAM /* 8k low RAM, echo RAM */ AM_RANGE(0xfe00, 0xfeff) AM_READWRITE(gb_oam_r, gb_oam_w ) /* OAM RAM */ diff --git a/src/mess/drivers/gba.c b/src/mess/drivers/gba.c index 36581fc0297..d1ed29eef90 100644 --- a/src/mess/drivers/gba.c +++ b/src/mess/drivers/gba.c @@ -1325,7 +1325,7 @@ WRITE32_MEMBER(gba_state::gba_io_w) } if( (mem_mask) & 0x00ff0000 ) { - gb_sound_w(m_gbsound, space, 1, data>>16); // SOUND1CNT_H + gb_sound_w(m_gbsound, space, 1, data>>16); // SOUND1CNT_H } if( (mem_mask) & 0xff000000 ) { @@ -1339,7 +1339,7 @@ WRITE32_MEMBER(gba_state::gba_io_w) } if( (mem_mask) & 0x0000ff00 ) { - gb_sound_w(m_gbsound, space, 4, data>>8); // SOUND1CNT_H + gb_sound_w(m_gbsound, space, 4, data>>8); // SOUND1CNT_H } break; case 0x0068/4: @@ -1369,7 +1369,7 @@ WRITE32_MEMBER(gba_state::gba_io_w) } if( (mem_mask) & 0x00ff0000 ) { - gb_sound_w(m_gbsound, space, 0xb, data>>16); // SOUND1CNT_H + gb_sound_w(m_gbsound, space, 0xb, data>>16); // SOUND1CNT_H } if( (mem_mask) & 0xff000000 ) { diff --git a/src/mess/drivers/m20.c b/src/mess/drivers/m20.c index 78b4ac2a31b..7d6b81f7045 100644 --- a/src/mess/drivers/m20.c +++ b/src/mess/drivers/m20.c @@ -836,7 +836,7 @@ void m20_state::machine_reset() static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 16, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mess/drivers/mac.c b/src/mess/drivers/mac.c index 3f1d986a491..7c6d0fa1663 100644 --- a/src/mess/drivers/mac.c +++ b/src/mess/drivers/mac.c @@ -39,7 +39,7 @@ 'g 6802c73c' to get to the interesting part (wait past the boot chime). PPC register r24 is the 68000 PC. when the PC hits GetCPUID, the move.l (a2), d0 at PC = 0x10000 will cause an MMU fault (jump to 0xFFF00300). why? a2 = 0x5ffffffc (the CPU ID register). MMU is unable to resolve this; defect in the MMU emulation probable. - + ****************************************************************************/ diff --git a/src/mess/drivers/megadriv.c b/src/mess/drivers/megadriv.c index f6c58d87705..ca9a6a5a609 100644 --- a/src/mess/drivers/megadriv.c +++ b/src/mess/drivers/megadriv.c @@ -297,7 +297,7 @@ static MACHINE_RESET( ms_megadriv ) static SLOT_INTERFACE_START(md_cart) SLOT_INTERFACE_INTERNAL("rom", MD_STD_ROM) SLOT_INTERFACE_INTERNAL("rom_svp", MD_STD_ROM) -// SLOT_INTERFACE_INTERNAL("rom_svp", MD_ROM_SVP) // not ready yet... +// SLOT_INTERFACE_INTERNAL("rom_svp", MD_ROM_SVP) // not ready yet... SLOT_INTERFACE_INTERNAL("rom_sk", MD_ROM_SK) // NVRAM handling SLOT_INTERFACE_INTERNAL("rom_sram", MD_ROM_SRAM) @@ -468,7 +468,7 @@ DEVICE_IMAGE_LOAD_MEMBER( md_base_state, _32x_cart ) UINT16 *ROM16; UINT32 *ROM32; int i; - + if (image.software_entry() == NULL) { length = image.length(); @@ -481,23 +481,23 @@ DEVICE_IMAGE_LOAD_MEMBER( md_base_state, _32x_cart ) temp_copy = auto_alloc_array(image.device().machine(), UINT8, length); memcpy(temp_copy, image.get_software_region("rom"), length); } - + /* Copy the cart image in the locations the driver expects */ // Notice that, by using pick_integer, we are sure the code works on both LE and BE machines ROM16 = (UINT16 *) image.device().machine().root_device().memregion("gamecart")->base(); for (i = 0; i < length; i += 2) ROM16[i / 2] = pick_integer_be(temp_copy, i, 2); - + ROM32 = (UINT32 *) image.device().machine().root_device().memregion("gamecart_sh2")->base(); for (i = 0; i < length; i += 4) ROM32[i / 4] = pick_integer_be(temp_copy, i, 4); - + ROM16 = (UINT16 *) image.device().machine().root_device().memregion("maincpu")->base(); for (i = 0x00; i < length; i += 2) ROM16[i / 2] = pick_integer_be(temp_copy, i, 2); - + auto_free(image.device().machine(), temp_copy); - + return IMAGE_INIT_PASS; } diff --git a/src/mess/drivers/microvsn.c b/src/mess/drivers/microvsn.c index 0d6153471a9..97d1fd7f4e8 100644 --- a/src/mess/drivers/microvsn.c +++ b/src/mess/drivers/microvsn.c @@ -80,8 +80,8 @@ public: }; cpu_type m_cpu_type; - pcb_type m_pcb_type; - rc_type m_rc_type; + pcb_type m_pcb_type; + rc_type m_rc_type; protected: required_device m_dac; @@ -191,7 +191,7 @@ MACHINE_RESET_MEMBER(microvision_state, microvision) break; case RC_TYPE_100PF_23_2K: - case RC_TYPE_UNKNOWN: // Default to most occuring setting + case RC_TYPE_UNKNOWN: // Default to most occuring setting static_set_clock( m_tms1100, 500000 ); break; diff --git a/src/mess/drivers/multi16.c b/src/mess/drivers/multi16.c index b885ea526c5..30871f718e7 100644 --- a/src/mess/drivers/multi16.c +++ b/src/mess/drivers/multi16.c @@ -149,7 +149,7 @@ void multi16_state::machine_reset() static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mess/drivers/multi8.c b/src/mess/drivers/multi8.c index d8cfdc26d85..4413bb516c4 100644 --- a/src/mess/drivers/multi8.c +++ b/src/mess/drivers/multi8.c @@ -560,7 +560,7 @@ GFXDECODE_END static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mess/drivers/myb3k.c b/src/mess/drivers/myb3k.c index d205b6c5c56..97d9ca79f57 100644 --- a/src/mess/drivers/myb3k.c +++ b/src/mess/drivers/myb3k.c @@ -233,7 +233,7 @@ GFXDECODE_END static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mess/drivers/mycom.c b/src/mess/drivers/mycom.c index 35deaaa1751..e369801f282 100644 --- a/src/mess/drivers/mycom.c +++ b/src/mess/drivers/mycom.c @@ -333,17 +333,17 @@ GFXDECODE_END static MC6845_INTERFACE( mc6845_intf ) { - "screen", /* screen we are acting on */ - false, /* show border area */ - 8, /* number of pixels per video memory address */ - NULL, /* before pixel update callback */ - mycom_update_row, /* row update callback */ - NULL, /* after pixel update callback */ - DEVCB_NULL, /* callback for display state changes */ - DEVCB_NULL, /* callback for cursor state changes */ - DEVCB_NULL, /* HSYNC callback */ - DEVCB_NULL, /* VSYNC callback */ - NULL /* update address callback */ + "screen", /* screen we are acting on */ + false, /* show border area */ + 8, /* number of pixels per video memory address */ + NULL, /* before pixel update callback */ + mycom_update_row, /* row update callback */ + NULL, /* after pixel update callback */ + DEVCB_NULL, /* callback for display state changes */ + DEVCB_NULL, /* callback for cursor state changes */ + DEVCB_NULL, /* HSYNC callback */ + DEVCB_NULL, /* VSYNC callback */ + NULL /* update address callback */ }; WRITE8_MEMBER( mycom_state::mycom_04_w ) diff --git a/src/mess/drivers/mz2500.c b/src/mess/drivers/mz2500.c index f244ae2c80d..ecd44b20af2 100644 --- a/src/mess/drivers/mz2500.c +++ b/src/mess/drivers/mz2500.c @@ -1849,8 +1849,8 @@ static GFXDECODE_START( mz2500 ) GFXDECODE_ENTRY("kanji", 0, mz2500_cg_layout, 0, 256) GFXDECODE_ENTRY("kanji", 0x4400, mz2500_8_layout, 0, 256) GFXDECODE_ENTRY("kanji", 0, mz2500_16_layout, 0, 256) -// GFXDECODE_ENTRY("pcg", 0, mz2500_pcg_layout_1bpp, 0, 0x10) -// GFXDECODE_ENTRY("pcg", 0, mz2500_pcg_layout_3bpp, 0, 4) +// GFXDECODE_ENTRY("pcg", 0, mz2500_pcg_layout_1bpp, 0, 0x10) +// GFXDECODE_ENTRY("pcg", 0, mz2500_pcg_layout_3bpp, 0, 4) GFXDECODE_END INTERRUPT_GEN_MEMBER(mz2500_state::mz2500_vbl) diff --git a/src/mess/drivers/odyssey2.c b/src/mess/drivers/odyssey2.c index ed0a0f82d9b..08e4578a032 100644 --- a/src/mess/drivers/odyssey2.c +++ b/src/mess/drivers/odyssey2.c @@ -96,7 +96,7 @@ protected: required_ioport m_key5; required_ioport m_joy0; required_ioport m_joy1; - + void switch_banks(); }; @@ -104,7 +104,7 @@ class g7400_state : public odyssey2_state { public: g7400_state(const machine_config &mconfig, device_type type, const char *tag) - : odyssey2_state(mconfig, type, tag) + : odyssey2_state(mconfig, type, tag) , m_i8243(*this, "i8243") , m_ef9340_1(*this, "ef9340_1") { } @@ -246,7 +246,7 @@ const UINT8 odyssey2_colors[] = /* Background,Grid Dim */ 0x00,0x00,0x00, /* Black */ // i r g b 0x13,0x35,0xA5, /* Blue - Calibrated To Real VideoPac */ // i r g B - 0x02,0x70,0x02, /* Green - Calibrated To Real VideoPac */ // i r G b + 0x02,0x70,0x02, /* Green - Calibrated To Real VideoPac */ // i r G b 0x38,0x85,0x8C, /* Blue-Green - Calibrated To Real VideoPac */ // i r G B 0x91,0x00,0x00, /* Dk Red - Calibrated To Real VideoPac */ // i R g b 0x86,0x49,0xA3, /* Violet - Calibrated To Real VideoPac */ // i R g B @@ -258,7 +258,7 @@ const UINT8 odyssey2_colors[] = 0x60,0x89,0xDB, /* Ltr Blue - Calibrated To Real VideoPac */ // I R g B 0x54,0xBF,0x54, /* Lt Green - Calibrated To Real VideoPac */ // I R g B 0x6B,0xDD,0xF4, /* Lt Blue - Calibrated To Real VideoPac */ // I R g b - 0xE5,0x5E,0x5E, /* Red - Calibrated To Real VideoPac */ // I R g b + 0xE5,0x5E,0x5E, /* Red - Calibrated To Real VideoPac */ // I R g b 0xD9,0x83,0xDB, /* Lt Violet - Calibrated To Real VideoPac */ // I R g B 0xC4,0xBD,0x5C, /* Lt Yellow - Calibrated To Real VideoPac */ // I R G b 0xFF,0xFF,0xFF, /* White */ // I R G B @@ -283,7 +283,7 @@ void g7400_state::palette_init() 0x49,0x49,0x49, 0x49,0x49,0xff, 0x49,0xff,0x49, 0x49,0xff,0xff, 0xff,0x49,0x49, 0xff,0x49,0xff, 0xff,0xff,0x49, 0xff,0xff,0xff - + }; for ( int i = 0; i < 16; i++ ) diff --git a/src/mess/drivers/paso1600.c b/src/mess/drivers/paso1600.c index 3d152ab4926..9d2c10b6a87 100644 --- a/src/mess/drivers/paso1600.c +++ b/src/mess/drivers/paso1600.c @@ -263,7 +263,7 @@ GFXDECODE_END static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mess/drivers/pasopia.c b/src/mess/drivers/pasopia.c index 4e88bc37314..0159cf33b81 100644 --- a/src/mess/drivers/pasopia.c +++ b/src/mess/drivers/pasopia.c @@ -303,17 +303,17 @@ static Z80PIO_INTERFACE( z80pio_intf ) static MC6845_INTERFACE( mc6845_intf ) { - "screen", /* screen we are acting on */ - false, /* show border area */ - 8, /* number of pixels per video memory address */ - NULL, /* before pixel update callback */ + "screen", /* screen we are acting on */ + false, /* show border area */ + 8, /* number of pixels per video memory address */ + NULL, /* before pixel update callback */ pasopia_update_row, /* row update callback */ - NULL, /* after pixel update callback */ - DEVCB_NULL, /* callback for display state changes */ - DEVCB_NULL, /* callback for cursor state changes */ - DEVCB_NULL, /* HSYNC callback */ - DEVCB_NULL, /* VSYNC callback */ - NULL /* update address callback */ + NULL, /* after pixel update callback */ + DEVCB_NULL, /* callback for display state changes */ + DEVCB_NULL, /* callback for cursor state changes */ + DEVCB_NULL, /* HSYNC callback */ + DEVCB_NULL, /* VSYNC callback */ + NULL /* update address callback */ }; static const gfx_layout p7_chars_8x8 = diff --git a/src/mess/drivers/pasopia7.c b/src/mess/drivers/pasopia7.c index efb5c2a30e4..44eb2ed0138 100644 --- a/src/mess/drivers/pasopia7.c +++ b/src/mess/drivers/pasopia7.c @@ -726,7 +726,7 @@ GFXDECODE_END static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mess/drivers/pet.c b/src/mess/drivers/pet.c index 9637c610524..2c3c4febe54 100644 --- a/src/mess/drivers/pet.c +++ b/src/mess/drivers/pet.c @@ -707,9 +707,9 @@ static MACHINE_CONFIG_START( pet_general, pet_state ) MCFG_PIA6821_ADD( "pia_0", pet_pia0) MCFG_PIA6821_ADD( "pia_1", pet_pia1) - /* software lists */ - MCFG_SOFTWARE_LIST_ADD("rom_list", "pet_rom") - MCFG_SOFTWARE_LIST_ADD("flop_list", "pet_flop") + /* software lists */ + MCFG_SOFTWARE_LIST_ADD("rom_list", "pet_rom") + MCFG_SOFTWARE_LIST_ADD("flop_list", "pet_flop") MACHINE_CONFIG_END @@ -818,12 +818,12 @@ static MACHINE_CONFIG_DERIVED( superpet, pet80 ) MCFG_PIA6821_MODIFY( "pia_0", petb_pia0 ) - MCFG_SOFTWARE_LIST_ADD("flop_list2", "superpet_flop") + MCFG_SOFTWARE_LIST_ADD("flop_list2", "superpet_flop") MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( cbm8296, pet80pal ) - MCFG_SOFTWARE_LIST_ADD("flop_list2", "cbm8296_flop") + MCFG_SOFTWARE_LIST_ADD("flop_list2", "cbm8296_flop") MACHINE_CONFIG_END diff --git a/src/mess/drivers/pet2001.c b/src/mess/drivers/pet2001.c index 6a1eca61ff7..373141ea7e3 100644 --- a/src/mess/drivers/pet2001.c +++ b/src/mess/drivers/pet2001.c @@ -130,23 +130,23 @@ ROM sockets: UA3 2K or 4K character /* - TODO: - - - accurate video timing for non-CRTC models - - PET 4000-12 (40 column CRTC models) - - High Speed Graphics board - - keyboard layouts - - Swedish - - German - - SuperPET - - 6809 - - OS/9 MMU - - 8096 - - 64k expansion - - 8296 - - PLA dumps - - high resolution graphics - - rom software list + TODO: + + - accurate video timing for non-CRTC models + - PET 4000-12 (40 column CRTC models) + - High Speed Graphics board + - keyboard layouts + - Swedish + - German + - SuperPET + - 6809 + - OS/9 MMU + - 8096 + - 64k expansion + - 8296 + - PLA dumps + - high resolution graphics + - rom software list */ @@ -196,7 +196,7 @@ READ8_MEMBER( pet_state::read ) switch (sel) { - case SEL0: case SEL1: case SEL2: case SEL3: case SEL4: case SEL5: case SEL6: case SEL7: + case SEL0: case SEL1: case SEL2: case SEL3: case SEL4: case SEL5: case SEL6: case SEL7: if (offset < m_ram->size()) { data = m_ram->pointer()[offset]; @@ -255,7 +255,7 @@ WRITE8_MEMBER( pet_state::write ) switch (sel) { - case SEL0: case SEL1: case SEL2: case SEL3: case SEL4: case SEL5: case SEL6: case SEL7: + case SEL0: case SEL1: case SEL2: case SEL3: case SEL4: case SEL5: case SEL6: case SEL7: if (offset < m_ram->size()) { m_ram->pointer()[offset] = data; @@ -582,10 +582,10 @@ READ8_MEMBER( pet_state::via_pb_r ) bit description PB0 _NDAC IN - PB1 - PB2 - PB3 - PB4 + PB1 + PB2 + PB3 + PB4 PB5 SYNC IN PB6 _NRFD IN PB7 _DAV IN @@ -611,14 +611,14 @@ WRITE8_MEMBER( pet_state::via_pb_w ) bit description - PB0 + PB0 PB1 _NRFD OUT PB2 _ATN OUT PB3 CASS WRITE PB4 #2 CASS MOTOR - PB5 - PB6 - PB7 + PB5 + PB6 + PB7 */ @@ -726,9 +726,9 @@ WRITE8_MEMBER( pet_state::pia1_pa_w ) PA1 KEY B PA2 KEY C PA3 KEY D - PA4 - PA5 - PA6 + PA4 + PA5 + PA6 PA7 SPEAKER */ @@ -1871,33 +1871,33 @@ ROM_END // SYSTEM DRIVERS //************************************************************************** -// YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS -COMP( 1977, pet2001, 0, 0, pet2001, pet, driver_device, 0, "Commodore Business Machines", "PET 2001-4", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) -COMP( 1977, pet20018, pet2001, 0, pet20018, pet, driver_device, 0, "Commodore Business Machines", "PET 2001-8", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) -COMP( 1979, pet2001n, 0, 0, pet2001n8, pet, driver_device, 0, "Commodore Business Machines", "PET 2001-N8", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) -COMP( 1979, pet2001n16, pet2001n, 0, pet2001n16, pet, driver_device, 0, "Commodore Business Machines", "PET 2001-N16", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) -COMP( 1979, pet2001n32, pet2001n, 0, pet2001n32, pet, driver_device, 0, "Commodore Business Machines", "PET 2001-N32", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) -COMP( 1979, cbm3008, pet2001n, 0, cbm3008, pet, driver_device, 0, "Commodore Business Machines", "CBM 3008", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) -COMP( 1979, cbm3016, pet2001n, 0, cbm3016, pet, driver_device, 0, "Commodore Business Machines", "CBM 3016", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) -COMP( 1979, cbm3032, pet2001n, 0, cbm3032, pet, driver_device, 0, "Commodore Business Machines", "CBM 3032", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) -COMP( 1979, pet2001b, 0, 0, pet2001b8, petb, driver_device, 0, "Commodore Business Machines", "PET 2001-B8", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) -COMP( 1979, pet2001b16, pet2001b, 0, pet2001b16, petb, driver_device, 0, "Commodore Business Machines", "PET 2001-B16", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) -COMP( 1979, pet2001b32, pet2001b, 0, pet2001b32, petb, driver_device, 0, "Commodore Business Machines", "PET 2001-B32", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) -COMP( 1979, cbm3032b, pet2001b, 0, cbm3032b, petb, driver_device, 0, "Commodore Business Machines", "CBM 3032B", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) -COMP( 1980, pet4016, 0, 0, pet4016, pet, driver_device, 0, "Commodore Business Machines", "PET 4016", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) -COMP( 1980, pet4032, pet4016, 0, pet4032, pet, driver_device, 0, "Commodore Business Machines", "PET 4032", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) -COMP( 1980, cbm4016, pet4016, 0, cbm4016, pet, driver_device, 0, "Commodore Business Machines", "CBM 4016", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) -COMP( 1980, cbm4032, pet4016, 0, cbm4032, pet, driver_device, 0, "Commodore Business Machines", "CBM 4032", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) -COMP( 1980, pet4032b, 0, 0, pet4032b, petb, driver_device, 0, "Commodore Business Machines", "PET 4032B", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) -COMP( 1980, cbm4032b, pet4032b, 0, cbm4032b, petb, driver_device, 0, "Commodore Business Machines", "CBM 4032B", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) -COMP( 1980, pet8032, 0, 0, pet8032, petb, driver_device, 0, "Commodore Business Machines", "PET 8032", GAME_SUPPORTS_SAVE ) -COMP( 1981, cbm8032, pet8032, 0, pet8032, petb, driver_device, 0, "Commodore Business Machines", "CBM 8032", GAME_SUPPORTS_SAVE ) -COMP( 1981, cbm8032_de, pet8032, 0, pet8032, petb_de, driver_device, 0, "Commodore Business Machines", "CBM 8032 (Germany)", GAME_SUPPORTS_SAVE ) -COMP( 1981, cbm8032_se, pet8032, 0, pet8032, petb_se, driver_device, 0, "Commodore Business Machines", "CBM 8032 (Sweden/Finland)", GAME_SUPPORTS_SAVE ) -COMP( 1981, superpet, pet8032, 0, superpet, petb, driver_device, 0, "Commodore Business Machines", "SuperPET SP-9000", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) -COMP( 1981, mmf9000, pet8032, 0, superpet, petb, driver_device, 0, "Commodore Business Machines", "MicroMainFrame 9000", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) -COMP( 1981, mmf9000_se, pet8032, 0, superpet, petb_se, driver_device, 0, "Commodore Business Machines", "MicroMainFrame 9000 (Sweden/Finland)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) -COMP( 1981, cbm8096, pet8032, 0, cbm8096, petb, driver_device, 0, "Commodore Business Machines", "CBM 8096", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) -COMP( 1984, cbm8296, 0, 0, cbm8296, petb, driver_device, 0, "Commodore Business Machines", "CBM 8296", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) -COMP( 1984, cbm8296d, cbm8296, 0, cbm8296d, petb, driver_device, 0, "Commodore Business Machines", "CBM 8296D", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) -COMP( 1984, cbm8296d_de,cbm8296, 0, cbm8296d, petb_de, driver_device, 0, "Commodore Business Machines", "CBM 8296D (Germany)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) +// YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS +COMP( 1977, pet2001, 0, 0, pet2001, pet, driver_device, 0, "Commodore Business Machines", "PET 2001-4", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) +COMP( 1977, pet20018, pet2001, 0, pet20018, pet, driver_device, 0, "Commodore Business Machines", "PET 2001-8", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) +COMP( 1979, pet2001n, 0, 0, pet2001n8, pet, driver_device, 0, "Commodore Business Machines", "PET 2001-N8", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) +COMP( 1979, pet2001n16, pet2001n, 0, pet2001n16, pet, driver_device, 0, "Commodore Business Machines", "PET 2001-N16", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) +COMP( 1979, pet2001n32, pet2001n, 0, pet2001n32, pet, driver_device, 0, "Commodore Business Machines", "PET 2001-N32", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) +COMP( 1979, cbm3008, pet2001n, 0, cbm3008, pet, driver_device, 0, "Commodore Business Machines", "CBM 3008", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) +COMP( 1979, cbm3016, pet2001n, 0, cbm3016, pet, driver_device, 0, "Commodore Business Machines", "CBM 3016", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) +COMP( 1979, cbm3032, pet2001n, 0, cbm3032, pet, driver_device, 0, "Commodore Business Machines", "CBM 3032", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) +COMP( 1979, pet2001b, 0, 0, pet2001b8, petb, driver_device, 0, "Commodore Business Machines", "PET 2001-B8", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) +COMP( 1979, pet2001b16, pet2001b, 0, pet2001b16, petb, driver_device, 0, "Commodore Business Machines", "PET 2001-B16", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) +COMP( 1979, pet2001b32, pet2001b, 0, pet2001b32, petb, driver_device, 0, "Commodore Business Machines", "PET 2001-B32", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) +COMP( 1979, cbm3032b, pet2001b, 0, cbm3032b, petb, driver_device, 0, "Commodore Business Machines", "CBM 3032B", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) +COMP( 1980, pet4016, 0, 0, pet4016, pet, driver_device, 0, "Commodore Business Machines", "PET 4016", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) +COMP( 1980, pet4032, pet4016, 0, pet4032, pet, driver_device, 0, "Commodore Business Machines", "PET 4032", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) +COMP( 1980, cbm4016, pet4016, 0, cbm4016, pet, driver_device, 0, "Commodore Business Machines", "CBM 4016", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) +COMP( 1980, cbm4032, pet4016, 0, cbm4032, pet, driver_device, 0, "Commodore Business Machines", "CBM 4032", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) +COMP( 1980, pet4032b, 0, 0, pet4032b, petb, driver_device, 0, "Commodore Business Machines", "PET 4032B", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) +COMP( 1980, cbm4032b, pet4032b, 0, cbm4032b, petb, driver_device, 0, "Commodore Business Machines", "CBM 4032B", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) +COMP( 1980, pet8032, 0, 0, pet8032, petb, driver_device, 0, "Commodore Business Machines", "PET 8032", GAME_SUPPORTS_SAVE ) +COMP( 1981, cbm8032, pet8032, 0, pet8032, petb, driver_device, 0, "Commodore Business Machines", "CBM 8032", GAME_SUPPORTS_SAVE ) +COMP( 1981, cbm8032_de, pet8032, 0, pet8032, petb_de, driver_device, 0, "Commodore Business Machines", "CBM 8032 (Germany)", GAME_SUPPORTS_SAVE ) +COMP( 1981, cbm8032_se, pet8032, 0, pet8032, petb_se, driver_device, 0, "Commodore Business Machines", "CBM 8032 (Sweden/Finland)", GAME_SUPPORTS_SAVE ) +COMP( 1981, superpet, pet8032, 0, superpet, petb, driver_device, 0, "Commodore Business Machines", "SuperPET SP-9000", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) +COMP( 1981, mmf9000, pet8032, 0, superpet, petb, driver_device, 0, "Commodore Business Machines", "MicroMainFrame 9000", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) +COMP( 1981, mmf9000_se, pet8032, 0, superpet, petb_se, driver_device, 0, "Commodore Business Machines", "MicroMainFrame 9000 (Sweden/Finland)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) +COMP( 1981, cbm8096, pet8032, 0, cbm8096, petb, driver_device, 0, "Commodore Business Machines", "CBM 8096", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) +COMP( 1984, cbm8296, 0, 0, cbm8296, petb, driver_device, 0, "Commodore Business Machines", "CBM 8296", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) +COMP( 1984, cbm8296d, cbm8296, 0, cbm8296d, petb, driver_device, 0, "Commodore Business Machines", "CBM 8296D", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) +COMP( 1984, cbm8296d_de,cbm8296, 0, cbm8296d, petb_de, driver_device, 0, "Commodore Business Machines", "CBM 8296D (Germany)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) diff --git a/src/mess/drivers/plus4.c b/src/mess/drivers/plus4.c index 6f219081597..e3d07d8c1b8 100644 --- a/src/mess/drivers/plus4.c +++ b/src/mess/drivers/plus4.c @@ -594,18 +594,18 @@ WRITE_LINE_MEMBER( plus4_state::ted_irq_w ) READ8_MEMBER( plus4_state::ted_k_r ) { /* - + bit description - + 0 JOY A0, JOY B0 1 JOY A1, JOY B1 2 JOY A2, JOY B2 3 JOY A3, JOY B3 - 4 - 5 + 4 + 5 6 BTN A 7 BTN B - + */ UINT8 data = 0xff; @@ -614,7 +614,7 @@ READ8_MEMBER( plus4_state::ted_k_r ) if (!BIT(offset, 2)) { UINT8 joy_a = m_joy1->joy_r(); - + data &= (0xf0 | (joy_a & 0x0f)); data &= ~(!BIT(joy_a, 5) << 6); } @@ -622,7 +622,7 @@ READ8_MEMBER( plus4_state::ted_k_r ) if (!BIT(offset, 1)) { UINT8 joy_b = m_joy2->joy_r(); - + data &= (0xf0 | (joy_b & 0x0f)); data &= ~(!BIT(joy_b, 5) << 7); } diff --git a/src/mess/drivers/portfoli.c b/src/mess/drivers/portfoli.c index 6d59e6ae520..53b1daa72b3 100644 --- a/src/mess/drivers/portfoli.c +++ b/src/mess/drivers/portfoli.c @@ -62,7 +62,7 @@ TODO: - - expansion port slot interface + - expansion port slot interface - clock is running too fast - create chargen ROM from tech manual - memory error interrupt vector @@ -202,12 +202,12 @@ void portfolio_state::scan_keyboard() UINT8 keycode = 0xff; UINT8 keydata[8] = { m_y0->read(), m_y1->read(), m_y2->read(), m_y3->read(), - m_y4->read(), m_y5->read(), m_y6->read(), m_y7->read() }; + m_y4->read(), m_y5->read(), m_y6->read(), m_y7->read() }; for (int row = 0; row < 8; row++) { UINT8 data = keydata[row]; - + if (data != 0xff) { for (int col = 0; col < 8; col++) diff --git a/src/mess/drivers/prof180x.c b/src/mess/drivers/prof180x.c index 5443a0ab0f6..bbbc60abe6d 100644 --- a/src/mess/drivers/prof180x.c +++ b/src/mess/drivers/prof180x.c @@ -40,31 +40,29 @@ READ8_MEMBER( prof180x_state::read ) if (offset < 0x40000) { - } else { - } /* - switch ((m_mm1 << 1) | m_mm0) - { - case 0: - // bank0_r = EPROM, bank0_w = RAM, bank1 = RAM - break; - - case 1: - // bank0_r = RAM, bank0_w = RAM, bank1 = RAM - break; - - case 2: - // bank0_r = UNMAP, bank0_w = UNMAP, bank1 = RAM - break; - - case 3: - // bank0_r = RAM, bank0_w = RAM, bank1 = UNMAP - break; - } + switch ((m_mm1 << 1) | m_mm0) + { + case 0: + // bank0_r = EPROM, bank0_w = RAM, bank1 = RAM + break; + + case 1: + // bank0_r = RAM, bank0_w = RAM, bank1 = RAM + break; + + case 2: + // bank0_r = UNMAP, bank0_w = UNMAP, bank1 = RAM + break; + + case 3: + // bank0_r = RAM, bank0_w = RAM, bank1 = UNMAP + break; + } */ return data; } @@ -73,12 +71,10 @@ WRITE8_MEMBER( prof180x_state::write ) { if (offset < 0x40000) { - } else { - - } + } } void prof180x_state::ls259_w(int flag, int value) diff --git a/src/mess/drivers/prof80.c b/src/mess/drivers/prof80.c index be3d2683dec..042965f1889 100644 --- a/src/mess/drivers/prof80.c +++ b/src/mess/drivers/prof80.c @@ -156,7 +156,7 @@ void prof80_state::ls259_w(int fa, int sa, int fb, int sb) // turn on floppy motor if (m_floppy0->get_device()) m_floppy0->get_device()->mon_w(0); if (m_floppy1->get_device()) m_floppy1->get_device()->mon_w(0); - + m_motor = 1; // reset floppy motor off NE555 timer diff --git a/src/mess/drivers/sage2.c b/src/mess/drivers/sage2.c index ca6d9c1a24d..a5ac172cbb5 100644 --- a/src/mess/drivers/sage2.c +++ b/src/mess/drivers/sage2.c @@ -255,7 +255,7 @@ WRITE8_MEMBER( sage2_state::ppi0_pc_w ) // floppy motor if (m_floppy) m_floppy->mon_w(BIT(data, 5)); - + // FDC reset if(BIT(data, 7)) m_fdc->reset(); } diff --git a/src/mess/drivers/smc777.c b/src/mess/drivers/smc777.c index 685ba4185b6..f4825345cd6 100644 --- a/src/mess/drivers/smc777.c +++ b/src/mess/drivers/smc777.c @@ -137,7 +137,7 @@ UINT32 smc777_state::screen_update_smc777(screen_device &screen, bitmap_ind16 &b UINT16 count; int x_width; -// popmessage("%d %d %d %d",mc6845_v_char_total,mc6845_v_total_adj,mc6845_v_display,mc6845_v_sync_pos); +// popmessage("%d %d %d %d",mc6845_v_char_total,mc6845_v_total_adj,mc6845_v_display,mc6845_v_sync_pos); bitmap.fill(machine().pens[m_backdrop_pen], cliprect); @@ -162,7 +162,7 @@ UINT32 smc777_state::screen_update_smc777(screen_device &screen, bitmap_ind16 &b } //else //{ - // bitmap.pix16(y+yi+CRTC_MIN_Y, x*2+0+CRTC_MIN_X) = machine().pens[color]; + // bitmap.pix16(y+yi+CRTC_MIN_Y, x*2+0+CRTC_MIN_X) = machine().pens[color]; //} color = (m_gvram[count] & 0x0f) >> 0; @@ -173,7 +173,7 @@ UINT32 smc777_state::screen_update_smc777(screen_device &screen, bitmap_ind16 &b } //else //{ - // bitmap.pix16(y+yi+CRTC_MIN_Y, x*2+1+CRTC_MIN_X) = machine().pens[color]; + // bitmap.pix16(y+yi+CRTC_MIN_Y, x*2+1+CRTC_MIN_X) = machine().pens[color]; //} count++; @@ -997,7 +997,7 @@ void smc777_state::machine_reset() static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - true, /* show border area */ + true, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mess/drivers/super80.c b/src/mess/drivers/super80.c index 0ec66c414d3..edac90a20d6 100644 --- a/src/mess/drivers/super80.c +++ b/src/mess/drivers/super80.c @@ -185,14 +185,14 @@ hardware. #include "includes/super80.h" #include "formats/z80bin.h" -#define MASTER_CLOCK (XTAL_12MHz) -#define PIXEL_CLOCK (MASTER_CLOCK/2) -#define HTOTAL (384) -#define HBEND (0) -#define HBSTART (256) -#define VTOTAL (240) -#define VBEND (0) -#define VBSTART (160) +#define MASTER_CLOCK (XTAL_12MHz) +#define PIXEL_CLOCK (MASTER_CLOCK/2) +#define HTOTAL (384) +#define HBEND (0) +#define HBSTART (256) +#define VTOTAL (240) +#define VBEND (0) +#define VBSTART (160) #define SUPER80V_SCREEN_WIDTH (560) #define SUPER80V_SCREEN_HEIGHT (300) diff --git a/src/mess/drivers/tek405x.c b/src/mess/drivers/tek405x.c index 47d94ee6915..be29fa48699 100644 --- a/src/mess/drivers/tek405x.c +++ b/src/mess/drivers/tek405x.c @@ -1342,15 +1342,15 @@ ROM_START( tek4051 ) ROM_LOAD( "156-0714-01.u121", 0x1000, 0x0800, NO_DUMP ) ROM_LOAD( "156-0715-01.u131", 0x1800, 0x0800, NO_DUMP ) /* - ROM_REGION( 0x2000, "4051r01", 0 ) // 4051R01 Matrix Functions - ROM_LOAD( "4051r01", 0x0000, 0x1000, NO_DUMP ) + ROM_REGION( 0x2000, "4051r01", 0 ) // 4051R01 Matrix Functions + ROM_LOAD( "4051r01", 0x0000, 0x1000, NO_DUMP ) - ROM_REGION( 0x2000, "4051r05", 0 ) // 4051R05 Binary Program Loader - ROM_LOAD( "156-0856-00.u1", 0x0000, 0x0800, NO_DUMP ) - ROM_LOAD( "156-0857-00.u11", 0x0800, 0x0800, NO_DUMP ) + ROM_REGION( 0x2000, "4051r05", 0 ) // 4051R05 Binary Program Loader + ROM_LOAD( "156-0856-00.u1", 0x0000, 0x0800, NO_DUMP ) + ROM_LOAD( "156-0857-00.u11", 0x0800, 0x0800, NO_DUMP ) - ROM_REGION( 0x2000, "4051r06", 0 ) // 4051R06 Editor - ROM_LOAD( "4051r06", 0x0000, 0x1000, NO_DUMP ) + ROM_REGION( 0x2000, "4051r06", 0 ) // 4051R06 Editor + ROM_LOAD( "4051r06", 0x0000, 0x1000, NO_DUMP ) */ ROM_END diff --git a/src/mess/drivers/ti89.c b/src/mess/drivers/ti89.c index 4d8abcd84e4..5772c1d69bf 100644 --- a/src/mess/drivers/ti89.c +++ b/src/mess/drivers/ti89.c @@ -39,7 +39,7 @@ UINT8 ti68k_state::keypad_r (running_machine &machine) data ^= m_io_bit5->read() & (0x01 << bit) ? 0x20 : 0x00; data ^= m_io_bit6->read() & (0x01 << bit) ? 0x40 : 0x00; data ^= m_io_bit7->read() & (0x01 << bit) ? 0x80 : 0x00; - } + } } return data; diff --git a/src/mess/drivers/tk80bs.c b/src/mess/drivers/tk80bs.c index 110a8ec0ffb..25b1e396b29 100644 --- a/src/mess/drivers/tk80bs.c +++ b/src/mess/drivers/tk80bs.c @@ -197,7 +197,7 @@ READ8_MEMBER( tk80bs_state::key_matrix_r ) // PA0-7 keyscan in UINT8 data = 0xff; - + if (BIT(m_ppi_portc, 4)) data &= ioport("X0")->read(); if (BIT(m_ppi_portc, 5)) diff --git a/src/mess/drivers/tmc1800.c b/src/mess/drivers/tmc1800.c index c8dc469d177..6e0099b72a9 100644 --- a/src/mess/drivers/tmc1800.c +++ b/src/mess/drivers/tmc1800.c @@ -156,9 +156,9 @@ WRITE8_MEMBER( nano_state::keylatch_w ) 2 C 3 NY0 4 NY1 - 5 - 6 - 7 + 5 + 6 + 7 */ @@ -694,7 +694,7 @@ void tmc2000_state::machine_start() { m_colorram[addr] = machine().rand() & 0xff; } - + // find keyboard rows m_key_row[0] = m_y0; m_key_row[1] = m_y1; diff --git a/src/mess/drivers/tmc600.c b/src/mess/drivers/tmc600.c index d9ca0cd1917..6733e1ac9bc 100644 --- a/src/mess/drivers/tmc600.c +++ b/src/mess/drivers/tmc600.c @@ -249,7 +249,7 @@ void tmc600_state::machine_start() program.unmap_readwrite(0xa000, 0xbfff); break; } - + // find keyboard rows m_key_row[0] = m_y0; m_key_row[1] = m_y1; diff --git a/src/mess/drivers/vboy.c b/src/mess/drivers/vboy.c index 47ef5f2c7ee..b82608c9fae 100644 --- a/src/mess/drivers/vboy.c +++ b/src/mess/drivers/vboy.c @@ -43,7 +43,7 @@ // bit of magic here, we also write pre-flipped copies of the data to extra ram we've allocated // to simplify the draw loop (we can just pass the flip / unused bits as the upper character bits) -// (all TILE words are in the format of ccxy -ttt tttt tttt +// (all TILE words are in the format of ccxy -ttt tttt tttt // where 'c' = palette, 'x/y' are flips, '-' is unused(?) and 't' is your basic tile number #define WRITE_FONT(woffs) \ @@ -56,8 +56,7 @@ m_font[((woffs) + 0x10000)] = dat; /* flip x */ \ m_font[((woffs) + 0x14000)] = dat; /* flip x */ \ m_font[((woffs) + 0x18000) ^ 7] = dat; /* flip x+y */ \ - m_font[((woffs) + 0x1c000) ^ 7] = dat; /* flip x+y */ \ - + m_font[((woffs) + 0x1c000) ^ 7] = dat; /* flip x+y */ /* FIXME: most if not all of these must be UINT8 */ @@ -295,7 +294,7 @@ void vboy_state::fill_ovr_char(UINT16 code, UINT8 pal) inline INT8 vboy_state::get_bg_map_pixel(int num, int xpos, int ypos) { -// g_profiler.start(PROFILER_USER1); +// g_profiler.start(PROFILER_USER1); int x, y; UINT8 stepx, stepy; @@ -321,14 +320,14 @@ inline INT8 vboy_state::get_bg_map_pixel(int num, int xpos, int ypos) //g_profiler.stop(); return -1; } - // g_profiler.stop(); + // g_profiler.stop(); return (pal >> (dat*2)) & 3; } void vboy_state::draw_bg_map(bitmap_ind16 &bitmap, const rectangle &cliprect, UINT16 param_base, int mode, int gx, int gp, int gy, int mx, int mp, int my, int h, int w, UINT16 x_mask, UINT16 y_mask, UINT8 ovr, bool right, int bg_map_num) { -// g_profiler.start(PROFILER_USER2); +// g_profiler.start(PROFILER_USER2); int x,y; for(y=0;y<=h;y++) @@ -380,13 +379,13 @@ void vboy_state::draw_bg_map(bitmap_ind16 &bitmap, const rectangle &cliprect, UI bitmap.pix16(y1, x1) = machine().pens[pix & 3]; } } -// g_profiler.stop(); +// g_profiler.stop(); } void vboy_state::draw_affine_map(bitmap_ind16 &bitmap, const rectangle &cliprect, UINT16 param_base, int gx, int gp, int gy, int h, int w, UINT16 x_mask, UINT16 y_mask, UINT8 ovr, bool right, int bg_map_num) { -// g_profiler.start(PROFILER_USER3); +// g_profiler.start(PROFILER_USER3); int x,y; for(y=0;y<=h;y++) @@ -425,7 +424,7 @@ void vboy_state::draw_affine_map(bitmap_ind16 &bitmap, const rectangle &cliprect bitmap.pix16(y1, x1) = machine().pens[pix & 3]; } } -// g_profiler.stop(); +// g_profiler.stop(); } /* diff --git a/src/mess/drivers/vic10.c b/src/mess/drivers/vic10.c index e94d7c31518..7101c887dcb 100644 --- a/src/mess/drivers/vic10.c +++ b/src/mess/drivers/vic10.c @@ -405,7 +405,7 @@ READ8_MEMBER( vic10_state::cia_pa_r ) // keyboard UINT8 cia_pb = m_cia->pb_r(); UINT8 row[8] = { m_row0->read(), m_row1->read() & m_lock->read(), m_row2->read(), m_row3->read(), - m_row4->read(), m_row5->read(), m_row6->read(), m_row7->read() }; + m_row4->read(), m_row5->read(), m_row6->read(), m_row7->read() }; for (int i = 0; i < 8; i++) { @@ -446,7 +446,7 @@ READ8_MEMBER( vic10_state::cia_pb_r ) // joystick UINT8 joy_a = m_joy1->joy_r(); - + data &= (0xf0 | (joy_a & 0x0f)); data &= ~(!BIT(joy_a, 5) << 4); diff --git a/src/mess/drivers/vidbrain.c b/src/mess/drivers/vidbrain.c index e5ca3a171d1..dc1a0edd1a6 100644 --- a/src/mess/drivers/vidbrain.c +++ b/src/mess/drivers/vidbrain.c @@ -482,7 +482,7 @@ static VIDEOBRAIN_EXPANSION_INTERFACE( expansion_intf ) //************************************************************************** //------------------------------------------------- -// IRQ_CALLBACK_MEMBER(vidbrain_int_ack) +// IRQ_CALLBACK_MEMBER(vidbrain_int_ack) //------------------------------------------------- IRQ_CALLBACK_MEMBER(vidbrain_state::vidbrain_int_ack) diff --git a/src/mess/drivers/x1.c b/src/mess/drivers/x1.c index 71769713a1a..be2d440115e 100644 --- a/src/mess/drivers/x1.c +++ b/src/mess/drivers/x1.c @@ -545,7 +545,7 @@ UINT32 x1_state::screen_update_x1(screen_device &screen, bitmap_rgb32 &bitmap, c m_xstart = ((mc6845_h_char_total - mc6845_h_sync_pos) * 8) / 2; m_ystart = ((mc6845_v_char_total - mc6845_v_sync_pos) * 8) / 2; -// popmessage("%d %d %d %d",mc6845_h_sync_pos,mc6845_v_sync_pos,mc6845_h_char_total,mc6845_v_char_total); +// popmessage("%d %d %d %d",mc6845_h_sync_pos,mc6845_v_sync_pos,mc6845_h_char_total,mc6845_v_char_total); draw_gfxbitmap(machine(),bitmap,cliprect,m_scrn_reg.disp_bank,m_scrn_reg.pri); draw_fgtilemap(machine(),bitmap,cliprect); @@ -1884,7 +1884,7 @@ static I8255A_INTERFACE( ppi8255_intf ) static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - true, /* show border area */ + true, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ @@ -2239,7 +2239,7 @@ static GFXDECODE_START( x1 ) GFXDECODE_ENTRY( "cgrom", 0x00000, x1_chars_8x8, 0, 1 ) GFXDECODE_ENTRY( "font", 0x00000, x1_chars_8x16, 0, 1 ) GFXDECODE_ENTRY( "kanji", 0x00000, x1_chars_16x16, 0, 1 ) -// GFXDECODE_ENTRY( "pcg", 0x00000, x1_pcg_8x8, 0, 1 ) +// GFXDECODE_ENTRY( "pcg", 0x00000, x1_pcg_8x8, 0, 1 ) GFXDECODE_END /************************************* diff --git a/src/mess/drivers/x1twin.c b/src/mess/drivers/x1twin.c index 99169f0b15b..59c44bd2861 100644 --- a/src/mess/drivers/x1twin.c +++ b/src/mess/drivers/x1twin.c @@ -91,16 +91,16 @@ static I8255A_INTERFACE( ppi8255_intf ) static MC6845_INTERFACE( mc6845_intf ) { "x1_screen", /* screen we are acting on */ - false, /* show border area*/ - 8, /* number of pixels per video memory address */ - NULL, /* before pixel update callback */ - NULL, /* row update callback */ - NULL, /* after pixel update callback */ - DEVCB_NULL, /* callback for display state changes */ - DEVCB_NULL, /* callback for cursor state changes */ - DEVCB_NULL, /* HSYNC callback */ - DEVCB_NULL, /* VSYNC callback */ - NULL /* update address callback */ + false, /* show border area*/ + 8, /* number of pixels per video memory address */ + NULL, /* before pixel update callback */ + NULL, /* row update callback */ + NULL, /* after pixel update callback */ + DEVCB_NULL, /* callback for display state changes */ + DEVCB_NULL, /* callback for cursor state changes */ + DEVCB_NULL, /* HSYNC callback */ + DEVCB_NULL, /* VSYNC callback */ + NULL /* update address callback */ }; /************************************* diff --git a/src/mess/drivers/z100.c b/src/mess/drivers/z100.c index 1e4fb5ed021..d84e7609995 100644 --- a/src/mess/drivers/z100.c +++ b/src/mess/drivers/z100.c @@ -632,7 +632,7 @@ static const struct pic8259_interface z100_pic8259_slave_config = static MC6845_INTERFACE( mc6845_intf ) { "screen", /* screen we are acting on */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* before pixel update callback */ NULL, /* row update callback */ diff --git a/src/mess/includes/abc1600.h b/src/mess/includes/abc1600.h index f86e0454233..13cc2d1e140 100644 --- a/src/mess/includes/abc1600.h +++ b/src/mess/includes/abc1600.h @@ -157,7 +157,7 @@ public: DECLARE_WRITE8_MEMBER( cio_pc_w ); DECLARE_WRITE_LINE_MEMBER( nmi_w ); - + IRQ_CALLBACK_MEMBER( abc1600_int_ack ); void fdc_intrq_w(bool state); diff --git a/src/mess/includes/abc80x.h b/src/mess/includes/abc80x.h index 99127862d30..ea6cf283ad6 100644 --- a/src/mess/includes/abc80x.h +++ b/src/mess/includes/abc80x.h @@ -59,8 +59,8 @@ #define Z80SIO_TAG "z80sio" #define Z80DART_TAG "z80dart" #define DISCRETE_TAG "discrete" -#define RS232_A_TAG "rs232a" -#define RS232_B_TAG "rs232b" +#define RS232_A_TAG "rs232a" +#define RS232_B_TAG "rs232b" //************************************************************************** diff --git a/src/mess/includes/amstrad.h b/src/mess/includes/amstrad.h index c1f1963c8c8..30c1c6b8873 100644 --- a/src/mess/includes/amstrad.h +++ b/src/mess/includes/amstrad.h @@ -189,7 +189,7 @@ public: void aleste_interrupt(bool state); DECLARE_FLOPPY_FORMATS( floppy_formats ); - + IRQ_CALLBACK_MEMBER(amstrad_cpu_acknowledge_int); DECLARE_DEVICE_IMAGE_LOAD_MEMBER( amstrad_plus_cartridge ); diff --git a/src/mess/includes/apple2.h b/src/mess/includes/apple2.h index 4c629fce510..6ab58783080 100644 --- a/src/mess/includes/apple2.h +++ b/src/mess/includes/apple2.h @@ -75,7 +75,7 @@ enum machine_type_t { APPLE_II, // Apple II/II+ - APPLE_IIE, // Apple IIe with aux slots + APPLE_IIE, // Apple IIe with aux slots APPLE_IIEPLUS, // Apple IIc/IIgs/IIc+ with permanent aux memory TK2000, // Microdigital TK2000 LASER128, // Laser 128/128EX/128EX2 diff --git a/src/mess/includes/apple2gs.h b/src/mess/includes/apple2gs.h index 35f73381100..0bd2e3ffec4 100644 --- a/src/mess/includes/apple2gs.h +++ b/src/mess/includes/apple2gs.h @@ -18,7 +18,7 @@ #include "cpu/m6502/m5074x.h" #endif -#define ADBMICRO_TAG "adbmicro" +#define ADBMICRO_TAG "adbmicro" // IIgs clocks as marked on the schematics #define APPLE2GS_28M (XTAL_28_63636MHz) // IIGS master clock @@ -33,27 +33,27 @@ // these are numbered as seen from the MCU enum glu_reg_names { - GLU_KEY_DATA = 0, // MCU W - GLU_COMMAND, // MCU R - GLU_MOUSEX, // MCU W - GLU_MOUSEY, // MCU W - GLU_KG_STATUS, // MCU R - GLU_ANY_KEY_DOWN, // MCU W - GLU_KEYMOD, // MCU W - GLU_DATA, // MCU W - - GLU_C000, // 816 R - GLU_C010, // 816 RW - GLU_SYSSTAT // 816 R/(limited) W + GLU_KEY_DATA = 0, // MCU W + GLU_COMMAND, // MCU R + GLU_MOUSEX, // MCU W + GLU_MOUSEY, // MCU W + GLU_KG_STATUS, // MCU R + GLU_ANY_KEY_DOWN, // MCU W + GLU_KEYMOD, // MCU W + GLU_DATA, // MCU W + + GLU_C000, // 816 R + GLU_C010, // 816 RW + GLU_SYSSTAT // 816 R/(limited) W }; -enum glu_kg_status +enum glu_kg_status { - KGS_ANY_KEY_DOWN = 0x01, - KGS_KEYSTROBE = 0x10, - KGS_DATA_FULL = 0x20, - KGS_COMMAND_FULL = 0x40, - KGS_MOUSEX_FULL = 0x80 + KGS_ANY_KEY_DOWN = 0x01, + KGS_KEYSTROBE = 0x10, + KGS_DATA_FULL = 0x20, + KGS_COMMAND_FULL = 0x40, + KGS_MOUSEX_FULL = 0x80 }; enum apple2gs_clock_mode @@ -194,15 +194,15 @@ public: DECLARE_WRITE8_MEMBER(a2bus_inh_w); DECLARE_READ8_MEMBER(apple2gs_read_vector); - // ADB MCU and ADB GLU stuff + // ADB MCU and ADB GLU stuff #if RUN_ADB_MICRO - UINT8 m_glu_regs[8], m_glu_bus, m_glu_sysstat; - bool m_glu_mcu_read_kgs, m_glu_816_read_dstat, m_glu_mouse_read_stat, m_adb_line; + UINT8 m_glu_regs[8], m_glu_bus, m_glu_sysstat; + bool m_glu_mcu_read_kgs, m_glu_816_read_dstat, m_glu_mouse_read_stat, m_adb_line; UINT8 keyglu_mcu_read(UINT8 offset); - void keyglu_mcu_write(UINT8 offset, UINT8 data); - UINT8 keyglu_816_read(UINT8 offset); - void keyglu_816_write(UINT8 offset, UINT8 data); + void keyglu_mcu_write(UINT8 offset, UINT8 data); + UINT8 keyglu_816_read(UINT8 offset); + void keyglu_816_write(UINT8 offset, UINT8 data); DECLARE_READ8_MEMBER(adbmicro_p0_in); DECLARE_READ8_MEMBER(adbmicro_p1_in); diff --git a/src/mess/includes/aquarius.h b/src/mess/includes/aquarius.h index 4ebe80df8f5..75ac5b72720 100644 --- a/src/mess/includes/aquarius.h +++ b/src/mess/includes/aquarius.h @@ -20,22 +20,22 @@ class aquarius_state : public driver_device public: aquarius_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_cassette(*this, CASSETTE_TAG), - m_speaker(*this, SPEAKER_TAG), - m_screen(*this, "screen"), - m_ram(*this, RAM_TAG), - m_rom(*this, "maincpu"), - m_videoram(*this, "videoram"), - m_colorram(*this, "colorram"), - m_y0(*this, "Y0"), - m_y1(*this, "Y1"), - m_y2(*this, "Y2"), - m_y3(*this, "Y3"), - m_y4(*this, "Y4"), - m_y5(*this, "Y5"), - m_y6(*this, "Y6"), - m_y7(*this, "Y7") + m_maincpu(*this, "maincpu"), + m_cassette(*this, CASSETTE_TAG), + m_speaker(*this, SPEAKER_TAG), + m_screen(*this, "screen"), + m_ram(*this, RAM_TAG), + m_rom(*this, "maincpu"), + m_videoram(*this, "videoram"), + m_colorram(*this, "colorram"), + m_y0(*this, "Y0"), + m_y1(*this, "Y1"), + m_y2(*this, "Y2"), + m_y3(*this, "Y3"), + m_y4(*this, "Y4"), + m_y5(*this, "Y5"), + m_y6(*this, "Y6"), + m_y7(*this, "Y7") { } required_device m_maincpu; diff --git a/src/mess/includes/atarist.h b/src/mess/includes/atarist.h index ed86ac27c99..f55c8f3c31c 100644 --- a/src/mess/includes/atarist.h +++ b/src/mess/includes/atarist.h @@ -315,7 +315,7 @@ public: TIMER_CALLBACK_MEMBER(atarist_shifter_tick); TIMER_CALLBACK_MEMBER(atarist_glue_tick); TIMER_CALLBACK_MEMBER(atarist_blitter_tick); - IRQ_CALLBACK_MEMBER(atarist_int_ack); + IRQ_CALLBACK_MEMBER(atarist_int_ack); }; class megast_state : public st_state @@ -371,7 +371,7 @@ public: TIMER_CALLBACK_MEMBER(atariste_dmasound_tick); TIMER_CALLBACK_MEMBER(atariste_microwire_tick); - + void dmasound_set_state(int level); void dmasound_tick(); void microwire_shift(); diff --git a/src/mess/includes/cbm2.h b/src/mess/includes/cbm2.h index e1c751db863..7fbda2bfa54 100644 --- a/src/mess/includes/cbm2.h +++ b/src/mess/includes/cbm2.h @@ -44,7 +44,7 @@ #define SCREEN_TAG "screen" #define CONTROL1_TAG "joy1" #define CONTROL2_TAG "joy2" -#define RS232_TAG "rs232" +#define RS232_TAG "rs232" #define EXT_I8088_TAG "ext_u1" #define EXT_I8087_TAG "ext_u4" diff --git a/src/mess/includes/gb.h b/src/mess/includes/gb.h index 185ba6c486a..391c05059d3 100644 --- a/src/mess/includes/gb.h +++ b/src/mess/includes/gb.h @@ -157,7 +157,7 @@ public: UINT8 *m_GBC_RAMMap[8]; /* (CGB) Addresses of internal RAM banks */ UINT8 m_GBC_RAMBank; /* (CGB) Current CGB RAM bank */ - + gb_lcd_t m_lcd; void (gb_state::*update_scanline) (); bool m_bios_disable; @@ -240,7 +240,7 @@ public: , m_maincpu(*this, "maincpu") , m_inputs(*this, "INPUTS") { } - + DECLARE_READ8_MEMBER(megaduck_video_r); DECLARE_WRITE8_MEMBER(megaduck_video_w); DECLARE_WRITE8_MEMBER(megaduck_sound_w1); @@ -250,12 +250,12 @@ public: DECLARE_MACHINE_START(megaduck); DECLARE_MACHINE_RESET(megaduck); DECLARE_PALETTE_INIT(megaduck); - + DECLARE_READ8_MEMBER(cart_r); DECLARE_WRITE8_MEMBER(bank1_w); DECLARE_WRITE8_MEMBER(bank2_w); optional_device m_cartslot; - + protected: required_device m_maincpu; required_ioport m_inputs; diff --git a/src/mess/includes/md.h b/src/mess/includes/md.h index 72c1cf8ca0a..b32194529fa 100644 --- a/src/mess/includes/md.h +++ b/src/mess/includes/md.h @@ -13,13 +13,13 @@ public: md_cons_state(const machine_config &mconfig, device_type type, const char *tag) : md_base_state(mconfig, type, tag), m_slotcart(*this, "mdslot") - { } - + { } + emu_timer *m_mess_io_timeout[3]; int m_mess_io_stage[3]; - + optional_device m_slotcart; - + DECLARE_DRIVER_INIT(mess_md_common); DECLARE_DRIVER_INIT(genesis); DECLARE_DRIVER_INIT(md_eur); @@ -31,7 +31,7 @@ class mdsvp_state : public md_cons_state public: mdsvp_state(const machine_config &mconfig, device_type type, const char *tag) : md_cons_state(mconfig, type, tag) { } - + UINT8 *m_iram; // IRAM (0-0x7ff) UINT8 *m_dram; // [0x20000]; UINT32 m_pmac_read[6]; // read modes/addrs for PM0-PM5 @@ -48,7 +48,7 @@ public: pico_state(const machine_config &mconfig, device_type type, const char *tag) : md_cons_state(mconfig, type, tag), m_picocart(*this, "picoslot") { } - + optional_device m_picocart; UINT8 m_page_register; }; diff --git a/src/mess/includes/nes.h b/src/mess/includes/nes.h index 7707bc933cf..95f9087d09f 100644 --- a/src/mess/includes/nes.h +++ b/src/mess/includes/nes.h @@ -143,7 +143,7 @@ public: ioport_port *m_io_zapper2_x; ioport_port *m_io_zapper2_y; ioport_port *m_io_paddle; - + private: /* devices */ // cpu_device *m_maincpu; diff --git a/src/mess/includes/pc1512.h b/src/mess/includes/pc1512.h index bc3395a7e1e..c811ad49b72 100644 --- a/src/mess/includes/pc1512.h +++ b/src/mess/includes/pc1512.h @@ -59,7 +59,7 @@ public: m_bus(*this, ISA_BUS_TAG), m_char_rom(*this, AMS40041_TAG), m_video_ram(*this, "video_ram"), - m_lk(*this, "LK"), + m_lk(*this, "LK"), m_pit1(0), m_pit2(0), m_status1(0), @@ -221,8 +221,8 @@ class pc1640_state : public pc1512_state public: pc1640_state(const machine_config &mconfig, device_type type, const char *tag) : pc1512_state(mconfig, type, tag), - m_sw(*this, "SW"), - m_opt(0) + m_sw(*this, "SW"), + m_opt(0) { } virtual void machine_start(); diff --git a/src/mess/includes/pcw16.h b/src/mess/includes/pcw16.h index fa40ce35bf4..e8816688ad1 100644 --- a/src/mess/includes/pcw16.h +++ b/src/mess/includes/pcw16.h @@ -34,15 +34,15 @@ class pcw16_state : public driver_device public: pcw16_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_flash0(*this, "flash0"), - m_flash1(*this, "flash1"), - m_fdc(*this, "fdc"), - m_uart2(*this, "ns16550_2"), - m_speaker(*this, BEEPER_TAG), - m_ram(*this, RAM_TAG), - m_region_rom(*this, "maincpu"), - m_io_extra(*this, "EXTRA") + m_maincpu(*this, "maincpu"), + m_flash0(*this, "flash0"), + m_flash1(*this, "flash1"), + m_fdc(*this, "fdc"), + m_uart2(*this, "ns16550_2"), + m_speaker(*this, BEEPER_TAG), + m_ram(*this, RAM_TAG), + m_region_rom(*this, "maincpu"), + m_io_extra(*this, "EXTRA") { } required_device m_maincpu; diff --git a/src/mess/includes/pet2001.h b/src/mess/includes/pet2001.h index 5a4cd8942d3..d92b7cb7a23 100644 --- a/src/mess/includes/pet2001.h +++ b/src/mess/includes/pet2001.h @@ -17,12 +17,12 @@ #include "sound/speaker.h" #include "video/mc6845.h" -#define M6502_TAG "f3" -#define M6522_TAG "a5" -#define M6520_1_TAG "g8" -#define M6520_2_TAG "b8" -#define MC6845_TAG "ub13" -#define SCREEN_TAG "screen" +#define M6502_TAG "f3" +#define M6522_TAG "a5" +#define M6520_1_TAG "g8" +#define M6520_2_TAG "b8" +#define MC6845_TAG "ub13" +#define SCREEN_TAG "screen" class pet_state : public driver_device { diff --git a/src/mess/includes/plus4.h b/src/mess/includes/plus4.h index aefa2504a2a..d496904fa98 100644 --- a/src/mess/includes/plus4.h +++ b/src/mess/includes/plus4.h @@ -28,8 +28,8 @@ #define MOS8706_TAG "mos8706" #define PLA_TAG "u19" #define SCREEN_TAG "screen" -#define CONTROL1_TAG "joy1" -#define CONTROL2_TAG "joy2" +#define CONTROL1_TAG "joy1" +#define CONTROL2_TAG "joy2" class plus4_state : public driver_device { diff --git a/src/mess/includes/portfoli.h b/src/mess/includes/portfoli.h index 0c24bfb0f99..f2b6edc8cef 100644 --- a/src/mess/includes/portfoli.h +++ b/src/mess/includes/portfoli.h @@ -66,7 +66,7 @@ public: required_ioport m_y6; required_ioport m_y7; required_ioport m_battery; - + virtual void machine_start(); virtual void machine_reset(); diff --git a/src/mess/includes/psion.h b/src/mess/includes/psion.h index f05f6cf23b8..9b195ce133f 100644 --- a/src/mess/includes/psion.h +++ b/src/mess/includes/psion.h @@ -69,7 +69,7 @@ public: virtual void palette_init(); DECLARE_INPUT_CHANGED_MEMBER(psion_on); TIMER_DEVICE_CALLBACK_MEMBER(nmi_timer); - + static HD44780_PIXEL_UPDATE(lz_pixel_update); }; diff --git a/src/mess/includes/sapi1.h b/src/mess/includes/sapi1.h index 3bb9bbddca6..44849610c90 100644 --- a/src/mess/includes/sapi1.h +++ b/src/mess/includes/sapi1.h @@ -53,7 +53,7 @@ public: UINT32 screen_update_sapizps3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); protected: - optional_memory_bank m_bank1; // Only for sapi3 + optional_memory_bank m_bank1; // Only for sapi3 required_ioport m_line0; required_ioport m_line1; required_ioport m_line2; diff --git a/src/mess/includes/tiki100.h b/src/mess/includes/tiki100.h index 1d0973a7edd..3b096d5c3df 100644 --- a/src/mess/includes/tiki100.h +++ b/src/mess/includes/tiki100.h @@ -54,7 +54,7 @@ public: m_y9(*this, "Y9"), m_y10(*this, "Y10"), m_y11(*this, "Y11"), - m_y12(*this, "Y12") + m_y12(*this, "Y12") { } required_device m_maincpu; diff --git a/src/mess/includes/trs80m2.h b/src/mess/includes/trs80m2.h index 390128c2d5c..77b41a28409 100644 --- a/src/mess/includes/trs80m2.h +++ b/src/mess/includes/trs80m2.h @@ -125,7 +125,7 @@ public: int m_rtc_int; int m_enable_rtc_int; - TIMER_DEVICE_CALLBACK_MEMBER(ctc_tick); + TIMER_DEVICE_CALLBACK_MEMBER(ctc_tick); }; class trs80m16_state : public trs80m2_state @@ -144,7 +144,7 @@ public: DECLARE_WRITE8_MEMBER( ual_w ); DECLARE_WRITE8_MEMBER( tcl_w ); - + IRQ_CALLBACK_MEMBER(trs80m16_irq_callback); UINT16 m_ual; diff --git a/src/mess/includes/wangpc.h b/src/mess/includes/wangpc.h index ee23d971eba..0d6270c8afd 100644 --- a/src/mess/includes/wangpc.h +++ b/src/mess/includes/wangpc.h @@ -165,7 +165,7 @@ public: DECLARE_WRITE_LINE_MEMBER( bus_irq2_w ); DECLARE_FLOPPY_FORMATS( floppy_formats ); - + IRQ_CALLBACK_MEMBER(wangpc_irq_callback); void fdc_irq(bool state); diff --git a/src/mess/machine/a2eauxslot.h b/src/mess/machine/a2eauxslot.h index 290e85ba0ec..7e4c16c7c4d 100644 --- a/src/mess/machine/a2eauxslot.h +++ b/src/mess/machine/a2eauxslot.h @@ -120,7 +120,7 @@ public: virtual ~device_a2eauxslot_card_interface(); virtual UINT8 read_auxram(UINT16 offset) { printf("a2eauxslot: unhandled auxram read @ %04x\n", offset); return 0xff; } - virtual void write_auxram(UINT16 offset, UINT8 data) { printf("a2eauxslot: unhandled auxram write %02x @ %04x\n", data, offset); } + virtual void write_auxram(UINT16 offset, UINT8 data) { printf("a2eauxslot: unhandled auxram write %02x @ %04x\n", data, offset); } virtual void write_c07x(address_space &space, UINT8 offset, UINT8 data) {} virtual UINT8 *get_vram_ptr() = 0; virtual bool allow_dhr() { return true; } diff --git a/src/mess/machine/a2eext80col.c b/src/mess/machine/a2eext80col.c index e13057f8910..fa7df626aa3 100644 --- a/src/mess/machine/a2eext80col.c +++ b/src/mess/machine/a2eext80col.c @@ -67,4 +67,3 @@ UINT8 *a2eaux_ext80col_device::get_vram_ptr() { return &m_ram[0]; } - diff --git a/src/mess/machine/a2eext80col.h b/src/mess/machine/a2eext80col.h index 5fef744c60a..491e63b7040 100644 --- a/src/mess/machine/a2eext80col.h +++ b/src/mess/machine/a2eext80col.h @@ -42,4 +42,3 @@ private: extern const device_type A2EAUX_EXT80COL; #endif /* __A2EAUX_EXT80COL__ */ - diff --git a/src/mess/machine/a2eramworks3.c b/src/mess/machine/a2eramworks3.c index 04023bf7153..228050f4aba 100644 --- a/src/mess/machine/a2eramworks3.c +++ b/src/mess/machine/a2eramworks3.c @@ -3,7 +3,7 @@ a2eramworks3.c Applied Engineering RamWorks III - + *********************************************************************/ @@ -73,14 +73,14 @@ UINT8 *a2eaux_ramworks3_device::get_vram_ptr() /* These cards are split into 64k logical banks. - + On a RW3: Banks 00-0F is the first MB Banks 10-17 are the next 512K Banks 30-37 are the next 512K Banks 50-57 are the next 512K Banks 70-77 are the next 512K - + However, the software will recognize and correctly use a configuration in which all of banks 00-7F are populated for a total of 8 megabytes. So that's what we do. */ @@ -92,4 +92,3 @@ void a2eaux_ramworks3_device::write_c07x(address_space &space, UINT8 offset, UIN m_bank = 0x10000 * (data & 0x7f); } } - diff --git a/src/mess/machine/a2eramworks3.h b/src/mess/machine/a2eramworks3.h index ef5c0857743..82ab022b9cc 100644 --- a/src/mess/machine/a2eramworks3.h +++ b/src/mess/machine/a2eramworks3.h @@ -44,4 +44,3 @@ private: extern const device_type A2EAUX_RAMWORKS3; #endif /* __A2EAUX_RAMWORKS3__ */ - diff --git a/src/mess/machine/a2estd80col.c b/src/mess/machine/a2estd80col.c index 92b6d90b4e9..dd09fa332e6 100644 --- a/src/mess/machine/a2estd80col.c +++ b/src/mess/machine/a2estd80col.c @@ -75,4 +75,3 @@ UINT8 *a2eaux_std80col_device::get_vram_ptr() { return &m_ram[0]; } - diff --git a/src/mess/machine/a2estd80col.h b/src/mess/machine/a2estd80col.h index dbc7f1bfe96..0e718567a7d 100644 --- a/src/mess/machine/a2estd80col.h +++ b/src/mess/machine/a2estd80col.h @@ -32,7 +32,7 @@ protected: virtual UINT8 read_auxram(UINT16 offset); virtual void write_auxram(UINT16 offset, UINT8 data); virtual UINT8 *get_vram_ptr(); - virtual bool allow_dhr() { return false; } // we don't allow DHR + virtual bool allow_dhr() { return false; } // we don't allow DHR private: UINT8 m_ram[2*1024]; @@ -42,4 +42,3 @@ private: extern const device_type A2EAUX_STD80COL; #endif /* __A2EAUX_STD80COL__ */ - diff --git a/src/mess/machine/a2midi.c b/src/mess/machine/a2midi.c index 23980d6d914..aa4777e8c88 100644 --- a/src/mess/machine/a2midi.c +++ b/src/mess/machine/a2midi.c @@ -21,7 +21,7 @@ const device_type A2BUS_MIDI = &device_creator; -#define MIDI_PTM_TAG "midi_ptm" +#define MIDI_PTM_TAG "midi_ptm" #define MIDI_ACIA_TAG "midi_acia" static struct ptm6840_interface ptm_interface = @@ -34,13 +34,13 @@ static struct ptm6840_interface ptm_interface = static struct acia6850_interface acia_interface = { - 31250*16, // tx clock - 0, // rx clock (we manually clock rx) - DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, a2bus_midi_device, rx_in), // rx in - DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, a2bus_midi_device, tx_out), // tx out - DEVCB_NULL, // cts in - DEVCB_NULL, // rts out - DEVCB_NULL, // dcd in + 31250*16, // tx clock + 0, // rx clock (we manually clock rx) + DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, a2bus_midi_device, rx_in), // rx in + DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, a2bus_midi_device, tx_out), // tx out + DEVCB_NULL, // cts in + DEVCB_NULL, // rts out + DEVCB_NULL, // dcd in DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, a2bus_midi_device, acia_irq_w) }; @@ -59,7 +59,7 @@ SLOT_INTERFACE_END static const serial_port_interface midiout_intf = { - DEVCB_NULL // midi out ports don't transmit inward + DEVCB_NULL // midi out ports don't transmit inward }; MACHINE_CONFIG_FRAGMENT( midi ) @@ -160,7 +160,7 @@ void a2bus_midi_device::write_c0nx(address_space &space, UINT8 offset, UINT8 dat // This works on h/w pretty much by accident; we'll make it right here. if ((data & 0x1c) == 0x10) { - data |= 0x04; // change wordbits from 0x10 to 0x14 + data |= 0x04; // change wordbits from 0x10 to 0x14 } m_acia->control_write(space, 0, data); @@ -202,7 +202,7 @@ WRITE_LINE_MEMBER( a2bus_midi_device::ptm_irq_w ) WRITE_LINE_MEMBER( a2bus_midi_device::midi_rx_w ) { m_rx_state = state; - for (int i = 0; i < 16; i++) // divider is set to 16 + for (int i = 0; i < 16; i++) // divider is set to 16 { m_acia->rx_clock_in(); } @@ -217,4 +217,3 @@ WRITE_LINE_MEMBER( a2bus_midi_device::tx_out ) { m_mdout->tx(state); } - diff --git a/src/mess/machine/a2ssc.c b/src/mess/machine/a2ssc.c index 9104e3c549e..71aec382106 100644 --- a/src/mess/machine/a2ssc.c +++ b/src/mess/machine/a2ssc.c @@ -230,4 +230,3 @@ WRITE_LINE_MEMBER( a2bus_ssc_device::acia_irq_w ) } } } - diff --git a/src/mess/machine/a2videoterm.c b/src/mess/machine/a2videoterm.c index ce4352d4cb3..5ff45fd745f 100644 --- a/src/mess/machine/a2videoterm.c +++ b/src/mess/machine/a2videoterm.c @@ -51,7 +51,7 @@ static MC6845_UPDATE_ROW( videoterm_update_row ); static MC6845_INTERFACE( mc6845_mda_intf ) { VIDEOTERM_SCREEN_NAME, /* screen number */ - false, /* show border area */ + false, /* show border area */ 8, /* number of pixels per video memory address */ NULL, /* begin_update */ videoterm_update_row, /* update_row */ diff --git a/src/mess/machine/a2vulcan.c b/src/mess/machine/a2vulcan.c index 5590525da7b..83ff2c4c4b3 100644 --- a/src/mess/machine/a2vulcan.c +++ b/src/mess/machine/a2vulcan.c @@ -1,54 +1,54 @@ /********************************************************************* - - a2vulcan.c - - Applied Engineering Vulcan IDE controller - - Our copy of ROM version 1.4 will refuse any drive > 40 megs (top 2 bytes of # blocks >= 0x15b). - Protection against field upgrades? - - Vulcan Gold ROMs omit this protection but don't work with the version of the partitioner program - we have. - - Recognized drives by IDE features parameters: - (# of cylinders is never checked, just heads, sectors, and the vendor specific at 0x0A) - - H S Vendor specific #5 - 8, 33 + 0x69 0x31d blocks (400K?!) - 2, 33 + 0x69 0xa208 blocks (20 megs, 21237760 bytes) - 4, 26 + 0x69 0x14500 blocks (40 megs, 42598400 bytes) - 5, 29 + (any) 0x25c5b blocks (80 megs, 79214080 bytes) (chs = 1067,5,29) - 7, 29 + 0x44 0x34e19 blocks (100 megs, 110899712 bytes) - 9, 29 + (any) 0x44068 blocks (140 megs, 142659584 bytes) (chs = 1068,9,29) - 9, 36 + 0x44 0x54888 blocks (180 megs, 177278976 bytes) - 9, 36 + 0xff 0x645a8 blocks (200 megs, 210456576 bytes) - 7, 34 + (any) 0x32252 blocks (100 megs, 105161728 bytes) (chs = 863,7,34) - 4, 17 + 0x55 0xa218 blocks (20 megs, 21245952 bytes) - 4, 26 + 0x55 0xa218 blocks (20 megs, 21245952 bytes) - 5, 17 + 0x55 0x15234 blocks (40 megs, 44328960 bytes) - 6, 26 + 0x55 0x15234 blocks (40 megs, 44328960 bytes) - 2, 28 + 0x36 0xa250 blocks (20 megs, 21274624 bytes) - 4, 28 + 0x36 0x143c0 blocks (40 megs, 42434450 bytes) - 4, 28 + 0x67 0x143c0 blocks (40 megs, 42434450 bytes) - 4, 27 + 0x43 0x147cc blocks (40 megs, 42964992 bytes) - 5, 17 + 0x26 0x13ec0 blocks (40 megs, 41779200 bytes) (chs = 960,5,17) - 15, 32 + 0x43 0x5f6e0 blocks (200 megs, 200130560 bytes) - 16, 38 + 0x94 0x6540c blocks (200 megs, 212342784 bytes) - 10, 17 + (any) 0x2792f blocks (80 megs, 82992640 bytes) (chs = 954,10,17) - - Partition block: - +0000: 0xAE 0xAE signature - +0002: bytesum of remaining 508 bytes of partition block - +0005: total # of blocks (3 bytes) - +000E: boot partition # (0 based) - +0100: partition records - - Partition record: - +02: partition number (seems to be only valud for non-CLEAR partitions) - +03: little-endian unsigned word: # of 512 byte blocks - +06: bit 6 set for ON, bits 0-2 = 0 CLEAR, 1 PRODOS, 2 DOS 3.3, 3 PASCAL, 4 CP/M - +07: Partition name (Apple high-ASCII, zero terminated unless full 10 chars) - + + a2vulcan.c + + Applied Engineering Vulcan IDE controller + + Our copy of ROM version 1.4 will refuse any drive > 40 megs (top 2 bytes of # blocks >= 0x15b). + Protection against field upgrades? + + Vulcan Gold ROMs omit this protection but don't work with the version of the partitioner program + we have. + + Recognized drives by IDE features parameters: + (# of cylinders is never checked, just heads, sectors, and the vendor specific at 0x0A) + + H S Vendor specific #5 + 8, 33 + 0x69 0x31d blocks (400K?!) + 2, 33 + 0x69 0xa208 blocks (20 megs, 21237760 bytes) + 4, 26 + 0x69 0x14500 blocks (40 megs, 42598400 bytes) + 5, 29 + (any) 0x25c5b blocks (80 megs, 79214080 bytes) (chs = 1067,5,29) + 7, 29 + 0x44 0x34e19 blocks (100 megs, 110899712 bytes) + 9, 29 + (any) 0x44068 blocks (140 megs, 142659584 bytes) (chs = 1068,9,29) + 9, 36 + 0x44 0x54888 blocks (180 megs, 177278976 bytes) + 9, 36 + 0xff 0x645a8 blocks (200 megs, 210456576 bytes) + 7, 34 + (any) 0x32252 blocks (100 megs, 105161728 bytes) (chs = 863,7,34) + 4, 17 + 0x55 0xa218 blocks (20 megs, 21245952 bytes) + 4, 26 + 0x55 0xa218 blocks (20 megs, 21245952 bytes) + 5, 17 + 0x55 0x15234 blocks (40 megs, 44328960 bytes) + 6, 26 + 0x55 0x15234 blocks (40 megs, 44328960 bytes) + 2, 28 + 0x36 0xa250 blocks (20 megs, 21274624 bytes) + 4, 28 + 0x36 0x143c0 blocks (40 megs, 42434450 bytes) + 4, 28 + 0x67 0x143c0 blocks (40 megs, 42434450 bytes) + 4, 27 + 0x43 0x147cc blocks (40 megs, 42964992 bytes) + 5, 17 + 0x26 0x13ec0 blocks (40 megs, 41779200 bytes) (chs = 960,5,17) + 15, 32 + 0x43 0x5f6e0 blocks (200 megs, 200130560 bytes) + 16, 38 + 0x94 0x6540c blocks (200 megs, 212342784 bytes) + 10, 17 + (any) 0x2792f blocks (80 megs, 82992640 bytes) (chs = 954,10,17) + + Partition block: + +0000: 0xAE 0xAE signature + +0002: bytesum of remaining 508 bytes of partition block + +0005: total # of blocks (3 bytes) + +000E: boot partition # (0 based) + +0100: partition records + + Partition record: + +02: partition number (seems to be only valud for non-CLEAR partitions) + +03: little-endian unsigned word: # of 512 byte blocks + +06: bit 6 set for ON, bits 0-2 = 0 CLEAR, 1 PRODOS, 2 DOS 3.3, 3 PASCAL, 4 CP/M + +07: Partition name (Apple high-ASCII, zero terminated unless full 10 chars) + *********************************************************************/ #include "a2vulcan.h" @@ -153,7 +153,7 @@ UINT8 a2bus_vulcanbase_device::read_c0nx(address_space &space, UINT8 offset) { case 0: m_lastdata = ide_controller_r(m_ide, 0x1f0+offset, 2); -// printf("IDE: read %04x\n", m_lastdata); +// printf("IDE: read %04x\n", m_lastdata); m_last_read_was_0 = true; return m_lastdata&0xff; @@ -178,7 +178,7 @@ UINT8 a2bus_vulcanbase_device::read_c0nx(address_space &space, UINT8 offset) return ide_controller_r(m_ide, 0x1f0+offset, 1); default: -// printf("Read @ C0n%x\n", offset); +// printf("Read @ C0n%x\n", offset); break; } @@ -195,18 +195,18 @@ void a2bus_vulcanbase_device::write_c0nx(address_space &space, UINT8 offset, UIN { switch (offset) { - case 0: + case 0: m_lastdata = data; m_last_read_was_0 = true; break; - + case 1: if (m_last_read_was_0) { m_last_read_was_0 = false; m_lastdata &= 0x00ff; m_lastdata |= (data << 8); -// printf("IDE: write %04x\n", m_lastdata); +// printf("IDE: write %04x\n", m_lastdata); ide_controller_w(m_ide, 0x1f0, 2, m_lastdata); } else @@ -221,17 +221,17 @@ void a2bus_vulcanbase_device::write_c0nx(address_space &space, UINT8 offset, UIN case 5: case 6: case 7: -// printf("%02x to IDE controller @ %x\n", data, offset); +// printf("%02x to IDE controller @ %x\n", data, offset); ide_controller_w(m_ide, 0x1f0+offset, 1, data); break; - case 9: // ROM bank -// printf("%x (%x) to ROM bank\n", data, (data & 0xf) * 0x400); + case 9: // ROM bank +// printf("%x (%x) to ROM bank\n", data, (data & 0xf) * 0x400); m_rombank = (data & 0xf) * 0x400; break; case 0xa: // RAM bank -// printf("%x to RAM bank\n", data); +// printf("%x to RAM bank\n", data); m_rambank = (data & 7) * 0x400; break; @@ -260,9 +260,9 @@ UINT8 a2bus_vulcanbase_device::read_cnxx(address_space &space, UINT8 offset) UINT8 a2bus_vulcanbase_device::read_c800(address_space &space, UINT16 offset) { offset &= 0x7ff; - if (offset < 0x400) // c800-cbff is banked RAM window, cc00-cfff is banked ROM window + if (offset < 0x400) // c800-cbff is banked RAM window, cc00-cfff is banked ROM window { -// printf("read RAM @ %x (bank %x)\n", offset, m_rambank); +// printf("read RAM @ %x (bank %x)\n", offset, m_rambank); return m_ram[offset + m_rambank]; } @@ -275,7 +275,7 @@ void a2bus_vulcanbase_device::write_c800(address_space &space, UINT16 offset, UI offset &= 0x7ff; if (offset < 0x400) { -// printf("%02x to RAM @ %x (bank %x)\n", data, offset, m_rambank); +// printf("%02x to RAM @ %x (bank %x)\n", data, offset, m_rambank); m_ram[offset + m_rambank] = data; } } diff --git a/src/mess/machine/amstrad.c b/src/mess/machine/amstrad.c index 226a7bc020f..613b33755af 100644 --- a/src/mess/machine/amstrad.c +++ b/src/mess/machine/amstrad.c @@ -1072,7 +1072,7 @@ UINT32 amstrad_state::screen_update_amstrad(screen_device &screen, bitmap_ind16 MC6845_INTERFACE( amstrad_mc6845_intf ) { NULL, /* screen name */ - false, /* show border area */ + false, /* show border area */ 16, /* number of pixels per video memory address */ NULL, /* begin_update */ NULL, /* update_row */ @@ -1088,7 +1088,7 @@ MC6845_INTERFACE( amstrad_mc6845_intf ) MC6845_INTERFACE( amstrad_plus_mc6845_intf ) { NULL, /* screen name */ - false, /* show border area */ + false, /* show border area */ 16, /* number of pixels per video memory address */ NULL, /* begin_update */ NULL, /* update_row */ diff --git a/src/mess/machine/apollo.c b/src/mess/machine/apollo.c index 157e0ad1236..fceec7fc7b1 100644 --- a/src/mess/machine/apollo.c +++ b/src/mess/machine/apollo.c @@ -675,7 +675,7 @@ static void apollo_pic_set_irq_line(device_t *device, int irq, int state) { } } -IRQ_CALLBACK_MEMBER(apollo_state::apollo_pic_acknowledge) +IRQ_CALLBACK_MEMBER(apollo_state::apollo_pic_acknowledge) { UINT32 vector = pic8259_acknowledge(get_pic8259_master(&device)); if ((vector & 0x0f) == APOLLO_IRQ_PIC_SLAVE) { diff --git a/src/mess/machine/apple2.c b/src/mess/machine/apple2.c index 33d96d120cc..4e02a320424 100644 --- a/src/mess/machine/apple2.c +++ b/src/mess/machine/apple2.c @@ -736,7 +736,7 @@ static void apple2_mem_2000(running_machine &machine, offs_t begin, offs_t end, static void apple2_mem_4000(running_machine &machine, offs_t begin, offs_t end, apple2_meminfo *meminfo) { apple2_state *state = machine.driver_data(); - meminfo->read_handler = (state->m_flags & VAR_RAMRD) ? &state->read_delegates_4000[0] : &state->read_delegates_4000[1]; + meminfo->read_handler = (state->m_flags & VAR_RAMRD) ? &state->read_delegates_4000[0] : &state->read_delegates_4000[1]; meminfo->write_handler = (state->m_flags & VAR_RAMWRT) ? &state->write_delegates_4000[0] : &state->write_delegates_4000[1]; } @@ -911,7 +911,7 @@ static void apple2_mem_E000(running_machine &machine, offs_t begin, offs_t end, if (state->m_flags & VAR_LCWRITE) { - meminfo->write_handler = (state->m_flags & VAR_ALTZP) ? &state->write_delegates_e000[0] : &state->write_delegates_e000[1]; + meminfo->write_handler = (state->m_flags & VAR_ALTZP) ? &state->write_delegates_e000[0] : &state->write_delegates_e000[1]; } else { diff --git a/src/mess/machine/apple2gs.c b/src/mess/machine/apple2gs.c index 4aaa86e1f14..b72657df22c 100644 --- a/src/mess/machine/apple2gs.c +++ b/src/mess/machine/apple2gs.c @@ -513,7 +513,7 @@ static void adb_write_datareg(running_machine &machine, UINT8 data) state->m_adb_command_length = 0; state->m_adb_command_pos = 0; -// printf("ADB command %02x\n", data); +// printf("ADB command %02x\n", data); switch(data) { case 0x00: /* ??? */ @@ -536,9 +536,9 @@ static void adb_write_datareg(running_machine &machine, UINT8 data) case 0x07: /* synchronize */ if (state->m_is_rom3) - state->m_adb_command_length = 8; // ROM 3 has 8 bytes: mode byte, 3 config bytes, kbd/mouse params, disk eject options + state->m_adb_command_length = 8; // ROM 3 has 8 bytes: mode byte, 3 config bytes, kbd/mouse params, disk eject options else - state->m_adb_command_length = 4; // ROM 0/1 has 4 bytes sync + state->m_adb_command_length = 4; // ROM 0/1 has 4 bytes sync break; case 0x08: /* write memory */ @@ -604,7 +604,7 @@ static void adb_write_datareg(running_machine &machine, UINT8 data) case ADBSTATE_INCOMMAND: assert(state->m_adb_command_pos < ARRAY_LENGTH(state->m_adb_command_bytes)); -// printf("ADB param %02x\n", data); +// printf("ADB param %02x\n", data); state->m_adb_command_bytes[state->m_adb_command_pos++] = data; break; @@ -907,18 +907,18 @@ static int apple2gs_get_vpos(running_machine &machine) READ8_MEMBER( apple2gs_state::apple2gs_c0xx_r ) { - UINT8 result; - scc8530_t *scc; + UINT8 result; + scc8530_t *scc; - if(space.debugger_access()) - { - return 0; - } + if(space.debugger_access()) + { + return 0; + } - offset &= 0xFF; + offset &= 0xFF; - switch(offset) - { + switch(offset) + { #if RUN_ADB_MICRO case 0x00: /* C000 - KEYDATA */ result = keyglu_816_read(GLU_C000); @@ -942,7 +942,7 @@ READ8_MEMBER( apple2gs_state::apple2gs_c0xx_r ) break; case 0x24: /* C024 - MOUSEDATA */ - #if RUN_ADB_MICRO + #if RUN_ADB_MICRO result = keyglu_816_read(GLU_MOUSEX); #else result = adb_read_mousedata(space.machine()); @@ -950,7 +950,7 @@ READ8_MEMBER( apple2gs_state::apple2gs_c0xx_r ) break; case 0x25: /* C025 - KEYMODREG */ - #if RUN_ADB_MICRO + #if RUN_ADB_MICRO result = keyglu_816_read(GLU_KEYMOD); #else result = AY3600_keymod_r(space.machine()); @@ -958,7 +958,7 @@ READ8_MEMBER( apple2gs_state::apple2gs_c0xx_r ) break; case 0x26: /* C026 - DATAREG */ - #if RUN_ADB_MICRO + #if RUN_ADB_MICRO result = keyglu_816_read(GLU_DATA); #else result = adb_read_datareg(); @@ -966,7 +966,7 @@ READ8_MEMBER( apple2gs_state::apple2gs_c0xx_r ) break; case 0x27: /* C027 - KMSTATUS */ - #if RUN_ADB_MICRO + #if RUN_ADB_MICRO result = keyglu_816_read(GLU_SYSSTAT); #else result = adb_read_kmstatus(); @@ -1093,10 +1093,10 @@ READ8_MEMBER( apple2gs_state::apple2gs_c0xx_r ) break; } - if (LOG_C0XX) - logerror("apple2gs_c0xx_r(): offset=0x%02x result=0x%02x\n", offset, result); + if (LOG_C0XX) + logerror("apple2gs_c0xx_r(): offset=0x%02x result=0x%02x\n", offset, result); - return result; + return result; } @@ -1228,14 +1228,14 @@ WRITE8_MEMBER( apple2gs_state::apple2gs_c0xx_w ) case 0x68: /* C068 - STATEREG */ apple2_setvar(space.machine(), - ((data & 0x80) ? VAR_ALTZP : 0) | - ((data & 0x40) ? VAR_PAGE2 : 0) | - ((data & 0x20) ? VAR_RAMRD : 0) | - ((data & 0x10) ? VAR_RAMWRT : 0) | - ((data & 0x08) ? 0 : VAR_LCRAM) | - ((data & 0x04) ? VAR_LCRAM2 : 0) | - ((data & 0x01) ? VAR_INTCXROM : 0), - VAR_ALTZP | VAR_PAGE2 | VAR_RAMRD | VAR_RAMWRT | VAR_LCRAM | VAR_LCRAM2 | VAR_INTCXROM); + ((data & 0x80) ? VAR_ALTZP : 0) | + ((data & 0x40) ? VAR_PAGE2 : 0) | + ((data & 0x20) ? VAR_RAMRD : 0) | + ((data & 0x10) ? VAR_RAMWRT : 0) | + ((data & 0x08) ? 0 : VAR_LCRAM) | + ((data & 0x04) ? VAR_LCRAM2 : 0) | + ((data & 0x01) ? VAR_INTCXROM : 0), + VAR_ALTZP | VAR_PAGE2 | VAR_RAMRD | VAR_RAMWRT | VAR_LCRAM | VAR_LCRAM2 | VAR_INTCXROM); break; // slot 6 registers should go to applefdc if slot 6 not "Your Card" @@ -1261,7 +1261,7 @@ WRITE8_MEMBER( apple2gs_state::apple2gs_c0xx_w ) apple2_c080_w(space, offset, data, 0); } break; - } + } } @@ -2104,7 +2104,7 @@ void apple2gs_state::keyglu_mcu_write(UINT8 offset, UINT8 data) case GLU_MOUSEX: case GLU_MOUSEY: m_glu_regs[GLU_KG_STATUS] |= KGS_MOUSEX_FULL; - m_glu_mouse_read_stat = false; // signal next read will be mouse X + m_glu_mouse_read_stat = false; // signal next read will be mouse X break; case GLU_ANY_KEY_DOWN: @@ -2121,120 +2121,120 @@ void apple2gs_state::keyglu_mcu_write(UINT8 offset, UINT8 data) /* Keym_glu registers map as follows on the 816: - + C000 = key data + any key down, clears strobe C010 = clears keystrobe - + C024 MOUSEDATA = reads GLU mouseX and mouseY C025 KEYMODREG = reads GLU keymod register C026 DATAREG = writes from the 816 go to COMMAND, reads from DATA C027 KMSTATUS = GLU system status register - + */ UINT8 apple2gs_state::keyglu_816_read(UINT8 offset) { - switch (offset) - { - case GLU_C000: - { - UINT8 rv; - rv = m_glu_regs[GLU_KEY_DATA] & 0x7f; - if (m_glu_regs[GLU_KG_STATUS] & KGS_KEYSTROBE) - { - rv |= 0x80; - } - return rv; - } - break; - - case GLU_C010: - { - UINT8 rv; - rv = m_glu_regs[GLU_KEY_DATA] & 0x7f; - if (m_glu_regs[GLU_KG_STATUS] & KGS_KEYSTROBE) - { - rv |= 0x80; - } - m_glu_regs[GLU_KG_STATUS] &= ~KGS_KEYSTROBE; - return rv; - } - break; - - case GLU_MOUSEX: - case GLU_MOUSEY: - if (!m_glu_mouse_read_stat) - { - m_glu_mouse_read_stat = 1; - return m_glu_regs[GLU_MOUSEY]; - } - return m_glu_regs[GLU_MOUSEX]; - - case GLU_SYSSTAT: - // regenerate sysstat bits - m_glu_sysstat &= ~0xab; // mask off read/write bits - if (m_glu_regs[GLU_KG_STATUS] & KGS_COMMAND_FULL) - { - m_glu_sysstat |= 1; - } - if (m_glu_regs[GLU_KG_STATUS] & m_glu_mouse_read_stat) - { - m_glu_sysstat |= 2; - } - if (m_glu_regs[GLU_KG_STATUS] & KGS_KEYSTROBE) - { - m_glu_sysstat |= 8; - } - if (m_glu_regs[GLU_KG_STATUS] & KGS_DATA_FULL) - { - m_glu_sysstat |= 0x20; - } - if (m_glu_regs[GLU_KG_STATUS] & KGS_MOUSEX_FULL) - { - m_glu_sysstat |= 0x80; - } - m_glu_816_read_dstat = true; -// printf("816 gets %02x in sysstat (data avail %02x)\n", m_glu_sysstat, m_glu_sysstat & 0x20); - return m_glu_sysstat; - - case GLU_DATA: - if (m_glu_816_read_dstat) - { - m_glu_816_read_dstat = false; - m_glu_regs[GLU_KG_STATUS] &= ~KGS_DATA_FULL; - printf("816 reads %02x from DATA\n", m_glu_regs[GLU_DATA]); - } - return m_glu_regs[GLU_DATA]; - - default: - return m_glu_regs[offset]; - break; - } - - return 0xff; + switch (offset) + { + case GLU_C000: + { + UINT8 rv; + rv = m_glu_regs[GLU_KEY_DATA] & 0x7f; + if (m_glu_regs[GLU_KG_STATUS] & KGS_KEYSTROBE) + { + rv |= 0x80; + } + return rv; + } + break; + + case GLU_C010: + { + UINT8 rv; + rv = m_glu_regs[GLU_KEY_DATA] & 0x7f; + if (m_glu_regs[GLU_KG_STATUS] & KGS_KEYSTROBE) + { + rv |= 0x80; + } + m_glu_regs[GLU_KG_STATUS] &= ~KGS_KEYSTROBE; + return rv; + } + break; + + case GLU_MOUSEX: + case GLU_MOUSEY: + if (!m_glu_mouse_read_stat) + { + m_glu_mouse_read_stat = 1; + return m_glu_regs[GLU_MOUSEY]; + } + return m_glu_regs[GLU_MOUSEX]; + + case GLU_SYSSTAT: + // regenerate sysstat bits + m_glu_sysstat &= ~0xab; // mask off read/write bits + if (m_glu_regs[GLU_KG_STATUS] & KGS_COMMAND_FULL) + { + m_glu_sysstat |= 1; + } + if (m_glu_regs[GLU_KG_STATUS] & m_glu_mouse_read_stat) + { + m_glu_sysstat |= 2; + } + if (m_glu_regs[GLU_KG_STATUS] & KGS_KEYSTROBE) + { + m_glu_sysstat |= 8; + } + if (m_glu_regs[GLU_KG_STATUS] & KGS_DATA_FULL) + { + m_glu_sysstat |= 0x20; + } + if (m_glu_regs[GLU_KG_STATUS] & KGS_MOUSEX_FULL) + { + m_glu_sysstat |= 0x80; + } + m_glu_816_read_dstat = true; +// printf("816 gets %02x in sysstat (data avail %02x)\n", m_glu_sysstat, m_glu_sysstat & 0x20); + return m_glu_sysstat; + + case GLU_DATA: + if (m_glu_816_read_dstat) + { + m_glu_816_read_dstat = false; + m_glu_regs[GLU_KG_STATUS] &= ~KGS_DATA_FULL; + printf("816 reads %02x from DATA\n", m_glu_regs[GLU_DATA]); + } + return m_glu_regs[GLU_DATA]; + + default: + return m_glu_regs[offset]; + break; + } + + return 0xff; } void apple2gs_state::keyglu_816_write(UINT8 offset, UINT8 data) { - if (offset < GLU_C000) - { - m_glu_regs[offset&7] = data; - } - - switch (offset) - { - case GLU_C010: - m_glu_regs[GLU_KG_STATUS] &= ~KGS_KEYSTROBE; - break; - - case GLU_COMMAND: - printf("816 sets COMMAND to %02x (raise command full)\n", data); - m_glu_regs[GLU_KG_STATUS] |= KGS_COMMAND_FULL; - break; - - case GLU_SYSSTAT: - m_glu_sysstat &= 0xab; // clear the non-read-only fields - m_glu_sysstat |= (data & ~0xab); - break; - } + if (offset < GLU_C000) + { + m_glu_regs[offset&7] = data; + } + + switch (offset) + { + case GLU_C010: + m_glu_regs[GLU_KG_STATUS] &= ~KGS_KEYSTROBE; + break; + + case GLU_COMMAND: + printf("816 sets COMMAND to %02x (raise command full)\n", data); + m_glu_regs[GLU_KG_STATUS] |= KGS_COMMAND_FULL; + break; + + case GLU_SYSSTAT: + m_glu_sysstat &= 0xab; // clear the non-read-only fields + m_glu_sysstat |= (data & ~0xab); + break; + } } #endif diff --git a/src/mess/machine/ataricrt.c b/src/mess/machine/ataricrt.c index f151100f767..a7f3bee0e8d 100644 --- a/src/mess/machine/ataricrt.c +++ b/src/mess/machine/ataricrt.c @@ -54,5 +54,3 @@ static READ8_HANDLER( bbsb_bankh_r ) return &mem[0x4000 + bbsb_bankh * 0x1000]; } #endif - - diff --git a/src/mess/machine/ay3600.c b/src/mess/machine/ay3600.c index 24eab6de999..77451c6537d 100644 --- a/src/mess/machine/ay3600.c +++ b/src/mess/machine/ay3600.c @@ -356,8 +356,8 @@ static TIMER_CALLBACK(AY3600_poll) int caps_lock = 0; int curkey; int curkey_unmodified; - ioport_port *portnames[] = { state->m_kb0, state->m_kb1, state->m_kb2, state->m_kb3, state->m_kb4, state->m_kb5, state->m_kb6, - state->m_kpad1, state->m_kpad2 }; + ioport_port *portnames[] = { state->m_kb0, state->m_kb1, state->m_kb2, state->m_kb3, state->m_kb4, state->m_kb5, state->m_kb6, + state->m_kpad1, state->m_kpad2 }; /* check for these special cases because they affect the emulated key codes */ diff --git a/src/mess/machine/c1581.c b/src/mess/machine/c1581.c index 6c313f6c585..ee639e9bb58 100644 --- a/src/mess/machine/c1581.c +++ b/src/mess/machine/c1581.c @@ -11,8 +11,8 @@ TODO: - - drive not ready if ready_r() is connected to CIA - - format fails (seeks to directory track and reports BAD DISK error) + - drive not ready if ready_r() is connected to CIA + - format fails (seeks to directory track and reports BAD DISK error) - save fails (no error message, but no file added to directory either) */ diff --git a/src/mess/machine/c64_fcc.c b/src/mess/machine/c64_fcc.c index 4b5d0be5733..59b954b5394 100644 --- a/src/mess/machine/c64_fcc.c +++ b/src/mess/machine/c64_fcc.c @@ -9,16 +9,16 @@ /* - TODO: + TODO: - 629D ldx #$00 - 629F stx $0e - 62A1 sta $df00 - 62A4 inc $d020 - 62A7 dec $d020 - 62AA cpx $0e - 62AC beq $62a4 <-- eternal loop here - 62AE rts + 629D ldx #$00 + 629F stx $0e + 62A1 sta $df00 + 62A4 inc $d020 + 62A7 dec $d020 + 62AA cpx $0e + 62AC beq $62a4 <-- eternal loop here + 62AE rts */ @@ -205,38 +205,38 @@ void c64_final_chesscard_device::c64_cd_w(address_space &space, offs_t offset, U else if (!io1) { /* - + bit description - + 0 ? - 1 - 2 - 3 - 4 - 5 - 6 - 7 - + 1 + 2 + 3 + 4 + 5 + 6 + 7 + */ printf("IO1 %04x %02x\n", offset, data); m_bank = BIT(data, 0); } - else if (!io2) + else if (!io2) { /* - + bit description - + 0 ? - 1 - 2 - 3 - 4 - 5 - 6 + 1 + 2 + 3 + 4 + 5 + 6 7 ? - + */ printf("IO2 %04x %02x\n", offset, data); diff --git a/src/mess/machine/c64_magic_voice.c b/src/mess/machine/c64_magic_voice.c index b8629be4f5a..0a21852a7c3 100644 --- a/src/mess/machine/c64_magic_voice.c +++ b/src/mess/machine/c64_magic_voice.c @@ -15,8 +15,8 @@ // MACROS / CONSTANTS //************************************************************************** -#define T6721A_TAG "u5" -#define MOS6525_TAG "u2" +#define T6721A_TAG "u5" +#define MOS6525_TAG "u2" diff --git a/src/mess/machine/c64_magic_voice.h b/src/mess/machine/c64_magic_voice.h index 03bfaf44e84..6eb2d1a4d46 100644 --- a/src/mess/machine/c64_magic_voice.h +++ b/src/mess/machine/c64_magic_voice.h @@ -27,7 +27,7 @@ // ======================> c64_magic_voice_cartridge_device class c64_magic_voice_cartridge_device : public device_t, - public device_c64_expansion_card_interface + public device_c64_expansion_card_interface { public: // construction/destruction diff --git a/src/mess/machine/c64_sw8k.c b/src/mess/machine/c64_sw8k.c index ed1e2c893a5..0f554f3e93f 100644 --- a/src/mess/machine/c64_sw8k.c +++ b/src/mess/machine/c64_sw8k.c @@ -75,7 +75,7 @@ ioport_constructor c64_switchable_8k_cartridge_device::device_input_ports() cons c64_switchable_8k_cartridge_device::c64_switchable_8k_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, C64_SW8K, "C64 Switchable 8K cartridge", tag, owner, clock), device_c64_expansion_card_interface(mconfig, *this), - m_sw(*this, "SW") + m_sw(*this, "SW") { } diff --git a/src/mess/machine/c64_sw8k.h b/src/mess/machine/c64_sw8k.h index 9ccb75b36be..86bb4c98fdb 100644 --- a/src/mess/machine/c64_sw8k.h +++ b/src/mess/machine/c64_sw8k.h @@ -45,7 +45,7 @@ protected: private: required_ioport m_sw; - + int m_bank; }; diff --git a/src/mess/machine/c64_swiftlink.c b/src/mess/machine/c64_swiftlink.c index 3c79e213bed..536181f1fd4 100644 --- a/src/mess/machine/c64_swiftlink.c +++ b/src/mess/machine/c64_swiftlink.c @@ -9,7 +9,7 @@ /* - http://mclauchlan.site.net.au/scott/C=Hacking/C-Hacking10/C-Hacking10-swiftlink.html + http://mclauchlan.site.net.au/scott/C=Hacking/C-Hacking10/C-Hacking10-swiftlink.html */ @@ -21,8 +21,8 @@ // MACROS/CONSTANTS //************************************************************************** -#define MOS6551_TAG "mos6551" -#define RS232_TAG "rs232" +#define MOS6551_TAG "mos6551" +#define RS232_TAG "rs232" diff --git a/src/mess/machine/c64_turbo232.c b/src/mess/machine/c64_turbo232.c index 85d9488d7ca..6b8e9fd2c60 100644 --- a/src/mess/machine/c64_turbo232.c +++ b/src/mess/machine/c64_turbo232.c @@ -9,7 +9,7 @@ /* - http://ar.c64.org/wiki/Turbo232_Programming.txt + http://ar.c64.org/wiki/Turbo232_Programming.txt */ @@ -21,8 +21,8 @@ // MACROS/CONSTANTS //************************************************************************** -#define MOS6551_TAG "mos6551" -#define RS232_TAG "rs232" +#define MOS6551_TAG "mos6551" +#define RS232_TAG "rs232" diff --git a/src/mess/machine/c64_vizastar.c b/src/mess/machine/c64_vizastar.c index b90eeb81db1..947b5db9cc1 100644 --- a/src/mess/machine/c64_vizastar.c +++ b/src/mess/machine/c64_vizastar.c @@ -11,7 +11,7 @@ PCB Layout ---------- - RB84 (C) MICROPORT + RB84 (C) MICROPORT |===========================| |=| | |=| | diff --git a/src/mess/machine/comxpl80.h b/src/mess/machine/comxpl80.h index e4e4ff1eaf1..ed828887dd9 100644 --- a/src/mess/machine/comxpl80.h +++ b/src/mess/machine/comxpl80.h @@ -52,7 +52,7 @@ private: required_memory_region m_plotter; required_ioport m_font; required_ioport m_sw; - + // PL-80 plotter state UINT16 m_font_addr; // font ROM pack address latch UINT8 m_x_motor_phase; // X motor phase diff --git a/src/mess/machine/ecb_grip.c b/src/mess/machine/ecb_grip.c index 7a8e9a5280f..5486ab26f09 100644 --- a/src/mess/machine/ecb_grip.c +++ b/src/mess/machine/ecb_grip.c @@ -301,7 +301,7 @@ static MC6845_INTERFACE( crtc_intf ) static MC6845_INTERFACE( grip5_crtc_intf ) { SCREEN_TAG, - false, + false, 8, NULL, grip5_update_row, diff --git a/src/mess/machine/gb.c b/src/mess/machine/gb.c index 2160cacaa53..60f97ddfb6e 100644 --- a/src/mess/machine/gb.c +++ b/src/mess/machine/gb.c @@ -1057,7 +1057,7 @@ MACHINE_RESET_MEMBER(megaduck_state,megaduck) { /* We may have to add some more stuff here, if not then it can be merged back into gb */ gb_init(); - + m_bios_disable = TRUE; gb_video_reset( GB_VIDEO_DMG ); @@ -1168,4 +1168,3 @@ READ8_MEMBER(megaduck_state::megaduck_sound_r2) { return gb_sound_r(machine().device("custom"), space, 0x10 + megaduck_sound_offsets[offset]); } - diff --git a/src/mess/machine/gb_mbc.c b/src/mess/machine/gb_mbc.c index 1ffd2808774..c643e118699 100644 --- a/src/mess/machine/gb_mbc.c +++ b/src/mess/machine/gb_mbc.c @@ -1,8 +1,8 @@ /*********************************************************************************************************** - + Game Boy carts with MBC (Memory Bank Controller) - - + + TODO: add proper RTC and Rumble support ***********************************************************************************************************/ @@ -94,7 +94,7 @@ void gb_rom_mbc1_device::device_start() { has_timer = FALSE; has_rumble = FALSE; - + m_latch_bank = 0; m_latch_bank2 = 1; m_ram_bank = 0; @@ -111,7 +111,7 @@ void gb_rom_mbc1k_device::device_start() { has_timer = FALSE; has_rumble = FALSE; - + m_latch_bank = 0; m_latch_bank2 = 1; m_ram_bank = 0; @@ -128,7 +128,7 @@ void gb_rom_mbc2_device::device_start() { has_timer = FALSE; has_rumble = FALSE; - + m_latch_bank = 0; m_latch_bank2 = 1; m_ram_bank = 0; @@ -164,7 +164,7 @@ void gb_rom_mbc5_device::device_start() { has_timer = FALSE; has_rumble = FALSE; - + m_latch_bank = 0; m_latch_bank2 = 1; m_ram_bank = 0; @@ -181,14 +181,14 @@ void gb_rom_mbc6_device::device_start() { has_timer = FALSE; has_rumble = FALSE; - - m_bank_4000 = 2; // correct default? - m_bank_6000 = 3; // correct default? - m_latch1 = 0; // correct default? - m_latch2 = 0; // correct default? - - m_latch_bank = 2; // correct default? - m_latch_bank2 = 3; // correct default? + + m_bank_4000 = 2; // correct default? + m_bank_6000 = 3; // correct default? + m_latch1 = 0; // correct default? + m_latch2 = 0; // correct default? + + m_latch_bank = 2; // correct default? + m_latch_bank2 = 3; // correct default? m_ram_bank = 0; m_ram_enable = 0; m_mode = 0; @@ -208,7 +208,7 @@ void gb_rom_mbc7_device::device_start() { has_timer = FALSE; has_rumble = TRUE; - + m_latch_bank = 0; m_latch_bank2 = 1; m_ram_bank = 0; @@ -223,7 +223,7 @@ void gb_rom_mmm01_device::device_start() { has_timer = FALSE; has_rumble = TRUE; - + m_latch_bank = 0x200 - 2; m_latch_bank2 = 0x200 - 1; m_ram_bank = 0; @@ -285,7 +285,7 @@ WRITE8_MEMBER(gb_rom_mbc1_device::write_bank) // bank = 0 => bank = 1 if (data == 0) data = 1; - + m_latch_bank2 = (m_latch_bank2 & 0x01e0) | data; } else if (offset < 0x6000) @@ -340,7 +340,7 @@ WRITE8_MEMBER(gb_rom_mbc1k_device::write_bank) // bank = 0 => bank = 1 if (data == 0) data = 1; - + m_latch_bank2 = (m_latch_bank2 & 0x01f0) | data; } else if (offset < 0x6000) @@ -390,13 +390,13 @@ WRITE8_MEMBER(gb_rom_mbc2_device::write_bank) if (offset < 0x2000) m_ram_enable = ((data & 0x0f) == 0x0a) ? 1 : 0; else if (offset < 0x4000) - { + { // 4bits only data &= 0x0f; // bank = 0 => bank = 1 if (data == 0) data = 1; - + // The least significant bit of the upper address byte must be 1 if (offset & 0x0100) m_latch_bank2 = (m_latch_bank2 & 0x100) | data; @@ -440,7 +440,7 @@ WRITE8_MEMBER(gb_rom_mbc3_device::write_bank) /* Selecting bank 0 == selecting bank 1 */ if (data == 0) data = 1; - + m_latch_bank2 = data; } else if (offset < 0x6000) @@ -464,14 +464,14 @@ WRITE8_MEMBER(gb_rom_mbc3_device::write_bank) READ8_MEMBER(gb_rom_mbc3_device::read_ram) { if (m_ram_bank < 4 && m_ram_enable) - { // RAM + { // RAM if (m_ram) - return m_ram[ram_bank_map[m_ram_bank] * 0x2000 + (offset & 0x1fff)]; + return m_ram[ram_bank_map[m_ram_bank] * 0x2000 + (offset & 0x1fff)]; } if (m_ram_bank >= 0x8 && m_ram_bank <= 0xc) - { // RAM + { // RAM if (has_timer) - return m_rtc_map[m_ram_bank - 8]; + return m_rtc_map[m_ram_bank - 8]; } return 0xff; } @@ -479,12 +479,12 @@ READ8_MEMBER(gb_rom_mbc3_device::read_ram) WRITE8_MEMBER(gb_rom_mbc3_device::write_ram) { if (m_ram_bank < 4 && m_ram_enable) - { // RAM + { // RAM if (m_ram) m_ram[ram_bank_map[m_ram_bank] * 0x2000 + (offset & 0x1fff)] = data; } if (m_ram_bank >= 0x8 && m_ram_bank <= 0xc) - { // RAM + { // RAM if (has_timer) { // what to do here? @@ -689,4 +689,3 @@ WRITE8_MEMBER(gb_rom_mmm01_device::write_bank) } } } - diff --git a/src/mess/machine/gb_mbc.h b/src/mess/machine/gb_mbc.h index faa5b5640d4..c29c558495f 100644 --- a/src/mess/machine/gb_mbc.h +++ b/src/mess/machine/gb_mbc.h @@ -7,12 +7,12 @@ // ======================> gb_rom_mbc_device class gb_rom_mbc_device : public device_t, - public device_gb_cart_interface + public device_gb_cart_interface { public: // construction/destruction gb_rom_mbc_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "gb_rom_mbc_base"; } @@ -21,7 +21,7 @@ public: virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_READ8_MEMBER(read_ram); virtual DECLARE_WRITE8_MEMBER(write_ram); - + UINT8 m_ram_enable; UINT8 m_mode; }; @@ -33,7 +33,7 @@ class gb_rom_mbc1_device : public gb_rom_mbc_device public: // construction/destruction gb_rom_mbc1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "gb_rom_mbc1"; } @@ -51,11 +51,11 @@ class gb_rom_mbc1k_device : public gb_rom_mbc_device public: // construction/destruction gb_rom_mbc1k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "gb_rom_mbc1k"; } - + virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_WRITE8_MEMBER(write_bank); virtual DECLARE_READ8_MEMBER(read_ram); @@ -69,11 +69,11 @@ class gb_rom_mbc2_device : public gb_rom_mbc_device public: // construction/destruction gb_rom_mbc2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "gb_rom_mbc2"; } - + virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_WRITE8_MEMBER(write_bank); virtual DECLARE_READ8_MEMBER(read_ram); @@ -87,11 +87,11 @@ class gb_rom_mbc3_device : public gb_rom_mbc_device public: // construction/destruction gb_rom_mbc3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "gb_rom_mbc3"; } - + virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_WRITE8_MEMBER(write_bank); virtual DECLARE_READ8_MEMBER(read_ram); @@ -106,11 +106,11 @@ class gb_rom_mbc5_device : public gb_rom_mbc_device public: // construction/destruction gb_rom_mbc5_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "gb_rom_mbc5"; } - + virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_WRITE8_MEMBER(write_bank); virtual DECLARE_READ8_MEMBER(read_ram); @@ -124,11 +124,11 @@ class gb_rom_mbc6_device : public gb_rom_mbc_device public: // construction/destruction gb_rom_mbc6_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "gb_rom_mbc6"; } - + virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_WRITE8_MEMBER(write_bank); virtual DECLARE_READ8_MEMBER(read_ram); @@ -144,11 +144,11 @@ class gb_rom_mbc7_device : public gb_rom_mbc_device public: // construction/destruction gb_rom_mbc7_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "gb_rom_mbc7"; } - + virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_WRITE8_MEMBER(write_bank); virtual DECLARE_READ8_MEMBER(read_ram); @@ -161,11 +161,11 @@ class gb_rom_mmm01_device : public gb_rom_mbc_device public: // construction/destruction gb_rom_mmm01_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "gb_rom_mmm01"; } - + // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_WRITE8_MEMBER(write_bank); diff --git a/src/mess/machine/gb_rom.c b/src/mess/machine/gb_rom.c index 1f6de921f7e..d7fca7581fb 100644 --- a/src/mess/machine/gb_rom.c +++ b/src/mess/machine/gb_rom.c @@ -1,11 +1,11 @@ /*********************************************************************************************************** Game Boy cart emulation - - + + Here we emulate carts with no RAM and simple bankswitch - - + + ***********************************************************************************************************/ @@ -96,7 +96,7 @@ void megaduck_rom_device::device_start() void gb_rom_tama5_device::device_start() { m_tama5_data = 0; - m_tama5_addr= 0; + m_tama5_addr= 0; m_tama5_cmd = 0; memset(m_regs, 0xff, sizeof(m_regs)); m_rtc_reg = 0xff; @@ -366,4 +366,3 @@ WRITE8_MEMBER(megaduck_rom_device::write_ram) m_latch_bank = data * 2; m_latch_bank2 = data * 2 + 1; } - diff --git a/src/mess/machine/gb_rom.h b/src/mess/machine/gb_rom.h index 0a538effd55..805df3bd2df 100644 --- a/src/mess/machine/gb_rom.h +++ b/src/mess/machine/gb_rom.h @@ -7,13 +7,13 @@ // ======================> gb_rom_device class gb_rom_device : public device_t, - public device_gb_cart_interface + public device_gb_cart_interface { public: // construction/destruction gb_rom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock); gb_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "gb_rom"; } @@ -30,11 +30,11 @@ class gb_rom_tama5_device : public gb_rom_device public: // construction/destruction gb_rom_tama5_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "gb_rom_tama5"; } - + // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_READ8_MEMBER(read_ram); @@ -50,11 +50,11 @@ class gb_rom_wisdom_device : public gb_rom_device public: // construction/destruction gb_rom_wisdom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "gb_rom_wisdom"; } - + // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_WRITE8_MEMBER(write_bank); @@ -66,11 +66,11 @@ class gb_rom_yong_device : public gb_rom_device public: // construction/destruction gb_rom_yong_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "gb_rom_yong"; } - + // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_WRITE8_MEMBER(write_bank); @@ -82,11 +82,11 @@ class gb_rom_atvrac_device : public gb_rom_device public: // construction/destruction gb_rom_atvrac_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "gb_rom_atvrac"; } - + // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_WRITE8_MEMBER(write_bank); @@ -98,11 +98,11 @@ class gb_rom_lasama_device : public gb_rom_device public: // construction/destruction gb_rom_lasama_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "gb_rom_lasama"; } - + // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_WRITE8_MEMBER(write_bank); @@ -119,11 +119,11 @@ public: // construction/destruction megaduck_rom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock); megaduck_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "megaduck_rom"; } - + // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_WRITE8_MEMBER(write_bank); diff --git a/src/mess/machine/gb_slot.c b/src/mess/machine/gb_slot.c index d469e4103f3..810d2cdb319 100644 --- a/src/mess/machine/gb_slot.c +++ b/src/mess/machine/gb_slot.c @@ -1,18 +1,18 @@ /*********************************************************************************************************** - + Game Boy cart emulation (through slot devices) - + The driver exposes address ranges 0x0000-0x7fff to read_rom/write_bank 0xa000-0xbfff to read_ram/write_ram (typically RAM/NVRAM accesses, but megaduck uses the write for bankswitch) - + currently available slot devices: gb_rom: standard carts + TAMA5 mapper + pirate carts with protection & bankswitch gb_mbc: MBC1-MBC7 carts (more complex bankswitch + RAM + possibly RTC/Rumble/etc.) - + ***********************************************************************************************************/ @@ -81,17 +81,17 @@ void device_gb_cart_interface::ram_alloc(running_machine &machine, UINT32 size) //------------------------------------------------- -// rom_map_setup - setup map of rom banks in 16K +// rom_map_setup - setup map of rom banks in 16K // blocks, so to simplify ROM access //------------------------------------------------- void device_gb_cart_interface::rom_map_setup(UINT32 size) { int i; - // setup the rom_bank_map array to faster ROM read + // setup the rom_bank_map array to faster ROM read for (i = 0; i < size / 0x4000; i++) rom_bank_map[i] = i; - + // fill up remaining blocks with mirrors while (i % 512) { @@ -105,26 +105,26 @@ void device_gb_cart_interface::rom_map_setup(UINT32 size) } // check bank map! -// for (i = 0; i < 256; i++) -// { -// printf("bank %3d = %3d\t", i, rom_bank_map[i]); -// if ((i%8) == 7) -// printf("\n"); -// } +// for (i = 0; i < 256; i++) +// { +// printf("bank %3d = %3d\t", i, rom_bank_map[i]); +// if ((i%8) == 7) +// printf("\n"); +// } } //------------------------------------------------- -// ram_map_setup - setup map of ram banks in 16K +// ram_map_setup - setup map of ram banks in 16K // blocks, so to simplify ROM access //------------------------------------------------- void device_gb_cart_interface::ram_map_setup(UINT8 banks) { int mask = banks - 1; - + for (int i = 0; i < banks; i++) ram_bank_map[i] = i; - + // Set up rest of the (mirrored) RAM pages for (int i = banks; i < 256; i++) ram_bank_map[i] = i & mask; @@ -208,8 +208,8 @@ static const gb_slot slot_list[] = { GB_MBC_MBC7, "rom_mbc7" }, { GB_MBC_TAMA5, "rom_tama5" }, { GB_MBC_MMM01, "rom_mmm01" }, - { GB_MBC_MBC3, "rom_huc1" }, // for now treat this as alias for MBC3 - { GB_MBC_MBC3, "rom_huc3" }, // for now treat this as alias for MBC3 + { GB_MBC_MBC3, "rom_huc1" }, // for now treat this as alias for MBC3 + { GB_MBC_MBC3, "rom_huc3" }, // for now treat this as alias for MBC3 { GB_MBC_WISDOM, "rom_wisdom" }, { GB_MBC_YONGYONG, "rom_yong" }, { GB_MBC_LASAMA, "rom_lasama" }, @@ -224,7 +224,7 @@ static int gb_get_pcb_id(const char *slot) if (!mame_stricmp(slot_list[i].slot_option, slot)) return slot_list[i].pcb_id; } - + return 0; } @@ -235,7 +235,7 @@ static const char *gb_get_slot(int type) if (slot_list[i].pcb_id == type) return slot_list[i].slot_option; } - + return "rom"; } @@ -263,7 +263,7 @@ bool base_gb_cart_slot_device::call_load() offset = 512; len -= offset; fseek(offset, SEEK_SET); - } + } /* Verify that the file contains 16kb blocks */ if ((len == 0) || ((len % 0x4000) != 0)) { @@ -271,7 +271,7 @@ bool base_gb_cart_slot_device::call_load() return IMAGE_INIT_FAIL; } } - + m_cart->rom_alloc(machine(), len); ROM = m_cart->get_rom_base(); @@ -310,7 +310,7 @@ bool base_gb_cart_slot_device::call_load() if (!mame_stricmp(get_feature("rumble"), "yes")) m_cart->set_has_rumble(TRUE); } - + if (get_feature("rtc")) { if (!mame_stricmp(get_feature("rtc"), "yes")) @@ -330,17 +330,17 @@ bool base_gb_cart_slot_device::call_load() m_cart->set_has_battery(TRUE); m_cart->set_has_timer(TRUE); break; - + case 0x1c: case 0x1d: m_cart->set_has_rumble(TRUE); break; - + case 0x1e: m_cart->set_has_battery(TRUE); m_cart->set_has_rumble(TRUE); break; } - + switch (ROM[0x0149 + offset] & 0x07) { case 0x00: case 0x06: case 0x07: @@ -360,7 +360,7 @@ bool base_gb_cart_slot_device::call_load() rambanks = 8; break; } - + if (type == GB_MBC_MBC2 || type == GB_MBC_MBC7) rambanks = 1; } @@ -373,14 +373,14 @@ bool base_gb_cart_slot_device::call_load() if (m_cart->get_ram_size() && m_cart->get_has_battery()) battery_load(m_cart->get_ram_base(), m_cart->get_ram_size(), 0xff); - + //printf("Type: %s\n", gb_get_slot(type)); internal_header_logging(ROM + offset, len); return IMAGE_INIT_PASS; } - + return IMAGE_INIT_PASS; } @@ -393,7 +393,7 @@ bool megaduck_cart_slot_device::call_load() m_cart->rom_alloc(machine(), len); ROM = m_cart->get_rom_base(); - + if (software_entry() == NULL) fread(ROM, len); else @@ -401,10 +401,10 @@ bool megaduck_cart_slot_device::call_load() // setup rom bank map based on real length, not header value m_cart->rom_map_setup(len); - + return IMAGE_INIT_PASS; } - + return IMAGE_INIT_PASS; } @@ -455,7 +455,7 @@ bool base_gb_cart_slot_device::get_mmm01_candidate(UINT8 *ROM, UINT32 len) if (ROM[(len - 0x8000) + 0x104 + i] == nintendo_logo[i]) bytes_matched++; } - + if (bytes_matched == 0x18 && ROM[(len - 0x8000) + 0x147] >= 0x0b && ROM[(len - 0x8000) + 0x147] <= 0x0d) return TRUE; else @@ -465,13 +465,13 @@ bool base_gb_cart_slot_device::get_mmm01_candidate(UINT8 *ROM, UINT32 len) int base_gb_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len) { int type = GB_MBC_NONE; - + if (len < 0x014c) fatalerror("Checking header of a corrupted image!\n"); switch(ROM[0x0147]) { - case 0x00: type = GB_MBC_NONE; break; + case 0x00: type = GB_MBC_NONE; break; case 0x01: type = GB_MBC_MBC1; break; case 0x02: type = GB_MBC_MBC1; break; case 0x03: type = GB_MBC_MBC1; break; @@ -519,14 +519,14 @@ int base_gb_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len) type = GB_MBC_WISDOM; } } - + /* Check if we're dealing with a Korean variant of the MBC1 mapper */ if (type == GB_MBC_MBC1) { if (ROM[0x13f] == 0x42 && ROM[0x140] == 0x32 && ROM[0x141] == 0x43 && ROM[0x142] == 0x4B) type = GB_MBC_MBC1_KOR; } - + return type; } /*------------------------------------------------- @@ -535,16 +535,15 @@ int base_gb_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len) const char * base_gb_cart_slot_device::get_default_card_software(const machine_config &config, emu_options &options) { - if (open_image_file(options)) { const char *slot_string = "rom"; UINT32 len = core_fsize(m_file), offset = 0; UINT8 *ROM = global_alloc_array(UINT8, len); int type; - + core_fread(m_file, ROM, len); - + if ((len % 0x4000) == 512) offset = 512; @@ -557,7 +556,7 @@ const char * base_gb_cart_slot_device::get_default_card_software(const machine_c //printf("type: %s\n", slot_string); global_free(ROM); clear(); - + return slot_string; } @@ -612,19 +611,19 @@ void base_gb_cart_slot_device::internal_header_logging(UINT8 *ROM, UINT32 len) { static const char *const cart_types[] = { - "ROM ONLY", "ROM+MBC1", "ROM+MBC1+RAM", - "ROM+MBC1+RAM+BATTERY", "UNKNOWN", "ROM+MBC2", - "ROM+MBC2+BATTERY", "UNKNOWN", "ROM+RAM", - "ROM+RAM+BATTERY", "UNKNOWN", "ROM+MMM01", - "ROM+MMM01+SRAM", "ROM+MMM01+SRAM+BATTERY", "UNKNOWN", - "ROM+MBC3+TIMER+BATTERY", "ROM+MBC3+TIMER+RAM+BATTERY", "ROM+MBC3", - "ROM+MBC3+RAM", "ROM+MBC3+RAM+BATTERY", "UNKNOWN", - "UNKNOWN", "UNKNOWN", "UNKNOWN", - "UNKNOWN", "ROM+MBC5", "ROM+MBC5+RAM", - "ROM+MBC5+RAM+BATTERY", "ROM+MBC5+RUMBLE", "ROM+MBC5+RUMBLE+SRAM", - "ROM+MBC5+RUMBLE+SRAM+BATTERY", "Pocket Camera", "Bandai TAMA5", + "ROM ONLY", "ROM+MBC1", "ROM+MBC1+RAM", + "ROM+MBC1+RAM+BATTERY", "UNKNOWN", "ROM+MBC2", + "ROM+MBC2+BATTERY", "UNKNOWN", "ROM+RAM", + "ROM+RAM+BATTERY", "UNKNOWN", "ROM+MMM01", + "ROM+MMM01+SRAM", "ROM+MMM01+SRAM+BATTERY", "UNKNOWN", + "ROM+MBC3+TIMER+BATTERY", "ROM+MBC3+TIMER+RAM+BATTERY", "ROM+MBC3", + "ROM+MBC3+RAM", "ROM+MBC3+RAM+BATTERY", "UNKNOWN", + "UNKNOWN", "UNKNOWN", "UNKNOWN", + "UNKNOWN", "ROM+MBC5", "ROM+MBC5+RAM", + "ROM+MBC5+RAM+BATTERY", "ROM+MBC5+RUMBLE", "ROM+MBC5+RUMBLE+SRAM", + "ROM+MBC5+RUMBLE+SRAM+BATTERY", "Pocket Camera", "Bandai TAMA5", /* Need heaps of unknowns here */ - "Hudson HuC-3", "Hudson HuC-1" + "Hudson HuC-3", "Hudson HuC-1" }; // some company codes @@ -718,7 +717,7 @@ void base_gb_cart_slot_device::internal_header_logging(UINT8 *ROM, UINT32 len) UINT32 tmp = 0; int csum = 0, i = 0; int rom_banks; - + switch (ROM[0x0148]) { case 0x52: @@ -768,15 +767,15 @@ void base_gb_cart_slot_device::internal_header_logging(UINT8 *ROM, UINT32 len) if ((len / 0x4000) != rom_banks) logerror("\nWarning loading cartridge: Filesize (0x%x) and reported ROM banks (0x%x) don't match.\n", - len, rom_banks * 0x4000); + len, rom_banks * 0x4000); /* Calculate and check checksum */ tmp = (ROM[0x014e] << 8) + ROM[0x014f]; for (int i = 0; i < len; i++) csum += ROM[i]; csum -= (ROM[0x014e] + ROM[0x014f]); csum &= 0xffff; - + if (csum != tmp) logerror("\nWarning loading cartridge: Checksum is wrong (Actual %X vs Internal %X)\n", csum, tmp); -} \ No newline at end of file +} diff --git a/src/mess/machine/gb_slot.h b/src/mess/machine/gb_slot.h index 46f2c01be67..154e8c03d5f 100644 --- a/src/mess/machine/gb_slot.h +++ b/src/mess/machine/gb_slot.h @@ -63,7 +63,7 @@ public: virtual void rom_map_setup(UINT32 size); virtual void ram_map_setup(UINT8 banks); - + virtual void set_has_timer(bool val) { has_timer = val; } virtual void set_has_rumble(bool val) { has_rumble = val; } virtual void set_has_battery(bool val) { has_battery = val; } @@ -82,8 +82,8 @@ public: // 0x4000-0x7fff = rom_bank_map[m_latch_bank2] (generally defaults to m_latch_bank2 = 1) // 0xa000-0xbfff = ram_bank_map[m_ram_bank] (generally defaults to m_ram_bank = 0) // suitable writes to 0x0000-0x7fff can then modify m_latch_bank/m_latch_bank2 - UINT8 rom_bank_map[512]; // 16K chunks of ROM - UINT8 ram_bank_map[256]; // 16K chunks of RAM + UINT8 rom_bank_map[512]; // 16K chunks of ROM + UINT8 ram_bank_map[256]; // 16K chunks of RAM UINT8 m_ram_bank; UINT16 m_latch_bank, m_latch_bank2; @@ -102,11 +102,11 @@ public: // construction/destruction base_gb_cart_slot_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock); virtual ~base_gb_cart_slot_device(); - + // device-level overrides virtual void device_start(); virtual void device_config_complete(); - + // image-level overrides virtual bool call_load(); virtual void call_unload(); @@ -128,10 +128,10 @@ public: virtual const option_guide *create_option_guide() const { return NULL; } virtual const char *image_interface() const { return "gameboy_cart"; } virtual const char *file_extensions() const { return "bin,gb,gbc"; } - + // slot interface overrides virtual const char * get_default_card_software(const machine_config &config, emu_options &options); - + // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_WRITE8_MEMBER(write_bank); @@ -142,8 +142,8 @@ public: // this should be private, but then there is some problem installing delegates in the driver... //private: - device_gb_cart_interface* m_cart; - + device_gb_cart_interface* m_cart; + int m_type; }; diff --git a/src/mess/machine/isa_gus.c b/src/mess/machine/isa_gus.c index 95daedabd57..7cd97eb6569 100644 --- a/src/mess/machine/isa_gus.c +++ b/src/mess/machine/isa_gus.c @@ -1205,8 +1205,8 @@ static const acia6850_interface gus_midi_interface = 31250 * 16, 0, - DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, isa16_gus_device, rx_in), // rx in - DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, isa16_gus_device, tx_out), // tx out + DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, isa16_gus_device, rx_in), // rx in + DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, isa16_gus_device, tx_out), // tx out DEVCB_NULL, DEVCB_NULL, @@ -1230,7 +1230,7 @@ SLOT_INTERFACE_END static const serial_port_interface midiout_intf = { - DEVCB_NULL // midi out ports don't transmit inward + DEVCB_NULL // midi out ports don't transmit inward }; static const gf1_interface gus_gf1_config = @@ -1721,7 +1721,7 @@ WRITE_LINE_MEMBER( isa16_gus_device::midi_irq ) WRITE_LINE_MEMBER( isa16_gus_device::midi_rx_w ) { m_rx_state = state; - for (int i = 0; i < 16; i++) // divider is set to 16 + for (int i = 0; i < 16; i++) // divider is set to 16 { m_midi->rx_clock_in(); } diff --git a/src/mess/machine/isa_sblaster.c b/src/mess/machine/isa_sblaster.c index fb57be4d1e9..485721275ed 100644 --- a/src/mess/machine/isa_sblaster.c +++ b/src/mess/machine/isa_sblaster.c @@ -44,7 +44,7 @@ static const int m_cmd_fifo_length[256] = -1, -1, -1, -1, 1, 3, -1, -1, -1, -1, -1, -1, -1, -1, 2, 1, /* 0x */ 2, -1, -1, -1, 3, -1, 3, 3, -1, -1, -1, -1, 1, -1, -1, 1, /* 1x */ -1, -1, -1, -1, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 2x */ - 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, /* 3x */ + 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, /* 3x */ 2, 3, 3, -1, -1, -1, -1, -1, 3, -1, -1, -1, -1, -1, -1, -1, /* 4x */ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 5x */ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 6x */ @@ -86,7 +86,7 @@ SLOT_INTERFACE_END static const serial_port_interface midiout_intf = { - DEVCB_NULL // midi out ports don't transmit inward + DEVCB_NULL // midi out ports don't transmit inward }; static MACHINE_CONFIG_FRAGMENT( sblaster1_0_config ) @@ -336,7 +336,7 @@ READ8_MEMBER(sb_device::dsp_rbuf_status_r) // printf("Clear IRQ5\n"); irq_w(0, IRQ_DMA8); // reading this port ACKs the card's IRQ, 8-bit dma only? - // in either SB-MIDI mode, bit 7 indicates if a character is available + // in either SB-MIDI mode, bit 7 indicates if a character is available // to read. if (m_uart_midi || m_onebyte_midi) { @@ -364,7 +364,7 @@ READ8_MEMBER(sb_device::dsp_wbuf_status_r) { if (m_tx_waiting >= MIDI_RING_SIZE) { - return 0x80; + return 0x80; } return 0x00; @@ -453,11 +453,11 @@ void sb_device::process_fifo(UINT8 cmd) break; case 0x36: - case 0x37: // Enter UART mode + case 0x37: // Enter UART mode printf("timestamp MIDI mode not supported, contact MESSDEV!\n"); break; - case 0x38: // single-byte MIDI send + case 0x38: // single-byte MIDI send m_onebyte_midi = true; break; @@ -707,7 +707,7 @@ void sb_device::process_fifo(UINT8 cmd) WRITE8_MEMBER(sb_device::dsp_cmd_w) { -// printf("%02x to DSP command @ %x\n", data, offset); +// printf("%02x to DSP command @ %x\n", data, offset); if(offset) return; @@ -715,7 +715,7 @@ WRITE8_MEMBER(sb_device::dsp_cmd_w) if (m_uart_midi || m_onebyte_midi) { xmit_char(data); - m_onebyte_midi = false; // clear onebyte (if this is uart, that's harmless) + m_onebyte_midi = false; // clear onebyte (if this is uart, that's harmless) return; } @@ -802,7 +802,7 @@ READ8_MEMBER( sb16_device::mpu401_r ) } if (m_rx_waiting == 0) { - res |= 0x80; // rx empty + res |= 0x80; // rx empty } } @@ -1604,7 +1604,7 @@ void sb_device::rcv_complete() // Rx completed receiving byte } if (m_uart_irq) { - irq_w(1, IRQ_DMA8); + irq_w(1, IRQ_DMA8); } } } @@ -1630,7 +1630,7 @@ void sb16_device::rcv_complete() // Rx completed receiving byte if (m_uart_irq) { - irq_w(1, IRQ_DMA8); + irq_w(1, IRQ_DMA8); } if (m_mpu_midi) @@ -1642,7 +1642,7 @@ void sb16_device::rcv_complete() // Rx completed receiving byte void sb_device::tra_complete() // Tx completed sending byte { -// printf("Tx complete\n"); +// printf("Tx complete\n"); // is there more waiting to send? if (m_tx_waiting) { @@ -1662,12 +1662,12 @@ void sb_device::tra_complete() // Tx completed sending byte void sb_device::tra_callback() // Tx send bit { int bit = transmit_register_get_data_bit(); - m_mdout->tx(bit); + m_mdout->tx(bit); } void sb_device::xmit_char(UINT8 data) { -// printf("SB: xmit %02x\n", data); +// printf("SB: xmit %02x\n", data); // if tx is busy it'll pick this up automatically when it completes if (!m_tx_busy) @@ -1686,4 +1686,3 @@ void sb_device::xmit_char(UINT8 data) m_tx_waiting++; } } - diff --git a/src/mess/machine/kb_msnat.h b/src/mess/machine/kb_msnat.h index 09a9b855671..bde7db35ef2 100644 --- a/src/mess/machine/kb_msnat.h +++ b/src/mess/machine/kb_msnat.h @@ -51,7 +51,7 @@ protected: required_ioport m_p1_1; required_ioport m_p1_2; required_ioport m_p1_3; - required_ioport m_p1_4; + required_ioport m_p1_4; required_ioport m_p1_5; required_ioport m_p1_6; required_ioport m_p1_7; diff --git a/src/mess/machine/lisa.c b/src/mess/machine/lisa.c index bbce3f267ed..60ff74824f0 100644 --- a/src/mess/machine/lisa.c +++ b/src/mess/machine/lisa.c @@ -277,7 +277,7 @@ void lisa_state::scan_keyboard() { int i, j; UINT8 keycode; - UINT8 keybuf[8] = { m_io_line0->read(), m_io_line1->read(), m_io_line2->read(), m_io_line3->read(), + UINT8 keybuf[8] = { m_io_line0->read(), m_io_line1->read(), m_io_line2->read(), m_io_line3->read(), m_io_line4->read(), m_io_line5->read(), m_io_line6->read(), m_io_line7->read() }; if (! m_COPS_force_unplug) diff --git a/src/mess/machine/mac.c b/src/mess/machine/mac.c index 3184b632474..a8a26cef0d9 100644 --- a/src/mess/machine/mac.c +++ b/src/mess/machine/mac.c @@ -562,7 +562,7 @@ static int scan_keyboard(running_machine &machine) int keybuf = 0; int keycode; mac_state *mac = machine.driver_data(); - ioport_port *ports[7] = { mac->m_key0, mac->m_key1, mac->m_key2, mac->m_key3, mac->m_key4, mac->m_key5, mac->m_key6 }; + ioport_port *ports[7] = { mac->m_key0, mac->m_key1, mac->m_key2, mac->m_key3, mac->m_key4, mac->m_key5, mac->m_key6 }; if (mac->m_keycode_buf_index) { diff --git a/src/mess/machine/macadb.c b/src/mess/machine/macadb.c index 84cdc6557e9..7602c67389f 100644 --- a/src/mess/machine/macadb.c +++ b/src/mess/machine/macadb.c @@ -76,7 +76,7 @@ static const char *const adb_statenames[4] = { "NEW", "EVEN", "ODD", "IDLE" }; int mac_state::adb_pollkbd(int update) { int i, j, keybuf, report, codes[2], result; - ioport_port *ports[6] = { m_key0, m_key1, m_key2, m_key3, m_key4, m_key5 }; + ioport_port *ports[6] = { m_key0, m_key1, m_key2, m_key3, m_key4, m_key5 }; codes[0] = codes[1] = 0xff; // key up report = result = 0; diff --git a/src/mess/machine/md_eeprom.c b/src/mess/machine/md_eeprom.c index f1f72500143..6905e0e1df3 100644 --- a/src/mess/machine/md_eeprom.c +++ b/src/mess/machine/md_eeprom.c @@ -1,14 +1,14 @@ /*********************************************************************************************************** - - + + MegaDrive / Genesis cart+EEPROM emulation - - + + TODO: proper EEPROM emulation, still not worked on (just hooked up the I2C device) - + i2c games mapping table: - + game name | SDA_IN | SDA_OUT | SCL | SIZE_MASK | PAGE_MASK | ----------------------------------|------------|------------|------------|----------------|-----------| NBA Jam | 0x200001-0 | 0x200001-0 | 0x200001-1 | 0x00ff (24C02) | 0x03 | xx @@ -30,7 +30,7 @@ Micro Machines 96 | 0x380001-7 | 0x300000-0*| 0x300000-1*| 0x07ff (24C16) | 0x0f | Brian Lara Cricket 96 | 0x380001-7 | 0x300000-0*| 0x300000-1*| 0x1fff (24C64) | 0x??* | ----------------------------------|------------|------------|------------|----------------|-----------| - + * Notes: check these ** original Rockman Mega World (J) set uses normal backup RAM @@ -213,12 +213,12 @@ READ16_MEMBER(md_std_eeprom_device::read) { if (offset == 0x200000/2) { -// m_i2c_mem = i2cmem_sda_read(m_i2cmem); +// m_i2c_mem = i2cmem_sda_read(m_i2cmem); return ~m_i2c_mem & 1; } - if (offset < 0x400000/2) - return m_rom[MD_ADDR(offset)]; - else + if (offset < 0x400000/2) + return m_rom[MD_ADDR(offset)]; + else return 0xffff; } @@ -237,12 +237,12 @@ READ16_MEMBER(md_eeprom_nbajam_device::read) { if (offset == 0x200000/2) { -// m_i2c_mem = i2cmem_sda_read(m_i2cmem); +// m_i2c_mem = i2cmem_sda_read(m_i2cmem); return m_i2c_mem & 1; } - if (offset < 0x400000/2) - return m_rom[MD_ADDR(offset)]; - else + if (offset < 0x400000/2) + return m_rom[MD_ADDR(offset)]; + else return 0xffff; } @@ -261,12 +261,12 @@ READ16_MEMBER(md_eeprom_nbajamte_device::read) { if (offset == 0x200000/2) { -// m_i2c_mem = i2cmem_sda_read(m_i2cmem); +// m_i2c_mem = i2cmem_sda_read(m_i2cmem); return m_i2c_mem & 1; } - if (offset < 0x400000/2) - return m_rom[MD_ADDR(offset)]; - else + if (offset < 0x400000/2) + return m_rom[MD_ADDR(offset)]; + else return 0xffff; } @@ -286,12 +286,12 @@ READ16_MEMBER(md_eeprom_cslam_device::read) { if (offset == 0x200000/2) { -// m_i2c_mem = i2cmem_sda_read(m_i2cmem); +// m_i2c_mem = i2cmem_sda_read(m_i2cmem); return m_i2c_mem & 1; } - if (offset < 0x400000/2) - return m_rom[MD_ADDR(offset)]; - else + if (offset < 0x400000/2) + return m_rom[MD_ADDR(offset)]; + else return 0xffff; } @@ -311,12 +311,12 @@ READ16_MEMBER(md_eeprom_nflqb_device::read) { if (offset == 0x200000/2) { -// m_i2c_mem = i2cmem_sda_read(m_i2cmem); +// m_i2c_mem = i2cmem_sda_read(m_i2cmem); return m_i2c_mem & 1; } - if (offset < 0x400000/2) - return m_rom[MD_ADDR(offset)]; - else + if (offset < 0x400000/2) + return m_rom[MD_ADDR(offset)]; + else return 0xffff; } @@ -335,12 +335,12 @@ READ16_MEMBER(md_eeprom_nhlpa_device::read) { if (offset == 0x200000/2) { -// m_i2c_mem = i2cmem_sda_read(m_i2cmem); +// m_i2c_mem = i2cmem_sda_read(m_i2cmem); return (m_i2c_mem & 1) << 7; } - if (offset < 0x400000/2) - return m_rom[MD_ADDR(offset)]; - else + if (offset < 0x400000/2) + return m_rom[MD_ADDR(offset)]; + else return 0xffff; } @@ -359,12 +359,12 @@ READ16_MEMBER(md_eeprom_blara_device::read) { if (offset == 0x380000/2) { -// m_i2c_mem = i2cmem_sda_read(m_i2cmem); +// m_i2c_mem = i2cmem_sda_read(m_i2cmem); return (m_i2c_mem & 1) << 7; } - if (offset < 0x400000/2) - return m_rom[MD_ADDR(offset)]; - else + if (offset < 0x400000/2) + return m_rom[MD_ADDR(offset)]; + else return 0xffff; } @@ -378,4 +378,3 @@ WRITE16_MEMBER(md_eeprom_blara_device::write) i2cmem_sda_write(m_i2cmem, m_i2c_mem); } } - diff --git a/src/mess/machine/md_eeprom.h b/src/mess/machine/md_eeprom.h index 421932742f1..1f3de3221ae 100644 --- a/src/mess/machine/md_eeprom.h +++ b/src/mess/machine/md_eeprom.h @@ -12,18 +12,18 @@ // ======================> md_std_eeprom_device class md_std_eeprom_device : public device_t, - public device_md_cart_interface + public device_md_cart_interface { public: // construction/destruction md_std_eeprom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock); md_std_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "md_std_eeprom"; } virtual machine_config_constructor device_mconfig_additions() const; - + // reading and writing virtual DECLARE_READ16_MEMBER(read); virtual DECLARE_WRITE16_MEMBER(write); @@ -39,11 +39,11 @@ class md_eeprom_nbajam_device : public md_std_eeprom_device public: // construction/destruction md_eeprom_nbajam_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "md_eeprom_nbajam"; } virtual machine_config_constructor device_mconfig_additions() const; - + // reading and writing virtual DECLARE_READ16_MEMBER(read); virtual DECLARE_WRITE16_MEMBER(write); @@ -56,11 +56,11 @@ class md_eeprom_nbajamte_device : public md_std_eeprom_device public: // construction/destruction md_eeprom_nbajamte_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "md_eeprom_nbajamte"; } virtual machine_config_constructor device_mconfig_additions() const; - + // reading and writing virtual DECLARE_READ16_MEMBER(read); virtual DECLARE_WRITE16_MEMBER(write); @@ -73,11 +73,11 @@ class md_eeprom_cslam_device : public md_std_eeprom_device public: // construction/destruction md_eeprom_cslam_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "md_eeprom_cslam"; } virtual machine_config_constructor device_mconfig_additions() const; - + // reading and writing virtual DECLARE_READ16_MEMBER(read); virtual DECLARE_WRITE16_MEMBER(write); @@ -90,11 +90,11 @@ class md_eeprom_nflqb_device : public md_std_eeprom_device public: // construction/destruction md_eeprom_nflqb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "md_eeprom_nflqb"; } virtual machine_config_constructor device_mconfig_additions() const; - + // reading and writing virtual DECLARE_READ16_MEMBER(read); virtual DECLARE_WRITE16_MEMBER(write); @@ -107,11 +107,11 @@ class md_eeprom_nhlpa_device : public md_std_eeprom_device public: // construction/destruction md_eeprom_nhlpa_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "md_eeprom_nhlpa"; } virtual machine_config_constructor device_mconfig_additions() const; - + // reading and writing virtual DECLARE_READ16_MEMBER(read); virtual DECLARE_WRITE16_MEMBER(write); @@ -124,11 +124,11 @@ class md_eeprom_blara_device : public md_std_eeprom_device public: // construction/destruction md_eeprom_blara_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "md_eeprom_blara"; } virtual machine_config_constructor device_mconfig_additions() const; - + // reading and writing virtual DECLARE_READ16_MEMBER(read); virtual DECLARE_WRITE16_MEMBER(write); diff --git a/src/mess/machine/md_jcart.c b/src/mess/machine/md_jcart.c index 5aadc882a25..fc2d5171908 100644 --- a/src/mess/machine/md_jcart.c +++ b/src/mess/machine/md_jcart.c @@ -1,23 +1,23 @@ /*********************************************************************************************************** - - + + MegaDrive / Genesis J-Cart (+SEPROM) emulation - - + + i2c games mapping table: - + game name | SDA_IN | SDA_OUT | SCL | SIZE_MASK | PAGE_MASK | ----------------------------------|------------|------------|------------|----------------|-----------| Micro Machines 2 | 0x380001-7 | 0x300000-0*| 0x300000-1*| 0x03ff (24C08) | 0x0f | Micro Machines Military | 0x380001-7 | 0x300000-0*| 0x300000-1*| 0x03ff (24C08) | 0x0f | Micro Machines 96 | 0x380001-7 | 0x300000-0*| 0x300000-1*| 0x07ff (24C16) | 0x0f | ----------------------------------|------------|------------|------------|----------------|-----------| - + * Notes: check these TODO: proper SEPROM emulation, still not worked on (just hooked up the I2C device) - + ***********************************************************************************************************/ @@ -174,7 +174,7 @@ READ16_MEMBER(md_jcart_device::read) if (offset == 0x38fffe/2) { UINT8 joy[2]; - + if (m_jcart_io_data[0] & 0x40) { joy[0] = m_jcart3->read_safe(0); @@ -188,9 +188,9 @@ READ16_MEMBER(md_jcart_device::read) return (m_jcart_io_data[0] & 0x40) | joy[0] | (joy[1] << 8); } } - if (offset < 0x400000/2) - return m_rom[MD_ADDR(offset)]; - else + if (offset < 0x400000/2) + return m_rom[MD_ADDR(offset)]; + else return 0xffff; } @@ -217,7 +217,7 @@ READ16_MEMBER(md_seprom_codemast_device::read) if (offset == 0x38fffe/2) { UINT8 joy[2]; - + if (m_jcart_io_data[0] & 0x40) { joy[0] = m_jcart3->read_safe(0); @@ -231,9 +231,9 @@ READ16_MEMBER(md_seprom_codemast_device::read) return (m_jcart_io_data[0] & 0x40) | joy[0] | (joy[1] << 8); } } - if (offset < 0x400000/2) - return m_rom[MD_ADDR(offset)]; - else + if (offset < 0x400000/2) + return m_rom[MD_ADDR(offset)]; + else return 0xffff; } @@ -252,4 +252,3 @@ WRITE16_MEMBER(md_seprom_codemast_device::write) m_jcart_io_data[1] = (data & 1) << 6; } } - diff --git a/src/mess/machine/md_jcart.h b/src/mess/machine/md_jcart.h index bf7b3e7dd9b..d1534c60c27 100644 --- a/src/mess/machine/md_jcart.h +++ b/src/mess/machine/md_jcart.h @@ -18,7 +18,7 @@ public: // construction/destruction md_jcart_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock); md_jcart_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "md_jcart"; } @@ -43,12 +43,12 @@ public: // construction/destruction md_seprom_codemast_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock); md_seprom_codemast_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "md_seprom_codemast"; } virtual machine_config_constructor device_mconfig_additions() const; - + // reading and writing virtual DECLARE_READ16_MEMBER(read); virtual DECLARE_WRITE16_MEMBER(write); @@ -56,7 +56,7 @@ public: required_device m_i2cmem; private: - UINT8 m_jcart_io_data[2]; + UINT8 m_jcart_io_data[2]; UINT8 m_i2c_mem, m_i2c_clk; }; @@ -67,7 +67,7 @@ class md_seprom_mm96_device : public md_seprom_codemast_device public: // construction/destruction md_seprom_mm96_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "md_seprom_mm96"; } virtual machine_config_constructor device_mconfig_additions() const; diff --git a/src/mess/machine/md_rom.c b/src/mess/machine/md_rom.c index 91e767b8921..243d3f19b83 100644 --- a/src/mess/machine/md_rom.c +++ b/src/mess/machine/md_rom.c @@ -1,9 +1,9 @@ /*********************************************************************************************************** - - + + MegaDrive / Genesis cart emulation - - + + Here we emulate bankswitch / protection / NVRAM found on generic carts with no additional hardware @@ -244,7 +244,7 @@ void md_rom_pokestad_device::device_start() void md_rom_realtec_device::device_start() { - m_bank_addr = 0; + m_bank_addr = 0; m_bank_size = 0; m_old_bank_addr = -1; save_item(NAME(m_bank_addr)); @@ -289,9 +289,9 @@ READ16_MEMBER(md_rom_sram_device::read) if (offset >= m_nvram_start/2 && offset < m_nvram_end/2 && m_nvram_active) return m_nvram[offset - m_nvram_start/2]; } - if (offset < 0x400000/2) - return m_rom[MD_ADDR(offset)]; - else + if (offset < 0x400000/2) + return m_rom[MD_ADDR(offset)]; + else return 0xffff; } @@ -329,9 +329,9 @@ READ16_MEMBER(md_rom_fram_device::read) { if (offset >= m_nvram_start/2 && offset < m_nvram_end/2 && m_nvram_active) return m_nvram[offset - m_nvram_start/2]; - if (offset < 0x400000/2) - return m_rom[MD_ADDR(offset)]; - else + if (offset < 0x400000/2) + return m_rom[MD_ADDR(offset)]; + else return 0xffff; } @@ -372,7 +372,7 @@ WRITE16_MEMBER(md_rom_ssf2_device::write_a13) { m_lastoff = offset; m_lastdata = data; - if (offset) // bank 0 is not modified + if (offset) // bank 0 is not modified { UINT16 *ROM = get_rom_base(); m_bank[offset] = data & 0xf; @@ -430,7 +430,7 @@ READ16_MEMBER(md_rom_chinf3_device::read) else return m_rom[(offset & 0xffff/2) + (m_bank * 0x10000)/2]; } - + // PROTECTION in 0x400000 - 0x4fffff /* not 100% correct, there may be some relationship between the reads here and the writes made at the start of the game.. */ @@ -485,7 +485,7 @@ READ16_MEMBER(md_rom_chinf3_device::read) } return 0; } - + return m_rom[offset & 0x1fffff/2]; } @@ -512,12 +512,12 @@ WRITE16_MEMBER(md_rom_chinf3_device::write) READ16_MEMBER(md_rom_elfwor_device::read) { - /* It returns (0x55 @ 0x400000 OR 0xc9 @ 0x400004) AND (0x0f @ 0x400002 OR 0x18 @ 0x400006). + /* It returns (0x55 @ 0x400000 OR 0xc9 @ 0x400004) AND (0x0f @ 0x400002 OR 0x18 @ 0x400006). It is probably best to add handlers for all 4 addresses. */ - if (offset == 0x400000/2) return 0x5500; - if (offset == 0x400002/2) return 0x0f00; - if (offset == 0x400004/2) return 0xc900; - if (offset == 0x400006/2) return 0x1800; + if (offset == 0x400000/2) return 0x5500; + if (offset == 0x400002/2) return 0x0f00; + if (offset == 0x400004/2) return 0xc900; + if (offset == 0x400006/2) return 0x1800; return m_rom[MD_ADDR(offset)]; } @@ -527,10 +527,10 @@ READ16_MEMBER(md_rom_elfwor_device::read) READ16_MEMBER(md_rom_smouse_device::read) { - if (offset == 0x400000/2) return 0x5500; - if (offset == 0x400002/2) return 0x0f00; - if (offset == 0x400004/2) return 0xaa00; - if (offset == 0x400006/2) return 0xf000; + if (offset == 0x400000/2) return 0x5500; + if (offset == 0x400002/2) return 0x0f00; + if (offset == 0x400004/2) return 0xaa00; + if (offset == 0x400006/2) return 0xf000; return m_rom[MD_ADDR(offset)]; } @@ -540,10 +540,10 @@ READ16_MEMBER(md_rom_smouse_device::read) READ16_MEMBER(md_rom_yasech_device::read) { - if (offset == 0x400000/2) return 0x6300; - if (offset == 0x400002/2) return 0x9800; - if (offset == 0x400004/2) return 0xc900; - if (offset == 0x400006/2) return 0x1800; + if (offset == 0x400000/2) return 0x6300; + if (offset == 0x400002/2) return 0x9800; + if (offset == 0x400004/2) return 0xc900; + if (offset == 0x400006/2) return 0x1800; return m_rom[MD_ADDR(offset)]; } @@ -553,12 +553,12 @@ READ16_MEMBER(md_rom_yasech_device::read) READ16_MEMBER(md_rom_kof98_device::read) { - if (offset == 0x480000/2) return 0xaa00; - if (offset == 0x4800e0/2) return 0xaa00; - if (offset == 0x4824a0/2) return 0xaa00; - if (offset == 0x488880/2) return 0xaa00; - if (offset == 0x4a8820/2) return 0x0a00; - if (offset == 0x4f8820/2) return 0x0000; + if (offset == 0x480000/2) return 0xaa00; + if (offset == 0x4800e0/2) return 0xaa00; + if (offset == 0x4824a0/2) return 0xaa00; + if (offset == 0x488880/2) return 0xaa00; + if (offset == 0x4a8820/2) return 0x0a00; + if (offset == 0x4f8820/2) return 0x0000; return m_rom[MD_ADDR(offset)]; } @@ -568,10 +568,10 @@ READ16_MEMBER(md_rom_kof98_device::read) // gfx glitch with the new code... uninitialized ram somewhere? READ16_MEMBER(md_rom_kof99_device::read_a13) { - if (offset == 0x00/2) return 0x00; // startup protection check, chinese message if != 0 - if (offset == 0x02/2) return 0x01; // write 02 to a13002.. shift right 1? - if (offset == 0x3e/2) return 0x1f; // write 3e to a1303e.. shift right 1? - else return 0xffff; + if (offset == 0x00/2) return 0x00; // startup protection check, chinese message if != 0 + if (offset == 0x02/2) return 0x01; // write 02 to a13002.. shift right 1? + if (offset == 0x3e/2) return 0x1f; // write 3e to a1303e.. shift right 1? + else return 0xffff; } /*------------------------------------------------- @@ -580,15 +580,15 @@ READ16_MEMBER(md_rom_kof99_device::read_a13) READ16_MEMBER(md_rom_lion2_device::read) { - if (offset == 0x400002/2) return m_prot1_data; - if (offset == 0x400006/2) return m_prot2_data; + if (offset == 0x400002/2) return m_prot1_data; + if (offset == 0x400006/2) return m_prot2_data; return m_rom[MD_ADDR(offset)]; } WRITE16_MEMBER(md_rom_lion2_device::write) { - if (offset == 0x400000/2) m_prot1_data = data; - if (offset == 0x400004/2) m_prot2_data = data; + if (offset == 0x400000/2) m_prot1_data = data; + if (offset == 0x400004/2) m_prot2_data = data; } /*------------------------------------------------- @@ -600,7 +600,7 @@ READ16_MEMBER(md_rom_lion3_device::read) if (offset < 0x8000/2) return m_rom[offset + (m_bank * 0x8000)/2]; else if (offset >= 0x600000/2 && offset < 0x700000/2) - { + { UINT16 retdata = 0; switch (offset & 0x7) { @@ -627,14 +627,14 @@ READ16_MEMBER(md_rom_lion3_device::read) retdata |= (BIT(m_prot_data, 0) << 7); } break; - + default: logerror("protection read, unknown offset %x\n", offset & 0x7); break; } return retdata; } - + return m_rom[offset]; } @@ -675,8 +675,8 @@ WRITE16_MEMBER(md_rom_lion3_device::write) READ16_MEMBER(md_rom_mjlov_device::read) { - if (offset == 0x400000/2) return 0x9000; - if (offset == 0x401000/2) return 0xd300; + if (offset == 0x400000/2) return 0x9000; + if (offset == 0x401000/2) return 0xd300; return m_rom[MD_ADDR(offset)]; } @@ -687,8 +687,8 @@ READ16_MEMBER(md_rom_mjlov_device::read) READ16_MEMBER(md_rom_sbubl_device::read) { - if (offset == 0x400000/2) return 0x5500; - if (offset == 0x400002/2) return 0x0f00; + if (offset == 0x400000/2) return 0x5500; + if (offset == 0x400002/2) return 0x0f00; return m_rom[MD_ADDR(offset)]; } @@ -698,9 +698,9 @@ READ16_MEMBER(md_rom_sbubl_device::read) READ16_MEMBER(md_rom_soulb_device::read) { - if (offset == 0x400002/2) return 0x9800; - if (offset == 0x400004/2) return 0xc900; - if (offset == 0x400006/2) return 0xf000; + if (offset == 0x400002/2) return 0x9800; + if (offset == 0x400004/2) return 0xc900; + if (offset == 0x400006/2) return 0xf000; return m_rom[MD_ADDR(offset)]; } @@ -727,9 +727,9 @@ WRITE16_MEMBER(md_rom_pokestad_device::write) READ16_MEMBER(md_rom_realtec_device::read) { - if (offset < (m_bank_size * 0x20000)) // two banks of same (variable) size at the bottom of the rom + if (offset < (m_bank_size * 0x20000)) // two banks of same (variable) size at the bottom of the rom return m_rom[offset + (m_bank_addr * 0x20000)/2]; - return m_rom[(offset & 0x1fff/2) + 0x7e000/2]; // otherwise it accesses the final 8k of the image + return m_rom[(offset & 0x1fff/2) + 0x7e000/2]; // otherwise it accesses the final 8k of the image } WRITE16_MEMBER(md_rom_realtec_device::write) @@ -757,8 +757,8 @@ WRITE16_MEMBER(md_rom_realtec_device::write) READ16_MEMBER(md_rom_redcl_device::read) { - if (offset == 0x400000/2) return 0x55 << 8; - if (offset == 0x400004/2) return -0x56 << 8; + if (offset == 0x400000/2) return 0x55 << 8; + if (offset == 0x400004/2) return -0x56 << 8; return m_rom[MD_ADDR(offset)]; } @@ -827,7 +827,7 @@ READ16_MEMBER(md_rom_topf_device::read) //cpu #0 (PC=0004DE00): unmapped program memory word write to 00689B80 = 004A & 00FF //cpu #0 (PC=0004DE08): unmapped program memory word write to 00 = 00B5 & 00FF //cpu #0 (PC=0004DE0C): unmapped program memory word read from 00645B44 & 00FF - + return 0x9f;//0x25; } if (offset == 0x6bd294/2) @@ -837,7 +837,7 @@ READ16_MEMBER(md_rom_topf_device::read) cpu #0 (PC=0017719A): unmapped program memory word write to 006BD2D2 = 0098 & 00FF cpu #0 (PC=001771A2): unmapped program memory word read from 006BD294 & 00FF */ - + if (space.device().safe_pc()==0x1771a2) return 0x50; else { @@ -875,9 +875,9 @@ WRITE16_MEMBER(md_rom_topf_device::write) if (offset >= 0x700000/2 && offset < 0x800000/2) { if (data == 0x002a) - m_bank[2] = 1; // == 0x2e*0x8000?! + m_bank[2] = 1; // == 0x2e*0x8000?! else if (data==0x0035) // characters ingame - m_bank[0] = 1; // == 0x35*0x8000 + m_bank[0] = 1; // == 0x35*0x8000 else if (data==0x000f) // special moves m_bank[1] = 1; // == 0xf*0x8000 else if (data==0x0000) diff --git a/src/mess/machine/md_rom.h b/src/mess/machine/md_rom.h index fd7b03d0901..acc1bff2827 100644 --- a/src/mess/machine/md_rom.h +++ b/src/mess/machine/md_rom.h @@ -10,17 +10,17 @@ // ======================> md_std_rom_device class md_std_rom_device : public device_t, - public device_md_cart_interface + public device_md_cart_interface { public: // construction/destruction md_std_rom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock); md_std_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start() {}; virtual void device_config_complete() { m_shortname = "md_std_rom"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read) { if (offset < 0x400000/2) return m_rom[MD_ADDR(offset)]; else return 0xffff; }; virtual DECLARE_WRITE16_MEMBER(write) { }; @@ -33,10 +33,10 @@ class md_rom_sram_device : public md_std_rom_device public: // construction/destruction md_rom_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "md_rom_sram"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read); virtual DECLARE_WRITE16_MEMBER(write); @@ -50,10 +50,10 @@ class md_rom_fram_device : public md_std_rom_device public: // construction/destruction md_rom_fram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "md_rom_fram"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read); virtual DECLARE_READ16_MEMBER(read_a13); @@ -67,18 +67,18 @@ class md_rom_ssf2_device : public md_std_rom_device public: // construction/destruction md_rom_ssf2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "md_rom_ssf2"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read); virtual DECLARE_WRITE16_MEMBER(write_a13); private: UINT8 m_bank[16]; - int m_lastoff, m_lastdata; + int m_lastoff, m_lastdata; }; // ======================> md_rom_mcpirate_device @@ -88,15 +88,15 @@ class md_rom_mcpirate_device : public md_std_rom_device public: // construction/destruction md_rom_mcpirate_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "md_rom_mcpirate"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read); virtual DECLARE_WRITE16_MEMBER(write_a13); - + private: UINT8 m_bank; }; @@ -109,10 +109,10 @@ class md_rom_bugslife_device : public md_std_rom_device public: // construction/destruction md_rom_bugslife_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "md_rom_bugslife"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read_a13); }; @@ -124,15 +124,15 @@ class md_rom_chinf3_device : public md_std_rom_device public: // construction/destruction md_rom_chinf3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "md_rom_chinf3"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read); virtual DECLARE_WRITE16_MEMBER(write); - + private: int m_bank; }; @@ -144,10 +144,10 @@ class md_rom_elfwor_device : public md_std_rom_device public: // construction/destruction md_rom_elfwor_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "md_rom_elfwor"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read); }; @@ -159,10 +159,10 @@ class md_rom_yasech_device : public md_std_rom_device public: // construction/destruction md_rom_yasech_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "md_rom_yasech"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read); }; @@ -174,10 +174,10 @@ class md_rom_kof98_device : public md_std_rom_device public: // construction/destruction md_rom_kof98_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "md_rom_kof98"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read); }; @@ -189,10 +189,10 @@ class md_rom_kof99_device : public md_std_rom_device public: // construction/destruction md_rom_kof99_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "md_rom_kof99"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read_a13); }; @@ -204,15 +204,15 @@ class md_rom_lion2_device : public md_std_rom_device public: // construction/destruction md_rom_lion2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "md_rom_lion2"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read); virtual DECLARE_WRITE16_MEMBER(write); - + private: UINT16 m_prot1_data, m_prot2_data; }; @@ -224,17 +224,17 @@ class md_rom_lion3_device : public md_std_rom_device public: // construction/destruction md_rom_lion3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "md_rom_lion3"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read); virtual DECLARE_WRITE16_MEMBER(write); - + private: - UINT8 m_prot_data, m_prot_cmd; + UINT8 m_prot_data, m_prot_cmd; UINT16 m_bank; }; @@ -245,10 +245,10 @@ class md_rom_mjlov_device : public md_std_rom_device public: // construction/destruction md_rom_mjlov_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "md_rom_mjlov"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read); }; @@ -260,15 +260,15 @@ class md_rom_pokestad_device : public md_std_rom_device public: // construction/destruction md_rom_pokestad_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "md_rom_pokestad"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read); virtual DECLARE_WRITE16_MEMBER(write); - + private: UINT8 m_bank; }; @@ -280,15 +280,15 @@ class md_rom_realtec_device : public md_std_rom_device public: // construction/destruction md_rom_realtec_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "md_rom_realtec"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read); virtual DECLARE_WRITE16_MEMBER(write); - + private: UINT16 m_bank_addr, m_bank_size, m_old_bank_addr; }; @@ -300,10 +300,10 @@ class md_rom_redcl_device : public md_std_rom_device public: // construction/destruction md_rom_redcl_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "md_rom_redcl"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read); }; @@ -315,10 +315,10 @@ class md_rom_rx3_device : public md_std_rom_device public: // construction/destruction md_rom_rx3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "md_rom_rx3"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read_a13); }; @@ -330,10 +330,10 @@ class md_rom_sbubl_device : public md_std_rom_device public: // construction/destruction md_rom_sbubl_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "md_rom_sbubl"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read); }; @@ -345,10 +345,10 @@ class md_rom_smb_device : public md_std_rom_device public: // construction/destruction md_rom_smb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "md_rom_smb"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read_a13); }; @@ -360,10 +360,10 @@ class md_rom_smb2_device : public md_std_rom_device public: // construction/destruction md_rom_smb2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "md_rom_smb2"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read_a13); }; @@ -375,10 +375,10 @@ class md_rom_smouse_device : public md_std_rom_device public: // construction/destruction md_rom_smouse_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "md_rom_smouse"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read); }; @@ -391,10 +391,10 @@ class md_rom_soulb_device : public md_std_rom_device public: // construction/destruction md_rom_soulb_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_config_complete() { m_shortname = "md_rom_soulb"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read); }; @@ -406,17 +406,17 @@ class md_rom_squir_device : public md_std_rom_device public: // construction/destruction md_rom_squir_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "md_rom_squir"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read); virtual DECLARE_WRITE16_MEMBER(write); - + private: - UINT16 m_latch; + UINT16 m_latch; }; // ======================> md_rom_topf_device @@ -426,18 +426,18 @@ class md_rom_topf_device : public md_std_rom_device public: // construction/destruction md_rom_topf_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "md_rom_topf"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read); virtual DECLARE_WRITE16_MEMBER(write); - + private: - UINT16 m_latch; - UINT8 m_bank[3]; + UINT16 m_latch; + UINT8 m_bank[3]; }; // ======================> md_rom_radica_device @@ -447,17 +447,17 @@ class md_rom_radica_device : public md_std_rom_device public: // construction/destruction md_rom_radica_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "md_rom_radica"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read); virtual DECLARE_READ16_MEMBER(read_a13); - + private: - UINT8 m_bank; + UINT8 m_bank; }; diff --git a/src/mess/machine/md_sk.c b/src/mess/machine/md_sk.c index e2b38b7da47..f5377207d91 100644 --- a/src/mess/machine/md_sk.c +++ b/src/mess/machine/md_sk.c @@ -1,13 +1,13 @@ /*********************************************************************************************************** - - + + Sonic & Knuckles pass-thorugh cart emulation - + TODO: currently we only support loading of base carts with no bankswitch or protection... shall we support other as well? - - + + ***********************************************************************************************************/ @@ -52,9 +52,9 @@ READ16_MEMBER(md_rom_sk_device::read) { if (m_exp->m_cart != NULL && m_exp->m_cart->get_rom_base() != NULL && offset >= 0x200000/2 && offset < (0x200000 + m_exp->m_cart->get_rom_size())/2) return m_exp->m_cart->m_rom[offset - 0x200000/2]; - if (offset < 0x400000/2) - return m_rom[MD_ADDR(offset)]; - else + if (offset < 0x400000/2) + return m_rom[MD_ADDR(offset)]; + else return 0xffff; } @@ -90,4 +90,3 @@ machine_config_constructor md_rom_sk_device::device_mconfig_additions() const { return MACHINE_CONFIG_NAME( sk_slot ); } - diff --git a/src/mess/machine/md_sk.h b/src/mess/machine/md_sk.h index 6a765a2b920..58427fa9442 100644 --- a/src/mess/machine/md_sk.h +++ b/src/mess/machine/md_sk.h @@ -7,18 +7,18 @@ // ======================> md_rom_sk_device class md_rom_sk_device : public device_t, - public device_md_cart_interface + public device_md_cart_interface { public: // construction/destruction md_rom_sk_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock); md_rom_sk_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "md_rom_sk"; } virtual machine_config_constructor device_mconfig_additions() const; - + // reading and writing virtual DECLARE_READ16_MEMBER(read); virtual DECLARE_WRITE16_MEMBER(write); diff --git a/src/mess/machine/md_slot.c b/src/mess/machine/md_slot.c index 2ab615dddd5..27a59038426 100644 --- a/src/mess/machine/md_slot.c +++ b/src/mess/machine/md_slot.c @@ -1,43 +1,43 @@ /*********************************************************************************************************** - + MegaDrive cart emulation (through slot devices) The driver exposes address ranges - 0x000000-0x7fffff to read/write (typically cart data, possibly banked, and some protection) - 0x130000-0x1300ff to read_a13/write_a13 (typically SRAM toggling or protection) - 0x150000-0x1500ff to read_a15/write_a15 (for SVP registers, not converted yet to slots) - + 0x000000-0x7fffff to read/write (typically cart data, possibly banked, and some protection) + 0x130000-0x1300ff to read_a13/write_a13 (typically SRAM toggling or protection) + 0x150000-0x1500ff to read_a15/write_a15 (for SVP registers, not converted yet to slots) + currently available slot devices: md_rom: standard carts + carts with NVRAM (SRAM/FRAM) + pirate carts with protection & bankswitch md_eeprom: carts + I2C EEPROM (EEPROM device hooked up only, support to be completed) - md_jcart: Codemasters J-Cart & J-Cart+SEPROM (again, EEPROM device hooked up only, support to be completed) - md_sk: Sonic & Knuckles pass-thorugh cart (enables a second slot to mount any other cart) - md_stm95: cart + STM95 EEPROM (e.g. Pier Solar) - - - Cart Mirroring (based Eke's research) - - MD Cartridge area is mapped to $000000-$3fffff: when accessing ROM, 68k address lines A1 to A21 can be - used by the internal cartridge hardware to decode full 4MB address range. - Depending on ROM total size and additional decoding hardware, some address lines might be ignored, - resulting in ROM mirroring. - - Cartridges typically use either 8-bits (x2) or 16-bits (x1, x2) Mask ROM chips, each chip size is a - factor of 2 bytes. - When one chip ROM1 of size 2^N is present, it is generally mirrored each 2^N bytes so that read access - to cart area sees the sequence ROM1,ROM1,ROM1,... (up to 4MB) - When two chips ROM1 & ROM2 are present and the whole size is 2^N, then the block ROM1+ROM2 is mirrored - in the cart area, and reads see the sequence ROM1+ROM2,ROM1+ROM2,... (up to 4MB) - When two chips ROM1 & ROM2 are present and the whole size is not 2^N (e.g. because ROM1 and ROM2 have - different sizes), then the area between the end of ROM2 and next power 2^N is generally ignored, and - reads see the sequence ROM1,ROM2,XXXX,ROM1,ROM2,XXXX... (up to 4MB) - - At loading time we first compute first power 2^N larger than cart size (see get_padded_size function), - we allocate such a size for ROM and we fill of 0xff the area between end of dump and 2^N. - Then we handle mirroring by creating a rom_bank_map[] (see rom_map_setup function) which points each - access in 0x000000-0x400000 to the correct 64K ROM bank. + md_jcart: Codemasters J-Cart & J-Cart+SEPROM (again, EEPROM device hooked up only, support to be completed) + md_sk: Sonic & Knuckles pass-thorugh cart (enables a second slot to mount any other cart) + md_stm95: cart + STM95 EEPROM (e.g. Pier Solar) + + + Cart Mirroring (based Eke's research) + + MD Cartridge area is mapped to $000000-$3fffff: when accessing ROM, 68k address lines A1 to A21 can be + used by the internal cartridge hardware to decode full 4MB address range. + Depending on ROM total size and additional decoding hardware, some address lines might be ignored, + resulting in ROM mirroring. + + Cartridges typically use either 8-bits (x2) or 16-bits (x1, x2) Mask ROM chips, each chip size is a + factor of 2 bytes. + When one chip ROM1 of size 2^N is present, it is generally mirrored each 2^N bytes so that read access + to cart area sees the sequence ROM1,ROM1,ROM1,... (up to 4MB) + When two chips ROM1 & ROM2 are present and the whole size is 2^N, then the block ROM1+ROM2 is mirrored + in the cart area, and reads see the sequence ROM1+ROM2,ROM1+ROM2,... (up to 4MB) + When two chips ROM1 & ROM2 are present and the whole size is not 2^N (e.g. because ROM1 and ROM2 have + different sizes), then the area between the end of ROM2 and next power 2^N is generally ignored, and + reads see the sequence ROM1,ROM2,XXXX,ROM1,ROM2,XXXX... (up to 4MB) + + At loading time we first compute first power 2^N larger than cart size (see get_padded_size function), + we allocate such a size for ROM and we fill of 0xff the area between end of dump and 2^N. + Then we handle mirroring by creating a rom_bank_map[] (see rom_map_setup function) which points each + access in 0x000000-0x400000 to the correct 64K ROM bank. ***********************************************************************************************************/ @@ -108,17 +108,17 @@ void device_md_cart_interface::nvram_alloc(running_machine &machine, size_t size } //------------------------------------------------- -// rom_map_setup - setup map of rom banks in 64K +// rom_map_setup - setup map of rom banks in 64K // blocks, so to simplify ROM mirroring //------------------------------------------------- void device_md_cart_interface::rom_map_setup(UINT32 size) { int i; - // setup the rom_bank_map array to faster ROM read + // setup the rom_bank_map array to faster ROM read for (i = 0; i < size / 0x10000; i++) rom_bank_map[i] = i; - + // fill up remaining blocks with mirrors while (i % 64) { @@ -130,19 +130,19 @@ void device_md_cart_interface::rom_map_setup(UINT32 size) rom_bank_map[i + k] = rom_bank_map[i + k - repeat_banks]; i += repeat_banks; } - + // check bank map! -// for (i = 0; i < 64; i++) -// { -// printf("bank %3d = %3d\t", i, rom_bank_map[i]); -// if ((i%8) == 7) -// printf("\n"); -// } +// for (i = 0; i < 64; i++) +// { +// printf("bank %3d = %3d\t", i, rom_bank_map[i]); +// if ((i%8) == 7) +// printf("\n"); +// } } //------------------------------------------------- -// -// +// +// //------------------------------------------------- UINT32 device_md_cart_interface::get_padded_size(UINT32 size) @@ -235,13 +235,13 @@ static const md_slot slot_list[] = { { SEGA_SK, "rom_sk" }, { SEGA_STD, "rom_svp"}, -// { SEGA_SVP, "rom_svp"}, // not ready yet... +// { SEGA_SVP, "rom_svp"}, // not ready yet... { SEGA_SRAM, "rom_sram" }, { SEGA_FRAM, "rom_fram" }, { HARDBALL95, "rom_hardbl95" }, { BEGGAR, "rom_beggar"}, - + { SEGA_EEPROM, "rom_eeprom" }, { NBA_JAM, "rom_nbajam" }, { NBA_JAM_TE, "rom_nbajamte" }, @@ -249,17 +249,17 @@ static const md_slot slot_list[] = { C_SLAM, "rom_cslam" }, { EA_NHLPA, "rom_nhlpa" }, { BRIAN_LARA, "rom_blara" }, - + { CM_JCART, "rom_jcart" }, { CODE_MASTERS, "rom_codemast" }, { CM_MM96, "rom_mm96" }, { PSOLAR, "rom_stm95"}, - + { SSF2, "rom_ssf2" }, { RADICA, "rom_radica" }, -// { GAME_KANDUME, "rom_gkand" }, // what's needed by this? - +// { GAME_KANDUME, "rom_gkand" }, // what's needed by this? + { BUGSLIFE, "rom_bugs" }, { CHINFIGHT3, "rom_chinf3" }, { ELFWOR, "rom_elfwor" }, @@ -296,7 +296,7 @@ static int md_get_pcb_id(const char *slot) if (!mame_stricmp(slot_list[i].slot_option, slot)) return slot_list[i].pcb_id; } - + return SEGA_STD; } @@ -307,7 +307,7 @@ static const char *md_get_slot(int type) if (slot_list[i].pcb_id == type) return slot_list[i].slot_option; } - + return "rom"; } @@ -327,7 +327,7 @@ bool base_md_cart_slot_device::call_load() { m_type = SEGA_STD; int res; - + // STEP 1: load the file image and keep a copy for later banking // STEP 2: identify the cart type // The two steps are carried out differently if we are loading from a list or not @@ -335,14 +335,14 @@ bool base_md_cart_slot_device::call_load() res = load_nonlist(); else res = load_list(); - + //printf("cart type: %d\n", m_type); - + if (res == IMAGE_INIT_PASS) { // STEP 3: install memory handlers for this type of cart setup_custom_mappers(); - + // STEP 4: take care of SRAM. setup_nvram(); @@ -353,7 +353,7 @@ bool base_md_cart_slot_device::call_load() return res; } - + return IMAGE_INIT_PASS; } @@ -374,7 +374,7 @@ int base_md_cart_slot_device::load_list() // if we allocated a ROM larger that the file (e.g. due to uneven cart size), set remaining space to 0xff if (length > get_software_region_length("rom")) memset(ROM + get_software_region_length("rom")/2, 0xffff, (length - get_software_region_length("rom"))/2); - + if ((slot_name = get_feature("slot")) == NULL) m_type = SEGA_STD; else @@ -401,57 +401,57 @@ static int genesis_is_SMD(unsigned char *buf,unsigned int len) /* aq quiz */ if (!strncmp("UZ(-01 ", (const char *) &buf[0xf0], 8)) return 1; - + /* Phelios USA redump */ /* target earth */ /* klax (namcot) */ if (buf[0x2080] == ' ' && buf[0x0080] == 'S' && buf[0x2081] == 'E' && buf[0x0081] == 'G') return 1; - + /* jap baseball 94 */ if (!strncmp("OL R-AEAL", (const char *) &buf[0xf0], 9)) return 1; - + /* devilish Mahjong Tower */ if (!strncmp("optrEtranet", (const char *) &buf[0xf3], 11)) return 1; - + /* golden axe 2 beta */ if (buf[0x0100] == 0x3c && buf[0x0101] == 0 && buf[0x0102] == 0 && buf[0x0103] == 0x3c) return 1; - + /* omega race */ if (!strncmp("OEARC ", (const char *) &buf[0x90], 8)) return 1; - + /* budokan beta */ if ((len >= 0x6708 + 8) && !strncmp(" NTEBDKN", (const char *) &buf[0x6708], 8)) return 1; - + /* cdx pro 1.8 bios */ if (!strncmp("so fCXP", (const char *) &buf[0x2c0], 7)) return 1; - + /* ishido (hacked) */ if (!strncmp("sio-Wyo ", (const char *) &buf[0x0090], 8)) return 1; - + /* onslaught */ if (!strncmp("SS CAL ", (const char *) &buf[0x0088], 8)) return 1; - + /* tram terror pirate */ if ((len >= 0x3648 + 8) && !strncmp("SG NEPIE", (const char *) &buf[0x3648], 8)) return 1; - + /* breath of fire 3 chinese */ if (buf[0x0007] == 0x1c && buf[0x0008] == 0x0a && buf[0x0009] == 0xb8 && buf[0x000a] == 0x0a) return 1; - + /*tetris pirate */ if ((len >= 0x1cbe + 5) && !strncmp("@TTI>", (const char *) &buf[0x1cbe], 5)) return 1; - + return 0; } @@ -463,14 +463,14 @@ static int genesis_is_SMD(unsigned char *buf,unsigned int len) int base_md_cart_slot_device::load_nonlist() { unsigned char *ROM, *tmpROM; - UINT32 len = m_cart->get_padded_size(length()); // if cart size is not (2^n * 64K), the system will see anyway that size so we need to alloc a bit more space + UINT32 len = m_cart->get_padded_size(length()); // if cart size is not (2^n * 64K), the system will see anyway that size so we need to alloc a bit more space // this contains an hack for SSF2: its current bankswitch code needs larger rom space to work m_cart->rom_alloc(machine(), (len == 0x500000) ? 0x900000 : len); ROM = (unsigned char *)m_cart->get_rom_base(); tmpROM = global_alloc_array(unsigned char, len); - + // STEP 1: determine the file type (SMD? MD? BIN?) fread(tmpROM, len); @@ -478,7 +478,7 @@ int base_md_cart_slot_device::load_nonlist() if (genesis_is_SMD(&tmpROM[0x200], len)) { mame_printf_debug("SMD!\n"); - + for (int ptr = 0; ptr < (len - 0x200) / 0x2000; ptr += 2) { for (int x = 0; x < 0x2000; x++) @@ -487,14 +487,14 @@ int base_md_cart_slot_device::load_nonlist() *ROM++ = *(tmpROM + 0x200 + ((ptr + 0) * 0x2000) + x); } } - + len -= 0x200; } /* is this a MD file? */ else if ((tmpROM[0x80] == 'E') && (tmpROM[0x81] == 'A') && (tmpROM[0x82] == 'M' || tmpROM[0x82] == 'G')) { mame_printf_debug("MD!\n"); - + for (int ptr = 0; ptr < len; ptr += 2) { ROM[ptr] = tmpROM[(len >> 1) + (ptr >> 1)]; @@ -509,18 +509,18 @@ int base_md_cart_slot_device::load_nonlist() } global_free(tmpROM); - + // if we allocated a ROM larger that the file (e.g. due to uneven cart size), set remaining space to 0xff if (len > length()) memset(m_cart->get_rom_base() + length()/2, 0xffff, (len - length())/2); - + // STEP 2: determine the cart type (to deal with pirate mappers & eeprom) m_type = get_cart_type(ROM, length()); // handle mirroring of ROM, unless it's SSF2 or Pier Solar if (m_type != SSF2 && m_type != PSOLAR) m_cart->rom_map_setup(len); - + #ifdef LSB_FIRST unsigned char fliptemp; // is this really needed nowadays? @@ -530,7 +530,7 @@ int base_md_cart_slot_device::load_nonlist() ROM[ptr] = ROM[ptr+1]; ROM[ptr+1] = fliptemp; } -#endif +#endif return IMAGE_INIT_PASS; } @@ -588,7 +588,7 @@ void base_md_cart_slot_device::setup_custom_mappers() 006036:e000 002540:6026 001ed0:6026 - 002476:6022 + 002476:6022 */ ROM16[0x06036/2] = 0xe000; ROM16[0x02540/2] = 0x6026; @@ -605,7 +605,7 @@ void base_md_cart_slot_device::setup_custom_mappers() // ROM16[0x02540/2] = 0xe000; ROM16[0x06036/2] = 0xe000; break; - } + } } void base_md_cart_slot_device::setup_nvram() @@ -623,21 +623,21 @@ void base_md_cart_slot_device::setup_nvram() m_cart->m_nvram_start = (ROM[0x1b5] << 24 | ROM[0x1b4] << 16 | ROM[0x1b7] << 8 | ROM[0x1b6]); m_cart->m_nvram_end = (ROM[0x1b9] << 24 | ROM[0x1b8] << 16 | ROM[0x1bb] << 8 | ROM[0x1ba]); logerror("SRAM detected from header: starting location %X - SRAM Length %X\n", m_cart->m_nvram_start, m_cart->m_nvram_end - m_cart->m_nvram_start + 1); - + // We assume at most 64k of SRAM. is this correct? - if ((m_cart->m_nvram_start > m_cart->m_nvram_end) || ((m_cart->m_nvram_end - m_cart->m_nvram_start) >= 0x10000)) + if ((m_cart->m_nvram_start > m_cart->m_nvram_end) || ((m_cart->m_nvram_end - m_cart->m_nvram_start) >= 0x10000)) m_cart->m_nvram_end = m_cart->m_nvram_start + 0xffff; - + if (m_cart->m_nvram_start & 1) m_cart->m_nvram_start -= 1; - + if (!(m_cart->m_nvram_end & 1)) m_cart->m_nvram_end += 1; - + m_cart->nvram_alloc(machine(), m_cart->m_nvram_end - m_cart->m_nvram_start + 1); if (m_cart->m_rom_size <= m_cart->m_nvram_start) m_cart->m_nvram_active = 1; - m_cart->m_nvram_handlers_installed = 1; + m_cart->m_nvram_handlers_installed = 1; // don't trust too much header? m_cart->m_nvram_start &= 0x3fffff; m_cart->m_nvram_end &= 0x3fffff; @@ -649,7 +649,7 @@ void base_md_cart_slot_device::setup_nvram() if (m_cart->m_rom_size <= m_cart->m_nvram_start) m_cart->m_nvram_active = 1; break; - + // These types only come from softlist loading case SEGA_SRAM: m_cart->m_nvram_start = 0x200000; @@ -666,7 +666,7 @@ void base_md_cart_slot_device::setup_nvram() m_cart->m_nvram_active = 1; m_cart->m_nvram_handlers_installed = 1; break; - + // These types might come from both (pending proper id routines) case HARDBALL95: m_cart->m_nvram_start = 0x300000; @@ -724,151 +724,151 @@ int base_md_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len) soulb_sig[] = { 0x33, 0xfc, 0x00, 0x0c, 0x00, 0xff }, // move.w #$C,($FF020A).l (what happens if check fails) s19in1_sig[] = { 0x13, 0xc0, 0x00, 0xa1, 0x30, 0x38 }, rockman_sig[] = { 0xea, 0x80 }; - + switch (len) - { + { case 0x80000: if (!memcmp(&ROM[0x08c8], smouse_sig, sizeof(smouse_sig))) type = SMOUSE; - + if (!memcmp((char *)&ROM[0x7e30e], "SEGA", 4) || !memcmp((char *)&ROM[0x7e100], "SEGA", 4) || !memcmp((char *)&ROM[0x7e1e6], "SEGA", 4)) type = REALTEC; - + if (!memcmp((char *)&ROM[0x0180], "GM T-50396", 10)) // NHLPA Hockey 93 type = EA_NHLPA; - + if (!memcmp((char *)&ROM[0x0180], "GM MK-1215", 10)) // Evander Holyfield type = SEGA_EEPROM; break; - + case 0xc0000: - + if (!memcmp((char *)&ROM[0x0180], "GM G-4060 ", 8)) // Wonder Boy V type = SEGA_EEPROM; break; - + case 0x100000: if (!memcmp(&ROM[0x01b24], mjlover_sig, sizeof(mjlover_sig))) type = MJLOVER; - + if (!memcmp(&ROM[0x03b4], squir_sig, sizeof(squir_sig))) type = SQUIRRELK; - + if (!memcmp(&ROM[0xee0d0], bugsl_sig, sizeof(bugsl_sig))) type = BUGSLIFE; - + if (!memcmp((char *)&ROM[0x0172], "GAME : ELF WOR", 14)) type = ELFWOR; - + if (!memcmp(&ROM[0x123e4], sbub_sig, sizeof(sbub_sig))) type = SBUBBOB; - + if (!memcmp((char *)&ROM[0x0180], "GM T-50176", 10)) // Rings of Power type = EA_NHLPA; - + if (!memcmp((char *)&ROM[0x0180], "MK 00001211-00", 14)) // Sports Talk Baseball type = SEGA_EEPROM; - + if (!memcmp((char *)&ROM[0x0180], "GM T-120096-", 12)) // Micro Machines 2 type = CODE_MASTERS; - + if (!memcmp((char *)&ROM[0x0180], "GM T-120146-", 12)) // Brian Lara Cricket 96 / Shane Wayne Cricket 96 type = BRIAN_LARA; - + if (!memcmp((char *)&ROM[0x0190], "OJKRPTBVFCA ", 0x10)) // Micro Machines '96 / Military TODO: better way to recognize these? type = CODE_MASTERS; break; - + case 0x200000: if (!memcmp(&ROM[0x18c6], lk3_sig, sizeof(lk3_sig))) type = LIONK3; - + if (!memcmp(&ROM[0x220], sdk_sig, sizeof(sdk_sig))) type = LIONK3; - + if (!memcmp(&ROM[0xce560], redcliff_sig, sizeof(redcliff_sig))) type = REDCLIFF; - + if (!memcmp(&ROM[0xc8cb0], smb_sig, sizeof(smb_sig))) type = SMB; - + if (!memcmp(&ROM[0xf24d6], smb2_sig, sizeof(smb2_sig))) type = SMB2; - + if (!memcmp(&ROM[0x674e], kaiju_sig, sizeof(kaiju_sig))) type = KAIJU; - + if (!memcmp(&ROM[0x1780], chifi3_sig, sizeof(chifi3_sig))) type = CHINFIGHT3; - + if (!memcmp(&ROM[0x03c2], lionk2_sig, sizeof(lionk2_sig))) type = LIONK2; - + if (!memcmp(&ROM[0xc8b90], rx3_sig, sizeof(rx3_sig))) type = ROCKMANX3; - + if (!memcmp(&ROM[0x56ae2], kof98_sig, sizeof(kof98_sig))) type = KOF98; - + if (!memcmp(&ROM[0x17bb2], s15in1_sig, sizeof(s15in1_sig))) type = MC_PIRATE; - + if (!memcmp((char *)&ROM[0x0180], "GM T-081326 ", 12)) // NBA Jam type = NBA_JAM; - + if (!memcmp((char *)&ROM[0x0180], "GM MK-1228", 10)) // Greatest Heavyweight of the Ring type = SEGA_EEPROM; - + if ((!memcmp((char *)&ROM[0x0180], "GM T-12046", 10)) || // Mega Man (!memcmp((char *)&ROM[0x0180], "GM T-12053", 10) && !memcmp(&ROM[0x18e], rockman_sig, sizeof(rockman_sig)))) // / Rock Man (EEPROM version) type = SEGA_EEPROM; - + break; - + case 0x200005: if (!memcmp(&ROM[0xce564], redcl_en_sig, sizeof(redcliff_sig))) type = REDCL_EN; break; - + case 0x300000: if (!memcmp(&ROM[0x220], sdk_sig, sizeof(sdk_sig))) type = LIONK3; - + if (!memcmp(&ROM[0x1fd0d2], kof99_sig, sizeof(kof99_sig))) type = KOF99; - + if (!memcmp((char *)&ROM[0x0180], "GM T-81406", 10)) // NBA Jam TE type = NBA_JAM_TE; - + if (!memcmp((char *)&ROM[0x0180], "GM T-081276 ", 12)) // NFL Quarterback Club type = NBA_JAM_TE; - + break; - + case 0x400000: if (!memcmp(&ROM[0x3c031c], radica_sig, sizeof(radica_sig)) || !memcmp(&ROM[0x3f031c], radica_sig, sizeof(radica_sig))) // ssf+gng + radica vol1 type = RADICA; - + if (!memcmp(&ROM[0x028460], soulb_sig, sizeof(soulb_sig))) type = SOULBLAD; - + if (!memcmp(&ROM[0x1e700], s19in1_sig, sizeof(s19in1_sig))) type = MC_PIRATE; - + if (!memcmp((char *)&ROM[0x0180], "GM T-081586-", 12)) // NFL Quarterback Club 96 type = NFL_QB_96; - + if (!memcmp((char *)&ROM[0x0180], "GM T-081576 ", 12)) // College Slam type = C_SLAM; - + if (!memcmp((char *)&ROM[0x0180], "GM T-81476", 10)) // Big Hurt Baseball type = C_SLAM; - + break; - + case 0x500000: if (!memcmp((char *)&ROM[0x0120], "SUPER STREET FIGHTER2 ", 22)) type = SSF2; @@ -886,15 +886,15 @@ int base_md_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len) //check for SRAM among the general carts if (type == SEGA_STD) { - // If the cart is not of a special type, we check the header for SRAM. + // If the cart is not of a special type, we check the header for SRAM. if (ROM[0x1b1] == 'R' && ROM[0x1b0] == 'A') { UINT32 start, end; start = (ROM[0x1b5] << 24 | ROM[0x1b4] << 16 | ROM[0x1b7] << 8 | ROM[0x1b6]); end = (ROM[0x1b9] << 24 | ROM[0x1b8] << 16 | ROM[0x1bb] << 8 | ROM[0x1ba]); logerror("SRAM detected from header: starting location %X - SRAM Length %X\n", start, end - start + 1); - - // For some games using serial EEPROM, difference between SRAM end to start is 0 or 1. + + // For some games using serial EEPROM, difference between SRAM end to start is 0 or 1. // Carts with EEPROM should have been already detected above, but better safe than sorry if (end - start < 2) type = SEGA_EEPROM; @@ -904,12 +904,12 @@ int base_md_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len) else { // Unfortunately, there are ROMs without correct info in the header, - // Hence, when loading from fullpath we do the SRAM mapping anyway... + // Hence, when loading from fullpath we do the SRAM mapping anyway... // but treat it in a custom way type = SEGA_SRAM_FALLBACK; } } - + return type; } /*------------------------------------------------- @@ -925,15 +925,15 @@ const char * base_md_cart_slot_device::get_default_card_software(const machine_c UINT32 len = core_fsize(m_file); UINT8 *ROM = global_alloc_array(UINT8, len); int type; - + core_fread(m_file, ROM, len); - + type = get_cart_type(ROM, len); slot_string = md_get_slot(type); - + global_free(ROM); clear(); - + return slot_string; } else @@ -992,4 +992,3 @@ WRITE16_MEMBER(base_md_cart_slot_device::write_a15) if (m_cart) m_cart->write_a15(space, offset, data); } - diff --git a/src/mess/machine/md_slot.h b/src/mess/machine/md_slot.h index 71aa50d5167..884c175a707 100644 --- a/src/mess/machine/md_slot.h +++ b/src/mess/machine/md_slot.h @@ -22,7 +22,7 @@ enum SEGA_SRAM, SEGA_FRAM, HARDBALL95, /* Hardball 95 uses different sram start address */ BEGGAR, /* Xin Qigai Wangzi uses different sram start address and has no valid header */ - + // EEPROM SEGA_EEPROM, /* Wonder Boy V / Evander Holyfield's Boxing / Greatest Heavyweights of the Ring / Sports Talk Baseball / Megaman */ NBA_JAM, /* NBA Jam */ @@ -37,12 +37,12 @@ enum CM_JCART, /* Pete Sampras Tennis */ CODE_MASTERS, /* Micro Machines 2 / Military (J-Cart + SEPROM) */ CM_MM96, /* Micro Machines 96 (J-Cart + SEPROM, diff I2C model) */ - + // Various SSF2, /* Super Street Fighter 2 */ GAME_KANDUME, /* Game no Kandume Otokuyou */ RADICA, /* Radica TV games.. these probably should be a separate driver since they are a separate 'console' */ - + BUGSLIFE, /* A Bug's Life */ CHINFIGHT3, /* Chinese Fighters 3 */ ELFWOR, /* Linghuan Daoshi Super Magician */ @@ -107,13 +107,13 @@ public: virtual UINT16* get_nvram_base() { return m_nvram; }; virtual UINT32 get_rom_size() { return m_rom_size; }; virtual UINT32 get_nvram_size() { return m_nvram_size; }; - - virtual void rom_map_setup(UINT32 size); + + virtual void rom_map_setup(UINT32 size); virtual UINT32 get_padded_size(UINT32 size); - + int m_nvram_start, m_nvram_end; int m_nvram_active, m_nvram_readonly; - + // when loading from fullpath, we create NVRAM even if not set in the header // however in this case we access it only if the game turn it on // the variable below is basically needed to track this... @@ -124,8 +124,8 @@ public: UINT16 *m_nvram; UINT32 m_rom_size; UINT32 m_nvram_size; - - UINT8 rom_bank_map[128]; // 64K chunks of rom + + UINT8 rom_bank_map[128]; // 64K chunks of rom }; @@ -140,11 +140,11 @@ public: // construction/destruction base_md_cart_slot_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock); virtual ~base_md_cart_slot_device(); - + // device-level overrides virtual void device_start(); virtual void device_config_complete(); - + // image-level overrides virtual bool call_load(); virtual void call_unload(); @@ -165,10 +165,10 @@ public: virtual bool must_be_loaded() const { return 1; } virtual bool is_reset_on_load() const { return 0; } virtual const option_guide *create_option_guide() const { return NULL; } - + // slot interface overrides virtual const char * get_default_card_software(const machine_config &config, emu_options &options); - + // reading and writing virtual DECLARE_READ16_MEMBER(read); virtual DECLARE_WRITE16_MEMBER(write); @@ -181,8 +181,8 @@ public: // this should be private, but then there is some problem installing delegates in the driver... //private: - device_md_cart_interface* m_cart; - + device_md_cart_interface* m_cart; + int m_type; }; @@ -225,7 +225,7 @@ public: // device type definition extern const device_type MD_CART_SLOT; -extern const device_type MD_SUBCART_SLOT; // needed to allow S&K pass-through to have non-mandatory cart +extern const device_type MD_SUBCART_SLOT; // needed to allow S&K pass-through to have non-mandatory cart extern const device_type PICO_CART_SLOT; diff --git a/src/mess/machine/md_stm95.c b/src/mess/machine/md_stm95.c index 997cf1fdbda..36f6b87ab47 100644 --- a/src/mess/machine/md_stm95.c +++ b/src/mess/machine/md_stm95.c @@ -1,12 +1,12 @@ /*************************************************************************** - MegaDrive / Genesis Cart + STM95 EEPROM device + MegaDrive / Genesis Cart + STM95 EEPROM device + - Emulation by MetalliC, converted to slot by Fabio Priuli - + TO DO: split STM95 to a separate device... ***************************************************************************/ @@ -197,18 +197,18 @@ READ16_MEMBER(md_eeprom_stm95_device::read) UINT16 res; offset -= 0x0015e6/2; logerror("read 0x15e6 %d\n", m_rdcnt); - if (m_rdcnt < 6) + if (m_rdcnt < 6) { m_rdcnt++; res = offset ? 0x10 : 0; - } + } else res = offset ? 0x8010 : 0x0001; return res; } if (offset < 0x280000/2) return m_rom[offset]; - else // last 0x180000 are bankswitched + else // last 0x180000 are bankswitched { UINT8 bank = (offset - 0x280000/2) >> 18; return m_rom[(offset & 0x7ffff/2) + (m_bank[bank] * 0x80000)/2]; @@ -242,4 +242,3 @@ WRITE16_MEMBER(md_eeprom_stm95_device::write_a13) m_stm95.set_cs_line(BIT(data, 3)); } } - diff --git a/src/mess/machine/md_stm95.h b/src/mess/machine/md_stm95.h index 77bbad98e73..96b520ccb22 100644 --- a/src/mess/machine/md_stm95.h +++ b/src/mess/machine/md_stm95.h @@ -26,11 +26,11 @@ enum STMSTATE class stm95_eeprom_device { public: - stm95_eeprom_device() : - stm_state(IDLE), - stream_pos(0) + stm95_eeprom_device() : + stm_state(IDLE), + stream_pos(0) {}; - + UINT8 *eeprom_data; void set_cs_line(int); void set_halt_line(int state) {}; // not implemented @@ -43,7 +43,7 @@ protected: int reset_line; int sck_line; int WEL; - + STMSTATE stm_state; int stream_pos; int stream_data; @@ -54,17 +54,17 @@ protected: // ======================> md_eeprom_stm95_device class md_eeprom_stm95_device : public device_t, - public device_md_cart_interface + public device_md_cart_interface { public: // construction/destruction md_eeprom_stm95_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock); md_eeprom_stm95_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_config_complete() { m_shortname = "md_eeprom_stm95"; } - + // reading and writing virtual DECLARE_READ16_MEMBER(read); virtual DECLARE_READ16_MEMBER(read_a13); diff --git a/src/mess/machine/megasvp.c b/src/mess/machine/megasvp.c index bbe7e3c3827..2ce487dde99 100644 --- a/src/mess/machine/megasvp.c +++ b/src/mess/machine/megasvp.c @@ -60,12 +60,12 @@ static UINT32 pm_io(address_space &space, int reg, int write, UINT32 d) state->m_emu_status &= ~SSP_PMC_SET; return 0; } - + // just in case if (state->m_emu_status & SSP_PMC_HAVE_ADDR) { state->m_emu_status &= ~SSP_PMC_HAVE_ADDR; } - + if (reg == 4 || (space.device().state().state_int(SSP_ST) & 0x60)) { #define CADDR ((((mode<<16)&0x7f0000)|addr)<<1) @@ -98,7 +98,7 @@ static UINT32 pm_io(address_space &space, int reg, int write, UINT32 d) else { logerror("ssp FIXME: PM%i unhandled write mode %04x, [%06x] %04x\n", - reg, mode, CADDR, d); + reg, mode, CADDR, d); } } else @@ -120,17 +120,17 @@ static UINT32 pm_io(address_space &space, int reg, int write, UINT32 d) else { logerror("ssp FIXME: PM%i unhandled read mode %04x, [%06x]\n", - reg, mode, CADDR); + reg, mode, CADDR); d = 0; } } - + // PMC value corresponds to last PMR accessed (not sure). state->m_pmc.d = state->m_pmac_read[write ? reg + 6 : reg]; - + return d; } - + return (UINT32)-1; } @@ -187,7 +187,7 @@ static READ16_HANDLER( read_XST ) mdsvp_state *state = space.machine().driver_data(); UINT32 d = pm_io(space, 3, 0, 0); if (d != (UINT32)-1) return d; - + return state->m_XST; } @@ -196,7 +196,7 @@ static WRITE16_HANDLER( write_XST ) mdsvp_state *state = space.machine().driver_data(); UINT32 r = pm_io(space, 3, 1, data); if (r != (UINT32)-1) return; - + state->m_XST2 |= 1; state->m_XST = data; } @@ -326,7 +326,7 @@ void svp_init(running_machine &machine) { mdsvp_state *state = machine.driver_data(); UINT8 *ROM = state->memregion("maincpu")->base(); - + memset(state->m_pmac_read, 0, ARRAY_LENGTH(state->m_pmac_read)); memset(state->m_pmac_write, 0, ARRAY_LENGTH(state->m_pmac_write)); state->m_pmc.d = 0; @@ -335,7 +335,7 @@ void svp_init(running_machine &machine) state->m_emu_status = 0; state->m_XST = 0; state->m_XST2 = 0; - + /* SVP stuff */ state->m_dram = auto_alloc_array(machine, UINT8, 0x20000); machine.device("maincpu")->memory().space(AS_PROGRAM).install_ram(0x300000, 0x31ffff, state->m_dram); @@ -343,7 +343,7 @@ void svp_init(running_machine &machine) // "cell arrange" 1 and 2 machine.device("maincpu")->memory().space(AS_PROGRAM).install_legacy_read_handler(0x390000, 0x39ffff, FUNC(svp_68k_cell1_r)); machine.device("maincpu")->memory().space(AS_PROGRAM).install_legacy_read_handler(0x3a0000, 0x3affff, FUNC(svp_68k_cell2_r)); - + machine.device("svp")->memory().space(AS_PROGRAM).install_legacy_read_handler(0x438, 0x438, FUNC(svp_speedup_r)); if (state->m_slotcart->m_cart->get_rom_base() != NULL) diff --git a/src/mess/machine/nes_mmc.c b/src/mess/machine/nes_mmc.c index 8323435fb75..df07e70f848 100644 --- a/src/mess/machine/nes_mmc.c +++ b/src/mess/machine/nes_mmc.c @@ -562,7 +562,7 @@ void nes_carts_state::set_nt_mirroring(int mirroring) #ifdef _MSC_VER #pragma optimize("", off) -#endif +#endif /************************************************************* diff --git a/src/mess/machine/psxanalog.c b/src/mess/machine/psxanalog.c index 108ff366455..f1b63f7d7a4 100644 --- a/src/mess/machine/psxanalog.c +++ b/src/mess/machine/psxanalog.c @@ -260,4 +260,3 @@ INPUT_CHANGED_MEMBER(psx_analog_controller_device::change_mode) if(!m_analoglock) m_analogmode = newval; } - diff --git a/src/mess/machine/psxanalog.h b/src/mess/machine/psxanalog.h index 808d6e9b1a4..e530e239c6b 100644 --- a/src/mess/machine/psxanalog.h +++ b/src/mess/machine/psxanalog.h @@ -6,7 +6,7 @@ extern const device_type PSX_DUALSHOCK; extern const device_type PSX_ANALOG_JOYSTICK; -class psx_analog_controller_device : public device_t, +class psx_analog_controller_device : public device_t, public device_psx_controller_interface { public: diff --git a/src/mess/machine/psxcard.c b/src/mess/machine/psxcard.c index 76091c2549a..95f15125da5 100644 --- a/src/mess/machine/psxcard.c +++ b/src/mess/machine/psxcard.c @@ -341,4 +341,3 @@ void psxcard_device::sel_w(bool state) reset(); m_sel = state; } - diff --git a/src/mess/machine/psxcard.h b/src/mess/machine/psxcard.h index 0c4f670910b..06613914a3d 100644 --- a/src/mess/machine/psxcard.h +++ b/src/mess/machine/psxcard.h @@ -10,7 +10,7 @@ class psx_controller_port_device; #define MCFG_PSXCARD_ADD(_tag) \ MCFG_DEVICE_ADD(_tag, PSXCARD, 0) -class psxcard_device : public device_t, +class psxcard_device : public device_t, public device_image_interface { public: diff --git a/src/mess/machine/psxcd.c b/src/mess/machine/psxcd.c index a268c4c42d1..6c1a02ae4cb 100644 --- a/src/mess/machine/psxcd.c +++ b/src/mess/machine/psxcd.c @@ -254,7 +254,7 @@ WRITE8_MEMBER( psxcd_device::write ) { case 0: //if(data & 2) - // popmessage("cmdmode = %02x, contact MESSdev",data); + // popmessage("cmdmode = %02x, contact MESSdev",data); cmdmode=data&1; if (cmdmode==0) @@ -334,7 +334,7 @@ WRITE8_MEMBER( psxcd_device::write ) */ case 3: //if(data & 0x78) - // popmessage("IRQ flag = %02x, contact MESSdev",data); + // popmessage("IRQ flag = %02x, contact MESSdev",data); if (data==0x07) { @@ -1682,7 +1682,7 @@ void psxcd_device::add_system_event(event *ev) // ev->t is in maincpu clock cycles UINT32 hz = m_sysclock / ev->t; -// printf("add_system_event: event type %d for %d hz (using timer %d)\n", ev->type, hz, tnum); +// printf("add_system_event: event type %d for %d hz (using timer %d)\n", ev->type, hz, tnum); timer->adjust(attotime::from_hz(hz), tnum, attotime::never); // back-reference the timer from the event diff --git a/src/mess/machine/psxcport.h b/src/mess/machine/psxcport.h index f3b3a3ed474..847168708c7 100644 --- a/src/mess/machine/psxcport.h +++ b/src/mess/machine/psxcport.h @@ -60,7 +60,7 @@ private: psx_controller_port_device *m_owner; }; -class psx_standard_controller_device : public device_t, +class psx_standard_controller_device : public device_t, public device_psx_controller_interface { public: @@ -94,7 +94,7 @@ private: psx_controller_port_device *m_port1; }; -class psx_controller_port_device : public device_t, +class psx_controller_port_device : public device_t, public device_slot_interface { public: diff --git a/src/mess/machine/southbridge.c b/src/mess/machine/southbridge.c index bccd53e7686..ba1fbd3b6c8 100644 --- a/src/mess/machine/southbridge.c +++ b/src/mess/machine/southbridge.c @@ -183,7 +183,7 @@ southbridge_device::southbridge_device(const machine_config &mconfig, device_typ IRQ_CALLBACK_MEMBER(southbridge_device::at_irq_callback) { - return m_pic8259_master->inta_r(); + return m_pic8259_master->inta_r(); } //------------------------------------------------- diff --git a/src/mess/machine/superpet.c b/src/mess/machine/superpet.c index 99dac336444..3cf8ae3b08a 100644 --- a/src/mess/machine/superpet.c +++ b/src/mess/machine/superpet.c @@ -15,9 +15,9 @@ // MACROS/CONSTANTS //************************************************************************** -#define M6809_TAG "u4" -#define M6551_TAG "u23" -#define MOS6702_TAG "u2" +#define M6809_TAG "u4" +#define M6551_TAG "u23" +#define MOS6702_TAG "u2" @@ -92,7 +92,7 @@ machine_config_constructor superpet_device::device_mconfig_additions() const static INPUT_PORTS_START( superpet ) PORT_START("SW1") - + PORT_START("SW2") INPUT_PORTS_END @@ -300,18 +300,18 @@ void superpet_device::pet_bd_w(address_space &space, offs_t offset, UINT8 data, if (BIT(m_bank, 7)) { /* - + bit description - + 0 SW2 CPU (0=6809, 1=6502) 1 SW1 RAM (0=read only, 1=read/write) - 2 + 2 3 DIAG - 4 - 5 - 6 - 7 - + 4 + 5 + 6 + 7 + */ m_system = data; @@ -323,9 +323,9 @@ void superpet_device::pet_bd_w(address_space &space, offs_t offset, UINT8 data, case 0xeffc: case 0xeffd: /* - + bit description - + 0 A0 1 A1 2 A2 @@ -334,7 +334,7 @@ void superpet_device::pet_bd_w(address_space &space, offs_t offset, UINT8 data, 5 SEL B 6 J1 pin 39 7 BIT 7 - + */ m_bank = data; diff --git a/src/mess/machine/terminal.c b/src/mess/machine/terminal.c index 343ca7a0e1c..f9f01593d77 100644 --- a/src/mess/machine/terminal.c +++ b/src/mess/machine/terminal.c @@ -138,15 +138,15 @@ static const UINT8 terminal_font[256*16] = generic_terminal_device::generic_terminal_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, type, name, tag, owner, clock), - m_io_term_frame(*this, "TERM_FRAME"), - m_io_term_conf(*this, "TERM_CONF") + m_io_term_frame(*this, "TERM_FRAME"), + m_io_term_conf(*this, "TERM_CONF") { } generic_terminal_device::generic_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, GENERIC_TERMINAL, "Generic Terminal", tag, owner, clock), - m_io_term_frame(*this, "TERM_FRAME"), - m_io_term_conf(*this, "TERM_CONF") + m_io_term_frame(*this, "TERM_FRAME"), + m_io_term_conf(*this, "TERM_CONF") { } diff --git a/src/mess/machine/trs80m2kb.c b/src/mess/machine/trs80m2kb.c index 9c583b1c3a4..59bdcbdd5c3 100644 --- a/src/mess/machine/trs80m2kb.c +++ b/src/mess/machine/trs80m2kb.c @@ -93,125 +93,125 @@ machine_config_constructor trs80m2_keyboard_device::device_mconfig_additions() c //------------------------------------------------- INPUT_PORTS_START( trs80m2_keyboard ) - PORT_START("Y0") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 0") PORT_CODE(KEYCODE_0_PAD) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("Y1") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_DOWN) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("Y2") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("REPEAT") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Right SHIFT") PORT_CODE(KEYCODE_RSHIFT) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("CAPS") PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Left SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("LOCK") - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_MAMEKEY(LCONTROL)) - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("Y3") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("cannot read label") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')') - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(') - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad .") PORT_CODE(KEYCODE_DEL_PAD) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 3") PORT_CODE(KEYCODE_3_PAD) - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_LEFT) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) - - PORT_START("Y4") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("BACKSPACE") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F2") PORT_CODE(KEYCODE_F2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 5") PORT_CODE(KEYCODE_5_PAD) - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_RIGHT) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) - - PORT_START("Y5") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("HOLD") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('^') - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F1") PORT_CODE(KEYCODE_F1) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 2") PORT_CODE(KEYCODE_2_PAD) - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_UP) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) - - PORT_START("Y6") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+') - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@') - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad ENTER") PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(13) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 9") PORT_CODE(KEYCODE_9_PAD) - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 7") PORT_CODE(KEYCODE_7_PAD) - - PORT_START("Y7") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('"') - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*') - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 6") PORT_CODE(KEYCODE_6_PAD) - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 4") PORT_CODE(KEYCODE_4_PAD) - - PORT_START("Y8") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_') - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 8") PORT_CODE(KEYCODE_8_PAD) - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 1") PORT_CODE(KEYCODE_1_PAD) - - PORT_START("Y9") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{') - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("YA") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&') - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("ESC") PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("YB") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("TAB") PORT_CODE(KEYCODE_TAB) PORT_CHAR('\t') - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_START("Y0") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 0") PORT_CODE(KEYCODE_0_PAD) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("Y1") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_DOWN) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("Y2") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("REPEAT") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Right SHIFT") PORT_CODE(KEYCODE_RSHIFT) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("CAPS") PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Left SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("LOCK") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_MAMEKEY(LCONTROL)) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("Y3") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("cannot read label") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')') + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(') + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad .") PORT_CODE(KEYCODE_DEL_PAD) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 3") PORT_CODE(KEYCODE_3_PAD) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_LEFT) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) + + PORT_START("Y4") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("BACKSPACE") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F2") PORT_CODE(KEYCODE_F2) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 5") PORT_CODE(KEYCODE_5_PAD) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_RIGHT) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) + + PORT_START("Y5") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("HOLD") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('^') + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F1") PORT_CODE(KEYCODE_F1) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 2") PORT_CODE(KEYCODE_2_PAD) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_UP) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) + + PORT_START("Y6") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+') + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@') + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad ENTER") PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(13) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 9") PORT_CODE(KEYCODE_9_PAD) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 7") PORT_CODE(KEYCODE_7_PAD) + + PORT_START("Y7") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('"') + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*') + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 6") PORT_CODE(KEYCODE_6_PAD) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 4") PORT_CODE(KEYCODE_4_PAD) + + PORT_START("Y8") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_') + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 8") PORT_CODE(KEYCODE_8_PAD) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 1") PORT_CODE(KEYCODE_1_PAD) + + PORT_START("Y9") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{') + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("YA") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&') + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("ESC") PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("YB") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("TAB") PORT_CODE(KEYCODE_TAB) PORT_CHAR('\t') + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) INPUT_PORTS_END @@ -321,18 +321,18 @@ READ8_MEMBER( trs80m2_keyboard_device::kb_p0_r ) switch (m_y) { - case 0: data &= m_y0->read(); break; - case 1: data &= m_y1->read(); break; - case 2: data &= m_y2->read(); break; - case 3: data &= m_y3->read(); break; - case 4: data &= m_y4->read(); break; - case 5: data &= m_y5->read(); break; - case 6: data &= m_y6->read(); break; - case 7: data &= m_y7->read(); break; - case 8: data &= m_y8->read(); break; - case 9: data &= m_y9->read(); break; - case 0xa: data &= m_ya->read(); break; - case 0xb: data &= m_yb->read(); break; + case 0: data &= m_y0->read(); break; + case 1: data &= m_y1->read(); break; + case 2: data &= m_y2->read(); break; + case 3: data &= m_y3->read(); break; + case 4: data &= m_y4->read(); break; + case 5: data &= m_y5->read(); break; + case 6: data &= m_y6->read(); break; + case 7: data &= m_y7->read(); break; + case 8: data &= m_y8->read(); break; + case 9: data &= m_y9->read(); break; + case 0xa: data &= m_ya->read(); break; + case 0xb: data &= m_yb->read(); break; } return data; diff --git a/src/mess/machine/vcs_joybooster.h b/src/mess/machine/vcs_joybooster.h index ae914b36617..3fdf660f8ca 100644 --- a/src/mess/machine/vcs_joybooster.h +++ b/src/mess/machine/vcs_joybooster.h @@ -47,7 +47,7 @@ protected: virtual bool has_pot_x() { return true; } virtual bool has_pot_y() { return true; } - + private: required_ioport m_joy; required_ioport m_potx; diff --git a/src/mess/machine/vcs_keypad.h b/src/mess/machine/vcs_keypad.h index 8643386133b..db41f450484 100644 --- a/src/mess/machine/vcs_keypad.h +++ b/src/mess/machine/vcs_keypad.h @@ -25,7 +25,7 @@ // ======================> vcs_keypad_device class vcs_keypad_device : public device_t, - public device_vcs_control_port_interface + public device_vcs_control_port_interface { public: // construction/destruction diff --git a/src/mess/mess.lst b/src/mess/mess.lst index cd3a7e0d506..3819a0b58dd 100644 --- a/src/mess/mess.lst +++ b/src/mess/mess.lst @@ -1123,7 +1123,7 @@ dgnbeta // Dragon Beta tanodr64 // Tano Dragon 64 (NTSC) cp400 // Prologica CP400 lzcolor64 // Digiponto LZ Color64 -mx1600 // Dynacom MX-1600 +mx1600 // Dynacom MX-1600 mc10 // MC-10 alice // Matra & Hachette Ordinateur Alice alice32 // Matra & Hachette Alice 32 diff --git a/src/mess/mess.mak b/src/mess/mess.mak index fd277b23a5d..1deeea114b8 100644 --- a/src/mess/mess.mak +++ b/src/mess/mess.mak @@ -564,8 +564,8 @@ $(MESSOBJ)/shared.a: \ $(MESS_MACHINE)/3c503.o \ $(MESS_FORMATS)/z80bin.o \ $(MESS_MACHINE)/mb8795.o \ - $(MESS_MACHINE)/midiinport.o \ - $(MESS_MACHINE)/midioutport.o \ + $(MESS_MACHINE)/midiinport.o \ + $(MESS_MACHINE)/midioutport.o \ $(MESS_MACHINE)/null_modem.o \ $(MESS_MACHINE)/vcsctrl.o \ $(MESS_MACHINE)/vcs_joy.o \ diff --git a/src/mess/video/bbc.c b/src/mess/video/bbc.c index 7637d666baf..10779db8bbb 100644 --- a/src/mess/video/bbc.c +++ b/src/mess/video/bbc.c @@ -283,7 +283,7 @@ WRITE_LINE_MEMBER(bbc_state::bbc_vsync) MC6845_INTERFACE( bbc_mc6845_intf ) { "screen", /* screen number */ - false, /* show border area */ + false, /* show border area */ 8, /* numbers of pixels per video memory address */ NULL, /* begin_update */ vid_update_row, /* update_row */ @@ -576,26 +576,26 @@ static void BBC_Set_CRE(running_machine &machine, int offset, int data) WRITE8_MEMBER(bbc_state::bbc_6845_w) { - switch(offset & 1) - { - case 0 : - m_mc6845->address_w(space,0,data); - break; - case 1 : - m_mc6845->register_w(space,0,data); - break; - } + switch(offset & 1) + { + case 0 : + m_mc6845->address_w(space,0,data); + break; + case 1 : + m_mc6845->register_w(space,0,data); + break; + } } READ8_HANDLER (bbc_6845_r) { - switch (offset&1) - { - case 0: return m_mc6845->status_r(space,0); break; - case 1: return m_mc6845->register_r(space,0); break; - } - return 0; + switch (offset&1) + { + case 0: return m_mc6845->status_r(space,0); break; + case 1: return m_mc6845->register_r(space,0); break; + } + return 0; } diff --git a/src/mess/video/gb.c b/src/mess/video/gb.c index 08feb0391fd..6ca83c7e09c 100644 --- a/src/mess/video/gb.c +++ b/src/mess/video/gb.c @@ -2362,4 +2362,3 @@ WRITE8_MEMBER(gb_state::gbc_video_w) m_lcd.gb_vid_regs[offset] = data; } - diff --git a/src/mess/video/gime.c b/src/mess/video/gime.c index 84b1a20177f..5affe1dff55 100644 --- a/src/mess/video/gime.c +++ b/src/mess/video/gime.c @@ -692,7 +692,7 @@ ATTR_FORCE_INLINE UINT8 gime_base_device::read_gime_register(offs_t offset) } break; - case 3: // read pending FIRQs + case 3: // read pending FIRQs result = m_firq; if (result != 0x00) { diff --git a/src/mess/video/isa_cga.c b/src/mess/video/isa_cga.c index 1efab27f111..718e118a8cb 100644 --- a/src/mess/video/isa_cga.c +++ b/src/mess/video/isa_cga.c @@ -607,7 +607,7 @@ static MC6845_UPDATE_ROW( cga_update_row ) static MC6845_INTERFACE( mc6845_cga_intf ) { CGA_SCREEN_NAME, /* screen number */ - false, /* show border area */ + false, /* show border area */ 8, /* numbers of pixels per video memory address */ NULL, /* begin_update */ cga_update_row, /* update_row */ diff --git a/src/mess/video/isa_mda.c b/src/mess/video/isa_mda.c index c50cb208313..a8d8d5f7f6f 100644 --- a/src/mess/video/isa_mda.c +++ b/src/mess/video/isa_mda.c @@ -78,7 +78,7 @@ GFXDECODE_END static MC6845_INTERFACE( mc6845_mda_intf ) { MDA_SCREEN_NAME, /* screen number */ - false, /* show border area */ + false, /* show border area */ 9, /* number of pixels per video memory address */ NULL, /* begin_update */ mda_update_row, /* update_row */ @@ -501,7 +501,7 @@ The divder/pixels per 6845 clock is 9 for text mode and 16 for graphics mode. static MC6845_INTERFACE( mc6845_hercules_intf ) { HERCULES_SCREEN_NAME, /* screen number */ - false, /* show border area */ + false, /* show border area */ 9, /* number of pixels per video memory address */ NULL, /* begin_update */ mda_update_row, /* update_row */ diff --git a/src/mess/video/mbc55x.c b/src/mess/video/mbc55x.c index 9c6efbac332..64bb0200c40 100644 --- a/src/mess/video/mbc55x.c +++ b/src/mess/video/mbc55x.c @@ -161,7 +161,7 @@ WRITE_LINE_MEMBER( mbc55x_state::vid_vsync_changed ) MC6845_INTERFACE( mb55x_mc6845_intf ) { SCREEN_TAG, /* screen number */ - false, /* show border area */ + false, /* show border area */ 8, /* numbers of pixels per video memory address */ NULL, /* begin_update */ vid_update_row, /* update_row */ diff --git a/src/mess/video/mc6847.c b/src/mess/video/mc6847.c index a2c9349965b..54f1dd4e745 100644 --- a/src/mess/video/mc6847.c +++ b/src/mess/video/mc6847.c @@ -58,12 +58,12 @@ assuming that the extra text modes on the CoCo 2B are activated by the GM2-0 pins. This needs to be confirmed. - The MC6847 datasheet states that a scanline is 227.5 clock cycles, - but experimentation suggests that it is 228. The game "Dragon Fire" - has a fine tuned loop that runs in 57 clock cycles by the CPU's - reckoning (228 actual clock cycles) and would not function correctly - if skew existed. SockMaster has confirmed that scanlines are in - fact 228 clock cycles. + The MC6847 datasheet states that a scanline is 227.5 clock cycles, + but experimentation suggests that it is 228. The game "Dragon Fire" + has a fine tuned loop that runs in 57 clock cycles by the CPU's + reckoning (228 actual clock cycles) and would not function correctly + if skew existed. SockMaster has confirmed that scanlines are in + fact 228 clock cycles. **********************************************************************/ @@ -88,8 +88,8 @@ #define LOG_SCANLINE 0 #define LOG_HSYNC 0 #define LOG_FSYNC 1 -#define LOG_FLUSH 1 -#define LOG_INPUT 0 +#define LOG_FLUSH 1 +#define LOG_INPUT 0 const UINT32 mc6847_base_device::s_palette[mc6847_base_device::PALETTE_LENGTH] = @@ -127,7 +127,7 @@ const UINT32 mc6847_base_device::s_palette[mc6847_base_device::PALETTE_LENGTH] = mc6847_friend_device::mc6847_friend_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const UINT8 *fontdata, bool is_mc6847t1, double tpfs, int field_sync_falling_edge_scanline, bool supports_partial_body_scanlines) : device_t(mconfig, type, name, tag, owner, clock), - m_character_map(fontdata, is_mc6847t1) + m_character_map(fontdata, is_mc6847t1) { m_tpfs = tpfs; m_supports_partial_body_scanlines = supports_partial_body_scanlines; diff --git a/src/mess/video/mos6566.c b/src/mess/video/mos6566.c index 4c2014dedac..4b5762f9124 100644 --- a/src/mess/video/mos6566.c +++ b/src/mess/video/mos6566.c @@ -91,10 +91,10 @@ enum static int UNUSED_BITS[0x40] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x01, 0x70, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x01, 0x70, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; // VICE palette diff --git a/src/mess/video/pc_aga.c b/src/mess/video/pc_aga.c index 723b16e56c2..7205a7ffa7e 100644 --- a/src/mess/video/pc_aga.c +++ b/src/mess/video/pc_aga.c @@ -31,7 +31,7 @@ static VIDEO_START( pc200 ); static MC6845_INTERFACE( mc6845_aga_intf ) { AGA_SCREEN_NAME, /* screen number */ - false, /* show border area */ + false, /* show border area */ 8, /* numbers of pixels per video memory address */ NULL, /* begin_update */ aga_update_row, /* update_row */ diff --git a/src/mess/video/pc_t1t.c b/src/mess/video/pc_t1t.c index afd14a20d2a..1243ccca858 100644 --- a/src/mess/video/pc_t1t.c +++ b/src/mess/video/pc_t1t.c @@ -32,7 +32,7 @@ static WRITE_LINE_DEVICE_HANDLER( pcjr_vsync_changed ); static MC6845_INTERFACE( mc6845_t1000_intf ) { T1000_SCREEN_NAME, /* screen number */ - false, /* show border area */ + false, /* show border area */ 8, /* numbers of pixels per video memory address */ NULL, /* begin_update */ t1000_update_row, /* update_row */ @@ -62,7 +62,7 @@ MACHINE_CONFIG_END static MC6845_INTERFACE( mc6845_pcjr_intf ) { T1000_SCREEN_NAME, /* screen number */ - false, /* show border area */ + false, /* show border area */ 8, /* numbers of pixels per video memory address */ NULL, /* begin_update */ t1000_update_row, /* update_row */ diff --git a/src/osd/portmedia/pmmidi.c b/src/osd/portmedia/pmmidi.c index 222941509d5..0485f9e63d1 100644 --- a/src/osd/portmedia/pmmidi.c +++ b/src/osd/portmedia/pmmidi.c @@ -12,8 +12,8 @@ static const int RX_EVENT_BUF_SIZE = 512; -#define MIDI_SYSEX 0xf0 -#define MIDI_EOX 0xf7 +#define MIDI_SYSEX 0xf0 +#define MIDI_EOX 0xf7 struct osd_midi_device { @@ -196,13 +196,13 @@ int osd_read_midi_channel(osd_midi_device *dev, UINT8 *pOut) if (dev->rx_sysex) { - if (status & 0x80) // sys real-time imposing on us? + if (status & 0x80) // sys real-time imposing on us? { if ((status == 0xf2) || (status == 0xf3)) { *pOut++ = status; - *pOut++ = Pm_MessageData1(dev->rx_evBuf[msg].message); - *pOut++ = Pm_MessageData2(dev->rx_evBuf[msg].message); + *pOut++ = Pm_MessageData1(dev->rx_evBuf[msg].message); + *pOut++ = Pm_MessageData2(dev->rx_evBuf[msg].message); bytesOut += 3; } else @@ -211,7 +211,7 @@ int osd_read_midi_channel(osd_midi_device *dev, UINT8 *pOut) bytesOut++; } } - else // shift out the sysex bytes + else // shift out the sysex bytes { for (int i = 0; i < 4; i++) { @@ -231,18 +231,18 @@ int osd_read_midi_channel(osd_midi_device *dev, UINT8 *pOut) { switch ((status>>4) & 0xf) { - case 0xc: // 2-byte messages + case 0xc: // 2-byte messages case 0xd: *pOut++ = status; - *pOut++ = Pm_MessageData1(dev->rx_evBuf[msg].message); + *pOut++ = Pm_MessageData1(dev->rx_evBuf[msg].message); bytesOut += 2; break; - case 0xf: // system common + case 0xf: // system common switch (status & 0xf) { - case 0: // System Exclusive - *pOut++ = status; // this should be OK: the shortest legal sysex is F0 tt dd F7, I believe + case 0: // System Exclusive + *pOut++ = status; // this should be OK: the shortest legal sysex is F0 tt dd F7, I believe *pOut++ = (dev->rx_evBuf[msg].message>>8) & 0xff; *pOut++ = (dev->rx_evBuf[msg].message>>16) & 0xff; *pOut++ = (dev->rx_evBuf[msg].message>>24) & 0xff; @@ -250,28 +250,28 @@ int osd_read_midi_channel(osd_midi_device *dev, UINT8 *pOut) dev->rx_sysex = true; break; - case 7: // End of System Exclusive + case 7: // End of System Exclusive *pOut++ = status; bytesOut += 1; break; - case 2: // song pos - case 3: // song select + case 2: // song pos + case 3: // song select *pOut++ = status; - *pOut++ = Pm_MessageData1(dev->rx_evBuf[msg].message); - *pOut++ = Pm_MessageData2(dev->rx_evBuf[msg].message); + *pOut++ = Pm_MessageData1(dev->rx_evBuf[msg].message); + *pOut++ = Pm_MessageData2(dev->rx_evBuf[msg].message); bytesOut += 3; break; - default: // all other defined Fx messages are 1 byte + default: // all other defined Fx messages are 1 byte break; } break; default: *pOut++ = status; - *pOut++ = Pm_MessageData1(dev->rx_evBuf[msg].message); - *pOut++ = Pm_MessageData2(dev->rx_evBuf[msg].message); + *pOut++ = Pm_MessageData1(dev->rx_evBuf[msg].message); + *pOut++ = Pm_MessageData2(dev->rx_evBuf[msg].message); bytesOut += 3; break; } @@ -289,17 +289,17 @@ void osd_write_midi_channel(osd_midi_device *dev, UINT8 data) #ifndef DISABLE_MIDI int bytes_needed = 0; PmEvent ev; - ev.timestamp = 0; // use the current time + ev.timestamp = 0; // use the current time // handle sysex if (dev->last_status == MIDI_SYSEX) { -// printf("sysex: %02x (%d)\n", data, dev->xmit_cnt); +// printf("sysex: %02x (%d)\n", data, dev->xmit_cnt); // if we get a status that isn't sysex, assume it's system common if ((data & 0x80) && (data != MIDI_EOX)) { -// printf("common during sysex!\n"); +// printf("common during sysex!\n"); ev.message = Pm_Message(data, 0, 0); Pm_Write(dev->pmStream, &ev, 1); return; @@ -315,7 +315,7 @@ void osd_write_midi_channel(osd_midi_device *dev, UINT8 data) dev->xmit_in[0] = dev->xmit_in[1] = dev->xmit_in[2] = dev->xmit_in[3] = 0; dev->xmit_cnt = 0; -// printf("SysEx packet: %08x\n", ev.message); +// printf("SysEx packet: %08x\n", ev.message); // if this is EOX, kill the running status if (data == MIDI_EOX) @@ -345,7 +345,7 @@ void osd_write_midi_channel(osd_midi_device *dev, UINT8 data) if ((dev->xmit_cnt == 1) && (dev->xmit_in[0] == MIDI_SYSEX)) { -// printf("Start SysEx!\n"); +// printf("Start SysEx!\n"); dev->last_status = MIDI_SYSEX; return; } @@ -353,27 +353,27 @@ void osd_write_midi_channel(osd_midi_device *dev, UINT8 data) // are we there yet? switch ((dev->xmit_in[0]>>4) & 0xf) { - case 0xc: // 2-byte messages + case 0xc: // 2-byte messages case 0xd: bytes_needed = 2; break; - case 0xf: // system common + case 0xf: // system common switch (dev->xmit_in[0] & 0xf) { - case 0: // System Exclusive is handled above + case 0: // System Exclusive is handled above break; - case 7: // End of System Exclusive + case 7: // End of System Exclusive bytes_needed = 1; break; - case 2: // song pos - case 3: // song select + case 2: // song pos + case 3: // song select bytes_needed = 3; break; - default: // all other defined Fx messages are 1 byte + default: // all other defined Fx messages are 1 byte bytes_needed = 1; break; } diff --git a/src/osd/sdl/debugqt.c b/src/osd/sdl/debugqt.c index 8a4972da48d..33a842e3dd0 100644 --- a/src/osd/sdl/debugqt.c +++ b/src/osd/sdl/debugqt.c @@ -82,7 +82,7 @@ static void xml_configuration_save(running_machine &machine, int config_type, xm // Create an xml node xml_data_node *debugger_node; debugger_node = xml_add_child(parentnode, "window", NULL); - if (debugger_node == NULL) + if (debugger_node == NULL) continue; xml_set_attribute_int(debugger_node, "type", xmlConfigurations[i].m_type); @@ -144,7 +144,7 @@ static void load_and_clear_main_window_config(std::vector& confi if (configs[i].m_type == WindowQtConfig::WIN_TYPE_MAIN) { mainQtWindow->setGeometry(configs[i].m_position.x(), configs[i].m_position.y(), - configs[i].m_size.x(), configs[i].m_size.y()); + configs[i].m_size.x(), configs[i].m_size.y()); break; } } @@ -168,8 +168,8 @@ static void setup_additional_startup_windows(running_machine& machine, std::vect default: break; } foo->setGeometry(configs[i].m_position.x(), configs[i].m_position.y(), - configs[i].m_size.x(), configs[i].m_size.y()); - foo->show(); + configs[i].m_size.x(), configs[i].m_size.y()); + foo->show(); } } diff --git a/src/osd/sdl/debugqtmainwindow.c b/src/osd/sdl/debugqtmainwindow.c index 58630e390e8..5e4a88404e3 100644 --- a/src/osd/sdl/debugqtmainwindow.c +++ b/src/osd/sdl/debugqtmainwindow.c @@ -4,318 +4,318 @@ #include "debug/dvdisasm.h" -MainWindow::MainWindow(running_machine* machine, QWidget* parent) : - WindowQt(machine, parent), - m_historyIndex(0), - m_inputHistory() +MainWindow::MainWindow(running_machine* machine, QWidget* parent) : + WindowQt(machine, parent), + m_historyIndex(0), + m_inputHistory() { - setGeometry(300, 300, 1000, 600); - - // - // The main frame and its input and log widgets - // - QFrame* mainWindowFrame = new QFrame(this); - - // The input line - m_inputEdit = new QLineEdit(mainWindowFrame); - connect(m_inputEdit, SIGNAL(returnPressed()), this, SLOT(executeCommand())); - m_inputEdit->installEventFilter(this); - - - // The log view - m_consoleView = new DebuggerView(DVT_CONSOLE, - m_machine, - mainWindowFrame); - m_consoleView->setFocusPolicy(Qt::NoFocus); - m_consoleView->setPreferBottom(true); - - QVBoxLayout* vLayout = new QVBoxLayout(mainWindowFrame); - vLayout->addWidget(m_consoleView); - vLayout->addWidget(m_inputEdit); - vLayout->setSpacing(3); - vLayout->setContentsMargins(4,0,4,2); - - setCentralWidget(mainWindowFrame); - - // - // Menu bars - // - // Create two commands - QAction* breakpointSetAct = new QAction("Toggle Breakpoint At Cursor", this); - QAction* runToCursorAct = new QAction("Run To Cursor", this); - breakpointSetAct->setShortcut(Qt::Key_F9); - runToCursorAct->setShortcut(Qt::Key_F4); - connect(breakpointSetAct, SIGNAL(triggered(bool)), this, SLOT(toggleBreakpointAtCursor(bool))); - connect(runToCursorAct, SIGNAL(triggered(bool)), this, SLOT(runToCursor(bool))); - - // Right bar options - QActionGroup* rightBarGroup = new QActionGroup(this); - QAction* rightActRaw = new QAction("Raw Opcodes", this); - QAction* rightActEncrypted = new QAction("Encrypted Opcodes", this); - QAction* rightActComments = new QAction("Comments", this); - rightActRaw->setCheckable(true); - rightActEncrypted->setCheckable(true); - rightActComments->setCheckable(true); - rightActRaw->setActionGroup(rightBarGroup); - rightActEncrypted->setActionGroup(rightBarGroup); - rightActComments->setActionGroup(rightBarGroup); - rightActRaw->setShortcut(QKeySequence("Ctrl+R")); - rightActEncrypted->setShortcut(QKeySequence("Ctrl+E")); - rightActComments->setShortcut(QKeySequence("Ctrl+C")); - rightActRaw->setChecked(true); - connect(rightBarGroup, SIGNAL(triggered(QAction*)), this, SLOT(rightBarChanged(QAction*))); - - // Assemble the options menu - QMenu* optionsMenu = menuBar()->addMenu("&Options"); - optionsMenu->addAction(breakpointSetAct); - optionsMenu->addAction(runToCursorAct); - optionsMenu->addSeparator(); - optionsMenu->addActions(rightBarGroup->actions()); - - - // - // Dock windows - // - QMenu* dockMenu = menuBar()->addMenu("Doc&ks"); - - setCorner(Qt::TopRightCorner, Qt::TopDockWidgetArea); - setCorner(Qt::TopLeftCorner, Qt::LeftDockWidgetArea); - - // The processor dock - QDockWidget* cpuDock = new QDockWidget("processor", this); - cpuDock->setAllowedAreas(Qt::LeftDockWidgetArea); - m_procFrame = new ProcessorDockWidget(m_machine, cpuDock); - cpuDock->setWidget(dynamic_cast(m_procFrame)); - - addDockWidget(Qt::LeftDockWidgetArea, cpuDock); - dockMenu->addAction(cpuDock->toggleViewAction()); - - // The disassembly dock - QDockWidget* dasmDock = new QDockWidget("dasm", this); - dasmDock->setAllowedAreas(Qt::TopDockWidgetArea); - m_dasmFrame = new DasmDockWidget(m_machine, dasmDock); - dasmDock->setWidget(m_dasmFrame); - - addDockWidget(Qt::TopDockWidgetArea, dasmDock); - dockMenu->addAction(dasmDock->toggleViewAction()); + setGeometry(300, 300, 1000, 600); + + // + // The main frame and its input and log widgets + // + QFrame* mainWindowFrame = new QFrame(this); + + // The input line + m_inputEdit = new QLineEdit(mainWindowFrame); + connect(m_inputEdit, SIGNAL(returnPressed()), this, SLOT(executeCommand())); + m_inputEdit->installEventFilter(this); + + + // The log view + m_consoleView = new DebuggerView(DVT_CONSOLE, + m_machine, + mainWindowFrame); + m_consoleView->setFocusPolicy(Qt::NoFocus); + m_consoleView->setPreferBottom(true); + + QVBoxLayout* vLayout = new QVBoxLayout(mainWindowFrame); + vLayout->addWidget(m_consoleView); + vLayout->addWidget(m_inputEdit); + vLayout->setSpacing(3); + vLayout->setContentsMargins(4,0,4,2); + + setCentralWidget(mainWindowFrame); + + // + // Menu bars + // + // Create two commands + QAction* breakpointSetAct = new QAction("Toggle Breakpoint At Cursor", this); + QAction* runToCursorAct = new QAction("Run To Cursor", this); + breakpointSetAct->setShortcut(Qt::Key_F9); + runToCursorAct->setShortcut(Qt::Key_F4); + connect(breakpointSetAct, SIGNAL(triggered(bool)), this, SLOT(toggleBreakpointAtCursor(bool))); + connect(runToCursorAct, SIGNAL(triggered(bool)), this, SLOT(runToCursor(bool))); + + // Right bar options + QActionGroup* rightBarGroup = new QActionGroup(this); + QAction* rightActRaw = new QAction("Raw Opcodes", this); + QAction* rightActEncrypted = new QAction("Encrypted Opcodes", this); + QAction* rightActComments = new QAction("Comments", this); + rightActRaw->setCheckable(true); + rightActEncrypted->setCheckable(true); + rightActComments->setCheckable(true); + rightActRaw->setActionGroup(rightBarGroup); + rightActEncrypted->setActionGroup(rightBarGroup); + rightActComments->setActionGroup(rightBarGroup); + rightActRaw->setShortcut(QKeySequence("Ctrl+R")); + rightActEncrypted->setShortcut(QKeySequence("Ctrl+E")); + rightActComments->setShortcut(QKeySequence("Ctrl+C")); + rightActRaw->setChecked(true); + connect(rightBarGroup, SIGNAL(triggered(QAction*)), this, SLOT(rightBarChanged(QAction*))); + + // Assemble the options menu + QMenu* optionsMenu = menuBar()->addMenu("&Options"); + optionsMenu->addAction(breakpointSetAct); + optionsMenu->addAction(runToCursorAct); + optionsMenu->addSeparator(); + optionsMenu->addActions(rightBarGroup->actions()); + + + // + // Dock windows + // + QMenu* dockMenu = menuBar()->addMenu("Doc&ks"); + + setCorner(Qt::TopRightCorner, Qt::TopDockWidgetArea); + setCorner(Qt::TopLeftCorner, Qt::LeftDockWidgetArea); + + // The processor dock + QDockWidget* cpuDock = new QDockWidget("processor", this); + cpuDock->setAllowedAreas(Qt::LeftDockWidgetArea); + m_procFrame = new ProcessorDockWidget(m_machine, cpuDock); + cpuDock->setWidget(dynamic_cast(m_procFrame)); + + addDockWidget(Qt::LeftDockWidgetArea, cpuDock); + dockMenu->addAction(cpuDock->toggleViewAction()); + + // The disassembly dock + QDockWidget* dasmDock = new QDockWidget("dasm", this); + dasmDock->setAllowedAreas(Qt::TopDockWidgetArea); + m_dasmFrame = new DasmDockWidget(m_machine, dasmDock); + dasmDock->setWidget(m_dasmFrame); + + addDockWidget(Qt::TopDockWidgetArea, dasmDock); + dockMenu->addAction(dasmDock->toggleViewAction()); } void MainWindow::setProcessor(device_t* processor) { - // Cpu swap - m_procFrame->view()->view()->set_source(*m_procFrame->view()->view()->source_list().match_device(processor)); - m_dasmFrame->view()->view()->set_source(*m_dasmFrame->view()->view()->source_list().match_device(processor)); - - // Scrollbar refresh - seems I should be able to do in the DebuggerView - m_dasmFrame->view()->verticalScrollBar()->setValue(m_dasmFrame->view()->view()->visible_position().y); - m_dasmFrame->view()->verticalScrollBar()->setValue(m_dasmFrame->view()->view()->visible_position().y); - - // Window title - astring title; - title.printf("Debug: %s - %s '%s'", m_machine->system().name, processor->name(), processor->tag()); - setWindowTitle(title.cstr()); + // Cpu swap + m_procFrame->view()->view()->set_source(*m_procFrame->view()->view()->source_list().match_device(processor)); + m_dasmFrame->view()->view()->set_source(*m_dasmFrame->view()->view()->source_list().match_device(processor)); + + // Scrollbar refresh - seems I should be able to do in the DebuggerView + m_dasmFrame->view()->verticalScrollBar()->setValue(m_dasmFrame->view()->view()->visible_position().y); + m_dasmFrame->view()->verticalScrollBar()->setValue(m_dasmFrame->view()->view()->visible_position().y); + + // Window title + astring title; + title.printf("Debug: %s - %s '%s'", m_machine->system().name, processor->name(), processor->tag()); + setWindowTitle(title.cstr()); } // Used to intercept the user clicking 'X' in the upper corner void MainWindow::closeEvent(QCloseEvent* event) { - debugActQuit(); + debugActQuit(); } // Used to intercept the user hitting the up arrow in the input widget bool MainWindow::eventFilter(QObject* obj, QEvent* event) { - // Only filter keypresses - QKeyEvent* keyEvent = NULL; - if (event->type() == QEvent::KeyPress) - { - keyEvent = static_cast(event); - } - else - { - return QObject::eventFilter(obj, event); - } - - // Catch up & down keys - if (keyEvent->key() == Qt::Key_Up || keyEvent->key() == Qt::Key_Down) - { - if (keyEvent->key() == Qt::Key_Up) - { - if (m_historyIndex > 0) - m_historyIndex--; - } - else if (keyEvent->key() == Qt::Key_Down) - { - if (m_historyIndex < m_inputHistory.size()) - m_historyIndex++; - } - - // Populate the input edit or clear it if you're at the end - if (m_historyIndex == m_inputHistory.size()) - { - m_inputEdit->setText(""); - } - else - { - m_inputEdit->setText(m_inputHistory[m_historyIndex]); - } - } - else if (keyEvent->key() == Qt::Key_Enter) - { - executeCommand(false); - } - else - { - return QObject::eventFilter(obj, event); - } - - return true; + // Only filter keypresses + QKeyEvent* keyEvent = NULL; + if (event->type() == QEvent::KeyPress) + { + keyEvent = static_cast(event); + } + else + { + return QObject::eventFilter(obj, event); + } + + // Catch up & down keys + if (keyEvent->key() == Qt::Key_Up || keyEvent->key() == Qt::Key_Down) + { + if (keyEvent->key() == Qt::Key_Up) + { + if (m_historyIndex > 0) + m_historyIndex--; + } + else if (keyEvent->key() == Qt::Key_Down) + { + if (m_historyIndex < m_inputHistory.size()) + m_historyIndex++; + } + + // Populate the input edit or clear it if you're at the end + if (m_historyIndex == m_inputHistory.size()) + { + m_inputEdit->setText(""); + } + else + { + m_inputEdit->setText(m_inputHistory[m_historyIndex]); + } + } + else if (keyEvent->key() == Qt::Key_Enter) + { + executeCommand(false); + } + else + { + return QObject::eventFilter(obj, event); + } + + return true; } void MainWindow::toggleBreakpointAtCursor(bool changedTo) { - debug_view_disasm* dasmView = downcast(m_dasmFrame->view()->view()); - if (dasmView->cursor_visible()) - { - if (debug_cpu_get_visible_cpu(*m_machine) == dasmView->source()->device()) - { - offs_t address = downcast(dasmView)->selected_address(); - device_debug *cpuinfo = dasmView->source()->device()->debug(); - - // Find an existing breakpoint at this address - INT32 bpindex = -1; - for (device_debug::breakpoint* bp = cpuinfo->breakpoint_first(); - bp != NULL; - bp = bp->next()) - { - if (address == bp->address()) - { - bpindex = bp->index(); - break; - } - } - - // If none exists, add a new one - astring command; - if (bpindex == -1) - { - command.printf("bpset 0x%X", address); - } - else - { - command.printf("bpclear 0x%X", bpindex); - } - debug_console_execute_command(*m_machine, command, 1); - } - } - - refreshAll(); + debug_view_disasm* dasmView = downcast(m_dasmFrame->view()->view()); + if (dasmView->cursor_visible()) + { + if (debug_cpu_get_visible_cpu(*m_machine) == dasmView->source()->device()) + { + offs_t address = downcast(dasmView)->selected_address(); + device_debug *cpuinfo = dasmView->source()->device()->debug(); + + // Find an existing breakpoint at this address + INT32 bpindex = -1; + for (device_debug::breakpoint* bp = cpuinfo->breakpoint_first(); + bp != NULL; + bp = bp->next()) + { + if (address == bp->address()) + { + bpindex = bp->index(); + break; + } + } + + // If none exists, add a new one + astring command; + if (bpindex == -1) + { + command.printf("bpset 0x%X", address); + } + else + { + command.printf("bpclear 0x%X", bpindex); + } + debug_console_execute_command(*m_machine, command, 1); + } + } + + refreshAll(); } void MainWindow::runToCursor(bool changedTo) { - debug_view_disasm* dasmView = downcast(m_dasmFrame->view()->view()); - if (dasmView->cursor_visible()) - { - if (debug_cpu_get_visible_cpu(*m_machine) == dasmView->source()->device()) - { - offs_t address = downcast(dasmView)->selected_address(); - astring command; - command.printf("go 0x%X", address); - debug_console_execute_command(*m_machine, command, 1); - } - } + debug_view_disasm* dasmView = downcast(m_dasmFrame->view()->view()); + if (dasmView->cursor_visible()) + { + if (debug_cpu_get_visible_cpu(*m_machine) == dasmView->source()->device()) + { + offs_t address = downcast(dasmView)->selected_address(); + astring command; + command.printf("go 0x%X", address); + debug_console_execute_command(*m_machine, command, 1); + } + } } void MainWindow::rightBarChanged(QAction* changedTo) { - debug_view_disasm* dasmView = downcast(m_dasmFrame->view()->view()); - if (changedTo->text() == "Raw Opcodes") - { - dasmView->set_right_column(DASM_RIGHTCOL_RAW); - } - else if (changedTo->text() == "Encrypted Opcodes") - { - dasmView->set_right_column(DASM_RIGHTCOL_ENCRYPTED); - } - else if (changedTo->text() == "Comments") - { - dasmView->set_right_column(DASM_RIGHTCOL_COMMENTS); - } - m_dasmFrame->view()->viewport()->update(); + debug_view_disasm* dasmView = downcast(m_dasmFrame->view()->view()); + if (changedTo->text() == "Raw Opcodes") + { + dasmView->set_right_column(DASM_RIGHTCOL_RAW); + } + else if (changedTo->text() == "Encrypted Opcodes") + { + dasmView->set_right_column(DASM_RIGHTCOL_ENCRYPTED); + } + else if (changedTo->text() == "Comments") + { + dasmView->set_right_column(DASM_RIGHTCOL_COMMENTS); + } + m_dasmFrame->view()->viewport()->update(); } void MainWindow::executeCommand(bool withClear) { - QString command = m_inputEdit->text(); - - // A blank command is a "silent step" - if (command == "") - { - debug_cpu_get_visible_cpu(*m_machine)->debug()->single_step(); - return; - } - - // If the user asked for help on a specific command, enhance the call - if (command.trimmed().startsWith("help", Qt::CaseInsensitive)) - { - if (command.split(" ", QString::SkipEmptyParts).length() == 2) - { - const int width = m_consoleView->view()->visible_size().x; - command.append(QString(", %1").arg(width, 1, 16)); - } - } - - // Send along the command - debug_console_execute_command(*m_machine, - command.toLocal8Bit().data(), - true); - - // Add history & set the index to be the top of the stack - addToHistory(command); - - // Clear out the text and reset the history pointer only if asked - if (withClear) - { - m_inputEdit->clear(); - m_historyIndex = m_inputHistory.size(); - } - - // Refresh - m_consoleView->viewport()->update(); - m_procFrame->view()->update(); - m_dasmFrame->view()->update(); + QString command = m_inputEdit->text(); + + // A blank command is a "silent step" + if (command == "") + { + debug_cpu_get_visible_cpu(*m_machine)->debug()->single_step(); + return; + } + + // If the user asked for help on a specific command, enhance the call + if (command.trimmed().startsWith("help", Qt::CaseInsensitive)) + { + if (command.split(" ", QString::SkipEmptyParts).length() == 2) + { + const int width = m_consoleView->view()->visible_size().x; + command.append(QString(", %1").arg(width, 1, 16)); + } + } + + // Send along the command + debug_console_execute_command(*m_machine, + command.toLocal8Bit().data(), + true); + + // Add history & set the index to be the top of the stack + addToHistory(command); + + // Clear out the text and reset the history pointer only if asked + if (withClear) + { + m_inputEdit->clear(); + m_historyIndex = m_inputHistory.size(); + } + + // Refresh + m_consoleView->viewport()->update(); + m_procFrame->view()->update(); + m_dasmFrame->view()->update(); } void MainWindow::debugActClose() { - m_machine->schedule_exit(); + m_machine->schedule_exit(); } void MainWindow::addToHistory(const QString& command) { - if (command == "") - return; - - // Always push back when there is no previous history - if (m_inputHistory.size() == 0) - { - m_inputHistory.push_back(m_inputEdit->text()); - return; - } - - // If there is previous history, make sure it's not what you just executed - if (m_inputHistory.back() != m_inputEdit->text()) - { - m_inputHistory.push_back(m_inputEdit->text()); - } + if (command == "") + return; + + // Always push back when there is no previous history + if (m_inputHistory.size() == 0) + { + m_inputHistory.push_back(m_inputEdit->text()); + return; + } + + // If there is previous history, make sure it's not what you just executed + if (m_inputHistory.back() != m_inputEdit->text()) + { + m_inputHistory.push_back(m_inputEdit->text()); + } } diff --git a/src/osd/sdl/debugqtview.c b/src/osd/sdl/debugqtview.c index fdcd4ae43b2..77e868f5b6a 100644 --- a/src/osd/sdl/debugqtview.c +++ b/src/osd/sdl/debugqtview.c @@ -3,201 +3,201 @@ #include "debugqtview.h" -DebuggerView::DebuggerView(const debug_view_type& type, - running_machine* machine, - QWidget* parent) : - QAbstractScrollArea(parent), - m_preferBottom(false), - m_view(NULL), - m_machine(machine) +DebuggerView::DebuggerView(const debug_view_type& type, + running_machine* machine, + QWidget* parent) : + QAbstractScrollArea(parent), + m_preferBottom(false), + m_view(NULL), + m_machine(machine) { - // I like setting the font per-view since it doesn't override the menuing fonts. - QFont viewFontRequest("Courier New"); - viewFontRequest.setFixedPitch(true); - viewFontRequest.setPointSize(11); - setFont(viewFontRequest); - - m_view = m_machine->debug_view().alloc_view(type, - DebuggerView::debuggerViewUpdate, - this); - - connect(verticalScrollBar(), SIGNAL(valueChanged(int)), - this, SLOT(verticalScrollSlot(int))); - connect(horizontalScrollBar(), SIGNAL(valueChanged(int)), - this, SLOT(horizontalScrollSlot(int))); + // I like setting the font per-view since it doesn't override the menuing fonts. + QFont viewFontRequest("Courier New"); + viewFontRequest.setFixedPitch(true); + viewFontRequest.setPointSize(11); + setFont(viewFontRequest); + + m_view = m_machine->debug_view().alloc_view(type, + DebuggerView::debuggerViewUpdate, + this); + + connect(verticalScrollBar(), SIGNAL(valueChanged(int)), + this, SLOT(verticalScrollSlot(int))); + connect(horizontalScrollBar(), SIGNAL(valueChanged(int)), + this, SLOT(horizontalScrollSlot(int))); } void DebuggerView::paintEvent(QPaintEvent* event) { - // Tell the MAME debug view how much real estate is available - QFontMetrics actualFont = fontMetrics(); - const int fontWidth = MAX(1, actualFont.width('_')); - const int fontHeight = MAX(1, actualFont.height()); - m_view->set_visible_size(debug_view_xy(width()/fontWidth, height()/fontHeight)); - - - // Handle the scroll bars - const int verticalScrollCharDiff = m_view->total_size().y - m_view->visible_size().y; - const int scrollSize = verticalScrollCharDiff < 0 ? 0 : verticalScrollCharDiff; - bool atEnd = false; - if (verticalScrollBar()->value() == verticalScrollBar()->maximum()) - { - atEnd = true; - } - verticalScrollBar()->setRange(0, scrollSize); - if (m_preferBottom && atEnd) - { - verticalScrollBar()->setValue(scrollSize); - } - - - // Draw the viewport widget - QPainter painter(viewport()); - painter.fillRect(0, 0, width(), height(), QBrush(Qt::white)); - painter.setBackgroundMode(Qt::OpaqueMode); - painter.setBackground(QColor(255,255,255)); - - // Background control - QBrush bgBrush; - bgBrush.setStyle(Qt::SolidPattern); - painter.setPen(QPen(QColor(0,0,0))); - - size_t viewDataOffset = 0; - const debug_view_xy& visibleCharDims = m_view->visible_size(); - for (int y = 0; y < visibleCharDims.y; y++) - { - for (int x = 0; x < visibleCharDims.x; x++) - { - const unsigned char textAttr = m_view->viewdata()[viewDataOffset].attrib; - - if (x == 0 || textAttr != m_view->viewdata()[viewDataOffset-1].attrib) - { - // Text color handling - QColor fgColor(0,0,0); - QColor bgColor(255,255,255); - - if(textAttr & DCA_ANCILLARY) - { - bgColor.setRgb(0xe0, 0xe0, 0xe0); - } - if(textAttr & DCA_SELECTED) - { - bgColor.setRgb(0xff, 0x80, 0x80); - } - if(textAttr & DCA_CURRENT) - { - bgColor.setRgb(0xff, 0xff, 0x00); - } - if ((textAttr & DCA_SELECTED) && (textAttr & DCA_CURRENT)) - { - bgColor.setRgb(0xff,0xc0,0x80); - } - if(textAttr & DCA_CHANGED) - { - fgColor.setRgb(0xff, 0x00, 0x00); - } - if(textAttr & DCA_INVALID) - { - fgColor.setRgb(0x00, 0x00, 0xff); - } - if(textAttr & DCA_DISABLED) - { - fgColor.setRgb((fgColor.red() + bgColor.red()) >> 1, - (fgColor.green() + bgColor.green()) >> 1, - (fgColor.blue() + bgColor.blue()) >> 1); - } - if(textAttr & DCA_COMMENT) - { - fgColor.setRgb(0x00, 0x80, 0x00); - } - - bgBrush.setColor(bgColor); - painter.setBackground(bgBrush); - painter.setPen(QPen(fgColor)); - } - - // Your character is not guaranteed to take up the entire fontWidth x fontHeight, so fill before. - painter.fillRect(x*fontWidth, y*fontHeight, fontWidth, fontHeight, bgBrush); - - // There is a touchy interplay between font height, drawing difference, visible position, etc - // Fonts don't get drawn "down and to the left" like boxes, so some wiggling is needed. - painter.drawText(x*fontWidth, - (y*fontHeight + (fontHeight*0.80)), - QString(m_view->viewdata()[viewDataOffset].byte)); - viewDataOffset++; - } - } + // Tell the MAME debug view how much real estate is available + QFontMetrics actualFont = fontMetrics(); + const int fontWidth = MAX(1, actualFont.width('_')); + const int fontHeight = MAX(1, actualFont.height()); + m_view->set_visible_size(debug_view_xy(width()/fontWidth, height()/fontHeight)); + + + // Handle the scroll bars + const int verticalScrollCharDiff = m_view->total_size().y - m_view->visible_size().y; + const int scrollSize = verticalScrollCharDiff < 0 ? 0 : verticalScrollCharDiff; + bool atEnd = false; + if (verticalScrollBar()->value() == verticalScrollBar()->maximum()) + { + atEnd = true; + } + verticalScrollBar()->setRange(0, scrollSize); + if (m_preferBottom && atEnd) + { + verticalScrollBar()->setValue(scrollSize); + } + + + // Draw the viewport widget + QPainter painter(viewport()); + painter.fillRect(0, 0, width(), height(), QBrush(Qt::white)); + painter.setBackgroundMode(Qt::OpaqueMode); + painter.setBackground(QColor(255,255,255)); + + // Background control + QBrush bgBrush; + bgBrush.setStyle(Qt::SolidPattern); + painter.setPen(QPen(QColor(0,0,0))); + + size_t viewDataOffset = 0; + const debug_view_xy& visibleCharDims = m_view->visible_size(); + for (int y = 0; y < visibleCharDims.y; y++) + { + for (int x = 0; x < visibleCharDims.x; x++) + { + const unsigned char textAttr = m_view->viewdata()[viewDataOffset].attrib; + + if (x == 0 || textAttr != m_view->viewdata()[viewDataOffset-1].attrib) + { + // Text color handling + QColor fgColor(0,0,0); + QColor bgColor(255,255,255); + + if(textAttr & DCA_ANCILLARY) + { + bgColor.setRgb(0xe0, 0xe0, 0xe0); + } + if(textAttr & DCA_SELECTED) + { + bgColor.setRgb(0xff, 0x80, 0x80); + } + if(textAttr & DCA_CURRENT) + { + bgColor.setRgb(0xff, 0xff, 0x00); + } + if ((textAttr & DCA_SELECTED) && (textAttr & DCA_CURRENT)) + { + bgColor.setRgb(0xff,0xc0,0x80); + } + if(textAttr & DCA_CHANGED) + { + fgColor.setRgb(0xff, 0x00, 0x00); + } + if(textAttr & DCA_INVALID) + { + fgColor.setRgb(0x00, 0x00, 0xff); + } + if(textAttr & DCA_DISABLED) + { + fgColor.setRgb((fgColor.red() + bgColor.red()) >> 1, + (fgColor.green() + bgColor.green()) >> 1, + (fgColor.blue() + bgColor.blue()) >> 1); + } + if(textAttr & DCA_COMMENT) + { + fgColor.setRgb(0x00, 0x80, 0x00); + } + + bgBrush.setColor(bgColor); + painter.setBackground(bgBrush); + painter.setPen(QPen(fgColor)); + } + + // Your character is not guaranteed to take up the entire fontWidth x fontHeight, so fill before. + painter.fillRect(x*fontWidth, y*fontHeight, fontWidth, fontHeight, bgBrush); + + // There is a touchy interplay between font height, drawing difference, visible position, etc + // Fonts don't get drawn "down and to the left" like boxes, so some wiggling is needed. + painter.drawText(x*fontWidth, + (y*fontHeight + (fontHeight*0.80)), + QString(m_view->viewdata()[viewDataOffset].byte)); + viewDataOffset++; + } + } } void DebuggerView::keyPressEvent(QKeyEvent* event) { - if (m_view == NULL) - return QWidget::keyPressEvent(event); - - Qt::KeyboardModifiers keyMods = QApplication::keyboardModifiers(); - const bool ctrlDown = keyMods.testFlag(Qt::ControlModifier); - - int keyPress = -1; - switch (event->key()) - { - case Qt::Key_Up: - keyPress = DCH_UP; - break; - case Qt::Key_Down: - keyPress = DCH_DOWN; - break; - case Qt::Key_Left: - keyPress = DCH_LEFT; - if (ctrlDown) keyPress = DCH_CTRLLEFT; - break; - case Qt::Key_Right: - keyPress = DCH_RIGHT; - if (ctrlDown) keyPress = DCH_CTRLRIGHT; - break; - case Qt::Key_PageUp: - keyPress = DCH_PUP; - break; - case Qt::Key_PageDown: - keyPress = DCH_PDOWN; - break; - case Qt::Key_Home: - keyPress = DCH_HOME; - if (ctrlDown) keyPress = DCH_CTRLHOME; - break; - case Qt::Key_End: - keyPress = DCH_END; - if (ctrlDown) keyPress = DCH_CTRLEND; - break; - case Qt::Key_0: keyPress = '0'; break; - case Qt::Key_1: keyPress = '1'; break; - case Qt::Key_2: keyPress = '2'; break; - case Qt::Key_3: keyPress = '3'; break; - case Qt::Key_4: keyPress = '4'; break; - case Qt::Key_5: keyPress = '5'; break; - case Qt::Key_6: keyPress = '6'; break; - case Qt::Key_7: keyPress = '7'; break; - case Qt::Key_8: keyPress = '8'; break; - case Qt::Key_9: keyPress = '9'; break; - case Qt::Key_A: keyPress = 'a'; break; - case Qt::Key_B: keyPress = 'b'; break; - case Qt::Key_C: keyPress = 'c'; break; - case Qt::Key_D: keyPress = 'd'; break; - case Qt::Key_E: keyPress = 'e'; break; - case Qt::Key_F: keyPress = 'f'; break; - default: - return QWidget::keyPressEvent(event); - } - - m_view->set_cursor_visible(true); - m_view->process_char(keyPress); - - // Catch the view up with the cursor - verticalScrollBar()->setValue(m_view->visible_position().y); - - viewport()->update(); - update(); + if (m_view == NULL) + return QWidget::keyPressEvent(event); + + Qt::KeyboardModifiers keyMods = QApplication::keyboardModifiers(); + const bool ctrlDown = keyMods.testFlag(Qt::ControlModifier); + + int keyPress = -1; + switch (event->key()) + { + case Qt::Key_Up: + keyPress = DCH_UP; + break; + case Qt::Key_Down: + keyPress = DCH_DOWN; + break; + case Qt::Key_Left: + keyPress = DCH_LEFT; + if (ctrlDown) keyPress = DCH_CTRLLEFT; + break; + case Qt::Key_Right: + keyPress = DCH_RIGHT; + if (ctrlDown) keyPress = DCH_CTRLRIGHT; + break; + case Qt::Key_PageUp: + keyPress = DCH_PUP; + break; + case Qt::Key_PageDown: + keyPress = DCH_PDOWN; + break; + case Qt::Key_Home: + keyPress = DCH_HOME; + if (ctrlDown) keyPress = DCH_CTRLHOME; + break; + case Qt::Key_End: + keyPress = DCH_END; + if (ctrlDown) keyPress = DCH_CTRLEND; + break; + case Qt::Key_0: keyPress = '0'; break; + case Qt::Key_1: keyPress = '1'; break; + case Qt::Key_2: keyPress = '2'; break; + case Qt::Key_3: keyPress = '3'; break; + case Qt::Key_4: keyPress = '4'; break; + case Qt::Key_5: keyPress = '5'; break; + case Qt::Key_6: keyPress = '6'; break; + case Qt::Key_7: keyPress = '7'; break; + case Qt::Key_8: keyPress = '8'; break; + case Qt::Key_9: keyPress = '9'; break; + case Qt::Key_A: keyPress = 'a'; break; + case Qt::Key_B: keyPress = 'b'; break; + case Qt::Key_C: keyPress = 'c'; break; + case Qt::Key_D: keyPress = 'd'; break; + case Qt::Key_E: keyPress = 'e'; break; + case Qt::Key_F: keyPress = 'f'; break; + default: + return QWidget::keyPressEvent(event); + } + + m_view->set_cursor_visible(true); + m_view->process_char(keyPress); + + // Catch the view up with the cursor + verticalScrollBar()->setValue(m_view->visible_position().y); + + viewport()->update(); + update(); } @@ -208,7 +208,7 @@ void DebuggerView::mousePressEvent(QMouseEvent* event) QFontMetrics actualFont = fontMetrics(); const int fontWidth = MAX(1, actualFont.width('_')); const int fontHeight = MAX(1, actualFont.height()); - + debug_view_xy topLeft = m_view->visible_position(); debug_view_xy clickViewPosition; clickViewPosition.x = topLeft.x + (event->x() / fontWidth); @@ -223,23 +223,21 @@ void DebuggerView::mousePressEvent(QMouseEvent* event) void DebuggerView::verticalScrollSlot(int value) { - m_view->set_visible_position(debug_view_xy(horizontalScrollBar()->value(), value)); + m_view->set_visible_position(debug_view_xy(horizontalScrollBar()->value(), value)); } void DebuggerView::horizontalScrollSlot(int value) { - m_view->set_visible_position(debug_view_xy(value, verticalScrollBar()->value())); + m_view->set_visible_position(debug_view_xy(value, verticalScrollBar()->value())); } void DebuggerView::debuggerViewUpdate(debug_view& debugView, void* osdPrivate) { - // Get a handle to the DebuggerView being updated & redraw - DebuggerView* dView = (DebuggerView*)osdPrivate; - dView->verticalScrollBar()->setValue(dView->view()->visible_position().y); - dView->viewport()->update(); - dView->update(); + // Get a handle to the DebuggerView being updated & redraw + DebuggerView* dView = (DebuggerView*)osdPrivate; + dView->verticalScrollBar()->setValue(dView->view()->visible_position().y); + dView->viewport()->update(); + dView->update(); } - - diff --git a/src/osd/sdl/debugqtview.h b/src/osd/sdl/debugqtview.h index 1e926949114..b62002e3f68 100644 --- a/src/osd/sdl/debugqtview.h +++ b/src/osd/sdl/debugqtview.h @@ -8,38 +8,38 @@ class DebuggerView : public QAbstractScrollArea { - Q_OBJECT - + Q_OBJECT + public: - DebuggerView(const debug_view_type& type, - running_machine* machine, - QWidget* parent=NULL); - virtual ~DebuggerView() {} + DebuggerView(const debug_view_type& type, + running_machine* machine, + QWidget* parent=NULL); + virtual ~DebuggerView() {} - void paintEvent(QPaintEvent* event); + void paintEvent(QPaintEvent* event); - // Callback to allow MAME to refresh the view - static void debuggerViewUpdate(debug_view& debugView, void* osdPrivate); + // Callback to allow MAME to refresh the view + static void debuggerViewUpdate(debug_view& debugView, void* osdPrivate); - // Setters and accessors - void setPreferBottom(bool pb) { m_preferBottom = pb; } - debug_view* view() { return m_view; } + // Setters and accessors + void setPreferBottom(bool pb) { m_preferBottom = pb; } + debug_view* view() { return m_view; } protected: - void keyPressEvent(QKeyEvent* event); - void mousePressEvent(QMouseEvent* event); + void keyPressEvent(QKeyEvent* event); + void mousePressEvent(QMouseEvent* event); private slots: - void verticalScrollSlot(int value); - void horizontalScrollSlot(int value); + void verticalScrollSlot(int value); + void horizontalScrollSlot(int value); private: - bool m_preferBottom; + bool m_preferBottom; - debug_view* m_view; - running_machine* m_machine; + debug_view* m_view; + running_machine* m_machine; }; diff --git a/src/osd/sdl/debugqtwindow.h b/src/osd/sdl/debugqtwindow.h index ae87a767c05..f9d3e6a735c 100644 --- a/src/osd/sdl/debugqtwindow.h +++ b/src/osd/sdl/debugqtwindow.h @@ -70,8 +70,8 @@ public: }; public: - WindowQtConfig() : - m_type(WIN_TYPE_MAIN), + WindowQtConfig() : + m_type(WIN_TYPE_MAIN), m_size(800, 600), m_position(120, 120) {} diff --git a/src/osd/sdl/sdlsocket.c b/src/osd/sdl/sdlsocket.c index 7c20b1a7b93..e7e294a92c5 100644 --- a/src/osd/sdl/sdlsocket.c +++ b/src/osd/sdl/sdlsocket.c @@ -55,7 +55,7 @@ file_error sdl_open_socket(const char *path, UINT32 openflags, osd_file **file, sscanf( path+strlen(sdlfile_socket_identifier), "%255[^:]:%d", hostname, &port ); -// printf("Connecting to server '%s' on port '%d'\n", hostname, port); +// printf("Connecting to server '%s' on port '%d'\n", hostname, port); if (((*file)->socket = socket(AF_INET, SOCK_STREAM, 0)) == -1) { @@ -77,25 +77,25 @@ file_error sdl_open_socket(const char *path, UINT32 openflags, osd_file **file, // listening socket support if (openflags & OPEN_FLAG_CREATE) { -// printf("Listening for client at '%s' on port '%d'\n", hostname, port); +// printf("Listening for client at '%s' on port '%d'\n", hostname, port); // bind socket... if (bind((*file)->socket, (struct sockaddr *)&sai, sizeof(struct sockaddr)) == -1) { return FILERR_ACCESS_DENIED; } - + // start to listen... if (listen((*file)->socket, 1) == -1) { return FILERR_ACCESS_DENIED; } - + // mark socket as "listening" (*file)->handle = 0; *filesize = 0; return FILERR_NONE; } -// printf("Connecting to server '%s' on port '%d'\n", hostname, port); +// printf("Connecting to server '%s' on port '%d'\n", hostname, port); if (connect((*file)->socket, (struct sockaddr *)&sai, sizeof(struct sockaddr)) == -1) { return FILERR_ACCESS_DENIED; diff --git a/src/osd/windows/d3dcomm.h b/src/osd/windows/d3dcomm.h index 2ac96074006..41318dc0822 100644 --- a/src/osd/windows/d3dcomm.h +++ b/src/osd/windows/d3dcomm.h @@ -86,8 +86,8 @@ struct d3d_poly_info UINT32 flags; // rendering flags DWORD modmode; // texture modulation mode d3d_texture_info * texture; // pointer to texture info - float line_time; // used by vectors - float line_length; // used by vectors + float line_time; // used by vectors + float line_length; // used by vectors }; diff --git a/src/osd/windows/d3dhlsl.c b/src/osd/windows/d3dhlsl.c index 06f9894a026..373526dbdd8 100644 --- a/src/osd/windows/d3dhlsl.c +++ b/src/osd/windows/d3dhlsl.c @@ -914,17 +914,17 @@ void hlsl_info::init(d3d_base *d3dintf, win_window_info *window) ini_file.gets(buf, 1024); sscanf(buf, "yiq_phase_count %d\n", &options->yiq_phase_count); - ini_file.gets(buf, 1024); - sscanf(buf, "vector_time_scale %f\n", &options->vector_time_scale); + ini_file.gets(buf, 1024); + sscanf(buf, "vector_time_scale %f\n", &options->vector_time_scale); - ini_file.gets(buf, 1024); - sscanf(buf, "vector_time_period %f\n", &options->vector_time_period); + ini_file.gets(buf, 1024); + sscanf(buf, "vector_time_period %f\n", &options->vector_time_period); - ini_file.gets(buf, 1024); - sscanf(buf, "vector_length_scale %f\n", &options->vector_length_scale); + ini_file.gets(buf, 1024); + sscanf(buf, "vector_length_scale %f\n", &options->vector_length_scale); - ini_file.gets(buf, 1024); - sscanf(buf, "vector_length_ratio %f\n", &options->vector_length_ratio); + ini_file.gets(buf, 1024); + sscanf(buf, "vector_length_ratio %f\n", &options->vector_length_ratio); } } } @@ -979,10 +979,10 @@ void hlsl_info::init(d3d_base *d3dintf, win_window_info *window) options->yiq_q = winoptions.screen_yiq_q(); options->yiq_scan_time = winoptions.screen_yiq_scan_time(); options->yiq_phase_count = winoptions.screen_yiq_phase_count(); - options->vector_time_scale = winoptions.screen_vector_time_scale(); - options->vector_time_period = winoptions.screen_vector_time_period(); - options->vector_length_scale = winoptions.screen_vector_length_scale(); - options->vector_length_ratio = winoptions.screen_vector_length_ratio(); + options->vector_time_scale = winoptions.screen_vector_time_scale(); + options->vector_time_period = winoptions.screen_vector_time_period(); + options->vector_length_scale = winoptions.screen_vector_length_scale(); + options->vector_length_ratio = winoptions.screen_vector_length_ratio(); } options->params_dirty = true; @@ -1001,58 +1001,58 @@ void hlsl_info::init(d3d_base *d3dintf, win_window_info *window) void hlsl_info::init_fsfx_quad(void *vertbuf) { - // Called at the start of each frame by the D3D code in order to reserve two triangles - // that are guaranteed to be at a fixed position so as to simply use D3DPT_TRIANGLELIST, 0, 2 - // instead of having to do bookkeeping about a specific screen quad - if (!master_enable || !d3dintf->post_fx_available) - return; + // Called at the start of each frame by the D3D code in order to reserve two triangles + // that are guaranteed to be at a fixed position so as to simply use D3DPT_TRIANGLELIST, 0, 2 + // instead of having to do bookkeeping about a specific screen quad + if (!master_enable || !d3dintf->post_fx_available) + return; - d3d_info *d3d = (d3d_info *)window->drawdata; + d3d_info *d3d = (d3d_info *)window->drawdata; - // get a pointer to the vertex buffer - fsfx_vertices = (d3d_vertex *)vertbuf; - if (fsfx_vertices == NULL) - return; + // get a pointer to the vertex buffer + fsfx_vertices = (d3d_vertex *)vertbuf; + if (fsfx_vertices == NULL) + return; - // fill in the vertexes clockwise - fsfx_vertices[0].x = 0.0f; - fsfx_vertices[0].y = 0.0f; - fsfx_vertices[1].x = d3d->width; - fsfx_vertices[1].y = 0.0f; - fsfx_vertices[2].x = 0.0f; - fsfx_vertices[2].y = d3d->height; - fsfx_vertices[3].x = d3d->width; - fsfx_vertices[3].y = 0.0f; - fsfx_vertices[4].x = 0.0f; - fsfx_vertices[4].y = d3d->height; - fsfx_vertices[5].x = d3d->width; - fsfx_vertices[5].y = d3d->height; + // fill in the vertexes clockwise + fsfx_vertices[0].x = 0.0f; + fsfx_vertices[0].y = 0.0f; + fsfx_vertices[1].x = d3d->width; + fsfx_vertices[1].y = 0.0f; + fsfx_vertices[2].x = 0.0f; + fsfx_vertices[2].y = d3d->height; + fsfx_vertices[3].x = d3d->width; + fsfx_vertices[3].y = 0.0f; + fsfx_vertices[4].x = 0.0f; + fsfx_vertices[4].y = d3d->height; + fsfx_vertices[5].x = d3d->width; + fsfx_vertices[5].y = d3d->height; - fsfx_vertices[0].u0 = 0.0f; - fsfx_vertices[0].v0 = 0.0f; + fsfx_vertices[0].u0 = 0.0f; + fsfx_vertices[0].v0 = 0.0f; - fsfx_vertices[1].u0 = 1.0f; - fsfx_vertices[1].v0 = 0.0f; + fsfx_vertices[1].u0 = 1.0f; + fsfx_vertices[1].v0 = 0.0f; - fsfx_vertices[2].u0 = 0.0f; - fsfx_vertices[2].v0 = 1.0f; + fsfx_vertices[2].u0 = 0.0f; + fsfx_vertices[2].v0 = 1.0f; - fsfx_vertices[3].u0 = 1.0f; - fsfx_vertices[3].v0 = 0.0f; + fsfx_vertices[3].u0 = 1.0f; + fsfx_vertices[3].v0 = 0.0f; - fsfx_vertices[4].u0 = 0.0f; - fsfx_vertices[4].v0 = 1.0f; + fsfx_vertices[4].u0 = 0.0f; + fsfx_vertices[4].v0 = 1.0f; - fsfx_vertices[5].u0 = 1.0f; - fsfx_vertices[5].v0 = 1.0f; + fsfx_vertices[5].u0 = 1.0f; + fsfx_vertices[5].v0 = 1.0f; - // set the color, Z parameters to standard values - for (int i = 0; i < 6; i++) - { - fsfx_vertices[i].z = 0.0f; - fsfx_vertices[i].rhw = 1.0f; - fsfx_vertices[i].color = D3DCOLOR_ARGB(255, 255, 255, 255); - } + // set the color, Z parameters to standard values + for (int i = 0; i < 6; i++) + { + fsfx_vertices[i].z = 0.0f; + fsfx_vertices[i].rhw = 1.0f; + fsfx_vertices[i].color = D3DCOLOR_ARGB(255, 255, 255, 255); + } } @@ -1068,22 +1068,22 @@ int hlsl_info::create_resources(bool reset) d3d_info *d3d = (d3d_info *)window->drawdata; - HRESULT result = (*d3dintf->device.get_render_target)(d3d->device, 0, &backbuffer); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device get_render_target call\n", (int)result); - - result = (*d3dintf->device.create_texture)(d3d->device, 4, 4, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &black_texture); - if (result != D3D_OK) - { - mame_printf_verbose("Direct3D: Unable to init video-memory target for black texture (%08x)\n", (UINT32)result); - return 1; - } - (*d3dintf->texture.get_surface_level)(black_texture, 0, &black_surface); - result = (*d3dintf->device.set_render_target)(d3d->device, 0, black_surface); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); - result = (*d3dintf->device.clear)(d3d->device, 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,0), 0, 0); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); - result = (*d3dintf->device.set_render_target)(d3d->device, 0, backbuffer); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); + HRESULT result = (*d3dintf->device.get_render_target)(d3d->device, 0, &backbuffer); + if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device get_render_target call\n", (int)result); + + result = (*d3dintf->device.create_texture)(d3d->device, 4, 4, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &black_texture); + if (result != D3D_OK) + { + mame_printf_verbose("Direct3D: Unable to init video-memory target for black texture (%08x)\n", (UINT32)result); + return 1; + } + (*d3dintf->texture.get_surface_level)(black_texture, 0, &black_surface); + result = (*d3dintf->device.set_render_target)(d3d->device, 0, black_surface); + if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); + result = (*d3dintf->device.clear)(d3d->device, 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,0), 0, 0); + if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); + result = (*d3dintf->device.set_render_target)(d3d->device, 0, backbuffer); + if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); result = (*d3dintf->device.create_texture)(d3d->device, (int)snap_width, (int)snap_height, 1, D3DUSAGE_DYNAMIC, D3DFMT_A8R8G8B8, D3DPOOL_SYSTEMMEM, &avi_copy_texture); if (result != D3D_OK) @@ -1243,35 +1243,35 @@ int hlsl_info::create_resources(bool reset) // create the vector shader #if HLSL_VECTOR - char bloom_cstr[1024]; - sprintf(bloom_cstr, "%s\\bloom.fx", fx_dir); - TCHAR *bloom_name = tstring_from_utf8(bloom_cstr); - - result = (*d3dintf->device.create_effect)(d3d->device, bloom_name, &bloom_effect); - if(result != D3D_OK) - { - mame_printf_verbose("Direct3D: Unable to load bloom.fx\n"); - return 1; - } - if (bloom_name) - osd_free(bloom_name); - - char downsample_cstr[1024]; - sprintf(downsample_cstr, "%s\\downsample.fx", fx_dir); - TCHAR *downsample_name = tstring_from_utf8(downsample_cstr); - - result = (*d3dintf->device.create_effect)(d3d->device, downsample_name, &downsample_effect); - if(result != D3D_OK) - { - mame_printf_verbose("Direct3D: Unable to load downsample.fx\n"); - return 1; - } - if (downsample_name) - osd_free(downsample_name); - - char vector_cstr[1024]; - sprintf(vector_cstr, "%s\\vector.fx", fx_dir); - TCHAR *vector_name = tstring_from_utf8(vector_cstr); + char bloom_cstr[1024]; + sprintf(bloom_cstr, "%s\\bloom.fx", fx_dir); + TCHAR *bloom_name = tstring_from_utf8(bloom_cstr); + + result = (*d3dintf->device.create_effect)(d3d->device, bloom_name, &bloom_effect); + if(result != D3D_OK) + { + mame_printf_verbose("Direct3D: Unable to load bloom.fx\n"); + return 1; + } + if (bloom_name) + osd_free(bloom_name); + + char downsample_cstr[1024]; + sprintf(downsample_cstr, "%s\\downsample.fx", fx_dir); + TCHAR *downsample_name = tstring_from_utf8(downsample_cstr); + + result = (*d3dintf->device.create_effect)(d3d->device, downsample_name, &downsample_effect); + if(result != D3D_OK) + { + mame_printf_verbose("Direct3D: Unable to load downsample.fx\n"); + return 1; + } + if (downsample_name) + osd_free(downsample_name); + + char vector_cstr[1024]; + sprintf(vector_cstr, "%s\\vector.fx", fx_dir); + TCHAR *vector_name = tstring_from_utf8(vector_cstr); result = (*d3dintf->device.create_effect)(d3d->device, vector_name, &vector_effect); if(result != D3D_OK) @@ -1351,7 +1351,7 @@ void hlsl_info::begin_frame() d3d_render_target *rt = find_render_target(d3d->width, d3d->height, 0, 0); if (rt == NULL) { - return; + return; } HRESULT result = (*d3dintf->device.set_render_target)(d3d->device, 0, rt->target[0]); @@ -1368,42 +1368,42 @@ void hlsl_info::begin_frame() //============================================================ void hlsl_info::blit(d3d_surface *dst, d3d_texture *src, d3d_surface *new_dst, D3DPRIMITIVETYPE prim_type, - UINT32 prim_index, UINT32 prim_count, int dstw, int dsth) + UINT32 prim_index, UINT32 prim_count, int dstw, int dsth) { - d3d_info *d3d = (d3d_info *)window->drawdata; + d3d_info *d3d = (d3d_info *)window->drawdata; - HRESULT result = (*d3dintf->device.set_render_target)(d3d->device, 0, dst); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); + HRESULT result = (*d3dintf->device.set_render_target)(d3d->device, 0, dst); + if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); - curr_effect = effect; + curr_effect = effect; - (*d3dintf->effect.set_texture)(curr_effect, "Diffuse", src); + (*d3dintf->effect.set_texture)(curr_effect, "Diffuse", src); - (*d3dintf->effect.set_float)(curr_effect, "TargetWidth", (float)dstw); - (*d3dintf->effect.set_float)(curr_effect, "TargetHeight", (float)dsth); - (*d3dintf->effect.set_float)(curr_effect, "PostPass", 1.0f); - (*d3dintf->effect.set_float)(curr_effect, "PincushionAmount", options->pincushion); - (*d3dintf->effect.set_float)(curr_effect, "Brighten", 0.0f); + (*d3dintf->effect.set_float)(curr_effect, "TargetWidth", (float)dstw); + (*d3dintf->effect.set_float)(curr_effect, "TargetHeight", (float)dsth); + (*d3dintf->effect.set_float)(curr_effect, "PostPass", 1.0f); + (*d3dintf->effect.set_float)(curr_effect, "PincushionAmount", options->pincushion); + (*d3dintf->effect.set_float)(curr_effect, "Brighten", 0.0f); - unsigned int num_passes = 0; - (*d3dintf->effect.begin)(curr_effect, &num_passes, 0); + unsigned int num_passes = 0; + (*d3dintf->effect.begin)(curr_effect, &num_passes, 0); - for (UINT pass = 0; pass < num_passes; pass++) - { - (*d3dintf->effect.begin_pass)(curr_effect, pass); - // add the primitives - HRESULT result = (*d3dintf->device.draw_primitive)(d3d->device, prim_type, prim_index, prim_count); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); - (*d3dintf->effect.end_pass)(curr_effect); - } + for (UINT pass = 0; pass < num_passes; pass++) + { + (*d3dintf->effect.begin_pass)(curr_effect, pass); + // add the primitives + HRESULT result = (*d3dintf->device.draw_primitive)(d3d->device, prim_type, prim_index, prim_count); + if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + (*d3dintf->effect.end_pass)(curr_effect); + } - (*d3dintf->effect.end)(curr_effect); + (*d3dintf->effect.end)(curr_effect); - if (new_dst) - { - HRESULT result = (*d3dintf->device.set_render_target)(d3d->device, 0, new_dst); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); - } + if (new_dst) + { + HRESULT result = (*d3dintf->device.set_render_target)(d3d->device, 0, new_dst); + if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); + } } @@ -1413,7 +1413,7 @@ void hlsl_info::blit(d3d_surface *dst, d3d_texture *src, d3d_surface *new_dst, D //============================================================ void hlsl_info::blit(d3d_surface *dst, d3d_texture *src, d3d_surface *new_dst, D3DPRIMITIVETYPE prim_type, - UINT32 prim_index, UINT32 prim_count) + UINT32 prim_index, UINT32 prim_count) { d3d_info *d3d = (d3d_info *)window->drawdata; @@ -1430,10 +1430,10 @@ void hlsl_info::blit(d3d_surface *dst, d3d_texture *src, d3d_surface *new_dst, D (*d3dintf->effect.set_texture)(curr_effect, "Diffuse", src); - (*d3dintf->effect.set_float)(curr_effect, "TargetWidth", (float)d3d->width); - (*d3dintf->effect.set_float)(curr_effect, "TargetHeight", (float)d3d->height); - (*d3dintf->effect.set_float)(curr_effect, "ScreenWidth", (float)d3d->width); - (*d3dintf->effect.set_float)(curr_effect, "ScreenHeight", (float)d3d->height); + (*d3dintf->effect.set_float)(curr_effect, "TargetWidth", (float)d3d->width); + (*d3dintf->effect.set_float)(curr_effect, "TargetHeight", (float)d3d->height); + (*d3dintf->effect.set_float)(curr_effect, "ScreenWidth", (float)d3d->width); + (*d3dintf->effect.set_float)(curr_effect, "ScreenHeight", (float)d3d->height); (*d3dintf->effect.set_float)(curr_effect, "PostPass", 1.0f); (*d3dintf->effect.set_float)(curr_effect, "PincushionAmount", options->pincushion); (*d3dintf->effect.set_float)(curr_effect, "Brighten", 1.0f); @@ -1475,22 +1475,22 @@ void hlsl_info::end_frame() render_snapshot(snap_target); } - if (!lines_pending) - return; + if (!lines_pending) + return; - lines_pending = false; - /*d3d_info *d3d = (d3d_info *)window->drawdata; + lines_pending = false; + /*d3d_info *d3d = (d3d_info *)window->drawdata; - d3d_render_target *rt = find_render_target(d3d->width, d3d->height, 0, 0); - if (!rt) - return; + d3d_render_target *rt = find_render_target(d3d->width, d3d->height, 0, 0); + if (!rt) + return; - blit(backbuffer, rt->texture[0], NULL, vecbuf_type, vecbuf_index, vecbuf_count);*/ + blit(backbuffer, rt->texture[0], NULL, vecbuf_type, vecbuf_index, vecbuf_count);*/ /*d3d_render_target *rt = find_render_target(d3d->width, d3d->height, 0, 0); if (rt == NULL) { - return; + return; } blit(backbuffer, rt->texture[1], NULL, vecbuf_type, vecbuf_index, vecbuf_count); @@ -1973,9 +1973,9 @@ void hlsl_info::render_quad(d3d_poly_info *poly, int vertnum) (*d3dintf->effect.end)(curr_effect); - curr_effect = post_effect; - (*d3dintf->effect.set_float)(curr_effect, "TargetWidth", (float)d3d->width); - (*d3dintf->effect.set_float)(curr_effect, "TargetHeight", (float)d3d->height); + curr_effect = post_effect; + (*d3dintf->effect.set_float)(curr_effect, "TargetWidth", (float)d3d->width); + (*d3dintf->effect.set_float)(curr_effect, "TargetHeight", (float)d3d->height); /* Scanlines and shadow mask, at high res for AVI logging*/ if(avi_output_file != NULL) @@ -2022,156 +2022,156 @@ void hlsl_info::render_quad(d3d_poly_info *poly, int vertnum) snap_rendered = true; } - /* Scanlines and shadow mask */ - curr_effect = post_effect; + /* Scanlines and shadow mask */ + curr_effect = post_effect; - (*d3dintf->effect.set_texture)(curr_effect, "Diffuse", rt->texture[0]); + (*d3dintf->effect.set_texture)(curr_effect, "Diffuse", rt->texture[0]); - //(*d3dintf->effect.set_float)(curr_effect, "TargetWidth", (float)rt->target_width); - //(*d3dintf->effect.set_float)(curr_effect, "TargetHeight", (float)rt->target_height); + //(*d3dintf->effect.set_float)(curr_effect, "TargetWidth", (float)rt->target_width); + //(*d3dintf->effect.set_float)(curr_effect, "TargetHeight", (float)rt->target_height); #if HLSL_VECTOR - result = (*d3dintf->device.set_render_target)(d3d->device, 0, rt->target[1]); + result = (*d3dintf->device.set_render_target)(d3d->device, 0, rt->target[1]); #else - result = (*d3dintf->device.set_render_target)(d3d->device, 0, backbuffer); + result = (*d3dintf->device.set_render_target)(d3d->device, 0, backbuffer); #endif - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); + if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); - (*d3dintf->effect.begin)(curr_effect, &num_passes, 0); + (*d3dintf->effect.begin)(curr_effect, &num_passes, 0); - for (UINT pass = 0; pass < num_passes; pass++) - { - (*d3dintf->effect.begin_pass)(curr_effect, pass); - // add the primitives - result = (*d3dintf->device.draw_primitive)(d3d->device, poly->type, vertnum, poly->count); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); - (*d3dintf->effect.end_pass)(curr_effect); - } + for (UINT pass = 0; pass < num_passes; pass++) + { + (*d3dintf->effect.begin_pass)(curr_effect, pass); + // add the primitives + result = (*d3dintf->device.draw_primitive)(d3d->device, poly->type, vertnum, poly->count); + if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + (*d3dintf->effect.end_pass)(curr_effect); + } - (*d3dintf->effect.end)(curr_effect); + (*d3dintf->effect.end)(curr_effect); #if HLSL_VECTOR - /* Bloom */ - curr_effect = downsample_effect; - - (*d3dintf->effect.set_texture)(curr_effect, "Diffuse", rt->texture[1]); - - int bloom_size = (rt->target_width < rt->target_height) ? rt->target_width : rt->target_height; - int bloom_index = 0; - int bloom_width = rt->target_width; - int bloom_height = rt->target_height; - for(; bloom_size >= 2 && bloom_index < 11; bloom_size >>= 1) - { - float source_size[2] = { bloom_width, bloom_height }; - float target_size[2] = { bloom_width >> 1, bloom_height >> 1 }; - (*d3dintf->effect.set_vector)(curr_effect, "TargetSize", 2, target_size); - (*d3dintf->effect.set_vector)(curr_effect, "SourceSize", 2, source_size); - - (*d3dintf->effect.begin)(curr_effect, &num_passes, 0); - - (*d3dintf->effect.set_texture)(curr_effect, "Diffuse", (bloom_index == 0) ? rt->texture[1] : ct->bloom_texture[bloom_index - 1]); - - if (ct->bloom_target[bloom_index] == NULL) - { - (*d3dintf->effect.end)(curr_effect); - break; - } - - HRESULT result = (*d3dintf->device.set_render_target)(d3d->device, 0, ct->bloom_target[bloom_index]); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call 7:%d\n", (int)result, bloom_size); - //result = (*d3dintf->device.clear)(d3d->device, 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,0), 0, 0); - //if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); - - for (UINT pass = 0; pass < num_passes; pass++) - { - (*d3dintf->effect.begin_pass)(curr_effect, pass); - // add the primitives - result = (*d3dintf->device.draw_primitive)(d3d->device, D3DPT_TRIANGLELIST, 0, 2); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); - (*d3dintf->effect.end_pass)(curr_effect); - } - - (*d3dintf->effect.end)(curr_effect); - - bloom_index++; - bloom_width >>= 1; - bloom_height >>= 1; - } - - /* Bloom composite pass*/ - curr_effect = bloom_effect; - - float target_size[2] = { rt->target_width, rt->target_height }; - (*d3dintf->effect.set_vector)(curr_effect, "TargetSize", 2, target_size); - - (*d3dintf->effect.set_texture)(curr_effect, "DiffuseA", rt->texture[1]); - (*d3dintf->effect.set_float)(curr_effect, "DiffuseScaleA", 1.0f); - - char name[9] = "Diffuse*"; - char scale[14] = "DiffuseScale*"; - for(int index = 1; index < bloom_index; index++) - { - name[7] = 'A' + index; - scale[12] = 'A' + index; - (*d3dintf->effect.set_texture)(curr_effect, name, ct->bloom_texture[index - 1]); - (*d3dintf->effect.set_float)(curr_effect, scale, 1.0f); - } - for(int index = bloom_index; index < 11; index++) - { - name[7] = 'A' + index; - scale[12] = 'A' + index; - (*d3dintf->effect.set_texture)(curr_effect, name, black_texture); - (*d3dintf->effect.set_float)(curr_effect, scale, 0.0f); - } - - (*d3dintf->effect.begin)(curr_effect, &num_passes, 0); - - result = (*d3dintf->device.set_render_target)(d3d->device, 0, rt->target[2]); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call 8\n", (int)result); - - for (UINT pass = 0; pass < num_passes; pass++) - { - (*d3dintf->effect.begin_pass)(curr_effect, pass); - // add the primitives - result = (*d3dintf->device.draw_primitive)(d3d->device, D3DPT_TRIANGLELIST, 0, 2); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); - (*d3dintf->effect.end_pass)(curr_effect); - } - - (*d3dintf->effect.end)(curr_effect); - - curr_effect = effect; - - //(*d3dintf->effect.set_float)(curr_effect, "PostPass", 1.0f); - - //blit(backbuffer, ct->last_texture, NULL, poly->type, vertnum, poly->count, d3d->width, d3d->height); - - result = (*d3dintf->device.set_render_target)(d3d->device, 0, backbuffer); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call 9\n", (int)result); - - (*d3dintf->effect.set_texture)(curr_effect, "Diffuse", rt->texture[2]); - - (*d3dintf->effect.set_float)(curr_effect, "RawWidth", poly->texture != NULL ? (float)poly->texture->rawwidth : 8.0f); - (*d3dintf->effect.set_float)(curr_effect, "RawHeight", poly->texture != NULL ? (float)poly->texture->rawheight : 8.0f); - (*d3dintf->effect.set_float)(curr_effect, "WidthRatio", poly->texture != NULL ? (1.0f / (poly->texture->ustop - poly->texture->ustart)) : 0.0f); - (*d3dintf->effect.set_float)(curr_effect, "HeightRatio", poly->texture != NULL ? (1.0f / (poly->texture->vstop - poly->texture->vstart)) : 0.0f); - (*d3dintf->effect.set_float)(curr_effect, "TargetWidth", (float)d3d->width); - (*d3dintf->effect.set_float)(curr_effect, "TargetHeight", (float)d3d->height); - (*d3dintf->effect.set_float)(curr_effect, "PostPass", 0.0f); - (*d3dintf->effect.set_float)(curr_effect, "PincushionAmount", options->pincushion); - - (*d3dintf->effect.begin)(curr_effect, &num_passes, 0); - - for (UINT pass = 0; pass < num_passes; pass++) - { - (*d3dintf->effect.begin_pass)(curr_effect, pass); - // add the primitives - HRESULT result = (*d3dintf->device.draw_primitive)(d3d->device, poly->type, vertnum, poly->count); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); - (*d3dintf->effect.end_pass)(curr_effect); - } - - (*d3dintf->effect.end)(curr_effect); + /* Bloom */ + curr_effect = downsample_effect; + + (*d3dintf->effect.set_texture)(curr_effect, "Diffuse", rt->texture[1]); + + int bloom_size = (rt->target_width < rt->target_height) ? rt->target_width : rt->target_height; + int bloom_index = 0; + int bloom_width = rt->target_width; + int bloom_height = rt->target_height; + for(; bloom_size >= 2 && bloom_index < 11; bloom_size >>= 1) + { + float source_size[2] = { bloom_width, bloom_height }; + float target_size[2] = { bloom_width >> 1, bloom_height >> 1 }; + (*d3dintf->effect.set_vector)(curr_effect, "TargetSize", 2, target_size); + (*d3dintf->effect.set_vector)(curr_effect, "SourceSize", 2, source_size); + + (*d3dintf->effect.begin)(curr_effect, &num_passes, 0); + + (*d3dintf->effect.set_texture)(curr_effect, "Diffuse", (bloom_index == 0) ? rt->texture[1] : ct->bloom_texture[bloom_index - 1]); + + if (ct->bloom_target[bloom_index] == NULL) + { + (*d3dintf->effect.end)(curr_effect); + break; + } + + HRESULT result = (*d3dintf->device.set_render_target)(d3d->device, 0, ct->bloom_target[bloom_index]); + if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call 7:%d\n", (int)result, bloom_size); + //result = (*d3dintf->device.clear)(d3d->device, 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,0), 0, 0); + //if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); + + for (UINT pass = 0; pass < num_passes; pass++) + { + (*d3dintf->effect.begin_pass)(curr_effect, pass); + // add the primitives + result = (*d3dintf->device.draw_primitive)(d3d->device, D3DPT_TRIANGLELIST, 0, 2); + if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + (*d3dintf->effect.end_pass)(curr_effect); + } + + (*d3dintf->effect.end)(curr_effect); + + bloom_index++; + bloom_width >>= 1; + bloom_height >>= 1; + } + + /* Bloom composite pass*/ + curr_effect = bloom_effect; + + float target_size[2] = { rt->target_width, rt->target_height }; + (*d3dintf->effect.set_vector)(curr_effect, "TargetSize", 2, target_size); + + (*d3dintf->effect.set_texture)(curr_effect, "DiffuseA", rt->texture[1]); + (*d3dintf->effect.set_float)(curr_effect, "DiffuseScaleA", 1.0f); + + char name[9] = "Diffuse*"; + char scale[14] = "DiffuseScale*"; + for(int index = 1; index < bloom_index; index++) + { + name[7] = 'A' + index; + scale[12] = 'A' + index; + (*d3dintf->effect.set_texture)(curr_effect, name, ct->bloom_texture[index - 1]); + (*d3dintf->effect.set_float)(curr_effect, scale, 1.0f); + } + for(int index = bloom_index; index < 11; index++) + { + name[7] = 'A' + index; + scale[12] = 'A' + index; + (*d3dintf->effect.set_texture)(curr_effect, name, black_texture); + (*d3dintf->effect.set_float)(curr_effect, scale, 0.0f); + } + + (*d3dintf->effect.begin)(curr_effect, &num_passes, 0); + + result = (*d3dintf->device.set_render_target)(d3d->device, 0, rt->target[2]); + if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call 8\n", (int)result); + + for (UINT pass = 0; pass < num_passes; pass++) + { + (*d3dintf->effect.begin_pass)(curr_effect, pass); + // add the primitives + result = (*d3dintf->device.draw_primitive)(d3d->device, D3DPT_TRIANGLELIST, 0, 2); + if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + (*d3dintf->effect.end_pass)(curr_effect); + } + + (*d3dintf->effect.end)(curr_effect); + + curr_effect = effect; + + //(*d3dintf->effect.set_float)(curr_effect, "PostPass", 1.0f); + + //blit(backbuffer, ct->last_texture, NULL, poly->type, vertnum, poly->count, d3d->width, d3d->height); + + result = (*d3dintf->device.set_render_target)(d3d->device, 0, backbuffer); + if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call 9\n", (int)result); + + (*d3dintf->effect.set_texture)(curr_effect, "Diffuse", rt->texture[2]); + + (*d3dintf->effect.set_float)(curr_effect, "RawWidth", poly->texture != NULL ? (float)poly->texture->rawwidth : 8.0f); + (*d3dintf->effect.set_float)(curr_effect, "RawHeight", poly->texture != NULL ? (float)poly->texture->rawheight : 8.0f); + (*d3dintf->effect.set_float)(curr_effect, "WidthRatio", poly->texture != NULL ? (1.0f / (poly->texture->ustop - poly->texture->ustart)) : 0.0f); + (*d3dintf->effect.set_float)(curr_effect, "HeightRatio", poly->texture != NULL ? (1.0f / (poly->texture->vstop - poly->texture->vstart)) : 0.0f); + (*d3dintf->effect.set_float)(curr_effect, "TargetWidth", (float)d3d->width); + (*d3dintf->effect.set_float)(curr_effect, "TargetHeight", (float)d3d->height); + (*d3dintf->effect.set_float)(curr_effect, "PostPass", 0.0f); + (*d3dintf->effect.set_float)(curr_effect, "PincushionAmount", options->pincushion); + + (*d3dintf->effect.begin)(curr_effect, &num_passes, 0); + + for (UINT pass = 0; pass < num_passes; pass++) + { + (*d3dintf->effect.begin_pass)(curr_effect, pass); + // add the primitives + HRESULT result = (*d3dintf->device.draw_primitive)(d3d->device, poly->type, vertnum, poly->count); + if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + (*d3dintf->effect.end_pass)(curr_effect); + } + + (*d3dintf->effect.end)(curr_effect); #endif poly->texture->cur_frame++; @@ -2180,150 +2180,150 @@ void hlsl_info::render_quad(d3d_poly_info *poly, int vertnum) options->params_dirty = false; } #if HLSL_VECTOR - else if(PRIMFLAG_GET_VECTOR(poly->flags) && vector_enable) - { - d3d_render_target *rt = find_render_target(d3d->width, d3d->height, 0, 0); - if (rt == NULL) - { - return; - } - - lines_pending = true; - - curr_effect = vector_effect; - //curr_effect = effect; - - if(options->params_dirty) - { - (*d3dintf->effect.set_float)(curr_effect, "TargetWidth", (float)d3d->width); - (*d3dintf->effect.set_float)(curr_effect, "TargetHeight", (float)d3d->height); - } - - float time_params[2] = { poly->line_time, options->vector_time_scale }; - float length_params[3] = { poly->line_length, options->vector_length_scale, options->vector_length_ratio }; - (*d3dintf->effect.set_vector)(curr_effect, "TimeParams", 2, time_params); - (*d3dintf->effect.set_vector)(curr_effect, "LengthParams", 3, length_params); - - (*d3dintf->effect.begin)(curr_effect, &num_passes, 0); - - HRESULT result = (*d3dintf->device.set_render_target)(d3d->device, 0, rt->target[0]); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); - - for (UINT pass = 0; pass < num_passes; pass++) - { - (*d3dintf->effect.begin_pass)(curr_effect, pass); - // add the primitives - HRESULT result = (*d3dintf->device.draw_primitive)(d3d->device, poly->type, vertnum, poly->count); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); - (*d3dintf->effect.end_pass)(curr_effect); - } - - (*d3dintf->effect.end)(curr_effect); - result = (*d3dintf->device.set_render_target)(d3d->device, 0, backbuffer); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); - - curr_effect = effect; - - (*d3dintf->effect.set_float)(curr_effect, "FixedAlpha", 1.0f); - } - else if (PRIMFLAG_GET_VECTORBUF(poly->flags) && vector_enable) - { - //if (!lines_pending) - //return; - //lines_pending = false; - - d3d_info *d3d = (d3d_info *)window->drawdata; - - d3d_render_target *rt = find_render_target(d3d->width, d3d->height, 0, 0); - if (rt == NULL) - { - return; - } - - /* Bloom */ - curr_effect = downsample_effect; - - (*d3dintf->effect.set_texture)(curr_effect, "Diffuse", rt->texture[0]); - - int bloom_size = (d3d->width < d3d->height) ? d3d->width : d3d->height; - int bloom_index = 0; - int bloom_width = d3d->width; - int bloom_height = d3d->height; - for(; bloom_size >= 2 && bloom_index < 11; bloom_size >>= 1) - { - float source_size[2] = { bloom_width, bloom_height }; - float target_size[2] = { bloom_width >> 1, bloom_height >> 1 }; - (*d3dintf->effect.set_vector)(curr_effect, "TargetSize", 2, target_size); - (*d3dintf->effect.set_vector)(curr_effect, "SourceSize", 2, source_size); - - (*d3dintf->effect.begin)(curr_effect, &num_passes, 0); - - (*d3dintf->effect.set_texture)(curr_effect, "Diffuse", (bloom_index == 0) ? rt->texture[0] : rt->bloom_texture[bloom_index - 1]); - - HRESULT result = (*d3dintf->device.set_render_target)(d3d->device, 0, rt->bloom_target[bloom_index]); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call 6\n", (int)result); - //result = (*d3dintf->device.clear)(d3d->device, 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,0), 0, 0); - //if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); - - for (UINT pass = 0; pass < num_passes; pass++) - { - (*d3dintf->effect.begin_pass)(curr_effect, pass); - // add the primitives - result = (*d3dintf->device.draw_primitive)(d3d->device, poly->type, vertnum, poly->count); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); - (*d3dintf->effect.end_pass)(curr_effect); - } - - (*d3dintf->effect.end)(curr_effect); - - bloom_index++; - bloom_width >>= 1; - bloom_height >>= 1; - } - - /* Bloom composite pass*/ - curr_effect = bloom_effect; - - float target_size[2] = { d3d->width, d3d->height }; - (*d3dintf->effect.set_vector)(curr_effect, "TargetSize", 2, target_size); - - (*d3dintf->effect.set_texture)(curr_effect, "DiffuseA", rt->texture[0]); - (*d3dintf->effect.set_float)(curr_effect, "DiffuseScaleA", 1.0f); - - char name[9] = "Diffuse*"; - char scale[14] = "DiffuseScale*"; - for(int index = 1; index < bloom_index; index++) - { - name[7] = 'A' + index; - scale[12] = 'A' + index; - (*d3dintf->effect.set_texture)(curr_effect, name, rt->bloom_texture[index - 1]); - (*d3dintf->effect.set_float)(curr_effect, scale, 1.0f); - } - for(int index = bloom_index; index < 11; index++) - { - name[7] = 'A' + index; - scale[12] = 'A' + index; - (*d3dintf->effect.set_texture)(curr_effect, name, black_texture); - (*d3dintf->effect.set_float)(curr_effect, scale, 0.0f); - } - - (*d3dintf->effect.begin)(curr_effect, &num_passes, 0); - - HRESULT result = (*d3dintf->device.set_render_target)(d3d->device, 0, rt->target[1]); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call 6\n", (int)result); - //result = (*d3dintf->device.clear)(d3d->device, 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,0), 0, 0); - //if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); - - for (UINT pass = 0; pass < num_passes; pass++) - { - (*d3dintf->effect.begin_pass)(curr_effect, pass); - // add the primitives - result = (*d3dintf->device.draw_primitive)(d3d->device, poly->type, vertnum, poly->count); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); - (*d3dintf->effect.end_pass)(curr_effect); - } - - (*d3dintf->effect.end)(curr_effect); + else if(PRIMFLAG_GET_VECTOR(poly->flags) && vector_enable) + { + d3d_render_target *rt = find_render_target(d3d->width, d3d->height, 0, 0); + if (rt == NULL) + { + return; + } + + lines_pending = true; + + curr_effect = vector_effect; + //curr_effect = effect; + + if(options->params_dirty) + { + (*d3dintf->effect.set_float)(curr_effect, "TargetWidth", (float)d3d->width); + (*d3dintf->effect.set_float)(curr_effect, "TargetHeight", (float)d3d->height); + } + + float time_params[2] = { poly->line_time, options->vector_time_scale }; + float length_params[3] = { poly->line_length, options->vector_length_scale, options->vector_length_ratio }; + (*d3dintf->effect.set_vector)(curr_effect, "TimeParams", 2, time_params); + (*d3dintf->effect.set_vector)(curr_effect, "LengthParams", 3, length_params); + + (*d3dintf->effect.begin)(curr_effect, &num_passes, 0); + + HRESULT result = (*d3dintf->device.set_render_target)(d3d->device, 0, rt->target[0]); + if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); + + for (UINT pass = 0; pass < num_passes; pass++) + { + (*d3dintf->effect.begin_pass)(curr_effect, pass); + // add the primitives + HRESULT result = (*d3dintf->device.draw_primitive)(d3d->device, poly->type, vertnum, poly->count); + if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + (*d3dintf->effect.end_pass)(curr_effect); + } + + (*d3dintf->effect.end)(curr_effect); + result = (*d3dintf->device.set_render_target)(d3d->device, 0, backbuffer); + if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); + + curr_effect = effect; + + (*d3dintf->effect.set_float)(curr_effect, "FixedAlpha", 1.0f); + } + else if (PRIMFLAG_GET_VECTORBUF(poly->flags) && vector_enable) + { + //if (!lines_pending) + //return; + //lines_pending = false; + + d3d_info *d3d = (d3d_info *)window->drawdata; + + d3d_render_target *rt = find_render_target(d3d->width, d3d->height, 0, 0); + if (rt == NULL) + { + return; + } + + /* Bloom */ + curr_effect = downsample_effect; + + (*d3dintf->effect.set_texture)(curr_effect, "Diffuse", rt->texture[0]); + + int bloom_size = (d3d->width < d3d->height) ? d3d->width : d3d->height; + int bloom_index = 0; + int bloom_width = d3d->width; + int bloom_height = d3d->height; + for(; bloom_size >= 2 && bloom_index < 11; bloom_size >>= 1) + { + float source_size[2] = { bloom_width, bloom_height }; + float target_size[2] = { bloom_width >> 1, bloom_height >> 1 }; + (*d3dintf->effect.set_vector)(curr_effect, "TargetSize", 2, target_size); + (*d3dintf->effect.set_vector)(curr_effect, "SourceSize", 2, source_size); + + (*d3dintf->effect.begin)(curr_effect, &num_passes, 0); + + (*d3dintf->effect.set_texture)(curr_effect, "Diffuse", (bloom_index == 0) ? rt->texture[0] : rt->bloom_texture[bloom_index - 1]); + + HRESULT result = (*d3dintf->device.set_render_target)(d3d->device, 0, rt->bloom_target[bloom_index]); + if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call 6\n", (int)result); + //result = (*d3dintf->device.clear)(d3d->device, 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,0), 0, 0); + //if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); + + for (UINT pass = 0; pass < num_passes; pass++) + { + (*d3dintf->effect.begin_pass)(curr_effect, pass); + // add the primitives + result = (*d3dintf->device.draw_primitive)(d3d->device, poly->type, vertnum, poly->count); + if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + (*d3dintf->effect.end_pass)(curr_effect); + } + + (*d3dintf->effect.end)(curr_effect); + + bloom_index++; + bloom_width >>= 1; + bloom_height >>= 1; + } + + /* Bloom composite pass*/ + curr_effect = bloom_effect; + + float target_size[2] = { d3d->width, d3d->height }; + (*d3dintf->effect.set_vector)(curr_effect, "TargetSize", 2, target_size); + + (*d3dintf->effect.set_texture)(curr_effect, "DiffuseA", rt->texture[0]); + (*d3dintf->effect.set_float)(curr_effect, "DiffuseScaleA", 1.0f); + + char name[9] = "Diffuse*"; + char scale[14] = "DiffuseScale*"; + for(int index = 1; index < bloom_index; index++) + { + name[7] = 'A' + index; + scale[12] = 'A' + index; + (*d3dintf->effect.set_texture)(curr_effect, name, rt->bloom_texture[index - 1]); + (*d3dintf->effect.set_float)(curr_effect, scale, 1.0f); + } + for(int index = bloom_index; index < 11; index++) + { + name[7] = 'A' + index; + scale[12] = 'A' + index; + (*d3dintf->effect.set_texture)(curr_effect, name, black_texture); + (*d3dintf->effect.set_float)(curr_effect, scale, 0.0f); + } + + (*d3dintf->effect.begin)(curr_effect, &num_passes, 0); + + HRESULT result = (*d3dintf->device.set_render_target)(d3d->device, 0, rt->target[1]); + if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call 6\n", (int)result); + //result = (*d3dintf->device.clear)(d3d->device, 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,0), 0, 0); + //if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); + + for (UINT pass = 0; pass < num_passes; pass++) + { + (*d3dintf->effect.begin_pass)(curr_effect, pass); + // add the primitives + result = (*d3dintf->device.draw_primitive)(d3d->device, poly->type, vertnum, poly->count); + if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + (*d3dintf->effect.end_pass)(curr_effect); + } + + (*d3dintf->effect.end)(curr_effect); /* Phosphor */ curr_effect = phosphor_effect; @@ -2359,51 +2359,51 @@ void hlsl_info::render_quad(d3d_poly_info *poly, int vertnum) (*d3dintf->effect.end)(curr_effect); - //curr_effect = effect; + //curr_effect = effect; - //blit(backbuffer, rt->bloom_texture[5], NULL, poly->type, vertnum, poly->count); - //blit(rt->target[2], rt->texture[0], NULL, poly->type, vertnum, poly->count); - blit(backbuffer, rt->texture[0], NULL, poly->type, vertnum, poly->count); - //blit(backbuffer, rt->texture[0], NULL, poly->type, vertnum, poly->count); + //blit(backbuffer, rt->bloom_texture[5], NULL, poly->type, vertnum, poly->count); + //blit(rt->target[2], rt->texture[0], NULL, poly->type, vertnum, poly->count); + blit(backbuffer, rt->texture[0], NULL, poly->type, vertnum, poly->count); + //blit(backbuffer, rt->texture[0], NULL, poly->type, vertnum, poly->count); - result = (*d3dintf->device.set_render_target)(d3d->device, 0, rt->target[0]); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); - result = (*d3dintf->device.clear)(d3d->device, 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,0), 0, 0); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); - result = (*d3dintf->device.set_render_target)(d3d->device, 0, backbuffer); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); + result = (*d3dintf->device.set_render_target)(d3d->device, 0, rt->target[0]); + if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); + result = (*d3dintf->device.clear)(d3d->device, 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0,0,0,0), 0, 0); + if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device clear call\n", (int)result); + result = (*d3dintf->device.set_render_target)(d3d->device, 0, backbuffer); + if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); - /*curr_effect = post_effect; + /*curr_effect = post_effect; - (*d3dintf->effect.set_texture)(curr_effect, "Diffuse", rt->texture[0]); + (*d3dintf->effect.set_texture)(curr_effect, "Diffuse", rt->texture[0]); - (*d3dintf->effect.set_float)(curr_effect, "TargetWidth", (float)d3d->width); - (*d3dintf->effect.set_float)(curr_effect, "TargetHeight", (float)d3d->height); + (*d3dintf->effect.set_float)(curr_effect, "TargetWidth", (float)d3d->width); + (*d3dintf->effect.set_float)(curr_effect, "TargetHeight", (float)d3d->height); (*d3dintf->effect.set_float)(curr_effect, "RawWidth", (float)poly->texture->rawwidth); (*d3dintf->effect.set_float)(curr_effect, "RawHeight", (float)poly->texture->rawheight); (*d3dintf->effect.set_float)(curr_effect, "WidthRatio", 1.0f / (poly->texture->ustop - poly->texture->ustart)); (*d3dintf->effect.set_float)(curr_effect, "HeightRatio", 1.0f / (poly->texture->vstop - poly->texture->vstart)); - result = (*d3dintf->device.set_render_target)(d3d->device, 0, rt->target[1]); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); + result = (*d3dintf->device.set_render_target)(d3d->device, 0, rt->target[1]); + if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device set_render_target call\n", (int)result); - (*d3dintf->effect.begin)(curr_effect, &num_passes, 0); + (*d3dintf->effect.begin)(curr_effect, &num_passes, 0); - for (UINT pass = 0; pass < num_passes; pass++) - { - (*d3dintf->effect.begin_pass)(curr_effect, pass); - // add the primitives - result = (*d3dintf->device.draw_primitive)(d3d->device, poly->type, vertnum, poly->count); - if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); - (*d3dintf->effect.end_pass)(curr_effect); - } + for (UINT pass = 0; pass < num_passes; pass++) + { + (*d3dintf->effect.begin_pass)(curr_effect, pass); + // add the primitives + result = (*d3dintf->device.draw_primitive)(d3d->device, poly->type, vertnum, poly->count); + if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result); + (*d3dintf->effect.end_pass)(curr_effect); + } - (*d3dintf->effect.end)(curr_effect);*/ + (*d3dintf->effect.end)(curr_effect);*/ - vecbuf_type = poly->type; - vecbuf_index = vertnum; - vecbuf_count = poly->count; - } + vecbuf_type = poly->type; + vecbuf_index = vertnum; + vecbuf_count = poly->count; + } #endif else { @@ -2733,10 +2733,10 @@ void hlsl_info::delete_resources(bool reset) file.printf("yiq_q %f\n", options->yiq_q); file.printf("yiq_scan_time %f\n", options->yiq_scan_time); file.printf("yiq_phase_count %d\n", options->yiq_phase_count); - file.printf("vector_time_scale %f\n", options->vector_time_scale); - file.printf("vector_time_period %f\n", options->vector_time_period); - file.printf("vector_length_scale %f\n", options->vector_length_scale); - file.printf("vector_length_ratio %f\n", options->vector_length_ratio); + file.printf("vector_time_scale %f\n", options->vector_time_scale); + file.printf("vector_time_period %f\n", options->vector_time_period); + file.printf("vector_length_scale %f\n", options->vector_length_scale); + file.printf("vector_length_ratio %f\n", options->vector_length_ratio); } while (targethead != NULL) @@ -2745,16 +2745,16 @@ void hlsl_info::delete_resources(bool reset) } #if HLSL_VECTOR - if (downsample_effect != NULL) - { - (*d3dintf->effect.release)(downsample_effect); - downsample_effect = NULL; - } - if (bloom_effect != NULL) - { - (*d3dintf->effect.release)(bloom_effect); - bloom_effect = NULL; - } + if (downsample_effect != NULL) + { + (*d3dintf->effect.release)(downsample_effect); + downsample_effect = NULL; + } + if (bloom_effect != NULL) + { + (*d3dintf->effect.release)(bloom_effect); + bloom_effect = NULL; + } #endif if (effect != NULL) { @@ -2807,11 +2807,11 @@ void hlsl_info::delete_resources(bool reset) yiq_decode_effect = NULL; } - if (black_texture != NULL) - { - (*d3dintf->texture.release)(black_texture); - black_texture = NULL; - } + if (black_texture != NULL) + { + (*d3dintf->texture.release)(black_texture); + black_texture = NULL; + } if (avi_copy_texture != NULL) { diff --git a/src/osd/windows/d3dhlsl.h b/src/osd/windows/d3dhlsl.h index 7d508ddb2a1..25c6cf77077 100644 --- a/src/osd/windows/d3dhlsl.h +++ b/src/osd/windows/d3dhlsl.h @@ -48,7 +48,7 @@ // CONSTANTS //============================================================ -#define HLSL_VECTOR (0) +#define HLSL_VECTOR (0) //============================================================ // TYPE DEFINITIONS @@ -92,7 +92,7 @@ struct hlsl_options float phosphor[3]; float saturation; - // NTSC + // NTSC bool yiq_enable; float yiq_cc; float yiq_a; @@ -106,11 +106,11 @@ struct hlsl_options float yiq_scan_time; int yiq_phase_count; - // Vectors - float vector_time_scale; - float vector_time_period; - float vector_length_scale; - float vector_length_ratio; + // Vectors + float vector_time_scale; + float vector_time_period; + float vector_length_scale; + float vector_length_ratio; }; class hlsl_info @@ -150,7 +150,7 @@ public: void avi_update_snap(d3d_surface *surface); void render_snapshot(d3d_surface *surface); void record_texture(); - void init_fsfx_quad(void *vertbuf); + void init_fsfx_quad(void *vertbuf); void set_texture(d3d_texture_info *texture); d3d_render_target * find_render_target(d3d_texture_info *info); @@ -165,11 +165,11 @@ public: slider_state *init_slider_list(); private: - void blit(d3d_surface *dst, d3d_texture *src, d3d_surface *new_dst, - D3DPRIMITIVETYPE prim_type, UINT32 prim_index, UINT32 prim_count, - int dstw, int dsth); - void blit(d3d_surface *dst, d3d_texture *src, d3d_surface *new_dst, - D3DPRIMITIVETYPE prim_type, UINT32 prim_index, UINT32 prim_count); + void blit(d3d_surface *dst, d3d_texture *src, d3d_surface *new_dst, + D3DPRIMITIVETYPE prim_type, UINT32 prim_index, UINT32 prim_count, + int dstw, int dsth); + void blit(d3d_surface *dst, d3d_texture *src, d3d_surface *new_dst, + D3DPRIMITIVETYPE prim_type, UINT32 prim_index, UINT32 prim_count); void enumerate_screens(); void end_avi_recording(); @@ -201,9 +201,9 @@ private: bitmap_argb32 shadow_bitmap; // shadow mask bitmap for post-processing shader d3d_texture_info * shadow_texture; // shadow mask texture for post-processing shader hlsl_options * options; // current uniform state - D3DPRIMITIVETYPE vecbuf_type; - UINT32 vecbuf_index; - UINT32 vecbuf_count; + D3DPRIMITIVETYPE vecbuf_type; + UINT32 vecbuf_index; + UINT32 vecbuf_count; avi_file * avi_output_file; // AVI file bitmap_rgb32 avi_snap; // AVI snapshot @@ -215,8 +215,8 @@ private: d3d_surface * avi_final_target; // AVI upscaled surface d3d_texture * avi_final_texture; // AVI upscaled texture - d3d_surface * black_surface; // black dummy surface - d3d_texture * black_texture; // black dummy texture + d3d_surface * black_surface; // black dummy surface + d3d_texture * black_texture; // black dummy texture bool render_snap; // whether or not to take HLSL post-render snapshot bool snap_rendered; // whether we just rendered our HLSL post-render shot or not @@ -228,7 +228,7 @@ private: int snap_height; // snapshot height bool lines_pending; // whether or not we have lines to flush on the next quad - bool initialized; // whether or not we're initialize + bool initialized; // whether or not we're initialize // HLSL effects d3d_surface * backbuffer; // pointer to our device's backbuffer @@ -244,8 +244,8 @@ private: d3d_effect * yiq_encode_effect; // pointer to the YIQ encoder effect object d3d_effect * yiq_decode_effect; // pointer to the YIQ decoder effect object #if HLSL_VECTOR - d3d_effect * bloom_effect; // pointer to the bloom composite effect - d3d_effect * downsample_effect; // pointer to the bloom downsample effect + d3d_effect * bloom_effect; // pointer to the bloom composite effect + d3d_effect * downsample_effect; // pointer to the bloom downsample effect d3d_effect * vector_effect; // pointer to the vector-effect object #endif d3d_vertex * fsfx_vertices; // pointer to our full-screen-quad object diff --git a/src/osd/windows/drawd3d.c b/src/osd/windows/drawd3d.c index c103c67eca7..d87dc5fd2c0 100644 --- a/src/osd/windows/drawd3d.c +++ b/src/osd/windows/drawd3d.c @@ -625,46 +625,46 @@ mtlog_add("drawd3d_window_draw: begin_scene"); d3d->lockedbuf = NULL; - // loop over primitives - if(d3d->hlsl->enabled()) - { - d3d->hlsl_buf = (void*)primitive_alloc(d3d, 6); - d3d->hlsl->init_fsfx_quad(d3d->hlsl_buf); - } + // loop over primitives + if(d3d->hlsl->enabled()) + { + d3d->hlsl_buf = (void*)primitive_alloc(d3d, 6); + d3d->hlsl->init_fsfx_quad(d3d->hlsl_buf); + } mtlog_add("drawd3d_window_draw: count lines"); - int line_count = 0; - for (prim = window->primlist->first(); prim != NULL; prim = prim->next()) - if (prim->type == render_primitive::LINE && PRIMFLAG_GET_VECTOR(prim->flags)) - line_count++; + int line_count = 0; + for (prim = window->primlist->first(); prim != NULL; prim = prim->next()) + if (prim->type == render_primitive::LINE && PRIMFLAG_GET_VECTOR(prim->flags)) + line_count++; mtlog_add("drawd3d_window_draw: primitive loop begin"); - // Rotating index for vector time offsets - static int start_index = 0; - int line_index = 0; - windows_options &options = downcast(window->machine().options()); - float period = options.screen_vector_time_period(); + // Rotating index for vector time offsets + static int start_index = 0; + int line_index = 0; + windows_options &options = downcast(window->machine().options()); + float period = options.screen_vector_time_period(); for (prim = window->primlist->first(); prim != NULL; prim = prim->next()) - { + { switch (prim->type) { case render_primitive::LINE: - if (PRIMFLAG_GET_VECTOR(prim->flags)) - { - if (period == 0.0f || line_count == 0) - { - draw_line(d3d, prim, 1.0f); - } - else - { - draw_line(d3d, prim, (float)(start_index + line_index) / ((float)line_count * period)); - line_index++; - } - } - else - { - draw_line(d3d, prim, 0.0f); - } + if (PRIMFLAG_GET_VECTOR(prim->flags)) + { + if (period == 0.0f || line_count == 0) + { + draw_line(d3d, prim, 1.0f); + } + else + { + draw_line(d3d, prim, (float)(start_index + line_index) / ((float)line_count * period)); + line_index++; + } + } + else + { + draw_line(d3d, prim, 0.0f); + } break; case render_primitive::QUAD: @@ -674,12 +674,12 @@ mtlog_add("drawd3d_window_draw: primitive loop begin"); default: throw emu_fatalerror("Unexpected render_primitive type"); } - } - start_index += (int)((float)line_index * period); - if (line_count > 0) - { - start_index %= line_count; - } + } + start_index += (int)((float)line_index * period); + if (line_count > 0) + { + start_index %= line_count; + } mtlog_add("drawd3d_window_draw: primitive loop end"); window->primlist->release_lock(); @@ -1580,22 +1580,22 @@ static void draw_line(d3d_info *d3d, const render_primitive *prim, float line_ti poly->flags = prim->flags; poly->modmode = D3DTOP_MODULATE; poly->texture = d3d->vector_texture; - poly->line_time = line_time; - poly->line_length = 1.0f; - if (PRIMFLAG_GET_VECTOR(poly->flags)) - { - float dx = fabs(prim->bounds.x1 - prim->bounds.x0); - float dy = fabs(prim->bounds.y1 - prim->bounds.y0); - float length2 = dx * dx + dy * dy; - if (length2 > 0.0f) - { - poly->line_length = sqrt(length2); - } - else - { - // use default length of 1.0f from above - } - } + poly->line_time = line_time; + poly->line_length = 1.0f; + if (PRIMFLAG_GET_VECTOR(poly->flags)) + { + float dx = fabs(prim->bounds.x1 - prim->bounds.x0); + float dy = fabs(prim->bounds.y1 - prim->bounds.y0); + float length2 = dx * dx + dy * dy; + if (length2 > 0.0f) + { + poly->line_length = sqrt(length2); + } + else + { + // use default length of 1.0f from above + } + } } } @@ -1690,7 +1690,7 @@ static void draw_quad(d3d_info *d3d, const render_primitive *prim) poly->flags = prim->flags; poly->modmode = modmode; poly->texture = texture; - //poly-> + //poly-> } @@ -1759,14 +1759,14 @@ static void primitive_flush_pending(d3d_info *d3d) d3d->hlsl->begin_draw(); - if (d3d->hlsl->enabled()) - { - vertnum = 6; - } - else - { - vertnum = 0; - } + if (d3d->hlsl->enabled()) + { + vertnum = 6; + } + else + { + vertnum = 0; + } // now do the polys for (polynum = 0; polynum < d3d->numpolys; polynum++) @@ -2718,19 +2718,19 @@ static void texture_update(d3d_info *d3d, const render_primitive *prim) d3d_cache_target::~d3d_cache_target() { - for (int index = 0; index < 11; index++) - { - if (bloom_texture[index] != NULL) - { - (*d3dintf->texture.release)(bloom_texture[index]); - bloom_texture[index] = NULL; - } - if (bloom_target[index] != NULL) - { - (*d3dintf->surface.release)(bloom_target[index]); - bloom_target[index] = NULL; - } - } + for (int index = 0; index < 11; index++) + { + if (bloom_texture[index] != NULL) + { + (*d3dintf->texture.release)(bloom_texture[index]); + bloom_texture[index] = NULL; + } + if (bloom_target[index] != NULL) + { + (*d3dintf->surface.release)(bloom_target[index]); + bloom_target[index] = NULL; + } + } if (last_texture != NULL) { @@ -2751,33 +2751,33 @@ d3d_cache_target::~d3d_cache_target() bool d3d_cache_target::init(d3d_info *d3d, d3d_base *d3dintf, int width, int height, int prescale_x, int prescale_y, bool bloom) { - if (bloom) - { - int bloom_size = (width * prescale_x < height * prescale_y) ? width * prescale_x : height * prescale_y; - int bloom_index = 0; - int bloom_width = width * prescale_x; - int bloom_height = height * prescale_y; - for (; bloom_size >= 2 && bloom_index < 11; bloom_size >>= 1) - { - bloom_width >>= 1; - bloom_height >>= 1; - HRESULT result = (*d3dintf->device.create_texture)(d3d->device, bloom_width, bloom_height, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &bloom_texture[bloom_index]); - if (result != D3D_OK) - { - return false; - } - (*d3dintf->texture.get_surface_level)(bloom_texture[bloom_index], 0, &bloom_target[bloom_index]); - bloom_index++; - } - } + if (bloom) + { + int bloom_size = (width * prescale_x < height * prescale_y) ? width * prescale_x : height * prescale_y; + int bloom_index = 0; + int bloom_width = width * prescale_x; + int bloom_height = height * prescale_y; + for (; bloom_size >= 2 && bloom_index < 11; bloom_size >>= 1) + { + bloom_width >>= 1; + bloom_height >>= 1; + HRESULT result = (*d3dintf->device.create_texture)(d3d->device, bloom_width, bloom_height, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &bloom_texture[bloom_index]); + if (result != D3D_OK) + { + return false; + } + (*d3dintf->texture.get_surface_level)(bloom_texture[bloom_index], 0, &bloom_target[bloom_index]); + bloom_index++; + } + } HRESULT result = (*d3dintf->device.create_texture)(d3d->device, width * prescale_x, height * prescale_y, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &last_texture); if (result != D3D_OK) return false; (*d3dintf->texture.get_surface_level)(last_texture, 0, &last_target); - target_width = width * prescale_x; - target_height = height * prescale_y; + target_width = width * prescale_x; + target_height = height * prescale_y; return true; } @@ -2788,19 +2788,19 @@ bool d3d_cache_target::init(d3d_info *d3d, d3d_base *d3dintf, int width, int hei d3d_render_target::~d3d_render_target() { - for (int index = 0; index < 11; index++) - { - if (bloom_texture[index] != NULL) - { - (*d3dintf->texture.release)(bloom_texture[index]); - bloom_texture[index] = NULL; - } - if (bloom_target[index] != NULL) - { - (*d3dintf->surface.release)(bloom_target[index]); - bloom_target[index] = NULL; - } - } + for (int index = 0; index < 11; index++) + { + if (bloom_texture[index] != NULL) + { + (*d3dintf->texture.release)(bloom_texture[index]); + bloom_texture[index] = NULL; + } + if (bloom_target[index] != NULL) + { + (*d3dintf->surface.release)(bloom_target[index]); + bloom_target[index] = NULL; + } + } for (int index = 0; index < 5; index++) { @@ -2885,29 +2885,29 @@ bool d3d_render_target::init(d3d_info *d3d, d3d_base *d3dintf, int width, int he return false; (*d3dintf->texture.get_surface_level)(prescaletexture, 0, &prescaletarget); - for (int index = 0; index < 11; index++) - { - bloom_texture[index] = NULL; - bloom_target[index] = NULL; - } + for (int index = 0; index < 11; index++) + { + bloom_texture[index] = NULL; + bloom_target[index] = NULL; + } } else - { - int bloom_size = (width < height) ? width : height; - int bloom_index = 0; - int bloom_width = width; - int bloom_height = height; - for (; bloom_size >= 2 && bloom_index < 11; bloom_size >>= 1) - { - bloom_width >>= 1; - bloom_height >>= 1; - result = (*d3dintf->device.create_texture)(d3d->device, bloom_width, bloom_height, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &bloom_texture[bloom_index]); - if (result != D3D_OK) - return false; - (*d3dintf->texture.get_surface_level)(bloom_texture[bloom_index], 0, &bloom_target[bloom_index]); - bloom_index++; - } - } + { + int bloom_size = (width < height) ? width : height; + int bloom_index = 0; + int bloom_width = width; + int bloom_height = height; + for (; bloom_size >= 2 && bloom_index < 11; bloom_size >>= 1) + { + bloom_width >>= 1; + bloom_height >>= 1; + result = (*d3dintf->device.create_texture)(d3d->device, bloom_width, bloom_height, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &bloom_texture[bloom_index]); + if (result != D3D_OK) + return false; + (*d3dintf->texture.get_surface_level)(bloom_texture[bloom_index], 0, &bloom_target[bloom_index]); + bloom_index++; + } + } target_width = width * prescale_x; target_height = height * prescale_y; diff --git a/src/osd/windows/drawd3d.h b/src/osd/windows/drawd3d.h index 7cca9fee099..a4e3ef40c19 100644 --- a/src/osd/windows/drawd3d.h +++ b/src/osd/windows/drawd3d.h @@ -72,8 +72,8 @@ public: d3d_surface *last_target; d3d_texture *last_texture; - int target_width; - int target_height; + int target_width; + int target_height; int width; int height; @@ -83,8 +83,8 @@ public: d3d_cache_target *next; d3d_cache_target *prev; - d3d_surface *bloom_target[11]; - d3d_texture *bloom_texture[11]; + d3d_surface *bloom_target[11]; + d3d_texture *bloom_texture[11]; }; /* d3d_render_target is the information about a Direct3D render target chain */ @@ -116,8 +116,8 @@ public: d3d_render_target *next; d3d_render_target *prev; - d3d_surface *bloom_target[11]; - d3d_texture *bloom_texture[11]; + d3d_surface *bloom_target[11]; + d3d_texture *bloom_texture[11]; }; /* d3d_info is the information about Direct3D for the current screen */ @@ -143,7 +143,7 @@ struct d3d_info d3d_poly_info poly[VERTEX_BUFFER_SIZE/3]; // array to hold polygons as they are created int numpolys; // number of accumulated polygons - bool restarting; // if we're restarting + bool restarting; // if we're restarting d3d_texture_info * texlist; // list of active textures int dynamic_supported; // are dynamic textures supported? diff --git a/src/osd/windows/winmain.c b/src/osd/windows/winmain.c index 58e0232ca07..902290fa687 100644 --- a/src/osd/windows/winmain.c +++ b/src/osd/windows/winmain.c @@ -375,7 +375,7 @@ const options_entry windows_options::s_option_entries[] = { WINOPTION_FLOOR";fs_floor", "0.0,0.0,0.0",OPTION_STRING, "signal floor level" }, { WINOPTION_PHOSPHOR";fs_phosphor", "0.0,0.0,0.0",OPTION_STRING, "phosphorescence decay rate (0.0 is instant, 1.0 is forever)" }, /* NTSC simulation below this line */ - { NULL, NULL, OPTION_HEADER, "NTSC POST-PROCESSING OPTIONS" }, + { NULL, NULL, OPTION_HEADER, "NTSC POST-PROCESSING OPTIONS" }, { WINOPTION_YIQ_ENABLE";yiq", "0", OPTION_BOOLEAN, "enable YIQ-space HLSL post-processing" }, { WINOPTION_YIQ_CCVALUE";yiqcc", "3.59754545",OPTION_FLOAT, "Color Carrier frequency for NTSC signal processing" }, { WINOPTION_YIQ_AVALUE";yiqa", "0.5", OPTION_FLOAT, "A value for NTSC signal processing" }, @@ -388,14 +388,14 @@ const options_entry windows_options::s_option_entries[] = { WINOPTION_YIQ_QVALUE";yiqq", "0.6", OPTION_FLOAT, "Q filter cutoff frequency for NTSC signal processing" }, { WINOPTION_YIQ_SCAN_TIME";yiqsc", "52.6", OPTION_FLOAT, "Horizontal scanline duration for NTSC signal processing (in usec)" }, { WINOPTION_YIQ_PHASE_COUNT";yiqp", "2", OPTION_INTEGER, "Phase Count value for NTSC signal processing" }, - { WINOPTION_YIQ_SCAN_TIME";yiqsc", "52.6", OPTION_FLOAT, "Horizontal scanline duration for NTSC signal processing (in usec)" }, - { WINOPTION_YIQ_PHASE_COUNT";yiqp", "2", OPTION_INTEGER, "Phase Count value for NTSC signal processing" }, - /* Vector simulation below this line */ - { NULL, NULL, OPTION_HEADER, "VECTOR POST-PROCESSING OPTIONS" }, - { WINOPTION_VECTOR_TIME_SCALE";vectime", "0.0", OPTION_FLOAT, "How much the fade rate affects vector fade" }, - { WINOPTION_VECTOR_TIME_PERIOD";vecperiod", "0.1", OPTION_FLOAT, "Vector fade rate versus screen refresh rate" }, - { WINOPTION_VECTOR_LENGTH_SCALE";veclength", "0.9", OPTION_FLOAT, "How much length affects vector fade" }, - { WINOPTION_VECTOR_LENGTH_RATIO";vecsize", "4.0", OPTION_FLOAT, "Vector fade length (4.0 - vectors fade the most at and above 4 pixels, etc.)" }, + { WINOPTION_YIQ_SCAN_TIME";yiqsc", "52.6", OPTION_FLOAT, "Horizontal scanline duration for NTSC signal processing (in usec)" }, + { WINOPTION_YIQ_PHASE_COUNT";yiqp", "2", OPTION_INTEGER, "Phase Count value for NTSC signal processing" }, + /* Vector simulation below this line */ + { NULL, NULL, OPTION_HEADER, "VECTOR POST-PROCESSING OPTIONS" }, + { WINOPTION_VECTOR_TIME_SCALE";vectime", "0.0", OPTION_FLOAT, "How much the fade rate affects vector fade" }, + { WINOPTION_VECTOR_TIME_PERIOD";vecperiod", "0.1", OPTION_FLOAT, "Vector fade rate versus screen refresh rate" }, + { WINOPTION_VECTOR_LENGTH_SCALE";veclength", "0.9", OPTION_FLOAT, "How much length affects vector fade" }, + { WINOPTION_VECTOR_LENGTH_RATIO";vecsize", "4.0", OPTION_FLOAT, "Vector fade length (4.0 - vectors fade the most at and above 4 pixels, etc.)" }, // per-window options { NULL, NULL, OPTION_HEADER, "PER-WINDOW VIDEO OPTIONS" }, diff --git a/src/osd/windows/winmain.h b/src/osd/windows/winmain.h index 167ca9ec476..eb3b234643e 100644 --- a/src/osd/windows/winmain.h +++ b/src/osd/windows/winmain.h @@ -1,4 +1,4 @@ - //============================================================ + //============================================================ // // winmain.h - Win32 main program and core headers // @@ -243,10 +243,10 @@ public: float screen_yiq_q() const { return float_value(WINOPTION_YIQ_QVALUE); } float screen_yiq_scan_time() const { return float_value(WINOPTION_YIQ_SCAN_TIME); } int screen_yiq_phase_count() const { return int_value(WINOPTION_YIQ_PHASE_COUNT); } - float screen_vector_time_scale() const { return float_value(WINOPTION_VECTOR_TIME_SCALE); } - float screen_vector_time_period() const { return float_value(WINOPTION_VECTOR_TIME_PERIOD); } - float screen_vector_length_scale() const { return float_value(WINOPTION_VECTOR_LENGTH_SCALE); } - float screen_vector_length_ratio() const { return float_value(WINOPTION_VECTOR_LENGTH_RATIO); } + float screen_vector_time_scale() const { return float_value(WINOPTION_VECTOR_TIME_SCALE); } + float screen_vector_time_period() const { return float_value(WINOPTION_VECTOR_TIME_PERIOD); } + float screen_vector_length_scale() const { return float_value(WINOPTION_VECTOR_LENGTH_SCALE); } + float screen_vector_length_ratio() const { return float_value(WINOPTION_VECTOR_LENGTH_RATIO); } const char *screen_offset() const { return value(WINOPTION_OFFSET); } const char *screen_scale() const { return value(WINOPTION_SCALE); } const char *screen_power() const { return value(WINOPTION_POWER); } diff --git a/src/osd/windows/winsocket.c b/src/osd/windows/winsocket.c index d5ebaafc2d4..90eeeb26e9a 100644 --- a/src/osd/windows/winsocket.c +++ b/src/osd/windows/winsocket.c @@ -43,7 +43,7 @@ bool win_init_sockets() /* check for correct version */ if ( LOBYTE( wsaData.wVersion ) != 2 || - HIBYTE( wsaData.wVersion ) != 0 ) + HIBYTE( wsaData.wVersion ) != 0 ) { /* incorrect WinSock version */ WSACleanup(); @@ -95,25 +95,25 @@ file_error win_open_socket(const char *path, UINT32 openflags, osd_file **file, // listening socket support if (openflags & OPEN_FLAG_CREATE) { -// printf("Listening for client at '%s' on port '%d'\n", hostname, port); +// printf("Listening for client at '%s' on port '%d'\n", hostname, port); // bind socket... if (bind((*file)->socket, (struct sockaddr *)&sai, sizeof(struct sockaddr)) == -1) { return FILERR_ACCESS_DENIED; } - + // start to listen... if (listen((*file)->socket, 1) == -1) { return FILERR_ACCESS_DENIED; } - + // mark socket as "listening" (*file)->handle = 0; *filesize = 0; return FILERR_NONE; } - -// printf("Connecting to server '%s' on port '%d'\n", hostname, port); + +// printf("Connecting to server '%s' on port '%d'\n", hostname, port); if (connect((*file)->socket, (struct sockaddr *)&sai, sizeof(struct sockaddr)) == -1) { return FILERR_ACCESS_DENIED; diff --git a/src/version.c b/src/version.c index d1e1fbd49a1..494be9582ac 100644 --- a/src/version.c +++ b/src/version.c @@ -38,4 +38,4 @@ ***************************************************************************/ extern const char build_version[]; -const char build_version[] = "0.148 ("__DATE__")"; +const char build_version[] = "0.148u1 ("__DATE__")"; -- cgit v1.2.3