├── .gitignore ├── .gitlab-ci.yml ├── .travis.yml ├── compile_libretro.sh ├── docs ├── COPYING └── license.txt └── svn-current ├── readme.textile └── trunk ├── fba.chm ├── fbahelpfilesrc ├── Log1.log ├── Table of Contents.hhc ├── acknowledgments.htm ├── cheat_format.htm ├── command.htm ├── dialog_cheats.htm ├── dialog_dips.htm ├── dialog_game_select.htm ├── dialog_inputs.htm ├── dialog_ips_manager.htm ├── dialog_multislot.htm ├── dialog_neocdz.htm ├── dialog_rom_paths.htm ├── dialog_shot_factory.htm ├── dialog_support_path.htm ├── fba.chm ├── fba.hhk ├── fba.hhp ├── images │ ├── misc.bmp │ ├── tv not found non essential.ico │ ├── tv not found.ico │ └── tv not working.ico ├── intro.htm ├── keys.htm ├── localise_app.htm ├── localise_gamelist.htm ├── menu_audio.htm ├── menu_game.htm ├── menu_help.htm ├── menu_input.htm ├── menu_misc.htm ├── menu_video.htm ├── presets.htm └── sysreq.htm ├── gamelist-gx.txt ├── gamelist.txt ├── makefile.burn_rules ├── makefile.libretro ├── preset-example.zip ├── projectfiles └── libretro-android │ └── jni │ ├── Android.mk │ └── Application.mk ├── src ├── burn │ ├── bitswap.h │ ├── burn.cpp │ ├── burn.h │ ├── burn_gun.cpp │ ├── burn_gun.h │ ├── burn_led.cpp │ ├── burn_led.h │ ├── burn_memory.cpp │ ├── burn_sound.cpp │ ├── burn_sound.h │ ├── burn_sound_a.asm │ ├── burn_sound_c.cpp │ ├── burn_vector.cpp │ ├── burn_vector.h │ ├── burnint.h │ ├── cheat.cpp │ ├── cheat.h │ ├── debug_track.cpp │ ├── devices │ │ ├── 8255ppi.cpp │ │ ├── 8255ppi.h │ │ ├── 8257dma.cpp │ │ ├── 8257dma.h │ │ ├── eeprom.cpp │ │ ├── eeprom.h │ │ ├── joyprocess.cpp │ │ ├── joyprocess.h │ │ ├── pandora.cpp │ │ ├── pandora.h │ │ ├── seibusnd.cpp │ │ ├── seibusnd.h │ │ ├── sknsspr.cpp │ │ ├── sknsspr.h │ │ ├── slapstic.cpp │ │ ├── slapstic.h │ │ ├── timekpr.cpp │ │ ├── timekpr.h │ │ ├── v3021.cpp │ │ ├── v3021.h │ │ ├── vdc.cpp │ │ └── vdc.h │ ├── driver.h │ ├── drv │ │ ├── capcom │ │ │ ├── cps.cpp │ │ │ ├── cps.h │ │ │ ├── cps2_crpt.cpp │ │ │ ├── cps_config.cpp │ │ │ ├── cps_draw.cpp │ │ │ ├── cps_mem.cpp │ │ │ ├── cps_obj.cpp │ │ │ ├── cps_pal.cpp │ │ │ ├── cps_run.cpp │ │ │ ├── cps_rw.cpp │ │ │ ├── cps_scr.cpp │ │ │ ├── cpsr.cpp │ │ │ ├── cpsrd.cpp │ │ │ ├── cpst.cpp │ │ │ ├── ctv.cpp │ │ │ ├── ctv_do.h │ │ │ ├── ctv_make.cpp │ │ │ ├── d_cps1.cpp │ │ │ ├── d_cps2.cpp │ │ │ ├── fcrash_snd.cpp │ │ │ ├── kabuki.cpp │ │ │ ├── ps.cpp │ │ │ ├── ps_m.cpp │ │ │ ├── ps_z.cpp │ │ │ ├── qs.cpp │ │ │ ├── qs_c.cpp │ │ │ ├── qs_z.cpp │ │ │ └── sf2mdt_snd.cpp │ │ ├── cave │ │ │ ├── cave.cpp │ │ │ ├── cave.h │ │ │ ├── cave_palette.cpp │ │ │ ├── cave_sprite.cpp │ │ │ ├── cave_sprite_render.h │ │ │ ├── cave_sprite_render_zoom.h │ │ │ ├── cave_tile.cpp │ │ │ ├── cave_tile_render.h │ │ │ ├── d_dodonpachi.cpp │ │ │ ├── d_donpachi.cpp │ │ │ ├── d_esprade.cpp │ │ │ ├── d_feversos.cpp │ │ │ ├── d_gaia.cpp │ │ │ ├── d_guwange.cpp │ │ │ ├── d_hotdogst.cpp │ │ │ ├── d_korokoro.cpp │ │ │ ├── d_mazinger.cpp │ │ │ ├── d_metmqstr.cpp │ │ │ ├── d_pwrinst2.cpp │ │ │ ├── d_sailormn.cpp │ │ │ ├── d_tjumpman.cpp │ │ │ └── d_uopoko.cpp │ │ ├── cps3 │ │ │ ├── cps3.h │ │ │ ├── cps3run.cpp │ │ │ ├── cps3snd.cpp │ │ │ └── d_cps3.cpp │ │ ├── d_parent.cpp │ │ ├── dataeast │ │ │ ├── d_actfancr.cpp │ │ │ ├── d_backfire.cpp │ │ │ ├── d_boogwing.cpp │ │ │ ├── d_cbuster.cpp │ │ │ ├── d_cninja.cpp │ │ │ ├── d_darkseal.cpp │ │ │ ├── d_dassault.cpp │ │ │ ├── d_dec0.cpp │ │ │ ├── d_dec8.cpp │ │ │ ├── d_dietgogo.cpp │ │ │ ├── d_funkyjet.cpp │ │ │ ├── d_karnov.cpp │ │ │ ├── d_lemmings.cpp │ │ │ ├── d_pktgaldx.cpp │ │ │ ├── d_rohga.cpp │ │ │ ├── d_sidepckt.cpp │ │ │ ├── d_simpl156.cpp │ │ │ ├── d_supbtime.cpp │ │ │ ├── d_tumblep.cpp │ │ │ ├── d_vaportra.cpp │ │ │ ├── deco16ic.cpp │ │ │ └── deco16ic.h │ │ ├── galaxian │ │ │ ├── d_galaxian.cpp │ │ │ ├── gal.h │ │ │ ├── gal_gfx.cpp │ │ │ ├── gal_run.cpp │ │ │ ├── gal_sound.cpp │ │ │ └── gal_stars.cpp │ │ ├── irem │ │ │ ├── d_m62.cpp │ │ │ ├── d_m63.cpp │ │ │ ├── d_m72.cpp │ │ │ ├── d_m90.cpp │ │ │ ├── d_m92.cpp │ │ │ ├── d_vigilant.cpp │ │ │ ├── irem_cpu.cpp │ │ │ └── irem_cpu.h │ │ ├── konami │ │ │ ├── d_88games.cpp │ │ │ ├── d_ajax.cpp │ │ │ ├── d_aliens.cpp │ │ │ ├── d_blockhl.cpp │ │ │ ├── d_bottom9.cpp │ │ │ ├── d_contra.cpp │ │ │ ├── d_crimfght.cpp │ │ │ ├── d_gberet.cpp │ │ │ ├── d_gbusters.cpp │ │ │ ├── d_gradius3.cpp │ │ │ ├── d_gyruss.cpp │ │ │ ├── d_hcastle.cpp │ │ │ ├── d_hexion.cpp │ │ │ ├── d_kontest.cpp │ │ │ ├── d_mainevt.cpp │ │ │ ├── d_mogura.cpp │ │ │ ├── d_parodius.cpp │ │ │ ├── d_pooyan.cpp │ │ │ ├── d_rollerg.cpp │ │ │ ├── d_scotrsht.cpp │ │ │ ├── d_simpsons.cpp │ │ │ ├── d_spy.cpp │ │ │ ├── d_surpratk.cpp │ │ │ ├── d_thunderx.cpp │ │ │ ├── d_tmnt.cpp │ │ │ ├── d_twin16.cpp │ │ │ ├── d_ultraman.cpp │ │ │ ├── d_vendetta.cpp │ │ │ ├── d_xmen.cpp │ │ │ ├── k051316.cpp │ │ │ ├── k051733.cpp │ │ │ ├── k051960.cpp │ │ │ ├── k052109.cpp │ │ │ ├── k053245.cpp │ │ │ ├── k053247.cpp │ │ │ ├── k053251.cpp │ │ │ ├── k053936.cpp │ │ │ ├── k054000.cpp │ │ │ ├── konamiic.cpp │ │ │ └── konamiic.h │ │ ├── megadrive │ │ │ ├── d_megadrive.cpp │ │ │ ├── megadrive.cpp │ │ │ └── megadrive.h │ │ ├── neogeo │ │ │ ├── d_neogeo.cpp │ │ │ ├── neo_decrypt.cpp │ │ │ ├── neo_palette.cpp │ │ │ ├── neo_run.cpp │ │ │ ├── neo_sprite.cpp │ │ │ ├── neo_sprite_render.h │ │ │ ├── neo_text.cpp │ │ │ ├── neo_text_render.h │ │ │ ├── neo_upd4990a.cpp │ │ │ ├── neogeo.cpp │ │ │ └── neogeo.h │ │ ├── pce │ │ │ ├── d_pce.cpp │ │ │ ├── pce.cpp │ │ │ └── pce.h │ │ ├── pgm │ │ │ ├── d_pgm.cpp │ │ │ ├── pgm.h │ │ │ ├── pgm_crypt.cpp │ │ │ ├── pgm_draw.cpp │ │ │ ├── pgm_prot.cpp │ │ │ ├── pgm_run.cpp │ │ │ └── pgm_sprite_create.cpp │ │ ├── pre90s │ │ │ ├── d_1942.cpp │ │ │ ├── d_1943.cpp │ │ │ ├── d_4enraya.cpp │ │ │ ├── d_ambush.cpp │ │ │ ├── d_arabian.cpp │ │ │ ├── d_armedf.cpp │ │ │ ├── d_atetris.cpp │ │ │ ├── d_aztarac.cpp │ │ │ ├── d_baraduke.cpp │ │ │ ├── d_bionicc.cpp │ │ │ ├── d_blktiger.cpp │ │ │ ├── d_blockout.cpp │ │ │ ├── d_blueprnt.cpp │ │ │ ├── d_bombjack.cpp │ │ │ ├── d_commando.cpp │ │ │ ├── d_cybertnk.cpp │ │ │ ├── d_ddragon.cpp │ │ │ ├── d_dkong.cpp │ │ │ ├── d_dynduke.cpp │ │ │ ├── d_epos.cpp │ │ │ ├── d_exedexes.cpp │ │ │ ├── d_funkybee.cpp │ │ │ ├── d_galaga.cpp │ │ │ ├── d_gauntlet.cpp │ │ │ ├── d_ginganin.cpp │ │ │ ├── d_gng.cpp │ │ │ ├── d_gunsmoke.cpp │ │ │ ├── d_higemaru.cpp │ │ │ ├── d_ikki.cpp │ │ │ ├── d_jack.cpp │ │ │ ├── d_kangaroo.cpp │ │ │ ├── d_kyugo.cpp │ │ │ ├── d_ladybug.cpp │ │ │ ├── d_lwings.cpp │ │ │ ├── d_madgear.cpp │ │ │ ├── d_marineb.cpp │ │ │ ├── d_markham.cpp │ │ │ ├── d_meijinsn.cpp │ │ │ ├── d_mitchell.cpp │ │ │ ├── d_mole.cpp │ │ │ ├── d_momoko.cpp │ │ │ ├── d_mrdo.cpp │ │ │ ├── d_mrflea.cpp │ │ │ ├── d_mystston.cpp │ │ │ ├── d_pac2650.cpp │ │ │ ├── d_pacland.cpp │ │ │ ├── d_pacman.cpp │ │ │ ├── d_pkunwar.cpp │ │ │ ├── d_prehisle.cpp │ │ │ ├── d_quizo.cpp │ │ │ ├── d_rallyx.cpp │ │ │ ├── d_renegade.cpp │ │ │ ├── d_route16.cpp │ │ │ ├── d_rpunch.cpp │ │ │ ├── d_scregg.cpp │ │ │ ├── d_sf.cpp │ │ │ ├── d_skyfox.cpp │ │ │ ├── d_skykid.cpp │ │ │ ├── d_snk68.cpp │ │ │ ├── d_solomon.cpp │ │ │ ├── d_sonson.cpp │ │ │ ├── d_srumbler.cpp │ │ │ ├── d_tecmo.cpp │ │ │ ├── d_terracre.cpp │ │ │ ├── d_tigeroad.cpp │ │ │ ├── d_toki.cpp │ │ │ ├── d_vulgus.cpp │ │ │ ├── d_wallc.cpp │ │ │ ├── d_wc90.cpp │ │ │ ├── d_wc90b.cpp │ │ │ └── d_wwfsstar.cpp │ │ ├── psikyo │ │ │ ├── d_psikyo.cpp │ │ │ ├── d_psikyo4.cpp │ │ │ ├── d_psikyosh.cpp │ │ │ ├── psikyo.h │ │ │ ├── psikyo_palette.cpp │ │ │ ├── psikyo_render.h │ │ │ ├── psikyo_sprite.cpp │ │ │ ├── psikyo_sprite_func.h │ │ │ ├── psikyo_tile.cpp │ │ │ ├── psikyosh_render.cpp │ │ │ └── psikyosh_render.h │ │ ├── pst90s │ │ │ ├── d_1945kiii.cpp │ │ │ ├── d_aerofgt.cpp │ │ │ ├── d_airbustr.cpp │ │ │ ├── d_aquarium.cpp │ │ │ ├── d_blmbycar.cpp │ │ │ ├── d_bloodbro.cpp │ │ │ ├── d_crospang.cpp │ │ │ ├── d_crshrace.cpp │ │ │ ├── d_dcon.cpp │ │ │ ├── d_ddragon3.cpp │ │ │ ├── d_deniam.cpp │ │ │ ├── d_diverboy.cpp │ │ │ ├── d_drgnmst.cpp │ │ │ ├── d_drtomy.cpp │ │ │ ├── d_egghunt.cpp │ │ │ ├── d_esd16.cpp │ │ │ ├── d_f1gp.cpp │ │ │ ├── d_fstarfrc.cpp │ │ │ ├── d_funybubl.cpp │ │ │ ├── d_fuukifg3.cpp │ │ │ ├── d_gaelco.cpp │ │ │ ├── d_gaiden.cpp │ │ │ ├── d_galpanic.cpp │ │ │ ├── d_galspnbl.cpp │ │ │ ├── d_gotcha.cpp │ │ │ ├── d_gumbo.cpp │ │ │ ├── d_hyperpac.cpp │ │ │ ├── d_jchan.cpp │ │ │ ├── d_kaneko16.cpp │ │ │ ├── d_lordgun.cpp │ │ │ ├── d_mcatadv.cpp │ │ │ ├── d_midas.cpp │ │ │ ├── d_mugsmash.cpp │ │ │ ├── d_news.cpp │ │ │ ├── d_nmg5.cpp │ │ │ ├── d_nmk16.cpp │ │ │ ├── d_ohmygod.cpp │ │ │ ├── d_pass.cpp │ │ │ ├── d_pirates.cpp │ │ │ ├── d_playmark.cpp │ │ │ ├── d_powerins.cpp │ │ │ ├── d_pushman.cpp │ │ │ ├── d_raiden.cpp │ │ │ ├── d_seta.cpp │ │ │ ├── d_seta2.cpp │ │ │ ├── d_shadfrce.cpp │ │ │ ├── d_silkroad.cpp │ │ │ ├── d_silvmil.cpp │ │ │ ├── d_speedspn.cpp │ │ │ ├── d_suna16.cpp │ │ │ ├── d_suprnova.cpp │ │ │ ├── d_taotaido.cpp │ │ │ ├── d_tecmosys.cpp │ │ │ ├── d_tumbleb.cpp │ │ │ ├── d_unico.cpp │ │ │ ├── d_vmetal.cpp │ │ │ ├── d_welltris.cpp │ │ │ ├── d_wwfwfest.cpp │ │ │ ├── d_xorworld.cpp │ │ │ ├── d_yunsun16.cpp │ │ │ ├── d_zerozone.cpp │ │ │ ├── kanekotb.h │ │ │ ├── nmk004.cpp │ │ │ └── nmk004.h │ │ ├── sega │ │ │ ├── d_angelkds.cpp │ │ │ ├── d_bankp.cpp │ │ │ ├── d_dotrikun.cpp │ │ │ ├── d_hangon.cpp │ │ │ ├── d_outrun.cpp │ │ │ ├── d_suprloco.cpp │ │ │ ├── d_sys1.cpp │ │ │ ├── d_sys16a.cpp │ │ │ ├── d_sys16b.cpp │ │ │ ├── d_sys18.cpp │ │ │ ├── d_xbrd.cpp │ │ │ ├── d_ybrd.cpp │ │ │ ├── fd1089.cpp │ │ │ ├── fd1094.cpp │ │ │ ├── fd1094.h │ │ │ ├── genesis_vid.cpp │ │ │ ├── genesis_vid.h │ │ │ ├── mc8123.cpp │ │ │ ├── mc8123.h │ │ │ ├── sys16.h │ │ │ ├── sys16_fd1094.cpp │ │ │ ├── sys16_gfx.cpp │ │ │ └── sys16_run.cpp │ │ ├── sms │ │ │ ├── d_sms.cpp │ │ │ ├── sms.cpp │ │ │ └── sms.h │ │ ├── snes │ │ │ ├── d_snes.cpp │ │ │ ├── snes.h │ │ │ ├── snes_65816.cpp │ │ │ ├── snes_io.cpp │ │ │ ├── snes_main.cpp │ │ │ ├── snes_ppu.cpp │ │ │ └── snes_spc700.cpp │ │ ├── taito │ │ │ ├── cchip.cpp │ │ │ ├── d_arkanoid.cpp │ │ │ ├── d_ashnojoe.cpp │ │ │ ├── d_asuka.cpp │ │ │ ├── d_bublbobl.cpp │ │ │ ├── d_chaknpop.cpp │ │ │ ├── d_darius2.cpp │ │ │ ├── d_flstory.cpp │ │ │ ├── d_lkage.cpp │ │ │ ├── d_minivdr.cpp │ │ │ ├── d_othunder.cpp │ │ │ ├── d_retofinv.cpp │ │ │ ├── d_slapshot.cpp │ │ │ ├── d_superchs.cpp │ │ │ ├── d_taitob.cpp │ │ │ ├── d_taitof2.cpp │ │ │ ├── d_taitomisc.cpp │ │ │ ├── d_taitox.cpp │ │ │ ├── d_taitoz.cpp │ │ │ ├── d_tnzs.cpp │ │ │ ├── pc080sn.cpp │ │ │ ├── pc090oj.cpp │ │ │ ├── taito.cpp │ │ │ ├── taito.h │ │ │ ├── taito_ic.cpp │ │ │ ├── taito_ic.h │ │ │ ├── taito_m68705.cpp │ │ │ ├── taito_m68705.h │ │ │ ├── tc0100scn.cpp │ │ │ ├── tc0110pcr.cpp │ │ │ ├── tc0140syt.cpp │ │ │ ├── tc0150rod.cpp │ │ │ ├── tc0180vcu.cpp │ │ │ ├── tc0220ioc.cpp │ │ │ ├── tc0280grd.cpp │ │ │ ├── tc0360pri.cpp │ │ │ ├── tc0480scp.cpp │ │ │ ├── tc0510nio.cpp │ │ │ ├── tc0640fio.cpp │ │ │ ├── tnzs_prot.cpp │ │ │ └── tnzs_prot.h │ │ └── toaplan │ │ │ ├── d_batrider.cpp │ │ │ ├── d_batsugun.cpp │ │ │ ├── d_battleg.cpp │ │ │ ├── d_bbakraid.cpp │ │ │ ├── d_demonwld.cpp │ │ │ ├── d_dogyuun.cpp │ │ │ ├── d_fixeight.cpp │ │ │ ├── d_ghox.cpp │ │ │ ├── d_hellfire.cpp │ │ │ ├── d_kbash.cpp │ │ │ ├── d_kbash2.cpp │ │ │ ├── d_mahoudai.cpp │ │ │ ├── d_outzone.cpp │ │ │ ├── d_pipibibs.cpp │ │ │ ├── d_rallybik.cpp │ │ │ ├── d_samesame.cpp │ │ │ ├── d_shippumd.cpp │ │ │ ├── d_snowbro2.cpp │ │ │ ├── d_tekipaki.cpp │ │ │ ├── d_tigerheli.cpp │ │ │ ├── d_truxton.cpp │ │ │ ├── d_truxton2.cpp │ │ │ ├── d_vfive.cpp │ │ │ ├── d_vimana.cpp │ │ │ ├── d_zerowing.cpp │ │ │ ├── toa_bcu2.cpp │ │ │ ├── toa_extratext.cpp │ │ │ ├── toa_extratext.h │ │ │ ├── toa_gp9001.cpp │ │ │ ├── toa_gp9001_render.h │ │ │ ├── toa_palette.cpp │ │ │ ├── toaplan.cpp │ │ │ ├── toaplan.h │ │ │ └── toaplan1.cpp │ ├── hiscore.cpp │ ├── hiscore.h │ ├── load.cpp │ ├── snd │ │ ├── ay8910.c │ │ ├── ay8910.h │ │ ├── burn_y8950.cpp │ │ ├── burn_y8950.h │ │ ├── burn_ym2151.cpp │ │ ├── burn_ym2151.h │ │ ├── burn_ym2203.cpp │ │ ├── burn_ym2203.h │ │ ├── burn_ym2413.cpp │ │ ├── burn_ym2413.h │ │ ├── burn_ym2608.cpp │ │ ├── burn_ym2608.h │ │ ├── burn_ym2610.cpp │ │ ├── burn_ym2610.h │ │ ├── burn_ym2612.cpp │ │ ├── burn_ym2612.h │ │ ├── burn_ym3526.cpp │ │ ├── burn_ym3526.h │ │ ├── burn_ym3812.cpp │ │ ├── burn_ym3812.h │ │ ├── burn_ymf278b.cpp │ │ ├── burn_ymf278b.h │ │ ├── c6280.cpp │ │ ├── c6280.h │ │ ├── dac.cpp │ │ ├── dac.h │ │ ├── es5506.cpp │ │ ├── es5506.h │ │ ├── es8712.cpp │ │ ├── es8712.h │ │ ├── flt_rc.cpp │ │ ├── flt_rc.h │ │ ├── fm.c │ │ ├── fm.h │ │ ├── fmopl.c │ │ ├── fmopl.h │ │ ├── ics2115.cpp │ │ ├── ics2115.h │ │ ├── iremga20.cpp │ │ ├── iremga20.h │ │ ├── k007232.cpp │ │ ├── k007232.h │ │ ├── k051649.cpp │ │ ├── k051649.h │ │ ├── k053260.cpp │ │ ├── k053260.h │ │ ├── k054539.cpp │ │ ├── k054539.h │ │ ├── msm5205.cpp │ │ ├── msm5205.h │ │ ├── msm6295.cpp │ │ ├── msm6295.h │ │ ├── namco_snd.cpp │ │ ├── namco_snd.h │ │ ├── rescap.h │ │ ├── rf5c68.cpp │ │ ├── rf5c68.h │ │ ├── saa1099.cpp │ │ ├── saa1099.h │ │ ├── samples.cpp │ │ ├── samples.h │ │ ├── segapcm.cpp │ │ ├── segapcm.h │ │ ├── sn76496.cpp │ │ ├── sn76496.h │ │ ├── upd7759.cpp │ │ ├── upd7759.h │ │ ├── x1010.cpp │ │ ├── x1010.h │ │ ├── ym2151.c │ │ ├── ym2151.h │ │ ├── ym2413.c │ │ ├── ym2413.h │ │ ├── ymdeltat.c │ │ ├── ymdeltat.h │ │ ├── ymf278b.c │ │ ├── ymf278b.h │ │ ├── ymz280b.cpp │ │ └── ymz280b.h │ ├── state.h │ ├── stdfunc.h │ ├── tiles_generic.cpp │ ├── tiles_generic.h │ ├── timer.cpp │ ├── timer.h │ └── version.h ├── burner │ ├── burner.h │ ├── crypt.h │ ├── gameinp.h │ ├── ioapi.c │ ├── ioapi.h │ ├── libretro │ │ ├── burn_endian.h │ │ ├── burn_libretro_opts.h │ │ ├── burner_libretro.h │ │ ├── libretro-common │ │ │ └── include │ │ │ │ ├── boolean.h │ │ │ │ ├── compat │ │ │ │ └── msvc │ │ │ │ │ └── stdint.h │ │ │ │ └── retro_inline.h │ │ ├── libretro.cpp │ │ ├── libretro.h │ │ ├── libretro_private.h │ │ ├── link.T │ │ ├── neocdlist.cpp │ │ ├── net.h │ │ ├── retro_common.cpp │ │ ├── retro_common.h │ │ ├── retro_input.cpp │ │ ├── retro_input.h │ │ └── tchar.h │ ├── neocdlist.h │ ├── state.cpp │ ├── statec.cpp │ ├── title.h │ ├── un7z.cpp │ ├── un7z.h │ ├── unzip.c │ ├── unzip.h │ └── zipfn.cpp ├── cpu │ ├── a68k │ │ ├── fba_make68k.c │ │ └── mips │ │ │ ├── a68k.s │ │ │ ├── a68ktbl.inc │ │ │ ├── builda68k.bat │ │ │ └── fba_make68k.c │ ├── arm │ │ └── arm.cpp │ ├── arm7 │ │ ├── arm7.cpp │ │ ├── arm7core.c │ │ ├── arm7core.h │ │ └── arm7exec.c │ ├── arm7_intf.cpp │ ├── arm7_intf.h │ ├── arm_intf.cpp │ ├── arm_intf.h │ ├── h6280 │ │ ├── h6280.cpp │ │ ├── h6280.h │ │ ├── h6280ops.h │ │ └── tblh6280.c │ ├── h6280_intf.cpp │ ├── h6280_intf.h │ ├── hd6309 │ │ ├── 6309ops.c │ │ ├── 6309tbl.c │ │ ├── hd6309.cpp │ │ └── hd6309.h │ ├── hd6309_intf.cpp │ ├── hd6309_intf.h │ ├── i8039 │ │ ├── i8039.cpp │ │ └── i8039.h │ ├── konami │ │ ├── konami.cpp │ │ ├── konami.h │ │ ├── konamops.c │ │ └── konamtbl.c │ ├── konami_intf.cpp │ ├── konami_intf.h │ ├── m6502 │ │ ├── ill02.h │ │ ├── m6502.cpp │ │ ├── m6502.h │ │ ├── ops02.h │ │ ├── opsc02.h │ │ ├── opsn2a03.h │ │ ├── t6502.c │ │ ├── t65c02.c │ │ ├── t65sc02.c │ │ ├── tdeco16.c │ │ └── tn2a03.c │ ├── m6502_intf.cpp │ ├── m6502_intf.h │ ├── m6800 │ │ ├── 6800ops.c │ │ ├── 6800tbl.c │ │ ├── m6800.cpp │ │ └── m6800.h │ ├── m68000_debug.h │ ├── m68000_intf.cpp │ ├── m68000_intf.h │ ├── m6800_intf.cpp │ ├── m6800_intf.h │ ├── m6805 │ │ ├── 6805ops.c │ │ ├── m6805.cpp │ │ └── m6805.h │ ├── m6805_intf.cpp │ ├── m6805_intf.h │ ├── m6809 │ │ ├── 6809ops.c │ │ ├── 6809tbl.c │ │ ├── m6809.cpp │ │ └── m6809.h │ ├── m6809_intf.cpp │ ├── m6809_intf.h │ ├── m68k │ │ ├── m68k.h │ │ ├── m68k_in.c │ │ ├── m68kconf.h │ │ ├── m68kcpu.c │ │ ├── m68kcpu.h │ │ ├── m68kdasm.c │ │ ├── m68kmake.c │ │ ├── m68kopac.c │ │ ├── m68kopdm.c │ │ ├── m68kopnz.c │ │ ├── m68kops.c │ │ └── m68kops.h │ ├── nec │ │ ├── nec.cpp │ │ ├── nec.h │ │ ├── necea.h │ │ ├── necinstr.c │ │ ├── necinstr.h │ │ ├── necmacro.h │ │ ├── necmodrm.h │ │ ├── necpriv.h │ │ ├── v25.cpp │ │ ├── v25instr.c │ │ ├── v25instr.h │ │ ├── v25priv.h │ │ └── v25sfr.c │ ├── nec_intf.cpp │ ├── nec_intf.h │ ├── pic16c5x │ │ ├── pic16c5x.cpp │ │ └── pic16c5x.h │ ├── pic16c5x_intf.cpp │ ├── pic16c5x_intf.h │ ├── s2650 │ │ ├── s2650.cpp │ │ └── s2650.h │ ├── s2650_intf.cpp │ ├── s2650_intf.h │ ├── sh2 │ │ └── sh2.cpp │ ├── sh2_intf.h │ ├── z80 │ │ ├── z80.cpp │ │ ├── z80.h │ │ ├── z80daisy.cpp │ │ └── z80daisy.h │ ├── z80_intf.cpp │ └── z80_intf.h ├── dep │ ├── generated │ │ ├── app_gnuc.rc │ │ ├── build_details.h │ │ ├── cave_sprite_func.h │ │ ├── cave_sprite_func_table.h │ │ ├── cave_tile_func.h │ │ ├── cave_tile_func_table.h │ │ ├── ctv.h │ │ ├── driverlist-gx.h │ │ ├── driverlist.h │ │ ├── driverlist_cps1.h │ │ ├── driverlist_cps2.h │ │ ├── driverlist_cps3.h │ │ ├── driverlist_neogeo.h │ │ ├── license.rtf │ │ ├── neo_sprite_func.h │ │ ├── neo_sprite_func_table.h │ │ ├── pgm_sprite.h │ │ ├── psikyo_tile_func.h │ │ ├── psikyo_tile_func_table.h │ │ ├── toa_gp9001_func.h │ │ └── toa_gp9001_func_table.h │ ├── kaillera │ │ └── client │ │ │ ├── kailleraclient.h │ │ │ ├── net.cpp │ │ │ └── net.h │ ├── libs │ │ ├── lib7z │ │ │ ├── 7z.h │ │ │ ├── 7zAlloc.c │ │ │ ├── 7zAlloc.h │ │ │ ├── 7zArcIn.c │ │ │ ├── 7zBuf.c │ │ │ ├── 7zBuf.h │ │ │ ├── 7zBuf2.c │ │ │ ├── 7zCrc.c │ │ │ ├── 7zCrc.h │ │ │ ├── 7zCrcOpt.c │ │ │ ├── 7zDec.c │ │ │ ├── 7zFile.c │ │ │ ├── 7zFile.h │ │ │ ├── 7zStream.c │ │ │ ├── 7zTypes.h │ │ │ ├── 7zVersion.h │ │ │ ├── 7zVersion.rc │ │ │ ├── Aes.c │ │ │ ├── Aes.h │ │ │ ├── AesOpt.c │ │ │ ├── Alloc.c │ │ │ ├── Alloc.h │ │ │ ├── Bcj2.c │ │ │ ├── Bcj2.h │ │ │ ├── Bcj2Enc.c │ │ │ ├── Bra.c │ │ │ ├── Bra.h │ │ │ ├── Bra86.c │ │ │ ├── BraIA64.c │ │ │ ├── Compiler.h │ │ │ ├── CpuArch.h │ │ │ ├── Delta.c │ │ │ ├── Delta.h │ │ │ ├── LzFind.c │ │ │ ├── LzFind.h │ │ │ ├── LzFindMt.c │ │ │ ├── LzFindMt.h │ │ │ ├── LzHash.h │ │ │ ├── Lzma2Dec.c │ │ │ ├── Lzma2Dec.h │ │ │ ├── Lzma2Enc.c │ │ │ ├── Lzma2Enc.h │ │ │ ├── Lzma86.h │ │ │ ├── Lzma86Dec.c │ │ │ ├── Lzma86Enc.c │ │ │ ├── LzmaDec.c │ │ │ ├── LzmaDec.h │ │ │ ├── LzmaEnc.c │ │ │ ├── LzmaEnc.h │ │ │ ├── LzmaLib.c │ │ │ ├── LzmaLib.h │ │ │ ├── MtCoder.c │ │ │ ├── MtCoder.h │ │ │ ├── Ppmd.h │ │ │ ├── Ppmd7.c │ │ │ ├── Ppmd7.h │ │ │ ├── Ppmd7Dec.c │ │ │ ├── Ppmd7Enc.c │ │ │ ├── Precomp.h │ │ │ ├── RotateDefs.h │ │ │ ├── Sha256.c │ │ │ ├── Sha256.h │ │ │ ├── Sort.c │ │ │ ├── Sort.h │ │ │ ├── Threads.c │ │ │ ├── Threads.h │ │ │ ├── Types.h │ │ │ ├── Xz.c │ │ │ ├── Xz.h │ │ │ ├── XzCrc64.c │ │ │ ├── XzCrc64.h │ │ │ ├── XzCrc64Opt.c │ │ │ ├── XzDec.c │ │ │ ├── XzEnc.c │ │ │ ├── XzEnc.h │ │ │ ├── XzIn.c │ │ │ ├── _fba_lzmasdk_v15.14 beta.txt │ │ │ └── _fba_lzmasdk_v9.22 beta.txt │ │ ├── libpng │ │ │ ├── _fba_libpng_v1512.txt │ │ │ ├── _fba_libpng_v162.txt │ │ │ ├── png.c │ │ │ ├── png.h │ │ │ ├── pngconf.h │ │ │ ├── pngdebug.h │ │ │ ├── pngerror.c │ │ │ ├── pngget.c │ │ │ ├── pnginfo.h │ │ │ ├── pnglibconf.h │ │ │ ├── pngmem.c │ │ │ ├── pngpread.c │ │ │ ├── pngpriv.h │ │ │ ├── pngread.c │ │ │ ├── pngrio.c │ │ │ ├── pngrtran.c │ │ │ ├── pngrutil.c │ │ │ ├── pngset.c │ │ │ ├── pngstruct.h │ │ │ ├── pngtrans.c │ │ │ ├── pngwio.c │ │ │ ├── pngwrite.c │ │ │ ├── pngwtran.c │ │ │ └── pngwutil.c │ │ └── zlib │ │ │ ├── _fba_zlib_v127.txt │ │ │ ├── _fba_zlib_v128.txt │ │ │ ├── adler32.c │ │ │ ├── compress.c │ │ │ ├── crc32.c │ │ │ ├── crc32.h │ │ │ ├── deflate.c │ │ │ ├── deflate.h │ │ │ ├── gzclose.c │ │ │ ├── gzguts.h │ │ │ ├── gzlib.c │ │ │ ├── gzread.c │ │ │ ├── gzwrite.c │ │ │ ├── infback.c │ │ │ ├── inffast.c │ │ │ ├── inffast.h │ │ │ ├── inffixed.h │ │ │ ├── inflate.c │ │ │ ├── inflate.h │ │ │ ├── inftrees.c │ │ │ ├── inftrees.h │ │ │ ├── trees.c │ │ │ ├── trees.h │ │ │ ├── uncompr.c │ │ │ ├── zconf.h │ │ │ ├── zconf.h.in │ │ │ ├── zlib.h │ │ │ ├── zutil.c │ │ │ └── zutil.h │ ├── mingw │ │ └── include │ │ │ ├── directx9 │ │ │ ├── d3dx9.h │ │ │ ├── d3dx9anim.h │ │ │ ├── d3dx9core.h │ │ │ ├── d3dx9effect.h │ │ │ ├── d3dx9math.h │ │ │ ├── d3dx9math.inl │ │ │ ├── d3dx9mesh.h │ │ │ ├── d3dx9shader.h │ │ │ ├── d3dx9shape.h │ │ │ ├── d3dx9tex.h │ │ │ └── d3dx9xof.h │ │ │ ├── mingw_win32.h │ │ │ └── xaudio2 │ │ │ ├── audiodefs.h │ │ │ ├── sal.h │ │ │ ├── xaudio2.h │ │ │ ├── xaudio2fx.h │ │ │ └── xma2defs.h │ ├── scripts │ │ ├── build_details.cpp │ │ ├── cave_sprite_func.pl │ │ ├── cave_tile_func.pl │ │ ├── fixrc.pl │ │ ├── gamelist.pl │ │ ├── license2rtf.pl │ │ ├── neo_sprite_func.pl │ │ ├── psikyo_tile_func.pl │ │ └── toa_gp9001_func.pl │ ├── vc │ │ └── include │ │ │ ├── afxres.h │ │ │ ├── d3d.h │ │ │ ├── d3dcaps.h │ │ │ ├── d3dtypes.h │ │ │ └── d3dvec.inl │ └── vs2010 │ │ ├── pre.bat │ │ └── readme.txt ├── intf │ ├── cd │ │ ├── cd_interface.cpp │ │ ├── cd_interface.h │ │ └── win32 │ │ │ ├── cd_isowav.cpp │ │ │ ├── cdsound.cpp │ │ │ └── cdsound.h │ └── input │ │ └── inp_keys.h └── license.txt └── whatsnew.html /.gitignore: -------------------------------------------------------------------------------- 1 | *.so 2 | *.o 3 | *.dll 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: generic 2 | os: linux 3 | dist: trusty 4 | sudo: required 5 | addons: 6 | apt: 7 | packages: 8 | - g++-7 9 | sources: 10 | - ubuntu-toolchain-r-test 11 | env: 12 | global: 13 | - CORE=fbalpha2012 14 | - COMPILER_NAME=gcc CXX=g++-7 CC=gcc-7 15 | matrix: 16 | - PLATFORM=3ds 17 | - PLATFORM=linux_x64 18 | - PLATFORM=ngc 19 | - PLATFORM=wii 20 | - PLATFORM=wiiu 21 | before_script: 22 | - pwd 23 | - mkdir -p ~/bin 24 | - ln -s /usr/bin/gcc-7 ~/bin/gcc 25 | - ln -s /usr/bin/g++-7 ~/bin/g++ 26 | - ln -s /usr/bin/cpp-7 ~/bin/cpp 27 | - export PATH=~/bin:$PATH 28 | - ls -l ~/bin 29 | - echo $PATH 30 | - g++-7 --version 31 | - g++ --version 32 | script: 33 | - cd ~/ 34 | - git clone --depth=50 https://github.com/libretro/libretro-super 35 | - cd libretro-super/travis 36 | - ./build.sh 37 | -------------------------------------------------------------------------------- /docs/COPYING: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/fbalpha2012/77167cea72e808384c136c8c163a6b4975ce7a84/docs/COPYING -------------------------------------------------------------------------------- /docs/license.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/fbalpha2012/77167cea72e808384c136c8c163a6b4975ce7a84/docs/license.txt -------------------------------------------------------------------------------- /svn-current/readme.textile: -------------------------------------------------------------------------------- 1 | h1. Assembla.readme 2 | 3 | In assembla you can use "textile(Textile Basics)":http://bit.ly/textile-basics, "html(Html Basics)":http://bit.ly/html-basics or "markdown(Markdown Basics)":http://bit.ly/markdown-basics to add some sugar to your readme files. Just add the extention to your readme file, so we can recognize the markup you want to use! 4 | -------------------------------------------------------------------------------- /svn-current/trunk/fba.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/fbalpha2012/77167cea72e808384c136c8c163a6b4975ce7a84/svn-current/trunk/fba.chm -------------------------------------------------------------------------------- /svn-current/trunk/fbahelpfilesrc/Log1.log: -------------------------------------------------------------------------------- 1 | Microsoft HTML Help Compiler 4.74.8702 2 | 3 | Compiling d:\fba_src\fbalpha\trunk\fbahelpfilesrc\fba.chm 4 | 5 | 6 | Compile time: 0 minutes, 0 seconds 7 | 24 Topics 8 | 49 Local links 9 | 1 Internet link 10 | 0 Graphics 11 | 12 | 13 | Created d:\fba_src\fbalpha\trunk\fbahelpfilesrc\fba.chm, 40,816 bytes 14 | Compression decreased file by 70,580 bytes. 15 | -------------------------------------------------------------------------------- /svn-current/trunk/fbahelpfilesrc/acknowledgments.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Acknowledgments 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
FB Alpha
17 | 18 |

Acknowledgments

19 | 20 |

The original FBA Team was Jan_Klaassen, LoopMaster, KEV, Mike_Haggar, TrebleWinner (Barry), Ayeye and HyperYagami.

21 | 22 |

There have also been big contributions from iq_132, Captain CPS-X and OopsWare.

23 | 24 |

Individual acknowledgements are also credited in the whatsnew.html file distributed with FB Alpha.

25 | 26 |

The current active Team is Barry, KEV, iq_132 and Captain CPS-X.

27 | 28 |

The following is the original acknowledgements from the old readme.txt;

29 | 30 |

"Thanks to: Dave, ElSemi, Gangta, OG, Razoola, Logiqx, TRAC, CrashTest, Andrea Mazzoleni, Derek Liauw Kie Fa, Dirk Stevens, Maxim Stepin, the MAME team, Shawn and Craig at XGaming.

31 | 32 |

Thanks also to everyone who has made suggestions, submitted code, or helped in any other way."

33 | 34 |
35 | 36 | 37 | -------------------------------------------------------------------------------- /svn-current/trunk/fbahelpfilesrc/command.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Command Line 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
FB Alpha
17 | 18 |

Command Line

19 | 20 |

FB Alpha can be invoked with command line options. When invoked this way, FB Alpha will automatically switch to fullscreen mode when a game is loaded, and the Escape key quits FB Alpha. The options are as follows;

21 | 22 |

fba <game> [-listinfo|-w|-a|-r <width>x<height>x<depth>]

23 | 24 |

<game> = The game's romname. You can specify the filename of a savestate or input recording instead.
25 | -w = Run in a window instead of fullscreen.
26 | -a = Use the same resolution as the original arcade game.
27 | -r = Specify a resolution. Depth is optional.

28 | 29 |

If neither -a nor -r are specified, the default fullscreen resolution is used.

30 | 31 |

Examples:

32 | 33 | 34 |

fba sfa3 -r 800x600x32

35 | 36 |

fba awesome_sfzch_recording.fr -w

37 | 38 |

fba vsav2 -a

39 |
40 | 41 |

For front-ends, you can also do fba -listinfo, -listinfomdonly, -listinfopceonly, -listinfotg16only or -listinfosgxonly which will output information about the supported games to 42 | stdout, and the ROM files they need in the MAME XML format.

43 | 44 |

You can also do fba -listextrainfo. This will output the following data in a tab-delimited format to stdout; setname, visible size, aspect ratio, hardware code, hardware description, working status, max players, comments.

45 | 46 |
47 | 48 | 49 | -------------------------------------------------------------------------------- /svn-current/trunk/fbahelpfilesrc/dialog_cheats.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Cheat Dialog 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
FB Alpha
17 | 18 |

Cheat Dialog

19 | 20 |

If you have cheats for a game in the cheat support file path then you can enable these cheats in this dialog.

21 | 22 |

FB Alpha will look for cheats in it's own format or the Nebula/Kawaks format. For the FB Alpha format the file should be named after the games short name with an INI file extension, for the Nebula/Kawaks format the file should have the DAT file extension. FB Alpha will also look for cheats in the old MAME format cheat.dat file.

23 | 24 |

To change the status of a cheat simply select it in the list and then change it in the dropdown. To save your changes and return to the game click OK. To change the cheats back to the default status you can click Default and then click OK to save the changes and return to the game.

25 | 26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /svn-current/trunk/fbahelpfilesrc/dialog_dips.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dip Switch Dialog 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
FB Alpha
17 | 18 |

Dip Switch Dialog

19 | 20 |

Some arcade games used Dip Switches to configure things like difficulty or coinage. This dialog allows you to change these settings for games that had these switches.

21 | 22 |

To change a setting, simply select it from the list and then make your changes in the dropdown box below. Once you are finished click OK to save your changes. Most games will require a reset for the changes to take effect.

23 | 24 |

To reset the settings back to the defaults simply click the Defaults button and then press OK to save.

25 | 26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /svn-current/trunk/fbahelpfilesrc/dialog_inputs.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Inputs Dialog 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
FB Alpha
17 | 18 |

Inputs Dialog

19 | 20 |

This dialog is used to define the controls used to control a game. The available inputs are listed. Double click on an input to open up a dialog box that allows you to map the control you want to use for that input.

21 | 22 |

You can also choose from various presets by using the dropdown boxes below the inputs. Simply select the player from the first box, the controller from the second, and the control type from the third. The control type can be Auto-center or Normal. Once you have made your selection click Use preset to change the inputs for the selected game or click Make default to make your selection be the default for all games which have not been currently configured.

23 | 24 |

You can create presets by clicking the Save preset button. This will save a file with the current input definitions in a hardware specific file. If you are playing a CPS game, the file will be called cps.ini, for Neo-Geo games, the file will be called neogeo.ini, for PGM games the file will be called pgm.ini, and for all other games the file will be called preset.ini.

25 | 26 |

Controls are first assigned from the games specific ini file. If that isn't found, then the hardware specific ini file is tried (cps.ini, neogeo.ini, pgm.ini). If this isn't found then the default preset (applied by clicking Make default) is tried. If this isn't found then the application's default controls are mapped.

27 | 28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /svn-current/trunk/fbahelpfilesrc/dialog_ips_manager.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IPS Patch Manager Dialog 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
FB Alpha
17 | 18 |

IPS Patch Manager Dialog

19 | 20 |

The IPS Patch Manager allows you to configure IPS patches. IPS patches can be used to change a game, for example, they can enable hidden characters, provide cheat functionality, translations or all sorts of other possibilities.

21 | 22 |

When you enter the IPS Patch Manager you will see a list of the available patches. These are grouped by their category. If you click on a patch then you will see an image preview of it to the right of the list and a description in the textbox below. To enable patches simply check them and click the OK button. This will save the configuration and you can then use the Apply Patches checkbox in the Game Select Dialog.

23 | 24 |

You can change the language used to display the patches by choosing it from the dropdown. If there is no data available for your selected language then the reference language will be used.

25 | 26 |

You can deselect all patches by clicking the Deselect All button.

27 | 28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /svn-current/trunk/fbahelpfilesrc/dialog_multislot.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Game Select Dialog 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
FB Alpha
17 | 18 |

NeoGeo MVS Multislot Game Select Dialog

19 | 20 |

The purpose of this dialog is to choose which Neo-Geo MVS games to load. There are six slots available in which a game can be loaded. To load a game in a slot, click the relevant Select button. This will open the Game Select Dialog, showing only MVS cartridges, allowing you to choose a game to load in the slot. To clear a game from a slot, click the relevant Clear button.

21 | 22 |

When you have made your selections, click the OK button to start the MVS Multislot driver with your games loaded. Once you enter a credit, before starting a game you can select which game to play by pressing the select buttons. By default these are mapped to 3 and 4 on your keyboard. Pressing these buttons will cycle through the games you have loaded.

23 | 24 |

Your slot selections are saved when the dialog is closed.

25 | 26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /svn-current/trunk/fbahelpfilesrc/dialog_neocdz.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Neo Geo CDZ Game Select Dialog 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
FB Alpha
17 | 18 |

Neo Geo CDZ Game Select Dialog

19 | 20 |

The purpose of this dialog is to choose a Neo Geo CDZ game to play. When you click on a game in the list the dialog will display images of the games cd covers, if you have PNG files in the folder you have defined as your Neo Geo CDZ Covers folder with the games four digit NGCD-ID code, appended with either -front or -back, eg, 0030-front.png. The info panel under the gamelist will also be refreshed and will display information about the game.

21 | 22 |

To play a game either double-click on it in the list, or select it and press the Play button.

23 | 24 |

When you enter the dialog, a scan will take place of the ISO/CUE files in the folder you have defined as the Neo Geo CDZ games folder. If a game is recognised it is added to the dialog list. To force the scan to run again you can click the Scan Games button. You can force the scan to look in sub-directories of the folder you defined by selecting the Scan sub-dirs option. You can also force the scan to look for ISO's only and ignore CUE files by selecting the Scan for ISO only option.

25 | 26 |

You can use the Directories button to open the Support File Path Dialog to change the folders to use for the games and/or covers.

27 | 28 |

To view a full-size image of the covers, you can click on a cover image to open the image in a larger dialog box.

29 | 30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /svn-current/trunk/fbahelpfilesrc/dialog_rom_paths.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Rom Path Dialog 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
FB Alpha
17 | 18 |

Rom Path Dialog

19 | 20 |

This dialog allows you to configure the folders that FB Alpha will search for roms. You can configure up to 20 folders to search in. Simply select the folder number from the tabs and then click Browse... to select the folder. Once you have finished click OK and if you have made any changes then FB Alpha will scan your roms.

21 | 22 |

The last ten folders (numbers 11 to 20) are special supplementary cases. Usually FB Alpha will take the first file for a rom it finds and ignore any in the later folders. Any files placed in the last ten folders will be searched as well as the first file found. So, if you have some roms that require extra files than that found in MAME (the Neo-Geo bios is a good example), then you could put the extra files in ones of these folders.

23 | 24 |

It is recommended to put the console (Megadrive/PC-Engine) games in one of these special paths to prevent conflicts. Although, internally, FB Alpha uses an md_ prefix for the Megadrive games shortnames, and either a pce_, tg_, or sgx_ prefix for PC-Engine games shortnames, this prefix should not be applied to the zipfiles the roms are stored in. This means you can point some of the supplementary rom paths at your MESS software list folder(s) for Megadrive, PC-Engine, TurboGrafx 16 or SuperGrafx and you're done.

25 | 26 |

DO NOT ASK US WHERE TO FIND ROMS. They are copyrighted and we can't help you.

27 | 28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /svn-current/trunk/fbahelpfilesrc/dialog_shot_factory.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Shot Factory Dialog 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
FB Alpha
17 | 18 |

Shot Factory Dialog

19 | 20 |

This dialog can be used to enable/disable parts of the games layers and then take a screenshot. This can be useful for sprite capture or similar tasks.

21 | 22 |

To enable or disable a layer simply check or uncheck it in the list. To take a screenshot click Capture, to advance a frame click Advance Frame. When you are finished click Done to close the dialog.

23 | 24 |

Not all games support the dialog, and those that do may not have all the layers that are displayed in the dialog.

25 | 26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /svn-current/trunk/fbahelpfilesrc/fba.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/fbalpha2012/77167cea72e808384c136c8c163a6b4975ce7a84/svn-current/trunk/fbahelpfilesrc/fba.chm -------------------------------------------------------------------------------- /svn-current/trunk/fbahelpfilesrc/fba.hhk: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | -------------------------------------------------------------------------------- /svn-current/trunk/fbahelpfilesrc/fba.hhp: -------------------------------------------------------------------------------- 1 | [OPTIONS] 2 | Compatibility=1.1 or later 3 | Compiled file=fba.chm 4 | Contents file=Table of Contents.hhc 5 | Default topic=intro.htm 6 | Display compile progress=No 7 | Index file=fba.hhk 8 | Language=0x809 English (United Kingdom) 9 | 10 | 11 | [FILES] 12 | sysreq.htm 13 | acknowledgments.htm 14 | cheat_format.htm 15 | command.htm 16 | dialog_cheats.htm 17 | dialog_dips.htm 18 | dialog_game_select.htm 19 | dialog_inputs.htm 20 | dialog_rom_paths.htm 21 | dialog_shot_factory.htm 22 | dialog_support_path.htm 23 | intro.htm 24 | keys.htm 25 | localise_app.htm 26 | menu_audio.htm 27 | menu_game.htm 28 | menu_help.htm 29 | menu_input.htm 30 | menu_misc.htm 31 | menu_video.htm 32 | presets.htm 33 | dialog_ips_manager.htm 34 | dialog_multislot.htm 35 | dialog_neocdz.htm 36 | localise_gamelist.htm 37 | 38 | [INFOTYPES] 39 | 40 | -------------------------------------------------------------------------------- /svn-current/trunk/fbahelpfilesrc/images/misc.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/fbalpha2012/77167cea72e808384c136c8c163a6b4975ce7a84/svn-current/trunk/fbahelpfilesrc/images/misc.bmp -------------------------------------------------------------------------------- /svn-current/trunk/fbahelpfilesrc/images/tv not found non essential.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/fbalpha2012/77167cea72e808384c136c8c163a6b4975ce7a84/svn-current/trunk/fbahelpfilesrc/images/tv not found non essential.ico -------------------------------------------------------------------------------- /svn-current/trunk/fbahelpfilesrc/images/tv not found.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/fbalpha2012/77167cea72e808384c136c8c163a6b4975ce7a84/svn-current/trunk/fbahelpfilesrc/images/tv not found.ico -------------------------------------------------------------------------------- /svn-current/trunk/fbahelpfilesrc/images/tv not working.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/fbalpha2012/77167cea72e808384c136c8c163a6b4975ce7a84/svn-current/trunk/fbahelpfilesrc/images/tv not working.ico -------------------------------------------------------------------------------- /svn-current/trunk/fbahelpfilesrc/intro.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Introducing FB Alpha 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
FB Alpha
17 | 18 |

Introducing FB Alpha

19 | 20 |

FB Alpha is an arcade emulator supporting the following platforms;

21 | 22 | 42 | 43 |

FB Alpha also has a WIP console drivers for Sega Megadrive/Genesis and also PC-Engine/TurboGrafx 16/SuperGrafx.

44 | 45 |

FB Alpha can currently be obtained from http://www.barryharris.me.uk.

46 | 47 |
48 | 49 | 50 | -------------------------------------------------------------------------------- /svn-current/trunk/fbahelpfilesrc/localise_app.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Localising the Application 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
FB Alpha
17 | 18 |

Localising the Application

19 | 20 |

The application can be localised using templates. To generate a template click on the Misc Menu, then UI Language, Export UI translation template....

21 | 22 |

Save the template where you want and then open it in a text editor. Localise the strings by amending them and saving the file.

23 | 24 |

To enable your localisation, click on the Misc Menu, then UI Language, Select UI Language and then open your template.

25 | 26 |

To remove an applied template, click on the Misc Menu, then UI Language, Reset UI default Language.

27 | 28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /svn-current/trunk/fbahelpfilesrc/localise_gamelist.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Localising the Gamelist 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
FB Alpha
17 | 18 |

Localising the Gamelist

19 | 20 |

The gamelist can be localised using templates. To generate a template click on the Misc Menu, then Gamelist Language, Export gamelist translation template....

21 | 22 |

Save the template where you want and then open it in a text editor. The file is a tab-delimited text file, containing the games shortname and longname. Simply localise the longnames and save the file. If you are using multi-byte characters and need to use a different codepage than the system default, then uncomment the codepage line at the top of the file (remove the // ), and change the number to the relevant codepage.

23 | 24 |

To enable your localisation, click on the Misc Menu, then Gamelist Language, Select gamelist Language and then open your template.

25 | 26 |

To remove an applied template, click on the Misc Menu, then Gamelist Language, Reset gamelist default Language.

27 | 28 |

You can use MAME+ LST files for the template. Simply rename the file's extension to glt (eg, if the file is called mame_kr.lst, change it to mame_kr.glt), and add any necessary codepage definition if required. FB Alpha will ignore any extra text after the first two tab-delimited tokens.

29 | 30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /svn-current/trunk/fbahelpfilesrc/menu_input.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Input Menu 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
FB Alpha
17 | 18 |

Input Menu

19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
Select pluginSelect the input plugin to use - currently does nothing.
Map Game InputsOpens the game inputs dialog.
Set dipswitchesOpens the game dipswitch dialog.
32 | 33 |
34 | 35 | 36 | -------------------------------------------------------------------------------- /svn-current/trunk/fbahelpfilesrc/presets.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Creating Presets 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
FB Alpha
17 | 18 |

Creating Input Presets

19 | 20 |

You can create preset controls that can be listed in the Inputs Dialog for you to select.

21 | 22 |

To do this you need to create an .INI file in the config\presets folder. An example is included with FB Alpha in the zip file preset-example.zip.

23 | 24 |

In the .INI file it it is possible to use specific names such as "P1 Low Punch" or generic names such as "P1 Fire 1". When a game is allocating inputs it will look for specific name first, and then the generic ones.

25 | 26 |

A good starting point can be take the .INI file for a game, copy it to the config/presets folder and rename it to what you want your preset to be called and then edit that file.

27 | 28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /svn-current/trunk/gamelist.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/fbalpha2012/77167cea72e808384c136c8c163a6b4975ce7a84/svn-current/trunk/gamelist.txt -------------------------------------------------------------------------------- /svn-current/trunk/preset-example.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/fbalpha2012/77167cea72e808384c136c8c163a6b4975ce7a84/svn-current/trunk/preset-example.zip -------------------------------------------------------------------------------- /svn-current/trunk/projectfiles/libretro-android/jni/Application.mk: -------------------------------------------------------------------------------- 1 | APP_STL := c++_static 2 | APP_ABI := all 3 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/burn_led.h: -------------------------------------------------------------------------------- 1 | #ifndef _BURN_LED_H 2 | #define _BURN_LED_H 3 | 4 | #define LED_COLOR_RED 0xff0000 5 | #define LED_COLOR_GREEN 0x00ff00 6 | #define LED_COLOR_BLUE 0x0000ff 7 | #define LED_COLOR_WHITE 0xffffff 8 | #define LED_COLOR_YELLOW 0xffff00 9 | 10 | #define LED_SIZE_2x2 2 11 | #define LED_SIZE_3x3 3 12 | #define LED_SIZE_4x4 4 13 | #define LED_SIZE_5x5 5 14 | #define LED_SIZE_6x6 6 15 | #define LED_SIZE_7x7 7 16 | #define LED_SIZE_8x8 8 17 | 18 | #define LED_POSITION_TOP_LEFT 0 19 | #define LED_POSITION_TOP_RIGHT 1 20 | #define LED_POSITION_BOTTOM_LEFT 2 21 | #define LED_POSITION_BOTTOM_RIGHT 3 22 | 23 | // transparency is a percentage 0 - 100 24 | void BurnLEDInit(INT32 num, INT32 position, INT32 size, INT32 color, INT32 transparency); 25 | 26 | void BurnLEDReset(); 27 | void BurnLEDSetStatus(INT32 led, UINT32 status); 28 | void BurnLEDSetFlipscreen(INT32 flip); 29 | void BurnLEDRender(); 30 | void BurnLEDExit(); 31 | 32 | INT32 BurnLEDScan(INT32 nAction, INT32 *pnMin); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/burn_memory.cpp: -------------------------------------------------------------------------------- 1 | // FB Alpha memory management module 2 | 3 | // The purpose of this module is to offer replacement functions for standard C/C++ ones 4 | // that allocate and free memory. This should help deal with the problem of memory 5 | // leaks and non-null pointers on game exit. 6 | 7 | #include "burnint.h" 8 | 9 | #define MAX_MEM_PTR 0x400 // more than 1024 malloc calls should be insane... 10 | 11 | static UINT8 *memptr[MAX_MEM_PTR]; // pointer to allocated memory 12 | 13 | // this should be called early on... BurnDrvInit? 14 | 15 | void BurnInitMemoryManager() 16 | { 17 | memset (memptr, 0, MAX_MEM_PTR * sizeof(UINT8 **)); 18 | } 19 | 20 | // should we pass the pointer as a variable here so that we can save a pointer to it 21 | // and then ensure it is NULL'd in BurnFree or BurnExitMemoryManager? 22 | 23 | // call instead of 'malloc' 24 | UINT8 *BurnMalloc(INT32 size) 25 | { 26 | for (INT32 i = 0; i < MAX_MEM_PTR; i++) 27 | { 28 | if (memptr[i] == NULL) { 29 | memptr[i] = (UINT8*)malloc(size); 30 | 31 | if (memptr[i] == NULL) { 32 | bprintf (0, _T("BurnMalloc failed to allocate %d bytes of memory!\n"), size); 33 | return NULL; 34 | } 35 | 36 | memset (memptr[i], 0, size); // set contents to 0 37 | 38 | return memptr[i]; 39 | } 40 | } 41 | 42 | bprintf (0, _T("BurnMalloc called too many times!\n")); 43 | 44 | return NULL; // Freak out! 45 | } 46 | 47 | // call instead of "free" 48 | void _BurnFree(void *ptr) 49 | { 50 | UINT8 *mptr = (UINT8*)ptr; 51 | 52 | for (INT32 i = 0; i < MAX_MEM_PTR; i++) 53 | { 54 | if (memptr[i] == mptr) { 55 | free (memptr[i]); 56 | memptr[i] = NULL; 57 | 58 | break; 59 | } 60 | } 61 | } 62 | 63 | // call in BurnDrvExit? 64 | 65 | void BurnExitMemoryManager() 66 | { 67 | for (INT32 i = 0; i < MAX_MEM_PTR; i++) 68 | { 69 | if (memptr[i] != NULL) { 70 | #if defined FBA_DEBUG 71 | bprintf(PRINT_ERROR, _T("BurnExitMemoryManager had to free mem pointer %i\n"), i); 72 | #endif 73 | free (memptr[i]); 74 | memptr[i] = NULL; 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/burn_sound.cpp: -------------------------------------------------------------------------------- 1 | #include "burnint.h" 2 | #include "burn_sound.h" 3 | 4 | INT16 Precalc[4096 *4]; 5 | 6 | // Routine used to precalculate the table used for interpolation 7 | INT32 cmc_4p_Precalc() 8 | { 9 | INT32 a, x, x2, x3; 10 | 11 | for (a = 0; a < 4096; a++) { 12 | x = a * 4; // x = 0..16384 13 | x2 = x * x / 16384; // pow(x, 2); 14 | x3 = x2 * x / 16384; // pow(x, 3); 15 | 16 | Precalc[a * 4 + 0] = (INT16)(-x / 3 + x2 / 2 - x3 / 6); 17 | Precalc[a * 4 + 1] = (INT16)(-x / 2 - x2 + x3 / 2 + 16384); 18 | Precalc[a * 4 + 2] = (INT16)( x + x2 / 2 - x3 / 2); 19 | Precalc[a * 4 + 3] = (INT16)(-x / 6 + x3 / 6); 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/burn_sound_c.cpp: -------------------------------------------------------------------------------- 1 | #include "burnint.h" 2 | #include "burn_sound.h" 3 | 4 | #define CLIP(A) ((A) < -0x8000 ? -0x8000 : (A) > 0x7fff ? 0x7fff : (A)) 5 | 6 | void BurnSoundCopyClamp_C(INT32 *Src, INT16 *Dest, INT32 Len) 7 | { 8 | Len *= 2; 9 | while (Len--) { 10 | *Dest = CLIP((*Src >> 8)); 11 | Src++; 12 | Dest++; 13 | } 14 | } 15 | 16 | void BurnSoundCopyClamp_Add_C(INT32 *Src, INT16 *Dest, INT32 Len) 17 | { 18 | Len *= 2; 19 | while (Len--) { 20 | *Dest = CLIP((*Src >> 8) + *Dest); 21 | Src++; 22 | Dest++; 23 | } 24 | } 25 | 26 | void BurnSoundCopyClamp_Mono_C(INT32 *Src, INT16 *Dest, INT32 Len) 27 | { 28 | while (Len--) { 29 | Dest[0] = CLIP((*Src >> 8)); 30 | Dest[1] = CLIP((*Src >> 8)); 31 | Src++; 32 | Dest += 2; 33 | } 34 | } 35 | 36 | void BurnSoundCopyClamp_Mono_Add_C(INT32 *Src, INT16 *Dest, INT32 Len) 37 | { 38 | while (Len--) { 39 | Dest[0] = CLIP((*Src >> 8) + Dest[0]); 40 | Dest[1] = CLIP((*Src >> 8) + Dest[1]); 41 | Src++; 42 | Dest += 2; 43 | } 44 | } 45 | 46 | #undef CLIP 47 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/burn_vector.h: -------------------------------------------------------------------------------- 1 | #ifndef _BURN_VECTOR_H 2 | #define _BURN_VECTOR_H 3 | 4 | void draw_vector(UINT32 *palette); 5 | void vector_init(); 6 | void vector_reset(); 7 | INT32 vector_scan(INT32 nAction); 8 | void vector_exit(); 9 | void vector_add_point(INT32 x, INT32 y, INT32 color, INT32 intensity); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/cheat.h: -------------------------------------------------------------------------------- 1 | #ifndef _BURN_CHEAT_H 2 | #define _BURN_CHEAT_H 3 | 4 | #define CHEAT_MAX_ADDRESS (512) 5 | #define CHEAT_MAX_OPTIONS (512) 6 | #define CHEAT_MAX_NAME (128) 7 | 8 | extern bool bCheatsAllowed; 9 | 10 | struct CheatAddressInfo { 11 | INT32 nCPU; 12 | INT32 nAddress; 13 | UINT32 nValue; 14 | UINT32 nOriginalValue; 15 | }; 16 | 17 | struct CheatOption { 18 | TCHAR szOptionName[CHEAT_MAX_NAME]; 19 | struct CheatAddressInfo AddressInfo[CHEAT_MAX_ADDRESS + 1]; 20 | }; 21 | 22 | struct CheatInfo { 23 | struct CheatInfo* pNext; 24 | struct CheatInfo* pPrevious; 25 | INT32 nType; // Cheat type 26 | INT32 nStatus; // 0 = Inactive 27 | INT32 nCurrent; // Currently selected option 28 | INT32 nDefault; // Default option 29 | TCHAR szCheatName[CHEAT_MAX_NAME]; 30 | struct CheatOption* pOption[CHEAT_MAX_OPTIONS]; 31 | }; 32 | 33 | extern CheatInfo* pCheatInfo; 34 | 35 | INT32 CheatUpdate(); 36 | INT32 CheatEnable(INT32 nCheat, INT32 nOption); 37 | INT32 CheatApply(); 38 | INT32 CheatInit(); 39 | void CheatExit(); 40 | 41 | #define CHEATSEARCH_SHOWRESULTS 3 42 | extern UINT32 CheatSearchShowResultAddresses[CHEATSEARCH_SHOWRESULTS]; 43 | extern UINT32 CheatSearchShowResultValues[CHEATSEARCH_SHOWRESULTS]; 44 | 45 | INT32 CheatSearchInit(); 46 | void CheatSearchExit(); 47 | void CheatSearchStart(); 48 | UINT32 CheatSearchValueNoChange(); 49 | UINT32 CheatSearchValueChange(); 50 | UINT32 CheatSearchValueDecreased(); 51 | UINT32 CheatSearchValueIncreased(); 52 | void CheatSearchDumptoFile(); 53 | 54 | typedef void (*CheatSearchInitCallback)(); 55 | extern CheatSearchInitCallback CheatSearchInitCallbackFunction; 56 | void CheatSearchExcludeAddressRange(UINT32 nStart, UINT32 nEnd); 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/devices/8255ppi.h: -------------------------------------------------------------------------------- 1 | typedef UINT8 (*PPIPortRead)(); 2 | typedef void (*PPIPortWrite)(UINT8 data); 3 | extern PPIPortRead PPI0PortReadA; 4 | extern PPIPortRead PPI0PortReadB; 5 | extern PPIPortRead PPI0PortReadC; 6 | extern PPIPortWrite PPI0PortWriteA; 7 | extern PPIPortWrite PPI0PortWriteB; 8 | extern PPIPortWrite PPI0PortWriteC; 9 | extern PPIPortRead PPI1PortReadA; 10 | extern PPIPortRead PPI1PortReadB; 11 | extern PPIPortRead PPI1PortReadC; 12 | extern PPIPortWrite PPI1PortWriteA; 13 | extern PPIPortWrite PPI1PortWriteB; 14 | extern PPIPortWrite PPI1PortWriteC; 15 | extern PPIPortRead PPI2PortReadA; 16 | extern PPIPortRead PPI2PortReadB; 17 | extern PPIPortRead PPI2PortReadC; 18 | extern PPIPortWrite PPI2PortWriteA; 19 | extern PPIPortWrite PPI2PortWriteB; 20 | extern PPIPortWrite PPI2PortWriteC; 21 | 22 | void ppi8255_init(INT32 num); 23 | void ppi8255_exit(); 24 | void ppi8255_scan(); 25 | UINT8 ppi8255_r(INT32 which, INT32 offset); 26 | void ppi8255_w(INT32 which, INT32 offset, UINT8 data); 27 | void ppi8255_set_portC( INT32 which, UINT8 data ); 28 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/devices/8257dma.h: -------------------------------------------------------------------------------- 1 | 2 | typedef UINT8 (*ior_in_functs)(UINT16 address); 3 | typedef void (*ior_out_functs)(UINT16 address, UINT8 data); 4 | 5 | void i8257Reset(); 6 | UINT8 i8257Read(UINT8 offset); 7 | void i8257Write(UINT8 offset, UINT8 data); 8 | void i8257_drq_write(int channel, int state); 9 | void i8257_do_transfer(int state); // call after last drq_write 10 | void i8257Init(); 11 | void i8257Config(UINT8 (*cpuread)(UINT16), void (*cpuwrite)(UINT16,UINT8), INT32 (*idle)(INT32), ior_in_functs *read_f, ior_out_functs *write_f); 12 | void i8257Scan(); 13 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/devices/eeprom.h: -------------------------------------------------------------------------------- 1 | 2 | typedef struct _eeprom_interface eeprom_interface; 3 | struct _eeprom_interface 4 | { 5 | INT32 address_bits; /* EEPROM has 2^address_bits cells */ 6 | INT32 data_bits; /* every cell has this many bits (8 or 16) */ 7 | const char *cmd_read; /* read command string, e.g. "0110" */ 8 | const char *cmd_write; /* write command string, e.g. "0111" */ 9 | const char *cmd_erase; /* erase command string, or 0 if n/a */ 10 | const char *cmd_lock; /* lock command string, or 0 if n/a */ 11 | const char *cmd_unlock; /* unlock command string, or 0 if n/a */ 12 | INT32 enable_multi_read; /* set to 1 to enable multiple values to be read from one read command */ 13 | INT32 reset_delay; /* number of times eeprom_read_bit() should return 0 after a reset, */ 14 | /* before starting to return 1. */ 15 | }; 16 | 17 | // default for most in fba 18 | const eeprom_interface eeprom_interface_93C46 = 19 | { 20 | 6, // address bits 6 21 | 16, // data bits 16 22 | "*110", // read 1 10 aaaaaa 23 | "*101", // write 1 01 aaaaaa dddddddddddddddd 24 | "*111", // erase 1 11 aaaaaa 25 | "*10000xxxx", // lock 1 00 00xxxx 26 | "*10011xxxx", // unlock 1 00 11xxxx 27 | 1, 28 | 0 29 | }; 30 | 31 | #define EEPROM_CLEAR_LINE 0 32 | #define EEPROM_ASSERT_LINE 1 33 | #define EEPROM_PULSE_LINE 2 34 | 35 | void EEPROMInit(const eeprom_interface *interface); 36 | void EEPROMReset(); 37 | void EEPROMExit(); 38 | 39 | INT32 EEPROMAvailable(); // are we loading an eeprom file? 40 | 41 | INT32 EEPROMRead(); 42 | 43 | // Write each individually 44 | void EEPROMWriteBit(INT32 bit); 45 | void EEPROMSetCSLine(INT32 state); 46 | void EEPROMSetClockLine(INT32 state); 47 | 48 | // Or all at once 49 | #define EEPROMWrite(clock, cs, bit) \ 50 | EEPROMWriteBit(bit); \ 51 | EEPROMSetCSLine(cs ? EEPROM_CLEAR_LINE : EEPROM_ASSERT_LINE); \ 52 | EEPROMSetClockLine(clock ? EEPROM_ASSERT_LINE : EEPROM_CLEAR_LINE) 53 | 54 | void EEPROMFill(const UINT8 *data, INT32 offset, INT32 length); 55 | 56 | void EEPROMScan(INT32 nAction, INT32* pnMin); 57 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/devices/joyprocess.h: -------------------------------------------------------------------------------- 1 | // ---[ ProcessJoystick() Flags (grep ProcessJoystick in drv/pre90s for examples) 2 | #define INPUT_4WAY 0x02 // convert 8-way inputs to 4-way 3 | #define INPUT_CLEAROPPOSITES 0x04 // disallow up+down or left+right 4 | #define INPUT_MAKEACTIVELOW 0x08 // input is active-high, make active-low after processing 5 | #define INPUT_ISACTIVELOW 0x10 // input is active-low to begin with 6 | 7 | void ProcessJoystick(UINT8 *input, INT8 playernum, INT8 up_bit, INT8 down_bit, INT8 left_bit, INT8 right_bit, UINT8 flags); 8 | void CompileInput(UINT8 **input, void *output, INT32 num, INT32 bits, UINT32 *init); 9 | 10 | // ---[ ProcessAnalog() flags 11 | // by default, it centers at the midpoint between scalemin and scalemax. 12 | // use INPUT_LINEAR to change to linear-mode. 13 | #define INPUT_DEADZONE 0x01 14 | #define INPUT_LINEAR 0x02 15 | 16 | // for analog pedals, allows a mapped digital button to work 17 | #define INPUT_MIGHTBEDIGITAL 0x04 18 | 19 | UINT8 ProcessAnalog(INT16 anaval, INT32 reversed, INT32 flags, UINT8 scalemin, UINT8 scalemax); 20 | UINT8 ProcessAnalog(INT16 anaval, INT32 reversed, INT32 flags, UINT8 scalemin, UINT8 scalemax, UINT8 centerval); 21 | 22 | INT16 AnalogDeadZone(INT16 anaval); 23 | 24 | UINT32 scalerange(UINT32 x, UINT32 in_min, UINT32 in_max, UINT32 out_min, UINT32 out_max); 25 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/devices/pandora.h: -------------------------------------------------------------------------------- 1 | extern INT32 pandora_flipscreen; 2 | 3 | void pandora_set_clear(INT32 clear); 4 | void pandora_update(UINT16 *dest); 5 | void pandora_buffer_sprites(); 6 | void pandora_init(UINT8 *ram, UINT8 *gfx, INT32 color_offset, INT32 x, INT32 y); 7 | void pandora_exit(); 8 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/devices/seibusnd.h: -------------------------------------------------------------------------------- 1 | #include "burn_ym3812.h" 2 | #include "burn_ym2151.h" 3 | #include "burn_ym2203.h" 4 | #include "msm6295.h" 5 | 6 | extern UINT8 *SeibuZ80DecROM; 7 | extern UINT8 *SeibuZ80ROM; 8 | extern UINT8 *SeibuZ80RAM; 9 | 10 | extern INT32 seibu_coin_input; 11 | 12 | unsigned char seibu_main_word_read(INT32 offset); 13 | void seibu_main_word_write(INT32 offset, UINT8 data); 14 | void seibu_sound_mustb_write_word(INT32 offset, UINT8 data); 15 | 16 | void seibu_sound_reset(); 17 | 18 | void seibu_sound_update(INT16 *pbuf, INT32 nLen); 19 | 20 | /* 21 | Type 0 - YM3812 22 | Type 1 - YM2151 23 | Type 2 - YM2203 24 | 25 | all init a single oki6295 26 | add 4 to init a second oki6295 27 | */ 28 | 29 | void seibu_sound_init(INT32 type, INT32 encrypted_len, INT32 freq0 /*cpu*/, INT32 freq1 /*ym*/, INT32 freq2 /*oki*/); 30 | void seibu_sound_exit(); 31 | 32 | void seibu_sound_scan(INT32 *pnMin, INT32 nAction); 33 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/devices/sknsspr.h: -------------------------------------------------------------------------------- 1 | void skns_sprite_kludge(int x, int y); 2 | void skns_draw_sprites(UINT16 *bitmap, UINT32* spriteram_source, INT32 spriteram_size, UINT8* gfx_source, INT32 gfx_length, UINT32* sprite_regs, INT32 disable_priority); 3 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/devices/slapstic.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | 3 | Atari Slapstic decoding helper 4 | 5 | ************************************************************************** 6 | 7 | For more information on the slapstic, see slapstic.html, or go to 8 | http://www.aarongiles.com/slapstic.html 9 | 10 | *************************************************************************/ 11 | 12 | void SlapsticInit(INT32 chip); 13 | void SlapsticReset(void); 14 | 15 | INT32 SlapsticBank(void); 16 | INT32 SlapsticTweak(INT32 offset); 17 | 18 | void SlapsticScan(INT32 nAction); 19 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/devices/timekpr.h: -------------------------------------------------------------------------------- 1 | #define TIMEKEEPER_M48T02 1 2 | #define TIMEKEEPER_M48T35 2 3 | #define TIMEKEEPER_M48T37 3 4 | #define TIMEKEEPER_M48T58 4 5 | #define TIMEKEEPER_MK48T08 5 6 | 7 | UINT8 TimeKeeperRead(UINT32 offset); 8 | void TimeKeeperWrite(INT32 offset, UINT8 data); 9 | void TimeKeeperTick(); 10 | void TimeKeeperInit(INT32 type, UINT8 *data); 11 | void TimeKeeperExit(); 12 | void TimeKeeperScan(INT32 nAction); 13 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/devices/v3021.cpp: -------------------------------------------------------------------------------- 1 | /* v3021 Calendar Emulation */ 2 | 3 | #include "burnint.h" 4 | 5 | static UINT8 CalVal, CalMask, CalCom=0, CalCnt=0; 6 | 7 | static UINT8 bcd(UINT8 data) 8 | { 9 | return ((data / 10) << 4) | (data % 10); 10 | } 11 | 12 | UINT8 v3021Read() 13 | { 14 | UINT8 calr; 15 | calr = (CalVal & CalMask) ? 1 : 0; 16 | CalMask <<= 1; 17 | return calr; 18 | } 19 | 20 | void v3021Write(UINT16 data) 21 | { 22 | time_t nLocalTime = time(NULL); 23 | tm* tmLocalTime = localtime(&nLocalTime); 24 | 25 | CalCom <<= 1; 26 | CalCom |= data & 1; 27 | ++CalCnt; 28 | if(CalCnt==4) 29 | { 30 | CalMask = 1; 31 | CalVal = 1; 32 | CalCnt = 0; 33 | 34 | switch(CalCom & 0xf) 35 | { 36 | case 0x1: case 0x3: case 0x5: case 0x7: case 0x9: case 0xb: case 0xd: 37 | CalVal++; 38 | break; 39 | 40 | case 0x0: // Day 41 | CalVal=bcd(tmLocalTime->tm_wday); 42 | break; 43 | 44 | case 0x2: // Hours 45 | CalVal=bcd(tmLocalTime->tm_hour); 46 | break; 47 | 48 | case 0x4: // Seconds 49 | CalVal=bcd(tmLocalTime->tm_sec); 50 | break; 51 | 52 | case 0x6: // Month 53 | CalVal=bcd(tmLocalTime->tm_mon + 1); // not bcd in MVS 54 | break; 55 | 56 | case 0x8: // Milliseconds? 57 | CalVal=0; 58 | break; 59 | 60 | case 0xa: // Day 61 | CalVal=bcd(tmLocalTime->tm_mday); 62 | break; 63 | 64 | case 0xc: // Minute 65 | CalVal=bcd(tmLocalTime->tm_min); 66 | break; 67 | 68 | case 0xe: // Year 69 | CalVal=bcd(tmLocalTime->tm_year % 100); 70 | break; 71 | 72 | case 0xf: // Load Date 73 | tmLocalTime = localtime(&nLocalTime); 74 | break; 75 | } 76 | } 77 | } 78 | 79 | INT32 v3021Scan() 80 | { 81 | SCAN_VAR(CalVal); 82 | SCAN_VAR(CalMask); 83 | SCAN_VAR(CalCom); 84 | SCAN_VAR(CalCnt); 85 | 86 | return 0; 87 | } 88 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/devices/v3021.h: -------------------------------------------------------------------------------- 1 | /* v3021 Calendar Emulation */ 2 | 3 | UINT8 v3021Read(); 4 | void v3021Write(UINT16 data); 5 | 6 | INT32 v3021Scan(); 7 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/devices/vdc.h: -------------------------------------------------------------------------------- 1 | 2 | // video 3 | void vdc_reset(); 4 | void vdc_write(int which, UINT8 offset, UINT8 data); 5 | UINT8 vdc_read(int which, UINT8 offset); 6 | extern UINT8 *vdc_vidram[2]; 7 | extern UINT16 *vdc_tmp_draw; 8 | 9 | void pce_interrupt(); // update scanline... 10 | void sgx_interrupt(); 11 | 12 | void vdc_get_dimensions(INT32 which, INT32 *x, INT32 *y); // get resolution 13 | 14 | void sgx_vdc_write(UINT8 offset, UINT8 data); 15 | UINT8 sgx_vdc_read(UINT8 offset); 16 | 17 | 18 | // priority 19 | void vpc_reset(); 20 | void vpc_write(UINT8 offset, UINT8 data); 21 | UINT8 vpc_read(UINT8 offset); 22 | 23 | // palette 24 | void vce_reset(); 25 | void vce_palette_init(UINT32 *Palette); 26 | void vce_write(UINT8 offset, UINT8 data); 27 | UINT8 vce_read(UINT8 offset); 28 | extern UINT16 *vce_data; 29 | 30 | INT32 vdc_scan(INT32 nAction, INT32 *pnMin); 31 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/driver.h: -------------------------------------------------------------------------------- 1 | /* 2 | * For the MAME sound cores 3 | */ 4 | 5 | #ifndef DRIVER_H 6 | #define DRIVER_H 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #if !defined (_WIN32) 14 | #define __cdecl 15 | #endif 16 | 17 | #ifndef INLINE 18 | #define INLINE __inline static 19 | #endif 20 | 21 | #define FBA 22 | 23 | typedef unsigned char UINT8; 24 | typedef signed char INT8; 25 | typedef unsigned short UINT16; 26 | typedef signed short INT16; 27 | typedef unsigned int UINT32; 28 | typedef signed int INT32; 29 | #ifdef _MSC_VER 30 | typedef signed __int64 INT64; 31 | typedef unsigned __int64 UINT64; 32 | #else 33 | __extension__ typedef unsigned long long UINT64; 34 | __extension__ typedef long long INT64; 35 | #endif 36 | #define OSD_CPU_H 37 | 38 | /* OPN */ 39 | #define HAS_YM2203 1 40 | #define HAS_YM2608 1 41 | #define HAS_YM2610 1 42 | #define HAS_YM2610B 1 43 | #define HAS_YM2612 1 44 | #define HAS_YM3438 1 45 | /* OPL */ 46 | #define HAS_YM3812 1 47 | #define HAS_YM3526 1 48 | #define HAS_Y8950 1 49 | 50 | enum { 51 | CLEAR_LINE = 0, 52 | ASSERT_LINE, 53 | HOLD_LINE, 54 | PULSE_LINE 55 | }; 56 | 57 | #define timer_get_time() BurnTimerGetTime() 58 | 59 | #define READ8_HANDLER(name) UINT8 name(void) 60 | #define WRITE8_HANDLER(name) void name(UINT8 data) 61 | 62 | #ifdef _MSC_VER 63 | #define ALIGN_VAR(x) __declspec(align(x)) 64 | #else 65 | #define ALIGN_VAR(x) __attribute__((aligned(x))) 66 | #endif 67 | 68 | #ifdef __cplusplus 69 | extern "C" { 70 | #endif 71 | double BurnTimerGetTime(void); 72 | 73 | typedef UINT8 (*read8_handler)(UINT32 offset); 74 | typedef void (*write8_handler)(UINT32 offset, UINT32 data); 75 | 76 | #ifdef __cplusplus 77 | } 78 | #endif 79 | 80 | #endif /* DRIVER_H */ 81 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/capcom/cps_draw.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/fbalpha2012/77167cea72e808384c136c8c163a6b4975ce7a84/svn-current/trunk/src/burn/drv/capcom/cps_draw.cpp -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/capcom/cps_pal.cpp: -------------------------------------------------------------------------------- 1 | #include "cps.h" 2 | #include "bitswap.h" 3 | 4 | // CPS (palette) 5 | 6 | static UINT8* CpsPalSrc = NULL; // Copy of current input palette 7 | UINT32* CpsPal = NULL; // Hicolor version of palette 8 | INT32 nCpsPalCtrlReg; 9 | INT32 bCpsUpdatePalEveryFrame = 0; // Some of the hacks need this as they don't write to CpsReg 0x0a 10 | 11 | INT32 CpsPalInit() 12 | { 13 | INT32 nLen = 0; 14 | 15 | nLen = 0xc00 * sizeof(UINT16); 16 | CpsPalSrc = (UINT8*)BurnMalloc(nLen); 17 | if (CpsPalSrc == NULL) { 18 | return 1; 19 | } 20 | memset(CpsPalSrc, 0, nLen); 21 | 22 | nLen = 0xc00 * sizeof(UINT32); 23 | CpsPal = (UINT32*)BurnMalloc(nLen); 24 | if (CpsPal == NULL) { 25 | return 1; 26 | } 27 | 28 | return 0; 29 | } 30 | 31 | INT32 CpsPalExit() 32 | { 33 | BurnFree(CpsPal); 34 | BurnFree(CpsPalSrc); 35 | return 0; 36 | } 37 | 38 | // Update CpsPal with the new palette at pNewPal (length 0xc00 bytes) 39 | INT32 CpsPalUpdate(UINT8* pNewPal) 40 | { 41 | UINT16 *ps, *pn; 42 | 43 | ps = (UINT16*)CpsPalSrc; 44 | pn = (UINT16*)pNewPal; 45 | 46 | memcpy(ps, pn, 0xc00 * sizeof(UINT16)); 47 | 48 | INT32 nCtrl = CpsReg[nCpsPalCtrlReg]; 49 | UINT16 *PaletteRAM = (UINT16*)CpsPalSrc; 50 | 51 | for (INT32 nPage = 0; nPage < 6; nPage++) { 52 | if (BIT(nCtrl, nPage)) { 53 | for (INT32 Offset = 0; Offset < 0x200; ++Offset) { 54 | INT32 Palette = BURN_ENDIAN_SWAP_INT16(*(PaletteRAM++)); 55 | INT32 r, g, b, Bright; 56 | 57 | Bright = 0x0f + ((Palette >> 12) << 1); 58 | 59 | r = ((Palette >> 8) & 0x0f) * 0x11 * Bright / 0x2d; 60 | g = ((Palette >> 4) & 0x0f) * 0x11 * Bright / 0x2d; 61 | b = ((Palette >> 0) & 0x0f) * 0x11 * Bright / 0x2d; 62 | 63 | CpsPal[(0x200 * nPage) + (Offset ^ 15)] = BurnHighCol(r, g, b, 0); 64 | } 65 | } else { 66 | if (PaletteRAM != (UINT16*)CpsPalSrc) { 67 | PaletteRAM += 0x200; 68 | } 69 | } 70 | } 71 | 72 | return 0; 73 | } 74 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/capcom/ctv.cpp: -------------------------------------------------------------------------------- 1 | #include "cps.h" 2 | 3 | // CPS Tile Variants 4 | // horizontal/vertical clip rolls 5 | UINT32 nCtvRollX=0,nCtvRollY=0; 6 | // Add 0x7fff after each pixel/line 7 | // If nRollX/Y&0x20004000 both == 0, you can draw the pixel 8 | 9 | UINT8 *pCtvTile=NULL; // Pointer to tile data 10 | INT32 nCtvTileAdd=0; // Amount to add after each tile line 11 | UINT8 *pCtvLine=NULL; // Pointer to output bitmap 12 | 13 | // Include all tile variants: 14 | #include "ctv.h" 15 | 16 | static INT32 nLastBpp=0; 17 | INT32 CtvReady() 18 | { 19 | // Set up the CtvDoX functions to point to the correct bpp functions. 20 | // Must be called before calling CpstOne 21 | if (nBurnBpp!=nLastBpp) 22 | { 23 | if (nBurnBpp==2) { 24 | memcpy(CtvDoX,CtvDo2,sizeof(CtvDoX)); 25 | memcpy(CtvDoXM,CtvDo2m,sizeof(CtvDoXM)); 26 | memcpy(CtvDoXB,CtvDo2b,sizeof(CtvDoXB)); 27 | } 28 | else if (nBurnBpp==3) { 29 | memcpy(CtvDoX,CtvDo3,sizeof(CtvDoX)); 30 | memcpy(CtvDoXM,CtvDo3m,sizeof(CtvDoXM)); 31 | memcpy(CtvDoXB,CtvDo3b,sizeof(CtvDoXB)); 32 | } 33 | else if (nBurnBpp==4) { 34 | memcpy(CtvDoX,CtvDo4,sizeof(CtvDoX)); 35 | memcpy(CtvDoXM,CtvDo4m,sizeof(CtvDoXM)); 36 | memcpy(CtvDoXB,CtvDo4b,sizeof(CtvDoXB)); 37 | } 38 | } 39 | nLastBpp=nBurnBpp; 40 | return 0; 41 | } 42 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/capcom/ps.cpp: -------------------------------------------------------------------------------- 1 | // PSound (CPS1 sound) 2 | #include "cps.h" 3 | #include "driver.h" 4 | extern "C" { 5 | #include "ym2151.h" 6 | } 7 | 8 | UINT8 PsndCode, PsndFade; // Sound code/fade sent to the z80 program 9 | 10 | static INT32 nSyncPeriod; 11 | static INT32 nSyncNext; 12 | 13 | static INT32 nCyclesDone; 14 | 15 | static void drvYM2151IRQHandler(INT32 nStatus) 16 | { 17 | if (nStatus) { 18 | ZetSetIRQLine(0xFF, ZET_IRQSTATUS_ACK); 19 | ZetRun(0x0800); 20 | } else { 21 | ZetSetIRQLine(0, ZET_IRQSTATUS_NONE); 22 | } 23 | } 24 | 25 | INT32 PsndInit() 26 | { 27 | nCpsZ80Cycles = 4000000 * 100 / nBurnFPS; 28 | nSyncPeriod = nCpsZ80Cycles / 32; 29 | 30 | // Init PSound z80 31 | if (PsndZInit()!= 0) { 32 | return 1; 33 | } 34 | 35 | // Init PSound mixing (not critical if it fails) 36 | PsmInit(); 37 | 38 | YM2151SetIrqHandler(0, &drvYM2151IRQHandler); 39 | 40 | PsndCode = 0; PsndFade = 0; 41 | 42 | nCyclesDone = 0; 43 | 44 | return 0; 45 | } 46 | 47 | INT32 PsndExit() 48 | { 49 | PsmExit(); 50 | PsndZExit(); 51 | 52 | return 0; 53 | } 54 | 55 | INT32 PsndScan(INT32 nAction) 56 | { 57 | if (nAction & ACB_DRIVER_DATA) { 58 | SCAN_VAR(nCyclesDone); SCAN_VAR(nSyncNext); 59 | PsndZScan(nAction); // Scan Z80 60 | SCAN_VAR(PsndCode); SCAN_VAR(PsndFade); // Scan sound info 61 | } 62 | return 0; 63 | } 64 | 65 | void PsndNewFrame() 66 | { 67 | ZetNewFrame(); 68 | PsmNewFrame(); 69 | nSyncNext = nSyncPeriod; 70 | 71 | ZetIdle(nCyclesDone % nCpsZ80Cycles); 72 | nCyclesDone = 0; 73 | } 74 | 75 | INT32 PsndSyncZ80(INT32 nCycles) 76 | { 77 | while (nSyncNext < nCycles) { 78 | PsmUpdate(nSyncNext * nBurnSoundLen / nCpsZ80Cycles); 79 | ZetRun(nSyncNext - ZetTotalCycles()); 80 | nSyncNext += nSyncPeriod; 81 | } 82 | 83 | nCyclesDone = ZetRun(nCycles - ZetTotalCycles()); 84 | 85 | return 0; 86 | } 87 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/capcom/ps_m.cpp: -------------------------------------------------------------------------------- 1 | #include "cps.h" 2 | #include "burn_ym2151.h" 3 | 4 | // CPS1 sound Mixing 5 | 6 | INT32 bPsmOkay = 0; // 1 if the module is okay 7 | static INT16* WaveBuf = NULL; 8 | 9 | static INT32 nPos; 10 | 11 | INT32 PsmInit() 12 | { 13 | INT32 nMemLen, nRate, nRet; 14 | bPsmOkay = 0; // not OK yet 15 | 16 | if (nBurnSoundRate > 0) { 17 | nRate = nBurnSoundRate; 18 | } else { 19 | nRate = 11025; 20 | } 21 | 22 | if (BurnYM2151Init(3579540)) { // Init FM sound chip 23 | return 1; 24 | } 25 | BurnYM2151SetAllRoutes(0.35, BURN_SND_ROUTE_BOTH); 26 | 27 | // Allocate a buffer for the intermediate sound (between YM2151 and pBurnSoundOut) 28 | nMemLen = nBurnSoundLen * 2 * sizeof(INT16); 29 | WaveBuf = (INT16*)BurnMalloc(nMemLen); 30 | if (WaveBuf == NULL) { 31 | PsmExit(); 32 | return 1; 33 | } 34 | memset(WaveBuf, 0, nMemLen); // Init to silence 35 | 36 | // Init ADPCM 37 | MSM6295ROM = CpsAd; 38 | if (Forgottn) { 39 | nRet = MSM6295Init(0, 6061, 1); 40 | } else { 41 | nRet = MSM6295Init(0, 7576, 1); 42 | } 43 | MSM6295SetRoute(0, 0.30, BURN_SND_ROUTE_BOTH); 44 | 45 | if (nRet!=0) { 46 | PsmExit(); return 1; 47 | } 48 | 49 | bPsmOkay = 1; // OK 50 | 51 | return 0; 52 | } 53 | 54 | INT32 PsmExit() 55 | { 56 | bPsmOkay = 0; 57 | 58 | MSM6295Exit(0); 59 | 60 | BurnFree(WaveBuf); 61 | 62 | BurnYM2151Exit(); // Exit FM sound chip 63 | return 0; 64 | } 65 | 66 | void PsmNewFrame() 67 | { 68 | nPos = 0; 69 | } 70 | 71 | INT32 PsmUpdate(INT32 nEnd) 72 | { 73 | if (bPsmOkay == 0 || pBurnSoundOut == NULL) { 74 | return 1; 75 | } 76 | 77 | if (nEnd <= nPos) { 78 | return 0; 79 | } 80 | if (nEnd > nBurnSoundLen) { 81 | nEnd = nBurnSoundLen; 82 | } 83 | 84 | // Render FM 85 | BurnYM2151Render(pBurnSoundOut + (nPos << 1), nEnd - nPos); 86 | 87 | // Render ADPCM 88 | MSM6295Render(0, pBurnSoundOut + (nPos << 1), nEnd - nPos); 89 | 90 | nPos = nEnd; 91 | 92 | return 0; 93 | } 94 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/capcom/qs.cpp: -------------------------------------------------------------------------------- 1 | #include "cps.h" 2 | // QSound 3 | 4 | static INT32 nQsndCyclesExtra; 5 | 6 | static INT32 qsndTimerOver(INT32, INT32) 7 | { 8 | // bprintf(PRINT_NORMAL, _T(" - IRQ -> 1.\n")); 9 | ZetSetIRQLine(0xFF, ZET_IRQSTATUS_AUTO); 10 | 11 | return 0; 12 | } 13 | 14 | INT32 QsndInit() 15 | { 16 | INT32 nRate; 17 | 18 | // Init QSound z80 19 | if (QsndZInit()) { 20 | return 1; 21 | } 22 | BurnTimerInit(qsndTimerOver, NULL); 23 | 24 | if (Cps1Qs == 1) { 25 | nCpsZ80Cycles = 6000000 * 100 / nBurnFPS; 26 | BurnTimerAttachZet(6000000); 27 | } else { 28 | nCpsZ80Cycles = 8000000 * 100 / nBurnFPS; 29 | BurnTimerAttachZet(8000000); 30 | } 31 | 32 | if (nBurnSoundRate >= 0) { 33 | nRate = nBurnSoundRate; 34 | } else { 35 | nRate = 11025; 36 | } 37 | 38 | QscInit(nRate); // Init QSound chip 39 | 40 | return 0; 41 | } 42 | 43 | void QsndSetRoute(INT32 nIndex, double nVolume, INT32 nRouteDir) 44 | { 45 | QscSetRoute(nIndex, nVolume, nRouteDir); 46 | } 47 | 48 | void QsndReset() 49 | { 50 | ZetOpen(0); 51 | BurnTimerReset(); 52 | BurnTimerSetRetrig(0, 1.0 / 252.0); 53 | ZetClose(); 54 | 55 | nQsndCyclesExtra = 0; 56 | } 57 | 58 | void QsndExit() 59 | { 60 | QscExit(); // Exit QSound chip 61 | QsndZExit(); 62 | } 63 | 64 | INT32 QsndScan(INT32 nAction) 65 | { 66 | if (nAction & ACB_DRIVER_DATA) { 67 | QsndZScan(nAction); // Scan Z80 68 | QscScan(nAction); // Scan QSound Chip 69 | } 70 | 71 | return 0; 72 | } 73 | 74 | void QsndNewFrame() 75 | { 76 | ZetNewFrame(); 77 | 78 | ZetOpen(0); 79 | ZetIdle(nQsndCyclesExtra); 80 | 81 | QscNewFrame(); 82 | } 83 | 84 | void QsndEndFrame() 85 | { 86 | BurnTimerEndFrame(nCpsZ80Cycles); 87 | if (pBurnSoundOut) QscUpdate(nBurnSoundLen); 88 | 89 | nQsndCyclesExtra = ZetTotalCycles() - nCpsZ80Cycles; 90 | ZetClose(); 91 | } 92 | 93 | void QsndSyncZ80() 94 | { 95 | int nCycles = (INT64)SekTotalCycles() * nCpsZ80Cycles / nCpsCycles; 96 | 97 | if (nCycles <= ZetTotalCycles()) { 98 | return; 99 | } 100 | 101 | BurnTimerUpdate(nCycles); 102 | } 103 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/cave/cave.cpp: -------------------------------------------------------------------------------- 1 | #include "cave.h" 2 | 3 | INT32 nCaveXSize = 0, nCaveYSize = 0; 4 | INT32 nCaveXOffset = 0, nCaveYOffset = 0; 5 | INT32 nCaveExtraXOffset = 0, nCaveExtraYOffset = 0; 6 | INT32 nCaveRowModeOffset = 0; 7 | 8 | INT32 CaveScanGraphics() 9 | { 10 | SCAN_VAR(nCaveXOffset); 11 | SCAN_VAR(nCaveYOffset); 12 | 13 | SCAN_VAR(nCaveTileBank); 14 | 15 | SCAN_VAR(nCaveSpriteBank); 16 | SCAN_VAR(nCaveSpriteBankDelay); 17 | 18 | for (INT32 i = 0; i < 4; i++) { 19 | SCAN_VAR(CaveTileReg[i][0]); 20 | SCAN_VAR(CaveTileReg[i][1]); 21 | SCAN_VAR(CaveTileReg[i][2]); 22 | } 23 | 24 | return 0; 25 | } 26 | 27 | // This function fills the screen with the background colour 28 | void CaveClearScreen(UINT32 nColour) 29 | { 30 | if (nColour) { 31 | UINT32* pClear = (UINT32*)pBurnDraw; 32 | nColour = nColour | (nColour << 16); 33 | for (INT32 i = nCaveXSize * nCaveYSize / 16; i > 0 ; i--) { 34 | *pClear++ = nColour; 35 | *pClear++ = nColour; 36 | *pClear++ = nColour; 37 | *pClear++ = nColour; 38 | *pClear++ = nColour; 39 | *pClear++ = nColour; 40 | *pClear++ = nColour; 41 | *pClear++ = nColour; 42 | } 43 | } else { 44 | memset(pBurnDraw, 0, nCaveXSize * nCaveYSize * sizeof(INT16)); 45 | } 46 | } 47 | 48 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/cave/cave.h: -------------------------------------------------------------------------------- 1 | #include "burnint.h" 2 | #include "m68000_intf.h" 3 | #include "z80_intf.h" 4 | #include "eeprom.h" 5 | 6 | #define CAVE_REFRESHRATE (15625.0 / 271.5) 7 | 8 | inline static void CaveClearOpposites(UINT16* nJoystickInputs) 9 | { 10 | if ((*nJoystickInputs & 0x0003) == 0x0003) { 11 | *nJoystickInputs &= ~0x0003; 12 | } 13 | if ((*nJoystickInputs & 0x000C) == 0x000C) { 14 | *nJoystickInputs &= ~0x000C; 15 | } 16 | } 17 | 18 | // cave.cpp 19 | extern INT32 nCaveXSize, nCaveYSize; 20 | extern INT32 nCaveXOffset, nCaveYOffset; 21 | extern INT32 nCaveExtraXOffset, nCaveExtraYOffset; 22 | extern INT32 nCaveRowModeOffset; 23 | 24 | INT32 CaveScanGraphics(); 25 | void CaveClearScreen(UINT32 nColour); 26 | 27 | // cave_palette.cpp 28 | extern UINT32* CavePalette; 29 | 30 | extern UINT8* CavePalSrc; 31 | extern UINT8 CaveRecalcPalette; 32 | 33 | INT32 CavePalInit(INT32 nPalSize); 34 | INT32 CavePalExit(); 35 | INT32 CavePalUpdate4Bit(INT32 nOffset, INT32 nNumPalettes); 36 | INT32 CavePalUpdate8Bit(INT32 nOffset, INT32 nNumPalettes); 37 | 38 | void CavePalWriteByte(UINT32 nAddress, UINT8 byteValue); 39 | void CavePalWriteWord(UINT32 nAddress, UINT16 wordValue); 40 | 41 | // cave_tiles.cpp 42 | extern UINT8* CaveTileROM[4]; 43 | extern UINT8* CaveTileRAM[4]; 44 | 45 | extern UINT32 CaveTileReg[4][3]; 46 | extern INT32 nCaveTileBank; 47 | 48 | INT32 CaveTileRender(INT32 nMode); 49 | void CaveTileExit(); 50 | INT32 CaveTileInit(); 51 | INT32 CaveTileInitLayer(INT32 nLayer, INT32 nROMSize, INT32 nBitdepth, INT32 nOffset); 52 | 53 | // cave_sprite.cpp 54 | extern INT32 CaveSpriteVisibleXOffset; 55 | 56 | extern UINT8* CaveSpriteROM; 57 | extern UINT8* CaveSpriteRAM; 58 | 59 | extern INT32 nCaveSpriteBank; 60 | extern INT32 nCaveSpriteBankDelay; 61 | 62 | extern INT32 (*CaveSpriteBuffer)(); 63 | extern INT32 CaveSpriteRender(INT32 nLowPriority, INT32 nHighPriority); 64 | void CaveSpriteExit(); 65 | INT32 CaveSpriteInit(INT32 nType, INT32 nROMSize); 66 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/cave/cave_tile_render.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/fbalpha2012/77167cea72e808384c136c8c163a6b4975ce7a84/svn-current/trunk/src/burn/drv/cave/cave_tile_render.h -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/cps3/cps3.h: -------------------------------------------------------------------------------- 1 | #include "burnint.h" 2 | 3 | #ifndef HARDWARE_CAPCOM_CPS3 4 | #define HARDWARE_CAPCOM_CPS3 HARDWARE_MISC_MISC 5 | #endif 6 | 7 | #ifndef HARDWARE_CAPCOM_CPS3_NO_CD 8 | #define HARDWARE_CAPCOM_CPS3_NO_CD HARDWARE_CAPCOM_CPS3 9 | #endif 10 | 11 | extern UINT8 cps3_reset; 12 | extern UINT8 cps3_palette_change; 13 | 14 | extern UINT16 *Cps3CurPal; 15 | 16 | extern UINT32 cps3_key1, cps3_key2, cps3_isSpecial; 17 | extern UINT32 cps3_bios_test_hack, cps3_game_test_hack; 18 | extern UINT32 cps3_speedup_ram_address, cps3_speedup_code_address; 19 | extern UINT8 cps3_dip; 20 | extern UINT32 cps3_region_address, cps3_ncd_address; 21 | 22 | extern UINT8 Cps3But1[16]; 23 | extern UINT8 Cps3But2[16]; 24 | extern UINT8 Cps3But3[16]; 25 | 26 | INT32 cps3Init(); 27 | INT32 cps3Exit(); 28 | INT32 cps3Frame(); 29 | INT32 cps3Scan(INT32 nAction,INT32 *pnMin); 30 | 31 | // sound 32 | 33 | UINT8 __fastcall cps3SndReadByte(UINT32 addr); 34 | UINT16 __fastcall cps3SndReadWord(UINT32 addr); 35 | UINT32 __fastcall cps3SndReadLong(UINT32 addr); 36 | 37 | void __fastcall cps3SndWriteByte(UINT32 addr, UINT8 data); 38 | void __fastcall cps3SndWriteWord(UINT32 addr, UINT16 data); 39 | void __fastcall cps3SndWriteLong(UINT32 addr, UINT32 data); 40 | 41 | INT32 cps3SndInit(UINT8 *); 42 | void cps3SndSetRoute(INT32 nIndex, double nVolume, INT32 nRouteDir); 43 | void cps3SndReset(); 44 | void cps3SndExit(); 45 | void cps3SndUpdate(); 46 | 47 | INT32 cps3SndScan(INT32); 48 | 49 | #define BURN_SND_CPS3SND_ROUTE_1 0 50 | #define BURN_SND_CPS3SND_ROUTE_2 1 51 | 52 | #define cps3SndSetAllRoutes(v, d) \ 53 | cps3SndSetRoute(BURN_SND_CPS3SND_ROUTE_1, v, d); \ 54 | cps3SndSetRoute(BURN_SND_CPS3SND_ROUTE_2, v, d); 55 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/irem/irem_cpu.h: -------------------------------------------------------------------------------- 1 | extern const UINT8 gunforce_decryption_table[]; 2 | extern const UINT8 bomberman_decryption_table[]; 3 | extern const UINT8 lethalth_decryption_table[]; 4 | extern const UINT8 dynablaster_decryption_table[]; 5 | extern const UINT8 mysticri_decryption_table[]; 6 | extern const UINT8 majtitl2_decryption_table[]; 7 | extern const UINT8 hook_decryption_table[]; 8 | extern const UINT8 rtypeleo_decryption_table[]; 9 | extern const UINT8 inthunt_decryption_table[]; 10 | extern const UINT8 gussun_decryption_table[]; 11 | extern const UINT8 leagueman_decryption_table[]; 12 | extern const UINT8 psoldier_decryption_table[]; 13 | extern const UINT8 dsoccr94_decryption_table[]; 14 | extern const UINT8 matchit2_decryption_table[]; 15 | 16 | extern const UINT8 test_decryption_table[]; 17 | 18 | extern void irem_cpu_decrypt(INT32 cpu,const UINT8 *decryption_table, UINT8 *src,UINT8 *dest, INT32 size); 19 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/konami/k053251.cpp: -------------------------------------------------------------------------------- 1 | #include "burnint.h" 2 | 3 | static UINT8 K053251Ram[0x10]; 4 | static INT32 K053251PalIndex[6]; 5 | 6 | void K053251Reset() 7 | { 8 | memset (K053251Ram, 0, 16); 9 | memset (K053251PalIndex, 0, 5 * sizeof(INT32)); 10 | } 11 | 12 | void K053251Write(INT32 offset, INT32 data) 13 | { 14 | data &= 0x3f; 15 | offset &= 0x0f; 16 | 17 | K053251Ram[offset] = (UINT8)data; 18 | 19 | if (offset == 9) 20 | { 21 | for (INT32 i = 0; i < 3; i++) { 22 | K053251PalIndex[0+i] = 32 * ((data >> 2*i) & 0x03); 23 | } 24 | } 25 | else if (offset == 10) 26 | { 27 | for (INT32 i = 0; i < 2; i++) { 28 | K053251PalIndex[3+i] = 16 * ((data >> 3*i) & 0x07); 29 | } 30 | } 31 | } 32 | 33 | INT32 K053251GetPriority(INT32 idx) 34 | { 35 | return K053251Ram[idx & 0x0f]; 36 | } 37 | 38 | INT32 K053251GetPaletteIndex(INT32 idx) 39 | { 40 | return K053251PalIndex[idx]; 41 | } 42 | 43 | void K053251Scan(INT32 nAction) 44 | { 45 | struct BurnArea ba; 46 | 47 | if (nAction & ACB_MEMORY_RAM) { 48 | memset(&ba, 0, sizeof(ba)); 49 | ba.Data = K053251Ram; 50 | ba.nLen = 0x10; 51 | ba.szName = "K053251 Ram"; 52 | BurnAcb(&ba); 53 | 54 | SCAN_VAR(K053251PalIndex[0]); 55 | SCAN_VAR(K053251PalIndex[1]); 56 | SCAN_VAR(K053251PalIndex[2]); 57 | SCAN_VAR(K053251PalIndex[3]); 58 | SCAN_VAR(K053251PalIndex[4]); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/konami/k054000.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "burnint.h" 3 | 4 | static UINT8 K054000Ram[0x20]; 5 | 6 | void K054000Reset() 7 | { 8 | memset (K054000Ram, 0, 0x20); 9 | } 10 | 11 | void K054000Write(INT32 offset, INT32 data) 12 | { 13 | K054000Ram[offset & 0x1f] = data; 14 | } 15 | 16 | UINT8 K054000Read(INT32 offset) 17 | { 18 | INT32 Acx,Acy,Aax,Aay; 19 | INT32 Bcx,Bcy,Bax,Bay; 20 | 21 | offset &= 0x1f; 22 | if (offset != 0x18) return 0; 23 | 24 | Acx = (K054000Ram[0x01] << 16) | (K054000Ram[0x02] << 8) | K054000Ram[0x03]; 25 | Acy = (K054000Ram[0x09] << 16) | (K054000Ram[0x0a] << 8) | K054000Ram[0x0b]; 26 | if (K054000Ram[0x04] == 0xff) Acx+=3; 27 | if (K054000Ram[0x0c] == 0xff) Acy+=3; 28 | Aax = K054000Ram[0x06] + 1; 29 | Aay = K054000Ram[0x07] + 1; 30 | 31 | Bcx = (K054000Ram[0x15] << 16) | (K054000Ram[0x16] << 8) | K054000Ram[0x17]; 32 | Bcy = (K054000Ram[0x11] << 16) | (K054000Ram[0x12] << 8) | K054000Ram[0x13]; 33 | Bax = K054000Ram[0x0e] + 1; 34 | Bay = K054000Ram[0x0f] + 1; 35 | 36 | if (Acx + Aax < Bcx - Bax) return 1; 37 | if (Bcx + Bax < Acx - Aax) return 1; 38 | if (Acy + Aay < Bcy - Bay) return 1; 39 | if (Bcy + Bay < Acy - Aay) return 1; 40 | 41 | return 0; 42 | } 43 | 44 | void K054000Scan(INT32 nAction) 45 | { 46 | struct BurnArea ba; 47 | 48 | if (nAction & ACB_MEMORY_RAM) { 49 | memset(&ba, 0, sizeof(ba)); 50 | ba.Data = K054000Ram; 51 | ba.nLen = 0x20; 52 | ba.szName = "K054000 Ram"; 53 | BurnAcb(&ba); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/megadrive/d_megadrive.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/fbalpha2012/77167cea72e808384c136c8c163a6b4975ce7a84/svn-current/trunk/src/burn/drv/megadrive/d_megadrive.cpp -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/megadrive/megadrive.h: -------------------------------------------------------------------------------- 1 | #define SEGA_MD_ROM_LOAD_NORMAL 0x10 2 | #define SEGA_MD_ROM_LOAD16_WORD_SWAP 0x20 3 | #define SEGA_MD_ROM_LOAD16_BYTE 0x30 4 | #define SEGA_MD_ROM_LOAD16_WORD_SWAP_CONTINUE_040000_100000 0x40 5 | #define SEGA_MD_ROM_OFFS_000000 0x01 6 | #define SEGA_MD_ROM_OFFS_000001 0x02 7 | #define SEGA_MD_ROM_OFFS_020000 0x03 8 | #define SEGA_MD_ROM_OFFS_080000 0x04 9 | #define SEGA_MD_ROM_OFFS_100000 0x05 10 | #define SEGA_MD_ROM_OFFS_100001 0x06 11 | #define SEGA_MD_ROM_OFFS_200000 0x07 12 | #define SEGA_MD_ROM_OFFS_300000 0x08 13 | #define SEGA_MD_ROM_RELOAD_200000_200000 0x09 14 | #define SEGA_MD_ROM_RELOAD_100000_300000 0x0a 15 | 16 | extern UINT8 MegadriveReset; 17 | extern UINT8 bMegadriveRecalcPalette; 18 | extern UINT8 MegadriveJoy1[12]; 19 | extern UINT8 MegadriveJoy2[12]; 20 | extern UINT8 MegadriveJoy3[12]; 21 | extern UINT8 MegadriveJoy4[12]; 22 | extern UINT8 MegadriveDIP[2]; 23 | extern UINT16 *MegadriveCurPal; 24 | 25 | INT32 MegadriveInit(); 26 | INT32 MegadriveExit(); 27 | INT32 MegadriveFrame(); 28 | INT32 MegadriveScan(INT32 nAction, INT32 *pnMin); 29 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/neogeo/neo_text_render.h: -------------------------------------------------------------------------------- 1 | #define FN(a) RenderTile ## a 2 | #define FUNCTIONNAME(a) FN(a) 3 | 4 | #define ISOPAQUE 0 5 | 6 | #define ADVANCECOLUMN pPixel += (BPP >> 3) 7 | 8 | #define ADVANCEROW pTileRow += ((BPP >> 3) * nNeoScreenWidth) 9 | 10 | #if ISOPAQUE == 0 11 | #define OPACITY _TRANS 12 | #define TESTCOLOUR(x) x 13 | #elif ISOPAQUE == 1 14 | #define OPACITY _OPAQUE 15 | #define TESTCOLOUR(x) 1 16 | #else 17 | #error illegal isopaque value 18 | #endif 19 | 20 | #if BPP == 16 21 | #define PLOTPIXEL(a,b) if (TESTCOLOUR(b)) { \ 22 | *((UINT16*)pPixel) = (UINT16)pTilePalette[b]; \ 23 | } 24 | #elif BPP == 24 25 | #define PLOTPIXEL(a,b) if (TESTCOLOUR(b)) { \ 26 | UINT32 nRGB = pTilePalette[b]; \ 27 | pPixel[0] = (UINT8)nRGB; \ 28 | pPixel[1] = (UINT8)(nRGB >> 8); \ 29 | pPixel[2] = (UINT8)(nRGB >> 16); \ 30 | } 31 | #elif BPP == 32 32 | #define PLOTPIXEL(a,b) if (TESTCOLOUR(b)) { \ 33 | *((UINT32*)pPixel) = (UINT32)pTilePalette[b]; \ 34 | } 35 | #else 36 | #error unsupported bitdepth specified. 37 | #endif 38 | 39 | static void FUNCTIONNAME(BPP)() 40 | { 41 | UINT8 *pTileRow, *pPixel; 42 | INT32 y, nColour; 43 | 44 | for (y = 0, pTileRow = pTile; y < 8; y++, ADVANCEROW) { 45 | pPixel = pTileRow; 46 | 47 | nColour = *pTileData++; 48 | PLOTPIXEL(0,nColour >> 4); 49 | ADVANCECOLUMN; 50 | PLOTPIXEL(1,nColour & 0x0F); 51 | ADVANCECOLUMN; 52 | 53 | nColour = *pTileData++; 54 | PLOTPIXEL(2,nColour >> 4); 55 | ADVANCECOLUMN; 56 | PLOTPIXEL(3,nColour & 0x0F); 57 | ADVANCECOLUMN; 58 | 59 | nColour = *pTileData++; 60 | PLOTPIXEL(4,nColour >> 4); 61 | ADVANCECOLUMN; 62 | PLOTPIXEL(5,nColour & 0x0F); 63 | ADVANCECOLUMN; 64 | 65 | nColour = *pTileData++; 66 | PLOTPIXEL(6,nColour >> 4); 67 | ADVANCECOLUMN; 68 | PLOTPIXEL(7,nColour & 0x0F); 69 | } 70 | } 71 | 72 | #undef PLOTPIXEL 73 | #undef TESTCLIP 74 | #undef TESTCOLOUR 75 | #undef ADVANCEROW 76 | #undef ADVANCECOLUMN 77 | #undef CLIP 78 | #undef FUNCTIONNAME 79 | #undef FN 80 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/pce/d_pce.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/fbalpha2012/77167cea72e808384c136c8c163a6b4975ce7a84/svn-current/trunk/src/burn/drv/pce/d_pce.cpp -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/pce/pce.h: -------------------------------------------------------------------------------- 1 | extern UINT8 PCEPaletteRecalc; 2 | 3 | extern UINT8 PCEReset; 4 | extern UINT8 PCEJoy1[12]; 5 | extern UINT8 PCEJoy2[12]; 6 | extern UINT8 PCEJoy3[12]; 7 | extern UINT8 PCEJoy4[12]; 8 | extern UINT8 PCEJoy5[12]; 9 | extern UINT8 PCEDips[3]; 10 | 11 | INT32 PceGetZipName(char** pszName, UINT32 i); 12 | INT32 TgGetZipName(char** pszName, UINT32 i); 13 | INT32 SgxGetZipName(char** pszName, UINT32 i); 14 | 15 | INT32 PCEInit(); 16 | INT32 TG16Init(); 17 | INT32 SGXInit(); 18 | INT32 populousInit(); 19 | 20 | INT32 PCEExit(); 21 | INT32 PCEDraw(); 22 | INT32 PCEFrame(); 23 | INT32 PCEScan(INT32 nAction, INT32 *pnMin); 24 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/pre90s/d_dkong.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/fbalpha2012/77167cea72e808384c136c8c163a6b4975ce7a84/svn-current/trunk/src/burn/drv/pre90s/d_dkong.cpp -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/psikyo/psikyo.h: -------------------------------------------------------------------------------- 1 | #include "burnint.h" 2 | #include "m68000_intf.h" 3 | #include "z80_intf.h" 4 | 5 | // General 6 | enum { 7 | PSIKYO_HW_SAMURAIA, 8 | PSIKYO_HW_GUNBIRD, 9 | PSIKYO_HW_S1945, 10 | PSIKYO_HW_TENGAI 11 | }; 12 | 13 | extern INT32 PsikyoHardwareVersion; 14 | 15 | // palette 16 | INT32 PsikyoPalInit(); 17 | INT32 PsikyoPalExit(); 18 | INT32 PsikyoPalUpdate(); 19 | 20 | void PsikyoPalWriteByte(UINT32 nAddress, UINT8 byteValue); 21 | void PsikyoPalWriteWord(UINT32 nAddress, UINT16 wordValue); 22 | 23 | extern UINT8* PsikyoPalSrc; 24 | extern UINT8 PsikyoRecalcPalette; 25 | extern UINT32* PsikyoPalette; 26 | 27 | // Tile rendering 28 | INT32 PsikyoTileRender(); 29 | void PsikyoSetTileBank(INT32 nLayer, INT32 nBank); 30 | INT32 PsikyoTileInit(UINT32 nROMSize); 31 | void PsikyoTileExit(); 32 | 33 | extern UINT8* PsikyoTileROM; 34 | extern UINT8* PsikyoTileRAM[3]; 35 | 36 | extern bool bPsikyoClearBackground; 37 | 38 | // Sprite rendering 39 | INT32 PsikyoSpriteInit(INT32 nROMSize); 40 | void PsikyoSpriteExit(); 41 | INT32 PsikyoSpriteBuffer(); 42 | INT32 PsikyoSpriteRender(INT32 nLowPriority, INT32 nHighPriority); 43 | 44 | extern UINT8* PsikyoSpriteROM; 45 | extern UINT8* PsikyoSpriteRAM; 46 | extern UINT8* PsikyoSpriteLUT; 47 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/psikyo/psikyo_render.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/fbalpha2012/77167cea72e808384c136c8c163a6b4975ce7a84/svn-current/trunk/src/burn/drv/psikyo/psikyo_render.h -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/pst90s/nmk004.h: -------------------------------------------------------------------------------- 1 | extern UINT8 *NMK004OKIROM0; 2 | extern UINT8 *NMK004OKIROM1; 3 | extern UINT8 *NMK004PROGROM; 4 | 5 | void NMK004_init(); 6 | 7 | void NMK004Write(INT32, INT32 data); 8 | UINT8 NMK004Read(); 9 | 10 | void NMK004_irq(INT32 irq); 11 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/sega/fd1094.h: -------------------------------------------------------------------------------- 1 | #define FD1094_STATE_RESET 0x0100 2 | #define FD1094_STATE_IRQ 0x0200 3 | #define FD1094_STATE_RTE 0x0300 4 | 5 | INT32 fd1094_set_state(UINT8 *key, INT32 state); 6 | INT32 fd1094_decode(INT32 address, INT32 val, UINT8 *key, INT32 vector_fetch); 7 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/sega/genesis_vid.h: -------------------------------------------------------------------------------- 1 | #include "driver.h" 2 | 3 | extern UINT16 GenesisPaletteBase; 4 | extern UINT16 GenesisBgPalLookup[4]; 5 | extern UINT16 GenesisSpPalLookup[4]; 6 | 7 | INT32 StartGenesisVDP(INT32 ScreenNum, UINT32* pal); 8 | void GenesisVDPExit(); 9 | void GenesisVDPScan(); 10 | UINT16 GenesisVDPRead(UINT32 offset); 11 | void GenesisVDPWrite(UINT32 offset, UINT16 data); 12 | void vdp_drawline(UINT16 *bitmap, UINT32 line, INT32 bgfill); 13 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/sega/mc8123.h: -------------------------------------------------------------------------------- 1 | void mc8123_decrypt_rom(INT32 banknum, INT32 numbanks, UINT8 *pRom, UINT8 *pFetch, UINT8 *pKey); 2 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/sms/sms.h: -------------------------------------------------------------------------------- 1 | extern UINT8 SMSPaletteRecalc; 2 | 3 | extern UINT8 SMSReset; 4 | extern UINT8 MastInput[2]; 5 | extern UINT8 SMSDips[3]; 6 | extern UINT8 SMSJoy1[12]; 7 | INT32 SMSGetZipName(char** pszName, UINT32 i); 8 | 9 | INT32 SMSInit(); 10 | INT32 SMSExit(); 11 | INT32 SMSDraw(); 12 | INT32 SMSFrame(); 13 | INT32 SMSScan(INT32 nAction, INT32 *pnMin); 14 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/taito/taito_m68705.h: -------------------------------------------------------------------------------- 1 | #include "m6805_intf.h" 2 | 3 | struct m68705_interface { 4 | void (*portA_out)(UINT8 *data); 5 | void (*portB_out)(UINT8 *data); 6 | void (*portC_out)(UINT8 *data); 7 | void (*ddrA_out)(UINT8 *data); 8 | void (*ddrB_out)(UINT8 *data); 9 | void (*ddrC_out)(UINT8 *data); 10 | void (*portA_in)(); 11 | void (*portB_in)(); 12 | void (*portC_in)(); 13 | }; 14 | 15 | extern UINT8 portA_in; 16 | extern UINT8 portA_out; 17 | extern UINT8 ddrA; 18 | extern UINT8 portB_in; 19 | extern UINT8 portB_out; 20 | extern UINT8 ddrB; 21 | extern UINT8 portC_in; 22 | extern UINT8 portC_out; 23 | extern UINT8 ddrC; 24 | 25 | extern UINT8 from_main; 26 | extern UINT8 from_mcu; 27 | extern INT32 mcu_sent; 28 | extern INT32 main_sent; 29 | 30 | void m67805_taito_reset(); 31 | void m67805_taito_init(UINT8 *rom, UINT8 *ram, m68705_interface *interface); 32 | void m67805_taito_exit(); 33 | INT32 m68705_taito_scan(INT32 nAction); 34 | 35 | void standard_taito_mcu_write(INT32 data); 36 | INT32 standard_taito_mcu_read(); 37 | void standard_m68705_portB_out(UINT8 *data); 38 | void standard_m68705_portC_in(); 39 | 40 | extern m68705_interface standard_m68705_interface; 41 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/taito/tc0360pri.cpp: -------------------------------------------------------------------------------- 1 | // TC0360PRI 2 | 3 | #include "burnint.h" 4 | #include "taito_ic.h" 5 | 6 | UINT8 TC0360PRIRegs[16]; 7 | 8 | void TC0360PRIWrite(UINT32 Offset, UINT8 Data) 9 | { 10 | TC0360PRIRegs[Offset] = Data; 11 | } 12 | 13 | void TC0360PRIHalfWordWrite(UINT32 Offset, UINT16 Data) 14 | { 15 | TC0360PRIWrite(Offset, Data & 0xff); 16 | } 17 | 18 | void TC0360PRIHalfWordSwapWrite(UINT32 Offset, UINT16 Data) 19 | { 20 | if (Data & 0xff00) TC0360PRIWrite(Offset, (Data >> 8) & 0xff); 21 | } 22 | 23 | void TC0360PRIReset() 24 | { 25 | memset(TC0360PRIRegs, 0, 16); 26 | } 27 | 28 | void TC0360PRIInit() 29 | { 30 | TaitoIC_TC0360PRIInUse = 1; 31 | } 32 | 33 | void TC0360PRIExit() 34 | { 35 | memset(TC0360PRIRegs, 0, 16); 36 | } 37 | 38 | void TC0360PRIScan(INT32 nAction) 39 | { 40 | if (nAction & ACB_DRIVER_DATA) { 41 | SCAN_VAR(TC0360PRIRegs); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/toaplan/toa_gp9001_render.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/fbalpha2012/77167cea72e808384c136c8c163a6b4975ce7a84/svn-current/trunk/src/burn/drv/toaplan/toa_gp9001_render.h -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/drv/toaplan/toa_palette.cpp: -------------------------------------------------------------------------------- 1 | #include "toaplan.h" 2 | // Toaplan -- palette functions 3 | 4 | UINT8* ToaPalSrc; // Pointer to input palette 5 | UINT8* ToaPalSrc2; 6 | UINT32* ToaPalette; 7 | UINT32* ToaPalette2; 8 | INT32 nToaPalLen; 9 | 10 | UINT8 ToaRecalcPalette; // Set to 1 to force recalculation of the entire palette (not needed now) 11 | 12 | INT32 ToaPalInit() 13 | { 14 | return 0; 15 | } 16 | 17 | INT32 ToaPalExit() 18 | { 19 | return 0; 20 | } 21 | 22 | inline static UINT32 CalcCol(UINT16 nColour) 23 | { 24 | INT32 r = ((nColour & 0x001F) << 3) | r >> 5; // Red 25 | INT32 g = ((nColour & 0x03E0) >> 2) | g >> 5; // Green 26 | INT32 b = ((nColour & 0x7C00) >> 7) | b >> 5; // Blue 27 | 28 | return BurnHighCol(r, g, b, 0); 29 | } 30 | 31 | INT32 ToaPalUpdate() 32 | { 33 | UINT16* ps = (UINT16*)ToaPalSrc; 34 | UINT32* pd = ToaPalette; 35 | 36 | pBurnDrvPalette = ToaPalette; 37 | 38 | for (INT32 i = 0; i < nToaPalLen; i++) { 39 | UINT16 nColour = BURN_ENDIAN_SWAP_INT16(ps[i]); 40 | pd[i] = CalcCol(nColour); 41 | } 42 | return 0; 43 | } 44 | 45 | INT32 ToaPal2Update() 46 | { 47 | UINT16* ps = (UINT16*)ToaPalSrc2; 48 | UINT32* pd = ToaPalette2; 49 | 50 | // pBurnDrvPalette = ToaPalette2; 51 | 52 | for (INT32 i = 0; i < nToaPalLen; i++) { 53 | UINT16 nColour = BURN_ENDIAN_SWAP_INT16(ps[i]); 54 | pd[i] = CalcCol(nColour); 55 | } 56 | return 0; 57 | } 58 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/hiscore.h: -------------------------------------------------------------------------------- 1 | #ifndef _BURN_HISCORE_H 2 | #define _BURN_HISCORE_H 3 | 4 | extern INT32 EnableHiscores; 5 | 6 | void HiscoreInit(); 7 | void HiscoreReset(); 8 | void HiscoreApply(); 9 | void HiscoreExit(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/ay8910.h: -------------------------------------------------------------------------------- 1 | #ifndef AY8910_H 2 | #define AY8910_H 3 | 4 | #define MAX_8910 5 5 | #define ALL_8910_CHANNELS -1 6 | 7 | struct AY8910interface 8 | { 9 | INT32 num; /* total number of 8910 in the machine */ 10 | INT32 baseclock; 11 | INT32 mixing_level[MAX_8910]; 12 | read8_handler portAread[MAX_8910]; 13 | read8_handler portBread[MAX_8910]; 14 | write8_handler portAwrite[MAX_8910]; 15 | write8_handler portBwrite[MAX_8910]; 16 | ALIGN_VAR(8) void (*handler[MAX_8910])(INT32 irq); /* IRQ handler for the YM2203 */ 17 | }; 18 | 19 | extern INT32 ay8910_index_ym; 20 | 21 | void AY8910_set_clock(INT32 chip, INT32 clock); 22 | void AY8910Reset(INT32 chip); 23 | 24 | void AY8910Update(INT32 chip, INT16** buffer, INT32 length); 25 | 26 | void AY8910Write(INT32 chip, INT32 a, INT32 data); 27 | INT32 AY8910Read(INT32 chip); 28 | 29 | void AY8910Reset(INT32 chip); 30 | void AY8910Exit(INT32 chip); 31 | INT32 AY8910Init(INT32 chip, INT32 clock, INT32 sample_rate, 32 | read8_handler portAread, read8_handler portBread, 33 | write8_handler portAwrite, write8_handler portBwrite); 34 | 35 | INT32 AY8910InitYM(INT32 chip, INT32 clock, INT32 sample_rate, 36 | read8_handler portAread, read8_handler portBread, 37 | write8_handler portAwrite, write8_handler portBwrite, 38 | void (*update_callback)(void)); 39 | 40 | INT32 AY8910Scan(INT32 nAction, INT32* pnMin); 41 | 42 | INT32 AY8910SetPorts(INT32 chip, read8_handler portAread, read8_handler portBread, 43 | write8_handler portAwrite, write8_handler portBwrite); 44 | 45 | void AY8910Render(INT16** buffer, INT16* dest, INT32 length, INT32 bAddSignal); 46 | void AY8910SetRoute(INT32 chip, INT32 nIndex, double nVolume, INT32 nRouteDir); 47 | 48 | #define BURN_SND_AY8910_ROUTE_1 0 49 | #define BURN_SND_AY8910_ROUTE_2 1 50 | #define BURN_SND_AY8910_ROUTE_3 2 51 | 52 | #define AY8910SetAllRoutes(i, v, d) \ 53 | AY8910SetRoute(i, BURN_SND_AY8910_ROUTE_1, v, d); \ 54 | AY8910SetRoute(i, BURN_SND_AY8910_ROUTE_2, v, d); \ 55 | AY8910SetRoute(i, BURN_SND_AY8910_ROUTE_3, v, d); 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/burn_y8950.h: -------------------------------------------------------------------------------- 1 | #include "driver.h" 2 | extern "C" { 3 | #include "fmopl.h" 4 | } 5 | #include "timer.h" 6 | 7 | INT32 BurnTimerUpdateY8950(INT32 nCycles); 8 | void BurnTimerEndFrameY8950(INT32 nCycles); 9 | void BurnTimerUpdateEndY8950(); 10 | INT32 BurnTimerAttachSekY8950(INT32 nClockspeed); 11 | INT32 BurnTimerAttachZetY8950(INT32 nClockspeed); 12 | INT32 BurnTimerAttachM6809Y8950(INT32 nClockspeed); 13 | INT32 BurnTimerAttachHD6309Y8950(INT32 nClockspeed); 14 | INT32 BurnTimerAttachM6800Y8950(INT32 nClockspeed); 15 | INT32 BurnTimerAttachHD63701Y8950(INT32 nClockspeed); 16 | INT32 BurnTimerAttachM6803Y8950(INT32 nClockspeed); 17 | INT32 BurnTimerAttachM6502Y8950(INT32 nClockspeed); 18 | 19 | extern "C" void BurnY8950UpdateRequest(); 20 | 21 | INT32 BurnY8950Init(INT32 num, INT32 nClockFrequency, UINT8* Y8950ADPCM0ROM, INT32 nY8950ADPCM0Size, UINT8* Y8950ADPCM1ROM, INT32 nY8950ADPCM1Size, OPL_IRQHANDLER IRQCallback, INT32 (*StreamCallback)(INT32), INT32 bAddSignal); 22 | void BurnY8950SetRoute(INT32 nChip, INT32 nIndex, double nVolume, INT32 nRouteDir); 23 | void BurnY8950Reset(); 24 | void BurnY8950Exit(); 25 | extern void (*BurnY8950Update)(INT16* pSoundBuf, INT32 nSegmentEnd); 26 | void BurnY8950Scan(INT32 nAction, INT32* pnMin); 27 | 28 | #define BURN_SND_Y8950_ROUTE 0 29 | 30 | #define BurnY8950Read(i, a) Y8950Read(i, a) 31 | 32 | #if defined FBA_DEBUG 33 | #define BurnY8950Write(i, a, n) if (!DebugSnd_Y8950Initted) bprintf(PRINT_ERROR, _T("BurnY8950Write called without init\n")); Y8950Write(i, a, n) 34 | #else 35 | #define BurnY8950Write(i, a, n) Y8950Write(i, a, n) 36 | #endif 37 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/burn_ym2151.h: -------------------------------------------------------------------------------- 1 | // burn_ym2151.h 2 | #include "driver.h" 3 | extern "C" { 4 | #include "ym2151.h" 5 | } 6 | 7 | INT32 BurnYM2151Init(INT32 nClockFrequency); 8 | void BurnYM2151SetRoute(INT32 nIndex, double nVolume, INT32 nRouteDir); 9 | void BurnYM2151Reset(); 10 | void BurnYM2151Exit(); 11 | extern void (*BurnYM2151Render)(INT16* pSoundBuf, INT32 nSegmentLength); 12 | void BurnYM2151Scan(INT32 nAction); 13 | 14 | static inline void BurnYM2151SelectRegister(const UINT8 nRegister) 15 | { 16 | #if defined FBA_DEBUG 17 | if (!DebugSnd_YM2151Initted) bprintf(PRINT_ERROR, _T("BurnYM2151SelectRegister called without init\n")); 18 | #endif 19 | 20 | extern UINT32 nBurnCurrentYM2151Register; 21 | 22 | nBurnCurrentYM2151Register = nRegister; 23 | } 24 | 25 | static inline void BurnYM2151WriteRegister(const UINT8 nValue) 26 | { 27 | #if defined FBA_DEBUG 28 | if (!DebugSnd_YM2151Initted) bprintf(PRINT_ERROR, _T("BurnYM2151WriteRegister called without init\n")); 29 | #endif 30 | 31 | extern UINT32 nBurnCurrentYM2151Register; 32 | extern UINT8 BurnYM2151Registers[0x0100]; 33 | 34 | BurnYM2151Registers[nBurnCurrentYM2151Register] = nValue; 35 | YM2151WriteReg(0, nBurnCurrentYM2151Register, nValue); 36 | } 37 | 38 | #define BurnYM2151ReadStatus() YM2151ReadStatus(0) 39 | 40 | #if defined FBA_DEBUG 41 | #define BurnYM2151SetIrqHandler(h) if (!DebugSnd_YM2151Initted) bprintf(PRINT_ERROR, _T("BurnYM2151SetIrqHandler called without init\n")); YM2151SetIrqHandler(0, h) 42 | #define BurnYM2151SetPortHandler(h) if (!DebugSnd_YM2151Initted) bprintf(PRINT_ERROR, _T("BurnYM2151SetPortHandler called without init\n")); YM2151SetPortWriteHandler(0, h) 43 | #else 44 | #define BurnYM2151SetIrqHandler(h) YM2151SetIrqHandler(0, h) 45 | #define BurnYM2151SetPortHandler(h) YM2151SetPortWriteHandler(0, h) 46 | #endif 47 | 48 | #define BURN_SND_YM2151_YM2151_ROUTE_1 0 49 | #define BURN_SND_YM2151_YM2151_ROUTE_2 1 50 | 51 | #define BurnYM2151SetAllRoutes(v, d) \ 52 | BurnYM2151SetRoute(BURN_SND_YM2151_YM2151_ROUTE_1, v, d); \ 53 | BurnYM2151SetRoute(BURN_SND_YM2151_YM2151_ROUTE_2, v, d); 54 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/burn_ym2203.h: -------------------------------------------------------------------------------- 1 | // burn_ym2203.h 2 | #include "driver.h" 3 | extern "C" { 4 | #include "ay8910.h" 5 | #include "fm.h" 6 | } 7 | #include "timer.h" 8 | 9 | extern "C" void BurnYM2203UpdateRequest(); 10 | 11 | INT32 BurnYM2203Init(INT32 num, INT32 nClockFrequency, FM_IRQHANDLER IRQCallback, INT32 (*StreamCallback)(INT32), double (*GetTimeCallback)(), INT32 bAddSignal); 12 | void BurnYM2203SetRoute(INT32 nChip, INT32 nIndex, double nVolume, INT32 nRouteDir); 13 | void BurnYM2203SetLeftVolume(INT32 nChip, INT32 nIndex, double nLeftVolume); 14 | void BurnYM2203SetRightVolume(INT32 nChip, INT32 nIndex, double nRightVolume); 15 | void BurnYM2203Reset(); 16 | void BurnYM2203Exit(); 17 | extern void (*BurnYM2203Update)(INT16* pSoundBuf, INT32 nSegmentEnd); 18 | void BurnYM2203Scan(INT32 nAction, INT32* pnMin); 19 | 20 | extern INT32 bYM2203UseSeperateVolumes; 21 | 22 | #define BURN_SND_YM2203_YM2203_ROUTE 0 23 | #define BURN_SND_YM2203_AY8910_ROUTE_1 1 24 | #define BURN_SND_YM2203_AY8910_ROUTE_2 2 25 | #define BURN_SND_YM2203_AY8910_ROUTE_3 3 26 | 27 | #define BurnYM2203SetAllRoutes(i, v, d) \ 28 | BurnYM2203SetRoute(i, BURN_SND_YM2203_YM2203_ROUTE , v, d); \ 29 | BurnYM2203SetRoute(i, BURN_SND_YM2203_AY8910_ROUTE_1, v, d); \ 30 | BurnYM2203SetRoute(i, BURN_SND_YM2203_AY8910_ROUTE_2, v, d); \ 31 | BurnYM2203SetRoute(i, BURN_SND_YM2203_AY8910_ROUTE_3, v, d) 32 | 33 | #define BurnYM2203Read(i, a) YM2203Read(i, a) 34 | 35 | #if defined FBA_DEBUG 36 | #define BurnYM2203Write(i, a, n) if (!DebugSnd_YM2203Initted) bprintf(PRINT_ERROR, _T("BurnYM2203Write called without init\n")); YM2203Write(i, a, n) 37 | #define BurnYM2203SetPorts(c, read0, read1, write0, write1) if (!DebugSnd_YM2203Initted) bprintf(PRINT_ERROR, _T("BurnYM2203SetPorts called without init\n")); AY8910SetPorts(c, read0, read1, write0, write1) 38 | #else 39 | #define BurnYM2203Write(i, a, n) YM2203Write(i, a, n) 40 | #define BurnYM2203SetPorts(c, read0, read1, write0, write1) AY8910SetPorts(c, read0, read1, write0, write1) 41 | #endif 42 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/burn_ym2413.h: -------------------------------------------------------------------------------- 1 | // burn_ym2413.h 2 | #include "driver.h" 3 | extern "C" { 4 | #include "ym2413.h" 5 | } 6 | 7 | INT32 BurnYM2413Init(INT32 nClockFrequency); 8 | void BurnYM2413SetRoute(INT32 nIndex, double nVolume, INT32 nRouteDir); 9 | void BurnYM2413Reset(); 10 | void BurnYM2413Exit(); 11 | extern void (*BurnYM2413Render)(INT16* pSoundBuf, INT32 nSegmentLength); 12 | void BurnYM2413Scan(INT32 nAction); 13 | 14 | #define BurnYM2413Read(a) YM2413Read(0, a) 15 | 16 | static inline void BurnYM2413Write(INT32 Address, const UINT8 nValue) 17 | { 18 | #if defined FBA_DEBUG 19 | if (!DebugSnd_YM2413Initted) bprintf(PRINT_ERROR, _T("BurnYM2413Write called without init\n")); 20 | #endif 21 | 22 | YM2413Write(0, Address, nValue); 23 | } 24 | 25 | #define BURN_SND_YM2413_YM2413_ROUTE_1 0 26 | #define BURN_SND_YM2413_YM2413_ROUTE_2 1 27 | 28 | #define BurnYM2413SetAllRoutes(v, d) \ 29 | BurnYM2413SetRoute(BURN_SND_YM2413_YM2413_ROUTE_1, v, d); \ 30 | BurnYM2413SetRoute(BURN_SND_YM2413_YM2413_ROUTE_2, v, d); 31 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/burn_ym2608.h: -------------------------------------------------------------------------------- 1 | // burn_ym2608.h 2 | #include "driver.h" 3 | extern "C" { 4 | #include "ay8910.h" 5 | #include "fm.h" 6 | } 7 | #include "timer.h" 8 | 9 | extern "C" void BurnYM2608UpdateRequest(); 10 | 11 | INT32 BurnYM2608Init(INT32 nClockFrequency, UINT8* YM2608ADPCMROM, INT32* nYM2608ADPCMSize, FM_IRQHANDLER IRQCallback, INT32 (*StreamCallback)(INT32), double (*GetTimeCallback)(), INT32 bAddSignal); 12 | void BurnYM2608SetRoute(INT32 nIndex, double nVolume, INT32 nRouteDir); 13 | void BurnYM2608Reset(); 14 | void BurnYM2608Exit(); 15 | extern void (*BurnYM2608Update)(INT16* pSoundBuf, INT32 nSegmentEnd); 16 | void BurnYM2608Scan(INT32 nAction, INT32* pnMin); 17 | 18 | #define BURN_SND_YM2608_YM2608_ROUTE_1 0 19 | #define BURN_SND_YM2608_YM2608_ROUTE_2 1 20 | #define BURN_SND_YM2608_AY8910_ROUTE 2 21 | 22 | #define BurnYM2608SetAllRoutes(v, d) \ 23 | BurnYM2608SetRoute(BURN_SND_YM2608_YM2608_ROUTE_1, v, d); \ 24 | BurnYM2608SetRoute(BURN_SND_YM2608_YM2608_ROUTE_2, v, d); \ 25 | BurnYM2608SetRoute(BURN_SND_YM2608_AY8910_ROUTE , v, d); 26 | 27 | #define BurnYM2608Read(a) YM2608Read(0, a) 28 | 29 | #if defined FBA_DEBUG 30 | #define BurnYM2608Write(a, n) if (!DebugSnd_YM2608Initted) bprintf(PRINT_ERROR, _T("BurnYM2608Write called without init\n")); YM2608Write(0, a, n) 31 | #else 32 | #define BurnYM2608Write(a, n) YM2608Write(0, a, n) 33 | #endif 34 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/burn_ym2610.h: -------------------------------------------------------------------------------- 1 | // burn_ym2610.h 2 | #include "driver.h" 3 | extern "C" { 4 | #include "ay8910.h" 5 | #include "fm.h" 6 | } 7 | #include "timer.h" 8 | 9 | extern "C" void BurnYM2610UpdateRequest(); 10 | 11 | void BurnYM2610MapADPCMROM(UINT8* YM2610ADPCMAROM, INT32 nYM2610ADPCMASize, UINT8* YM2610ADPCMBROM, INT32 nYM2610ADPCMBSize); 12 | INT32 BurnYM2610Init(INT32 nClockFrequency, UINT8* YM2610ADPCMAROM, INT32* nYM2610ADPCMASize, UINT8* YM2610ADPCMBROM, INT32* nYM2610ADPCMBSize, FM_IRQHANDLER IRQCallback, INT32 (*StreamCallback)(INT32), double (*GetTimeCallback)(), INT32 bAddSignal); 13 | void BurnYM2610SetRoute(INT32 nIndex, double nVolume, INT32 nRouteDir); 14 | void BurnYM2610SetLeftVolume(INT32 nIndex, double nLeftVolume); 15 | void BurnYM2610SetRightVolume(INT32 nIndex, double nRightVolume); 16 | void BurnYM2610Reset(); 17 | void BurnYM2610Exit(); 18 | extern void (*BurnYM2610Update)(INT16* pSoundBuf, INT32 nSegmentEnd); 19 | void BurnYM2610Scan(INT32 nAction, INT32* pnMin); 20 | 21 | extern INT32 bYM2610UseSeperateVolumes; 22 | 23 | #define BURN_SND_YM2610_YM2610_ROUTE_1 0 24 | #define BURN_SND_YM2610_YM2610_ROUTE_2 1 25 | #define BURN_SND_YM2610_AY8910_ROUTE 2 26 | 27 | #define BurnYM2610SetAllRoutes(v, d) \ 28 | BurnYM2610SetRoute(BURN_SND_YM2610_YM2610_ROUTE_1, v, d); \ 29 | BurnYM2610SetRoute(BURN_SND_YM2610_YM2610_ROUTE_2, v, d); \ 30 | BurnYM2610SetRoute(BURN_SND_YM2610_AY8910_ROUTE , v, d); 31 | 32 | #define BurnYM2610Read(a) YM2610Read(0, a) 33 | 34 | #if defined FBA_DEBUG 35 | #define BurnYM2610Write(a, n) if (!DebugSnd_YM2610Initted) bprintf(PRINT_ERROR, _T("BurnYM2610Write called without init\n")); YM2610Write(0, a, n) 36 | #else 37 | #define BurnYM2610Write(a, n) YM2610Write(0, a, n) 38 | #endif 39 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/burn_ym3526.h: -------------------------------------------------------------------------------- 1 | #include "driver.h" 2 | extern "C" { 3 | #include "fmopl.h" 4 | } 5 | #include "timer.h" 6 | 7 | INT32 BurnTimerUpdateYM3526(INT32 nCycles); 8 | void BurnTimerEndFrameYM3526(INT32 nCycles); 9 | INT32 BurnTimerAttachSekYM3526(INT32 nClockspeed); 10 | INT32 BurnTimerAttachZetYM3526(INT32 nClockspeed); 11 | INT32 BurnTimerAttachM6809YM3526(INT32 nClockspeed); 12 | INT32 BurnTimerAttachHD6309YM3526(INT32 nClockspeed); 13 | INT32 BurnTimerAttachM6800YM3526(INT32 nClockspeed); 14 | INT32 BurnTimerAttachHD63701YM3526(INT32 nClockspeed); 15 | INT32 BurnTimerAttachM6803YM3526(INT32 nClockspeed); 16 | INT32 BurnTimerAttachM6502YM3526(INT32 nClockspeed); 17 | 18 | extern "C" void BurnYM3526UpdateRequest(); 19 | 20 | INT32 BurnYM3526Init(INT32 nClockFrequency, OPL_IRQHANDLER IRQCallback, INT32 (*StreamCallback)(INT32), INT32 bAddSignal); 21 | void BurnYM3526SetRoute(INT32 nIndex, double nVolume, INT32 nRouteDir); 22 | void BurnYM3526Reset(); 23 | void BurnYM3526Exit(); 24 | extern void (*BurnYM3526Update)(INT16* pSoundBuf, INT32 nSegmentEnd); 25 | void BurnYM3526Scan(INT32 nAction, INT32* pnMin); 26 | 27 | #define BURN_SND_YM3526_ROUTE 0 28 | 29 | #define BurnYM3526Read(a) YM3526Read(0, a) 30 | 31 | #if defined FBA_DEBUG 32 | #define BurnYM3526Write(a, n) if (!DebugSnd_YM3526Initted) bprintf(PRINT_ERROR, _T("BurnYM3526Write called without init\n")); YM3526Write(0, a, n) 33 | #else 34 | #define BurnYM3526Write(a, n) YM3526Write(0, a, n) 35 | #endif 36 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/burn_ym3812.h: -------------------------------------------------------------------------------- 1 | #include "driver.h" 2 | extern "C" { 3 | #include "fmopl.h" 4 | } 5 | #include "timer.h" 6 | 7 | INT32 BurnTimerUpdateYM3812(INT32 nCycles); 8 | void BurnTimerEndFrameYM3812(INT32 nCycles); 9 | void BurnTimerUpdateEndYM3812(); 10 | INT32 BurnTimerAttachSekYM3812(INT32 nClockspeed); 11 | INT32 BurnTimerAttachZetYM3812(INT32 nClockspeed); 12 | INT32 BurnTimerAttachM6809YM3812(INT32 nClockspeed); 13 | INT32 BurnTimerAttachHD6309YM3812(INT32 nClockspeed); 14 | INT32 BurnTimerAttachM6800YM3812(INT32 nClockspeed); 15 | INT32 BurnTimerAttachHD63701YM3812(INT32 nClockspeed); 16 | INT32 BurnTimerAttachM6803YM3812(INT32 nClockspeed); 17 | INT32 BurnTimerAttachM6502YM3812(INT32 nClockspeed); 18 | INT32 BurnTimerAttachH6280YM3812(INT32 nClockspeed); 19 | 20 | extern "C" void BurnYM3812UpdateRequest(); 21 | 22 | INT32 BurnYM3812Init(INT32 nClockFrequency, OPL_IRQHANDLER IRQCallback, INT32 (*StreamCallback)(INT32), INT32 bAddSignal); 23 | void BurnYM3812SetRoute(INT32 nIndex, double nVolume, INT32 nRouteDir); 24 | void BurnYM3812Reset(); 25 | void BurnYM3812Exit(); 26 | extern void (*BurnYM3812Update)(INT16* pSoundBuf, INT32 nSegmentEnd); 27 | void BurnYM3812Scan(INT32 nAction, INT32* pnMin); 28 | 29 | #define BURN_SND_YM3812_ROUTE 0 30 | 31 | #define BurnYM3812Read(a) YM3812Read(0, a) 32 | 33 | #if defined FBA_DEBUG 34 | #define BurnYM3812Write(a, n) if (!DebugSnd_YM3812Initted) bprintf(PRINT_ERROR, _T("BurnYM3812Write called without init\n")); YM3812Write(0, a, n) 35 | #else 36 | #define BurnYM3812Write(a, n) YM3812Write(0, a, n) 37 | #endif 38 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/burn_ymf278b.h: -------------------------------------------------------------------------------- 1 | #include "driver.h" 2 | extern "C" { 3 | #include "ymf278b.h" 4 | } 5 | 6 | #include "timer.h" 7 | 8 | void BurnYMF278BSelectRegister(INT32 nRegister, UINT8 nValue); 9 | void BurnYMF278BWriteRegister(INT32 nRegister, UINT8 nValue); 10 | UINT8 BurnYMF278BReadStatus(); 11 | UINT8 BurnYMF278BReadData(); 12 | 13 | INT32 BurnYMF278BInit(INT32 nClockFrequency, UINT8* YMF278BROM, void (*IRQCallback)(INT32, INT32), INT32 (*StreamCallback)(INT32)); 14 | void BurnYMF278BSetRoute(INT32 nIndex, double nVolume, INT32 nRouteDir); 15 | void BurnYMF278BReset(); 16 | void BurnYMF278BExit(); 17 | void BurnYMF278BUpdate(INT32 nSegmentEnd); 18 | void BurnYMF278BScan(INT32 nAction, INT32* pnMin); 19 | 20 | #define BURN_SND_YMF278B_YMF278B_ROUTE_1 0 21 | #define BURN_SND_YMF278B_YMF278B_ROUTE_2 1 22 | 23 | #define BurnYMF278BSetAllRoutes(v, d) \ 24 | BurnYMF278BSetRoute(BURN_SND_YMF278B_YMF278B_ROUTE_1, v, d); \ 25 | BurnYMF278BSetRoute(BURN_SND_YMF278B_YMF278B_ROUTE_2, v, d); 26 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/c6280.h: -------------------------------------------------------------------------------- 1 | 2 | void c6280_init(double clk, INT32 bAdd); 3 | void c6280_set_route(INT32 nIndex, double nVolume, INT32 nRouteDir); 4 | void c6280_exit(); 5 | 6 | void c6280_reset(); 7 | 8 | void c6280_update(INT16 *pBuf, INT32 samples); 9 | 10 | void c6280_write(UINT8 offset, UINT8 data); 11 | UINT8 c6280_read(); 12 | 13 | INT32 c6280_scan(INT32 nAction, INT32 *pnMin); 14 | 15 | #define BURN_SND_C6280_ROUTE_1 0 16 | #define BURN_SND_C6280_ROUTE_2 1 17 | 18 | #define c6280_set_all_routes(v, d) \ 19 | c6280_set_route(BURN_SND_C6280_ROUTE_1, v, d); \ 20 | c6280_set_route(BURN_SND_C6280_ROUTE_2, v, d); 21 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/dac.h: -------------------------------------------------------------------------------- 1 | void DACUpdate(INT16* Buffer, INT32 Length); 2 | void DACWrite(INT32 Chip, UINT8 Data); 3 | void DACSignedWrite(INT32 Chip, UINT8 Data); 4 | void DACInit(INT32 Num, UINT32 Clock, INT32 bAdd, INT32 (*pSyncCB)()); 5 | void DACSetRoute(INT32 Chip, double nVolume, INT32 nRouteDir); 6 | void DACReset(); 7 | void DACExit(); 8 | INT32 DACScan(INT32 nAction,INT32 *pnMin); 9 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/es8712.h: -------------------------------------------------------------------------------- 1 | void es8712Write(INT32 device, INT32 offset, UINT8 data); 2 | void es8712Play(INT32 device); 3 | 4 | void es8712SetBankBase(INT32 device, INT32 base); 5 | 6 | void es8712Init(INT32 device, UINT8 *rom, INT32 sample_rate, INT32 addSignal); 7 | void es8712SetRoute(INT32 device, double nVolume, INT32 nRouteDir); 8 | void es8712Reset(INT32 device); 9 | void es8712Update(INT32 device, INT16 *buffer, INT32 samples); 10 | void es8712Exit(INT32 device); 11 | 12 | INT32 es8712Scan(INT32 device, INT32 nAction); 13 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/flt_rc.h: -------------------------------------------------------------------------------- 1 | #include "rescap.h" 2 | 3 | #define FLT_RC_LOWPASS 0 4 | #define FLT_RC_HIGHPASS 1 5 | #define FLT_RC_AC 2 6 | 7 | void filter_rc_update(INT32 num, INT16 *src, INT16 *pSoundBuf, INT32 length); 8 | void filter_rc_set_RC(INT32 num, INT32 type, double R1, double R2, double R3, double C); 9 | void filter_rc_init(INT32 num, INT32 type, double R1, double R2, double R3, double C, INT32 add_signal); 10 | void filter_rc_set_src_gain(INT32 num, double gain); 11 | void filter_rc_set_route(INT32 num, double nVolume, INT32 nRouteDir); 12 | void filter_rc_exit(); 13 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/ics2115.h: -------------------------------------------------------------------------------- 1 | extern UINT8 *ICSSNDROM; 2 | extern UINT32 nICSSNDROMLen; 3 | 4 | extern UINT8 ics2115read(UINT8 offset); 5 | extern void ics2115write(UINT8 offset, UINT8 data); 6 | 7 | extern INT32 ics2115_init(); 8 | extern void ics2115_exit(); 9 | extern void ics2115_reset(); 10 | 11 | extern UINT16 ics2115_soundlatch_r(INT32 i); 12 | extern void ics2115_soundlatch_w(INT32 i, UINT16 d); 13 | 14 | extern void ics2115_frame(); 15 | extern void ics2115_update(INT32 length); 16 | extern void ics2115_scan(INT32 nAction,INT32 *pnMin); 17 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/iremga20.h: -------------------------------------------------------------------------------- 1 | void iremga20_write(INT32 device, INT32 offset, INT32 data); 2 | UINT8 iremga20_read(INT32 device, INT32 offset); 3 | 4 | void iremga20_reset(INT32 device); 5 | void iremga20_init(INT32 device, UINT8 *rom, INT32 rom_size, INT32 frequency); 6 | void itemga20_set_route(INT32 device, double nVolume, INT32 nRouteDir); 7 | void iremga20_update(INT32 device, INT16 *buffer, INT32 length); 8 | void iremga20_exit(); 9 | 10 | INT32 iremga20_scan(INT32 device, INT32 nAction, INT32 *pnMin); 11 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/k007232.h: -------------------------------------------------------------------------------- 1 | void K007232Update(INT32 chip, INT16* pSoundBuf, INT32 nLength); 2 | UINT8 K007232ReadReg(INT32 chip, INT32 r); 3 | void K007232WriteReg(INT32 chip, INT32 r, INT32 v); 4 | void K007232SetPortWriteHandler(INT32 chip, void (*Handler)(INT32 v)); 5 | void K007232Init(INT32 chip, INT32 clock, UINT8 *pPCMData, INT32 PCMDataSize); 6 | void K007232SetRoute(INT32 chip, INT32 nIndex, double nVolume, INT32 nRouteDir); 7 | void K007232Exit(); 8 | INT32 K007232Scan(INT32 nAction, INT32 *pnMin); 9 | void K007232SetVolume(INT32 chip, INT32 channel,INT32 volumeA,INT32 volumeB); 10 | void k007232_set_bank( INT32 chip, INT32 chABank, INT32 chBBank ); 11 | 12 | #define BURN_SND_K007232_ROUTE_1 0 13 | #define BURN_SND_K007232_ROUTE_2 1 14 | 15 | #define K007232PCMSetAllRoutes(i, v, d) \ 16 | K007232SetRoute(i, BURN_SND_K007232_ROUTE_1, v, d); \ 17 | K007232SetRoute(i, BURN_SND_K007232_ROUTE_2, v, d); 18 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/k051649.h: -------------------------------------------------------------------------------- 1 | void K051649Update(INT16 *pBuf, INT32 samples); 2 | void K051649Init(INT32 clock); 3 | void K051649SetRoute(double nVolume, INT32 nRouteDir); 4 | void K051649Reset(); 5 | void K051649Exit(); 6 | 7 | INT32 K051649Scan(INT32 nAction, INT32 *pnMin); 8 | 9 | void K051649WaveformWrite(INT32 offset, INT32 data); 10 | UINT8 K051649WaveformRead(INT32 offset); 11 | 12 | void K052539WaveformWrite(INT32 offset, INT32 data); 13 | 14 | void K051649VolumeWrite(INT32 offset, INT32 data); 15 | void K051649FrequencyWrite(INT32 offset, INT32 data); 16 | void K051649KeyonoffWrite(INT32 data); 17 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/k053260.h: -------------------------------------------------------------------------------- 1 | void K053260Reset(INT32 chip); 2 | void K053260Update(INT32 chip, INT16 *pBuf, INT32 length); 3 | void K053260Init(INT32 chip, INT32 clock, UINT8 *rom, INT32 nLen); 4 | void K053260SetRoute(INT32 chip, INT32 nIndex, double nVolume, INT32 nRouteDir); 5 | void K053260Exit(); 6 | void K053260Write(INT32 chip, INT32 offset, UINT8 data); 7 | UINT8 K053260Read(INT32 chip, INT32 offset); 8 | 9 | INT32 K053260Scan(INT32 nAction); 10 | 11 | #define BURN_SND_K053260_ROUTE_1 0 12 | #define BURN_SND_K053260_ROUTE_2 1 13 | 14 | #define K053260PCMSetAllRoutes(i, v, d) \ 15 | K053260SetRoute(i, BURN_SND_K053260_ROUTE_1, v, d); \ 16 | K053260SetRoute(i, BURN_SND_K053260_ROUTE_2, v, d); 17 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/k054539.h: -------------------------------------------------------------------------------- 1 | #define K054539_RESET_FLAGS 0 2 | #define K054539_REVERSE_STEREO 1 3 | #define K054539_DISABLE_REVERB 2 4 | #define K054539_UPDATE_AT_KEYON 4 5 | 6 | void K054539_init_flags(INT32 chip, INT32 flags); 7 | void K054539_set_gain(INT32 chip, INT32 channel, double gain); 8 | 9 | void K054539Update(INT32 chip, INT16 *pBuf, INT32 length); 10 | 11 | void K054539Write(INT32 chip, INT32 offset, UINT8 data); 12 | UINT8 K054539Read(INT32 chip, INT32 offset); 13 | 14 | void K054539Reset(INT32 chip); 15 | void K054539Init(INT32 chip, INT32 clock, UINT8 *rom, INT32 nLen); 16 | void K054539SetRoute(INT32 chip, INT32 nIndex, double nVolume, INT32 nRouteDir); 17 | void K054539Exit(); 18 | 19 | INT32 K054539Scan(INT32 nAction); 20 | 21 | #define BURN_SND_K054539_ROUTE_1 0 22 | #define BURN_SND_K054539_ROUTE_2 1 23 | 24 | #define K054539PCMSetAllRoutes(i, v, d) \ 25 | K054539SetRoute(i, BURN_SND_K054539_ROUTE_1, v, d); \ 26 | K054539SetRoute(i, BURN_SND_K054539_ROUTE_2, v, d); 27 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/msm5205.h: -------------------------------------------------------------------------------- 1 | 2 | #define MSM5205_S96_3B 0 /* prescaler 1/96(4KHz) , data 3bit */ 3 | #define MSM5205_S48_3B 1 /* prescaler 1/48(8KHz) , data 3bit */ 4 | #define MSM5205_S64_3B 2 /* prescaler 1/64(6KHz) , data 3bit */ 5 | #define MSM5205_SEX_3B 3 /* VCLK slave mode , data 3bit */ 6 | 7 | #define MSM5205_S96_4B 4 /* prescaler 1/96(4KHz) , data 4bit */ 8 | #define MSM5205_S48_4B 5 /* prescaler 1/48(8KHz) , data 4bit */ 9 | #define MSM5205_S64_4B 6 /* prescaler 1/64(6KHz) , data 4bit */ 10 | #define MSM5205_SEX_4B 7 /* VCLK slave mode , data 4bit */ 11 | 12 | #define MSM6585_S160 (4+8) /* prescaler 1/160(4KHz), data 4bit */ 13 | #define MSM6585_S40 (5+8) /* prescaler 1/40(16KHz), data 4bit */ 14 | #define MSM6585_S80 (6+8) /* prescaler 1/80 (8KHz), data 4bit */ 15 | #define MSM6585_S20 (7+8) /* prescaler 1/20(32KHz), data 4bit */ 16 | 17 | void MSM5205ResetWrite(INT32 chip, INT32 reset); 18 | void MSM5205DataWrite(INT32 chip, INT32 data); 19 | void MSM5205VCLKWrite(INT32 chip, INT32 reset); 20 | void MSM5205PlaymodeWrite(INT32 chip, INT32 select); 21 | 22 | void MSM5205Init(INT32 chip, INT32 (*stream_sync)(INT32), INT32 clock, void (*vclk_callback)(), INT32 select, INT32 bAdd); 23 | void MSM5205SetRoute(INT32 chip, double nVolume, INT32 nRouteDir); 24 | void MSM5205SetLeftVolume(INT32 chip, double nLeftVolume); 25 | void MSM5205SetRightVolume(INT32 chip, double nRightVolume); 26 | void MSM5205SetSeperateVolumes(INT32 chip, INT32 state); 27 | void MSM5205Reset(); 28 | 29 | /* 30 | All MSM5205 sounds need to be rendered in one call 31 | or the data will likely be output badly 32 | */ 33 | 34 | void MSM5205Render(INT32 chip, INT16 *buffer, INT32 len); 35 | void MSM5205Exit(); 36 | 37 | void MSM5205Scan(INT32 nAction, INT32 *pnMin); 38 | 39 | /* 40 | MSM5205CalcInterleave is used to calculate after how 41 | many cycles that the sound cpu has ran does 42 | MSM5205Update need to be called. It returns how many 43 | slices must be made of the sound cpu's cycles 44 | */ 45 | 46 | INT32 MSM5205CalcInterleave(INT32 chip, INT32 cpu_speed); 47 | void MSM5205Update(); 48 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/msm6295.h: -------------------------------------------------------------------------------- 1 | // MSM6295 module header 2 | 3 | #define MAX_MSM6295 (2) 4 | 5 | INT32 MSM6295Init(INT32 nChip, INT32 nSamplerate, bool bAddSignal); 6 | void MSM6295SetRoute(INT32 nChip, double nVolume, INT32 nRouteDir); 7 | void MSM6295Reset(INT32 nChip); 8 | void MSM6295Exit(INT32 nChip); 9 | 10 | INT32 MSM6295Render(INT32 nChip, INT16* pSoundBuf, INT32 nSegmenLength); 11 | void MSM6295Command(INT32 nChip, UINT8 nCommand); 12 | INT32 MSM6295Scan(INT32 nChip, INT32 nAction); 13 | 14 | extern UINT8* MSM6295ROM; 15 | extern UINT8* MSM6295SampleInfo[MAX_MSM6295][4]; 16 | extern UINT8* MSM6295SampleData[MAX_MSM6295][4]; 17 | 18 | inline static UINT32 MSM6295ReadStatus(const INT32 nChip) 19 | { 20 | #if defined FBA_DEBUG 21 | extern INT32 nLastMSM6295Chip; 22 | if (!DebugSnd_MSM6295Initted) bprintf(PRINT_ERROR, _T("MSM6295ReadStatus called without init\n")); 23 | if (nChip > nLastMSM6295Chip) bprintf(PRINT_ERROR, _T("MSM6295ReadStatus called with invalid chip %x\n"), nChip); 24 | #endif 25 | 26 | extern UINT32 nMSM6295Status[MAX_MSM6295]; 27 | 28 | return nMSM6295Status[nChip]; 29 | } 30 | 31 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/namco_snd.h: -------------------------------------------------------------------------------- 1 | extern UINT8* NamcoSoundProm; 2 | void NamcoSoundUpdate(INT16* buffer, INT32 length); 3 | void NamcoSoundUpdateStereo(INT16* buffer, INT32 length); 4 | void NamcoSoundWrite(UINT32 offset, UINT8 data); 5 | void NamcoSoundInit(INT32 clock, INT32 num_voices); 6 | void NacmoSoundSetRoute(INT32 nIndex, double nVolume, INT32 nRouteDir); 7 | void NamcoSoundExit(); 8 | void NamcoSoundScan(INT32 nAction,INT32 *pnMin); 9 | 10 | void namcos1_custom30_write(INT32 offset, INT32 data); 11 | UINT8 namcos1_custom30_read(INT32 offset); 12 | 13 | #define BURN_SND_NAMCOSND_ROUTE_1 0 14 | #define BURN_SND_NAMCOSND_ROUTE_2 1 15 | 16 | #define NacmoSoundSetAllRoutes(v, d) \ 17 | NacmoSoundSetRoute(BURN_SND_NAMCOSND_ROUTE_1, v, d); \ 18 | NacmoSoundSetRoute(BURN_SND_NAMCOSND_ROUTE_2, v, d); 19 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/rescap.h: -------------------------------------------------------------------------------- 1 | #ifndef RC_MACROS_H 2 | #define RC_MACROS_H 3 | 4 | /* Little helpers for magnitude conversions */ 5 | #define RES_R(res) ((double)(res)) 6 | #define RES_K(res) ((double)(res) * 1e3) 7 | #define RES_M(res) ((double)(res) * 1e6) 8 | #define CAP_U(cap) ((double)(cap) * 1e-6) 9 | #define CAP_N(cap) ((double)(cap) * 1e-9) 10 | #define CAP_P(cap) ((double)(cap) * 1e-12) 11 | 12 | /* vin --/\r1/\-- out --/\r2/\-- gnd */ 13 | #define RES_VOLTAGE_DIVIDER(r1, r2) ((double)(r2) / ((double)(r1) + (double)(r2))) 14 | 15 | #define RES_2_PARALLEL(r1, r2) (((r1) * (r2)) / ((r1) + (r2))) 16 | #define RES_3_PARALLEL(r1, r2, r3) (1.0 / (1.0 / (r1) + 1.0 / (r2) + 1.0 / (r3))) 17 | #define RES_4_PARALLEL(r1, r2, r3, r4) (1.0 / (1.0 / (r1) + 1.0 / (r2) + 1.0 / (r3) + 1.0 / (r4))) 18 | #define RES_5_PARALLEL(r1, r2, r3, r4, r5) (1.0 / (1.0 / (r1) + 1.0 / (r2) + 1.0 / (r3) + 1.0 / (r4) + 1.0 / (r5))) 19 | #define RES_6_PARALLEL(r1, r2, r3, r4, r5, r6) (1.0 / (1.0 / (r1) + 1.0 / (r2) + 1.0 / (r3) + 1.0 / (r4) + 1.0 / (r5) + 1.0 / (r6))) 20 | 21 | #define RES_2_SERIAL(r1,r2) ((r1)+(r2)) 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/rf5c68.h: -------------------------------------------------------------------------------- 1 | void RF5C68PCMUpdate(INT16* pSoundBuf, INT32 length); 2 | void RF5C68PCMReset(); 3 | void RF5C68PCMInit(INT32 clock); 4 | void RF5C68PCMSetRoute(INT32 nIndex, double nVolume, INT32 nRouteDir); 5 | void RF5C68PCMExit(); 6 | void RF5C68PCMScan(INT32 nAction); 7 | void RF5C68PCMRegWrite(UINT8 offset, UINT8 data); 8 | UINT8 RF5C68PCMRead(UINT16 offset); 9 | void RF5C68PCMWrite(UINT16 offset, UINT8 data); 10 | 11 | #define BURN_SND_RF5C68PCM_ROUTE_1 0 12 | #define BURN_SND_RF5C68PCM_ROUTE_2 1 13 | 14 | #define RF5C68PCMSetAllRoutes(v, d) \ 15 | RF5C68PCMSetRoute(BURN_SND_RF5C68PCM_ROUTE_1, v, d); \ 16 | RF5C68PCMSetRoute(BURN_SND_RF5C68PCM_ROUTE_2, v, d); 17 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/saa1099.h: -------------------------------------------------------------------------------- 1 | void saa1099Update(INT32 chip, INT16 *output, INT32 samples); 2 | void saa1099Reset(INT32 chip); 3 | void saa1099Init(INT32 chip, INT32 clock, INT32 bAdd); 4 | void saa1099SetRoute(INT32 chip, INT32 nIndex, double nVolume, INT32 nRouteDir); 5 | void saa1099ControlWrite(INT32 chip, INT32 data); 6 | void saa1099DataWrite(INT32 chip, INT32 data); 7 | void saa1099Scan(INT32 chip, INT32 nAction); 8 | void saa1099Exit(INT32 chip); 9 | 10 | #define BURN_SND_SAA1099_ROUTE_1 0 11 | #define BURN_SND_SAA1099_ROUTE_2 1 12 | 13 | #define saa1099SetAllRoutes(i, v, d) \ 14 | saa1099SetRoute(i, BURN_SND_SAA1099_ROUTE_1, v, d); \ 15 | saa1099SetRoute(i, BURN_SND_SAA1099_ROUTE_2, v, d); 16 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/samples.h: -------------------------------------------------------------------------------- 1 | #define SAMPLE_IGNORE 0x01 // don't ever play this sample 2 | #define SAMPLE_AUTOLOOP 0x02 // start the looping on start 3 | #define SAMPLE_NOLOOP 0x04 // don't allow this to loop 4 | 5 | void BurnSamplePlay(INT32 sample); 6 | void BurnSamplePause(INT32 sample); 7 | void BurnSampleResume(INT32 sample); 8 | void BurnSampleStop(INT32 sample); 9 | 10 | void BurnSampleSetLoop(INT32 sample, bool dothis); 11 | 12 | INT32 BurnSampleGetStatus(INT32 sample); 13 | 14 | INT32 BurnSampleGetPosition(INT32 sample); 15 | void BurnSampleSetPosition(INT32 sample, UINT32 position); 16 | 17 | void BurnSampleReset(); 18 | 19 | void BurnSampleInit(INT32 bAdd); 20 | void BurnSampleSetRoute(INT32 sample, INT32 nIndex, double nVolume, INT32 nRouteDir); 21 | void BurnSampleSetRouteAllSamples(INT32 nIndex, double nVolume, INT32 nRouteDir); 22 | 23 | INT32 BurnSampleScan(INT32 nAction, INT32 *pnMin); 24 | 25 | void BurnSampleRender(INT16 *pDest, UINT32 pLen); 26 | void BurnSampleExit(); 27 | 28 | #define BURN_SND_SAMPLE_ROUTE_1 0 29 | #define BURN_SND_SAMPLE_ROUTE_2 1 30 | 31 | #define BurnSampleSetAllRoutes(i, v, d) \ 32 | BurnSampleSetRoute(i, BURN_SND_SAMPLE_ROUTE_1, v, d); \ 33 | BurnSampleSetRoute(i, BURN_SND_SAMPLE_ROUTE_2, v, d); 34 | 35 | #define BurnSampleSetAllRoutesAllSamples(v, d) \ 36 | BurnSampleSetRouteAllSamples(BURN_SND_SAMPLE_ROUTE_1, v, d); \ 37 | BurnSampleSetRouteAllSamples(BURN_SND_SAMPLE_ROUTE_2, v, d); 38 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/segapcm.h: -------------------------------------------------------------------------------- 1 | #define BANK_256 (11) 2 | #define BANK_512 (12) 3 | #define BANK_12M (13) 4 | #define BANK_MASK7 (0x70<<16) 5 | #define BANK_MASKF (0xf0<<16) 6 | #define BANK_MASKF8 (0xf8<<16) 7 | 8 | void SegaPCMUpdate(INT16* pSoundBuf, INT32 nLength); 9 | void SegaPCMInit(INT32 nChip, INT32 clock, INT32 bank, UINT8 *pPCMData, INT32 PCMDataSize); 10 | void SegaPCMSetRoute(INT32 nChip, INT32 nIndex, double nVolume, INT32 nRouteDir); 11 | void SegaPCMExit(); 12 | INT32 SegaPCMScan(INT32 nAction,INT32 *pnMin); 13 | UINT8 SegaPCMRead(INT32 nChip, UINT32 Offset); 14 | void SegaPCMWrite(INT32 nChip, UINT32 Offset, UINT8 Data); 15 | 16 | #define BURN_SND_SEGAPCM_ROUTE_1 0 17 | #define BURN_SND_SEGAPCM_ROUTE_2 1 18 | 19 | #define SegaPCMSetAllRoutes(n, v, d) \ 20 | SegaPCMSetRoute(n, BURN_SND_SEGAPCM_ROUTE_1, v, d); \ 21 | SegaPCMSetRoute(n, BURN_SND_SEGAPCM_ROUTE_2, v, d); 22 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/sn76496.h: -------------------------------------------------------------------------------- 1 | void SN76496Update(INT32 Num, INT16* pSoundBuf, INT32 Length); 2 | void SN76496Write(INT32 Num, INT32 Data); 3 | void SN76489Init(INT32 Num, INT32 Clock, INT32 SignalAdd); 4 | void SN76489AInit(INT32 Num, INT32 Clock, INT32 SignalAdd); 5 | void SN76494Init(INT32 Num, INT32 Clock, INT32 SignalAdd); 6 | void SN76496Init(INT32 Num, INT32 Clock, INT32 SignalAdd); 7 | void SN76496SetRoute(INT32 Num, double nVolume, INT32 nRouteDir); 8 | void SN76496Exit(); 9 | INT32 SN76496Scan(INT32 nAction,INT32 *pnMin); 10 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/upd7759.h: -------------------------------------------------------------------------------- 1 | #define UPD7759_STANDARD_CLOCK 640000 2 | 3 | typedef void (*drqcallback)(INT32 param); 4 | 5 | void UPD7759Update(INT32 chip, INT16 *pSoundBuf, INT32 nLength); 6 | void UPD7759Reset(); 7 | void UPD7759Init(INT32 chip, INT32 clock, UINT8* pSoundData); 8 | void UPD7759SetRoute(INT32 chip, double nVolume, INT32 nRouteDir); 9 | void UPD7759SetDrqCallback(INT32 chip, drqcallback Callback); 10 | INT32 UPD7759BusyRead(INT32 chip); 11 | void UPD7759ResetWrite(INT32 chip, UINT8 Data); 12 | void UPD7759StartWrite(INT32 chip, UINT8 Data); 13 | void UPD7759PortWrite(INT32 chip, UINT8 Data); 14 | INT32 UPD7759Scan(INT32 chip, INT32 nAction,INT32 *pnMin); 15 | void UPD7759Exit(); 16 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/x1010.h: -------------------------------------------------------------------------------- 1 | #define SETA_NUM_CHANNELS 16 2 | #define SETA_NUM_BANKS (0x100000 / 0x20000) 3 | 4 | #define FREQ_BASE_BITS 8 // Frequency fixed decimal shift bits 5 | #define ENV_BASE_BITS 16 // wave form envelope fixed decimal shift bits 6 | #define VOL_BASE (2 * 32 * 256 / 30) // Volume base 7 | 8 | struct x1_010_info 9 | { 10 | INT32 rate; // Output sampling rate (Hz) 11 | //sound_stream * stream; // Stream handle 12 | INT32 address; // address eor data 13 | INT32 sound_enable; // sound output enable/disable 14 | UINT8 reg[0x2000]; // X1-010 Register & wave form area 15 | UINT8 HI_WORD_BUF[0x2000]; // X1-010 16bit access ram check avoidance work 16 | UINT32 smp_offset[SETA_NUM_CHANNELS]; 17 | UINT32 env_offset[SETA_NUM_CHANNELS]; 18 | UINT32 base_clock; 19 | UINT32 sound_banks[SETA_NUM_BANKS]; 20 | double gain[2]; 21 | INT32 output_dir[2]; 22 | }; 23 | 24 | typedef struct { 25 | UINT8 status; 26 | UINT8 volume; // volume / wave form no. 27 | UINT8 frequency; // frequency / pitch lo 28 | UINT8 pitch_hi; // reserved / pitch hi 29 | UINT8 start; // start address / envelope time 30 | UINT8 end; // end address / envelope no. 31 | UINT8 reserve[2]; 32 | } X1_010_CHANNEL; 33 | 34 | extern UINT8 *X1010SNDROM; 35 | 36 | extern struct x1_010_info * x1_010_chip; 37 | 38 | void x1010_sound_bank_w(UINT32 offset, UINT16 data); 39 | UINT8 x1010_sound_read(UINT32 offset); 40 | UINT16 x1010_sound_read_word(UINT32 offset); 41 | void x1010_sound_update(); 42 | void x1010_sound_init(UINT32 base_clock, INT32 address); 43 | void x1010_set_route(INT32 nIndex, double nVolume, INT32 nRouteDir); 44 | void x1010_scan(INT32 nAction,INT32 *pnMin); 45 | void x1010_exit(); 46 | 47 | #define BURN_SND_X1010_ROUTE_1 0 48 | #define BURN_SND_X1010_ROUTE_2 1 49 | 50 | #define x1010_set_all_routes(v, d) \ 51 | x1010_set_route(BURN_SND_X1010_ROUTE_1, v, d); \ 52 | x1010_set_route(BURN_SND_X1010_ROUTE_2, v, d); 53 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/ym2413.h: -------------------------------------------------------------------------------- 1 | #ifndef _H_YM2413_ 2 | #define _H_YM2413_ 3 | 4 | /* select output bits size of output : 8 or 16 */ 5 | #define SAMPLE_BITS 16 6 | 7 | #if (SAMPLE_BITS==16) 8 | typedef INT16 SAMP; 9 | #endif 10 | #if (SAMPLE_BITS==8) 11 | typedef INT8 SAMP; 12 | #endif 13 | 14 | 15 | 16 | 17 | int YM2413Init(int num, int clock, int rate); 18 | void YM2413Shutdown(void); 19 | void YM2413ResetChip(int which); 20 | void YM2413Write(int which, int a, int v); 21 | void YM2413WriteReg(int which, int r, int v); 22 | unsigned char YM2413Read(int which, int a); 23 | void YM2413UpdateOne(int which, INT16 **buffers, int length); 24 | 25 | typedef void (*OPLL_UPDATEHANDLER)(int param,int min_interval_us); 26 | 27 | void YM2413SetUpdateHandler(int which, OPLL_UPDATEHANDLER UpdateHandler, int param); 28 | 29 | void YM2413Scan(INT32 which, INT32 nAction); 30 | 31 | #endif /*_H_YM2413_*/ 32 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/ymf278b.h: -------------------------------------------------------------------------------- 1 | #ifndef __YMF278B_H__ 2 | #define __YMF278B_H__ 3 | 4 | #ifdef FBA /* !!! FBA */ 5 | #define MAX_YMF278B (1) 6 | #else /* !!! FBA */ 7 | #define MAX_YMF278B (2) 8 | #endif /* !!! FBA */ 9 | 10 | #define YMF278B_STD_CLOCK (33868800) /* standard clock for OPL4 */ 11 | 12 | struct YMF278B_interface { 13 | int num; /* Number of chips */ 14 | int clock[MAX_YMF278B]; /* clock input, normally 33.8688 MHz */ 15 | int region[MAX_YMF278B]; /* memory region of sample ROMs */ 16 | int mixing_level[MAX_YMF278B]; /* volume */ 17 | void (*irq_callback[MAX_YMF278B])(int num, int state); /* irq callback */ 18 | }; 19 | 20 | #ifdef FBA /* !!! FBA */ 21 | void ymf278b_pcm_update(int num, INT16 **outputs, int length); 22 | int ymf278b_timer_over(int num, int timer); 23 | int ymf278b_start(INT8 num, UINT8 *rom, void (*irq_cb)(int, int), void (*timer_cb)(int, int, double), int clock, int rate); 24 | #else /* !!! FBA */ 25 | int YMF278B_sh_start( const struct MachineSound *msound ); 26 | #endif /* !!! FBA */ 27 | void YMF278B_sh_stop(void); 28 | 29 | READ8_HANDLER( YMF278B_status_port_0_r ); 30 | READ8_HANDLER( YMF278B_data_port_0_r ); 31 | WRITE8_HANDLER( YMF278B_control_port_0_A_w ); 32 | WRITE8_HANDLER( YMF278B_data_port_0_A_w ); 33 | WRITE8_HANDLER( YMF278B_control_port_0_B_w ); 34 | WRITE8_HANDLER( YMF278B_data_port_0_B_w ); 35 | WRITE8_HANDLER( YMF278B_control_port_0_C_w ); 36 | WRITE8_HANDLER( YMF278B_data_port_0_C_w ); 37 | 38 | #ifndef FBA /* !!! FBA */ 39 | READ8_HANDLER( YMF278B_status_port_1_r ); 40 | READ8_HANDLER( YMF278B_data_port_1_r ); 41 | WRITE8_HANDLER( YMF278B_control_port_1_A_w ); 42 | WRITE8_HANDLER( YMF278B_data_port_1_A_w ); 43 | WRITE8_HANDLER( YMF278B_control_port_1_B_w ); 44 | WRITE8_HANDLER( YMF278B_data_port_1_B_w ); 45 | WRITE8_HANDLER( YMF278B_control_port_1_C_w ); 46 | WRITE8_HANDLER( YMF278B_data_port_1_C_w ); 47 | #endif /* !!! FBA */ 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/snd/ymz280b.h: -------------------------------------------------------------------------------- 1 | // Yamaha YMZ280B module 2 | 3 | INT32 YMZ280BInit(INT32 nClock, void (*IRQCallback)(INT32)); 4 | void YMZ280BSetRoute(INT32 nIndex, double nVolume, INT32 nRouteDir); 5 | void YMZ280BReset(); 6 | INT32 YMZ280BScan(); 7 | void YMZ280BExit(); 8 | INT32 YMZ280BRender(INT16* pSoundBuf, INT32 nSegmenLength); 9 | void YMZ280BWriteRegister(UINT8 nValue); 10 | UINT32 YMZ280BReadStatus(); 11 | UINT32 YMZ280BReadRAM(); 12 | 13 | extern UINT8* YMZ280BROM; 14 | 15 | // external memory handlers 16 | extern void (*pYMZ280BRAMWrite)(INT32 offset, INT32 nValue); 17 | extern INT32 (*pYMZ280BRAMRead)(INT32 offset); 18 | 19 | extern UINT32 nYMZ280BStatus; 20 | extern UINT32 nYMZ280BRegister; 21 | 22 | inline static void YMZ280BSelectRegister(UINT8 nRegister) 23 | { 24 | nYMZ280BRegister = nRegister; 25 | } 26 | 27 | inline static void YMZ280BWrite(INT32 offset, UINT8 nValue) 28 | { 29 | if (offset & 1) { 30 | YMZ280BWriteRegister(nValue); 31 | } else { 32 | nYMZ280BRegister = nValue; 33 | } 34 | } 35 | 36 | inline static UINT32 YMZ280BRead(INT32 offset) 37 | { 38 | if (offset & 1) { 39 | return YMZ280BReadStatus(); 40 | } else { 41 | return YMZ280BReadRAM(); 42 | } 43 | 44 | return 0; 45 | } 46 | 47 | #define BURN_SND_YMZ280B_YMZ280B_ROUTE_1 0 48 | #define BURN_SND_YMZ280B_YMZ280B_ROUTE_2 1 49 | 50 | #define YMZ280BSetAllRoutes(v, d) \ 51 | YMZ280BSetRoute(BURN_SND_YMZ280B_YMZ280B_ROUTE_1, v, d); \ 52 | YMZ280BSetRoute(BURN_SND_YMZ280B_YMZ280B_ROUTE_2, v, d); 53 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/timer.h: -------------------------------------------------------------------------------- 1 | #ifndef _BURN_TIMER_H 2 | #define _BURN_TIMER_H 3 | 4 | // FM timers 5 | 6 | #define TIMER_TICKS_PER_SECOND (2048000000) 7 | #define MAKE_TIMER_TICKS(n, m) ((INT64)(n) * TIMER_TICKS_PER_SECOND / (m)) 8 | #define MAKE_CPU_CYLES(n, m) ((INT64)(n) * (m) / TIMER_TICKS_PER_SECOND) 9 | 10 | extern "C" double BurnTimerGetTime(); 11 | 12 | // Callbacks for various sound chips 13 | void BurnOPNTimerCallback(INT32 n, INT32 c, INT32 cnt, double stepTime); // period = cnt * stepTime in s 14 | void BurnOPLTimerCallback(INT32 c, double period); // period in s 15 | void BurnYMFTimerCallback(INT32 n, INT32 c, double period); // period in us 16 | 17 | // Start / stop a timer 18 | void BurnTimerSetRetrig(INT32 c, double period); // period in s 19 | void BurnTimerSetOneshot(INT32 c, double period); // period in s 20 | 21 | extern double dTime; 22 | 23 | void BurnTimerExit(); 24 | void BurnTimerReset(); 25 | INT32 BurnTimerInit(INT32 (*pOverCallback)(INT32, INT32), double (*pTimeCallback)()); 26 | INT32 BurnTimerAttachSek(INT32 nClockspeed); 27 | INT32 BurnTimerAttachZet(INT32 nClockspeed); 28 | INT32 BurnTimerAttachM6809(INT32 nClockspeed); 29 | INT32 BurnTimerAttachHD6309(INT32 nClockspeed); 30 | INT32 BurnTimerAttachM6800(INT32 nClockspeed); 31 | INT32 BurnTimerAttachHD63701(INT32 nClockspeed); 32 | INT32 BurnTimerAttachM6803(INT32 nClockspeed); 33 | INT32 BurnTimerAttachM6502(INT32 nClockspeed); 34 | INT32 BurnTimerAttachSh2(INT32 nClockspeed); 35 | INT32 BurnTimerAttachH6280(INT32 nClockspeed); 36 | void BurnTimerScan(INT32 nAction, INT32* pnMin); 37 | INT32 BurnTimerUpdate(INT32 nCycles); 38 | void BurnTimerUpdateEnd(); 39 | void BurnTimerEndFrame(INT32 nCycles); 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burn/version.h: -------------------------------------------------------------------------------- 1 | #ifndef _FBA_VERSION_H 2 | #define _FBA_VERSION_H 3 | 4 | // Version number, written as vV.V.BB or vV.V.BBaa 5 | // (0xVVBBaa, in BCD notation) 6 | 7 | #define VER_MAJOR 0 8 | #define VER_MINOR 2 9 | #define VER_BETA 97 10 | #define VER_ALPHA 30 11 | 12 | #define BURN_VERSION (VER_MAJOR * 0x100000) + (VER_MINOR * 0x010000) + (((VER_BETA / 10) * 0x001000) + ((VER_BETA % 10) * 0x000100)) + (((VER_ALPHA / 10) * 0x000010) + (VER_ALPHA % 10)) 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burner/libretro/burn_endian.h: -------------------------------------------------------------------------------- 1 | #ifndef _FBA_ENDIAN_H 2 | #define _FBA_ENDIAN_H 3 | 4 | #ifndef _XBOX 5 | #define NO_64BIT_BYTESWAP 6 | #endif 7 | 8 | typedef union { 9 | struct { UINT8 h3,h2,h,l; } b; 10 | struct { UINT16 h,l; } w; 11 | UINT32 d; 12 | } PAIR; 13 | 14 | /* Only Xbox 360 so far seems to have byteswap 64-bit intrinsic */ 15 | #ifdef NO_64BIT_BYTESWAP 16 | typedef union { 17 | UINT64 ll; 18 | struct { UINT32 l, h; } l; 19 | } BYTESWAP_INT64; 20 | #endif 21 | 22 | /* Libogc doesn't have intrinsics or ASM macros defined for this */ 23 | #if defined(HW_RVL) || defined(GEKKO) 24 | #define __sthbrx(base,index,value) \ 25 | __asm__ volatile ("sthbrx %0,%1,%2" : : "r"(value), "b%"(index), "r"(base) : "memory") 26 | 27 | #define __stwbrx(base,index,value) \ 28 | __asm__ volatile ("stwbrx %0,%1,%2" : : "r"(value), "b%"(index), "r"(base) : "memory") 29 | #endif 30 | 31 | /* Xbox 360 */ 32 | #if defined(_XBOX) 33 | #define BURN_ENDIAN_SWAP_INT8(x) (x^1) 34 | #define BURN_ENDIAN_SWAP_INT16(x) (_byteswap_ushort(x)) 35 | #define BURN_ENDIAN_SWAP_INT32(x) (_byteswap_ulong(x)) 36 | #define BURN_ENDIAN_SWAP_INT64(x) (_byteswap_uint64(x)) 37 | /* PlayStation3 */ 38 | #elif defined(__PS3__) 39 | #include 40 | #define BURN_ENDIAN_SWAP_INT8(x) (x^1) 41 | #define BURN_ENDIAN_SWAP_INT16(x) ({uint16_t t; __sthbrx(&t, x); t;}) 42 | #define BURN_ENDIAN_SWAP_INT32(x) ({uint32_t t; __stwbrx(&t, x); t;}) 43 | /* Wii */ 44 | #elif defined(HW_RVL) 45 | #define BURN_ENDIAN_SWAP_INT8(x) (x^1) 46 | #define BURN_ENDIAN_SWAP_INT16(x) ({uint16_t t; __sthbrx(&t, 0, x); t;}) 47 | #define BURN_ENDIAN_SWAP_INT32(x) ({uint32_t t; __stwbrx(&t, 0, x); t;}) 48 | #endif 49 | 50 | #ifdef NO_64BIT_BYTESWAP 51 | static inline UINT64 BURN_ENDIAN_SWAP_INT64(UINT64 x) 52 | { 53 | BYTESWAP_INT64 r = {0}; 54 | r.l.l = BURN_ENDIAN_SWAP_INT32(x); 55 | r.l.h = BURN_ENDIAN_SWAP_INT32(x >> 32); 56 | return r.ll; 57 | } 58 | #endif 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burner/libretro/burn_libretro_opts.h: -------------------------------------------------------------------------------- 1 | #ifndef _LIBRETRO_OPTIMIZATIONS_H_ 2 | #define _LIBRETRO_OPTIMIZATIONS_H_ 3 | 4 | #define BurnHighCol LIBRETRO_COLOR_CONVERT 5 | #define BurnHighColSwitch LIBRETRO_COLOR_CONVERT_SWITCH 6 | 7 | #ifdef FRONTEND_SUPPORTS_RGB565 8 | #define LIBRETRO_COLOR_15BPP_XBGR(color, unused) (((color & 0x001f) << 11) | ((color & 0x03e0) << 1) | ((color & 0x7c00) >> 10)) 9 | #define LIBRETRO_COLOR_CONVERT(r, g, b, a) (((((int)r) << 8) & 0xf800) | ((((int)g) << 3) & 0x07e0) | ((((int)b) >> 3) & 0x001f)) 10 | #define LIBRETRO_COLOR_CONVERT_SWITCH(r, g, b, a) (nBurnBpp == 2) ? (((r << 8) & 0xf800) | ((g << 3) & 0x07e0) | ((b >> 3) & 0x001f)) : (((r << 16) & 0xff0000) | ((g << 8) & 0x00ff00) | ((b) & 0x0000ff)) 11 | #else 12 | #define LIBRETRO_COLOR_15BPP_XBGR(color, unused) ((((color & 0x1f) << 10) | (((color & 0x3e0) >> 5) << 5) | (((color & 0x7c00) >> 10))) & 0x7fff) 13 | #define LIBRETRO_COLOR_CONVERT(r, g, b, a) (((((int)r) << 7) & 0x7c00) | ((((int)g) << 2) & 0x03e0) | ((((int)b) >> 3) & 0x001f)) 14 | #define LIBRETRO_COLOR_CONVERT_SWITCH(r, g, b, a) (nBurnBpp == 2) ? (((r << 7) & 0x7c00) | ((g << 2) & 0x03e0) | ((b >> 3) & 0x001f)) : (((r << 16) & 0xff0000) | ((g << 8) & 0x00ff00) | ((b) & 0x0000ff)) 15 | #endif 16 | 17 | extern char g_rom_dir[1024]; 18 | extern char g_save_dir[1024]; 19 | extern char g_system_dir[1024]; 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burner/libretro/burner_libretro.h: -------------------------------------------------------------------------------- 1 | #ifndef _BURNER_LIBRETRO_H 2 | #define _BURNER_LIBRETRO_H 3 | 4 | #include "gameinp.h" 5 | #include "input/inp_keys.h" 6 | 7 | extern int bDrvOkay; 8 | extern int bRunPause; 9 | extern bool bAlwaysProcessKeyboardInput; 10 | 11 | #ifdef _MSC_VER 12 | #define snprintf _snprintf 13 | #define ANSIToTCHAR(str, foo, bar) (str) 14 | #endif 15 | 16 | extern void InpDIPSWResetDIPs (void); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burner/libretro/libretro-common/include/boolean.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2010-2017 The RetroArch team 2 | * 3 | * --------------------------------------------------------------------------------------- 4 | * The following license statement only applies to this file (boolean.h). 5 | * --------------------------------------------------------------------------------------- 6 | * 7 | * Permission is hereby granted, free of charge, 8 | * to any person obtaining a copy of this software and associated documentation files (the "Software"), 9 | * to deal in the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 11 | * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 19 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | */ 22 | 23 | #ifndef __LIBRETRO_SDK_BOOLEAN_H 24 | #define __LIBRETRO_SDK_BOOLEAN_H 25 | 26 | #ifndef __cplusplus 27 | 28 | #if defined(_MSC_VER) && _MSC_VER < 1800 && !defined(SN_TARGET_PS3) 29 | /* Hack applied for MSVC when compiling in C89 mode as it isn't C99 compliant. */ 30 | #define bool unsigned char 31 | #define true 1 32 | #define false 0 33 | #else 34 | #include 35 | #endif 36 | 37 | #endif 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burner/libretro/libretro-common/include/retro_inline.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2010-2017 The RetroArch team 2 | * 3 | * --------------------------------------------------------------------------------------- 4 | * The following license statement only applies to this file (retro_inline.h). 5 | * --------------------------------------------------------------------------------------- 6 | * 7 | * Permission is hereby granted, free of charge, 8 | * to any person obtaining a copy of this software and associated documentation files (the "Software"), 9 | * to deal in the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, 11 | * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 19 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | */ 22 | 23 | #ifndef __LIBRETRO_SDK_INLINE_H 24 | #define __LIBRETRO_SDK_INLINE_H 25 | 26 | #ifndef INLINE 27 | 28 | #if defined(_WIN32) || defined(__INTEL_COMPILER) 29 | #define INLINE __inline 30 | #elif defined(__STDC_VERSION__) && __STDC_VERSION__>=199901L 31 | #define INLINE inline 32 | #elif defined(__GNUC__) 33 | #define INLINE __inline__ 34 | #else 35 | #define INLINE 36 | #endif 37 | 38 | #endif 39 | #endif 40 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burner/libretro/link.T: -------------------------------------------------------------------------------- 1 | { 2 | global: retro_*; 3 | local: *; 4 | }; 5 | 6 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burner/libretro/net.h: -------------------------------------------------------------------------------- 1 | // Dummy header as core needs to include this for some reason. 2 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burner/libretro/retro_input.h: -------------------------------------------------------------------------------- 1 | #ifndef __RETRO_INPUT__ 2 | #define __RETRO_INPUT__ 3 | 4 | #include "burner.h" 5 | #include "burn_gun.h" 6 | 7 | // Stuff we don't need anymore but want to keep in the code 8 | //#define RETRO_INPUT_DEPRECATED 9 | 10 | struct KeyBind 11 | { 12 | unsigned id; 13 | unsigned port; 14 | unsigned device; 15 | int index; 16 | unsigned position; 17 | }; 18 | 19 | struct AxiBind 20 | { 21 | unsigned id; 22 | #ifdef RETRO_INPUT_DEPRECATED 23 | unsigned id_pos; 24 | unsigned id_neg; 25 | #endif 26 | int index; 27 | }; 28 | 29 | #define RETROPAD_CLASSIC RETRO_DEVICE_ANALOG 30 | #define RETROPAD_MODERN RETRO_DEVICE_SUBCLASS(RETRO_DEVICE_ANALOG, 1) 31 | #define RETROMOUSE_BALL RETRO_DEVICE_MOUSE 32 | #define RETROMOUSE_FULL RETRO_DEVICE_SUBCLASS(RETRO_DEVICE_MOUSE, 1) 33 | 34 | #define GIT_DIRECT_COORD (0x11) 35 | 36 | #define JOY_NEG 0 37 | #define JOY_POS 1 38 | #define RETRO_DEVICE_ID_JOYPAD_EMPTY 255 39 | 40 | void SetDiagInpHoldFrameDelay(unsigned val); 41 | void InputMake(void); 42 | void InputInit(); 43 | void InputDeInit(); 44 | void SetControllerInfo(); 45 | 46 | extern bool bLibretroSupportsBitmasks; 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burner/libretro/tchar.h: -------------------------------------------------------------------------------- 1 | #ifndef __PORT_TYPEDEFS_H 2 | #define __PORT_TYPEDEFS_H 3 | 4 | #include 5 | #include 6 | 7 | #include "inp_keys.h" 8 | #define TCHAR char 9 | #define _T(x) x 10 | #define _tfopen fopen 11 | #define _tcstol strtol 12 | #define _tcsstr strstr 13 | #define _istspace(x) isspace(x) 14 | #define _stprintf sprintf 15 | #define _tcslen strlen 16 | #define _tcsicmp(a, b) strcasecmp(a, b) 17 | #define _tcscpy(to, from) strcpy(to, from) 18 | #define _fgetts fgets 19 | #define _strnicmp(s1, s2, n) strncasecmp(s1, s2, n) 20 | #define _tcsncmp strncmp 21 | #define _tcsncpy strncpy 22 | #define _stscanf sscanf 23 | #define _ftprintf fprintf 24 | 25 | #ifdef _MSC_VER 26 | #include 27 | #define strncasecmp(s1, s2, n) _strnicmp(s1, s2, n) 28 | #define strcasecmp(x, y) _stricmp(x, y) 29 | #define snprintf _snprintf 30 | #else 31 | #define _stricmp(x, y) strcasecmp(x,y) 32 | 33 | typedef struct { int x, y, width, height; } RECT; 34 | #undef __cdecl 35 | #define __cdecl 36 | #endif 37 | 38 | #undef __fastcall 39 | #undef _fastcall 40 | #define __fastcall /*what does this correspond to?*/ 41 | #define _fastcall /*same as above - what does this correspond to?*/ 42 | #define ANSIToTCHAR(str, foo, bar) (str) 43 | 44 | /* for Windows / Xbox 360 (below VS2010) - typedefs for missing stdint.h types such as uintptr_t?*/ 45 | 46 | /*FBA defines*/ 47 | #define PUF_TEXT_NO_TRANSLATE (0) 48 | #define PUF_TYPE_ERROR (1) 49 | 50 | extern TCHAR szAppBurnVer[16]; 51 | 52 | typedef int HWND; 53 | 54 | extern int bDrvOkay; 55 | extern int bRunPause; 56 | extern bool bAlwaysProcessKeyboardInput; 57 | extern HWND hScrnWnd; // Handle to the screen window 58 | 59 | extern void InpDIPSWResetDIPs (void); 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /svn-current/trunk/src/burner/title.h: -------------------------------------------------------------------------------- 1 | // Define macros for appliction title and description 2 | #ifdef FBA_DEBUG 3 | #define APP_TITLE "FB Alpha [DEBUG]" 4 | #else 5 | #define APP_TITLE "FB Alpha" 6 | #endif 7 | 8 | #define APP_DESCRIPTION "Emulator for arcade games" 9 | 10 | -------------------------------------------------------------------------------- /svn-current/trunk/src/cpu/a68k/mips/builda68k.bat: -------------------------------------------------------------------------------- 1 | cl /nologo /Og /Oi /Ot /Oy /Ob2 /G6 /GF /Gy /GL /Gr /Zc:forScope /ML /Fp$(IntDir)\generated\ /DNDEBUG=1 /DINLINE="__inline static" /DWIN32 /DFASTCALL fba_make68k.c /link /NOLOGO /INCREMENTAL:NO /MACHINE:X86 /LIBPATH:"$(VCInstallDir)lib\" /NODEFAULTLIB:libcd.lib /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:libcp.lib /NODEFAULTLIB:libcpd.lib /NODEFAULTLIB:libcpmt.lib /NODEFAULTLIB:libcpmtd.lib /LTCG:STATUS /SUBSYSTEM:CONSOLE 2 | 3 | fba_make68k a68k.s a68ktbl.inc 4 | -------------------------------------------------------------------------------- /svn-current/trunk/src/cpu/arm7_intf.h: -------------------------------------------------------------------------------- 1 | 2 | // use these in arm7.cpp 3 | void Arm7_program_write_byte_32le(UINT32 addr, UINT8 data); 4 | void Arm7_program_write_word_32le(UINT32 addr, UINT16 data); 5 | void Arm7_program_write_dword_32le(UINT32 addr, UINT32 data); 6 | UINT8 Arm7_program_read_byte_32le(UINT32 addr); 7 | UINT16 Arm7_program_read_word_32le(UINT32 addr); 8 | UINT32 Arm7_program_read_dword_32le(UINT32 addr); 9 | UINT16 Arm7_program_opcode_word_32le(UINT32 addr); 10 | UINT32 Arm7_program_opcode_dword_32le(UINT32 addr); 11 | 12 | void arm7_set_irq_line(INT32 irqline, INT32 state); 13 | 14 | // use these everywhere else 15 | #define ARM7_READ 1 16 | #define ARM7_WRITE 2 17 | #define ARM7_FETCH 4 18 | 19 | #define ARM7_ROM (ARM7_READ | ARM7_FETCH) 20 | #define ARM7_RAM (ARM7_READ | ARM7_FETCH | ARM7_WRITE) 21 | 22 | void Arm7MapMemory(UINT8 *src, UINT32 start, UINT32 finish, INT32 type); 23 | 24 | void Arm7SetWriteByteHandler(void (*write)(UINT32, UINT8)); 25 | void Arm7SetWriteWordHandler(void (*write)(UINT32, UINT16)); 26 | void Arm7SetWriteLongHandler(void (*write)(UINT32, UINT32)); 27 | void Arm7SetReadByteHandler(UINT8 (*read)(UINT32)); 28 | void Arm7SetReadWordHandler(UINT16 (*read)(UINT32)); 29 | void Arm7SetReadLongHandler(UINT32 (*read)(UINT32)); 30 | 31 | INT32 Arm7Scan(INT32 nAction); 32 | 33 | void Arm7RunEnd(); 34 | void Arm7BurnCycles(INT32 cycles); 35 | INT32 Arm7TotalCycles(); 36 | void Arm7NewFrame(); 37 | 38 | void Arm7Init(INT32); 39 | void Arm7Open(INT32 ); 40 | void Arm7Reset(); 41 | INT32 Arm7Run(INT32 cycles); 42 | 43 | // defined in arm7core.h 44 | #define ARM7_IRQ_LINE 0 45 | #define ARM7_FIRQ_LINE 1 46 | 47 | #define ARM7_CLEAR_LINE 0 48 | #define ARM7_ASSERT_LINE 1 49 | #define ARM7_HOLD_LINE 2 50 | 51 | void Arm7SetIRQLine(INT32 line, INT32 state); 52 | 53 | void Arm7Exit(); 54 | void Arm7Close(); 55 | 56 | // speed hack stuff 57 | void Arm7SetIdleLoopAddress(UINT32 address); 58 | 59 | // for cheat handling 60 | void Arm7_write_rom_byte(UINT32 addr, UINT8 data); 61 | -------------------------------------------------------------------------------- /svn-current/trunk/src/cpu/h6280_intf.h: -------------------------------------------------------------------------------- 1 | // h6280.cpp 2 | void h6280_set_irq_line(INT32 irqline, INT32 state); 3 | void h6280_init(INT32 (*irqcallback)(INT32)); 4 | 5 | // h6280_intf.cpp 6 | #define H6280_READ 1 7 | #define H6280_WRITE 2 8 | #define H6280_FETCH 4 9 | 10 | #define H6280_ROM (H6280_READ | H6280_FETCH) 11 | #define H6280_RAM (H6280_READ | H6280_FETCH | H6280_WRITE) 12 | 13 | void h6280MapMemory(UINT8 *src, UINT32 start, UINT32 finish, INT32 type); 14 | 15 | void h6280SetIrqCallbackHandler(INT32 (*callback)(INT32)); 16 | void h6280SetlinesCallback(void (*setlines_callback)(INT32 lines)); 17 | 18 | void h6280SetWritePortHandler(void (*write)(UINT8, UINT8)); 19 | void h6280SetWriteHandler(void (*write)(UINT32, UINT8)); 20 | void h6280SetReadHandler(UINT8 (*read)(UINT32)); 21 | 22 | void h6280_write_port(UINT8 port, UINT8 data); 23 | void h6280_write(UINT32 address, UINT8 data); 24 | UINT8 h6280_read(UINT32 address); 25 | UINT8 h6280_fetch(UINT32 address); 26 | 27 | void h6280Init(INT32); 28 | void h6280Open(INT32); 29 | void h6280Reset(); 30 | INT32 h6280Run(INT32 cycles); 31 | void h6280Close(); 32 | void h6280Exit(); 33 | 34 | extern INT32 nh6280CpuCount; 35 | 36 | #define H6280_IRQSTATUS_NONE 0 37 | #define H6280_IRQSTATUS_ACK 1 38 | #define H6280_IRQSTATUS_AUTO 2 39 | 40 | #define H6280_INPUT_LINE_NMI 0x20 41 | 42 | void h6280SetIRQLine(INT32 line, INT32 state); 43 | 44 | INT32 h6280CpuScan(INT32 nAction); 45 | 46 | INT32 h6280TotalCycles(); 47 | void h6280NewFrame(); 48 | void h6280RunEnd(); 49 | 50 | INT32 h6280GetActive(); 51 | 52 | void h6280_write_rom(UINT32 address, UINT8 data); 53 | 54 | 55 | UINT8 h6280_irq_status_r(UINT32 offset); 56 | void h6280_irq_status_w(UINT32 offset, UINT8 data); 57 | UINT8 h6280_timer_r(UINT32); 58 | void h6280_timer_w(UINT32 offset, UINT8 data); 59 | 60 | // functions for use by the PSG and joypad port only! 61 | UINT8 h6280io_get_buffer(void); 62 | void h6280io_set_buffer(UINT8); 63 | 64 | 65 | // internal 66 | 67 | 68 | -------------------------------------------------------------------------------- /svn-current/trunk/src/cpu/hd6309_intf.h: -------------------------------------------------------------------------------- 1 | #include "hd6309/hd6309.h" 2 | 3 | typedef UINT8 (*pReadByteHandler)(UINT16 a); 4 | typedef void (*pWriteByteHandler)(UINT16 a, UINT8 d); 5 | typedef UINT8 (*pReadOpHandler)(UINT16 a); 6 | typedef UINT8 (*pReadOpArgHandler)(UINT16 a); 7 | 8 | struct HD6309Ext { 9 | 10 | hd6309_Regs reg; 11 | 12 | UINT8* pMemMap[0x100 * 3]; 13 | 14 | pReadByteHandler ReadByte; 15 | pWriteByteHandler WriteByte; 16 | pReadOpHandler ReadOp; 17 | pReadOpArgHandler ReadOpArg; 18 | 19 | INT32 nCyclesTotal; 20 | INT32 nCyclesSegment; 21 | INT32 nCyclesLeft; 22 | }; 23 | 24 | #define HD6309_IRQSTATUS_NONE 0 25 | #define HD6309_IRQSTATUS_ACK 1 26 | #define HD6309_IRQSTATUS_AUTO 2 27 | 28 | #define HD6309_READ 1 29 | #define HD6309_WRITE 2 30 | #define HD6309_FETCH 4 31 | 32 | #define HD6309_RAM (HD6309_READ | HD6309_WRITE | HD6309_FETCH) 33 | #define HD6309_ROM (HD6309_READ | HD6309_FETCH) 34 | 35 | extern INT32 nHD6309Count; 36 | 37 | extern INT32 nHD6309CyclesTotal; 38 | 39 | void HD6309Reset(); 40 | void HD6309NewFrame(); 41 | INT32 HD6309Init(INT32 num); 42 | void HD6309Exit(); 43 | void HD6309Open(INT32 num); 44 | void HD6309Close(); 45 | INT32 HD6309GetActive(); 46 | void HD6309SetIRQLine(INT32 vector, INT32 status); 47 | INT32 HD6309Run(INT32 cycles); 48 | void HD6309RunEnd(); 49 | INT32 HD6309GetPC(); 50 | INT32 HD6309MapMemory(UINT8* pMemory, UINT16 nStart, UINT16 nEnd, INT32 nType); 51 | INT32 HD6309MemCallback(UINT16 nStart, UINT16 nEnd, INT32 nType); 52 | void HD6309SetReadHandler(UINT8 (*pHandler)(UINT16)); 53 | void HD6309SetWriteHandler(void (*pHandler)(UINT16, UINT8)); 54 | void HD6309SetReadOpHandler(UINT8 (*pHandler)(UINT16)); 55 | void HD6309SetReadOpArgHandler(UINT8 (*pHandler)(UINT16)); 56 | INT32 HD6309Scan(INT32 nAction); 57 | 58 | void HD6309WriteRom(UINT16 Address, UINT8 Data); 59 | 60 | inline static INT32 HD6309TotalCycles() 61 | { 62 | #if defined FBA_DEBUG 63 | if (!DebugCPU_HD6309Initted) bprintf(PRINT_ERROR, _T("HD6309TotalCycles called without init\n")); 64 | #endif 65 | 66 | return nHD6309CyclesTotal; 67 | } 68 | -------------------------------------------------------------------------------- /svn-current/trunk/src/cpu/konami/konami.h: -------------------------------------------------------------------------------- 1 | /*** konami: Portable Konami cpu emulator ******************************************/ 2 | 3 | 4 | #ifndef __KONAMI_H__ 5 | #define __KONAMI_H__ 6 | 7 | 8 | enum 9 | { 10 | KONAMI_PC=1, KONAMI_S, KONAMI_CC ,KONAMI_A, KONAMI_B, KONAMI_U, KONAMI_X, KONAMI_Y, 11 | KONAMI_DP 12 | }; 13 | 14 | /* PUBLIC FUNCTIONS */ 15 | 16 | /****************************************************************************/ 17 | /* Read a byte from given memory location */ 18 | /****************************************************************************/ 19 | #define KONAMI_RDMEM(Addr) konami_read(Addr) 20 | 21 | /****************************************************************************/ 22 | /* Write a byte to given memory location */ 23 | /****************************************************************************/ 24 | #define KONAMI_WRMEM(Addr,Value) konami_write(Addr,Value) 25 | 26 | /****************************************************************************/ 27 | /* Z80_RDOP() is identical to Z80_RDMEM() except it is used for reading */ 28 | /* opcodes. In case of system with memory mapped I/O, this function can be */ 29 | /* used to greatly speed up emulation */ 30 | /****************************************************************************/ 31 | #define KONAMI_RDOP(Addr) konami_fetch(Addr) 32 | 33 | /****************************************************************************/ 34 | /* Z80_RDOP_ARG() is identical to Z80_RDOP() except it is used for reading */ 35 | /* opcode arguments. This difference can be used to support systems that */ 36 | /* use different encoding mechanisms for opcodes and opcode arguments */ 37 | /****************************************************************************/ 38 | #define KONAMI_RDOP_ARG(Addr) konami_fetch(Addr) 39 | 40 | #ifndef FALSE 41 | # define FALSE 0 42 | #endif 43 | #ifndef TRUE 44 | # define TRUE (!FALSE) 45 | #endif 46 | 47 | 48 | #endif /* __KONAMI_H__ */ 49 | -------------------------------------------------------------------------------- /svn-current/trunk/src/cpu/konami_intf.h: -------------------------------------------------------------------------------- 1 | // konami.cpp 2 | void konami_set_irq_line(INT32 irqline, INT32 state); 3 | void konami_init(INT32 (*irqcallback)(INT32)); 4 | 5 | // konami_intf.cpp 6 | #define KON_READ 1 7 | #define KON_WRITE 2 8 | #define KON_FETCH 4 9 | 10 | #define KON_ROM (KON_READ | KON_FETCH) 11 | #define KON_RAM (KON_READ | KON_FETCH | KON_WRITE) 12 | 13 | void konamiMapMemory(UINT8 *src, UINT16 start, UINT16 finish, INT32 type); 14 | 15 | void konamiSetIrqCallbackHandler(INT32 (*callback)(INT32)); 16 | void konamiSetlinesCallback(void (*setlines_callback)(INT32 lines)); 17 | 18 | void konamiSetWriteHandler(void (*write)(UINT16, UINT8)); 19 | void konamiSetReadHandler(UINT8 (*read)(UINT16)); 20 | 21 | void konami_write(UINT16 address, UINT8 data); 22 | UINT8 konami_read(UINT16 address); 23 | UINT8 konami_fetch(UINT16 address); 24 | 25 | void konamiInit(INT32 ); 26 | void konamiOpen(INT32 ); 27 | void konamiReset(); 28 | INT32 konamiRun(INT32 cycles); 29 | void konamiClose(); 30 | void konamiExit(); 31 | 32 | extern INT32 nKonamiCpuCount; 33 | 34 | #define KONAMI_IRQ_LINE 0 35 | #define KONAMI_FIRQ_LINE 1 36 | 37 | #define KONAMI_CLEAR_LINE 0 38 | #define KONAMI_HOLD_LINE 1 39 | #define KONAMI_INPUT_LINE_NMI 2 40 | 41 | void konamiSetIrqLine(INT32 line, INT32 state); 42 | 43 | INT32 konamiCpuScan(INT32 nAction, INT32 *); 44 | 45 | INT32 konamiTotalCycles(); 46 | void konamiNewFrame(); 47 | 48 | INT32 konamiGetActive(); 49 | 50 | void konami_write_rom(UINT16 address, UINT8 data); 51 | -------------------------------------------------------------------------------- /svn-current/trunk/src/cpu/m6502/opsn2a03.h: -------------------------------------------------------------------------------- 1 | /*************************************************************** 2 | *************************************************************** 3 | * Macros to emulate the N2A03 opcodes 4 | *************************************************************** 5 | ***************************************************************/ 6 | 7 | 8 | /* N2A03 ******************************************************* 9 | * ADC Add with carry - no decimal mode 10 | ***************************************************************/ 11 | #define ADC_NES \ 12 | { \ 13 | int c = (P & F_C); \ 14 | int sum = A + tmp + c; \ 15 | P &= ~(F_V | F_C); \ 16 | if( ~(A^tmp) & (A^sum) & F_N ) \ 17 | P |= F_V; \ 18 | if( sum & 0xff00 ) \ 19 | P |= F_C; \ 20 | A = (UINT8) sum; \ 21 | } \ 22 | SET_NZ(A) 23 | 24 | /* N2A03 ******************************************************* 25 | * SBC Subtract with carry - no decimal mode 26 | ***************************************************************/ 27 | #define SBC_NES \ 28 | { \ 29 | int c = (P & F_C) ^ F_C; \ 30 | int sum = A - tmp - c; \ 31 | P &= ~(F_V | F_C); \ 32 | if( (A^tmp) & (A^sum) & F_N ) \ 33 | P |= F_V; \ 34 | if( (sum & 0xff00) == 0 ) \ 35 | P |= F_C; \ 36 | A = (UINT8) sum; \ 37 | } \ 38 | SET_NZ(A) 39 | -------------------------------------------------------------------------------- /svn-current/trunk/src/cpu/m68000_debug.h: -------------------------------------------------------------------------------- 1 | enum SekRegister { 2 | SEK_REG_D0, SEK_REG_D1, SEK_REG_D2, SEK_REG_D3, SEK_REG_D4, SEK_REG_D5, SEK_REG_D6, SEK_REG_D7, 3 | SEK_REG_A0, SEK_REG_A1, SEK_REG_A2, SEK_REG_A3, SEK_REG_A4, SEK_REG_A5, SEK_REG_A6, SEK_REG_A7, 4 | SEK_REG_PC, 5 | SEK_REG_SR, 6 | SEK_REG_SP, SEK_REG_USP, SEK_REG_ISP, SEK_REG_MSP, 7 | SEK_REG_VBR, 8 | SEK_REG_SFC, SEK_REG_DFC, 9 | SEK_REG_CACR, SEK_REG_CAAR 10 | }; 11 | 12 | extern void (*SekDbgBreakpointHandlerRead)(UINT32, INT32); 13 | extern void (*SekDbgBreakpointHandlerFetch)(UINT32, INT32); 14 | extern void (*SekDbgBreakpointHandlerWrite)(UINT32, INT32); 15 | 16 | void SekDbgDisableBreakpoints(); 17 | void SekDbgEnableBreakpoints(); 18 | void SekDbgEnableSingleStep(); 19 | 20 | INT32 SekDbgSetBreakpointDataRead(UINT32 nAddress, INT32 nIdentifier); 21 | INT32 SekDbgSetBreakpointDataWrite(UINT32 nAddress, INT32 nIdentifier); 22 | INT32 SekDbgSetBreakpointFetch(UINT32 nAddress, INT32 nIdentifier); 23 | 24 | INT32 SekDbgGetCPUType(); 25 | INT32 SekDbgGetPendingIRQ(); 26 | UINT32 SekDbgGetRegister(SekRegister nRegister); 27 | bool SekDbgSetRegister(SekRegister nRegister, UINT32 nValue); 28 | -------------------------------------------------------------------------------- /svn-current/trunk/src/cpu/m6805_intf.h: -------------------------------------------------------------------------------- 1 | #include "m6805/m6805.h" 2 | 3 | #define M6805_READ 1 4 | #define M6805_WRITE 2 5 | #define M6805_FETCH 4 6 | 7 | #define M6805_ROM (M6805_READ | M6805_FETCH) 8 | #define M6805_RAM (M6805_ROM | M6805_WRITE) 9 | 10 | void m6805MapMemory(UINT8 *ptr, INT32 nStart, INT32 nEnd, INT32 nType); 11 | 12 | void m6805SetWriteHandler(void (*write)(UINT16, UINT8)); 13 | void m6805SetReadHandler(UINT8 (*read)(UINT16)); 14 | 15 | void m6805_write(UINT16 address, UINT8 data); 16 | UINT8 m6805_read(UINT16 address); 17 | UINT8 m6805_fetch(UINT16 address); 18 | void m6805_write_rom(UINT32 address, UINT8 data); 19 | 20 | void m6805Init(INT32 num, INT32 address_range); 21 | void m6805Exit(); 22 | void m6805Open(INT32 ); 23 | void m6805Close(); 24 | 25 | INT32 m6805Scan(INT32 nAction, INT32 *); 26 | #define m68705Scan(x, y) m6805Scan(x, y) 27 | 28 | void m6805Reset(); 29 | void m6805SetIrqLine(INT32 , INT32 state); 30 | INT32 m6805Run(INT32 cycles); 31 | 32 | void m6805RunEnd(); 33 | 34 | void m68705Reset(); 35 | void m68705SetIrqLine(INT32 irqline, INT32 state); 36 | 37 | void hd63705Reset(void); 38 | void hd63705SetIrqLine(INT32 irqline, INT32 state); 39 | 40 | void m6805NewFrame(); 41 | INT32 m6805TotalCycles(); 42 | 43 | -------------------------------------------------------------------------------- /svn-current/trunk/src/cpu/m6809_intf.h: -------------------------------------------------------------------------------- 1 | #include "m6809/m6809.h" 2 | 3 | typedef UINT8 (*pReadByteHandler)(UINT16 a); 4 | typedef void (*pWriteByteHandler)(UINT16 a, UINT8 d); 5 | typedef UINT8 (*pReadOpHandler)(UINT16 a); 6 | typedef UINT8 (*pReadOpArgHandler)(UINT16 a); 7 | 8 | struct M6809Ext { 9 | 10 | m6809_Regs reg; 11 | 12 | UINT8* pMemMap[0x100 * 3]; 13 | 14 | pReadByteHandler ReadByte; 15 | pWriteByteHandler WriteByte; 16 | pReadOpHandler ReadOp; 17 | pReadOpArgHandler ReadOpArg; 18 | 19 | INT32 nCyclesTotal; 20 | INT32 nCyclesSegment; 21 | INT32 nCyclesLeft; 22 | }; 23 | 24 | #define M6809_IRQSTATUS_NONE 0 25 | #define M6809_IRQSTATUS_ACK 1 26 | #define M6809_IRQSTATUS_AUTO 2 27 | 28 | #define M6809_READ 1 29 | #define M6809_WRITE 2 30 | #define M6809_FETCH 4 31 | 32 | #define M6809_RAM (M6809_READ | M6809_WRITE | M6809_FETCH) 33 | #define M6809_ROM (M6809_READ | M6809_FETCH) 34 | 35 | extern INT32 nM6809Count; 36 | 37 | extern INT32 nM6809CyclesTotal; 38 | 39 | void M6809Reset(); 40 | void M6809NewFrame(); 41 | INT32 M6809Init(INT32 num); 42 | void M6809Exit(); 43 | void M6809Open(INT32 num); 44 | void M6809Close(); 45 | INT32 M6809GetActive(); 46 | void M6809SetIRQLine(INT32 vector, INT32 status); 47 | INT32 M6809Run(INT32 cycles); 48 | void M6809RunEnd(); 49 | INT32 M6809MapMemory(UINT8* pMemory, UINT16 nStart, UINT16 nEnd, INT32 nType); 50 | void M6809SetReadHandler(UINT8 (*pHandler)(UINT16)); 51 | void M6809SetWriteHandler(void (*pHandler)(UINT16, UINT8)); 52 | void M6809SetReadOpHandler(UINT8 (*pHandler)(UINT16)); 53 | void M6809SetReadOpArgHandler(UINT8 (*pHandler)(UINT16)); 54 | INT32 M6809Scan(INT32 nAction); 55 | 56 | void M6809WriteRom(UINT32 Address, UINT8 Data); 57 | 58 | inline static INT32 M6809TotalCycles() 59 | { 60 | #if defined FBA_DEBUG 61 | if (!DebugCPU_M6809Initted) bprintf(PRINT_ERROR, _T("M6809TotalCycles called without init\n")); 62 | #endif 63 | 64 | return nM6809CyclesTotal; 65 | } 66 | -------------------------------------------------------------------------------- /svn-current/trunk/src/cpu/nec/nec.h: -------------------------------------------------------------------------------- 1 | /* ASG 971222 -- rewrote this interface */ 2 | #ifndef __NEC_H_ 3 | #define __NEC_H_ 4 | 5 | 6 | typedef struct _nec_config nec_config; 7 | struct _nec_config 8 | { 9 | const UINT8* v25v35_decryptiontable; // internal decryption table 10 | }; 11 | 12 | #define NEC_INPUT_LINE_INTP0 10 13 | #define NEC_INPUT_LINE_INTP1 11 14 | #define NEC_INPUT_LINE_INTP2 12 15 | #define NEC_INPUT_LINE_POLL 20 16 | 17 | #define V25_PORT_P0 0x10000 18 | #define V25_PORT_P1 0x10002 19 | #define V25_PORT_P2 0x10004 20 | #define V25_PORT_PT 0x10006 21 | 22 | enum 23 | { 24 | NEC_PC=0, 25 | NEC_IP, NEC_AW, NEC_CW, NEC_DW, NEC_BW, NEC_SP, NEC_BP, NEC_IX, NEC_IY, 26 | NEC_FLAGS, NEC_ES, NEC_CS, NEC_SS, NEC_DS, 27 | NEC_PENDING 28 | }; 29 | 30 | /* Public functions */ 31 | //DECLARE_LEGACY_CPU_DEVICE(V20, v20); 32 | //DECLARE_LEGACY_CPU_DEVICE(V25, v25); 33 | //DECLARE_LEGACY_CPU_DEVICE(V30, v30); 34 | //DECLARE_LEGACY_CPU_DEVICE(V33, v33); 35 | //DECLARE_LEGACY_CPU_DEVICE(V35, v35); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /svn-current/trunk/src/cpu/nec_intf.h: -------------------------------------------------------------------------------- 1 | // Nec V20/V30/V33 interface 2 | 3 | #ifndef FASTCALL 4 | #undef __fastcall 5 | #define __fastcall 6 | #endif 7 | 8 | #define V33_TYPE 0 9 | #define V30_TYPE 8 10 | #define V20_TYPE 16 11 | #define V25_TYPE (V20_TYPE|(1<<16)) 12 | #define V35_TYPE (V30_TYPE|(1<<16)) 13 | 14 | UINT8 cpu_readmem20(UINT32 a); 15 | void cpu_writemem20(UINT32 a, UINT8 d); 16 | 17 | extern INT32 nVezCount; 18 | 19 | INT32 VezTotalCycles(); 20 | void VezNewFrame(); 21 | void VezRunEnd(); 22 | void VezIdle(INT32 cycles); 23 | 24 | INT32 VezInit(INT32 nCPU, INT32 type, INT32 clock); // v20/v25/v30/v33/v35 25 | INT32 VezInit(INT32 cpu, INT32 type); // v20/v30/v33 only 26 | void VezExit(); 27 | void VezOpen(INT32 nCPU); 28 | void VezClose(); 29 | INT32 VezGetActive(); 30 | 31 | void VezSetDecode(UINT8 *decode); // set opcode decode 32 | 33 | INT32 VezMemCallback(INT32 nStart,INT32 nEnd,INT32 nMode); 34 | INT32 VezMapArea(INT32 nStart, INT32 nEnd, INT32 nMode, UINT8 *Mem); 35 | INT32 VezMapArea(INT32 nStart, INT32 nEnd, INT32 nMode, UINT8 *Mem1, UINT8 *Mem2); 36 | 37 | void VezSetReadHandler(UINT8 (__fastcall*)(UINT32)); 38 | void VezSetWriteHandler(void (__fastcall*)(UINT32, UINT8)); 39 | 40 | #define V25_PORT_P0 0x10000 41 | #define V25_PORT_P1 0x10002 42 | #define V25_PORT_P2 0x10004 43 | #define V25_PORT_PT 0x10006 44 | 45 | void VezSetReadPort(UINT8 (__fastcall*)(UINT32)); 46 | void VezSetWritePort(void (__fastcall*)(UINT32, UINT8)); 47 | void VezSetIrqCallBack(INT32 (*cb)(INT32)); 48 | 49 | void VezReset(); 50 | INT32 VezGetPc(INT32 n); 51 | INT32 VezScan(INT32 nAction); 52 | 53 | INT32 VezRun(INT32 nCycles); 54 | 55 | #define NEC_INPUT_LINE_INTP0 10 56 | #define NEC_INPUT_LINE_INTP1 11 57 | #define NEC_INPUT_LINE_INTP2 12 58 | #define NEC_INPUT_LINE_POLL 20 59 | 60 | #define VEZ_IRQSTATUS_NONE 0 61 | #define VEZ_IRQSTATUS_ACK 1 62 | #define VEZ_IRQSTATUS_AUTO 2 63 | 64 | void VezSetIRQLineAndVector(const INT32 line, const INT32 vector, const INT32 status); 65 | 66 | -------------------------------------------------------------------------------- /svn-current/trunk/src/cpu/pic16c5x_intf.h: -------------------------------------------------------------------------------- 1 | 2 | UINT16 pic16c5x_read_op(UINT16 address); 3 | UINT8 pic16c5x_read_byte(UINT16 address); 4 | void pic16c5x_write_byte(UINT16 address, UINT8 data); 5 | UINT8 pic16c5x_read_port(UINT16 port); 6 | void pic16c5x_write_port(UINT16 port, UINT8 data); 7 | 8 | extern UINT8 (*pPic16c5xReadPort)(UINT16 port); 9 | extern void (*pPic16c5xWritePort)(UINT16 port, UINT8 data); 10 | 11 | extern INT32 pic16c5xRun(INT32 cycles); 12 | void pic16c5xReset(); 13 | void pic16c5xExit(); 14 | void pic16c5xInit(INT32 type, UINT8 *mem); 15 | 16 | extern INT32 pic16c5xScan(INT32 nAction, INT32* pnMin); 17 | extern void pic16c5xRunEnd(); 18 | 19 | INT32 BurnLoadPicROM(UINT8 *src, INT32 offset, INT32 len); 20 | -------------------------------------------------------------------------------- /svn-current/trunk/src/cpu/s2650/s2650.h: -------------------------------------------------------------------------------- 1 | /******************************************************* 2 | * 3 | * Portable Signetics 2650 cpu emulation 4 | * 5 | * Written by Juergen Buchmueller for use with MAME 6 | * 7 | *******************************************************/ 8 | 9 | #define PMSK 0x1fff /* mask page offset */ 10 | #define PLEN 0x2000 /* page length */ 11 | #define PAGE 0x6000 /* mask page */ 12 | #define AMSK 0x7fff /* mask address range */ 13 | 14 | /* processor status lower */ 15 | #define C 0x01 /* carry flag */ 16 | #define COM 0x02 /* compare: 0 binary, 1 2s complement */ 17 | #define OVF 0x04 /* 2s complement overflow */ 18 | #define WC 0x08 /* with carry: use carry in arithmetic / rotate ops */ 19 | #define RS 0x10 /* register select 0: R0/R1/R2/R3 1: R0/R4/R5/R6 */ 20 | #define IDC 0x20 /* inter digit carry: bit-3-to-bit-4 carry */ 21 | #define CC 0xc0 /* condition code */ 22 | 23 | /* processor status upper */ 24 | #define SP 0x07 /* stack pointer: indexing 8 15bit words */ 25 | #define PSU34 0x18 /* unused bits */ 26 | #define II 0x20 /* interrupt inhibit 0: allow, 1: inhibit */ 27 | #define FO 0x40 /* flag output */ 28 | #define SI 0x80 /* sense input */ 29 | 30 | #define R0 S.reg[0] 31 | #define R1 S.reg[1] 32 | #define R2 S.reg[2] 33 | #define R3 S.reg[3] 34 | -------------------------------------------------------------------------------- /svn-current/trunk/src/cpu/s2650_intf.h: -------------------------------------------------------------------------------- 1 | #define MAX_S2650 4 2 | extern INT32 nActiveS2650; 3 | extern INT32 s2650Count; 4 | 5 | void s2650_write(UINT16 address, UINT8 data); 6 | UINT8 s2650_read(UINT16 address); 7 | UINT8 s2650_fetch(UINT16 address); 8 | void s2650_write_port(UINT16 port, UINT8 data); 9 | UINT8 s2650_read_port(UINT16 port); 10 | 11 | void s2650_write_rom(UINT32 address, UINT8 data); 12 | 13 | typedef INT32 (*s2650irqcallback)(INT32); 14 | extern s2650irqcallback s2650_irqcallback[MAX_S2650]; 15 | void s2650SetIrqCallback(INT32 (*irqcallback)(INT32)); 16 | 17 | void s2650_open(INT32 num); 18 | void s2650_close(); 19 | void s2650_init(INT32 num); 20 | void s2650_exit(); 21 | void s2650_reset(void); 22 | void s2650_set_irq_line(INT32 irqline, INT32 state); 23 | INT32 s2650_get_pc(); 24 | 25 | #define S2650_READ 1 26 | #define S2650_WRITE 2 27 | #define S2650_FETCH 4 28 | #define S2650_ROM (S2650_READ | S2650_FETCH) 29 | #define S2650_RAM (S2650_ROM | S2650_WRITE) 30 | 31 | void s2650MapMemory(UINT8 *src, INT32 start, INT32 end, INT32 type); 32 | 33 | void s2650SetWriteHandler(void (*write)(UINT16, UINT8)); 34 | void s2650SetReadHandler(UINT8 (*read)(UINT16)); 35 | void s2650SetOutHandler(void (*write)(UINT16, UINT8)); 36 | void s2650SetInHandler(UINT8 (*read)(UINT16)); 37 | 38 | INT32 s2650Run(INT32 cycles); 39 | #define s2650Reset() s2650_reset() 40 | void s2650Open(INT32 num); 41 | void s2650Close(); 42 | void s2650Exit(); 43 | void s2650Init(INT32 num); 44 | INT32 s2650GetPc(); 45 | 46 | INT32 s2650GetActive(); 47 | 48 | INT32 s2650Scan(INT32 nAction,INT32 *); 49 | 50 | /* fake control port M/~IO=0 D/~C=0 E/~NE=0 */ 51 | #define S2650_CTRL_PORT 0x100 52 | 53 | /* fake data port M/~IO=0 D/~C=1 E/~NE=0 */ 54 | #define S2650_DATA_PORT 0x101 55 | 56 | /* extended i/o ports M/~IO=0 D/~C=x E/~NE=1 */ 57 | #define S2650_EXT_PORT 0xff 58 | 59 | /* Fake Sense Line */ 60 | #define S2650_SENSE_PORT 0x102 61 | -------------------------------------------------------------------------------- /svn-current/trunk/src/cpu/z80/z80daisy.cpp: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | z80daisy.c 4 | 5 | Z80/180 daisy chaining support functions. 6 | 7 | ***************************************************************************/ 8 | 9 | #include "z80daisy.h" 10 | 11 | #define CLEAR_LINE 0 12 | #define ASSERT_LINE 1 13 | 14 | 15 | void z80daisy_reset(const struct z80_irq_daisy_chain *daisy) 16 | { 17 | /* loop over all devices and call their reset function */ 18 | for ( ; daisy->param != -1; daisy++) 19 | if (daisy->reset) 20 | (*daisy->reset)(daisy->param); 21 | } 22 | 23 | 24 | int z80daisy_update_irq_state(const struct z80_irq_daisy_chain *daisy) 25 | { 26 | /* loop over all devices; dev[0] is highest priority */ 27 | for ( ; daisy->param != -1; daisy++) 28 | { 29 | int state = (*daisy->irq_state)(daisy->param); 30 | 31 | /* if this device is asserting the INT line, that's the one we want */ 32 | if (state & Z80_DAISY_INT) 33 | return ASSERT_LINE; 34 | 35 | /* if this device is asserting the IEO line, it blocks everyone else */ 36 | if (state & Z80_DAISY_IEO) 37 | return CLEAR_LINE; 38 | } 39 | 40 | return CLEAR_LINE; 41 | } 42 | 43 | 44 | int z80daisy_call_ack_device(const struct z80_irq_daisy_chain *daisy) 45 | { 46 | /* loop over all devices; dev[0] is the highest priority */ 47 | for ( ; daisy->param != -1; daisy++) 48 | { 49 | int state = (*daisy->irq_state)(daisy->param); 50 | 51 | /* if this device is asserting the INT line, that's the one we want */ 52 | if (state & Z80_DAISY_INT) 53 | return (*daisy->irq_ack)(daisy->param); 54 | } 55 | 56 | return 0; 57 | } 58 | 59 | 60 | void z80daisy_call_reti_device(const struct z80_irq_daisy_chain *daisy) 61 | { 62 | /* loop over all devices; dev[0] is the highest priority */ 63 | for ( ; daisy->param != -1; daisy++) 64 | { 65 | int state = (*daisy->irq_state)(daisy->param); 66 | 67 | /* if this device is asserting the IEO line, that's the one we want */ 68 | if (state & Z80_DAISY_IEO) 69 | { 70 | (*daisy->irq_reti)(daisy->param); 71 | return; 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /svn-current/trunk/src/cpu/z80/z80daisy.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | z80daisy.h 4 | 5 | Z80/180 daisy chaining support functions. 6 | 7 | ***************************************************************************/ 8 | 9 | 10 | #ifndef Z80DAISY_H 11 | #define Z80DAISY_H 12 | 13 | 14 | /* daisy-chain link */ 15 | struct z80_irq_daisy_chain 16 | { 17 | void (*reset)(int); /* reset callback */ 18 | int (*irq_state)(int); /* get interrupt state */ 19 | int (*irq_ack)(int); /* interrupt acknowledge callback */ 20 | void (*irq_reti)(int); /* reti callback */ 21 | int param; /* callback parameter (-1 ends list) */ 22 | }; 23 | 24 | 25 | /* these constants are returned from the irq_state function */ 26 | #define Z80_DAISY_INT 0x01 /* interrupt request mask */ 27 | #define Z80_DAISY_IEO 0x02 /* interrupt disable mask (IEO) */ 28 | 29 | 30 | /* prototypes */ 31 | void z80daisy_reset(const struct z80_irq_daisy_chain *daisy); 32 | int z80daisy_update_irq_state(const struct z80_irq_daisy_chain *chain); 33 | int z80daisy_call_ack_device(const struct z80_irq_daisy_chain *chain); 34 | void z80daisy_call_reti_device(const struct z80_irq_daisy_chain *chain); 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /svn-current/trunk/src/cpu/z80_intf.h: -------------------------------------------------------------------------------- 1 | // Z80 (Zed Eight-Ty) Interface 2 | 3 | #ifndef FASTCALL 4 | #undef __fastcall 5 | #define __fastcall 6 | #endif 7 | 8 | #include "z80/z80.h" 9 | 10 | extern INT32 nHasZet; 11 | void ZetWriteByte(UINT16 address, UINT8 data); 12 | UINT8 ZetReadByte(UINT16 address); 13 | void ZetWriteRom(UINT16 address, UINT8 data); 14 | INT32 ZetInit(INT32 nCount); 15 | void ZetExit(); 16 | void ZetNewFrame(); 17 | void ZetOpen(INT32 nCPU); 18 | void ZetClose(); 19 | INT32 ZetGetActive(); 20 | 21 | #define ZET_FETCHOP 4 22 | #define ZET_FETCHARG 8 23 | #define ZET_READ 1 24 | #define ZET_WRITE 2 25 | #define ZET_FETCH (ZET_FETCHOP|ZET_FETCHARG) 26 | #define ZET_ROM (ZET_READ|ZET_FETCH) 27 | #define ZET_RAM (ZET_ROM|ZET_WRITE) 28 | 29 | INT32 ZetUnmapMemory(INT32 nStart,INT32 nEnd,INT32 nFlags); 30 | void ZetMapMemory(UINT8 *Mem, INT32 nStart, INT32 nEnd, INT32 nFlags); 31 | 32 | INT32 ZetMemCallback(INT32 nStart,INT32 nEnd,INT32 nMode); 33 | INT32 ZetMapArea(INT32 nStart, INT32 nEnd, INT32 nMode, UINT8 *Mem); 34 | INT32 ZetMapArea(INT32 nStart, INT32 nEnd, INT32 nMode, UINT8 *Mem01, UINT8 *Mem02); 35 | 36 | void ZetReset(); 37 | INT32 ZetGetPC(INT32 n); 38 | INT32 ZetBc(INT32 n); 39 | INT32 ZetDe(INT32 n); 40 | INT32 ZetHL(INT32 n); 41 | INT32 ZetScan(INT32 nAction); 42 | INT32 ZetRun(INT32 nCycles); 43 | void ZetRunEnd(); 44 | void ZetSetIRQLine(const INT32 line, const INT32 status); 45 | void ZetSetVector(INT32 vector); 46 | UINT8 ZetGetVector(); 47 | INT32 ZetNmi(); 48 | INT32 ZetIdle(INT32 nCycles); 49 | INT32 ZetSegmentCycles(); 50 | INT32 ZetTotalCycles(); 51 | void ZetSetHL(INT32 n, UINT16 value); 52 | 53 | #define ZET_IRQSTATUS_NONE 0 54 | #define ZET_IRQSTATUS_ACK 1 55 | #define ZET_IRQSTATUS_AUTO 2 56 | 57 | #define ZetRaiseIrq(n) ZetSetIRQLine(n, ZET_IRQSTATUS_AUTO) 58 | #define ZetLowerIrq() ZetSetIRQLine(0, Z80_CLEAR_LINE) 59 | 60 | void ZetSetReadHandler(UINT8 (__fastcall *pHandler)(UINT16)); 61 | void ZetSetWriteHandler(void (__fastcall *pHandler)(UINT16, UINT8)); 62 | void ZetSetInHandler(UINT8 (__fastcall *pHandler)(UINT16)); 63 | void ZetSetOutHandler(void (__fastcall *pHandler)(UINT16, UINT8)); 64 | 65 | void ZetSetBUSREQLine(INT32 nStatus); 66 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/generated/app_gnuc.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/fbalpha2012/77167cea72e808384c136c8c163a6b4975ce7a84/svn-current/trunk/src/dep/generated/app_gnuc.rc -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/generated/build_details.h: -------------------------------------------------------------------------------- 1 | #define BUILD_TIME 23:17:35 2 | #define BUILD_DATE Sep 16 2013 3 | #define BUILD_CHAR Unicode 4 | #define BUILD_CPU X86 5 | #define BUILD_COMP GCC 4.7.1 6 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/generated/cave_tile_func.h: -------------------------------------------------------------------------------- 1 | #define XFLIP 0 2 | #define YFLIP 0 3 | #define ROT 0 4 | 5 | #define BPP 16 6 | #define XSIZE 320 7 | #define EIGHTBIT 1 8 | #define ROWSCROLL 0 9 | #define ROWSELECT 0 10 | #define DOCLIP 0 11 | #include "cave_tile_render.h" 12 | #undef DOCLIP 13 | #define DOCLIP 1 14 | #include "cave_tile_render.h" 15 | #undef DOCLIP 16 | #undef ROWSELECT 17 | #undef ROWSCROLL 18 | #define ROWSCROLL 1 19 | #define ROWSELECT 0 20 | #define DOCLIP 0 21 | #include "cave_tile_render.h" 22 | #undef DOCLIP 23 | #define DOCLIP 1 24 | #include "cave_tile_render.h" 25 | #undef DOCLIP 26 | #undef ROWSELECT 27 | #undef ROWSCROLL 28 | #define ROWSCROLL 0 29 | #define ROWSELECT 1 30 | #define DOCLIP 0 31 | #include "cave_tile_render.h" 32 | #undef DOCLIP 33 | #define DOCLIP 1 34 | #include "cave_tile_render.h" 35 | #undef DOCLIP 36 | #undef ROWSELECT 37 | #undef ROWSCROLL 38 | #undef EIGHTBIT 39 | 40 | #undef XSIZE 41 | 42 | #define XSIZE 384 43 | #define EIGHTBIT 1 44 | #define ROWSCROLL 0 45 | #define ROWSELECT 0 46 | #define DOCLIP 0 47 | #include "cave_tile_render.h" 48 | #undef DOCLIP 49 | #define DOCLIP 1 50 | #include "cave_tile_render.h" 51 | #undef DOCLIP 52 | #undef ROWSELECT 53 | #undef ROWSCROLL 54 | #define ROWSCROLL 1 55 | #define ROWSELECT 0 56 | #define DOCLIP 0 57 | #include "cave_tile_render.h" 58 | #undef DOCLIP 59 | #define DOCLIP 1 60 | #include "cave_tile_render.h" 61 | #undef DOCLIP 62 | #undef ROWSELECT 63 | #undef ROWSCROLL 64 | #define ROWSCROLL 0 65 | #define ROWSELECT 1 66 | #define DOCLIP 0 67 | #include "cave_tile_render.h" 68 | #undef DOCLIP 69 | #define DOCLIP 1 70 | #include "cave_tile_render.h" 71 | #undef DOCLIP 72 | #undef ROWSELECT 73 | #undef ROWSCROLL 74 | #undef EIGHTBIT 75 | 76 | #undef XSIZE 77 | 78 | #undef BPP 79 | 80 | #undef ROT 81 | 82 | #undef YFLIP 83 | #undef XFLIP 84 | 85 | #include "cave_tile_func_table.h" 86 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/generated/cave_tile_func_table.h: -------------------------------------------------------------------------------- 1 | // Table with all function addresses. 2 | static RenderTileFunction RenderTileFunctionTable[] = { 3 | &RenderTile16_320_ROT0_NOFLIP_NOROWSCROLL_NOROWSELECT_NOCLIP_256, &RenderTile16_320_ROT0_NOFLIP_NOROWSCROLL_NOROWSELECT_CLIP_256, 4 | &RenderTile16_320_ROT0_NOFLIP_ROWSCROLL_NOROWSELECT_NOCLIP_256, &RenderTile16_320_ROT0_NOFLIP_ROWSCROLL_NOROWSELECT_CLIP_256, 5 | &RenderTile16_320_ROT0_NOFLIP_NOROWSCROLL_ROWSELECT_NOCLIP_256, &RenderTile16_320_ROT0_NOFLIP_NOROWSCROLL_ROWSELECT_CLIP_256, 6 | &RenderTile16_384_ROT0_NOFLIP_NOROWSCROLL_NOROWSELECT_NOCLIP_256, &RenderTile16_384_ROT0_NOFLIP_NOROWSCROLL_NOROWSELECT_CLIP_256, 7 | &RenderTile16_384_ROT0_NOFLIP_ROWSCROLL_NOROWSELECT_NOCLIP_256, &RenderTile16_384_ROT0_NOFLIP_ROWSCROLL_NOROWSELECT_CLIP_256, 8 | &RenderTile16_384_ROT0_NOFLIP_NOROWSCROLL_ROWSELECT_NOCLIP_256, &RenderTile16_384_ROT0_NOFLIP_NOROWSCROLL_ROWSELECT_CLIP_256, 9 | }; 10 | 11 | static RenderTileFunction* RenderTile_ROT0[2] = { 12 | &RenderTileFunctionTable[0], 13 | &RenderTileFunctionTable[6] 14 | }; 15 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/generated/driverlist.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/fbalpha2012/77167cea72e808384c136c8c163a6b4975ce7a84/svn-current/trunk/src/dep/generated/driverlist.h -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/generated/license.rtf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/fbalpha2012/77167cea72e808384c136c8c163a6b4975ce7a84/svn-current/trunk/src/dep/generated/license.rtf -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/generated/psikyo_tile_func.h: -------------------------------------------------------------------------------- 1 | #define ROT 0 2 | #define BPP 16 3 | #define FLIP 0 4 | #define ZOOM 0 5 | #define ZBUFFER 0 6 | 7 | #define TRANS 0 8 | 9 | #define ROWSCROLL 0 10 | #define DOCLIP 0 11 | #include "psikyo_render.h" 12 | #undef DOCLIP 13 | #define DOCLIP 1 14 | #include "psikyo_render.h" 15 | #undef DOCLIP 16 | #undef ROWSCROLL 17 | #define ROWSCROLL 1 18 | #define DOCLIP 0 19 | #include "psikyo_render.h" 20 | #undef DOCLIP 21 | #define DOCLIP 1 22 | #include "psikyo_render.h" 23 | #undef DOCLIP 24 | #undef ROWSCROLL 25 | 26 | #undef TRANS 27 | #define TRANS 15 28 | 29 | #define ROWSCROLL 0 30 | #define DOCLIP 0 31 | #include "psikyo_render.h" 32 | #undef DOCLIP 33 | #define DOCLIP 1 34 | #include "psikyo_render.h" 35 | #undef DOCLIP 36 | #undef ROWSCROLL 37 | #define ROWSCROLL 1 38 | #define DOCLIP 0 39 | #include "psikyo_render.h" 40 | #undef DOCLIP 41 | #define DOCLIP 1 42 | #include "psikyo_render.h" 43 | #undef DOCLIP 44 | #undef ROWSCROLL 45 | 46 | #undef TRANS 47 | #define TRANS -1 48 | 49 | #define ROWSCROLL 0 50 | #define DOCLIP 0 51 | #include "psikyo_render.h" 52 | #undef DOCLIP 53 | #define DOCLIP 1 54 | #include "psikyo_render.h" 55 | #undef DOCLIP 56 | #undef ROWSCROLL 57 | #define ROWSCROLL 1 58 | #define DOCLIP 0 59 | #include "psikyo_render.h" 60 | #undef DOCLIP 61 | #define DOCLIP 1 62 | #include "psikyo_render.h" 63 | #undef DOCLIP 64 | #undef ROWSCROLL 65 | 66 | #undef TRANS 67 | #undef ZBUFFER 68 | #undef ZOOM 69 | #undef FLIP 70 | #undef BPP 71 | #undef ROT 72 | 73 | #include "psikyo_tile_func_table.h" 74 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/generated/psikyo_tile_func_table.h: -------------------------------------------------------------------------------- 1 | // Table with all function addresses. 2 | static RenderTileFunction RenderTile[] = { 3 | &RenderTile16_TRANS0_NOFLIP_ROT0_NOROWSCROLL_NOZOOM_NOZBUFFER_NOCLIP, &RenderTile16_TRANS0_NOFLIP_ROT0_NOROWSCROLL_NOZOOM_NOZBUFFER_CLIP, 4 | &RenderTile16_TRANS0_NOFLIP_ROT0_ROWSCROLL_NOZOOM_NOZBUFFER_NOCLIP, &RenderTile16_TRANS0_NOFLIP_ROT0_ROWSCROLL_NOZOOM_NOZBUFFER_CLIP, 5 | &RenderTile16_TRANS15_NOFLIP_ROT0_NOROWSCROLL_NOZOOM_NOZBUFFER_NOCLIP, &RenderTile16_TRANS15_NOFLIP_ROT0_NOROWSCROLL_NOZOOM_NOZBUFFER_CLIP, 6 | &RenderTile16_TRANS15_NOFLIP_ROT0_ROWSCROLL_NOZOOM_NOZBUFFER_NOCLIP, &RenderTile16_TRANS15_NOFLIP_ROT0_ROWSCROLL_NOZOOM_NOZBUFFER_CLIP, 7 | &RenderTile16_SOLID_NOFLIP_ROT0_NOROWSCROLL_NOZOOM_NOZBUFFER_NOCLIP, &RenderTile16_SOLID_NOFLIP_ROT0_NOROWSCROLL_NOZOOM_NOZBUFFER_CLIP, 8 | &RenderTile16_SOLID_NOFLIP_ROT0_ROWSCROLL_NOZOOM_NOZBUFFER_NOCLIP, &RenderTile16_SOLID_NOFLIP_ROT0_ROWSCROLL_NOZOOM_NOZBUFFER_CLIP, 9 | }; 10 | 11 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/kaillera/client/net.h: -------------------------------------------------------------------------------- 1 | #include "kailleraclient.h" 2 | 3 | extern int Kaillera_Initialised; 4 | 5 | extern int (WINAPI *Kaillera_Get_Version) (char *version); 6 | extern int (WINAPI *Kaillera_Init) (); 7 | extern int (WINAPI *Kaillera_Shutdown) (); 8 | extern int (WINAPI *Kaillera_Set_Infos) (kailleraInfos *infos); 9 | extern int (WINAPI *Kaillera_Select_Server_Dialog) (HWND parent); 10 | extern int (WINAPI *Kaillera_Modify_Play_Values) (void *values, int size); 11 | extern int (WINAPI *Kaillera_Chat_Send) (char *text); 12 | extern int (WINAPI *Kaillera_End_Game) (); 13 | 14 | int Init_Network(void); 15 | void End_Network(void); 16 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/lib7z/7zAlloc.c: -------------------------------------------------------------------------------- 1 | /* 7zAlloc.c -- Allocation functions 2 | 2015-11-09 : Igor Pavlov : Public domain */ 3 | 4 | #include "Precomp.h" 5 | 6 | #include "7zAlloc.h" 7 | 8 | /* #define _SZ_ALLOC_DEBUG */ 9 | /* use _SZ_ALLOC_DEBUG to debug alloc/free operations */ 10 | 11 | #ifdef _SZ_ALLOC_DEBUG 12 | 13 | #ifdef _WIN32 14 | #include 15 | #endif 16 | 17 | #include 18 | int g_allocCount = 0; 19 | int g_allocCountTemp = 0; 20 | 21 | #endif 22 | 23 | void *SzAlloc(void *p, size_t size) 24 | { 25 | UNUSED_VAR(p); 26 | if (size == 0) 27 | return 0; 28 | #ifdef _SZ_ALLOC_DEBUG 29 | fprintf(stderr, "\nAlloc %10u bytes; count = %10d", (unsigned)size, g_allocCount); 30 | g_allocCount++; 31 | #endif 32 | return malloc(size); 33 | } 34 | 35 | void SzFree(void *p, void *address) 36 | { 37 | UNUSED_VAR(p); 38 | #ifdef _SZ_ALLOC_DEBUG 39 | if (address != 0) 40 | { 41 | g_allocCount--; 42 | fprintf(stderr, "\nFree; count = %10d", g_allocCount); 43 | } 44 | #endif 45 | free(address); 46 | } 47 | 48 | void *SzAllocTemp(void *p, size_t size) 49 | { 50 | UNUSED_VAR(p); 51 | if (size == 0) 52 | return 0; 53 | #ifdef _SZ_ALLOC_DEBUG 54 | fprintf(stderr, "\nAlloc_temp %10u bytes; count = %10d", (unsigned)size, g_allocCountTemp); 55 | g_allocCountTemp++; 56 | #ifdef _WIN32 57 | return HeapAlloc(GetProcessHeap(), 0, size); 58 | #endif 59 | #endif 60 | return malloc(size); 61 | } 62 | 63 | void SzFreeTemp(void *p, void *address) 64 | { 65 | UNUSED_VAR(p); 66 | #ifdef _SZ_ALLOC_DEBUG 67 | if (address != 0) 68 | { 69 | g_allocCountTemp--; 70 | fprintf(stderr, "\nFree_temp; count = %10d", g_allocCountTemp); 71 | } 72 | #ifdef _WIN32 73 | HeapFree(GetProcessHeap(), 0, address); 74 | return; 75 | #endif 76 | #endif 77 | free(address); 78 | } 79 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/lib7z/7zAlloc.h: -------------------------------------------------------------------------------- 1 | /* 7zAlloc.h -- Allocation functions 2 | 2013-03-25 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef __7Z_ALLOC_H 5 | #define __7Z_ALLOC_H 6 | 7 | #include 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | void *SzAlloc(void *p, size_t size); 14 | void SzFree(void *p, void *address); 15 | 16 | void *SzAllocTemp(void *p, size_t size); 17 | void SzFreeTemp(void *p, void *address); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/lib7z/7zBuf.c: -------------------------------------------------------------------------------- 1 | /* 7zBuf.c -- Byte Buffer 2 | 2013-01-21 : Igor Pavlov : Public domain */ 3 | 4 | #include "Precomp.h" 5 | 6 | #include "7zBuf.h" 7 | 8 | void Buf_Init(CBuf *p) 9 | { 10 | p->data = 0; 11 | p->size = 0; 12 | } 13 | 14 | int Buf_Create(CBuf *p, size_t size, ISzAlloc *alloc) 15 | { 16 | p->size = 0; 17 | if (size == 0) 18 | { 19 | p->data = 0; 20 | return 1; 21 | } 22 | p->data = (Byte *)alloc->Alloc(alloc, size); 23 | if (p->data != 0) 24 | { 25 | p->size = size; 26 | return 1; 27 | } 28 | return 0; 29 | } 30 | 31 | void Buf_Free(CBuf *p, ISzAlloc *alloc) 32 | { 33 | alloc->Free(alloc, p->data); 34 | p->data = 0; 35 | p->size = 0; 36 | } 37 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/lib7z/7zBuf.h: -------------------------------------------------------------------------------- 1 | /* 7zBuf.h -- Byte Buffer 2 | 2013-01-18 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef __7Z_BUF_H 5 | #define __7Z_BUF_H 6 | 7 | #include "7zTypes.h" 8 | 9 | EXTERN_C_BEGIN 10 | 11 | typedef struct 12 | { 13 | Byte *data; 14 | size_t size; 15 | } CBuf; 16 | 17 | void Buf_Init(CBuf *p); 18 | int Buf_Create(CBuf *p, size_t size, ISzAlloc *alloc); 19 | void Buf_Free(CBuf *p, ISzAlloc *alloc); 20 | 21 | typedef struct 22 | { 23 | Byte *data; 24 | size_t size; 25 | size_t pos; 26 | } CDynBuf; 27 | 28 | void DynBuf_Construct(CDynBuf *p); 29 | void DynBuf_SeekToBeg(CDynBuf *p); 30 | int DynBuf_Write(CDynBuf *p, const Byte *buf, size_t size, ISzAlloc *alloc); 31 | void DynBuf_Free(CDynBuf *p, ISzAlloc *alloc); 32 | 33 | EXTERN_C_END 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/lib7z/7zBuf2.c: -------------------------------------------------------------------------------- 1 | /* 7zBuf2.c -- Byte Buffer 2 | 2014-08-22 : Igor Pavlov : Public domain */ 3 | 4 | #include "Precomp.h" 5 | 6 | #include 7 | 8 | #include "7zBuf.h" 9 | 10 | void DynBuf_Construct(CDynBuf *p) 11 | { 12 | p->data = 0; 13 | p->size = 0; 14 | p->pos = 0; 15 | } 16 | 17 | void DynBuf_SeekToBeg(CDynBuf *p) 18 | { 19 | p->pos = 0; 20 | } 21 | 22 | int DynBuf_Write(CDynBuf *p, const Byte *buf, size_t size, ISzAlloc *alloc) 23 | { 24 | if (size > p->size - p->pos) 25 | { 26 | size_t newSize = p->pos + size; 27 | Byte *data; 28 | newSize += newSize / 4; 29 | data = (Byte *)alloc->Alloc(alloc, newSize); 30 | if (data == 0) 31 | return 0; 32 | p->size = newSize; 33 | memcpy(data, p->data, p->pos); 34 | alloc->Free(alloc, p->data); 35 | p->data = data; 36 | } 37 | if (size != 0) 38 | { 39 | memcpy(p->data + p->pos, buf, size); 40 | p->pos += size; 41 | } 42 | return 1; 43 | } 44 | 45 | void DynBuf_Free(CDynBuf *p, ISzAlloc *alloc) 46 | { 47 | alloc->Free(alloc, p->data); 48 | p->data = 0; 49 | p->size = 0; 50 | p->pos = 0; 51 | } 52 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/lib7z/7zCrc.h: -------------------------------------------------------------------------------- 1 | /* 7zCrc.h -- CRC32 calculation 2 | 2013-01-18 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef __7Z_CRC_H 5 | #define __7Z_CRC_H 6 | 7 | #include "7zTypes.h" 8 | 9 | EXTERN_C_BEGIN 10 | 11 | extern UInt32 g_CrcTable[]; 12 | 13 | /* Call CrcGenerateTable one time before other CRC functions */ 14 | void MY_FAST_CALL CrcGenerateTable(void); 15 | 16 | #define CRC_INIT_VAL 0xFFFFFFFF 17 | #define CRC_GET_DIGEST(crc) ((crc) ^ CRC_INIT_VAL) 18 | #define CRC_UPDATE_BYTE(crc, b) (g_CrcTable[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8)) 19 | 20 | UInt32 MY_FAST_CALL CrcUpdate(UInt32 crc, const void *data, size_t size); 21 | UInt32 MY_FAST_CALL CrcCalc(const void *data, size_t size); 22 | 23 | EXTERN_C_END 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/lib7z/7zFile.h: -------------------------------------------------------------------------------- 1 | /* 7zFile.h -- File IO 2 | 2013-01-18 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef __7Z_FILE_H 5 | #define __7Z_FILE_H 6 | 7 | #if defined(_WIN32) && !defined(_XBOX) 8 | #define USE_WINDOWS_FILE 9 | #endif 10 | 11 | #ifdef USE_WINDOWS_FILE 12 | #include 13 | #else 14 | #include 15 | #endif 16 | 17 | #include "7zTypes.h" 18 | 19 | EXTERN_C_BEGIN 20 | 21 | /* ---------- File ---------- */ 22 | 23 | typedef struct 24 | { 25 | #ifdef USE_WINDOWS_FILE 26 | HANDLE handle; 27 | #else 28 | FILE *file; 29 | #endif 30 | } CSzFile; 31 | 32 | void File_Construct(CSzFile *p); 33 | #if !defined(UNDER_CE) || !defined(USE_WINDOWS_FILE) 34 | WRes InFile_Open(CSzFile *p, const char *name); 35 | WRes OutFile_Open(CSzFile *p, const char *name); 36 | #endif 37 | #ifdef USE_WINDOWS_FILE 38 | WRes InFile_OpenW(CSzFile *p, const WCHAR *name); 39 | WRes OutFile_OpenW(CSzFile *p, const WCHAR *name); 40 | #endif 41 | WRes File_Close(CSzFile *p); 42 | 43 | /* reads max(*size, remain file's size) bytes */ 44 | WRes File_Read(CSzFile *p, void *data, size_t *size); 45 | 46 | /* writes *size bytes */ 47 | WRes File_Write(CSzFile *p, const void *data, size_t *size); 48 | 49 | WRes File_Seek(CSzFile *p, Int64 *pos, ESzSeek origin); 50 | WRes File_GetLength(CSzFile *p, UInt64 *length); 51 | 52 | 53 | /* ---------- FileInStream ---------- */ 54 | 55 | typedef struct 56 | { 57 | ISeqInStream s; 58 | CSzFile file; 59 | } CFileSeqInStream; 60 | 61 | void FileSeqInStream_CreateVTable(CFileSeqInStream *p); 62 | 63 | 64 | typedef struct 65 | { 66 | ISeekInStream s; 67 | CSzFile file; 68 | } CFileInStream; 69 | 70 | void FileInStream_CreateVTable(CFileInStream *p); 71 | 72 | 73 | typedef struct 74 | { 75 | ISeqOutStream s; 76 | CSzFile file; 77 | } CFileOutStream; 78 | 79 | void FileOutStream_CreateVTable(CFileOutStream *p); 80 | 81 | EXTERN_C_END 82 | 83 | #endif 84 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/lib7z/7zVersion.h: -------------------------------------------------------------------------------- 1 | #define MY_VER_MAJOR 15 2 | #define MY_VER_MINOR 14 3 | #define MY_VER_BUILD 0 4 | #define MY_VERSION_NUMBERS "15.14" 5 | #define MY_VERSION "15.14" 6 | #define MY_DATE "2015-12-31" 7 | #undef MY_COPYRIGHT 8 | #undef MY_VERSION_COPYRIGHT_DATE 9 | #define MY_AUTHOR_NAME "Igor Pavlov" 10 | #define MY_COPYRIGHT_PD "Igor Pavlov : Public domain" 11 | #define MY_COPYRIGHT_CR "Copyright (c) 1999-2015 Igor Pavlov" 12 | 13 | #ifdef USE_COPYRIGHT_CR 14 | #define MY_COPYRIGHT MY_COPYRIGHT_CR 15 | #else 16 | #define MY_COPYRIGHT MY_COPYRIGHT_PD 17 | #endif 18 | 19 | #define MY_VERSION_COPYRIGHT_DATE MY_VERSION " : " MY_COPYRIGHT " : " MY_DATE 20 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/lib7z/7zVersion.rc: -------------------------------------------------------------------------------- 1 | #define MY_VS_FFI_FILEFLAGSMASK 0x0000003FL 2 | #define MY_VOS_NT_WINDOWS32 0x00040004L 3 | #define MY_VOS_CE_WINDOWS32 0x00050004L 4 | 5 | #define MY_VFT_APP 0x00000001L 6 | #define MY_VFT_DLL 0x00000002L 7 | 8 | // #include 9 | 10 | #ifndef MY_VERSION 11 | #include "7zVersion.h" 12 | #endif 13 | 14 | #define MY_VER MY_VER_MAJOR,MY_VER_MINOR,MY_VER_BUILD,0 15 | 16 | #ifdef DEBUG 17 | #define DBG_FL VS_FF_DEBUG 18 | #else 19 | #define DBG_FL 0 20 | #endif 21 | 22 | #define MY_VERSION_INFO(fileType, descr, intName, origName) \ 23 | LANGUAGE 9, 1 \ 24 | 1 VERSIONINFO \ 25 | FILEVERSION MY_VER \ 26 | PRODUCTVERSION MY_VER \ 27 | FILEFLAGSMASK MY_VS_FFI_FILEFLAGSMASK \ 28 | FILEFLAGS DBG_FL \ 29 | FILEOS MY_VOS_NT_WINDOWS32 \ 30 | FILETYPE fileType \ 31 | FILESUBTYPE 0x0L \ 32 | BEGIN \ 33 | BLOCK "StringFileInfo" \ 34 | BEGIN \ 35 | BLOCK "040904b0" \ 36 | BEGIN \ 37 | VALUE "CompanyName", "Igor Pavlov" \ 38 | VALUE "FileDescription", descr \ 39 | VALUE "FileVersion", MY_VERSION \ 40 | VALUE "InternalName", intName \ 41 | VALUE "LegalCopyright", MY_COPYRIGHT \ 42 | VALUE "OriginalFilename", origName \ 43 | VALUE "ProductName", "7-Zip" \ 44 | VALUE "ProductVersion", MY_VERSION \ 45 | END \ 46 | END \ 47 | BLOCK "VarFileInfo" \ 48 | BEGIN \ 49 | VALUE "Translation", 0x409, 1200 \ 50 | END \ 51 | END 52 | 53 | #define MY_VERSION_INFO_APP(descr, intName) MY_VERSION_INFO(MY_VFT_APP, descr, intName, intName ".exe") 54 | 55 | #define MY_VERSION_INFO_DLL(descr, intName) MY_VERSION_INFO(MY_VFT_DLL, descr, intName, intName ".dll") 56 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/lib7z/Aes.h: -------------------------------------------------------------------------------- 1 | /* Aes.h -- AES encryption / decryption 2 | 2013-01-18 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef __AES_H 5 | #define __AES_H 6 | 7 | #include "7zTypes.h" 8 | 9 | EXTERN_C_BEGIN 10 | 11 | #define AES_BLOCK_SIZE 16 12 | 13 | /* Call AesGenTables one time before other AES functions */ 14 | void AesGenTables(void); 15 | 16 | /* UInt32 pointers must be 16-byte aligned */ 17 | 18 | /* 16-byte (4 * 32-bit words) blocks: 1 (IV) + 1 (keyMode) + 15 (AES-256 roundKeys) */ 19 | #define AES_NUM_IVMRK_WORDS ((1 + 1 + 15) * 4) 20 | 21 | /* aes - 16-byte aligned pointer to keyMode+roundKeys sequence */ 22 | /* keySize = 16 or 24 or 32 (bytes) */ 23 | typedef void (MY_FAST_CALL *AES_SET_KEY_FUNC)(UInt32 *aes, const Byte *key, unsigned keySize); 24 | void MY_FAST_CALL Aes_SetKey_Enc(UInt32 *aes, const Byte *key, unsigned keySize); 25 | void MY_FAST_CALL Aes_SetKey_Dec(UInt32 *aes, const Byte *key, unsigned keySize); 26 | 27 | /* ivAes - 16-byte aligned pointer to iv+keyMode+roundKeys sequence: UInt32[AES_NUM_IVMRK_WORDS] */ 28 | void AesCbc_Init(UInt32 *ivAes, const Byte *iv); /* iv size is AES_BLOCK_SIZE */ 29 | /* data - 16-byte aligned pointer to data */ 30 | /* numBlocks - the number of 16-byte blocks in data array */ 31 | typedef void (MY_FAST_CALL *AES_CODE_FUNC)(UInt32 *ivAes, Byte *data, size_t numBlocks); 32 | extern AES_CODE_FUNC g_AesCbc_Encode; 33 | extern AES_CODE_FUNC g_AesCbc_Decode; 34 | extern AES_CODE_FUNC g_AesCtr_Code; 35 | 36 | EXTERN_C_END 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/lib7z/Alloc.h: -------------------------------------------------------------------------------- 1 | /* Alloc.h -- Memory allocation functions 2 | 2015-02-21 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef __COMMON_ALLOC_H 5 | #define __COMMON_ALLOC_H 6 | 7 | #include "7zTypes.h" 8 | 9 | EXTERN_C_BEGIN 10 | 11 | void *MyAlloc(size_t size); 12 | void MyFree(void *address); 13 | 14 | #ifdef _WIN32 15 | 16 | void SetLargePageSize(); 17 | 18 | void *MidAlloc(size_t size); 19 | void MidFree(void *address); 20 | void *BigAlloc(size_t size); 21 | void BigFree(void *address); 22 | 23 | #else 24 | 25 | #define MidAlloc(size) MyAlloc(size) 26 | #define MidFree(address) MyFree(address) 27 | #define BigAlloc(size) MyAlloc(size) 28 | #define BigFree(address) MyFree(address) 29 | 30 | #endif 31 | 32 | extern ISzAlloc g_Alloc; 33 | extern ISzAlloc g_BigAlloc; 34 | 35 | EXTERN_C_END 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/lib7z/BraIA64.c: -------------------------------------------------------------------------------- 1 | /* BraIA64.c -- Converter for IA-64 code 2 | 2013-11-12 : Igor Pavlov : Public domain */ 3 | 4 | #include "Precomp.h" 5 | 6 | #include "Bra.h" 7 | 8 | static const Byte kBranchTable[32] = 9 | { 10 | 0, 0, 0, 0, 0, 0, 0, 0, 11 | 0, 0, 0, 0, 0, 0, 0, 0, 12 | 4, 4, 6, 6, 0, 0, 7, 7, 13 | 4, 4, 0, 0, 4, 4, 0, 0 14 | }; 15 | 16 | SizeT IA64_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) 17 | { 18 | SizeT i; 19 | if (size < 16) 20 | return 0; 21 | size -= 16; 22 | for (i = 0; i <= size; i += 16) 23 | { 24 | UInt32 instrTemplate = data[i] & 0x1F; 25 | UInt32 mask = kBranchTable[instrTemplate]; 26 | UInt32 bitPos = 5; 27 | int slot; 28 | for (slot = 0; slot < 3; slot++, bitPos += 41) 29 | { 30 | UInt32 bytePos, bitRes; 31 | UInt64 instruction, instNorm; 32 | int j; 33 | if (((mask >> slot) & 1) == 0) 34 | continue; 35 | bytePos = (bitPos >> 3); 36 | bitRes = bitPos & 0x7; 37 | instruction = 0; 38 | for (j = 0; j < 6; j++) 39 | instruction += (UInt64)data[i + j + bytePos] << (8 * j); 40 | 41 | instNorm = instruction >> bitRes; 42 | if (((instNorm >> 37) & 0xF) == 0x5 && ((instNorm >> 9) & 0x7) == 0) 43 | { 44 | UInt32 src = (UInt32)((instNorm >> 13) & 0xFFFFF); 45 | UInt32 dest; 46 | src |= ((UInt32)(instNorm >> 36) & 1) << 20; 47 | 48 | src <<= 4; 49 | 50 | if (encoding) 51 | dest = ip + (UInt32)i + src; 52 | else 53 | dest = src - (ip + (UInt32)i); 54 | 55 | dest >>= 4; 56 | 57 | instNorm &= ~((UInt64)(0x8FFFFF) << 13); 58 | instNorm |= ((UInt64)(dest & 0xFFFFF) << 13); 59 | instNorm |= ((UInt64)(dest & 0x100000) << (36 - 20)); 60 | 61 | instruction &= (1 << bitRes) - 1; 62 | instruction |= (instNorm << bitRes); 63 | for (j = 0; j < 6; j++) 64 | data[i + j + bytePos] = (Byte)(instruction >> (8 * j)); 65 | } 66 | } 67 | } 68 | return i; 69 | } 70 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/lib7z/Compiler.h: -------------------------------------------------------------------------------- 1 | /* Compiler.h 2 | 2015-08-02 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef __7Z_COMPILER_H 5 | #define __7Z_COMPILER_H 6 | 7 | #ifdef _MSC_VER 8 | 9 | #ifdef UNDER_CE 10 | #define RPC_NO_WINDOWS_H 11 | /* #pragma warning(disable : 4115) // '_RPC_ASYNC_STATE' : named type definition in parentheses */ 12 | #pragma warning(disable : 4201) // nonstandard extension used : nameless struct/union 13 | #pragma warning(disable : 4214) // nonstandard extension used : bit field types other than int 14 | #endif 15 | 16 | #if _MSC_VER >= 1300 17 | #pragma warning(disable : 4996) // This function or variable may be unsafe 18 | #else 19 | #pragma warning(disable : 4511) // copy constructor could not be generated 20 | #pragma warning(disable : 4512) // assignment operator could not be generated 21 | #pragma warning(disable : 4514) // unreferenced inline function has been removed 22 | #pragma warning(disable : 4702) // unreachable code 23 | #pragma warning(disable : 4710) // not inlined 24 | #pragma warning(disable : 4786) // identifier was truncated to '255' characters in the debug information 25 | #endif 26 | 27 | #endif 28 | 29 | #define UNUSED_VAR(x) (void)x; 30 | /* #define UNUSED_VAR(x) x=x; */ 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/lib7z/Delta.c: -------------------------------------------------------------------------------- 1 | /* Delta.c -- Delta converter 2 | 2009-05-26 : Igor Pavlov : Public domain */ 3 | 4 | #include "Precomp.h" 5 | 6 | #include "Delta.h" 7 | 8 | void Delta_Init(Byte *state) 9 | { 10 | unsigned i; 11 | for (i = 0; i < DELTA_STATE_SIZE; i++) 12 | state[i] = 0; 13 | } 14 | 15 | static void MyMemCpy(Byte *dest, const Byte *src, unsigned size) 16 | { 17 | unsigned i; 18 | for (i = 0; i < size; i++) 19 | dest[i] = src[i]; 20 | } 21 | 22 | void Delta_Encode(Byte *state, unsigned delta, Byte *data, SizeT size) 23 | { 24 | Byte buf[DELTA_STATE_SIZE]; 25 | unsigned j = 0; 26 | MyMemCpy(buf, state, delta); 27 | { 28 | SizeT i; 29 | for (i = 0; i < size;) 30 | { 31 | for (j = 0; j < delta && i < size; i++, j++) 32 | { 33 | Byte b = data[i]; 34 | data[i] = (Byte)(b - buf[j]); 35 | buf[j] = b; 36 | } 37 | } 38 | } 39 | if (j == delta) 40 | j = 0; 41 | MyMemCpy(state, buf + j, delta - j); 42 | MyMemCpy(state + delta - j, buf, j); 43 | } 44 | 45 | void Delta_Decode(Byte *state, unsigned delta, Byte *data, SizeT size) 46 | { 47 | Byte buf[DELTA_STATE_SIZE]; 48 | unsigned j = 0; 49 | MyMemCpy(buf, state, delta); 50 | { 51 | SizeT i; 52 | for (i = 0; i < size;) 53 | { 54 | for (j = 0; j < delta && i < size; i++, j++) 55 | { 56 | buf[j] = data[i] = (Byte)(buf[j] + data[i]); 57 | } 58 | } 59 | } 60 | if (j == delta) 61 | j = 0; 62 | MyMemCpy(state, buf + j, delta - j); 63 | MyMemCpy(state + delta - j, buf, j); 64 | } 65 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/lib7z/Delta.h: -------------------------------------------------------------------------------- 1 | /* Delta.h -- Delta converter 2 | 2013-01-18 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef __DELTA_H 5 | #define __DELTA_H 6 | 7 | #include "7zTypes.h" 8 | 9 | EXTERN_C_BEGIN 10 | 11 | #define DELTA_STATE_SIZE 256 12 | 13 | void Delta_Init(Byte *state); 14 | void Delta_Encode(Byte *state, unsigned delta, Byte *data, SizeT size); 15 | void Delta_Decode(Byte *state, unsigned delta, Byte *data, SizeT size); 16 | 17 | EXTERN_C_END 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/lib7z/LzHash.h: -------------------------------------------------------------------------------- 1 | /* LzHash.h -- HASH functions for LZ algorithms 2 | 2015-04-12 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef __LZ_HASH_H 5 | #define __LZ_HASH_H 6 | 7 | #define kHash2Size (1 << 10) 8 | #define kHash3Size (1 << 16) 9 | #define kHash4Size (1 << 20) 10 | 11 | #define kFix3HashSize (kHash2Size) 12 | #define kFix4HashSize (kHash2Size + kHash3Size) 13 | #define kFix5HashSize (kHash2Size + kHash3Size + kHash4Size) 14 | 15 | #define HASH2_CALC hv = cur[0] | ((UInt32)cur[1] << 8); 16 | 17 | #define HASH3_CALC { \ 18 | UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ 19 | h2 = temp & (kHash2Size - 1); \ 20 | hv = (temp ^ ((UInt32)cur[2] << 8)) & p->hashMask; } 21 | 22 | #define HASH4_CALC { \ 23 | UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ 24 | h2 = temp & (kHash2Size - 1); \ 25 | temp ^= ((UInt32)cur[2] << 8); \ 26 | h3 = temp & (kHash3Size - 1); \ 27 | hv = (temp ^ (p->crc[cur[3]] << 5)) & p->hashMask; } 28 | 29 | #define HASH5_CALC { \ 30 | UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ 31 | h2 = temp & (kHash2Size - 1); \ 32 | temp ^= ((UInt32)cur[2] << 8); \ 33 | h3 = temp & (kHash3Size - 1); \ 34 | temp ^= (p->crc[cur[3]] << 5); \ 35 | h4 = temp & (kHash4Size - 1); \ 36 | hv = (temp ^ (p->crc[cur[4]] << 3)) & p->hashMask; } 37 | 38 | /* #define HASH_ZIP_CALC hv = ((cur[0] | ((UInt32)cur[1] << 8)) ^ p->crc[cur[2]]) & 0xFFFF; */ 39 | #define HASH_ZIP_CALC hv = ((cur[2] | ((UInt32)cur[0] << 8)) ^ p->crc[cur[1]]) & 0xFFFF; 40 | 41 | 42 | #define MT_HASH2_CALC \ 43 | h2 = (p->crc[cur[0]] ^ cur[1]) & (kHash2Size - 1); 44 | 45 | #define MT_HASH3_CALC { \ 46 | UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ 47 | h2 = temp & (kHash2Size - 1); \ 48 | h3 = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); } 49 | 50 | #define MT_HASH4_CALC { \ 51 | UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ 52 | h2 = temp & (kHash2Size - 1); \ 53 | temp ^= ((UInt32)cur[2] << 8); \ 54 | h3 = temp & (kHash3Size - 1); \ 55 | h4 = (temp ^ (p->crc[cur[3]] << 5)) & (kHash4Size - 1); } 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/lib7z/Lzma2Enc.h: -------------------------------------------------------------------------------- 1 | /* Lzma2Enc.h -- LZMA2 Encoder 2 | 2013-01-18 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef __LZMA2_ENC_H 5 | #define __LZMA2_ENC_H 6 | 7 | #include "LzmaEnc.h" 8 | 9 | EXTERN_C_BEGIN 10 | 11 | typedef struct 12 | { 13 | CLzmaEncProps lzmaProps; 14 | size_t blockSize; 15 | int numBlockThreads; 16 | int numTotalThreads; 17 | } CLzma2EncProps; 18 | 19 | void Lzma2EncProps_Init(CLzma2EncProps *p); 20 | void Lzma2EncProps_Normalize(CLzma2EncProps *p); 21 | 22 | /* ---------- CLzmaEnc2Handle Interface ---------- */ 23 | 24 | /* Lzma2Enc_* functions can return the following exit codes: 25 | Returns: 26 | SZ_OK - OK 27 | SZ_ERROR_MEM - Memory allocation error 28 | SZ_ERROR_PARAM - Incorrect paramater in props 29 | SZ_ERROR_WRITE - Write callback error 30 | SZ_ERROR_PROGRESS - some break from progress callback 31 | SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) 32 | */ 33 | 34 | typedef void * CLzma2EncHandle; 35 | 36 | CLzma2EncHandle Lzma2Enc_Create(ISzAlloc *alloc, ISzAlloc *allocBig); 37 | void Lzma2Enc_Destroy(CLzma2EncHandle p); 38 | SRes Lzma2Enc_SetProps(CLzma2EncHandle p, const CLzma2EncProps *props); 39 | Byte Lzma2Enc_WriteProperties(CLzma2EncHandle p); 40 | SRes Lzma2Enc_Encode(CLzma2EncHandle p, 41 | ISeqOutStream *outStream, ISeqInStream *inStream, ICompressProgress *progress); 42 | 43 | /* ---------- One Call Interface ---------- */ 44 | 45 | /* Lzma2Encode 46 | Return code: 47 | SZ_OK - OK 48 | SZ_ERROR_MEM - Memory allocation error 49 | SZ_ERROR_PARAM - Incorrect paramater 50 | SZ_ERROR_OUTPUT_EOF - output buffer overflow 51 | SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) 52 | */ 53 | 54 | /* 55 | SRes Lzma2Encode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, 56 | const CLzmaEncProps *props, Byte *propsEncoded, int writeEndMark, 57 | ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig); 58 | */ 59 | 60 | EXTERN_C_END 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/lib7z/Lzma86Dec.c: -------------------------------------------------------------------------------- 1 | /* Lzma86Dec.c -- LZMA + x86 (BCJ) Filter Decoder 2 | 2015-11-08 : Igor Pavlov : Public domain */ 3 | 4 | #include "Precomp.h" 5 | 6 | #include "Lzma86.h" 7 | 8 | #include "Alloc.h" 9 | #include "Bra.h" 10 | #include "LzmaDec.h" 11 | 12 | static void *SzAlloc(void *p, size_t size) { UNUSED_VAR(p); return MyAlloc(size); } 13 | static void SzFree(void *p, void *address) { UNUSED_VAR(p); MyFree(address); } 14 | 15 | SRes Lzma86_GetUnpackSize(const Byte *src, SizeT srcLen, UInt64 *unpackSize) 16 | { 17 | unsigned i; 18 | if (srcLen < LZMA86_HEADER_SIZE) 19 | return SZ_ERROR_INPUT_EOF; 20 | *unpackSize = 0; 21 | for (i = 0; i < sizeof(UInt64); i++) 22 | *unpackSize += ((UInt64)src[LZMA86_SIZE_OFFSET + i]) << (8 * i); 23 | return SZ_OK; 24 | } 25 | 26 | SRes Lzma86_Decode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen) 27 | { 28 | ISzAlloc g_Alloc = { SzAlloc, SzFree }; 29 | SRes res; 30 | int useFilter; 31 | SizeT inSizePure; 32 | ELzmaStatus status; 33 | 34 | if (*srcLen < LZMA86_HEADER_SIZE) 35 | return SZ_ERROR_INPUT_EOF; 36 | 37 | useFilter = src[0]; 38 | 39 | if (useFilter > 1) 40 | { 41 | *destLen = 0; 42 | return SZ_ERROR_UNSUPPORTED; 43 | } 44 | 45 | inSizePure = *srcLen - LZMA86_HEADER_SIZE; 46 | res = LzmaDecode(dest, destLen, src + LZMA86_HEADER_SIZE, &inSizePure, 47 | src + 1, LZMA_PROPS_SIZE, LZMA_FINISH_ANY, &status, &g_Alloc); 48 | *srcLen = inSizePure + LZMA86_HEADER_SIZE; 49 | if (res != SZ_OK) 50 | return res; 51 | if (useFilter == 1) 52 | { 53 | UInt32 x86State; 54 | x86_Convert_Init(x86State); 55 | x86_Convert(dest, *destLen, 0, &x86State, 0); 56 | } 57 | return SZ_OK; 58 | } 59 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/lib7z/LzmaLib.c: -------------------------------------------------------------------------------- 1 | /* LzmaLib.c -- LZMA library wrapper 2 | 2015-06-13 : Igor Pavlov : Public domain */ 3 | 4 | #include "Alloc.h" 5 | #include "LzmaDec.h" 6 | #include "LzmaEnc.h" 7 | #include "LzmaLib.h" 8 | 9 | MY_STDAPI LzmaCompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t srcLen, 10 | unsigned char *outProps, size_t *outPropsSize, 11 | int level, /* 0 <= level <= 9, default = 5 */ 12 | unsigned dictSize, /* use (1 << N) or (3 << N). 4 KB < dictSize <= 128 MB */ 13 | int lc, /* 0 <= lc <= 8, default = 3 */ 14 | int lp, /* 0 <= lp <= 4, default = 0 */ 15 | int pb, /* 0 <= pb <= 4, default = 2 */ 16 | int fb, /* 5 <= fb <= 273, default = 32 */ 17 | int numThreads /* 1 or 2, default = 2 */ 18 | ) 19 | { 20 | CLzmaEncProps props; 21 | LzmaEncProps_Init(&props); 22 | props.level = level; 23 | props.dictSize = dictSize; 24 | props.lc = lc; 25 | props.lp = lp; 26 | props.pb = pb; 27 | props.fb = fb; 28 | props.numThreads = numThreads; 29 | 30 | return LzmaEncode(dest, destLen, src, srcLen, &props, outProps, outPropsSize, 0, 31 | NULL, &g_Alloc, &g_Alloc); 32 | } 33 | 34 | 35 | MY_STDAPI LzmaUncompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t *srcLen, 36 | const unsigned char *props, size_t propsSize) 37 | { 38 | ELzmaStatus status; 39 | return LzmaDecode(dest, destLen, src, srcLen, props, (unsigned)propsSize, LZMA_FINISH_ANY, &status, &g_Alloc); 40 | } 41 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/lib7z/Precomp.h: -------------------------------------------------------------------------------- 1 | /* Precomp.h -- StdAfx 2 | 2013-11-12 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef __7Z_PRECOMP_H 5 | #define __7Z_PRECOMP_H 6 | 7 | #include "Compiler.h" 8 | /* #include "7zTypes.h" */ 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/lib7z/RotateDefs.h: -------------------------------------------------------------------------------- 1 | /* RotateDefs.h -- Rotate functions 2 | 2015-03-25 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef __ROTATE_DEFS_H 5 | #define __ROTATE_DEFS_H 6 | 7 | #ifdef _MSC_VER 8 | 9 | #include 10 | 11 | /* don't use _rotl with MINGW. It can insert slow call to function. */ 12 | 13 | /* #if (_MSC_VER >= 1200) */ 14 | #pragma intrinsic(_rotl) 15 | #pragma intrinsic(_rotr) 16 | /* #endif */ 17 | 18 | #define rotlFixed(x, n) _rotl((x), (n)) 19 | #define rotrFixed(x, n) _rotr((x), (n)) 20 | 21 | #else 22 | 23 | /* new compilers can translate these macros to fast commands. */ 24 | 25 | #define rotlFixed(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) 26 | #define rotrFixed(x, n) (((x) >> (n)) | ((x) << (32 - (n)))) 27 | 28 | #endif 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/lib7z/Sha256.h: -------------------------------------------------------------------------------- 1 | /* Sha256.h -- SHA-256 Hash 2 | 2013-01-18 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef __CRYPTO_SHA256_H 5 | #define __CRYPTO_SHA256_H 6 | 7 | #include "7zTypes.h" 8 | 9 | EXTERN_C_BEGIN 10 | 11 | #define SHA256_DIGEST_SIZE 32 12 | 13 | typedef struct 14 | { 15 | UInt32 state[8]; 16 | UInt64 count; 17 | Byte buffer[64]; 18 | } CSha256; 19 | 20 | void Sha256_Init(CSha256 *p); 21 | void Sha256_Update(CSha256 *p, const Byte *data, size_t size); 22 | void Sha256_Final(CSha256 *p, Byte *digest); 23 | 24 | EXTERN_C_END 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/lib7z/Sort.h: -------------------------------------------------------------------------------- 1 | /* Sort.h -- Sort functions 2 | 2014-04-05 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef __7Z_SORT_H 5 | #define __7Z_SORT_H 6 | 7 | #include "7zTypes.h" 8 | 9 | EXTERN_C_BEGIN 10 | 11 | void HeapSort(UInt32 *p, size_t size); 12 | void HeapSort64(UInt64 *p, size_t size); 13 | 14 | /* void HeapSortRef(UInt32 *p, UInt32 *vals, size_t size); */ 15 | 16 | EXTERN_C_END 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/lib7z/XzCrc64.h: -------------------------------------------------------------------------------- 1 | /* XzCrc64.h -- CRC64 calculation 2 | 2013-01-18 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef __XZ_CRC64_H 5 | #define __XZ_CRC64_H 6 | 7 | #include 8 | 9 | #include "7zTypes.h" 10 | 11 | EXTERN_C_BEGIN 12 | 13 | extern UInt64 g_Crc64Table[]; 14 | 15 | void MY_FAST_CALL Crc64GenerateTable(void); 16 | 17 | #define CRC64_INIT_VAL UINT64_CONST(0xFFFFFFFFFFFFFFFF) 18 | #define CRC64_GET_DIGEST(crc) ((crc) ^ CRC64_INIT_VAL) 19 | #define CRC64_UPDATE_BYTE(crc, b) (g_Crc64Table[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8)) 20 | 21 | UInt64 MY_FAST_CALL Crc64Update(UInt64 crc, const void *data, size_t size); 22 | UInt64 MY_FAST_CALL Crc64Calc(const void *data, size_t size); 23 | 24 | EXTERN_C_END 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/lib7z/XzEnc.h: -------------------------------------------------------------------------------- 1 | /* XzEnc.h -- Xz Encode 2 | 2011-02-07 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef __XZ_ENC_H 5 | #define __XZ_ENC_H 6 | 7 | #include "Lzma2Enc.h" 8 | 9 | #include "Xz.h" 10 | 11 | EXTERN_C_BEGIN 12 | 13 | typedef struct 14 | { 15 | UInt32 id; 16 | UInt32 delta; 17 | UInt32 ip; 18 | int ipDefined; 19 | } CXzFilterProps; 20 | 21 | void XzFilterProps_Init(CXzFilterProps *p); 22 | 23 | typedef struct 24 | { 25 | const CLzma2EncProps *lzma2Props; 26 | const CXzFilterProps *filterProps; 27 | unsigned checkId; 28 | } CXzProps; 29 | 30 | void XzProps_Init(CXzProps *p); 31 | 32 | SRes Xz_Encode(ISeqOutStream *outStream, ISeqInStream *inStream, 33 | const CXzProps *props, ICompressProgress *progress); 34 | 35 | SRes Xz_EncodeEmpty(ISeqOutStream *outStream); 36 | 37 | EXTERN_C_END 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/lib7z/_fba_lzmasdk_v15.14 beta.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/fbalpha2012/77167cea72e808384c136c8c163a6b4975ce7a84/svn-current/trunk/src/dep/libs/lib7z/_fba_lzmasdk_v15.14 beta.txt -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/lib7z/_fba_lzmasdk_v9.22 beta.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/fbalpha2012/77167cea72e808384c136c8c163a6b4975ce7a84/svn-current/trunk/src/dep/libs/lib7z/_fba_lzmasdk_v9.22 beta.txt -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/libpng/_fba_libpng_v1512.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/fbalpha2012/77167cea72e808384c136c8c163a6b4975ce7a84/svn-current/trunk/src/dep/libs/libpng/_fba_libpng_v1512.txt -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/libpng/_fba_libpng_v162.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/fbalpha2012/77167cea72e808384c136c8c163a6b4975ce7a84/svn-current/trunk/src/dep/libs/libpng/_fba_libpng_v162.txt -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/zlib/_fba_zlib_v127.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/fbalpha2012/77167cea72e808384c136c8c163a6b4975ce7a84/svn-current/trunk/src/dep/libs/zlib/_fba_zlib_v127.txt -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/zlib/_fba_zlib_v128.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/fbalpha2012/77167cea72e808384c136c8c163a6b4975ce7a84/svn-current/trunk/src/dep/libs/zlib/_fba_zlib_v128.txt -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/zlib/gzclose.c: -------------------------------------------------------------------------------- 1 | /* gzclose.c -- zlib gzclose() function 2 | * Copyright (C) 2004, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | #include "gzguts.h" 7 | 8 | /* gzclose() is in a separate file so that it is linked in only if it is used. 9 | That way the other gzclose functions can be used instead to avoid linking in 10 | unneeded compression or decompression routines. */ 11 | int ZEXPORT gzclose(file) 12 | gzFile file; 13 | { 14 | #ifndef NO_GZCOMPRESS 15 | gz_statep state; 16 | 17 | if (file == NULL) 18 | return Z_STREAM_ERROR; 19 | state = (gz_statep)file; 20 | 21 | return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file); 22 | #else 23 | return gzclose_r(file); 24 | #endif 25 | } 26 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/libs/zlib/inffast.h: -------------------------------------------------------------------------------- 1 | /* inffast.h -- header to use inffast.c 2 | * Copyright (C) 1995-2003, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* WARNING: this file should *not* be used by applications. It is 7 | part of the implementation of the compression library and is 8 | subject to change. Applications should only use zlib.h. 9 | */ 10 | 11 | void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); 12 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/scripts/build_details.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int /*argc*/, char** /*argv*/) 4 | { 5 | printf("#define BUILD_TIME %s\n", __TIME__); 6 | printf("#define BUILD_DATE %s\n", __DATE__); 7 | 8 | #ifdef _UNICODE 9 | printf("#define BUILD_CHAR Unicode\n"); 10 | #else 11 | printf("#define BUILD_CHAR ANSI\n"); 12 | #endif 13 | 14 | #if !defined BUILD_X64_EXE 15 | printf("#define BUILD_CPU X86\n"); 16 | #else 17 | printf("#define BUILD_CPU X64\n"); 18 | #endif 19 | 20 | #if defined __GNUC__ 21 | printf("#define BUILD_COMP GCC %i.%i.%i\n", __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__); 22 | #elif defined _MSC_VER 23 | #if _MSC_VER >= 1300 && _MSC_VER < 1310 24 | printf("#define BUILD_COMP Visual C++ 2002\n"); 25 | #elif _MSC_VER >= 1310 && _MSC_VER < 1400 26 | printf("#define BUILD_COMP Visual C++ 2003\n"); 27 | #elif _MSC_VER >= 1400 && _MSC_VER < 1500 28 | printf("#define BUILD_COMP Visual C++ 2005\n"); 29 | #elif _MSC_VER >= 1500 && _MSC_VER < 1600 30 | printf("#define BUILD_COMP Visual C++ 2008\n"); 31 | #elif _MSC_VER >= 1600 && _MSC_VER < 1700 32 | printf("#define BUILD_COMP Visual C++ 2010\n"); 33 | #elif _MSC_VER >= 1700 && _MSC_VER < 1800 34 | #if defined BUILD_VS2012_XP_TARGET 35 | printf("#define BUILD_COMP Visual C++ 2012 (XP)\n"); 36 | #else 37 | printf("#define BUILD_COMP Visual C++ 2012\n"); 38 | #endif 39 | #else 40 | printf("#define BUILD_COMP Visual C++ %i.%i\n", _MSC_VER / 100 - 6, _MSC_VER % 100 / 10); 41 | #endif 42 | #else 43 | printf("#define BUILD_COMP Unknown compiler\n"); 44 | #endif 45 | 46 | // Visual C's resource compiler doesn't define _MSC_VER, but we need it for VERSION resources 47 | #ifdef _MSC_VER 48 | printf("#ifndef _MSC_VER\n"); 49 | printf(" #define _MSC_VER %i\n", _MSC_VER); 50 | printf("#endif\n"); 51 | #endif 52 | 53 | return 0; 54 | } 55 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/vc/include/afxres.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #ifndef IDC_STATIC 5 | #define IDC_STATIC (-1) 6 | #endif 7 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/vs2010/pre.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cd ..\..\src\dep\ 3 | mkdir generated 4 | cd scripts 5 | echo %CD% 6 | echo running perl scripts 7 | perl cave_sprite_func.pl -o ../generated/cave_sprite_func.h 8 | perl license2rtf.pl -o ../generated/license.rtf ../../license.txt 9 | perl cave_tile_func.pl -o ../generated/cave_tile_func.h 10 | perl neo_sprite_func.pl -o ../generated/neo_sprite_func.h 11 | perl psikyo_tile_func.pl -o ../generated/psikyo_tile_func.h 12 | perl toa_gp9001_func.pl -o ../generated/toa_gp9001_func.h 13 | perl gamelist.pl -o ../generated/driverlist.h -l ../../gamelist.txt ../../burn/drv/capcom ../../burn/drv/cave ../../burn/drv/cps3 ../../burn/drv/dataeast ../../burn/drv/galaxian ../../burn/drv/irem ../../burn/drv/konami ../../burn/drv/megadrive ../../burn/drv/neogeo ../../burn/drv/pce ../../burn/drv/pgm ../../burn/drv/pst90s ../../burn/drv/pre90s ../../burn/drv/psikyo ../../burn/drv/sega ../../burn/drv/taito ../../burn/drv/toaplan ../../burn/drv/snes ../../burn/drv/sms 14 | 15 | echo %CD% 16 | echo building buildinfo 17 | %1/bin/cl" build_details.cpp 18 | build_details > ../generated/build_details.h 19 | del build_details.exe 20 | del build_details.obj 21 | 22 | echo building ctv 23 | cd .. 24 | cd .. 25 | cd burn 26 | cd drv 27 | cd capcom 28 | echo %CD% 29 | %1/bin/cl" ctv_make.cpp 30 | ctv_make > ../../../dep/generated/ctv.h 31 | del ctv_make.exe 32 | del ctv_make.obj 33 | 34 | echo building 68k generator 35 | cd .. 36 | cd .. 37 | cd .. 38 | cd cpu 39 | cd m68k 40 | echo %CD% 41 | %1/bin/cl" /DINLINE="__inline static" m68kmake.c 42 | m68kmake ../../dep/generated/ m68k_in.c 43 | del m68kmake.exe 44 | del m68kmake.obj 45 | -------------------------------------------------------------------------------- /svn-current/trunk/src/dep/vs2010/readme.txt: -------------------------------------------------------------------------------- 1 | Here live the files that are required to build with the visual studio 2010 IDE 2 | 3 | Depends on: 4 | latest DX sdk 5 | active perl 6 | (maybe) visual studio 2010 sp1 7 | -------------------------------------------------------------------------------- /svn-current/trunk/src/intf/cd/cd_interface.h: -------------------------------------------------------------------------------- 1 | #ifndef CD_INTERFACE_H_ 2 | #define CD_INTERFACE_H_ 3 | 4 | // ---------------------------------------------------------------------------- 5 | // CD emulation module 6 | 7 | enum CDEmuStatusValue { idle = 0, reading, playing, paused, seeking, fastforward, fastreverse }; 8 | 9 | extern TCHAR CDEmuImage[MAX_PATH]; 10 | 11 | INT32 CDEmuInit(); 12 | INT32 CDEmuExit(); 13 | INT32 CDEmuStop(); 14 | INT32 CDEmuPlay(UINT8 M, UINT8 S, UINT8 F); 15 | INT32 CDEmuLoadSector(INT32 LBA, char* pBuffer); 16 | UINT8* CDEmuReadTOC(INT32 track); 17 | UINT8* CDEmuReadQChannel(); 18 | INT32 CDEmuGetSoundBuffer(INT16* buffer, INT32 samples); 19 | 20 | static inline CDEmuStatusValue CDEmuGetStatus() 21 | { 22 | extern CDEmuStatusValue CDEmuStatus; 23 | 24 | return CDEmuStatus; 25 | } 26 | 27 | static inline void CDEmuStartRead() 28 | { 29 | extern CDEmuStatusValue CDEmuStatus; 30 | 31 | CDEmuStatus = seeking; 32 | } 33 | 34 | static inline void CDEmuPause() 35 | { 36 | extern CDEmuStatusValue CDEmuStatus; 37 | 38 | CDEmuStatus = paused; 39 | } 40 | 41 | #endif /*CD_INTERFACE_H_*/ 42 | -------------------------------------------------------------------------------- /svn-current/trunk/src/intf/cd/win32/cdsound.h: -------------------------------------------------------------------------------- 1 | #ifndef _WavClass_H_ 2 | #define _WavClass_H_ 3 | 4 | //#include 5 | #include "dsound_core.h" 6 | 7 | class WavClass 8 | { 9 | private: 10 | struct WaveHeaderType 11 | { 12 | char chunkId[4]; 13 | unsigned long chunkSize; 14 | char format[4]; 15 | char subChunkId[4]; 16 | unsigned long subChunkSize; 17 | unsigned short audioFormat; 18 | unsigned short numChannels; 19 | unsigned long sampleRate; 20 | unsigned long bytesPerSecond; 21 | unsigned short blockAlign; 22 | unsigned short bitsPerSample; 23 | char dataChunkId[4]; 24 | unsigned long dataSize; 25 | }; 26 | 27 | public: 28 | WavClass(); 29 | WavClass(const WavClass&); 30 | ~WavClass(); 31 | 32 | bool Initialize(HWND, TCHAR*); 33 | void Shutdown(); 34 | 35 | bool InitializeDirectSound(HWND); 36 | void ShutdownDirectSound(); 37 | 38 | bool LoadWaveFile(TCHAR*, IDirectSoundBuffer**); 39 | void ShutdownWaveFile(IDirectSoundBuffer**); 40 | 41 | bool PlayWaveFile(); 42 | 43 | IDirectSound* GetDirectSound() { return m_DirectSound; } 44 | IDirectSoundBuffer* GetPrimaryBuffer() { return m_primaryBuffer; } 45 | IDirectSoundBuffer* GetSecondaryBuffer() { return m_secondaryBuffer1; } 46 | 47 | private: 48 | IDirectSound* m_DirectSound; 49 | IDirectSoundBuffer* m_primaryBuffer; 50 | IDirectSoundBuffer* m_secondaryBuffer1; 51 | }; 52 | 53 | void wav_exit(); 54 | int wav_open(TCHAR* szFile); 55 | void wav_stop(); 56 | void wav_play(); 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /svn-current/trunk/src/license.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/fbalpha2012/77167cea72e808384c136c8c163a6b4975ce7a84/svn-current/trunk/src/license.txt -------------------------------------------------------------------------------- /svn-current/trunk/whatsnew.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/fbalpha2012/77167cea72e808384c136c8c163a6b4975ce7a84/svn-current/trunk/whatsnew.html --------------------------------------------------------------------------------