├── wab ├── tgui9680.h ├── tgui9680_extern.h ├── wabbmpsave.h └── wab_rly.h ├── jni └── Application.mk ├── sdl ├── Makefile ├── link.T ├── opendingux │ ├── opk │ │ ├── np2.png │ │ ├── default_opendingux_np2kai_desktop │ │ └── default_opendingux_np21kai_desktop │ ├── main.c │ └── compiler.h ├── em │ ├── main.c │ └── compiler.h ├── unix │ ├── main.c │ └── compiler.h ├── cmpara.h ├── libretro │ ├── emu_exports.h │ ├── sdlremap │ │ └── sdl.h │ ├── libretro_exports.h │ ├── libretro-common │ │ ├── crt │ │ │ ├── include │ │ │ │ └── string.h │ │ │ └── string.c │ │ └── include │ │ │ └── libchdr │ │ │ ├── coretypes.h │ │ │ └── minmax.h │ ├── compiler.h │ └── libretro_params.h ├── sysmenu.h ├── taskmng.h ├── cmserial.h ├── timemng.h ├── oemtext.h ├── trace.h ├── kbtrans.h ├── trace.c ├── windows │ ├── compiler.h │ └── main.c ├── inputmng.h ├── cmmidi.h ├── sysmng.c └── fontmng.h ├── i286x ├── i286xcts.h ├── v30patch.h ├── i286xadr.h ├── dmap.h ├── i286xrep.h └── i286xs.h ├── windows ├── resources │ ├── 932 │ │ ├── np2.rc2 │ │ ├── CMakeLists.txt │ │ └── np2vs2019_932.vcxproj.filters │ ├── 936 │ │ ├── np2.rc │ │ ├── np2.rc2 │ │ ├── CMakeLists.txt │ │ └── np2vs2019_936.vcxproj.filters │ ├── 950 │ │ ├── np2.rc │ │ ├── np2.rc2 │ │ ├── CMakeLists.txt │ │ └── np2vs2019_950.vcxproj.filters │ ├── 1252 │ │ ├── CMakeLists.txt │ │ └── np2vs2019_1252.vcxproj.filters │ ├── mmxnp2.ico │ ├── j118.bmp │ ├── np2.ico │ ├── nekop2.bmp │ ├── np2vm.ico │ ├── relay1.wav │ ├── fddseek.wav │ ├── fddseek1.wav │ ├── haxmnp2.ico │ ├── np21tool.bmp │ ├── np2debug.ico │ ├── np2tool.bmp │ ├── resource.cpp │ ├── np21kai.mnf │ ├── np2kai.mnf │ ├── np21kaix64.mnf │ └── np2kaix64.mnf ├── .editorconfig ├── commng.h ├── sysmng.h ├── commng.cpp ├── commng │ ├── cmbase.h │ ├── cmpipe.h │ ├── cmbase.cpp │ ├── cmserial.h │ ├── cmwacom.h │ ├── vsthost │ │ ├── vsteditwndbase.h │ │ ├── vstbuffer.h │ │ └── vstmidievent.h │ ├── cmnull.h │ ├── cmmidiout.h │ ├── cmpara.h │ ├── cmmidioutvermouth.h │ ├── cmmidiout32.h │ └── cmmidioutmt32sound.h ├── dialog │ ├── d_disk.cpp │ ├── d_mpu98.cpp │ ├── d_sound.cpp │ ├── d_serial.cpp │ ├── c_dipsw.h │ ├── c_slidervalue.h │ ├── c_midi.h │ ├── np2class.h │ ├── c_slidervalue.cpp │ └── c_combodata.h ├── soundmng │ ├── sddsound3.cpp │ └── asio │ │ └── asiodriverlist.h ├── x64 │ ├── pccore.inc │ └── vram.inc ├── x86 │ ├── pccore.inc │ ├── cputype.h │ ├── np2asm.inc │ ├── cputype.x86 │ └── vram.inc ├── taskmng.h ├── compiler.cpp ├── timemng.cpp ├── sstpmsg.h ├── joymng.h ├── np2mt.h ├── taskmng.cpp ├── winkbd.h ├── timemng.h ├── debuguty │ ├── viewmem.h │ ├── viewreg.h │ ├── viewsnd.h │ ├── view1mb.h │ ├── viewseg.h │ ├── viewasm.h │ └── viewitem.h ├── misc │ ├── tstring.h │ ├── tickcounter.h │ ├── guard.h │ ├── extrom.h │ └── trace.h ├── sstp.h ├── menu.h ├── ext │ ├── externalopl3.h │ ├── externalpsg.h │ └── externalopm.h ├── ini.h ├── fontmng.h └── subwnd │ └── subwnd.h ├── x ├── oemtext.c ├── resources │ ├── fddseek.wav │ ├── relay1.wav │ ├── fddseek1.wav │ ├── xnp2kai.desktop │ ├── xnp21kai.desktop │ ├── xnp21kai_HAXM.desktop │ └── np2.xbm ├── cmpara.h ├── debug │ ├── viewmem.h │ └── debugwin.h ├── taskmng.h ├── trace.c ├── timemng.h ├── cmserial.h ├── contrib │ └── udev │ │ └── 70-external-fm-sound.rules ├── oemtext.h ├── taskmng.c ├── misc │ ├── guard.h │ └── tty.h ├── timemng.c ├── trace.h ├── ext │ ├── externalopl3.h │ ├── externalpsg.h │ └── externalopm.h ├── cmmidi.h ├── fontmng.h ├── skbdwin.h ├── kdispwin.h └── drawmng.c ├── bios ├── bios.h ├── bios18.c ├── biosfd80_hax.res ├── sxsibios.h └── startup.res ├── cbus ├── smpu98.c ├── smpu98.h ├── boardlol.c ├── boardmo.c ├── boardmo.h ├── boardlol.h ├── pcm86io.h ├── boardsb16.h ├── cbuscore.h ├── scsicmd.h ├── board26k.h ├── boardx2.h ├── board86.h ├── boardso.h ├── board118.h ├── boardspb.h ├── boardpx.h ├── scsiio.h ├── gpibio.h ├── sasiio.h ├── ct1745io.h ├── idebios.res ├── amd98.h ├── scsibios.res └── board14.h ├── np2tool ├── NP2TOOL.INC ├── GETBIOS.ASM ├── HOSTDRV.ASM ├── POWEROFF.COM ├── np2tool.zip ├── Makefile.W32 ├── HOSTDRV.INC ├── NP2TOOL.X86 └── PWOFF.ASM ├── romimage ├── ITF.INC ├── SSP.X86 ├── DEBUG.MAC ├── DIPSW.X86 ├── DATASEG.INC ├── FIRMWARE.X86 ├── HDDBOOT.ASM ├── KEYBOARD.INC ├── KEYBOARD.X86 ├── MEMCHK.X86 ├── RESOURCE.TXT ├── SASIBIOS.ASM ├── SSP_DIP.X86 ├── SSP_MSW.X86 ├── SSP_RES.X86 ├── STARTUP.ASM ├── TEXTDISP.X86 ├── readme.txt ├── tool │ ├── DOSIO.H │ ├── MIL.INC │ ├── BIN2TXT.C │ ├── TXTPACK.C │ ├── DOSIO32.ASM │ ├── BIN2TXT.LK │ ├── TXTPACK.LK │ ├── COMMON.H │ └── ROMTOOL.MK ├── ITFSUB.X86 ├── BIOS │ ├── VECT1A.X86 │ ├── EOI.X86 │ ├── VECT08.X86 │ ├── VECT02.X86 │ └── vect09.x86 ├── PC98.INC ├── MEMSW.X86 ├── PROCESS.MAC ├── ITFD.MK ├── ITF.MK └── BEEP.X86 ├── i386hax ├── haxcore.c └── haxcore.h ├── sound ├── mame │ ├── ymf262.c │ └── driver.h ├── sndcsec.c ├── fmgen │ ├── fmgen_headers.h │ ├── fmgen_readme_kai.txt │ ├── fmgen_diag.h │ └── fmgen_types.h ├── opntimer.h ├── soundrom.h ├── rhythm.h ├── sndcsec.h ├── s98.h ├── vermouth │ └── midimod.h ├── tms3631.h └── pcmmix.h ├── generic ├── readme.txt ├── cmjasts.h ├── unasm.h ├── np2info.h ├── cmver.h ├── dipswbmp.h ├── softkbd.h └── memdbg32.h ├── i286c └── v30patch.h ├── embed ├── readme.txt ├── menu │ ├── filesel.h │ ├── menustr.h │ ├── dlgwab.h │ ├── dlgscr.h │ ├── dlgcfg.h │ └── dlgabout.h └── menubase │ ├── menumbox.h │ ├── menuicon.h │ └── menures.h ├── io ├── cpuio.h ├── fdd320.h ├── dipsw.h ├── printif.h ├── nmiio.h ├── sysport.h ├── necio.h ├── epsonio.h ├── lsidef.h ├── emsio.h ├── artic.h ├── pci │ ├── cbusbridge.h │ └── 98graphbridge.h ├── cgrom.h ├── np2sysp.h ├── mouseif.h ├── gdc_pset.h ├── crtc.h ├── fdd320.c ├── nmiio.c ├── upd4990.h ├── bmsio.h └── egc.h ├── mem ├── dmav30.h ├── dmax86.h ├── memems.h ├── memtram.h ├── memepp.h ├── memegc.h ├── dmax86.c └── dmav30.c ├── diskimage ├── img_common.h ├── cd │ ├── cdd_iso.h │ ├── cdd_real.h │ ├── cdd_mds.h │ ├── cdd_nrg.h │ ├── cdd_cue.h │ └── cdd_ccd.h ├── fd │ ├── fdd_bkdsk.h │ ├── fdd_dcp.h │ ├── fdd_vfdd.h │ └── fdd_nfd.h ├── img_strres.h ├── win9x │ ├── img_dosio.h │ └── img_dosio.c └── img_strres.c ├── accessories └── textout.h ├── font ├── fontmake.h └── readme.txt ├── np2ver.h ├── vram ├── makegrex.h ├── maketgrp.h ├── makegrph.h ├── vram.c ├── dispsync.h ├── sdraw.h ├── scrndraw.h ├── maketext.h └── scrnsave.h ├── .vscode ├── extensions.json └── settings.json ├── i386c ├── cpucore.h └── ia32 │ └── instructions │ └── fpu │ └── softfloat │ └── softfloatdef.h ├── debugsub.h ├── codecnv ├── tcswap16.c ├── tcswap32.c └── textcnv.h ├── network ├── readme.txt └── net.h ├── timing.h ├── trap ├── inttrap.h └── steptrap.h ├── common ├── mimpidef.h ├── textfile.h ├── wavefile.h ├── parts.h ├── resize.h └── lstarray.h ├── .gitignore ├── .gitmodules ├── calendar.h ├── misc ├── jisutf16pair.h ├── sjisutf16pair.h └── np2_u8.sh ├── np2_tickcount.h ├── cmake ├── CrossOpenDinguxRS90.cmake ├── CrossOpenDinguxGCW0.cmake └── CrossOpenDinguxRG350.cmake ├── fdd ├── fdd_mtr.h ├── diskdrv.h └── hddboot.res └── kai_note.txt /wab/tgui9680.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /wab/tgui9680_extern.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /jni/Application.mk: -------------------------------------------------------------------------------- 1 | APP_ABI := all 2 | -------------------------------------------------------------------------------- /sdl/Makefile: -------------------------------------------------------------------------------- 1 | include Makefile.libretro 2 | 3 | -------------------------------------------------------------------------------- /i286x/i286xcts.h: -------------------------------------------------------------------------------- 1 | 2 | void _xcts(void); 3 | 4 | -------------------------------------------------------------------------------- /windows/resources/mmxnp2.ico: -------------------------------------------------------------------------------- 1 |  2 | 00hヲ  -------------------------------------------------------------------------------- /x/oemtext.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "oemtext.h" 4 | -------------------------------------------------------------------------------- /bios/bios.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/bios/bios.h -------------------------------------------------------------------------------- /sdl/link.T: -------------------------------------------------------------------------------- 1 | { 2 | global: retro_*; 3 | local: *; 4 | }; 5 | 6 | -------------------------------------------------------------------------------- /bios/bios18.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/bios/bios18.c -------------------------------------------------------------------------------- /cbus/smpu98.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/cbus/smpu98.c -------------------------------------------------------------------------------- /cbus/smpu98.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/cbus/smpu98.h -------------------------------------------------------------------------------- /windows/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | 6 | -------------------------------------------------------------------------------- /cbus/boardlol.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/cbus/boardlol.c -------------------------------------------------------------------------------- /cbus/boardmo.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/cbus/boardmo.c -------------------------------------------------------------------------------- /np2tool/NP2TOOL.INC: -------------------------------------------------------------------------------- 1 | 2 | NP2PORT equ 07efh 3 | FIXCS equ 2eh 4 | 5 | -------------------------------------------------------------------------------- /romimage/ITF.INC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/romimage/ITF.INC -------------------------------------------------------------------------------- /romimage/SSP.X86: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/romimage/SSP.X86 -------------------------------------------------------------------------------- /windows/commng.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/windows/commng.h -------------------------------------------------------------------------------- /windows/sysmng.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/windows/sysmng.h -------------------------------------------------------------------------------- /i386hax/haxcore.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/i386hax/haxcore.c -------------------------------------------------------------------------------- /i386hax/haxcore.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/i386hax/haxcore.h -------------------------------------------------------------------------------- /romimage/DEBUG.MAC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/romimage/DEBUG.MAC -------------------------------------------------------------------------------- /romimage/DIPSW.X86: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/romimage/DIPSW.X86 -------------------------------------------------------------------------------- /windows/commng.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/windows/commng.cpp -------------------------------------------------------------------------------- /bios/biosfd80_hax.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/bios/biosfd80_hax.res -------------------------------------------------------------------------------- /np2tool/GETBIOS.ASM: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/np2tool/GETBIOS.ASM -------------------------------------------------------------------------------- /np2tool/HOSTDRV.ASM: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/np2tool/HOSTDRV.ASM -------------------------------------------------------------------------------- /np2tool/POWEROFF.COM: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/np2tool/POWEROFF.COM -------------------------------------------------------------------------------- /np2tool/np2tool.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/np2tool/np2tool.zip -------------------------------------------------------------------------------- /romimage/DATASEG.INC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/romimage/DATASEG.INC -------------------------------------------------------------------------------- /romimage/FIRMWARE.X86: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/romimage/FIRMWARE.X86 -------------------------------------------------------------------------------- /romimage/HDDBOOT.ASM: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/romimage/HDDBOOT.ASM -------------------------------------------------------------------------------- /romimage/KEYBOARD.INC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/romimage/KEYBOARD.INC -------------------------------------------------------------------------------- /romimage/KEYBOARD.X86: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/romimage/KEYBOARD.X86 -------------------------------------------------------------------------------- /romimage/MEMCHK.X86: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/romimage/MEMCHK.X86 -------------------------------------------------------------------------------- /romimage/RESOURCE.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/romimage/RESOURCE.TXT -------------------------------------------------------------------------------- /romimage/SASIBIOS.ASM: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/romimage/SASIBIOS.ASM -------------------------------------------------------------------------------- /romimage/SSP_DIP.X86: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/romimage/SSP_DIP.X86 -------------------------------------------------------------------------------- /romimage/SSP_MSW.X86: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/romimage/SSP_MSW.X86 -------------------------------------------------------------------------------- /romimage/SSP_RES.X86: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/romimage/SSP_RES.X86 -------------------------------------------------------------------------------- /romimage/STARTUP.ASM: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/romimage/STARTUP.ASM -------------------------------------------------------------------------------- /romimage/TEXTDISP.X86: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/romimage/TEXTDISP.X86 -------------------------------------------------------------------------------- /romimage/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/romimage/readme.txt -------------------------------------------------------------------------------- /romimage/tool/DOSIO.H: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/romimage/tool/DOSIO.H -------------------------------------------------------------------------------- /romimage/tool/MIL.INC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/romimage/tool/MIL.INC -------------------------------------------------------------------------------- /sound/mame/ymf262.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/sound/mame/ymf262.c -------------------------------------------------------------------------------- /romimage/tool/BIN2TXT.C: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/romimage/tool/BIN2TXT.C -------------------------------------------------------------------------------- /romimage/tool/TXTPACK.C: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/romimage/tool/TXTPACK.C -------------------------------------------------------------------------------- /windows/commng/cmbase.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/windows/commng/cmbase.h -------------------------------------------------------------------------------- /windows/commng/cmpipe.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/windows/commng/cmpipe.h -------------------------------------------------------------------------------- /x/resources/fddseek.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/x/resources/fddseek.wav -------------------------------------------------------------------------------- /x/resources/relay1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/x/resources/relay1.wav -------------------------------------------------------------------------------- /romimage/tool/DOSIO32.ASM: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/romimage/tool/DOSIO32.ASM -------------------------------------------------------------------------------- /sdl/opendingux/opk/np2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/sdl/opendingux/opk/np2.png -------------------------------------------------------------------------------- /windows/commng/cmbase.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/windows/commng/cmbase.cpp -------------------------------------------------------------------------------- /windows/commng/cmserial.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/windows/commng/cmserial.h -------------------------------------------------------------------------------- /windows/commng/cmwacom.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/windows/commng/cmwacom.h -------------------------------------------------------------------------------- /windows/dialog/d_disk.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/windows/dialog/d_disk.cpp -------------------------------------------------------------------------------- /windows/dialog/d_mpu98.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/windows/dialog/d_mpu98.cpp -------------------------------------------------------------------------------- /windows/dialog/d_sound.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/windows/dialog/d_sound.cpp -------------------------------------------------------------------------------- /windows/resources/j118.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/windows/resources/j118.bmp -------------------------------------------------------------------------------- /windows/resources/np2.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/windows/resources/np2.ico -------------------------------------------------------------------------------- /x/resources/fddseek1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/x/resources/fddseek1.wav -------------------------------------------------------------------------------- /generic/readme.txt: -------------------------------------------------------------------------------- 1 | 2 |  一般的な奴。 3 | 4 |  keydispとか 5 |  hostdrvとかもここ? 6 |  ジャストサウンド?(汗; 7 | 8 | -------------------------------------------------------------------------------- /romimage/tool/BIN2TXT.LK: -------------------------------------------------------------------------------- 1 | ..\..\obj\romtool\bin2txt+ 2 | ..\..\obj\romtool\dosio32 3 | ..\bin2txt; 4 | -------------------------------------------------------------------------------- /romimage/tool/TXTPACK.LK: -------------------------------------------------------------------------------- 1 | ..\..\obj\romtool\txtpack+ 2 | ..\..\obj\romtool\dosio32 3 | ..\txtpack; 4 | -------------------------------------------------------------------------------- /windows/dialog/d_serial.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/windows/dialog/d_serial.cpp -------------------------------------------------------------------------------- /windows/resources/936/np2.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/windows/resources/936/np2.rc -------------------------------------------------------------------------------- /windows/resources/950/np2.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/windows/resources/950/np2.rc -------------------------------------------------------------------------------- /windows/resources/nekop2.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/windows/resources/nekop2.bmp -------------------------------------------------------------------------------- /windows/resources/np2vm.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/windows/resources/np2vm.ico -------------------------------------------------------------------------------- /windows/resources/relay1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/windows/resources/relay1.wav -------------------------------------------------------------------------------- /i286c/v30patch.h: -------------------------------------------------------------------------------- 1 | 2 | void v30cinit(void); 3 | #if defined(VAEG_FIX) 4 | void v30c_initreg(void); 5 | #endif 6 | -------------------------------------------------------------------------------- /i286x/v30patch.h: -------------------------------------------------------------------------------- 1 | 2 | void v30xinit(void); 3 | #if defined(VAEG_FIX) 4 | void v30x_initreg(void); 5 | #endif 6 | -------------------------------------------------------------------------------- /windows/resources/932/np2.rc2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/windows/resources/932/np2.rc2 -------------------------------------------------------------------------------- /windows/resources/936/np2.rc2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/windows/resources/936/np2.rc2 -------------------------------------------------------------------------------- /windows/resources/950/np2.rc2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/windows/resources/950/np2.rc2 -------------------------------------------------------------------------------- /windows/resources/fddseek.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/windows/resources/fddseek.wav -------------------------------------------------------------------------------- /windows/resources/fddseek1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/windows/resources/fddseek1.wav -------------------------------------------------------------------------------- /windows/resources/haxmnp2.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/windows/resources/haxmnp2.ico -------------------------------------------------------------------------------- /windows/resources/np21tool.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/windows/resources/np21tool.bmp -------------------------------------------------------------------------------- /windows/resources/np2debug.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/windows/resources/np2debug.ico -------------------------------------------------------------------------------- /windows/resources/np2tool.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/windows/resources/np2tool.bmp -------------------------------------------------------------------------------- /windows/soundmng/sddsound3.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/NP2kai/HEAD/windows/soundmng/sddsound3.cpp -------------------------------------------------------------------------------- /embed/readme.txt: -------------------------------------------------------------------------------- 1 | 2 |  あの妖しい組み込み専用関数群が復活(?) 3 | 4 |  組み込みマシン以外はリンク不要です。 5 | 6 | 7 |  っていうか、ドロップダウンリストほすぃ… 8 | 9 | -------------------------------------------------------------------------------- /i286x/i286xadr.h: -------------------------------------------------------------------------------- 1 | 2 | extern I286TBL p_ea_dst[256]; 3 | extern I286TBL p_lea[256]; 4 | extern I286TBL p_get_ea[256]; 5 | 6 | -------------------------------------------------------------------------------- /sdl/em/main.c: -------------------------------------------------------------------------------- 1 | #include "compiler.h" 2 | #include "np2.h" 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | return np2_main(argc, argv); 7 | } 8 | -------------------------------------------------------------------------------- /sdl/unix/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | return np2_main(argc, argv); 7 | } 8 | -------------------------------------------------------------------------------- /sdl/cmpara.h: -------------------------------------------------------------------------------- 1 | #ifndef NP2_X_CMPARA_H__ 2 | #define NP2_X_CMPARA_H__ 3 | 4 | // ---- com manager parallel for unix 5 | 6 | #endif /* NP2_X_CMPARA_H__ */ 7 | -------------------------------------------------------------------------------- /sdl/libretro/emu_exports.h: -------------------------------------------------------------------------------- 1 | #ifndef EMUEXPORTS_ 2 | #define EMUEXPORTS_ 3 | 4 | #include "soundmgr.h" 5 | 6 | extern SOUNDMNG soundmng; 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /sdl/opendingux/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | return np2_main(argc, argv); 7 | } 8 | -------------------------------------------------------------------------------- /i286x/dmap.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | void dmap_i286(void); 7 | 8 | #ifdef __cplusplus 9 | } 10 | #endif 11 | 12 | -------------------------------------------------------------------------------- /sdl/libretro/sdlremap/sdl.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define SDL_arraysize(x) (sizeof((x)) / sizeof((x)[0])) 4 | #define SDL_Quit() 5 | #define SDL_memset memset 6 | 7 | -------------------------------------------------------------------------------- /windows/x64/pccore.inc: -------------------------------------------------------------------------------- 1 | 2 | struc np2cfg_t 3 | .uPD72020 resb 1 4 | .DISPSYNC resb 1 5 | .RASTER resb 1 6 | .realpal resb 1 7 | endstruc 8 | 9 | -------------------------------------------------------------------------------- /windows/x86/pccore.inc: -------------------------------------------------------------------------------- 1 | 2 | struc np2cfg_t 3 | .uPD72020 resb 1 4 | .DISPSYNC resb 1 5 | .RASTER resb 1 6 | .realpal resb 1 7 | endstruc 8 | 9 | -------------------------------------------------------------------------------- /io/cpuio.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | void cpuio_bind(void); 7 | 8 | #ifdef __cplusplus 9 | } 10 | #endif 11 | 12 | -------------------------------------------------------------------------------- /mem/dmav30.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | void dmav30(void); 7 | 8 | #ifdef __cplusplus 9 | } 10 | #endif 11 | 12 | -------------------------------------------------------------------------------- /mem/dmax86.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | void dmax86(void); 7 | 8 | #ifdef __cplusplus 9 | } 10 | #endif 11 | 12 | -------------------------------------------------------------------------------- /diskimage/img_common.h: -------------------------------------------------------------------------------- 1 | enum { 2 | FTYPE_DCP = FTYPEID('.','D','C','P'), 3 | FTYPE_NFD = FTYPEID('.','N','F','D'), 4 | FTYPE_VFDD = FTYPEID('.','F','D','D') 5 | }; 6 | -------------------------------------------------------------------------------- /windows/x86/cputype.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | int havemmx(void); 7 | 8 | #ifdef __cplusplus 9 | } 10 | #endif 11 | 12 | -------------------------------------------------------------------------------- /windows/taskmng.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | void taskmng_exit(void); 7 | 8 | #ifdef __cplusplus 9 | } 10 | #endif 11 | 12 | -------------------------------------------------------------------------------- /accessories/textout.h: -------------------------------------------------------------------------------- 1 | 2 | void *textout_open(const char *filename, int bufsize); 3 | void textout_write(void *hdl, const char *string); 4 | void textout_close(void *hdl); 5 | 6 | -------------------------------------------------------------------------------- /diskimage/cd/cdd_iso.h: -------------------------------------------------------------------------------- 1 | #ifdef __cplusplus 2 | extern "C" { 3 | #endif 4 | 5 | BRESULT openiso(SXSIDEV sxsi, const OEMCHAR *path); 6 | 7 | #ifdef __cplusplus 8 | } 9 | #endif 10 | -------------------------------------------------------------------------------- /font/fontmake.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | void makepc98bmp(const OEMCHAR *filename); 7 | 8 | #ifdef __cplusplus 9 | } 10 | #endif 11 | 12 | -------------------------------------------------------------------------------- /diskimage/cd/cdd_real.h: -------------------------------------------------------------------------------- 1 | #ifdef __cplusplus 2 | extern "C" { 3 | #endif 4 | 5 | BRESULT openrealcdd(SXSIDEV sxsi, const OEMCHAR *fname); 6 | 7 | #ifdef __cplusplus 8 | } 9 | #endif 10 | -------------------------------------------------------------------------------- /windows/compiler.cpp: -------------------------------------------------------------------------------- 1 | // compiler.cpp : 標準インクルードファイルを含むソース ファイル 2 | // np2.pch : 生成されるプリコンパイル済ヘッダー 3 | // compiler.obj : 生成されるプリコンパイル済タイプ情報 4 | 5 | #include 6 | -------------------------------------------------------------------------------- /x/cmpara.h: -------------------------------------------------------------------------------- 1 | #ifndef NP2_X_CMPARA_H__ 2 | #define NP2_X_CMPARA_H__ 3 | 4 | // ---- com manager parallel for unix 5 | 6 | G_BEGIN_DECLS 7 | 8 | G_END_DECLS 9 | 10 | #endif /* NP2_X_CMPARA_H__ */ 11 | -------------------------------------------------------------------------------- /embed/menu/filesel.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | void filesel_fdd(REG8 drv); 7 | void filesel_hdd(REG8 drv); 8 | 9 | #ifdef __cplusplus 10 | } 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /io/fdd320.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | void fdd320_reset(const NP2CFG *pConfig); 7 | void fdd320_bind(void); 8 | 9 | #ifdef __cplusplus 10 | } 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /generic/cmjasts.h: -------------------------------------------------------------------------------- 1 | 2 | // ---- com manager jast sound 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | COMMNG cmjasts_create(void); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /np2ver.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file np2ver.h 3 | * @brief The version 4 | */ 5 | 6 | #if defined(SUPPORT_IA32_HAXM) 7 | #define NP2VER_CORE "HAXM 0.86" 8 | #else 9 | #define NP2VER_CORE "0.86" 10 | #endif 11 | 12 | -------------------------------------------------------------------------------- /windows/timemng.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | 5 | BRESULT timemng_gettime(_SYSTIME *systime) { 6 | 7 | GetLocalTime((SYSTEMTIME *)systime); 8 | return(SUCCESS); 9 | } 10 | 11 | -------------------------------------------------------------------------------- /io/dipsw.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | void IOOUTCALL dipsw_w8(UINT port, REG8 value); 7 | REG8 IOINPCALL dipsw_r8(UINT port); 8 | 9 | #ifdef __cplusplus 10 | } 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /cbus/boardmo.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | void boardmo_reset(const NP2CFG *pConfig); 7 | void boardmo_bind(void); 8 | void boardmo_unbind(void); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /diskimage/cd/cdd_mds.h: -------------------------------------------------------------------------------- 1 | #ifdef __cplusplus 2 | extern "C" { 3 | #endif 4 | 5 | extern const OEMCHAR str_mds[]; 6 | 7 | BRESULT openmds(SXSIDEV sxsi, const OEMCHAR *fname); 8 | 9 | #ifdef __cplusplus 10 | } 11 | #endif 12 | -------------------------------------------------------------------------------- /diskimage/cd/cdd_nrg.h: -------------------------------------------------------------------------------- 1 | #ifdef __cplusplus 2 | extern "C" { 3 | #endif 4 | 5 | extern const OEMCHAR str_nrg[]; 6 | 7 | BRESULT opennrg(SXSIDEV sxsi, const OEMCHAR *fname); 8 | 9 | #ifdef __cplusplus 10 | } 11 | #endif 12 | -------------------------------------------------------------------------------- /diskimage/fd/fdd_bkdsk.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | BRESULT fdd_set_bkdsk(FDDFILE fdd, FDDFUNC fdd_fn, const OEMCHAR *fname, int ro); 7 | 8 | #ifdef __cplusplus 9 | } 10 | #endif 11 | 12 | -------------------------------------------------------------------------------- /sdl/opendingux/opk/default_opendingux_np2kai_desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=NP2kai 3 | Comment=PC9801 emulator 4 | Exec=np2kai %f 5 | Terminal=false 6 | Type=Application 7 | StartupNotify=true 8 | Icon=np2 9 | Categories=emulators; 10 | -------------------------------------------------------------------------------- /cbus/boardlol.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | void boardlol_reset(const NP2CFG *pConfig); 7 | void boardlol_bind(void); 8 | void boardlol_unbind(void); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /sdl/opendingux/opk/default_opendingux_np21kai_desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=NP21kai 3 | Comment=PC9821 emulator 4 | Exec=np21kai %f 5 | Terminal=false 6 | Type=Application 7 | StartupNotify=true 8 | Icon=np2 9 | Categories=emulators; 10 | -------------------------------------------------------------------------------- /cbus/pcm86io.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | void pcm86io_setopt(REG8 cDipSw); 8 | void pcm86io_bind(void); 9 | void pcm86io_unbind(void); 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | 15 | -------------------------------------------------------------------------------- /io/printif.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | void printif_reset(const NP2CFG *pConfig); 7 | void printif_bind(void); 8 | void printif_finalize(void); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /vram/makegrex.h: -------------------------------------------------------------------------------- 1 | 2 | #if defined(SUPPORT_PC9821) 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void VRAMCALL makegrphex(int page, int alldraw); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | 14 | #endif 15 | 16 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "ms-vscode.cpptools", 4 | "lucianirsigler.nasm", 5 | "jbenden.c-cpp-flylint", 6 | "twxs.cmake", 7 | "ms-vscode.cmake-tools", 8 | "ms-vscode.wasm-dwarf-debugging" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /i386c/cpucore.h: -------------------------------------------------------------------------------- 1 | #ifndef NP2_I386C_CPUCORE_H__ 2 | #define NP2_I386C_CPUCORE_H__ 3 | 4 | #include 5 | 6 | #define I286_MEMREADMAX CPU_MEMREADMAX 7 | #define I286_MEMWRITEMAX CPU_MEMWRITEMAX 8 | 9 | #endif /* !NP2_I386C_CPUCORE_H__ */ 10 | -------------------------------------------------------------------------------- /np2tool/Makefile.W32: -------------------------------------------------------------------------------- 1 | AS = nasmw 2 | AOPT = -f bin 3 | 4 | all: .\GETBIOS.COM .\PWOFF.COM .\HOSTDRV.COM 5 | 6 | .ASM{$(OBJ)}.COM: 7 | $(AS) $(*B).ASM $(AOPT) -o $*.COM -l $*.LST 8 | 9 | GETBIOS.COM : 10 | PWOFF.COM : 11 | HOSTDRV.COM : 12 | 13 | -------------------------------------------------------------------------------- /cbus/boardsb16.h: -------------------------------------------------------------------------------- 1 | #ifdef __cplusplus 2 | extern "C" { 3 | #endif 4 | 5 | void boardsb16_reset(const NP2CFG *pConfig); 6 | void boardsb16_bind(void); 7 | void boardsb16_unbind(void); 8 | void boardsb16_finalize(void); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | -------------------------------------------------------------------------------- /x/debug/viewmem.h: -------------------------------------------------------------------------------- 1 | #if defined(SUPPORT_VIEWER) 2 | 3 | G_BEGIN_DECLS 4 | 5 | void viewmem_read(VIEWMEM_T *cfg, UINT32 adrs, UINT8 *buf, UINT32 size); 6 | void viewmem_write(VIEWMEM_T *cfg, UINT32 adrs, UINT8 *buf, UINT32 size); 7 | 8 | G_END_DECLS 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /sdl/libretro/libretro_exports.h: -------------------------------------------------------------------------------- 1 | #ifndef LREXPORTS_ 2 | #define LREXPORTS_ 3 | 4 | #include 5 | #include "libretro.h" 6 | 7 | extern uint16_t FrameBuffer[]; 8 | extern retro_audio_sample_batch_t audio_batch_cb; 9 | extern retro_log_printf_t log_cb; 10 | #endif 11 | -------------------------------------------------------------------------------- /vram/maketgrp.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | void maketextgrph(int plane, int text_renewal, int grph_renewal); 7 | void maketextgrph40(int plane, int text_renewal, int grph_renewal); 8 | 9 | #ifdef __cplusplus 10 | } 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /windows/sstpmsg.h: -------------------------------------------------------------------------------- 1 | void sstpmsg_welcome(void); 2 | void sstpmsg_reset(void); 3 | void sstpmsg_about(void); 4 | void sstpmsg_config(void); 5 | 6 | BOOL sstpconfirm_reset(void); 7 | BOOL sstpconfirm_exit(void); 8 | 9 | BOOL sstpmsg_running(void); 10 | BOOL sstpmsg_dxerror(void); 11 | -------------------------------------------------------------------------------- /io/nmiio.h: -------------------------------------------------------------------------------- 1 | 2 | typedef struct { 3 | int enable; 4 | } _NMIIO, *NMIIO; 5 | 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | void nmiio_reset(const NP2CFG *pConfig); 12 | void nmiio_bind(void); 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | 18 | -------------------------------------------------------------------------------- /sdl/libretro/libretro-common/crt/include/string.h: -------------------------------------------------------------------------------- 1 | #ifndef __LIBRETRO_SDK_CRT_STRING_H_ 2 | #define __LIBRETRO_SDK_CRT_STRING_H_ 3 | 4 | #include 5 | 6 | void *memcpy(void *dst, const void *src, size_t len); 7 | 8 | void *memset(void *b, int c, size_t len); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /io/sysport.h: -------------------------------------------------------------------------------- 1 | 2 | typedef struct { 3 | UINT8 c; 4 | } _SYSPORT, *SYSPORT; 5 | 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | void systemport_reset(const NP2CFG *pConfig); 12 | void systemport_bind(void); 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | 18 | -------------------------------------------------------------------------------- /x/resources/xnp2kai.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=xNP2kai 4 | GenericName=PC-9801 Emulator 5 | GenericName[ja]=PC-9801エミュレータ 6 | Comment=PC-9801 Emulator 7 | Comment[ja]=PC-9801エミュレータ 8 | Exec=xnp2kai 9 | Icon=np2 10 | Categories=Game;Emulator; 11 | Name[ja]=xNP2kai 12 | 13 | -------------------------------------------------------------------------------- /io/necio.h: -------------------------------------------------------------------------------- 1 | 2 | typedef struct { 3 | UINT8 port0439; 4 | UINT8 port043b; 5 | } _NECIO, *NECIO; 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | void necio_reset(const NP2CFG *pConfig); 12 | void necio_bind(void); 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | 18 | -------------------------------------------------------------------------------- /vram/makegrph.h: -------------------------------------------------------------------------------- 1 | 2 | enum { 3 | GRPHXMAX = 80, 4 | GRPHYMAX = 400 5 | }; 6 | 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | void makegrph_initialize(void); 13 | void VRAMCALL makegrph(int page, int alldraw); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | 19 | -------------------------------------------------------------------------------- /windows/joymng.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | REG8 joymng_getstat(void); 7 | REG8 joymng_available(void); 8 | 9 | #ifdef __cplusplus 10 | } 11 | #endif 12 | 13 | 14 | // ---- 15 | 16 | void joymng_initialize(void); 17 | void joymng_sync(void); 18 | 19 | -------------------------------------------------------------------------------- /windows/resources/resource.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #pragma comment(linker, "/nodefaultlib") 4 | 5 | #ifdef __cplusplus 6 | extern "C" 7 | #endif 8 | BOOL APIENTRY _DllMainCRTStartup(HANDLE hModule, DWORD ulReasonForCall, LPVOID lpvReserved) 9 | { 10 | return TRUE; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /windows/x86/np2asm.inc: -------------------------------------------------------------------------------- 1 | 2 | %define USE_EGCASM 1 3 | 4 | %define EARG1 4 5 | %define EARG2 (EARG1+4) 6 | %define EARG3 (EARG2+4) 7 | %define EARG4 (EARG3+4) 8 | 9 | %define FC_ARG3 4 10 | %define FC_ARG4 (FC_ARG3+4) 11 | %define FC_ARG5 (FC_ARG4+4) 12 | %define FC_ARG6 (FC_ARG5+4) 13 | 14 | -------------------------------------------------------------------------------- /diskimage/cd/cdd_cue.h: -------------------------------------------------------------------------------- 1 | #ifdef __cplusplus 2 | extern "C" { 3 | #endif 4 | 5 | extern const OEMCHAR str_cue[]; 6 | extern const OEMCHAR str_track[]; 7 | extern const OEMCHAR str_index[]; 8 | 9 | BRESULT opencue(SXSIDEV sxsi, const OEMCHAR *fname); 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | -------------------------------------------------------------------------------- /io/epsonio.h: -------------------------------------------------------------------------------- 1 | 2 | typedef struct { 3 | UINT8 cpumode; 4 | UINT8 bankioen; 5 | } _EPSONIO; 6 | 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | void epsonio_reset(const NP2CFG *pConfig); 13 | void epsonio_bind(void); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | 19 | -------------------------------------------------------------------------------- /diskimage/fd/fdd_dcp.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | BRESULT fdd_set_dcp(FDDFILE fdd, FDDFUNC fdd_fn, const OEMCHAR *fname, int ro); 7 | 8 | BRESULT fdd_read_dcp(FDDFILE fdd); 9 | BRESULT fdd_write_dcp(FDDFILE fdd); 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | 15 | -------------------------------------------------------------------------------- /generic/unasm.h: -------------------------------------------------------------------------------- 1 | 2 | typedef struct { 3 | const char *mnemonic; 4 | char operand[44]; 5 | } _UNASM, *UNASM; 6 | 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | UINT unasm(UNASM r, const UINT8 *ptr, UINT leng, BOOL d, UINT32 addr); 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | 18 | -------------------------------------------------------------------------------- /windows/np2mt.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | void np2_multithread_Suspend(); 6 | void np2_multithread_Resume(); 7 | void np2_multithread_EnterCriticalSection(); 8 | void np2_multithread_LeaveCriticalSection(); 9 | int np2_multithread_Enabled(); 10 | #ifdef __cplusplus 11 | } 12 | #endif -------------------------------------------------------------------------------- /diskimage/cd/cdd_ccd.h: -------------------------------------------------------------------------------- 1 | #ifdef __cplusplus 2 | extern "C" { 3 | #endif 4 | 5 | extern const OEMCHAR str_ccd[]; 6 | extern const OEMCHAR str_cdm[]; 7 | 8 | BRESULT openccd(SXSIDEV sxsi, const OEMCHAR *fname); 9 | //BRESULT opencdm(SXSIDEV sxsi, const OEMCHAR *fname); 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | -------------------------------------------------------------------------------- /debugsub.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | const OEMCHAR *debugsub_flags(UINT16 flag); 7 | const OEMCHAR *debugsub_regs(void); 8 | void debugsub_status(void); 9 | void debugsub_memorydump(void); 10 | void debugsub_memorydumpall(void); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | -------------------------------------------------------------------------------- /sdl/sysmenu.h: -------------------------------------------------------------------------------- 1 | 2 | enum { 3 | MENUTYPE_NORMAL = 0 4 | }; 5 | 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | BRESULT sysmenu_create(void); 12 | void sysmenu_destroy(void); 13 | 14 | BRESULT sysmenu_menuopen(UINT menutype, int x, int y); 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | 20 | -------------------------------------------------------------------------------- /romimage/tool/COMMON.H: -------------------------------------------------------------------------------- 1 | #ifndef NULL 2 | #define NULL ((void *)0) 3 | #endif 4 | 5 | #ifndef FALSE 6 | #define FALSE 0 7 | #define TRUE 1 8 | #endif 9 | 10 | #define SUCCESS 0 11 | #define FAILURE -1 12 | 13 | typedef unsigned char BYTE; 14 | typedef unsigned short WORD; 15 | typedef unsigned long DWORD; 16 | -------------------------------------------------------------------------------- /windows/taskmng.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #if defined(SUPPORT_MULTITHREAD) 4 | #include "np2.h" 5 | #endif 6 | 7 | void taskmng_exit(void) { 8 | 9 | #if defined(SUPPORT_MULTITHREAD) 10 | PostMessage(g_hWndMain, WM_CLOSE, 0, 0); 11 | #else 12 | PostQuitMessage(0); 13 | #endif 14 | } 15 | 16 | -------------------------------------------------------------------------------- /x/resources/xnp21kai.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=xNP21kai IA-32 4 | GenericName=PC-9821 Emulator IA-32 5 | GenericName[ja]=PC-9821エミュレータ IA-32 6 | Comment=PC-9821 Emulator IA-32 7 | Comment[ja]=PC-9821エミュレータ IA-32 8 | Exec=xnp21kai 9 | Icon=np2 10 | Categories=Game;Emulator; 11 | Name[ja]=xNP21kai IA-32 12 | 13 | -------------------------------------------------------------------------------- /codecnv/tcswap16.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "textcnv.h" 3 | 4 | 5 | void textcnv_swapendian16(void *buf, UINT leng) { 6 | 7 | UINT8 *p; 8 | UINT8 tmp; 9 | 10 | p = (UINT8 *)buf; 11 | while(leng) { 12 | tmp = p[0]; 13 | p[0] = p[1]; 14 | p[1] = tmp; 15 | p += 2; 16 | leng--; 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /cbus/cbuscore.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | void cbuscore_reset(const NP2CFG *pConfig); 7 | void cbuscore_bind(void); 8 | 9 | void cbuscore_attachsndex(UINT port, const IOOUT *out, const IOINP *inp); 10 | void cbuscore_detachsndex(UINT port); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | -------------------------------------------------------------------------------- /embed/menu/menustr.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | extern const OEMCHAR mstr_cfg[]; 7 | extern const OEMCHAR mstr_scropt[]; 8 | extern const OEMCHAR mstr_wabopt[]; 9 | extern const OEMCHAR mstr_about[]; 10 | 11 | extern const MENURES np2icon; 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /sdl/taskmng.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | extern BOOL task_avail; 7 | 8 | void taskmng_initialize(void); 9 | void taskmng_exit(void); 10 | void taskmng_rol(void); 11 | #define taskmng_isavail() (task_avail) 12 | BOOL taskmng_sleep(UINT32 tick); 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | 18 | -------------------------------------------------------------------------------- /network/readme.txt: -------------------------------------------------------------------------------- 1 | Neko Project 21/WのLGY-98をxnp2に移植してみたものです。 2 | 必要最小限のソースコード(Windows依存コードの修正部分)のみの提供となりますので、別でダウンロードしたxnp2を適当に変更してやってください 3 | 4 | 1,np21w Win版を参考に付属ソース以外の場所も変更が必要です(SUPPORT_NETまたはSUPPORT_LGY98で囲まれているところ) 5 | 2,LinuxのTAPを使うためにはroot権限が要るかも 6 | 3,xnp21を起動するとtap0みたいなものが作成されますが、何処にもつながっていないのでホスト側でブリッジに繋ぐなりしてやらないとダメっぽい 7 | 8 | 他にもあった気がしますが忘れました・・・ -------------------------------------------------------------------------------- /x/debug/debugwin.h: -------------------------------------------------------------------------------- 1 | //#if defined(SUPPORT_MEMDBG32) 2 | // 3 | //G_BEGIN_DECLS 4 | // 5 | //void debugwin_create(void); 6 | //void debugwin_destroy(void); 7 | //void debugwin_process(void); 8 | // 9 | //G_END_DECLS 10 | // 11 | //#else 12 | 13 | #define debugwin_create() 14 | #define debugwin_destroy() 15 | #define debugwin_process() 16 | 17 | //#endif 18 | -------------------------------------------------------------------------------- /diskimage/fd/fdd_vfdd.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | BRESULT fdd_set_vfdd(FDDFILE fdd, FDDFUNC fdd_fn, const OEMCHAR *fname, int ro); 7 | 8 | BRESULT fdd_read_vfdd(FDDFILE fdd); 9 | BRESULT fdd_write_vfdd(FDDFILE fdd); 10 | BRESULT fdd_readid_vfdd(FDDFILE fdd); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | -------------------------------------------------------------------------------- /embed/menu/dlgwab.h: -------------------------------------------------------------------------------- 1 | 2 | #if defined(SUPPORT_WAB) && defined(SUPPORT_CL_GD5430) 3 | 4 | enum { 5 | DLGWAB_WIDTH = 393, 6 | DLGWAB_HEIGHT = 235 7 | }; 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | int dlgwab_cmd(int msg, MENUID id, long param); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | 19 | #endif 20 | 21 | -------------------------------------------------------------------------------- /x/resources/xnp21kai_HAXM.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=xNP21kai HAXM 4 | GenericName=PC-9821 Emulator IA-32 HAXM 5 | GenericName[ja]=PC-9821エミュレータ IA-32 HAXM 6 | Comment=PC-9821 Emulator IA-32 HAXM 7 | Comment[ja]=PC-9821エミュレータ IA-32 HAXM 8 | Exec=xnp21kai_HAXM 9 | Icon=np2 10 | Categories=Game;Emulator; 11 | Name[ja]=xNP21kai HAXM 12 | 13 | -------------------------------------------------------------------------------- /io/lsidef.h: -------------------------------------------------------------------------------- 1 | 2 | typedef struct { 3 | UINT8 porta; 4 | UINT8 portb; 5 | UINT8 portc; 6 | UINT8 mode; 7 | } uPD8255; 8 | 9 | enum { 10 | uPD8255_PORTCL = 0x01, 11 | uPD8255_PORTB = 0x02, 12 | uPD8255_GROUPB = 0x04, 13 | uPD8255_PORTCH = 0x08, 14 | uPD8255_PORTA = 0x10, 15 | uPD8255_GROUPA = 0x60, 16 | uPD8255_CTRL = 0x80 17 | }; 18 | 19 | -------------------------------------------------------------------------------- /romimage/ITFSUB.X86: -------------------------------------------------------------------------------- 1 | 2 | WAITVSYNC1: push ax 3 | mov ah, 1 4 | jmps waitvsync_lp1 5 | WAITVSYNC: push ax 6 | waitvsync_lp1: in al, 0a0h 7 | test al, 20h 8 | jne waitvsync_lp1 9 | waitvsync_lp2: in al, 0a0h 10 | test al, 20h 11 | je waitvsync_lp2 12 | dec ah 13 | jne waitvsync_lp1 14 | pop ax 15 | ret 16 | -------------------------------------------------------------------------------- /timing.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | void timing_reset(void); 7 | void timing_setrate(UINT lines, UINT crthz); 8 | void timing_setcount(UINT value); 9 | UINT timing_getcount(void); 10 | UINT timing_getcount_baseclock(void); 11 | double timing_getcount_raw(void); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /x/taskmng.h: -------------------------------------------------------------------------------- 1 | #ifndef NP2_X_TASKMNG_H__ 2 | #define NP2_X_TASKMNG_H__ 3 | 4 | #include 5 | 6 | #include 7 | 8 | G_BEGIN_DECLS 9 | 10 | void taskmng_initialize(void); 11 | BOOL taskmng_sleep(UINT32 tick); 12 | void taskmng_exit(void); 13 | 14 | #define taskmng_isavail() np2running 15 | 16 | G_END_DECLS 17 | 18 | #endif /* NP2_X_TASKMNG_H__ */ 19 | -------------------------------------------------------------------------------- /sound/sndcsec.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sndcsec.c 3 | * @brief Implementation of the critical section for sound 4 | */ 5 | 6 | #include 7 | #include "sndcsec.h" 8 | 9 | #if defined(SOUND_CRITICAL) && defined(SUPPORT_NP2_THREAD) 10 | 11 | NP2_Semaphore_t semSoundCritical; 12 | 13 | #endif /* defined(SOUND_CRITICAL) defined(SUPPORT_NP2_THREAD) */ 14 | -------------------------------------------------------------------------------- /trap/inttrap.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file inttrap.h 3 | * @brief Interface of the trap of interrupt 4 | */ 5 | 6 | #pragma once 7 | 8 | #if defined(ENABLE_TRAP) 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | void CPUCALL softinttrap(UINT cs, UINT32 eip, UINT vect); 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /cbus/scsicmd.h: -------------------------------------------------------------------------------- 1 | 2 | #if defined(SUPPORT_SCSI) 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | REG8 scsicmd_negate(REG8 id); 9 | REG8 scsicmd_select(REG8 id); 10 | REG8 scsicmd_transfer(REG8 id, UINT8 *cdb); 11 | BRESULT scsicmd_send(void); 12 | 13 | void scsicmd_bios(void); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | 19 | #endif 20 | 21 | -------------------------------------------------------------------------------- /io/emsio.h: -------------------------------------------------------------------------------- 1 | 2 | typedef struct { 3 | UINT8 maxmem; // LARGE_MEM //UINT8 UINT16 maxmem; 4 | UINT8 target; 5 | UINT16 padding; 6 | UINT32 addr[4]; 7 | } _EMSIO, *EMSIO; 8 | 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | void emsio_reset(const NP2CFG *pConfig); 15 | void emsio_bind(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | -------------------------------------------------------------------------------- /windows/commng/vsthost/vsteditwndbase.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file vsteditwndbase.h 3 | * @brief VST edit ウィンドウ基底クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | /** 9 | * @brief VST edit ウィンドウ基底クラス 10 | */ 11 | class IVstEditWnd 12 | { 13 | public: 14 | virtual bool OnResize(int nWidth, int nHeight) = 0; 15 | virtual bool OnUpdateDisplay() = 0; 16 | 17 | }; 18 | -------------------------------------------------------------------------------- /windows/winkbd.h: -------------------------------------------------------------------------------- 1 | 2 | enum { 3 | KEY_PC98 = 0, 4 | KEY_KEY101 = 1, 5 | KEY_KEY106 = 2, 6 | KEY_TYPEMAX = 3, 7 | KEY_UNKNOWN = 0xff 8 | }; 9 | 10 | void winkbd_keydown(WPARAM wParam, LPARAM lParam); 11 | void winkbd_keyup(WPARAM wParam, LPARAM lParam); 12 | void winkbd_roll(BOOL pcat); 13 | void winkbd_setf12(UINT f12key); 14 | void winkbd_resetf12(void); 15 | 16 | -------------------------------------------------------------------------------- /cbus/board26k.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file board26k.h 3 | * @brief Interface of PC-9801-26K 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" 12 | { 13 | #endif 14 | 15 | void board26k_reset(const NP2CFG *pConfig); 16 | void board26k_bind(void); 17 | void board26k_unbind(void); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /cbus/boardx2.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file boardx2.h 3 | * @brief Interface of PC-9801-86 + 26K 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" 12 | { 13 | #endif 14 | 15 | void boardx2_reset(const NP2CFG *pConfig); 16 | void boardx2_bind(void); 17 | void boardx2_unbind(void); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /trap/steptrap.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file steptrap.h 3 | * @brief Interface of the step trap 4 | */ 5 | 6 | #pragma once 7 | 8 | #if defined(ENABLE_TRAP) 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | void steptrap_hisfileout(void); 15 | 16 | void CPUCALL steptrap(UINT cs, UINT32 eip); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /io/artic.h: -------------------------------------------------------------------------------- 1 | 2 | typedef struct { 3 | SINT32 lastclk2; 4 | SINT32 counter; 5 | } _ARTIC, *ARTIC; 6 | 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | void artic_callback(void); 13 | 14 | void artic_reset(const NP2CFG *pConfig); 15 | void artic_bind(void); 16 | REG16 IOINPCALL artic_r16(UINT port); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /x/trace.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | 5 | int trace_flag = 0; 6 | 7 | void trace_init(void) { 8 | } 9 | 10 | void trace_term(void) { 11 | } 12 | 13 | void trace_fmt(const char *fmt, ...) { 14 | 15 | va_list ap; 16 | gchar buf[1024]; 17 | 18 | va_start(ap, fmt); 19 | g_vsnprintf(buf, sizeof(buf), fmt, ap); 20 | va_end(ap); 21 | g_printerr("%s\n", buf); 22 | } 23 | -------------------------------------------------------------------------------- /cbus/board86.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file board86.h 3 | * @brief Interface of PC-9801-86 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" 12 | { 13 | #endif 14 | 15 | void board86_reset(const NP2CFG *pConfig, BOOL adpcm); 16 | void board86_bind(void); 17 | void board86_unbind(void); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /cbus/boardso.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file boardso.h 3 | * @brief Interface of Sound Orchestra 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" 12 | { 13 | #endif 14 | 15 | void boardso_reset(const NP2CFG *pConfig, BOOL v); 16 | void boardso_bind(void); 17 | void boardso_unbind(void); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /romimage/BIOS/VECT1A.X86: -------------------------------------------------------------------------------- 1 | 2 | vect1a: sti ; +00 3 | push ds ; +01 4 | push dx ; +02 5 | test ah, 0x10 ; +03 6 | jne short .prt ; +06 7 | call bios1a_cmt ; +08 8 | jmp short .ed ; +0b 9 | times (0x19 - 0x0d) nop ; +0d 10 | .prt: call bios1a_prt ; +19 (use dos6.20) 11 | .ed: pop dx 12 | pop ds 13 | iret 14 | 15 | -------------------------------------------------------------------------------- /windows/dialog/c_dipsw.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file c_dipsw.h 3 | * @brief DIPSW コントロール クラス群の宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "misc\WndProc.h" 9 | 10 | /** 11 | * @brief MIDI デバイス クラス 12 | */ 13 | class CStaticDipSw : public CWndProc 14 | { 15 | public: 16 | virtual void PreSubclassWindow(); 17 | static void Draw(HDC hdc, const void* lpBitmap); 18 | }; 19 | -------------------------------------------------------------------------------- /embed/menu/dlgscr.h: -------------------------------------------------------------------------------- 1 | 2 | #if defined(NP2_SIZE_QVGA) 3 | enum { 4 | DLGSCR_WIDTH = 280, 5 | DLGSCR_HEIGHT = 166 6 | }; 7 | #else 8 | enum { 9 | DLGSCR_WIDTH = 393, 10 | DLGSCR_HEIGHT = 235 11 | }; 12 | #endif 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | int dlgscr_cmd(int msg, MENUID id, long param); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | 24 | -------------------------------------------------------------------------------- /romimage/PC98.INC: -------------------------------------------------------------------------------- 1 | 2 | ;seg=00000h 3 | MEM_EXPMMSZ equ 00401h 4 | 5 | MEM_KB_KY_STS equ 0052ah 6 | MEM_SHIFT_STS equ 0053ah 7 | MEM_EXTMSZ equ 00594h 8 | 9 | ;seg=0a000h 10 | MEM_MSW1 equ 03fe2h 11 | MEM_MSW2 equ 03fe6h 12 | MEM_MSW3 equ 03feah 13 | MEM_MSW4 equ 03feeh 14 | MEM_MSW5 equ 03ff2h 15 | MEM_MSW6 equ 03ff6h 16 | MEM_MSW7 equ 03ffah 17 | MEM_MSW8 equ 03ffeh 18 | -------------------------------------------------------------------------------- /sdl/cmserial.h: -------------------------------------------------------------------------------- 1 | #ifndef NP2_X_CMSERIAL_H__ 2 | #define NP2_X_CMSERIAL_H__ 3 | 4 | // ---- com manager serial for unix 5 | 6 | extern const UINT32 cmserial_speed[10]; 7 | 8 | COMMNG cmserial_create(UINT port, UINT8 param, UINT32 speed); 9 | 10 | #if defined(SUPPORT_PC9861K) 11 | #define MAX_SERIAL_PORT_NUM 3 12 | #else 13 | #define MAX_SERIAL_PORT_NUM 1 14 | #endif 15 | 16 | #endif /* NP2_X_CMSERIAL_H__ */ 17 | -------------------------------------------------------------------------------- /embed/menu/dlgcfg.h: -------------------------------------------------------------------------------- 1 | 2 | #if defined(NP2_SIZE_QVGA) 3 | enum { 4 | DLGCFG_WIDTH = 254, 5 | DLGCFG_HEIGHT = 180 6 | }; 7 | #else 8 | enum { 9 | DLGCFG_WIDTH = 303, 10 | DLGCFG_HEIGHT = 214 11 | }; 12 | #endif 13 | 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | int dlgcfg_cmd(int msg, MENUID id, long param); 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /codecnv/tcswap32.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "textcnv.h" 3 | 4 | 5 | void textcnv_swapendian32(void *buf, UINT leng) { 6 | 7 | UINT8 *p; 8 | UINT8 tmp0; 9 | UINT8 tmp1; 10 | 11 | p = (UINT8 *)buf; 12 | while(leng) { 13 | tmp0 = p[0]; 14 | tmp1 = p[1]; 15 | p[0] = p[3]; 16 | p[1] = p[2]; 17 | p[2] = tmp1; 18 | p[3] = tmp0; 19 | p += 4; 20 | leng--; 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /embed/menu/dlgabout.h: -------------------------------------------------------------------------------- 1 | 2 | #if defined(NP2_SIZE_QVGA) 3 | enum { 4 | DLGABOUT_WIDTH = 232, 5 | DLGABOUT_HEIGHT = 40 6 | }; 7 | #else 8 | enum { 9 | DLGABOUT_WIDTH = 342, 10 | DLGABOUT_HEIGHT = 58 11 | }; 12 | #endif 13 | 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | int dlgabout_cmd(int msg, MENUID id, long param); 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /cbus/board118.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file board118.h 3 | * @brief Interface of PC-9801-118 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" 12 | { 13 | #endif 14 | 15 | void board118_reset(const NP2CFG *pConfig); 16 | void board118_bind(void); 17 | void board118_unbind(void); 18 | void board118_finalize(void); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | -------------------------------------------------------------------------------- /io/pci/cbusbridge.h: -------------------------------------------------------------------------------- 1 | 2 | // PC-9821 PCI-CBusブリッジ 3 | 4 | #if defined(SUPPORT_PC9821) 5 | #if defined(SUPPORT_PCI) 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | extern int pcidev_cbusbridge_deviceid; 12 | 13 | void pcidev_cbusbridge_reset(const NP2CFG *pConfig); 14 | void pcidev_cbusbridge_bind(void); 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | 20 | #endif 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /common/mimpidef.h: -------------------------------------------------------------------------------- 1 | 2 | enum { 3 | MIMPI_LA = 0, 4 | MIMPI_PCM, 5 | MIMPI_GS, 6 | MIMPI_RHYTHM 7 | }; 8 | 9 | typedef struct { 10 | UINT8 ch[16]; 11 | UINT8 map[3][128]; 12 | UINT8 bank[3][128]; 13 | } MIMPIDEF; 14 | 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | BRESULT mimpidef_load(MIMPIDEF *def, const OEMCHAR *filename); 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /io/cgrom.h: -------------------------------------------------------------------------------- 1 | 2 | typedef struct { 3 | UINT code; 4 | UINT lr; 5 | UINT line; 6 | } _CGROM, *CGROM; 7 | 8 | typedef struct { 9 | UINT32 low; 10 | UINT32 high; 11 | UINT8 writable; 12 | } _CGWINDOW, *CGWINDOW; 13 | 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | void cgrom_reset(const NP2CFG *pConfig); 20 | void cgrom_bind(void); 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /sdl/timemng.h: -------------------------------------------------------------------------------- 1 | 2 | // Win32 SYSTEMTIME ストラクチャ 3 | 4 | typedef struct { 5 | UINT16 year; 6 | UINT16 month; 7 | UINT16 week; 8 | UINT16 day; 9 | UINT16 hour; 10 | UINT16 minute; 11 | UINT16 second; 12 | UINT16 milli; 13 | } _SYSTIME; 14 | 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | BRESULT timemng_gettime(_SYSTIME *systime); 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /io/pci/98graphbridge.h: -------------------------------------------------------------------------------- 1 | 2 | // PC-9821 PCI-CBusブリッジ 3 | 4 | #if defined(SUPPORT_PC9821) 5 | #if defined(SUPPORT_PCI) 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | extern int pcidev_98graphbridge_deviceid; 12 | 13 | void pcidev_98graphbridge_reset(const NP2CFG *pConfig); 14 | void pcidev_98graphbridge_bind(void); 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | 20 | #endif 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /windows/resources/932/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | project( 4 | NP2kai_932 5 | DESCRIPTION "NP2kai language resource library" 6 | HOMEPAGE_URL "http://domisan.sakura.ne.jp/article/np2kai/np2kai.html" 7 | LANGUAGES C CXX 8 | ) 9 | 10 | cmake_policy(SET CMP0076 NEW) 11 | 12 | list(APPEND NP2kai_windows_932_sources "np2jp.rc") 13 | 14 | add_library(NP2kai_windows_932 MODULE ${NP2kai_windows_932_sources}) 15 | 16 | -------------------------------------------------------------------------------- /windows/resources/936/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | project( 4 | NP2kai_936 5 | DESCRIPTION "NP2kai language resource library" 6 | HOMEPAGE_URL "http://domisan.sakura.ne.jp/article/np2kai/np2kai.html" 7 | LANGUAGES C CXX 8 | ) 9 | 10 | cmake_policy(SET CMP0076 NEW) 11 | 12 | list(APPEND NP2kai_windows_936_sources "np2.rc") 13 | 14 | add_library(NP2kai_windows_936 MODULE ${NP2kai_windows_936_sources}) 15 | 16 | -------------------------------------------------------------------------------- /windows/resources/950/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | project( 4 | NP2kai_950 5 | DESCRIPTION "NP2kai language resource library" 6 | HOMEPAGE_URL "http://domisan.sakura.ne.jp/article/np2kai/np2kai.html" 7 | LANGUAGES C CXX 8 | ) 9 | 10 | cmake_policy(SET CMP0076 NEW) 11 | 12 | list(APPEND NP2kai_windows_950_sources "np2.rc") 13 | 14 | add_library(NP2kai_windows_950 MODULE ${NP2kai_windows_950_sources}) 15 | 16 | -------------------------------------------------------------------------------- /x/timemng.h: -------------------------------------------------------------------------------- 1 | #ifndef NP2_X_TIMEMNG_H__ 2 | #define NP2_X_TIMEMNG_H__ 3 | 4 | G_BEGIN_DECLS 5 | 6 | // Win32 SYSTEMTIME 繧ケ繝医Λ繧ッ繝√Ε 7 | 8 | typedef struct { 9 | UINT16 year; 10 | UINT16 month; 11 | UINT16 week; 12 | UINT16 day; 13 | UINT16 hour; 14 | UINT16 minute; 15 | UINT16 second; 16 | UINT16 milli; 17 | } _SYSTIME; 18 | 19 | BRESULT timemng_gettime(_SYSTIME *systime); 20 | 21 | G_END_DECLS 22 | 23 | #endif /* NP2_X_TIMEMNG_H__ */ 24 | -------------------------------------------------------------------------------- /windows/resources/1252/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | project( 4 | NP2kai_1252 5 | DESCRIPTION "NP2kai language resource library" 6 | HOMEPAGE_URL "http://domisan.sakura.ne.jp/article/np2kai/np2kai.html" 7 | LANGUAGES C CXX 8 | ) 9 | 10 | cmake_policy(SET CMP0076 NEW) 11 | 12 | list(APPEND NP2kai_windows_1252_sources "np2.rc") 13 | 14 | add_library(NP2kai_windows_1252 MODULE ${NP2kai_windows_1252_sources}) 15 | 16 | -------------------------------------------------------------------------------- /windows/timemng.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | // Win32 SYSTEMTIME ストラクチャ 4 | 5 | typedef struct { 6 | UINT16 year; 7 | UINT16 month; 8 | UINT16 week; 9 | UINT16 day; 10 | UINT16 hour; 11 | UINT16 minute; 12 | UINT16 second; 13 | UINT16 milli; 14 | } _SYSTIME; 15 | 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | BRESULT timemng_gettime(_SYSTIME *systime); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | -------------------------------------------------------------------------------- /mem/memems.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | REG8 MEMCALL memems_rd8(UINT32 address); 7 | REG16 MEMCALL memems_rd16(UINT32 address); 8 | UINT32 MEMCALL memems_rd32(UINT32 address); 9 | void MEMCALL memems_wr8(UINT32 address, REG8 value); 10 | void MEMCALL memems_wr16(UINT32 address, REG16 value); 11 | void MEMCALL memems_wr32(UINT32 address, UINT32 value); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /x/cmserial.h: -------------------------------------------------------------------------------- 1 | #ifndef NP2_X_CMSERIAL_H__ 2 | #define NP2_X_CMSERIAL_H__ 3 | 4 | // ---- com manager serial for unix 5 | 6 | G_BEGIN_DECLS 7 | 8 | extern const UINT32 cmserial_speed[10]; 9 | 10 | COMMNG cmserial_create(UINT port, UINT8 param, UINT32 speed); 11 | 12 | #if defined(SUPPORT_PC9861K) 13 | #define MAX_SERIAL_PORT_NUM 3 14 | #else 15 | #define MAX_SERIAL_PORT_NUM 1 16 | #endif 17 | 18 | G_END_DECLS 19 | 20 | #endif /* NP2_X_CMSERIAL_H__ */ 21 | -------------------------------------------------------------------------------- /romimage/MEMSW.X86: -------------------------------------------------------------------------------- 1 | 2 | mswdefault db 048h, 005h, 004h, 000h, 001h, 000h, 000h, 06Eh 3 | 4 | MEMSW_INIT: mov si, offset mswdefault 5 | mov di, MEM_MSW1 6 | cli 7 | mov al, 0dh 8 | out 68h, al ; memsw write enable 9 | mov cx, 8 10 | mswresetlp: db FIXCS 11 | movsb 12 | add di, 3 13 | loop mswresetlp 14 | mov al, 0ch 15 | out 68h, al ; memsw write disable 16 | sti 17 | ret 18 | -------------------------------------------------------------------------------- /sdl/oemtext.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file oemtext.h 3 | * @breif defines converter 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | 10 | #define oemtext_oemtosjis(a, b, c, d) codecnv_utf8tosjis(a, b, c, d) 11 | #define oemtext_sjistooem(a, b, c, d) codecnv_sjistoutf8(a, b, c, d) 12 | 13 | #ifdef __cplusplus 14 | #include 15 | namespace std 16 | { 17 | typedef string oemstring; 18 | } 19 | #endif /* __cplusplus */ 20 | -------------------------------------------------------------------------------- /mem/memtram.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | REG8 MEMCALL memtram_rd8(UINT32 address); 7 | REG16 MEMCALL memtram_rd16(UINT32 address); 8 | UINT32 MEMCALL memtram_rd32(UINT32 address); 9 | void MEMCALL memtram_wr8(UINT32 address, REG8 value); 10 | void MEMCALL memtram_wr16(UINT32 address, REG16 value); 11 | void MEMCALL memtram_wr32(UINT32 address, UINT32 value); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /x/contrib/udev/70-external-fm-sound.rules: -------------------------------------------------------------------------------- 1 | ACTION!="add", GOTO="external_fm_sound_end" 2 | 3 | SUBSYSTEM=="tty", IMPORT{parent}="ID_VENDOR_ID", IMPORT{parent}="ID_MODEL_ID" 4 | 5 | # C86BOX 6 | SUBSYSTEM=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="27d8", MODE="0666" 7 | 8 | # SPFM Light (a.k.a. FTDI FT232RL) 9 | SUBSYSTEM=="tty", KERNEL=="ttyUSB*", ENV{ID_VENDOR_ID}=="0403", ENV{ID_MODEL_ID}=="6001", MODE="0666" 10 | 11 | LABEL="external_fm_sound_end" 12 | -------------------------------------------------------------------------------- /font/readme.txt: -------------------------------------------------------------------------------- 1 | 2 |  本フォルダのソースファイルについては特に説明しません。 3 | 4 |  ノーチェックの部分もあります。 5 | 6 | 7 |  あくまでオリジナルフォントや個人的なフォントの模様替えの為であって 8 | 他のエミュレータまでに御迷惑をお掛けしたくありません。 9 | 10 |  また、違法行為を助長する為の物でもありません。 11 | 12 | 13 | 14 | font[] 15 | ANK 8x 8 - 0x82000 + (ank << 3) 16 | ANK 8x16 - 0x80000 + (ank << 4) 17 | KNJ 8x16 - 0x00000 + ((jish - 0x20) << 4) + (jisl << 12) (left) 18 | 0x00800 + ((jish - 0x20) << 4) + (jisl << 12) (right) 19 | 20 | -------------------------------------------------------------------------------- /sound/fmgen/fmgen_headers.h: -------------------------------------------------------------------------------- 1 | #ifndef WIN_HEADERS_H 2 | #define WIN_HEADERS_H 3 | 4 | #define STRICT 5 | #define WIN32_LEAN_AND_MEAN 6 | 7 | #include 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #ifdef _MSC_VER 15 | #undef max 16 | #define max _MAX 17 | #undef min 18 | #define min _MIN 19 | #endif 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | 25 | #endif // WIN_HEADERS_H 26 | -------------------------------------------------------------------------------- /windows/debuguty/viewmem.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file viewmem.h 3 | * @brief DebugUty 用メモリ読み込みクラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | /** 9 | * @brief メモリ読み込み 10 | */ 11 | struct DebugUtyViewMemory 12 | { 13 | UINT8 vram; //!< VRAM バンク 14 | UINT8 itf; //!< ITF バンク 15 | UINT8 A20; //!< A20 ライン 16 | 17 | DebugUtyViewMemory(); 18 | void Update(); 19 | void Read(UINT32 nAddress, LPVOID lpBuffer, UINT32 cbBuffer) const; 20 | }; 21 | -------------------------------------------------------------------------------- /np2tool/HOSTDRV.INC: -------------------------------------------------------------------------------- 1 | 2 | %define VERSION_ID "20040122" 3 | 4 | 5 | struc HDRVIF 6 | .drive_no resb 1 7 | .dosver resw 1 8 | .sda_off resw 1 9 | .sda_seg resw 1 10 | endstruc 11 | 12 | struc LOL 13 | resb 22 14 | .cds resd 1 15 | resb 7 16 | .lastdrv resb 1 17 | endstruc 18 | 19 | struc CDS 20 | .cur resb 67 21 | .flag resw 1 22 | resb 10 23 | .root resw 1 24 | .size 25 | endstruc 26 | 27 | -------------------------------------------------------------------------------- /sound/fmgen/fmgen_readme_kai.txt: -------------------------------------------------------------------------------- 1 | NP2kai において fmgen 008 へ行った改変. by AZO 2 | 3 | 1.ファイル名の変更. (fmgen_*.*) 4 | 5 | 2.fmgen.cpp Operator::MakeTable() のインクリメント修正. 6 | 7 | [修正前] 8 | *p++ = p[-512] / 2; 9 | 10 | [修正後] 11 | //*p++ = p[-512] / 2; 12 | *p = p[-512] / 2; 13 | p++; 14 | 15 | 3.各クラスのステートセーブ用構造体と、ステートセーブ/ロード実装 16 | 17 | struct xxxData : ステートセーブ用構造体 18 | 19 | xxx_DataSave() : ステートセーブ 20 | xxx_DataLoad() : ステートロード 21 | 22 | 4.C言語用ラッパー fmgen_fmgwrap.cpp/.h 23 | 24 | 以上. 25 | -------------------------------------------------------------------------------- /windows/misc/tstring.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file tstring.h 3 | * @brief 文字列クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | 10 | namespace std 11 | { 12 | #ifdef _UNICODE 13 | typedef wstring tstring; //!< tchar string 型定義 14 | #else // _UNICODE 15 | typedef string tstring; //!< tchar string型定義 16 | #endif // _UNICODE 17 | } 18 | 19 | std::tstring LoadTString(UINT uID); 20 | std::tstring LoadTString(LPCTSTR lpString); 21 | -------------------------------------------------------------------------------- /wab/wabbmpsave.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file wabbmpsave.h 3 | * @brief Window Accelerator Board BMP Save 4 | * 5 | * @author $Author: SimK $ 6 | */ 7 | 8 | #pragma once 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include 15 | 16 | BRESULT np2wab_getbmp(BMPFILE *lpbf, BMPINFO *lpbi, UINT8 **lplppal, UINT8 **lplppixels); 17 | BRESULT np2wab_writebmp(const OEMCHAR *filename); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /windows/sstp.h: -------------------------------------------------------------------------------- 1 | #define SSTP_READY 0 2 | #define SSTP_SENDING 1 3 | #define SSTP_BUSY -3 4 | #define SSTP_NOSEND -2 5 | #define SSTP_ERROR -1 6 | 7 | 8 | void sstp_construct(HWND hwnd); 9 | void sstp_destruct(void); 10 | 11 | void sstp_connect(void); 12 | void sstp_readSocket(void); 13 | void sstp_disconnect(void); 14 | 15 | BOOL sstp_send(const OEMCHAR *msg, void (*proc)(HWND hWnd, char *msg)); 16 | int sstp_result(void); 17 | 18 | BOOL sstp_sendonly(const OEMCHAR *msg); 19 | 20 | -------------------------------------------------------------------------------- /generic/np2info.h: -------------------------------------------------------------------------------- 1 | 2 | struct _np2infoex; 3 | typedef struct _np2infoex NP2INFOEX; 4 | 5 | struct _np2infoex { 6 | OEMCHAR cr[4]; 7 | BOOL (*ext)(OEMCHAR *dst, const OEMCHAR *key, int maxlen, 8 | const NP2INFOEX *ex); 9 | }; 10 | 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | void np2info(OEMCHAR *dst, const OEMCHAR *src, int maxlen, 17 | const NP2INFOEX *ex); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /common/textfile.h: -------------------------------------------------------------------------------- 1 | 2 | typedef void *TEXTFILEH; 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | TEXTFILEH textfile_open(const OEMCHAR *filename, UINT buffersize); 9 | TEXTFILEH textfile_create(const OEMCHAR *filename, UINT buffersize); 10 | BRESULT textfile_read(TEXTFILEH fh, OEMCHAR *buffer, UINT size); 11 | BRESULT textfile_write(TEXTFILEH fh, const OEMCHAR *buffer); 12 | void textfile_close(TEXTFILEH fh); 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | 18 | -------------------------------------------------------------------------------- /windows/x64/vram.inc: -------------------------------------------------------------------------------- 1 | 2 | SCRN_BUFSIZE equ 0x4b000 3 | 4 | 5 | struc vramop_t 6 | .operate resd 1 7 | .tramwait resd 1 8 | .vramwait resd 1 9 | .grcgwait resd 1 10 | endstruc 11 | 12 | struc dsync_t 13 | .text_vbp resd 1 14 | .textymax resd 1 15 | .grph_vbp resd 1 16 | .grphymax resd 1 17 | 18 | .scrnxpos resd 1 19 | .scrnxmax resd 1 20 | .scrnxextend resd 1 21 | .scrnymax resd 1 22 | .textvad resd 1 23 | .grphvad resd 1 24 | endstruc 25 | 26 | -------------------------------------------------------------------------------- /sound/fmgen/fmgen_diag.h: -------------------------------------------------------------------------------- 1 | #ifndef incl_diag_h 2 | #define incl_diag_h 3 | 4 | #define LOG0(m) void (0) 5 | #define LOG1(m,a) void (0) 6 | #define LOG2(m,a,b) void (0) 7 | #define LOG3(m,a,b,c) void (0) 8 | #define LOG4(m,a,b,c,d) void (0) 9 | #define LOG5(m,a,b,c,d,e) void (0) 10 | #define LOG6(m,a,b,c,d,e,f) void (0) 11 | #define LOG7(m,a,b,c,d,e,f,g) void (0) 12 | #define LOG8(m,a,b,c,d,e,f,g,h) void (0) 13 | #define LOG9(m,a,b,c,d,e,f,g,h,i) void (0) 14 | 15 | #endif // incl_diag_h 16 | -------------------------------------------------------------------------------- /windows/x86/cputype.x86: -------------------------------------------------------------------------------- 1 | 2 | section .text 3 | 4 | global _havemmx 5 | 6 | align 16 7 | _havemmx: pushfd 8 | pop eax 9 | mov edx, eax 10 | xor eax, 00200000h 11 | push eax 12 | popfd 13 | pushfd 14 | pop eax 15 | sub eax, edx 16 | je short nocpuid 17 | xor eax, eax 18 | inc eax 19 | push ebx 20 | cpuid 21 | pop ebx 22 | mov eax, edx 23 | and eax, 00800000h 24 | nocpuid: ret 25 | 26 | -------------------------------------------------------------------------------- /windows/x86/vram.inc: -------------------------------------------------------------------------------- 1 | 2 | %define SCRN_BUFSIZE 0x4b000 3 | 4 | 5 | struc vramop_t 6 | .operate resd 1 7 | .tramwait resd 1 8 | .vramwait resd 1 9 | .grcgwait resd 1 10 | endstruc 11 | 12 | struc dsync_t 13 | .text_vbp resd 1 14 | .textymax resd 1 15 | .grph_vbp resd 1 16 | .grphymax resd 1 17 | 18 | .scrnxpos resd 1 19 | .scrnxmax resd 1 20 | .scrnxextend resd 1 21 | .scrnymax resd 1 22 | .textvad resd 1 23 | .grphvad resd 1 24 | endstruc 25 | 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | *.o 3 | *.a 4 | *.dylib 5 | *.so 6 | *.dll 7 | *.in 8 | compile_commands.json 9 | cppcheck.xml 10 | *.pch 11 | *.opk 12 | *.exe 13 | *.d88 14 | *.dirstamp 15 | aclocal.m4 16 | autom4te.cache 17 | compile 18 | config.guess 19 | config.h.in 20 | config.log 21 | config.sub 22 | config.status 23 | configure 24 | install-sh 25 | Makefile.in 26 | missing 27 | stamp-h1 28 | np2kai 29 | np21kai 30 | np21kai_HAXM 31 | xnp2kai 32 | xnp21kai 33 | xnp21kai_HAXM 34 | xnp2kai.1* 35 | xnp21kai.1* 36 | 37 | -------------------------------------------------------------------------------- /diskimage/img_strres.h: -------------------------------------------------------------------------------- 1 | #ifdef __cplusplus 2 | extern "C" { 3 | #endif 4 | 5 | extern const OEMCHAR str_dcp[]; 6 | extern const OEMCHAR str_dcu[]; 7 | extern const OEMCHAR str_nfd[]; 8 | extern const OEMCHAR str_vfdd[]; 9 | 10 | extern const OEMCHAR str_cue[]; 11 | extern const OEMCHAR str_ccd[]; 12 | extern const OEMCHAR str_cdm[]; 13 | extern const OEMCHAR str_mds[]; 14 | extern const OEMCHAR str_nrg[]; 15 | extern const OEMCHAR str_iso[]; 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /sound/opntimer.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file opntimer.h 3 | * @brief Interface of OPN timer 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | #include "opna.h" 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | void fmport_a(NEVENTITEM item); 16 | void fmport_b(NEVENTITEM item); 17 | 18 | void opna_timer(POPNA opna, UINT nIrq, NEVENTID nTimerA, NEVENTID nTimerB); 19 | void opna_settimer(POPNA opna, REG8 cData); 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "cmake/vst3_cmake"] 2 | path = cmake/vst3_cmake 3 | url = https://github.com/steinbergmedia/vst3_cmake.git 4 | [submodule "cmake/FindWDK"] 5 | path = cmake/FindWDK 6 | url = https://github.com/SergiusTheBest/FindWDK.git 7 | [submodule "vst3sdk"] 8 | path = vst3sdk 9 | url = https://github.com/steinbergmedia/vst3sdk.git 10 | shallow = true 11 | [submodule "cmake/sdl2-cmake-modules"] 12 | path = cmake/sdl2-cmake-modules 13 | url = https://github.com/aminosbh/sdl2-cmake-modules.git 14 | -------------------------------------------------------------------------------- /diskimage/win9x/img_dosio.h: -------------------------------------------------------------------------------- 1 | //#define DOSIOCALL __stdcall 2 | // 3 | //#define FILEH HANDLE 4 | //#define FILEH_INVALID (INVALID_HANDLE_VALUE) 5 | // 6 | //#define FLISTH HANDLE 7 | //#define FLISTH_INVALID (INVALID_HANDLE_VALUE) 8 | // 9 | //#ifdef __cplusplus 10 | //extern "C" { 11 | //#endif 12 | // 13 | //INT64 DOSIOCALL file_seeki64(FILEH handle, INT64 pointer, int method); 14 | //INT64 DOSIOCALL file_getsizei64(FILEH handle); 15 | // 16 | //#ifdef __cplusplus 17 | //} 18 | //#endif 19 | -------------------------------------------------------------------------------- /sdl/libretro/libretro-common/include/libchdr/coretypes.h: -------------------------------------------------------------------------------- 1 | #ifndef __CORETYPES_H__ 2 | #define __CORETYPES_H__ 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | typedef uint64_t UINT64; 9 | #ifndef OSD_CPU_H 10 | typedef uint32_t UINT32; 11 | typedef uint16_t UINT16; 12 | typedef uint8_t UINT8; 13 | #endif 14 | 15 | typedef int64_t INT64; 16 | #ifndef OSD_CPU_H 17 | typedef int32_t INT32; 18 | typedef int16_t INT16; 19 | typedef int8_t INT8; 20 | #endif 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /windows/commng/cmnull.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file cmnull.h 3 | * @brief commng NULL デバイス クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "cmbase.h" 9 | 10 | /** 11 | * @brief commng NULL デバイス クラス 12 | */ 13 | class CComNull : public CComBase 14 | { 15 | public: 16 | CComNull(); 17 | 18 | protected: 19 | virtual UINT Read(UINT8* pData); 20 | virtual UINT Write(UINT8 cData); 21 | virtual UINT8 GetStat(); 22 | virtual INTPTR Message(UINT nMessage, INTPTR nParam); 23 | }; 24 | -------------------------------------------------------------------------------- /cbus/boardspb.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file boardspb.h 3 | * @brief Interface of Speak board 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" 12 | { 13 | #endif 14 | 15 | void boardspb_reset(const NP2CFG *pConfig, int opnaidx); 16 | void boardspb_bind(void); 17 | void boardspb_unbind(void); 18 | 19 | void boardspr_reset(const NP2CFG *pConfig); 20 | void boardspr_bind(void); 21 | void boardspr_unbind(void); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | -------------------------------------------------------------------------------- /generic/cmver.h: -------------------------------------------------------------------------------- 1 | 2 | // vermouthのみ使用のCOMMNG-MIDI 3 | // あまりに一緒すぎるんで 関数名変えてこっちへ 4 | 5 | #include 6 | 7 | // ---- com manager midi for vermouth 8 | 9 | #define COMSIG_MIDI 0x4944494d 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | void cmvermouth_initialize(void); 16 | COMMNG cmvermouth_create(void); 17 | #if defined(VERMOUTH_LIB) 18 | void cmvermouth_load(UINT rate); 19 | void cmvermouth_unload(void); 20 | #endif 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /romimage/BIOS/EOI.X86: -------------------------------------------------------------------------------- 1 | 2 | sendeoi: push ax 3 | call eoi 4 | pop ax 5 | biosnop: iret 6 | 7 | eoi: mov al, 0bh 8 | out 00h, al 9 | out 5fh, al 10 | in al, 00h 11 | test al, 80h 12 | je short .master 13 | mov al, 20h 14 | out 08h, al 15 | out 5fh, al 16 | mov al, 0bh 17 | out 08h, al 18 | out 5fh, al 19 | in al, 08h 20 | test al, -1 21 | jne short .ed 22 | .master: mov al, 20h 23 | out 00h, al 24 | .ed: ret 25 | 26 | -------------------------------------------------------------------------------- /calendar.h: -------------------------------------------------------------------------------- 1 | 2 | typedef struct { 3 | _SYSTIME dt; 4 | _SYSTIME realc; 5 | UINT steps; 6 | UINT realchg; 7 | } _CALENDAR, *CALENDAR; 8 | 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | extern _CALENDAR cal; 15 | 16 | void calendar_initialize(void); 17 | void calendar_inc(void); 18 | void calendar_set(const UINT8 *bcd); 19 | void calendar_get(UINT8 *bcd); 20 | void calendar_getreal(UINT8 *bcd); 21 | void calendar_getvir(UINT8 *bcd); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | -------------------------------------------------------------------------------- /common/wavefile.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file wavefile.h 3 | * @brief Interface of wave file 4 | */ 5 | 6 | #pragma once 7 | 8 | typedef struct TagWaveFile *WAVEFILEH; /*!< Defines handle */ 9 | 10 | #ifdef __cplusplus 11 | extern "C" 12 | { 13 | #endif 14 | 15 | WAVEFILEH wavefile_create(const OEMCHAR *lpFilename, UINT nRate, UINT nBits, UINT nChannels); 16 | UINT wavefile_write(WAVEFILEH hWave, const void *lpBuffer, UINT cbBuffer); 17 | void wavefile_close(WAVEFILEH hWave); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /i286x/i286xrep.h: -------------------------------------------------------------------------------- 1 | void rep_xinsb(void); 2 | void rep_xinsw(void); 3 | void rep_xoutsb(void); 4 | void rep_xoutsw(void); 5 | void rep_xmovsb(void); 6 | void rep_xmovsw(void); 7 | void rep_xlodsb(void); 8 | void rep_xlodsw(void); 9 | void rep_xstosb(void); 10 | void rep_xstosw(void); 11 | 12 | void repe_xcmpsb(void); 13 | void repne_xcmpsb(void); 14 | void repe_xcmpsw(void); 15 | void repne_xcmpsw(void); 16 | 17 | void repe_xscasb(void); 18 | void repne_xscasb(void); 19 | void repe_xscasw(void); 20 | void repne_xscasw(void); 21 | -------------------------------------------------------------------------------- /misc/jisutf16pair.h: -------------------------------------------------------------------------------- 1 | /* === ISO-2022-JP and UTF-16(UCS2) code pair === (C) AZO */ 2 | 3 | #ifndef _JISUTF16PAIR_H_ 4 | #define _JISUTF16PAIR_H_ 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | #include 11 | 12 | typedef struct jisutf16pair_t_ { 13 | uint8_t type; 14 | uint16_t jis; 15 | uint16_t utf16; 16 | } jisutf16pair_t; 17 | 18 | extern jisutf16pair_t jisutf16pairs[]; 19 | extern uint16_t jisutf16pair_count; 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | 25 | #endif // _JISUTF16PAIR_H_ 26 | 27 | -------------------------------------------------------------------------------- /np2_tickcount.h: -------------------------------------------------------------------------------- 1 | #ifndef NP2_TICKCOUNT_H 2 | #define NP2_TICKCOUNT_H 3 | 4 | #if defined(SUPPORT_NP2_TICKCOUNT) 5 | 6 | #include 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | void NP2_TickCount_Initialize(void); 13 | 14 | extern int64_t NP2_TickCount_GetCount(void); 15 | extern int64_t NP2_TickCount_GetFrequency(void); 16 | extern int64_t NP2_TickCount_GetCountFromInit(void); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif // SUPPORT_NP2_TICKCOUNT 23 | 24 | #endif // NP2_TICKCOUNT_H 25 | 26 | -------------------------------------------------------------------------------- /embed/menubase/menumbox.h: -------------------------------------------------------------------------------- 1 | 2 | enum { 3 | MBOX_OK = 0x0000, 4 | MBOX_OKCANCEL = 0x0001, 5 | MBOX_ABORT = 0x0002, 6 | MBOX_YESNOCAN = 0x0003, 7 | MBOX_YESNO = 0x0004, 8 | MBOX_RETRY = 0x0005, 9 | MBOX_ICONSTOP = 0x0010, 10 | MBOX_ICONQUESTION = 0x0020, 11 | MBOX_ICONEXCLAME = 0x0030, 12 | MBOX_ICONINFO = 0x0040 13 | }; 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | int menumbox(const OEMCHAR *string, const OEMCHAR *title, UINT type); 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /sound/soundrom.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file soundrom.h 3 | * @brief Interface of the sound rom 4 | */ 5 | 6 | #pragma once 7 | 8 | typedef struct { 9 | OEMCHAR name[24]; 10 | UINT32 address; 11 | } SOUNDROM; 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | extern SOUNDROM soundrom; 18 | 19 | void soundrom_reset(void); 20 | void soundrom_load(UINT32 address, const OEMCHAR *primary); 21 | void soundrom_loadex(UINT sw, const OEMCHAR *primary); 22 | void soundrom_loadsne(const OEMCHAR *primary); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | -------------------------------------------------------------------------------- /x/oemtext.h: -------------------------------------------------------------------------------- 1 | #ifndef NP2_X_OEMTEXT_H__ 2 | #define NP2_X_OEMTEXT_H__ 3 | 4 | #include 5 | 6 | #if defined(OSLANG_UTF8) 7 | #define oemtext_sjistooem codecnv_sjistoutf8 8 | #define oemtext_oemtosjis codecnv_utf8tosjis 9 | #elif defined(OSLANG_EUC) 10 | #define oemtext_sjistooem codecnv_sjistoeuc 11 | #define oemtext_oemtosjis codecnv_euctosjis 12 | #endif 13 | 14 | #ifdef __cplusplus 15 | #include 16 | namespace std 17 | { 18 | typedef string oemstring; 19 | } 20 | #endif /* __cplusplus */ 21 | 22 | #endif /* NP2_X_OEMTEXT_H__ */ 23 | -------------------------------------------------------------------------------- /common/parts.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | void PARTSCALL rand_setseed(SINT32 seed); 7 | SINT32 PARTSCALL rand_get(void); 8 | UINT8 PARTSCALL AdjustAfterMultiply(UINT8 value); 9 | UINT8 PARTSCALL AdjustBeforeDivision(UINT8 value); 10 | UINT PARTSCALL sjis2jis(UINT sjis); 11 | UINT PARTSCALL jis2sjis(UINT jis); 12 | void PARTSCALL satuation_s16(SINT16 *dst, const SINT32 *src, UINT size); 13 | void PARTSCALL satuation_s16x(SINT16 *dst, const SINT32 *src, UINT size); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | 19 | -------------------------------------------------------------------------------- /sdl/trace.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef TRACE 3 | 4 | #define TRACEINIT() 5 | #define TRACETERM() 6 | #define TRACEOUT(a) 7 | #define VERBOSE(a) 8 | 9 | #else 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | void trace_init(void); 16 | void trace_term(void); 17 | void trace_fmt(const char *str, ...); 18 | 19 | #define TRACEINIT() trace_init() 20 | #define TRACETERM() trace_term() 21 | #define TRACEOUT(arg) trace_fmt arg 22 | #define VERBOSE(arg) trace_fmt arg 23 | 24 | #ifdef __cplusplus 25 | }; 26 | #endif 27 | 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /cbus/boardpx.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file boardpx.h 3 | * @brief Interface of PX 4 | */ 5 | 6 | #pragma once 7 | 8 | #if defined(SUPPORT_PX) 9 | 10 | #include 11 | 12 | #ifdef __cplusplus 13 | extern "C" 14 | { 15 | #endif 16 | 17 | void boardpx1_reset(const NP2CFG *pConfig); 18 | void boardpx1_bind(void); 19 | void boardpx1_unbind(void); 20 | 21 | void boardpx2_reset(const NP2CFG *pConfig); 22 | void boardpx2_bind(void); 23 | void boardpx2_unbind(void); 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | 29 | #endif // defined(SUPPORT_PX) 30 | -------------------------------------------------------------------------------- /misc/sjisutf16pair.h: -------------------------------------------------------------------------------- 1 | /* === Shift_JIS and UTF-16(UCS2) code pair === (C) AZO */ 2 | 3 | #ifndef _SJISUTF16PAIR_H_ 4 | #define _SJISUTF16PAIR_H_ 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | #include 11 | 12 | typedef struct { 13 | uint16_t sjis; 14 | uint16_t utf16u; 15 | uint16_t utf16l; 16 | } sjisutf16pair_t; 17 | 18 | extern sjisutf16pair_t sjisutf16pairs[]; 19 | 20 | #define sjisutf16pair_count (sizeof(sjisutf16pairs) / sizeof(sjisutf16pair_t)) 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | 26 | #endif // _SJISUTF16PAIR_H_ 27 | 28 | -------------------------------------------------------------------------------- /romimage/PROCESS.MAC: -------------------------------------------------------------------------------- 1 | 2 | ifdef NP2 3 | ITF_EXIT macro 4 | mov al, 0fh 5 | out 37h, al 6 | mov al, 0ah 7 | out 37h, al 8 | mov ax, 0 9 | mov ds, ax 10 | itfexitp: mov word ptr ds:[04f8h], 0eaeeh 11 | mov word ptr ds:[04fah], 00008h 12 | mov word ptr ds:[04fch], 0fd80h 13 | mov dx, 043dh 14 | mov al, 12h 15 | db 0eah 16 | dw 04f8h 17 | dw 0000h 18 | endm 19 | endif 20 | 21 | 22 | ifdef MSDOS 23 | ITF_EXIT macro 24 | mov ax, 4c00h 25 | int 21h 26 | endm 27 | endif 28 | 29 | -------------------------------------------------------------------------------- /vram/vram.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | 6 | _VRAMOP vramop; 7 | UINT8 tramupdate[0x1000]; 8 | UINT8 vramupdate[0x8000]; 9 | #if defined(SUPPORT_PC9821) 10 | #if defined(SUPPORT_IA32_HAXM) 11 | UINT8 vramex_base[0x80000]; // PEGC VRAM 12 | UINT8 *vramex = vramex_base; // PEGC VRAM Alloc in pccore_mem_malloc() 13 | #else 14 | UINT8 vramex[0x80000]; // PEGC VRAM 15 | #endif 16 | #endif 17 | 18 | 19 | void vram_initialize(void) { 20 | 21 | ZeroMemory(&vramop, sizeof(vramop)); 22 | MEMM_VRAM(0); 23 | } 24 | 25 | -------------------------------------------------------------------------------- /romimage/BIOS/VECT08.X86: -------------------------------------------------------------------------------- 1 | 2 | vect08: sti 3 | push ax 4 | push ds 5 | xor ax, ax 6 | mov ds, ax 7 | dec word [0x058a] 8 | pop ds 9 | cli 10 | je short .1 11 | mov al, 0x20 12 | out 0x00, al 13 | out 0x5f, al 14 | sti 15 | mov ah, 0x03 16 | int 0x1c 17 | pop ax 18 | iret 19 | .1: in al, 0x02 20 | or al, 0x01 21 | out 0x5f, al 22 | out 0x02, al 23 | mov al, 0x20 24 | out 0x00, al 25 | out 0x5f, al 26 | sti 27 | pop ax 28 | int 0x07 29 | iret 30 | 31 | -------------------------------------------------------------------------------- /x/taskmng.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | #include 5 | 6 | #include 7 | 8 | 9 | void 10 | taskmng_initialize(void) 11 | { 12 | 13 | np2running = 1; 14 | } 15 | 16 | BOOL 17 | taskmng_sleep(UINT32 tick) 18 | { 19 | UINT32 base; 20 | UINT32 now; 21 | 22 | base = GETTICK(); 23 | while (taskmng_isavail() && (((now = GETTICK()) - base) < tick)) { 24 | toolkit_event_process(); 25 | usleep((tick - (now - base) / 2) * 1000); 26 | } 27 | return taskmng_isavail(); 28 | } 29 | 30 | void 31 | taskmng_exit(void) 32 | { 33 | 34 | np2running = 0; 35 | } 36 | -------------------------------------------------------------------------------- /embed/menubase/menuicon.h: -------------------------------------------------------------------------------- 1 | 2 | enum { 3 | MICON_NULL = 0, 4 | MICON_STOP, 5 | MICON_QUESTION, 6 | MICON_EXCLAME, 7 | MICON_INFO, 8 | MICON_FOLDER, 9 | MICON_FOLDERPARENT, 10 | MICON_FILE, 11 | MICON_USER 12 | }; 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | void menuicon_initialize(void); 19 | void menuicon_deinitialize(void); 20 | void menuicon_regist(UINT16 id, const MENURES *res); 21 | VRAMHDL menuicon_lock(UINT16 id, int width, int height, int bpp); 22 | void menuicon_unlock(VRAMHDL vram); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /io/np2sysp.h: -------------------------------------------------------------------------------- 1 | 2 | #define NP2SYSP_BIT 4 3 | #define NP2SYSP_LEN (1 << NP2SYSP_BIT) 4 | #define NP2SYSP_MASK (NP2SYSP_LEN - 1) 5 | 6 | typedef struct { 7 | char substr[NP2SYSP_LEN]; 8 | char outstr[NP2SYSP_LEN]; 9 | int strpos; 10 | int outpos; 11 | UINT32 outval; 12 | UINT32 inpval; 13 | } _NP2SYSP, *NP2SYSP; 14 | 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | void np2sysp_outstr(const void *arg1, long arg2); 21 | 22 | void np2sysp_reset(const NP2CFG *pConfig); 23 | void np2sysp_bind(void); 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | 29 | -------------------------------------------------------------------------------- /vram/dispsync.h: -------------------------------------------------------------------------------- 1 | 2 | typedef struct { 3 | UINT text_vbp; 4 | UINT textymax; 5 | UINT grph_vbp; 6 | UINT grphymax; 7 | 8 | UINT scrnxpos; 9 | UINT scrnxmax; 10 | UINT scrnxextend; 11 | UINT scrnymax; 12 | UINT32 textvad; 13 | UINT32 grphvad; 14 | } DSYNC; 15 | 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | extern DSYNC dsync; 22 | 23 | void dispsync_initialize(void); 24 | BOOL dispsync_renewalmode(void); 25 | BOOL dispsync_renewalhorizontal(void); 26 | BOOL dispsync_renewalvertical(void); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | -------------------------------------------------------------------------------- /sdl/libretro/libretro-common/include/libchdr/minmax.h: -------------------------------------------------------------------------------- 1 | /* license:BSD-3-Clause 2 | * copyright-holders:Aaron Giles 3 | *************************************************************************** 4 | 5 | minmax.h 6 | 7 | ***************************************************************************/ 8 | 9 | #pragma once 10 | 11 | #ifndef __MINMAX_H__ 12 | #define __MINMAX_H__ 13 | 14 | #if defined(RARCH_INTERNAL) || defined(__LIBRETRO__) 15 | #include 16 | #else 17 | #define MAX(x, y) (((x) > (y)) ? (x) : (y)) 18 | #define MIN(x, y) ((x) < (y) ? (x) : (y)) 19 | #endif 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /wab/wab_rly.h: -------------------------------------------------------------------------------- 1 | 2 | typedef struct { 3 | UINT8 head[4]; 4 | UINT nextevent; 5 | UINT8 curevent; 6 | } _WABRLY, *WABRLY; 7 | 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | void wabrly_initialize(void); 14 | void wabrly_switch(void); 15 | 16 | 17 | #if defined(SUPPORT_SWWABRLYSND) 18 | void wabrlysnd_initialize(UINT rate); 19 | void wabrlysnd_bind(void); 20 | void wabrlysnd_deinitialize(void); 21 | #else 22 | #define wabrlysnd_initialize(r) 23 | #define wabrlysnd_bind() 24 | #define wabrlysnd_deinitialize() 25 | #endif 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /sdl/kbtrans.h: -------------------------------------------------------------------------------- 1 | #ifndef NP2_SDL_KBTRANS_H 2 | #define NP2_SDL_KBTRANS_H 3 | 4 | #include 5 | 6 | #if defined(__LIBRETRO__) 7 | typedef struct { 8 | UINT lrkey; 9 | UINT8 keycode; 10 | } LRKCNV; 11 | 12 | extern uint16_t keys_needed; 13 | extern LRKCNV* keys_poll; 14 | 15 | void init_lrkey_to_pc98(); 16 | void reset_lrkey(); 17 | void send_libretro_key_down(UINT key); 18 | void send_libretro_key_up(UINT key); 19 | #else /* __LIBRETRO__ */ 20 | void sdlkbd_initialize(void); 21 | void sdlkbd_reset(); 22 | void sdlkbd_keydown(UINT key); 23 | void sdlkbd_keyup(UINT key); 24 | #endif /* __LIBRETRO__ */ 25 | #endif 26 | 27 | -------------------------------------------------------------------------------- /windows/misc/tickcounter.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file tickcounter.h 3 | * @brief TICK カウンタの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | enum { 9 | TCMODE_DEFAULT = 0, 10 | TCMODE_GETTICKCOUNT = 1, 11 | TCMODE_TIMEGETTIME = 2, 12 | TCMODE_PERFORMANCECOUNTER = 3, 13 | }; 14 | 15 | #ifdef __cplusplus 16 | extern "C" 17 | { 18 | #endif // __cplusplus 19 | 20 | DWORD GetTickCounter(); 21 | void SetTickCounterMode(int mode); 22 | int GetTickCounterMode(); 23 | LARGE_INTEGER GetTickCounter_Clock(); 24 | LARGE_INTEGER GetTickCounter_ClockPerSec(); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif // __cplusplus 29 | -------------------------------------------------------------------------------- /x/misc/guard.h: -------------------------------------------------------------------------------- 1 | /*! 2 | * @file guard.h 3 | * @brief クリティカル セクション クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | 10 | /*! 11 | * @brief クリティカル セクション クラス 12 | */ 13 | class CGuard 14 | { 15 | public: 16 | /*! コンストラクタ */ 17 | CGuard() { ::pthread_mutex_init(&m_cs, NULL); } 18 | 19 | /*! デストラクタ */ 20 | ~CGuard() { ::pthread_mutex_destroy(&m_cs); } 21 | 22 | /*! クリティカル セクション開始 */ 23 | void Enter() { ::pthread_mutex_lock(&m_cs); } 24 | 25 | /*! クリティカル セクション終了 */ 26 | void Leave() { ::pthread_mutex_unlock(&m_cs); } 27 | 28 | private: 29 | pthread_mutex_t m_cs; //!< クリティカル セクション情報 30 | }; 31 | -------------------------------------------------------------------------------- /windows/misc/guard.h: -------------------------------------------------------------------------------- 1 | /*! 2 | * @file guard.h 3 | * @brief クリティカル セクション クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | /*! 9 | * @brief クリティカル セクション クラス 10 | */ 11 | class CGuard 12 | { 13 | public: 14 | /*! コンストラクタ */ 15 | CGuard() { ::InitializeCriticalSection(&m_cs); } 16 | 17 | /*! デストラクタ */ 18 | ~CGuard() { ::DeleteCriticalSection(&m_cs); } 19 | 20 | /*! クリティカル セクション開始 */ 21 | void Enter() { ::EnterCriticalSection(&m_cs); } 22 | 23 | /*! クリティカル セクション終了 */ 24 | void Leave() { ::LeaveCriticalSection(&m_cs); } 25 | 26 | private: 27 | CRITICAL_SECTION m_cs; //!< クリティカル セクション情報 28 | }; 29 | -------------------------------------------------------------------------------- /windows/menu.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file menu.h 3 | * @brief メニューの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | #define MFCHECK(a) ((a) ? MF_CHECKED : MF_UNCHECKED) 9 | 10 | bool menu_searchmenu(HMENU hMenu, UINT uID, HMENU *phmenuRet, int *pnPos); 11 | int menu_addmenu(HMENU hMenu, int nPos, HMENU hmenuAdd, BOOL bSeparator); 12 | int menu_addmenures(HMENU hMenu, int nPos, UINT uID, BOOL bSeparator); 13 | void menu_addmenubar(HMENU popup, HMENU menubar); 14 | 15 | void sysmenu_initialize(HMENU hMenu); 16 | void sysmenu_update(HMENU hMenu); 17 | 18 | void xmenu_initialize(HMENU hMenu); 19 | void xmenu_update(HMENU hMenu); 20 | -------------------------------------------------------------------------------- /romimage/ITFD.MK: -------------------------------------------------------------------------------- 1 | AS = masm 2 | AOPT = /ML /DMSDOS /DDEBUG 3 | OBJ = DEBUG 4 | 5 | itf.com: $(OBJ)\itf.exe 6 | exe2bin $(OBJ)\itf itf.com 7 | 8 | $(OBJ)\itf.exe: $(OBJ)\itf.obj 9 | link $(OBJ)\itf,$(OBJ)\itf; 10 | 11 | $(OBJ)\itf.obj: itf.asm itf.inc dataseg.inc process.mac debug.mac \ 12 | resource.x86 itfsub.x86 \ 13 | keyboard.inc keyboard.x86 textdisp.x86 \ 14 | np2.x86 dipsw.x86 memsw.x86 \ 15 | beep.x86 firmware.x86 memchk.x86 \ 16 | ssp.x86 ssp_res.x86 ssp_sub.x86 ssp_dip.x86 ssp_msw.x86 17 | $(AS) $(AOPT) $(*B),$*; 18 | 19 | resource.x86: resource.txt 20 | tool\txtpack resource.txt > resource.x86 21 | -------------------------------------------------------------------------------- /mem/memepp.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | void MEMCALL memd000_wr8(UINT32 address, REG8 value); 7 | void MEMCALL memd000_wr16(UINT32 address, REG16 value); 8 | void MEMCALL memd000_wr32(UINT32 address, UINT32 value); 9 | 10 | REG8 MEMCALL memf800_rd8(UINT32 address); 11 | REG16 MEMCALL memf800_rd16(UINT32 address); 12 | UINT32 MEMCALL memf800_rd32(UINT32 address); 13 | 14 | void MEMCALL memepson_wr8(UINT32 address, REG8 value); 15 | void MEMCALL memepson_wr16(UINT32 address, REG16 value); 16 | void MEMCALL memepson_wr32(UINT32 address, UINT32 value); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /sound/mame/driver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef __DRIVER_H__ 4 | #define __DRIVER_H__ 5 | 6 | #define HAS_YM3812 1 7 | #define HAS_YM3526 0 8 | #define HAS_Y8950 1 9 | #define HAS_YMF262 1 10 | 11 | #if defined(_MSC_VER) 12 | #pragma warning(disable: 4244) 13 | #pragma warning(disable: 4245) 14 | #define INLINE __inline 15 | #elif defined(__BORLANDC__) 16 | #define INLINE __inline 17 | #elif defined(__GNUC__) 18 | #define INLINE __inline__ __attribute__((always_inline)) 19 | #else 20 | #define INLINE 21 | #endif 22 | 23 | #define logerror(x,y,z) 24 | //typedef signed int stream_sample_t; 25 | typedef signed short stream_sample_t; 26 | 27 | #endif /* __DRIVER_H__ */ 28 | -------------------------------------------------------------------------------- /io/mouseif.h: -------------------------------------------------------------------------------- 1 | 2 | typedef struct { 3 | uPD8255 upd8255; 4 | UINT32 lastc; 5 | UINT32 intrclock; 6 | UINT32 moveclock; 7 | SINT16 x; 8 | SINT16 y; 9 | SINT16 rx; 10 | SINT16 ry; 11 | SINT16 sx; 12 | SINT16 sy; 13 | SINT16 latch_x; 14 | SINT16 latch_y; 15 | UINT8 timing; 16 | UINT8 rapid; 17 | UINT8 b; 18 | } _MOUSEIF, *MOUSEIF; 19 | 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | void mouseif_reset(const NP2CFG *pConfig); 26 | void mouseif_bind(void); 27 | void mouseif_sync(void); 28 | void mouseint(NEVENTITEM item); 29 | void mouseif_changeclock(void); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /mem/memegc.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | void egcshift(void); 7 | 8 | REG8 MEMCALL egc_readbyte(UINT32 addr); 9 | void MEMCALL egc_writebyte(UINT32 addr, REG8 value); 10 | REG16 MEMCALL egc_readword(UINT32 addr); 11 | void MEMCALL egc_writeword(UINT32 addr, REG16 value); 12 | 13 | REG8 MEMCALL memegc_rd8(UINT32 addr); 14 | void MEMCALL memegc_wr8(UINT32 addr, REG8 value); 15 | REG16 MEMCALL memegc_rd16(UINT32 addr); 16 | void MEMCALL memegc_wr16(UINT32 addr, REG16 value); 17 | UINT32 MEMCALL memegc_rd32(UINT32 address); 18 | void MEMCALL memegc_wr32(UINT32 address, UINT32 value); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | 24 | -------------------------------------------------------------------------------- /diskimage/win9x/img_dosio.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "img_dosio.h" 3 | 4 | INT64 DOSIOCALL file_seeki64(FILEH handle, INT64 pointer, int method) { 5 | 6 | LARGE_INTEGER li; 7 | 8 | li.QuadPart = pointer; 9 | 10 | li.LowPart = SetFilePointer(handle, li.LowPart, &li.HighPart, method); 11 | 12 | if (li.LowPart == INVALID_SET_FILE_POINTER && GetLastError() != NO_ERROR) { 13 | li.QuadPart = -1; 14 | } 15 | 16 | return(li.QuadPart); 17 | } 18 | 19 | INT64 DOSIOCALL file_getsizei64(FILEH handle) { 20 | 21 | LARGE_INTEGER li; 22 | 23 | if (GetFileSizeEx(handle, &li) == 0) { 24 | li.QuadPart = -1; 25 | } 26 | 27 | return(li.QuadPart); 28 | } 29 | -------------------------------------------------------------------------------- /windows/commng/cmmidiout.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file cmmidiout.h 3 | * @brief MIDI OUT 基底クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | /** 9 | * @brief MIDI OUT 基底クラス 10 | */ 11 | class CComMidiOut 12 | { 13 | public: 14 | /** 15 | * デストラクタ 16 | */ 17 | virtual ~CComMidiOut() 18 | { 19 | } 20 | 21 | /** 22 | * ショート メッセージ 23 | * @param[in] nMessage メッセージ 24 | */ 25 | virtual void Short(UINT32 nMessage) 26 | { 27 | } 28 | 29 | /** 30 | * ロング メッセージ 31 | * @param[in] lpMessage メッセージ ポインタ 32 | * @param[in] cbMessage メッセージ サイズ 33 | */ 34 | virtual void Long(const UINT8* lpMessage, UINT cbMessage) 35 | { 36 | } 37 | }; 38 | -------------------------------------------------------------------------------- /windows/commng/cmpara.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file cmpara.h 3 | * @brief パラレル クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "cmbase.h" 9 | 10 | /** 11 | * @brief commng パラレル デバイス クラス 12 | */ 13 | class CComPara : public CComBase 14 | { 15 | public: 16 | static CComPara* CreateInstance(UINT nPort); 17 | 18 | protected: 19 | CComPara(); 20 | virtual ~CComPara(); 21 | virtual UINT Read(UINT8* pData); 22 | virtual UINT Write(UINT8 cData); 23 | virtual UINT8 GetStat(); 24 | virtual INTPTR Message(UINT nMessage, INTPTR nParam); 25 | 26 | private: 27 | HANDLE m_hParallel; /*!< パラレル ハンドル */ 28 | 29 | bool Initialize(UINT nPort); 30 | }; 31 | -------------------------------------------------------------------------------- /x/timemng.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | #include 6 | 7 | BRESULT 8 | timemng_gettime(_SYSTIME *systime) 9 | { 10 | struct tm *now_time; 11 | time_t long_time; 12 | 13 | time(&long_time); 14 | now_time = localtime(&long_time); 15 | if (now_time != NULL) { 16 | systime->year = now_time->tm_year + 1900; 17 | systime->month = now_time->tm_mon + 1; 18 | systime->week = now_time->tm_wday; 19 | systime->day = now_time->tm_mday; 20 | systime->hour = now_time->tm_hour; 21 | systime->minute = now_time->tm_min; 22 | systime->second = now_time->tm_sec; 23 | systime->milli = 0; 24 | 25 | return SUCCESS; 26 | } 27 | return FAILURE; 28 | } 29 | -------------------------------------------------------------------------------- /generic/dipswbmp.h: -------------------------------------------------------------------------------- 1 | #if defined(USE_RESOURCE_BMP) 2 | 3 | #ifdef __cplusplus 4 | extern "C"{ 5 | #endif 6 | 7 | 8 | // それぞれ 4bit BMPが返る (メモリ解放を行なうこと) 9 | 10 | UINT8 *dipswbmp_get9861(const UINT8 *s, const UINT8 *j); 11 | 12 | UINT8 *dipswbmp_getsnd26(UINT8 cfg); 13 | UINT8 *dipswbmp_getsnd86(UINT8 cfg); 14 | UINT8 *dipswbmp_getsndspb(UINT8 cfg, UINT8 vrc); 15 | UINT8 *dipswbmp_getmpu(UINT8 cfg); 16 | UINT8 *dipswbmp_getsmpu(UINT8 cfg); 17 | UINT8 *dipswbmp_getsnd118(UINT16 snd118io, UINT8 snd118dma, UINT8 snd118irqf, UINT8 snd118irqp, UINT8 snd118irqm, UINT8 snd118rom); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif // defined(USE_RESOURCE_BMP) 24 | 25 | -------------------------------------------------------------------------------- /cmake/CrossOpenDinguxRS90.cmake: -------------------------------------------------------------------------------- 1 | # OpenDingux 2 | set(OPENDINGUX TRUE) 3 | 4 | # cross compiler settings 5 | set(CMAKE_CROSSCOMPILING TRUE) 6 | set(CROSS_COMPILE "/opt/rs90-toolchain/usr/bin/mipsel-rs90-linux-musl-") 7 | set(CMAKE_C_COMPILER ${CROSS_COMPILE}gcc) 8 | set(CMAKE_CXX_COMPILER ${CROSS_COMPILE}g++) 9 | set(CMAKE_LINKER ${CROSS_COMPILE}gcc) 10 | 11 | # root path settings 12 | set(CMAKE_FIND_ROOT_PATH "/opt/rs90-toolchain/usr") 13 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # use host system root for program 14 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) # use CMAKE_FIND_ROOT_PATH for library 15 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) # use CMAKE_FIND_ROOT_PATH for include 16 | 17 | -------------------------------------------------------------------------------- /np2tool/NP2TOOL.X86: -------------------------------------------------------------------------------- 1 | 2 | ; in cld/ds=cs / ret z & bx 3 | np2_check: mov ah, 0fh 4 | int 10h 5 | cmp ah, 0fh 6 | mov bx, _msg_pcat 7 | jne short np2check_err 8 | add bx, byte 6 9 | mov si, bx 10 | call sendnp2port 11 | xchg si, bx 12 | checknp2port: lodsb 13 | mov cl, al 14 | .lp: in al, dx 15 | inc si 16 | cmp al, [si-1] 17 | loope .lp 18 | np2check_err: ret 19 | 20 | sendnp2port: mov dx, NP2PORT 21 | xor cx, cx 22 | lodsb 23 | mov cl, al 24 | .lp: lodsb 25 | out dx, al 26 | loop .lp 27 | ret 28 | 29 | _msg_pcat db 'PC/AT$' 30 | db 3, 'NP2' 31 | db 'Real PC-98x1$' 32 | 33 | -------------------------------------------------------------------------------- /cmake/CrossOpenDinguxGCW0.cmake: -------------------------------------------------------------------------------- 1 | # OpenDingux 2 | set(OPENDINGUX TRUE) 3 | 4 | # cross compiler settings 5 | set(CMAKE_CROSSCOMPILING TRUE) 6 | set(CROSS_COMPILE "/opt/gcw0-toolchain/usr/bin/mipsel-gcw0-linux-uclibc-") 7 | set(CMAKE_C_COMPILER ${CROSS_COMPILE}gcc) 8 | set(CMAKE_CXX_COMPILER ${CROSS_COMPILE}g++) 9 | set(CMAKE_LINKER ${CROSS_COMPILE}gcc) 10 | 11 | # root path settings 12 | set(CMAKE_FIND_ROOT_PATH "/opt/gcw0-toolchain/usr") 13 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # use host system root for program 14 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) # use CMAKE_FIND_ROOT_PATH for library 15 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) # use CMAKE_FIND_ROOT_PATH for include 16 | 17 | -------------------------------------------------------------------------------- /sound/fmgen/fmgen_types.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if !defined(win32_types_h) 4 | #define win32_types_h 5 | 6 | #if !defined(_MSC_VER) 7 | #define __stdcall 8 | #define HANDLE void * 9 | #endif 10 | 11 | typedef unsigned char uchar; 12 | typedef unsigned short ushort; 13 | typedef unsigned int uint; 14 | typedef unsigned long ulong; 15 | 16 | typedef unsigned char uint8; 17 | typedef unsigned short uint16; 18 | typedef unsigned int uint32; 19 | 20 | typedef signed char sint8; 21 | typedef signed short sint16; 22 | typedef signed int sint32; 23 | 24 | typedef signed char int8; 25 | typedef signed short int16; 26 | typedef signed int int32; 27 | 28 | #endif // win32_types_h 29 | -------------------------------------------------------------------------------- /windows/debuguty/viewreg.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file viewreg.h 3 | * @brief レジスタ表示クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | #include "viewitem.h" 10 | 11 | /** 12 | * @brief レジスタ表示クラス 13 | */ 14 | class CDebugUtyReg : public CDebugUtyItem 15 | { 16 | public: 17 | CDebugUtyReg(CDebugUtyView* lpView); 18 | virtual ~CDebugUtyReg(); 19 | 20 | virtual void Initialize(const CDebugUtyItem* lpItem = NULL); 21 | virtual bool Update(); 22 | virtual bool Lock(); 23 | virtual void Unlock(); 24 | virtual bool IsLocked(); 25 | virtual void OnPaint(HDC hDC, const RECT& rect); 26 | 27 | private: 28 | std::vector m_buffer; //!< バッファ 29 | }; 30 | -------------------------------------------------------------------------------- /windows/dialog/c_slidervalue.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file c_slidervalue.h 3 | * @brief 値付きスライダー クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "misc/DlgProc.h" 9 | 10 | /** 11 | * @brief スライダー クラス 12 | */ 13 | class CSliderValue : public CSliderProc 14 | { 15 | public: 16 | CSliderValue(); 17 | void SetRange(int nMin, int nMax, BOOL bRedraw = FALSE); 18 | void SetPos(int nPos); 19 | void SetStaticId(UINT nId); 20 | void UpdateValue(); 21 | 22 | private: 23 | UINT m_nStaticId; /*!< 値コントロール */ 24 | }; 25 | 26 | /** 27 | * 値コントロールの指定 28 | * @param[in] nId コントロール ID 29 | */ 30 | inline void CSliderValue::SetStaticId(UINT nId) 31 | { 32 | m_nStaticId = nId; 33 | } 34 | -------------------------------------------------------------------------------- /i386c/ia32/instructions/fpu/softfloat/softfloatdef.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | typedef char flag; 4 | typedef unsigned char uint8; 5 | typedef signed char int8; 6 | typedef unsigned short int uint16; 7 | typedef signed short int int16; 8 | typedef unsigned int uint32; 9 | typedef signed int int32; 10 | typedef unsigned long long int uint64; 11 | typedef signed long long int int64; 12 | 13 | typedef unsigned char bits8; 14 | typedef signed char sbits8; 15 | typedef unsigned short int bits16; 16 | typedef signed short int sbits16; 17 | typedef unsigned int bits32; 18 | typedef signed int sbits32; 19 | typedef unsigned long long int bits64; 20 | typedef signed long long int sbits64; 21 | 22 | #define LIT64(a) (a) 23 | -------------------------------------------------------------------------------- /io/gdc_pset.h: -------------------------------------------------------------------------------- 1 | 2 | struct _gdcpset; 3 | typedef struct _gdcpset _GDCPSET; 4 | typedef struct _gdcpset *GDCPSET; 5 | 6 | typedef void (MEMCALL * GDCPFN)(GDCPSET pen, UINT addr, UINT bit); 7 | 8 | struct _gdcpset { 9 | GDCPFN func[2]; 10 | union { 11 | UINT8 *ptr; // raw access / grcg 12 | UINT32 addr; // egc 13 | } base; 14 | UINT16 pattern; 15 | PAIR16 update; 16 | UINT16 x; 17 | UINT16 y; 18 | UINT dots; 19 | }; 20 | 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | void MEMCALL gdcpset_prepare(GDCPSET pset, UINT32 csrw, REG16 pat, REG8 op); 27 | void MEMCALL gdcpset(GDCPSET pset, REG16 x, REG16 y); 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | -------------------------------------------------------------------------------- /windows/debuguty/viewsnd.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file viewsnd.h 3 | * @brief サウンド レジスタ表示クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | #include "viewitem.h" 10 | 11 | /** 12 | * @brief サウンド レジスタ表示クラス 13 | */ 14 | class CDebugUtySnd : public CDebugUtyItem 15 | { 16 | public: 17 | CDebugUtySnd(CDebugUtyView* lpView); 18 | virtual ~CDebugUtySnd(); 19 | 20 | virtual void Initialize(const CDebugUtyItem* lpItem = NULL); 21 | virtual bool Update(); 22 | virtual bool Lock(); 23 | virtual void Unlock(); 24 | virtual bool IsLocked(); 25 | virtual void OnPaint(HDC hDC, const RECT& rect); 26 | 27 | private: 28 | std::vector m_buffer; //!< バッファ 29 | }; 30 | -------------------------------------------------------------------------------- /x/trace.h: -------------------------------------------------------------------------------- 1 | #ifndef NP2_X_TRACE_H__ 2 | #define NP2_X_TRACE_H__ 3 | 4 | G_BEGIN_DECLS 5 | 6 | extern int trace_flag; 7 | 8 | void trace_init(void); 9 | void trace_term(void); 10 | void trace_fmt(const char *str, ...) G_GNUC_PRINTF(1, 2); 11 | 12 | #ifndef TRACE 13 | 14 | #define TRACEINIT() 15 | #define TRACETERM() 16 | #define TRACEOUT(a) 17 | #ifndef VERBOSE 18 | #define VERBOSE(s) 19 | #endif 20 | 21 | #else /* TRACE */ 22 | 23 | #define TRACEINIT() trace_init() 24 | #define TRACETERM() trace_term() 25 | #define TRACEOUT(arg) trace_fmt arg 26 | #ifndef VERBOSE 27 | #define VERBOSE(arg) if (trace_flag) trace_fmt arg 28 | #endif 29 | 30 | #endif /* !TRACE */ 31 | 32 | G_END_DECLS 33 | 34 | #endif /* NP2_X_TRACE_H__ */ 35 | -------------------------------------------------------------------------------- /diskimage/fd/fdd_nfd.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | BRESULT fdd_set_nfd(FDDFILE fdd, FDDFUNC fdd_fn, const OEMCHAR *fname, int ro); 7 | 8 | BRESULT fdd_seeksector_nfd(FDDFILE fdd); // 追加(kaiE) 9 | BRESULT fdd_read_nfd(FDDFILE fdd); 10 | BRESULT fdd_write_nfd(FDDFILE fdd); 11 | BRESULT fdd_readid_nfd(FDDFILE fdd); 12 | BRESULT fdd_formatinit_nfd(FDDFILE fdd); /* 170107 to support format command */ 13 | 14 | BRESULT fdd_seeksector_nfd1(FDDFILE fdd); // 追加(kaiD) 15 | BRESULT fdd_read_nfd1(FDDFILE fdd); // 追加(kaiD) 16 | BRESULT fdd_write_nfd1(FDDFILE fdd); // 追加(kaiD) 17 | BRESULT fdd_readid_nfd1(FDDFILE fdd); // 追加(kaiD) 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /diskimage/img_strres.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "diskimage/img_strres.h" 3 | 4 | #ifdef SUPPORT_KAI_IMAGES 5 | 6 | const OEMCHAR str_dcp[] = OEMTEXT("dcp"); 7 | const OEMCHAR str_dcu[] = OEMTEXT("dcu"); 8 | const OEMCHAR str_nfd[] = OEMTEXT("nfd"); 9 | const OEMCHAR str_vfdd[] = OEMTEXT("fdd"); 10 | 11 | const OEMCHAR str_cue[] = OEMTEXT("cue"); // CUEシート 12 | const OEMCHAR str_ccd[] = OEMTEXT("ccd"); // CloneCDに対応してみる 13 | const OEMCHAR str_cdm[] = OEMTEXT("cdm"); // CD Manipulatorに対応してみる 14 | const OEMCHAR str_mds[] = OEMTEXT("mds"); // Media Descriptor(Alcohol 52%等)に対応してみる 15 | const OEMCHAR str_nrg[] = OEMTEXT("nrg"); // Neroに対応してみる 16 | const OEMCHAR str_iso[] = OEMTEXT("iso"); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /np2tool/PWOFF.ASM: -------------------------------------------------------------------------------- 1 | 2 | ORG 100h 3 | USE16 4 | CPU 8086 5 | 6 | %include 'np2tool.inc' 7 | 8 | START: cld 9 | push cs 10 | pop ds 11 | cli 12 | call np2_check 13 | jne short err_nonnp2 14 | call sendnp2port 15 | mov ax, 4c00h 16 | int 21h 17 | 18 | err_nonnp2: mov ah, 9 19 | mov dx, str_illegal 20 | int 21h 21 | mov ah, 9 22 | mov dx, bx 23 | int 21h 24 | mov ah, 9 25 | mov dx, str_crlf 26 | int 21h 27 | mov ax, 4c01h 28 | int 21h 29 | 30 | 31 | %include 'np2tool.x86' 32 | db 8, 'poweroff' 33 | 34 | 35 | str_illegal db 'Illegal hardware - $' 36 | str_crlf db 0dh, 0ah, '$' 37 | 38 | ends 39 | 40 | -------------------------------------------------------------------------------- /sdl/unix/compiler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file compiler.h 3 | * @brief include file for standard system include files, 4 | * or project specific include files that are used frequently, 5 | * but are changed infrequently 6 | */ 7 | 8 | #ifndef COMPILER_H 9 | #define COMPILER_H 10 | 11 | #include "compiler_base.h" 12 | 13 | #include 14 | #include 15 | 16 | #define msgbox(title, msg) 17 | 18 | #define __ASSERT(s) 19 | 20 | #define RESOURCE_US 21 | 22 | #define NP2_SIZE_VGA 23 | 24 | #define GETTICK() SDL_GetTicks() 25 | #define SDL_main main 26 | 27 | //#define CPUSTRUC_MEMWAIT 28 | 29 | #define USE_SDL_JOYSTICK 30 | 31 | #include 32 | #include 33 | 34 | #endif // COMPILER_H 35 | -------------------------------------------------------------------------------- /io/crtc.h: -------------------------------------------------------------------------------- 1 | 2 | typedef union { 3 | struct { 4 | UINT8 pl; 5 | UINT8 bl; 6 | UINT8 cl; 7 | UINT8 ssl; 8 | UINT8 sur; 9 | UINT8 sdr; 10 | } reg; 11 | UINT8 b[6]; 12 | } _CRTC, *CRTC; 13 | 14 | typedef union { 15 | UINT8 b[2]; 16 | UINT16 w; 17 | } PAIR16; 18 | 19 | typedef struct { 20 | UINT32 counter; 21 | UINT16 mode; 22 | UINT8 modereg; 23 | UINT8 padding; 24 | PAIR16 tile[4]; 25 | UINT32 gdcwithgrcg; 26 | UINT8 chip; 27 | } _GRCG, *GRCG; 28 | 29 | 30 | #ifdef __cplusplus 31 | extern "C" { 32 | #endif 33 | 34 | void crtc_reset(const NP2CFG *pConfig); 35 | void crtc_bind(void); 36 | 37 | void crtc_biosreset(void); 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | 43 | -------------------------------------------------------------------------------- /sdl/trace.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #if defined(WIN32) && defined(OSLANG_EUC) 4 | #include 5 | #endif 6 | 7 | #ifdef TRACE 8 | void trace_init(void) { 9 | } 10 | 11 | void trace_term(void) { 12 | } 13 | 14 | void trace_fmt(const char *fmt, ...) { 15 | 16 | va_list ap; 17 | char buf[1024]; 18 | #if defined(WIN32) && defined(OSLANG_EUC) 19 | char sjis[1024]; 20 | #endif 21 | 22 | va_start(ap, fmt); 23 | vsprintf(buf, fmt, ap); 24 | va_end(ap); 25 | #if defined(WIN32) && defined(OSLANG_EUC) 26 | codecnv_euctosjis(sjis, NELEMENTS(sjis), buf, (UINT)-1); 27 | printf("%s\n", sjis); 28 | #else 29 | printf("%s\n", buf); 30 | #endif 31 | } 32 | #endif 33 | 34 | -------------------------------------------------------------------------------- /windows/misc/extrom.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file extrom.h 3 | * @brief EXTROM リソース クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | /** 9 | * @brief EXTROM リソース クラス 10 | */ 11 | class CExtRom 12 | { 13 | public: 14 | CExtRom(); 15 | ~CExtRom(); 16 | bool Open(LPCTSTR lpFilename); 17 | bool Open(LPCTSTR lpFilename, DWORD extlen); 18 | bool Open(LPCTSTR lpFilename, LPCTSTR lpExt); 19 | void Close(); 20 | UINT Read(LPVOID lpBuffer, UINT cbBuffer); 21 | LONG Seek(LONG lDistanceToMove, DWORD dwMoveMethod); 22 | 23 | private: 24 | HGLOBAL m_hGlobal; //!< ハンドル 25 | LPVOID m_lpRes; //!< リソース 26 | UINT m_nSize; //!< サイズ 27 | UINT m_nPointer; //!< ポインタ 28 | UINT m_isfile; //!< 外部ファイルかどうか 29 | }; 30 | -------------------------------------------------------------------------------- /cbus/scsiio.h: -------------------------------------------------------------------------------- 1 | 2 | #if defined(SUPPORT_SCSI) 3 | 4 | typedef struct { 5 | UINT port; 6 | UINT phase; 7 | UINT8 reg[0x30]; 8 | UINT8 auxstatus; 9 | UINT8 scsistatus; 10 | UINT8 membank; 11 | UINT8 memwnd; 12 | UINT8 resent; 13 | UINT8 datmap; 14 | UINT cmdpos; 15 | UINT wrdatpos; 16 | UINT rddatpos; 17 | UINT8 cmd[12]; 18 | UINT8 data[0x10000]; 19 | UINT8 bios[2][0x2000]; 20 | } _SCSIIO, *SCSIIO; 21 | 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | extern _SCSIIO scsiio; 28 | 29 | void scsiioint(NEVENTITEM item); 30 | 31 | void scsiio_reset(const NP2CFG *pConfig); 32 | void scsiio_bind(void); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | 40 | -------------------------------------------------------------------------------- /sdl/windows/compiler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file compiler.h 3 | * @brief include file for standard system include files, 4 | * or project specific include files that are used frequently, 5 | * but are changed infrequently 6 | */ 7 | 8 | #ifndef COMPILER_H 9 | #define COMPILER_H 10 | 11 | #include "compiler_base.h" 12 | 13 | #include 14 | 15 | #define msgbox(title, msg) 16 | 17 | #define __ASSERT(s) 18 | 19 | #define SUPPORT_SJIS 20 | #define RESOURCE_US 21 | 22 | #define NP2_SIZE_VGA 23 | 24 | #define GETTICK() SDL_GetTicks() 25 | #define SDL_main main 26 | 27 | //#define CPUSTRUC_MEMWAIT 28 | 29 | #define USE_SDL_JOYSTICK 30 | 31 | #include 32 | #include 33 | 34 | #endif // COMPILER_H 35 | 36 | -------------------------------------------------------------------------------- /sound/rhythm.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file rhythm.h 3 | * @brief Interface of the OPNA rhythm 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | 10 | typedef struct { 11 | PMIXHDR hdr; 12 | PMIXTRK trk[6]; 13 | UINT vol; 14 | UINT8 trkvol[8]; 15 | } _RHYTHM, *RHYTHM; 16 | 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | void rhythm_initialize(UINT rate); 23 | void rhythm_deinitialize(void); 24 | UINT rhythm_getcaps(void); 25 | void rhythm_setvol(UINT vol); 26 | 27 | void rhythm_reset(RHYTHM rhy); 28 | void rhythm_bind(RHYTHM rhy); 29 | void rhythm_update(RHYTHM rhy); 30 | void rhythm_setreg(RHYTHM rhy, UINT reg, REG8 val); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | -------------------------------------------------------------------------------- /sdl/inputmng.h: -------------------------------------------------------------------------------- 1 | 2 | enum { 3 | LBUTTON_BIT = (1 << 0), 4 | RBUTTON_BIT = (1 << 1), 5 | LBUTTON_DOWNBIT = (1 << 2), 6 | RBUTTON_DOWNBIT = (1 << 3), 7 | LBUTTON_UPBIT = (1 << 4), 8 | RBUTTON_UPBIT = (1 << 5), 9 | MOUSE_MOVEBIT = (1 << 6), 10 | 11 | KEY_ENTER = 0x01, 12 | KEY_MENU = 0x02, 13 | KEY_SKIP = 0x04, 14 | KEY_EXT = 0x08, 15 | NP2_KEY_UP = 0x10, 16 | NP2_KEY_DOWN = 0x20, 17 | NP2_KEY_LEFT = 0x40, 18 | NP2_KEY_RIGHT = 0x80 19 | }; 20 | 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | void inputmng_init(void); 27 | void inputmng_keybind(short key, UINT bit); 28 | UINT inputmng_getkey(short key); 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | 34 | -------------------------------------------------------------------------------- /sdl/opendingux/compiler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file compiler.h 3 | * @brief include file for standard system include files, 4 | * or project specific include files that are used frequently, 5 | * but are changed infrequently 6 | */ 7 | 8 | #ifndef COMPILER_H 9 | #define COMPILER_H 10 | 11 | #include "compiler_base.h" 12 | 13 | #include 14 | #include 15 | 16 | #define msgbox(title, msg) 17 | 18 | #define __ASSERT(s) 19 | 20 | #define RESOURCE_US 21 | 22 | #define NP2_SIZE_VGA 23 | 24 | #define GETTICK() SDL_GetTicks() 25 | #define SDL_main main 26 | 27 | //#define CPUSTRUC_MEMWAIT 28 | 29 | #define USE_SDL_JOYSTICK 30 | 31 | #include 32 | #include 33 | 34 | #endif // COMPILER_H 35 | 36 | -------------------------------------------------------------------------------- /cbus/gpibio.h: -------------------------------------------------------------------------------- 1 | 2 | #if defined(SUPPORT_GPIB) 3 | 4 | enum { 5 | GPIB_MODE_MASTER = 1, 6 | GPIB_MODE_SLAVE = 0, 7 | }; 8 | 9 | typedef struct { 10 | UINT8 enable; 11 | UINT8 irq; // 割り込み 12 | UINT8 mode; // マスタ=1, スレーブ=0 13 | UINT8 gpibaddr; // GP-IBアドレス(0x0〜0x1F) 14 | UINT8 ifcflag; // IFC# 1=アクティブ, 0=非アクティブ 15 | 16 | UINT16 exiobase; 17 | } _GPIB, *GPIB; 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | extern _GPIB gpib; 24 | 25 | void gpibint(NEVENTITEM item); 26 | 27 | void gpibio_initialize(void); 28 | void gpibio_shutdown(void); 29 | 30 | void gpibio_reset(const NP2CFG *pConfig); 31 | void gpibio_bind(void); 32 | 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | 37 | #endif 38 | 39 | -------------------------------------------------------------------------------- /x/ext/externalopl3.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file externalopl3.h 3 | * @brief 外部 OPL3 演奏クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "externalchip.h" 9 | 10 | /** 11 | * @brief 外部 OPL3 演奏クラス 12 | */ 13 | class CExternalOpl3 : public IExternalChip 14 | { 15 | public: 16 | CExternalOpl3(IExternalChip* pChip); 17 | virtual ~CExternalOpl3(); 18 | virtual ChipType GetChipType(); 19 | virtual void Reset(); 20 | virtual void WriteRegister(UINT nAddr, UINT8 cData); 21 | virtual INTPTR Message(UINT nMessage, INTPTR nParameter); 22 | 23 | protected: 24 | IExternalChip* m_pChip; /*!< チップ*/ 25 | UINT8 m_cKon[2][16]; /*!< KON テーブル */ 26 | 27 | void Mute(bool bMute); 28 | void WriteRegisterInner(UINT nAddr, UINT8 cData) const; 29 | }; 30 | -------------------------------------------------------------------------------- /x/ext/externalpsg.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file externalpsg.h 3 | * @brief 外部 PSG 演奏クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "externalchip.h" 9 | 10 | /** 11 | * @brief 外部 PSG 演奏クラス 12 | */ 13 | class CExternalPsg : public IExternalChip 14 | { 15 | public: 16 | CExternalPsg(IExternalChip* pChip); 17 | virtual ~CExternalPsg(); 18 | virtual ChipType GetChipType(); 19 | virtual void Reset(); 20 | virtual void WriteRegister(UINT nAddr, UINT8 cData); 21 | virtual INTPTR Message(UINT nMessage, INTPTR nParameter); 22 | 23 | protected: 24 | IExternalChip* m_pChip; //!< チップ 25 | UINT8 m_cPsgMix; //!< PSG ミキサー 26 | 27 | virtual void Mute(bool bMute) const; 28 | void WriteRegisterInner(UINT nAddr, UINT8 cData) const; 29 | }; 30 | -------------------------------------------------------------------------------- /windows/resources/np21kai.mnf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | Neko Project 21 kai 10 | 11 | 12 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /windows/resources/np2kai.mnf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | Neko Project II kai 10 | 11 | 12 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /cmake/CrossOpenDinguxRG350.cmake: -------------------------------------------------------------------------------- 1 | # OpenDingux 2 | set(OPENDINGUX TRUE) 3 | 4 | # cross compiler settings 5 | set(CMAKE_CROSSCOMPILING TRUE) 6 | set(CROSS_COMPILE "/opt/rg350-toolchain/usr/bin/mipsel-linux-") 7 | set(CMAKE_C_COMPILER ${CROSS_COMPILE}gcc) 8 | set(CMAKE_CXX_COMPILER ${CROSS_COMPILE}g++) 9 | set(CMAKE_LINKER ${CROSS_COMPILE}gcc) 10 | 11 | # root path settings 12 | set(CMAKE_FIND_ROOT_PATH "/opt/rg350-toolchain/usr") 13 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # use host system root for program 14 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) # use CMAKE_FIND_ROOT_PATH for library 15 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) # use CMAKE_FIND_ROOT_PATH for include 16 | 17 | set(ENV{RPATH} $ENV{RPATH} "/opt/rg350-toolchain/usr/lib") 18 | 19 | -------------------------------------------------------------------------------- /sdl/em/compiler.h: -------------------------------------------------------------------------------- 1 | #ifndef COMPILER_H 2 | #define COMPILER_H 3 | 4 | #include "compiler_base.h" 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include 17 | 18 | #ifdef EMSCRIPTEN 19 | #include 20 | #endif 21 | 22 | #define msgbox(title, msg) 23 | 24 | #define GETTICK() SDL_GetTicks() 25 | #define __ASSERT(s) 26 | #define SPRINTF sprintf 27 | #define STRLEN strlen 28 | #define SDL_main main 29 | 30 | #include "common/milstr.h" 31 | #include "trace.h" 32 | 33 | #define EMSCRIPTEN_DIR "/emulator/np2kai/" 34 | 35 | #endif // COMPILER_H 36 | 37 | -------------------------------------------------------------------------------- /io/fdd320.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | 6 | // こっちで処理するか シリンダ倍移動で誤魔化すか悩ましいところ 7 | 8 | UINT8 fdd320_stat; 9 | 10 | 11 | static REG8 IOINPCALL fdd320_i51(UINT port) { 12 | 13 | (void)port; 14 | return(0x00); 15 | } 16 | 17 | static REG8 IOINPCALL fdd320_i55(UINT port) { 18 | 19 | fdd320_stat ^= 0xff; 20 | (void)port; 21 | return(fdd320_stat); 22 | } 23 | 24 | 25 | // ---- 26 | 27 | static const IOINP fdd320i51[4] = { 28 | fdd320_i51, NULL, fdd320_i55, NULL}; 29 | 30 | void fdd320_reset(const NP2CFG *pConfig) { 31 | 32 | fdd320_stat = 0xff; 33 | } 34 | 35 | void fdd320_bind(void) { 36 | 37 | iocore_attachcmninpex(0x0051, 0x00f9, fdd320i51, 4); 38 | } 39 | 40 | -------------------------------------------------------------------------------- /windows/resources/np21kaix64.mnf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | Neko Project 21 kai x64 10 | 11 | 12 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /windows/resources/np2kaix64.mnf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | Neko Project II kai x64 10 | 11 | 12 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /generic/softkbd.h: -------------------------------------------------------------------------------- 1 | 2 | #if defined(SUPPORT_SOFTKBD) 3 | 4 | #include 5 | 6 | enum { 7 | LEDFLAG_NUM = 0x01, 8 | LEDFLAG_CAPS = 0x04, 9 | LEDFLAG_KANA = 0x08 10 | }; 11 | 12 | enum { 13 | SOFTKEY_FLAGDRAW = 0x01, 14 | SOFTKEY_FLAGREDRAW = 0x02 15 | }; 16 | 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | void softkbd_initialize(void); 23 | void softkbd_deinitialize(void); 24 | BRESULT softkbd_getsize(int *width, int *height); 25 | REG8 softkbd_process(void); 26 | BOOL softkbd_paint(CMNVRAM *vram, CMNPALCNV cnv, BOOL redraw); 27 | BOOL softkbd_down(int x, int y); 28 | void softkbd_up(void); 29 | void softkbd_led(REG8 led); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif 36 | 37 | -------------------------------------------------------------------------------- /sdl/windows/main.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file main.c 3 | * @brief メイン 4 | */ 5 | 6 | #include 7 | #include 8 | #include "..\fontmng.h" 9 | 10 | #pragma comment(lib, "SDL2.lib") 11 | #pragma comment(lib, "SDL2main.lib") 12 | 13 | #if !defined(RESOURCE_US) 14 | #pragma comment(lib, "SDL2_ttf.lib") 15 | #endif 16 | 17 | /** 18 | * メイン 19 | * @param[in] argc 引数 20 | * @param[in] argv 引数 21 | * @return リザルト コード 22 | */ 23 | int main(int argc, char *argv[]) 24 | { 25 | UINT nLength; 26 | TCHAR szFont[MAX_PATH]; 27 | 28 | nLength = GetWindowsDirectory(szFont, SDL_arraysize(szFont)); 29 | lstrcpy(szFont + nLength, TEXT("\\Fonts\\msgothic.ttc")); 30 | fontmng_setdeffontname(szFont); 31 | 32 | return np2_main(argc, argv); 33 | } 34 | -------------------------------------------------------------------------------- /windows/soundmng/asio/asiodriverlist.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file asiodriverlist.h 3 | * @brief ASIO ドライバ リスト クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | 10 | interface IASIO; 11 | 12 | /** 13 | * ASIO ドライバ情報 14 | */ 15 | struct AsioDriverInfo 16 | { 17 | CLSID clsid; /*!< クラス ID */ 18 | TCHAR szDllPath[MAX_PATH]; /*!< DLL パス */ 19 | TCHAR szDriverName[128]; /*!< ドライバ名 */ 20 | }; 21 | 22 | /** 23 | * @brief ASIO ドライバ リスト クラス 24 | */ 25 | class AsioDriverList : public std::vector 26 | { 27 | public: 28 | void EnumerateDrivers(); 29 | IASIO* OpenDriver(LPCTSTR lpDriverName); 30 | 31 | private: 32 | static bool FindDrvPath(LPCTSTR lpClsId, LPTSTR lpDllPath, UINT cchDllPath); 33 | }; 34 | -------------------------------------------------------------------------------- /windows/dialog/c_midi.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file c_midi.h 3 | * @brief MIDI コントロール クラス群の宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "misc\DlgProc.h" 9 | 10 | /** 11 | * @brief MIDI デバイス クラス 12 | */ 13 | class CComboMidiDevice : public CComboBoxProc 14 | { 15 | public: 16 | virtual void PreSubclassWindow(); 17 | void EnumerateMidiIn(); 18 | void EnumerateMidiOut(); 19 | void SetCurString(LPCTSTR lpDevice); 20 | }; 21 | 22 | /** 23 | * @brief MIDI モジュール クラス 24 | */ 25 | class CComboMidiModule : public CComboBoxProc 26 | { 27 | public: 28 | virtual void PreSubclassWindow(); 29 | }; 30 | 31 | /** 32 | * @brief MIMPI ファイル 33 | */ 34 | class CEditMimpiFile : public CWndProc 35 | { 36 | public: 37 | void Browse(); 38 | }; 39 | -------------------------------------------------------------------------------- /windows/dialog/np2class.h: -------------------------------------------------------------------------------- 1 | 2 | // 猫用、拡張クラス。 3 | 4 | 5 | extern const TCHAR np2dlgclass[]; 6 | 7 | void np2class_initialize(HINSTANCE hinst); 8 | void np2class_deinitialize(void); 9 | 10 | void np2class_move(HWND hWnd, int posx, int posy, int cx, int cy); 11 | int CALLBACK np2class_propetysheet(HWND hWndDlg, UINT uMsg, LPARAM lParam); 12 | 13 | 14 | // ---- class 15 | 16 | #define NP2GWLP_HMENU (0 * sizeof(LONG_PTR)) 17 | #define NP2GWLP_SIZE (1 * sizeof(LONG_PTR)) 18 | 19 | void np2class_wmcreate(HWND hWnd); 20 | void np2class_wmdestroy(HWND hWnd); 21 | void np2class_enablemenu(HWND hWnd, BOOL enable); 22 | void np2class_windowtype(HWND hWnd, UINT8 type); 23 | void np2class_frametype(HWND hWnd, UINT8 thick); 24 | HMENU np2class_gethmenu(HWND hWnd); 25 | 26 | -------------------------------------------------------------------------------- /windows/ext/externalopl3.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file externalopl3.h 3 | * @brief 外部 OPL3 演奏クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "externalchip.h" 9 | 10 | /** 11 | * @brief 外部 OPL3 演奏クラス 12 | */ 13 | class CExternalOpl3 : public IExternalChip 14 | { 15 | public: 16 | CExternalOpl3(IExternalChip* pChip); 17 | virtual ~CExternalOpl3(); 18 | virtual ChipType GetChipType(); 19 | virtual void Reset(); 20 | virtual void WriteRegister(UINT nAddr, UINT8 cData); 21 | virtual INTPTR Message(UINT nMessage, INTPTR nParameter); 22 | 23 | protected: 24 | IExternalChip* m_pChip; /*!< チップ*/ 25 | UINT8 m_cKon[2][16]; /*!< KON テーブル */ 26 | 27 | void Mute(bool bMute); 28 | void WriteRegisterInner(UINT nAddr, UINT8 cData) const; 29 | }; 30 | -------------------------------------------------------------------------------- /windows/ext/externalpsg.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file externalpsg.h 3 | * @brief 外部 PSG 演奏クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "externalchip.h" 9 | 10 | /** 11 | * @brief 外部 PSG 演奏クラス 12 | */ 13 | class CExternalPsg : public IExternalChip 14 | { 15 | public: 16 | CExternalPsg(IExternalChip* pChip); 17 | virtual ~CExternalPsg(); 18 | virtual ChipType GetChipType(); 19 | virtual void Reset(); 20 | virtual void WriteRegister(UINT nAddr, UINT8 cData); 21 | virtual INTPTR Message(UINT nMessage, INTPTR nParameter); 22 | 23 | protected: 24 | IExternalChip* m_pChip; //!< チップ 25 | UINT8 m_cPsgMix; //!< PSG ミキサー 26 | 27 | virtual void Mute(bool bMute) const; 28 | void WriteRegisterInner(UINT nAddr, UINT8 cData) const; 29 | }; 30 | -------------------------------------------------------------------------------- /windows/ini.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file ini.h 3 | * @brief 設定ファイル アクセスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #include 7 | 8 | /** 9 | * 追加設定 10 | */ 11 | enum 12 | { 13 | PFTYPE_ARGS16 = PFTYPE_USER, /*!< 16ビット配列 */ 14 | PFTYPE_ARGU32, /*!< 32ビット配列 */ 15 | PFTYPE_BYTE3, /*!< 3バイト */ 16 | PFTYPE_KB, /*!< キーボード設定 */ 17 | }; 18 | 19 | #ifdef __cplusplus 20 | extern "C" 21 | { 22 | #endif 23 | 24 | void ini_read(LPCTSTR lpPath, LPCTSTR lpTitle, const PFTBL* lpTable, UINT nCount); 25 | void ini_write(LPCTSTR lpPath, LPCTSTR lpTitle, const PFTBL* lpTable, UINT nCount); 26 | 27 | void initgetfile(LPTSTR lpPath, UINT cchPath); 28 | void initload(void); 29 | void initsave(void); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | -------------------------------------------------------------------------------- /x/misc/tty.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file tty.h 3 | * @brief シリアル通信クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | 10 | /** 11 | * @brief シリアル通信 12 | */ 13 | class CTty 14 | { 15 | public: 16 | CTty(); 17 | ~CTty(); 18 | bool Open(const char* dev, unsigned int speed = 0, const char* param = NULL); 19 | void Close(); 20 | ssize_t Read(void* data_ptr, ssize_t data_size); 21 | ssize_t Write(const void* data_ptr, ssize_t data_size); 22 | bool IsOpened() const; 23 | 24 | private: 25 | int m_fd; //!< ファイル ディスクリプタ 26 | static bool SetParam(const char* param, tcflag_t* cflag_ptr); 27 | }; 28 | 29 | /** 30 | * オープン済? 31 | * @retval true オープン済 32 | * @retval false 未オープン 33 | */ 34 | inline bool CTty::IsOpened() const 35 | { 36 | return (m_fd >= 0); 37 | } 38 | -------------------------------------------------------------------------------- /sdl/cmmidi.h: -------------------------------------------------------------------------------- 1 | #ifndef NP2_X_CMMIDI_H__ 2 | #define NP2_X_CMMIDI_H__ 3 | 4 | // ---- com manager midi for unix 5 | 6 | extern COMMNG cm_mpu98; 7 | 8 | enum { 9 | MIDI_MT32 = 0, 10 | MIDI_CM32L, 11 | MIDI_CM64, 12 | MIDI_CM300, 13 | MIDI_CM500LA, 14 | MIDI_CM500GS, 15 | MIDI_SC55, 16 | MIDI_SC88, 17 | MIDI_LA, 18 | MIDI_GM, 19 | MIDI_GS, 20 | MIDI_XG, 21 | MIDI_OTHER 22 | }; 23 | 24 | #if defined(VERMOUTH_LIB) 25 | extern const char cmmidi_vermouth[]; 26 | #endif 27 | extern const char cmmidi_midiout_device[]; 28 | extern const char cmmidi_midiin_device[]; 29 | 30 | extern const char *cmmidi_mdlname[]; 31 | 32 | void cmmidi_initailize(void); 33 | COMMNG cmmidi_create(const UINT device, const char *midiout, const char *midiin, const char *module); 34 | 35 | #endif /* NP2_X_CMMIDI_H__ */ 36 | -------------------------------------------------------------------------------- /windows/commng/vsthost/vstbuffer.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file vstbuffer.h 3 | * @brief VST バッファ クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | /** 9 | * @brief VST バッファ クラス 10 | */ 11 | class CVstBuffer 12 | { 13 | public: 14 | CVstBuffer(); 15 | CVstBuffer(UINT nChannels, UINT nSamples); 16 | ~CVstBuffer(); 17 | void Alloc(UINT nChannels, UINT nSamples); 18 | void Delloc(); 19 | void ZeroFill(); 20 | float** GetBuffer(); 21 | void GetShort(short* lpBuffer) const; 22 | 23 | private: 24 | UINT m_nChannels; /*!< チャンネル数 */ 25 | UINT m_nSamples; /*!< サンプル数 */ 26 | float** m_pBuffers; /*!< バッファ */ 27 | }; 28 | 29 | /** 30 | * バッファを得る 31 | * @return バッファ 32 | */ 33 | inline float** CVstBuffer::GetBuffer() 34 | { 35 | return m_pBuffers; 36 | } 37 | -------------------------------------------------------------------------------- /romimage/BIOS/VECT02.X86: -------------------------------------------------------------------------------- 1 | 2 | perrbase db 'PARITY ERROR - BASE MEMORY', 0 3 | perrext db 'PARITY ERROR - EXTENDED MEMORY', 0 4 | 5 | vect02: push ax 6 | in al, 0x42 7 | test al, 0x06 8 | jne short .hlt 9 | pop ax 10 | iret 11 | .hlt: mov si, perrbase 12 | test al, 0x04 13 | jne short .disp 14 | mov si, perrext 15 | .disp: mov ax, 0xa000 16 | mov es, ax 17 | xor di, di 18 | cld 19 | in al, 0x31 20 | and ax, byte 0x04 21 | shr ax, 1 22 | inc ax 23 | mov dx, ax 24 | 25 | .loop: db FIXCS 26 | lodsb 27 | test al, -1 28 | je short .looped 29 | mov byte [es:di + 0x2000], 0x43 30 | stosb 31 | add di, dx 32 | jmp short .loop 33 | .looped: cli 34 | hlt 35 | 36 | -------------------------------------------------------------------------------- /fdd/fdd_mtr.h: -------------------------------------------------------------------------------- 1 | 2 | typedef struct { 3 | int busy; 4 | UINT8 head[4]; 5 | UINT nextevent; 6 | UINT8 curevent; 7 | } _FDDMTR, *FDDMTR; 8 | 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | extern _FDDMTR fddmtr; 15 | 16 | void fdbiosout(NEVENTITEM item); 17 | 18 | void fddmtr_initialize(void); 19 | void fddmtr_callback(UINT time); 20 | void fddmtr_seek(REG8 drv, REG8 c, UINT size); 21 | void fddmtr_reset(void); 22 | 23 | 24 | #if defined(SUPPORT_SWSEEKSND) 25 | void fddmtrsnd_initialize(UINT rate); 26 | void fddmtrsnd_bind(void); 27 | void fddmtrsnd_deinitialize(void); 28 | #else 29 | #define fddmtrsnd_initialize(r) 30 | #define fddmtrsnd_bind() 31 | #define fddmtrsnd_deinitialize() 32 | #endif 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | -------------------------------------------------------------------------------- /io/nmiio.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | 6 | // ---- I/O 7 | 8 | static void IOOUTCALL nmiio_o50(UINT port, REG8 dat) { 9 | 10 | nmiio.enable = 0; 11 | (void)port; 12 | (void)dat; 13 | } 14 | 15 | static void IOOUTCALL nmiio_o52(UINT port, REG8 dat) { 16 | 17 | nmiio.enable = 1; 18 | (void)port; 19 | (void)dat; 20 | } 21 | 22 | 23 | // ---- I/F 24 | 25 | static const IOOUT nmiioo50[2] = { 26 | nmiio_o50, nmiio_o52}; 27 | 28 | void nmiio_reset(const NP2CFG *pConfig) { 29 | 30 | ZeroMemory(&nmiio, sizeof(nmiio)); 31 | 32 | (void)pConfig; 33 | } 34 | 35 | void nmiio_bind(void) { 36 | 37 | iocore_attachsysoutex(0x0050, 0x0cf1, nmiioo50, 2); 38 | // iocore_attachinp(0x98f0, nmiio_i98f0); 39 | } 40 | 41 | -------------------------------------------------------------------------------- /sdl/libretro/compiler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file compiler.h 3 | * @brief include file for standard system include files, 4 | * or project specific include files that are used frequently, 5 | * but are changed infrequently 6 | */ 7 | 8 | #ifndef COMPILER_H 9 | #define COMPILER_H 10 | 11 | #include "features/features_cpu.h" 12 | #include "compiler_base.h" 13 | 14 | #include "sdlremap/sdl.h" 15 | #include "sdlremap/sdl_keycode.h" 16 | 17 | #define msgbox(title, msg) 18 | 19 | #define __ASSERT(s) 20 | 21 | #define RESOURCE_US 22 | 23 | #define NP2_SIZE_VGA 24 | 25 | #define GETTICK() (cpu_features_get_time_usec() / 1000) // millisecond timer 26 | 27 | //#include "retro_inline.h" 28 | #include 29 | #include 30 | 31 | #endif // COMPILER_H 32 | 33 | -------------------------------------------------------------------------------- /vram/sdraw.h: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | typedef struct { 6 | const UINT8 *src; 7 | const UINT8 *src2; 8 | UINT8 *dst; 9 | int width; 10 | int xbytes; 11 | int y; 12 | int xalign; 13 | int yalign; 14 | UINT8 dirty[SURFACE_HEIGHT]; 15 | } _SDRAW, *SDRAW; 16 | 17 | typedef void (SCRNCALL * SDRAWFN)(SDRAW sdraw, int maxy); 18 | 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | #if defined(SUPPORT_VIDEOFILTER) 25 | extern BOOL bVFEnable; 26 | extern BOOL bVFImport; 27 | #endif 28 | 29 | const SDRAWFN *sdraw_getproctbl(const SCRNSURF *surf); 30 | 31 | #if defined(SUPPORT_PC9821) 32 | const SDRAWFN *sdraw_getproctblex(const SCRNSURF *surf); 33 | #endif 34 | 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | 39 | -------------------------------------------------------------------------------- /bios/sxsibios.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sxsibios.h 3 | * @brief Interface of SxSI BIOS 4 | */ 5 | 6 | #pragma once 7 | 8 | enum { 9 | SXSIBIOS_SASI = 0, 10 | SXSIBIOS_IDE = 1, 11 | SXSIBIOS_SCSI = 2 12 | }; 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | REG8 sasibios_operate(void); 19 | 20 | #if defined(SUPPORT_SCSI) 21 | REG8 scsibios_operate(void); 22 | #endif 23 | 24 | #if defined(SUPPORT_IDEIO) || defined(SUPPORT_SASI) 25 | void np2sysp_sasi(const void *arg1, long arg2); 26 | #endif 27 | 28 | #if defined(SUPPORT_SCSI) 29 | void np2sysp_scsi(const void *arg1, long arg2); 30 | void np2sysp_scsidev(const void *arg1, long arg2); 31 | #endif 32 | 33 | void np2sysp_scsidev(const void *arg1, long arg2); 34 | 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | -------------------------------------------------------------------------------- /sdl/libretro/libretro_params.h: -------------------------------------------------------------------------------- 1 | #ifndef LRPARAMS_ 2 | #define LRPARAMS_ 3 | 4 | #include 5 | 6 | #define LR_SCREENWIDTH 1640 7 | #define LR_SCREENHEIGHT 1024 8 | #define LR_SCREENASPECT 4.0 / 3.0 9 | #define LR_SCREENFPS 56.4 10 | 11 | #define LR_SOUNDRATE 44100.0 12 | //#define SNDSZ 735 //44100Hz/60fps=735 (sample/flame) 13 | #define SNDSZ 782 //44100Hz/56.4fps=781.9 (sample/flame) 14 | 15 | #define LR_CORENAME "Neko Project II kai" 16 | #define LR_LIBVERSION NP2KAI_GIT_TAG " " NP2KAI_GIT_HASH 17 | #define LR_VALIDFILEEXT "d88|88d|d98|98d|fdi|xdf|hdm|dup|2hd|tfd|nfd|hd4|hd5|hd9|fdd|h01|hdb|ddb|dd6|dcp|dcu|flp|img|ima|bin|fim|thd|nhd|hdi|vhd|slh|hdn|cmd" 18 | #define LR_NEEDFILEPATH true 19 | #define LR_BLOCKARCEXTRACT false 20 | #define LR_REQUIRESROM false 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /fdd/diskdrv.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file diskdrv.h 3 | * @brief Interface of the disk-drive 4 | */ 5 | 6 | #pragma once 7 | 8 | #ifdef __cplusplus 9 | extern "C" 10 | { 11 | #endif 12 | 13 | void diskdrv_setsxsi(REG8 drv, const OEMCHAR *fname); 14 | const OEMCHAR *diskdrv_getsxsi(REG8 drv); 15 | void diskdrv_hddbind(void); 16 | 17 | void diskdrv_readyfddex(REG8 drv, const OEMCHAR *fname, UINT ftype, int readonly); 18 | void diskdrv_setfddex(REG8 drv, const OEMCHAR *fname, UINT ftype, int readonly); 19 | void diskdrv_callback(void); 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | 25 | 26 | /* macro */ 27 | #define diskdrv_readyfdd(d, f, r) diskdrv_readyfddex(d, f, FTYPE_NONE, r) /*!< set disk (force) */ 28 | #define diskdrv_setfdd(d, f, r) diskdrv_setfddex(d, f, FTYPE_NONE, r) /*!< set disk */ 29 | -------------------------------------------------------------------------------- /sdl/libretro/libretro-common/crt/string.c: -------------------------------------------------------------------------------- 1 | #ifdef _MSC_VER 2 | #include 3 | #endif 4 | #include 5 | #include 6 | 7 | void *memset(void *dst, int val, size_t count) 8 | { 9 | void *start = dst; 10 | 11 | #if defined(_M_IA64) || defined (_M_AMD64) || defined(_M_ALPHA) || defined (_M_PPC) 12 | extern void RtlFillMemory(void *, size_t count, char); 13 | 14 | RtlFillMemory(dst, count, (char)val); 15 | #else 16 | while (count--) 17 | { 18 | *(char*)dst = (char)val; 19 | dst = (char*)dst + 1; 20 | } 21 | #endif 22 | 23 | return start; 24 | } 25 | 26 | void *memcpy(void *dst, const void *src, size_t len) 27 | { 28 | size_t i; 29 | 30 | for (i = 0; i < len; i++) 31 | ((unsigned char *)dst)[i] = ((unsigned char *)src)[i]; 32 | 33 | return dst; 34 | } 35 | -------------------------------------------------------------------------------- /romimage/ITF.MK: -------------------------------------------------------------------------------- 1 | AS = masm 2 | AOPT = /ML /DNP2 3 | OBJ = ..\obj\romrel 4 | 5 | ..\bios\itfrom.res: $(OBJ) $(OBJ)\itf.bin 6 | bin2txt $(OBJ)\itf.bin itfrom > ..\bios\itfrom.res 7 | 8 | $(OBJ): 9 | if not exist $(OBJ) mkdir $(OBJ) 10 | 11 | $(OBJ)\itf.bin: $(OBJ)\itf.exe 12 | exe2bin $(OBJ)\itf $(OBJ)\itf.bin 13 | 14 | $(OBJ)\itf.exe: $(OBJ)\itf.obj 15 | link $(OBJ)\itf,$(OBJ)\itf; 16 | 17 | $(OBJ)\itf.obj: itf.asm itf.inc dataseg.inc process.mac debug.mac \ 18 | resource.x86 itfsub.x86 \ 19 | keyboard.inc keyboard.x86 textdisp.x86 \ 20 | np2.x86 dipsw.x86 memsw.x86 \ 21 | beep.x86 firmware.x86 memchk.x86 \ 22 | ssp.x86 ssp_res.x86 ssp_sub.x86 ssp_dip.x86 ssp_msw.x86 23 | $(AS) $(AOPT) $(*B),$*,$*; 24 | 25 | resource.x86: resource.txt 26 | txtpack resource.txt > resource.x86 27 | -------------------------------------------------------------------------------- /windows/fontmng.h: -------------------------------------------------------------------------------- 1 | 2 | enum { 3 | FDAT_BOLD = 0x01, 4 | FDAT_PROPORTIONAL = 0x02, 5 | FDAT_ALIAS = 0x04, 6 | FDAT_ANSI = 0x08, 7 | FDAT_SHIFTJIS = 0x10 8 | }; 9 | 10 | enum { 11 | FDAT_DEPTH = 64, 12 | FDAT_DEPTHBIT = 6 13 | }; 14 | 15 | typedef struct { 16 | int width; 17 | int height; 18 | int pitch; 19 | } _FNTDAT, *FNTDAT; 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | void *fontmng_create(int size, UINT type, const OEMCHAR *fontface); 26 | void fontmng_destroy(void *hdl); 27 | 28 | BRESULT fontmng_getsize(void *hdl, const OEMCHAR *string, POINT_T *pt); 29 | BRESULT fontmng_getdrawsize(void *hdl, const OEMCHAR *string, POINT_T *pt); 30 | FNTDAT fontmng_get(void *hdl, const OEMCHAR *string); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | -------------------------------------------------------------------------------- /io/upd4990.h: -------------------------------------------------------------------------------- 1 | #ifndef NP2_UPD4990_H 2 | #define NP2_UPD4990_H 3 | 4 | #define UPD4990_REGLEN 8 5 | 6 | typedef struct { 7 | UINT8 last; 8 | UINT8 cmd; 9 | UINT8 serial; 10 | UINT8 parallel; 11 | UINT8 reg[UPD4990_REGLEN]; 12 | UINT pos; 13 | UINT8 cdat; 14 | UINT8 regsft; 15 | } _UPD4990, *UPD4990; 16 | 17 | typedef struct { 18 | UINT32 hrtimerdiv; 19 | UINT32 hrtimerclock; 20 | UINT32 hrtimerclock32; 21 | 22 | UINT32 clockcounter; 23 | UINT32 clockcounter32; 24 | } _UPD4990HRT, *UPD4990HRT; 25 | 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | #if defined(SUPPORT_HRTIMER) 32 | void upd4990_hrtimer_count(void); 33 | #endif 34 | 35 | void uPD4990_reset(const NP2CFG *pConfig); 36 | void uPD4990_bind(void); 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | 42 | #endif /* NP2_UPD4990_H */ 43 | 44 | -------------------------------------------------------------------------------- /vram/scrndraw.h: -------------------------------------------------------------------------------- 1 | #ifndef NP2_SCRNDRAW_H 2 | #define NP2_SCRNDRAW_H 3 | 4 | #ifndef SCRNCALL 5 | #define SCRNCALL 6 | #endif 7 | 8 | enum { 9 | SURFACE_WIDTH = 640, 10 | SURFACE_HEIGHT = 480, 11 | SURFACE_SIZE = (SURFACE_WIDTH * SURFACE_HEIGHT), 12 | 13 | START_PALORG = 0x0a, 14 | START_PAL = 0x10 15 | }; 16 | 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | extern UINT8 renewal_line[SURFACE_HEIGHT]; 23 | extern UINT8 np2_tram[SURFACE_SIZE]; 24 | extern UINT8 np2_vram[2][SURFACE_SIZE]; 25 | 26 | void scrndraw_initialize(void); 27 | void scrndraw_changepalette(void); 28 | UINT8 scrndraw_draw(UINT8 update); 29 | void scrndraw_redraw(void); 30 | void scrndraw_updateallline(void); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif /* NP2_SCRNDRAW_H */ 37 | 38 | -------------------------------------------------------------------------------- /embed/menubase/menures.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | 6 | extern const OEMCHAR mstr_fontcheck[]; 7 | extern const OEMCHAR mstr_ok[]; 8 | extern const OEMCHAR mstr_cancel[]; 9 | extern const OEMCHAR mstr_abort[]; 10 | extern const OEMCHAR mstr_retry[]; 11 | extern const OEMCHAR mstr_ignore[]; 12 | extern const OEMCHAR mstr_yes[]; 13 | extern const OEMCHAR mstr_no[]; 14 | 15 | extern const MENURES2 menures_minimize; 16 | extern const MENURES2 menures_close; 17 | 18 | extern const MENURES2 menures_sys[2]; 19 | 20 | extern const MENURES2 menures_radio[3]; 21 | extern const MENURES2 menures_check; 22 | extern const MENURES2 menures_scrbtn[2]; 23 | 24 | extern const UINT8 menures_slddat[]; 25 | extern const UINT16 menures_sldpos[3][12]; 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /x/cmmidi.h: -------------------------------------------------------------------------------- 1 | #ifndef NP2_X_CMMIDI_H__ 2 | #define NP2_X_CMMIDI_H__ 3 | 4 | // ---- com manager midi for unix 5 | 6 | G_BEGIN_DECLS 7 | 8 | extern COMMNG cm_mpu98; 9 | 10 | enum { 11 | MIDI_MT32 = 0, 12 | MIDI_CM32L, 13 | MIDI_CM64, 14 | MIDI_CM300, 15 | MIDI_CM500LA, 16 | MIDI_CM500GS, 17 | MIDI_SC55, 18 | MIDI_SC88, 19 | MIDI_LA, 20 | MIDI_GM, 21 | MIDI_GS, 22 | MIDI_XG, 23 | MIDI_OTHER 24 | }; 25 | 26 | #if defined(VERMOUTH_LIB) 27 | extern const char cmmidi_vermouth[]; 28 | #endif 29 | extern const char cmmidi_midiout_device[]; 30 | extern const char cmmidi_midiin_device[]; 31 | 32 | extern const char *cmmidi_mdlname[]; 33 | 34 | void cmmidi_initailize(void); 35 | COMMNG cmmidi_create(const UINT device, const char *midiout, const char *midiin, const char *module); 36 | 37 | G_END_DECLS 38 | 39 | #endif /* NP2_X_CMMIDI_H__ */ 40 | -------------------------------------------------------------------------------- /cbus/sasiio.h: -------------------------------------------------------------------------------- 1 | 2 | #if defined(SUPPORT_SASI) 3 | 4 | typedef struct { 5 | UINT8 phase; 6 | UINT8 ocr; 7 | UINT8 stat; 8 | UINT8 error; 9 | UINT8 unit; 10 | UINT8 isrint; 11 | UINT8 cmd[6]; 12 | UINT cmdpos; 13 | UINT8 sens[4]; 14 | UINT senspos; 15 | UINT c2pos; 16 | UINT32 sector; 17 | UINT blocks; 18 | UINT datpos; 19 | UINT datsize; 20 | UINT8 dat[256]; 21 | } _SASIIO, *SASIIO; 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | extern _SASIIO sasiio; 28 | 29 | void sasiioint(NEVENTITEM item); 30 | 31 | REG8 DMACCALL sasi_dmafunc(REG8 func); 32 | REG8 DMACCALL sasi_dataread(void); 33 | void DMACCALL sasi_datawrite(REG8 data); 34 | 35 | void sasiio_reset(const NP2CFG *pConfig); 36 | void sasiio_bind(void); 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | 42 | #endif 43 | 44 | -------------------------------------------------------------------------------- /x/ext/externalopm.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file externalopm.h 3 | * @brief 外部 OPM 演奏クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "externalchip.h" 9 | 10 | /** 11 | * @brief 外部 OPM 演奏クラス 12 | */ 13 | class CExternalOpm : public IExternalChip 14 | { 15 | public: 16 | CExternalOpm(IExternalChip* pChip); 17 | virtual ~CExternalOpm(); 18 | virtual ChipType GetChipType(); 19 | virtual void Reset(); 20 | virtual void WriteRegister(UINT nAddr, UINT8 cData); 21 | virtual INTPTR Message(UINT nMessage, INTPTR nParameter); 22 | 23 | protected: 24 | IExternalChip* m_pChip; /*!< チップ */ 25 | UINT8 m_cAlgorithm[8]; /*!< アルゴリズム テーブル */ 26 | UINT8 m_cTtl[8 * 4]; /*!< TTL テーブル */ 27 | 28 | void Mute(bool bMute) const; 29 | void WriteRegisterInner(UINT nAddr, UINT8 cData) const; 30 | void SetVolume(UINT nChannel, int nVolume) const; 31 | }; 32 | -------------------------------------------------------------------------------- /common/resize.h: -------------------------------------------------------------------------------- 1 | 2 | #define RESIZE_AREAAVG 3 | #define RESIZE_FASTCOPY 4 | 5 | enum { 6 | RSZFN_8BPP = 0, 7 | RSZFN_16BPP, 8 | RSZFN_24BPP, 9 | RSZFN_32BPP, 10 | RSZFN_16BY24, 11 | RSZFN_16BY32, 12 | RSZFN_24BY16, 13 | RSZFN_32BY16, 14 | RSZFN_32BY24, 15 | RSZFNMAX 16 | }; 17 | 18 | struct _rszhdl; 19 | typedef struct _rszhdl _RSZHDL; 20 | typedef struct _rszhdl *RSZHDL; 21 | 22 | typedef void (*RSZFN)(RSZHDL hdl, UINT type, UINT8 *dst, int dalign, 23 | const UINT8 *src, int salign); 24 | 25 | struct _rszhdl { 26 | RSZFN func; 27 | int width; 28 | int height; 29 | }; 30 | 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #endif 35 | 36 | UINT resize_gettype(int dbpp, int sbpp); 37 | RSZHDL resize(int xdst, int ydst, int xsrc, int ysrc); 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | 43 | -------------------------------------------------------------------------------- /romimage/tool/ROMTOOL.MK: -------------------------------------------------------------------------------- 1 | AOPT = /MX 2 | COPT = -c -AS -W3 -Gs -Ot -Zp1 -G2 3 | LOPT = /NOI /CP:1 /ST:8192 4 | 5 | CC = cl 6 | AS = masm 7 | OBJ = ..\..\obj\romtool 8 | 9 | BTOBJ = $(OBJ)\bin2txt.obj \ 10 | $(OBJ)\dosio32.obj 11 | BTBIN = ..\bin2txt.exe 12 | 13 | TPOBJ = $(OBJ)\txtpack.obj \ 14 | $(OBJ)\dosio32.obj 15 | TPBIN = ..\txtpack.exe 16 | 17 | all: $(OBJ) $(BTBIN) $(TPBIN) 18 | 19 | $(OBJ): 20 | if not exist $(OBJ) mkdir $(OBJ) 21 | 22 | $(BTBIN): $(BTOBJ) 23 | link $(LOPT) @bin2txt.lk; 24 | 25 | $(TPBIN): $(TPOBJ) 26 | link $(LOPT) @txtpack.lk; 27 | 28 | .asm{$(OBJ)}.obj: 29 | $(AS) $(AOPT) $(*B),$*; 30 | 31 | .c{$(OBJ)}.obj: 32 | $(CC) $(COPT) -Fo$* $(*B).c 33 | 34 | $(OBJ)\bin2txt.obj : common.h dosio.h 35 | $(OBJ)\txtpack.obj : common.h dosio.h 36 | $(OBJ)\dosio32.obj : mil.inc 37 | 38 | -------------------------------------------------------------------------------- /windows/commng/vsthost/vstmidievent.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file vstmidievent.h 3 | * @brief VST MIDI クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | #include 10 | 11 | /** 12 | * @brief VST MIDI クラス 13 | */ 14 | class CVstMidiEvent 15 | { 16 | public: 17 | CVstMidiEvent(); 18 | ~CVstMidiEvent(); 19 | void Clear(); 20 | void ShortMessage(UINT nTick, UINT nMessage); 21 | void LongMessage(UINT nTick, const void* lpMessage, UINT cbMessage); 22 | const VstEvents* GetEvents(); 23 | 24 | protected: 25 | 26 | private: 27 | UINT m_nEvents; /*!< イベント数 */ 28 | std::vector m_header; /*!< ヘッダ */ 29 | std::vector m_event; /*!< イベント */ 30 | void Add(const VstEvent* pEvent, const void* lpMessage = NULL, UINT cbMessage = 0); 31 | }; 32 | -------------------------------------------------------------------------------- /generic/memdbg32.h: -------------------------------------------------------------------------------- 1 | 2 | #if defined(CPUCORE_IA32) && defined(SUPPORT_MEMDBG32) 3 | 4 | #include 5 | 6 | enum { 7 | MEMDBG32_BLOCKW = 3, 8 | MEMDBG32_BLOCKH = 6, 9 | }; 10 | 11 | enum { 12 | MEMDBG32_PALBG = 0, 13 | MEMDBG32_PALBDR, 14 | MEMDBG32_PALREAL, 15 | MEMDBG32_PALPM, 16 | MEMDBG32_PALPAGE0, 17 | MEMDBG32_PALPAGE1, 18 | MEMDBG32_PALTXT, 19 | 20 | MEMDBG32_PALS 21 | }; 22 | 23 | enum { 24 | MEMDBG32_FLAGDRAW = 0x01, 25 | MEMDBG32_FLAGREDRAW = 0x02 26 | }; 27 | 28 | 29 | #ifdef __cplusplus 30 | extern "C" { 31 | #endif 32 | 33 | void memdbg32_initialize(void); 34 | void memdbg32_getsize(int *width, int *height); 35 | REG8 memdbg32_process(void); 36 | BOOL memdbg32_paint(CMNVRAM *vram, CMNPALCNV cnv, BOOL redraw); 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | 42 | #endif 43 | 44 | -------------------------------------------------------------------------------- /romimage/BIOS/vect09.x86: -------------------------------------------------------------------------------- 1 | 2 | vect09: sti 3 | push ax 4 | push ds 5 | xor ax, ax 6 | mov ds, ax 7 | in al, 0x43 8 | test al, 0x38 9 | jne short .err 10 | .force: mov al, 0x16 11 | out 0x43, al 12 | mov byte [0x0529], 0 13 | in al, 0x41 14 | mov ah, al 15 | call bios09 16 | .eoi: pop ds 17 | cli 18 | mov al, 0x20 19 | out 0x00, al 20 | cmp ah, 0x60 21 | je short .int6 22 | cmp ah, 0x61 23 | je short .int5 24 | pop ax 25 | iret 26 | .err: cmp byte [0x0529], 3 27 | jae short .force 28 | inc byte [0x0529] 29 | mov al, 0x14 30 | out 0x43, al 31 | in al, 0x41 32 | jmp short .eoi 33 | 34 | .int5: pop ax 35 | int 0x05 36 | iret 37 | 38 | .int6: pop ax 39 | int 0x06 40 | iret 41 | 42 | -------------------------------------------------------------------------------- /x/fontmng.h: -------------------------------------------------------------------------------- 1 | #ifndef NP2_X_FONTMNG_H__ 2 | #define NP2_X_FONTMNG_H__ 3 | 4 | G_BEGIN_DECLS 5 | 6 | enum { 7 | FDAT_BOLD = 0x01, 8 | FDAT_PROPORTIONAL = 0x02, 9 | FDAT_ALIAS = 0x04, 10 | FDAT_ANSI = 0x08 11 | }; 12 | 13 | enum { 14 | FDAT_DEPTH = 255, 15 | FDAT_DEPTHBIT = 8 16 | }; 17 | 18 | typedef struct { 19 | int width; 20 | int height; 21 | int pitch; 22 | } _FNTDAT, *FNTDAT; 23 | 24 | BRESULT fontmng_init(void); 25 | void fontmng_setdeffontname(const OEMCHAR *fontface); 26 | void* fontmng_create(int size, UINT type, const OEMCHAR *fontface); 27 | void fontmng_destroy(void *hdl); 28 | 29 | BRESULT fontmng_getsize(void *hdl, const char *string, POINT_T *pt); 30 | BRESULT fontmng_getdrawsize(void *hdl, const char *string, POINT_T *pt); 31 | FNTDAT fontmng_get(void *hdl, const char *string); 32 | 33 | G_END_DECLS 34 | 35 | #endif /* NP2_X_FONTMNG_H__ */ 36 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "[c]": { 3 | "editor.tabSize": 4, 4 | "editor.insertSpaces": true 5 | }, 6 | "[cpp]": { 7 | "editor.tabSize": 4, 8 | "editor.insertSpaces": true 9 | }, 10 | "[markdown]": { 11 | "editor.tabSize": 2, 12 | "editor.insertSpaces": true 13 | }, 14 | "[json]": { 15 | "editor.tabSize": 2, 16 | "editor.insertSpaces": true 17 | }, 18 | "[jsonc]": { 19 | "editor.tabSize": 2, 20 | "editor.insertSpaces": true 21 | }, 22 | "[cmake]": { 23 | "editor.tabSize": 2, 24 | "editor.insertSpaces": true 25 | }, 26 | "[makefile]": { 27 | "editor.tabSize": 2, 28 | "editor.insertSpaces": true 29 | }, 30 | "[nasm]": { 31 | "editor.insertSpaces": true, 32 | "editor.tabSize": 4 33 | }, 34 | "[xml]": { 35 | "editor.tabSize": 2, 36 | "editor.insertSpaces": true 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /romimage/BEEP.X86: -------------------------------------------------------------------------------- 1 | ; BEEP TEST 2 | 3 | beeptestwait: mov al, 4 4 | beeptestwaitlp1:mov cx, 9000h 5 | loop $ ; mine 6 | dec al 7 | jne beeptestwaitlp1 8 | ret 9 | 10 | BEEP_TEST: mov bx, 3e6h ; 2.0MHz 11 | in al, 42h 12 | test al, 20h 13 | jne short beephzok 14 | mov bx, 4cdh ; 2.5MHz 15 | beephzok: mov al, 76h 16 | out 77h, al ; BEEP setup mode#0 17 | 18 | cmp byte ptr ds:[MACTYPE], 0 19 | jne short beep_Hzset 20 | 21 | call beep_Hzset 22 | mov al, 6 23 | out 37h, al ; BEEP ON 24 | call beeptestwait 25 | shl bx, 1 26 | call beep_Hzset 27 | call beeptestwait 28 | mov al, 7 29 | out 37h, al ; BEEP OFF 30 | shr bx, 1 31 | beep_Hzset: mov al, bl 32 | out 73h, al 33 | mov al, bh 34 | out 73h, al 35 | ret 36 | -------------------------------------------------------------------------------- /windows/misc/trace.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file trace.h 3 | * @brief トレース クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | #ifndef TRACE 9 | 10 | #define TRACEINIT() 11 | #define TRACETERM() 12 | #define TRACEOUT(a) 13 | #define VERBOSE(a) 14 | #define APPDEVOUT(a) 15 | 16 | #else 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | void trace_init(void); 23 | void trace_term(void); 24 | void trace_fmt(const char *str, ...); 25 | void trace_fmt2(const char *str, ...); 26 | void trace_char(char c); 27 | void trace_fileout(const OEMCHAR *fname); 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #define TRACEINIT() trace_init() 34 | #define TRACETERM() trace_term() 35 | #define TRACEOUT(arg) trace_fmt arg 36 | #define VERBOSE(arg) trace_fmt2 arg 37 | #define APPDEVOUT(arg) trace_char(arg) 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /network/net.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file net.h 3 | * @brief Virtual LAN Interface 4 | * 5 | * @author $Author: SimK $ 6 | */ 7 | 8 | typedef void NP2NET_PacketHandler(const UINT8 *buf, int size); 9 | 10 | // send_packetはデータをLANに送信したいときに外から呼ばれます。データを送信する関数を作ってセットしてやってください。 11 | // recieve_packetはLANからデータを受信したときに呼んでください。この関数はリセット時にデバイスがセットしに来るので作る必要はありません。 12 | // 現在はTAPデバイスのみのサポートですが、send_packetとrecieve_packetに相当する物を作ってやればTAP以外でもOKなはず 13 | typedef struct { 14 | NP2NET_PacketHandler *send_packet; 15 | NP2NET_PacketHandler *recieve_packet; 16 | } NP2NET; 17 | 18 | #ifdef __cplusplus 19 | extern "C" void np2net_init(void); 20 | extern "C" void np2net_shutdown(void); 21 | #else 22 | extern void np2net_init(void); 23 | extern void np2net_shutdown(void); 24 | #endif 25 | void np2net_reset(const NP2CFG *pConfig); 26 | void np2net_bind(void); 27 | 28 | extern NP2NET np2net; -------------------------------------------------------------------------------- /windows/subwnd/subwnd.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file subwnd.h 3 | * @brief サブ ウィンドウの基底クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "winloc.h" 9 | #include "misc\WndProc.h" 10 | 11 | /** 12 | * @brief サブ ウィンドウの基底クラス 13 | */ 14 | class CSubWndBase : public CWndProc 15 | { 16 | public: 17 | static void Initialize(HINSTANCE hInstance); 18 | 19 | CSubWndBase(); 20 | virtual ~CSubWndBase(); 21 | BOOL Create(UINT nCaptionID, DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hwndParent, HMENU nIDorHMenu); 22 | BOOL Create(LPCTSTR lpCaption, DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hwndParent, HMENU nIDorHMenu); 23 | void SetWndType(UINT8 nType); 24 | 25 | protected: 26 | virtual LRESULT WindowProc(UINT nMsg, WPARAM wParam, LPARAM lParam); 27 | 28 | private: 29 | WINLOCEX m_wlex; /*!< ウィンドウ ロケータ */ 30 | }; 31 | -------------------------------------------------------------------------------- /sound/sndcsec.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sndcsec.h 3 | * @brief Interface of the critical section for sound 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" 12 | { 13 | #endif 14 | 15 | #if defined(SOUND_CRITICAL) && defined(SUPPORT_NP2_THREAD) 16 | 17 | extern NP2_Semaphore_t semSoundCritical; 18 | 19 | #define SNDCSEC_INIT NP2_Semaphore_Create(&semSoundCritical, 1) 20 | #define SNDCSEC_TERM NP2_Semaphore_Destroy(&semSoundCritical) 21 | #define SNDCSEC_ENTER NP2_Semaphore_Wait(&semSoundCritical) 22 | #define SNDCSEC_LEAVE NP2_Semaphore_Release(&semSoundCritical) 23 | 24 | #else 25 | 26 | #define SNDCSEC_INIT 27 | #define SNDCSEC_TERM 28 | #define SNDCSEC_ENTER 29 | #define SNDCSEC_LEAVE 30 | 31 | #endif /* defined(SOUND_CRITICAL) defined(SUPPORT_NP2_THREAD) */ 32 | 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | -------------------------------------------------------------------------------- /windows/debuguty/view1mb.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file view1mb.h 3 | * @brief メイン メモリ レジスタ表示クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | #include "viewitem.h" 10 | #include "viewmem.h" 11 | 12 | /** 13 | * @brief メモリ レジスタ表示クラス 14 | */ 15 | class CDebugUty1MB : public CDebugUtyItem 16 | { 17 | public: 18 | CDebugUty1MB(CDebugUtyView* lpView); 19 | virtual ~CDebugUty1MB(); 20 | 21 | virtual void Initialize(const CDebugUtyItem* lpItem = NULL); 22 | virtual bool Update(); 23 | virtual bool Lock(); 24 | virtual void Unlock(); 25 | virtual bool IsLocked(); 26 | virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam); 27 | virtual void OnPaint(HDC hDC, const RECT& rect); 28 | 29 | private: 30 | DebugUtyViewMemory m_mem; //!< メモリ 31 | std::vector m_buffer; //!< バッファ 32 | void SetSegment(UINT nSegment); 33 | }; 34 | -------------------------------------------------------------------------------- /windows/ext/externalopm.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file externalopm.h 3 | * @brief 外部 OPM 演奏クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "externalchip.h" 9 | 10 | /** 11 | * @brief 外部 OPM 演奏クラス 12 | */ 13 | class CExternalOpm : public IExternalChip 14 | { 15 | public: 16 | CExternalOpm(IExternalChip* pChip); 17 | virtual ~CExternalOpm(); 18 | virtual ChipType GetChipType(); 19 | virtual void Reset(); 20 | virtual void WriteRegister(UINT nAddr, UINT8 cData); 21 | virtual INTPTR Message(UINT nMessage, INTPTR nParameter); 22 | 23 | protected: 24 | IExternalChip* m_pChip; /*!< チップ */ 25 | UINT8 m_cAlgorithm[8]; /*!< アルゴリズム テーブル */ 26 | UINT8 m_cTtl[8 * 4]; /*!< TTL テーブル */ 27 | 28 | void Mute(bool bMute) const; 29 | void WriteRegisterInner(UINT nAddr, UINT8 cData) const; 30 | void SetVolume(UINT nChannel, int nVolume) const; 31 | }; 32 | -------------------------------------------------------------------------------- /common/lstarray.h: -------------------------------------------------------------------------------- 1 | #ifndef NP2_LSTARRAY_H 2 | #define NP2_LSTARRAY_H 3 | 4 | typedef struct _la { 5 | UINT maxitems; 6 | size_t listsize; 7 | UINT items; 8 | struct _la *laNext; 9 | } _LISTARRAY, *LISTARRAY; 10 | 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | LISTARRAY listarray_new(size_t listsize, UINT maxitems); 17 | void listarray_clr(LISTARRAY laHandle); 18 | void listarray_destroy(LISTARRAY laHandle); 19 | 20 | UINT listarray_getitems(LISTARRAY laHandle); 21 | void *listarray_append(LISTARRAY laHandle, const void *vpItem); 22 | void *listarray_getitem(LISTARRAY laHandle, UINT num); 23 | UINT listarray_getpos(LISTARRAY laHandle, void *vpItem); 24 | void *listarray_enum(LISTARRAY laHandle, 25 | BOOL (*cbProc)(void *vpItem, void *vpArg), void *vpArg); 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | 31 | #endif /* NP2_LSTARRAY_H */ 32 | -------------------------------------------------------------------------------- /x/skbdwin.h: -------------------------------------------------------------------------------- 1 | #ifndef NP2_X_SKBDWIN_H__ 2 | #define NP2_X_SKBDWIN_H__ 3 | 4 | #if defined(SUPPORT_SOFTKBD) 5 | 6 | #include 7 | 8 | G_BEGIN_DECLS 9 | 10 | typedef struct { 11 | int posx; 12 | int posy; 13 | UINT8 type; 14 | } SKBDCFG; 15 | 16 | extern SKBDCFG skbdcfg; 17 | 18 | BRESULT skbdwin_initialize(void); 19 | void skbdwin_deinitialize(void); 20 | void skbdwin_create(void); 21 | void skbdwin_destroy(void); 22 | void skbdwin_process(void); 23 | void skbdwin_readini(void); 24 | void skbdwin_writeini(void); 25 | 26 | G_END_DECLS 27 | 28 | #else /* !SUPPORT_SOFTKBD */ 29 | 30 | #define skbdwin_initialize() 31 | #define skbdwin_deinitialize() 32 | #define skbdwin_create() 33 | #define skbdwin_destroy() 34 | #define skbdwin_process() 35 | #define skbdwin_readini() 36 | #define skbdwin_writeini() 37 | 38 | #endif /* SUPPORT_SOFTKBD */ 39 | 40 | #endif /* NP2_X_SKBDWIN_H__ */ 41 | -------------------------------------------------------------------------------- /bios/startup.res: -------------------------------------------------------------------------------- 1 | 2 | static const UINT8 nosyscode[] = { 3 | 0xeb,0x05,0xbe,0x5f,0x00,0xeb,0x03,0xbe,0x37,0x00,0xb8,0x04, 4 | 0x0a,0xcd,0x18,0xb4,0x0c,0xcd,0x18,0xb4,0x16,0xba,0x20,0xe1, 5 | 0xcd,0x18,0xfa,0xfc,0xb8,0x00,0xa0,0x8e,0xc0,0x2e,0xad,0x89, 6 | 0xc7,0x2e,0xad,0x85,0xc0,0x74,0x09,0xab,0x08,0xe4,0x74,0xf5, 7 | 0x47,0x47,0xeb,0xf1,0xf4,0xeb,0xfd,0xac,0x07,0x05,0x37,0x05, 8 | 0x39,0x05,0x46,0x05,0x60,0x05,0x47,0x05,0x23,0x05,0x39,0x05, 9 | 0x2f,0x04,0x72,0x05,0x3b,0x05,0x43,0x05,0x48,0x04,0x37,0x04, 10 | 0x46,0x04,0x2f,0x04,0x40,0x04,0x35,0x04,0x24,0x00,0x00,0xae, 11 | 0x07,0x42,0x00,0x41,0x00,0x53,0x00,0x49,0x00,0x43,0x00,0x04, 12 | 0x4e,0x15,0x2f,0x26,0x30,0x04,0x4b,0x04,0x4f,0x20,0x00,0x42, 13 | 0x00,0x49,0x00,0x4f,0x00,0x53,0x00,0x2e,0x00,0x52,0x00,0x4f, 14 | 0x00,0x4d,0x00,0x04,0x2c,0x29,0x2c,0x2d,0x57,0x04,0x47,0x04, 15 | 0x39,0x00,0x00, 16 | }; 17 | -------------------------------------------------------------------------------- /sound/s98.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file s98.h 3 | * @brief Interface of logging PC-98 sound 4 | */ 5 | 6 | #pragma once 7 | 8 | enum { 9 | NORMAL2608 = 0, 10 | EXTEND2608 = 1, 11 | NORMAL2608_2 = 2, 12 | EXTEND2608_2 = 3, 13 | NORMAL2608_3 = 4, 14 | EXTEND2608_3 = 5 15 | }; 16 | 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | #if !defined(SUPPORT_S98) // コールすら面倒だ! 23 | 24 | #define S98_init() 25 | #define S98_trash() 26 | #define S98_open(f) (FAILURE) 27 | #define S98_close() 28 | #define S98_put(m, a, d) 29 | #define S98_sync() 30 | #define S98_isopened() (FALSE) 31 | 32 | #else 33 | 34 | void S98_init(void); 35 | void S98_trash(void); 36 | BRESULT S98_open(const OEMCHAR *filename); 37 | void S98_close(void); 38 | void S98_put(REG8 module, UINT addr, REG8 data); 39 | void S98_sync(void); 40 | BOOL S98_isopened(void); 41 | 42 | #endif 43 | 44 | #ifdef __cplusplus 45 | } 46 | #endif 47 | -------------------------------------------------------------------------------- /i286x/i286xs.h: -------------------------------------------------------------------------------- 1 | 2 | extern const I286TBL op8xreg8_xtable[8]; 3 | extern const I286TBL op8xext8_xtable[8]; 4 | extern const I286TBL op8xreg16_xtable[8]; 5 | extern const I286TBL op8xext16_xtable[8]; 6 | extern const I286TBL op8xext16_atable[8]; 7 | 8 | extern const I286TBL sftreg8_xtable[8]; 9 | extern const I286TBL sftmem8_xtable[8]; 10 | extern const I286TBL sftext8_xtable[8]; 11 | extern const I286TBL sftreg16_xtable[8]; 12 | extern const I286TBL sftmem16_xtable[8]; 13 | extern const I286TBL sftext16_xtable[8]; 14 | 15 | extern const I286TBL sftreg8cl_xtable[8]; 16 | extern const I286TBL sftext8cl_xtable[8]; 17 | extern const I286TBL sftreg16cl_xtable[8]; 18 | extern const I286TBL sftext16cl_xtable[8]; 19 | 20 | extern const I286TBL ope0xf6_xtable[8]; 21 | extern const I286TBL ope0xf7_xtable[8]; 22 | extern const I286TBL ope0xfe_xtable[2]; 23 | extern const I286TBL ope0xff_xtable[8]; 24 | 25 | -------------------------------------------------------------------------------- /windows/commng/cmmidioutvermouth.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file cmmidioutvermouth.h 3 | * @brief MIDI OUT Vermouth クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | #if defined(VERMOUTH_LIB) 9 | 10 | #include "cmmidiout.h" 11 | #include 12 | #include "sound\vermouth\vermouth.h" 13 | 14 | /** 15 | * @brief MIDI OUT Vermouthクラス 16 | */ 17 | class CComMidiOutVermouth : public CComMidiOut 18 | { 19 | public: 20 | static CComMidiOutVermouth* CreateInstance(); 21 | 22 | CComMidiOutVermouth(MIDIHDL vermouth); 23 | virtual ~CComMidiOutVermouth(); 24 | virtual void Short(UINT32 nMessage); 25 | virtual void Long(const UINT8* lpMessage, UINT cbMessage); 26 | 27 | private: 28 | MIDIHDL m_vermouth; /*!< The instance of vermouth */ 29 | static void SOUNDCALL GetPcm(MIDIHDL vermouth, SINT32* lpBuffer, UINT nBufferCount); 30 | }; 31 | 32 | #endif // defined(VERMOUTH_LIB) 33 | -------------------------------------------------------------------------------- /cbus/ct1745io.h: -------------------------------------------------------------------------------- 1 | #ifdef __cplusplus 2 | extern "C" { 3 | #endif 4 | 5 | enum { 6 | MIXER_RESET = 0x00, 7 | MIXER_VOL_START = 0x30, 8 | MIXER_MASTER_LEFT = 0x30, 9 | MIXER_MASTER_RIGHT, 10 | MIXER_VOC_LEFT, 11 | MIXER_VOC_RIGHT, 12 | MIXER_MIDI_LEFT, 13 | MIXER_MIDI_RIGHT, 14 | MIXER_CD_LEFT, 15 | MIXER_CD_RIGHT, 16 | MIXER_LINE_LEFT, 17 | MIXER_LINE_RIGHT, 18 | MIXER_MIC, 19 | MIXER_PCSPEAKER, 20 | MIXER_OUT_SW, 21 | MIXER_IN_SW_LEFT, 22 | MIXER_IN_SW_RIGHT, 23 | MIXER_IN_GAIN_LEFT, 24 | MIXER_IN_GAIN_RIGHT, 25 | MIXER_OUT_GAIN_LEFT, 26 | MIXER_OUT_GAIN_RIGHT, 27 | MIXER_AGC, 28 | MIXER_TREBLE_LEFT, 29 | MIXER_TREBLE_RIGHT, 30 | MIXER_BASS_LEFT, 31 | MIXER_BASS_RIGHT, 32 | MIXER_VOL_END = 0x47 33 | }; 34 | 35 | void ct1745io_reset(void); 36 | void ct1745io_bind(void); 37 | void ct1745io_unbind(void); 38 | 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | -------------------------------------------------------------------------------- /windows/commng/cmmidiout32.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file cmmidiout32.h 3 | * @brief MIDI OUT win32 クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | #include "cmmidiout.h" 10 | 11 | /** 12 | * @brief MIDI OUT win32 クラス 13 | */ 14 | class CComMidiOut32 : public CComMidiOut 15 | { 16 | public: 17 | static CComMidiOut32* CreateInstance(LPCTSTR lpMidiOut); 18 | 19 | CComMidiOut32(HMIDIOUT hMidiOut); 20 | virtual ~CComMidiOut32(); 21 | virtual void Short(UINT32 nMessage); 22 | virtual void Long(const UINT8* lpMessage, UINT cbMessage); 23 | static bool GetId(LPCTSTR lpMidiOut, UINT* pId); 24 | 25 | private: 26 | HMIDIOUT m_hMidiOut; /*!< MIDIOUT ハンドル */ 27 | MIDIHDR m_midihdr; /*!< MIDIHDR */ 28 | bool m_bWaitingSentExclusive; /*!< エクスクルーシヴ送信中 */ 29 | std::vector m_excvbuf; /*!< エクスクルーシヴ バッファ */ 30 | 31 | void WaitSentExclusive(); 32 | }; 33 | -------------------------------------------------------------------------------- /windows/commng/cmmidioutmt32sound.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file cmmidioutmt32sound.h 3 | * @brief MIDI OUT MT32Sound クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | #if defined(MT32SOUND_DLL) 9 | 10 | #include "cmmidiout.h" 11 | #include 12 | 13 | class MT32Sound; 14 | 15 | /** 16 | * @brief MIDI OUT MT32Sound クラス 17 | */ 18 | class CComMidiOutMT32Sound : public CComMidiOut 19 | { 20 | public: 21 | static CComMidiOutMT32Sound* CreateInstance(); 22 | 23 | CComMidiOutMT32Sound(MT32Sound* pMT32Sound); 24 | virtual ~CComMidiOutMT32Sound(); 25 | virtual void Short(UINT32 nMessage); 26 | virtual void Long(const UINT8* lpMessage, UINT cbMessage); 27 | 28 | private: 29 | MT32Sound* m_pMT32Sound; /*!< The instance of mt32sound */ 30 | static void SOUNDCALL GetPcm(MT32Sound* pMT32Sound, SINT32* lpBuffer, UINT nBufferCount); 31 | }; 32 | 33 | #endif // defined(MT32SOUND_DLL) 34 | -------------------------------------------------------------------------------- /windows/debuguty/viewseg.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file viewseg.h 3 | * @brief メモリ レジスタ表示クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | #include "viewitem.h" 10 | #include "viewmem.h" 11 | 12 | /** 13 | * @brief メモリ レジスタ表示クラス 14 | */ 15 | class CDebugUtySeg : public CDebugUtyItem 16 | { 17 | public: 18 | CDebugUtySeg(CDebugUtyView* lpView); 19 | virtual ~CDebugUtySeg(); 20 | 21 | virtual void Initialize(const CDebugUtyItem* lpItem = NULL); 22 | virtual bool Update(); 23 | virtual bool Lock(); 24 | virtual void Unlock(); 25 | virtual bool IsLocked(); 26 | virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam); 27 | virtual void OnPaint(HDC hDC, const RECT& rect); 28 | 29 | private: 30 | UINT m_nSegment; //!< セグメント 31 | DebugUtyViewMemory m_mem; //!< メモリ 32 | std::vector m_buffer; //!< バッファ 33 | void SetSegment(UINT nSegment); 34 | }; 35 | -------------------------------------------------------------------------------- /codecnv/textcnv.h: -------------------------------------------------------------------------------- 1 | 2 | // テキストファイルの変換ルール 3 | 4 | enum { 5 | TEXTCNV_DEFAULT = 0, 6 | TEXTCNV_SJIS = 1, 7 | TEXTCNV_EUC = 2, 8 | TEXTCNV_UTF8 = 3, 9 | TEXTCNV_UCS2 = 4 10 | }; 11 | 12 | enum { 13 | TEXTCNV_READ = 0x01, 14 | TEXTCNV_WRITE = 0x02 15 | }; 16 | 17 | typedef UINT (*TCTOOEM)(OEMCHAR *dst, UINT dcnt, const void *src, UINT scnt); 18 | typedef UINT (*TCFROMOEM)(void *dst, UINT dcnt, const OEMCHAR *src, UINT scnt); 19 | 20 | typedef struct { 21 | UINT8 caps; 22 | UINT8 xendian; 23 | UINT8 width; 24 | UINT8 hdrsize; 25 | TCTOOEM tooem; 26 | TCFROMOEM fromoem; 27 | } TCINF; 28 | 29 | 30 | #ifdef __cplusplus 31 | extern "C" { 32 | #endif 33 | 34 | UINT textcnv_getinfo(TCINF *inf, const UINT8 *hdr, UINT hdrsize); 35 | void textcnv_swapendian16(void *buf, UINT leng); 36 | void textcnv_swapendian32(void *buf, UINT leng); 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | 42 | -------------------------------------------------------------------------------- /io/bmsio.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BMSIO.H: I-O Bank Memory 3 | */ 4 | 5 | // 構成設定 6 | typedef struct { 7 | BOOL enabled; // IOバンクメモリを使用する 8 | UINT16 port; // ポート番号 9 | UINT16 portmask; // (予約) 10 | UINT8 numbanks; // バンク数 11 | } _BMSIOCFG; 12 | 13 | // 動作時の構成と状態 (STATSAVEの対象) 14 | typedef struct { // MEMORY.X86内の構造体に影響 15 | // 状態 16 | UINT8 nomem; // 現在選択されているバンクにメモリがある 17 | UINT8 bank; // 現在選択されているバンク 18 | 19 | _BMSIOCFG cfg; // 構成 20 | } _BMSIO, *BMSIO; 21 | 22 | // ワーク 23 | typedef struct { // MEMORY.X86内の構造体に影響 24 | BYTE *bmsmem; 25 | UINT32 bmsmemsize; 26 | } _BMSIOWORK; 27 | 28 | 29 | #ifdef __cplusplus 30 | extern "C" { 31 | #endif 32 | 33 | #if defined(SUPPORT_BMS) 34 | extern _BMSIOCFG bmsiocfg; 35 | extern _BMSIO bmsio; 36 | extern _BMSIOWORK bmsiowork; 37 | #endif 38 | 39 | void bmsio_set(void); 40 | void bmsio_reset(void); 41 | void bmsio_bind(void); 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | 47 | -------------------------------------------------------------------------------- /x/resources/np2.xbm: -------------------------------------------------------------------------------- 1 | #define np2_width 32 2 | #define np2_height 32 3 | static const char np2_bits[] = { 4 | 0xff, 0xff, 0xff, 0xff, 0x1f, 0xfe, 0x7f, 0xf8, 0x0f, 0xf0, 0x0f, 0xf0, 5 | 0x8f, 0xc1, 0x83, 0xf1, 0x0f, 0x02, 0xc0, 0xf0, 0x0f, 0x04, 0x60, 0xf0, 6 | 0x1f, 0x04, 0xa0, 0xf8, 0x1f, 0x02, 0x40, 0xf8, 0x1f, 0x01, 0x80, 0xf8, 7 | 0x1f, 0x20, 0x04, 0xfc, 0x3f, 0x20, 0x04, 0xfc, 0x3f, 0x20, 0x04, 0xfc, 8 | 0x3f, 0x20, 0x00, 0xfe, 0x3f, 0x00, 0x00, 0xfc, 0xff, 0xcf, 0xf3, 0xff, 9 | 0x7f, 0xc0, 0x01, 0xfe, 0xff, 0x9f, 0xf8, 0xff, 0xff, 0x00, 0x00, 0xff, 10 | 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x03, 0xc0, 0xff, 0xff, 0x07, 0xe0, 0xff, 11 | 0xff, 0x1f, 0xfc, 0xff, 0xff, 0x0f, 0xf8, 0xf8, 0xff, 0x07, 0xe0, 0xf8, 12 | 0xff, 0x03, 0xe0, 0xfa, 0xff, 0x03, 0xc0, 0xff, 0xff, 0x03, 0xc0, 0xff, 13 | 0xc7, 0x03, 0xc0, 0xe7, 0x0f, 0x24, 0x24, 0xf0, 0x1f, 0x44, 0x22, 0xf8, 14 | 0x7f, 0xc8, 0x33, 0xfe, 0xff, 0xff, 0xff, 0xff, }; 15 | -------------------------------------------------------------------------------- /misc/np2_u8.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | # charactor code convert to UTF-8 script for NP2 4 | 5 | # If compare two different NP2 sesies code, 6 | # use this script each other. 7 | 8 | # This script is for maintenance. 9 | # Don't use to release ! 10 | 11 | set -f 12 | 13 | FIND_EXTS=("txt" "c" "h" "cpp" "hpp" "str" "res" "inc" "tbl" "mcr" "x86" "x64" "pch" "vcproj" "filters" "sln" "xml" "am" "ac") 14 | FIND_CMD_HEAD="find ." 15 | FIND_CMD_LAST=" -type f" 16 | FIND_CMD=${FIND_CMD_HEAD} 17 | 18 | FIND_CMD="${FIND_CMD} -name *.${FIND_EXTS}" 19 | unset FIND_EXTS[0] 20 | FIND_EXTS=(${FIND_EXTS[@]}) 21 | for EXT in ${FIND_EXTS[@]}; do FIND_CMD="${FIND_CMD} -or -name *.${EXT}"; done 22 | FIND_CMD="${FIND_CMD} ${FIND_CMD_LAST}" 23 | echo ${FIND_CMD} 24 | FILES=`${FIND_CMD}` 25 | 26 | # UTF-8 + Yen->BackSlash 27 | for f in ${FILES} 28 | do 29 | echo "${f}" 30 | nkf --overwrite -w "${f}" 31 | sed -i -e 's/¥/\\/g' "${f}" 32 | done 33 | 34 | set +f 35 | 36 | -------------------------------------------------------------------------------- /x/kdispwin.h: -------------------------------------------------------------------------------- 1 | #ifndef NP2_X_KDISPWIN_H__ 2 | #define NP2_X_KDISPWIN_H__ 3 | 4 | #include 5 | 6 | #if defined(SUPPORT_KEYDISP) 7 | 8 | G_BEGIN_DECLS 9 | 10 | enum { 11 | KDISPCFG_FM = 0x00, 12 | KDISPCFG_MIDI = 0x80 13 | }; 14 | 15 | typedef struct { 16 | int posx; 17 | int posy; 18 | UINT8 mode; 19 | UINT8 type; 20 | } KDISPCFG; 21 | 22 | extern KDISPCFG kdispcfg; 23 | 24 | BRESULT kdispwin_initialize(void); 25 | void kdispwin_create(void); 26 | void kdispwin_destroy(void); 27 | void kdispwin_draw(UINT8 cnt); 28 | void kdispwin_readini(void); 29 | void kdispwin_writeini(void); 30 | 31 | G_END_DECLS 32 | 33 | #else /* !SUPPORT_KEYDISP */ 34 | 35 | #define kdispwin_initialize() 36 | #define kdispwin_create() 37 | #define kdispwin_destroy() 38 | #define kdispwin_draw(cnt) 39 | #define kdispwin_readini() 40 | #define kdispwin_writeini() 41 | 42 | #endif /* SUPPORT_KEYDISP */ 43 | 44 | #endif /* NP2_X_KDISPWIN_H__ */ 45 | -------------------------------------------------------------------------------- /kai_note.txt: -------------------------------------------------------------------------------- 1 | NP2 kai開発ノート by AZO 2 | === 3 | 4 | ・GARUDIUS'95 タイトル表示 下部の表示が(16ライン?)欠落 5 | Anex86はOK、T98-Nextは同様 6 | 7 | => 実機でも欠落する。 8 | 9 | ・ツーショットダイアリー BEEP 音声 10 | np2/fmgenでiniファイル内にBEEP_PCM=2とするとすごく綺麗。 11 | 12 | タイマ資料 <- BEEP周波数に使用される 13 | http://www.webtech.co.jp/company/doc/undocumented_mem/io_tcu.txt 14 | 15 | => 対応。他のゲームでBEEPが変になるかも。 16 | 結子(一番右上のOL)のOPの音声タイミングがずれる。 17 | 18 | => BEEP PCMを再度、修正。ズレが無くなった。 19 | 20 | ・トキオの声が低い 21 | 22 | => モードレジスタ0x77に、0x70->0x50 の順に書かれたら、 23 | トキオ用の周期にするように突貫対応。 24 | 25 | => BEEP PCMを再度、修正。 26 | 27 | ・NFDを起動できない 28 | 29 | LOADINTELWORDマクロが変な値を取得する 30 | 31 | => common.h にて、a を UINT8* にキャストするよう修正。 32 | 33 | ・ERCACHE.EXEの組み込み時にtriple fault発生 34 | 35 | => http://egg.2ch.net/test/read.cgi/software/1500009461/181-203 36 | の修正。 37 | 38 | ・VEM486 + Turbo C++ 4J(のTC.EXE)でtriple fault発生 39 | 40 | ・DIPスイッチ2、bit7 GDC の初期を 2.5MHz にした。 41 | 42 | ・Android版にて、USBメモリのファイルを認識しない。 未確認 43 | -------------------------------------------------------------------------------- /vram/maketext.h: -------------------------------------------------------------------------------- 1 | 2 | enum { 3 | TEXTXMAX = 80, 4 | TEXTYMAX = 400, 5 | 6 | TXTATR_ST = 0x01, // ~シークレット 7 | TXTATR_BL = 0x02, // ブリンク 8 | TXTATR_RV = 0x04, // リバース 9 | TXTATR_UL = 0x08, // アンダーライン 10 | TXTATR_VL = 0x10, // バーチカルライン 11 | TXTATR_BG = 0x10, // 簡易グラフ 12 | TEXTATR_RGB = 0xe0 // ビット並びはGRBの順 13 | }; 14 | 15 | typedef struct { 16 | UINT8 timing; 17 | UINT8 count; 18 | UINT8 renewal; 19 | UINT8 gaiji; 20 | UINT8 attr; 21 | UINT8 curdisp; 22 | UINT8 curdisplast; 23 | UINT8 blink; 24 | UINT8 blinkdisp; 25 | UINT16 curpos; 26 | } TRAM_T; 27 | 28 | 29 | #ifdef __cplusplus 30 | extern "C" { 31 | #endif 32 | 33 | extern TRAM_T tramflag; 34 | 35 | void maketext_initialize(void); 36 | void maketext_reset(void); 37 | UINT8 maketext_curblink(void); 38 | void maketext(int text_renewal); 39 | void maketext40(int text_renewal); 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | 45 | -------------------------------------------------------------------------------- /windows/dialog/c_slidervalue.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * @file c_slidervalue.cpp 3 | * @brief 値付きスライダー クラスの動作の定義を行います 4 | */ 5 | 6 | #include 7 | #include "c_slidervalue.h" 8 | 9 | /** 10 | * コンストラクタ 11 | */ 12 | CSliderValue::CSliderValue() 13 | : m_nStaticId(0) 14 | { 15 | } 16 | 17 | /** 18 | * 範囲の設定 19 | * @param[in] nMin 最小値 20 | * @param[in] nMax 最大値 21 | * @param[in] bRedraw 再描画フラグ 22 | */ 23 | void CSliderValue::SetRange(int nMin, int nMax, BOOL bRedraw) 24 | { 25 | SetRangeMin(nMin, FALSE); 26 | SetRangeMax(nMax, bRedraw); 27 | } 28 | 29 | /** 30 | * 値の設定 31 | * @param[in] nPos 値 32 | */ 33 | void CSliderValue::SetPos(int nPos) 34 | { 35 | CSliderProc::SetPos(nPos); 36 | UpdateValue(); 37 | } 38 | 39 | /** 40 | * 値の更新 41 | */ 42 | void CSliderValue::UpdateValue() 43 | { 44 | if (m_nStaticId) 45 | { 46 | GetParent().SetDlgItemInt(m_nStaticId, GetPos(), TRUE); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /sound/vermouth/midimod.h: -------------------------------------------------------------------------------- 1 | 2 | struct _pathlist; 3 | typedef struct _pathlist _PATHLIST; 4 | typedef struct _pathlist *PATHLIST; 5 | 6 | struct _pathlist { 7 | PATHLIST next; 8 | OEMCHAR path[MAX_PATH]; 9 | }; 10 | 11 | enum { 12 | TONECFG_EXIST = 0x01, 13 | TONECFG_NOLOOP = 0x02, 14 | TONECFG_NOENV = 0x04, 15 | TONECFG_KEEPENV = 0x08, 16 | TONECFG_NOTAIL = 0x10, 17 | 18 | TONECFG_AUTOAMP = -1, 19 | TONECFG_VARIABLE = 0xff 20 | }; 21 | 22 | typedef struct { 23 | OEMCHAR *name; 24 | int amp; 25 | UINT8 flag; 26 | UINT8 pan; 27 | UINT8 note; 28 | } _TONECFG, *TONECFG; 29 | 30 | 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | BRESULT VERMOUTHCL midimod_getfile(MIDIMOD mod, const OEMCHAR *filename, 36 | OEMCHAR *path, int size); 37 | void VERMOUTHCL midimod_lock(MIDIMOD mod); 38 | void VERMOUTHCL midimod_unlock(MIDIMOD mod); 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | 44 | -------------------------------------------------------------------------------- /cbus/idebios.res: -------------------------------------------------------------------------------- 1 | 2 | static const UINT8 idebios[] = { 3 | 0xcb,0x90,0x90,0xcb,0x90,0x90,0xcb,0x90,0x90,0x55,0xaa,0x02, 4 | 0xeb,0x22,0x90,0xeb,0x23,0x90,0xcb,0x90,0x90,0xeb,0x50,0x90, 5 | 0xeb,0x2f,0x90,0xcb,0x90,0x90,0xcb,0x90,0x90,0xcb,0x90,0x90, 6 | 0xcb,0x90,0x90,0xcb,0x90,0x90,0xcb,0x90,0x90,0xcb,0x90,0x90, 7 | 0xc6,0x07,0xd9,0xcb,0x8c,0xc8,0x80,0x0e,0x80,0x04,0x80,0x88, 8 | 0x26,0xb0,0x04,0x88,0x26,0xb8,0x04,0xb8,0x00,0x03,0xcd,0x1b, 9 | 0xcb,0xfc,0x8c,0xca,0x8e,0xda,0xb9,0x08,0x00,0xbe,0x9a,0x00, 10 | 0xba,0xef,0x07,0xfa,0xac,0xee,0xe2,0xfc,0xfb,0x58,0x5b,0x59, 11 | 0x5a,0x5d,0x07,0x5f,0x5e,0x1f,0xcf,0x3c,0x0a,0x74,0x05,0x3c, 12 | 0x0b,0x74,0x01,0xcb,0x2c,0x09,0x84,0x06,0x5d,0x05,0x74,0x21, 13 | 0xfe,0xc8,0xb4,0x06,0xb9,0xc0,0x1f,0x8e,0xc1,0x31,0xdb,0x89, 14 | 0xdd,0x89,0xd9,0x89,0xda,0xb7,0x04,0xcd,0x1b,0x72,0x0a,0x0c, 15 | 0x80,0xa2,0x84,0x05,0x9a,0x00,0x00,0xc0,0x1f,0xcb,0x73,0x61, 16 | 0x73,0x69,0x62,0x69,0x6f,0x73, 17 | }; 18 | 19 | -------------------------------------------------------------------------------- /x/drawmng.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "drawmng.h" 4 | 5 | 6 | void 7 | drawmng_make16mask(PAL16MASK *pal16, UINT32 bmask, UINT32 rmask, UINT32 gmask) 8 | { 9 | UINT8 sft; 10 | 11 | if (pal16 == NULL) 12 | return; 13 | 14 | sft = 0; 15 | while ((!(bmask & 0x80)) && (sft < 32)) { 16 | bmask <<= 1; 17 | sft++; 18 | } 19 | pal16->mask.p.b = (UINT8)bmask; 20 | pal16->r16b = sft; 21 | 22 | sft = 0; 23 | while ((rmask & 0xffffff00) && (sft < 32)) { 24 | rmask >>= 1; 25 | sft++; 26 | } 27 | pal16->mask.p.r = (UINT8)rmask; 28 | pal16->l16r = sft; 29 | 30 | sft = 0; 31 | while ((gmask & 0xffffff00) && (sft < 32)) { 32 | gmask >>= 1; 33 | sft++; 34 | } 35 | pal16->mask.p.g = (UINT8)gmask; 36 | pal16->l16g = sft; 37 | } 38 | 39 | RGB16 40 | drawmng_makepal16(PAL16MASK *pal16, RGB32 pal32) 41 | { 42 | RGB32 pal; 43 | 44 | pal.d = pal32.d & pal16->mask.d; 45 | return (RGB16)((pal.p.g << pal16->l16g) + (pal.p.r << pal16->l16r) + (pal.p.b >> pal16->r16b)); 46 | } 47 | -------------------------------------------------------------------------------- /cbus/amd98.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file amd98.h 3 | * @brief Interface of AMD-98 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | #include 10 | #include "sound/psggen.h" 11 | 12 | /** 13 | * @breif The sturecture of AMD-98 14 | */ 15 | struct amd98_t 16 | { 17 | struct 18 | { 19 | UINT8 psg1reg; 20 | UINT8 psg2reg; 21 | UINT8 psg3reg; 22 | UINT8 rhythm; 23 | } s; 24 | _PSGGEN psg[3]; 25 | }; 26 | 27 | typedef struct amd98_t AMD98; 28 | 29 | #ifdef __cplusplus 30 | extern "C" 31 | { 32 | #endif 33 | 34 | extern AMD98 g_amd98; 35 | 36 | void amd98_initialize(UINT rate); 37 | void amd98_deinitialize(void); 38 | 39 | void amd98int(NEVENTITEM item); 40 | 41 | void amd98_reset(const NP2CFG *pConfig); 42 | void amd98_bind(void); 43 | void amd98_unbind(void); 44 | 45 | int amd98_sfsave(STFLAGH sfh, const SFENTRY *tbl); 46 | int amd98_sfload(STFLAGH sfh, const SFENTRY *tbl); 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | -------------------------------------------------------------------------------- /sdl/sysmng.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sysmng.c 3 | * @brief Implementation of the system 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | extern REG8 cdchange_drv; 11 | 12 | UINT sys_updates; 13 | 14 | SYSMNGMISCINFO sys_miscinfo = {0}; 15 | 16 | /** 17 | * Initialize 18 | */ 19 | void sysmng_initialize(void) 20 | { 21 | } 22 | 23 | /** 24 | * Deinitialize 25 | */ 26 | void sysmng_deinitialize(void) 27 | { 28 | } 29 | 30 | /** 31 | * Notifies flags 32 | * @param[in] update update flags 33 | */ 34 | #if defined(__LIBRETRO__) 35 | extern int lr_init; 36 | #endif 37 | 38 | void sysmng_update(UINT update) 39 | { 40 | if (update & (SYS_UPDATECFG | SYS_UPDATEOSCFG)) 41 | { 42 | #if defined(__LIBRETRO__) 43 | if(lr_init != 0) 44 | initsave(); 45 | #else 46 | initsave(); 47 | #endif 48 | } 49 | } 50 | 51 | /** 52 | * Notifies CPU Reset 53 | */ 54 | void sysmng_cpureset(void) 55 | { 56 | } 57 | 58 | void sysmng_updatecaption(UINT8 flag) 59 | { 60 | } 61 | -------------------------------------------------------------------------------- /cbus/scsibios.res: -------------------------------------------------------------------------------- 1 | 2 | static const UINT8 scsibios[] = { 3 | 0xcb,0x90,0x90,0xcb,0x90,0x90,0xcb,0x90,0x90,0x55,0xaa,0x02, 4 | 0xeb,0x22,0x90,0xeb,0x24,0x90,0xcb,0x90,0x90,0xeb,0x59,0x90, 5 | 0xeb,0x2f,0x90,0xcb,0x90,0x90,0xcb,0x90,0x90,0xcb,0x90,0x90, 6 | 0xcb,0x90,0x90,0xcb,0x90,0x90,0xcb,0x90,0x90,0xcb,0x90,0x90, 7 | 0xc7,0x07,0xc2,0x82,0xcb,0x8c,0xc8,0x88,0x26,0xb2,0x04,0x88, 8 | 0x26,0xba,0x04,0x88,0x26,0xbc,0x04,0xb8,0x20,0x03,0xcd,0x1b, 9 | 0xcb,0xfc,0x8c,0xca,0x8e,0xda,0xb9,0x08,0x00,0xbe,0x94,0x00, 10 | 0xf6,0x46,0x00,0x40,0x74,0x03,0x8d,0x74,0x08,0xba,0xef,0x07, 11 | 0xfa,0xac,0xee,0xe2,0xfc,0xfb,0x58,0x5b,0x59,0x5a,0x5d,0x07, 12 | 0x5f,0x5e,0x1f,0xcf,0x3c,0x0c,0x75,0x1f,0xb8,0x20,0x46,0xb9, 13 | 0xc0,0x1f,0x8e,0xc1,0x31,0xed,0xbb,0x00,0x04,0x31,0xc9,0x31, 14 | 0xd2,0xcd,0x1b,0x72,0x0a,0x0c,0x80,0xa2,0x84,0x05,0x9a,0x00, 15 | 0x00,0xc0,0x1f,0xcb,0x73,0x63,0x73,0x69,0x62,0x69,0x6f,0x73, 16 | 0x73,0x63,0x73,0x69,0x5f,0x64,0x65,0x76, 17 | }; 18 | 19 | -------------------------------------------------------------------------------- /windows/debuguty/viewasm.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file viewasm.h 3 | * @brief アセンブラ リスト表示クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | #include "viewitem.h" 10 | #include "viewmem.h" 11 | 12 | /** 13 | * @brief アセンブラ リスト表示クラス 14 | */ 15 | class CDebugUtyAsm : public CDebugUtyItem 16 | { 17 | public: 18 | CDebugUtyAsm(CDebugUtyView* lpView); 19 | virtual ~CDebugUtyAsm(); 20 | 21 | virtual void Initialize(const CDebugUtyItem* lpItem = NULL); 22 | virtual bool Update(); 23 | virtual bool Lock(); 24 | virtual void Unlock(); 25 | virtual bool IsLocked(); 26 | virtual void OnPaint(HDC hDC, const RECT& rect); 27 | 28 | private: 29 | UINT m_nSegment; //!< セグメント 30 | UINT m_nOffset; //!< セグメント 31 | DebugUtyViewMemory m_mem; //!< メモリ 32 | std::vector m_buffer; //!< バッファ 33 | std::vector m_address; //!< アドレス バッファ 34 | void ReadMemory(UINT nOffset, unsigned char* lpBuffer, UINT cbBuffer) const; 35 | }; 36 | -------------------------------------------------------------------------------- /fdd/hddboot.res: -------------------------------------------------------------------------------- 1 | 2 | static const UINT8 hdddiskboot[] = { 3 | 0xeb,0x0a,0x90,0x90,0x49,0x50,0x4c,0x31,0x00,0x00,0x00,0x1e, 4 | 0xb8,0x04,0x0a,0xcd,0x18,0xb4,0x16,0xba,0x20,0xe1,0xcd,0x18, 5 | 0xfa,0xfc,0xb8,0x00,0xa0,0x8e,0xc0,0xbe,0x3c,0x00,0x31,0xff, 6 | 0xe8,0x09,0x00,0xbf,0xa0,0x00,0xe8,0x03,0x00,0xf4,0xeb,0xfd, 7 | 0x2e,0xad,0x85,0xc0,0x74,0x05,0xab,0x47,0x47,0xeb,0xf5,0xc3, 8 | 0x04,0x33,0x04,0x4e,0x05,0x4f,0x01,0x3c,0x05,0x49,0x05,0x47, 9 | 0x05,0x23,0x05,0x39,0x05,0x2f,0x05,0x24,0x05,0x61,0x01,0x3c, 10 | 0x05,0x38,0x04,0x4f,0x05,0x55,0x05,0x29,0x01,0x3c,0x05,0x5e, 11 | 0x05,0x43,0x05,0x48,0x04,0x35,0x04,0x6c,0x04,0x46,0x04,0x24, 12 | 0x04,0x5e,0x04,0x3b,0x04,0x73,0x01,0x25,0x00,0x00,0x05,0x47, 13 | 0x05,0x23,0x05,0x39,0x05,0x2f,0x05,0x24,0x05,0x61,0x01,0x3c, 14 | 0x05,0x38,0x04,0x72,0x21,0x5e,0x26,0x7e,0x18,0x65,0x01,0x24, 15 | 0x05,0x6a,0x05,0x3b,0x05,0x43,0x05,0x48,0x04,0x37,0x04,0x46, 16 | 0x12,0x3c,0x04,0x35,0x04,0x24,0x01,0x25,0x00,0x00, 17 | }; 18 | -------------------------------------------------------------------------------- /sound/tms3631.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file tms3631.h 3 | * @brief Interface of the TMS3631 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | 10 | enum 11 | { 12 | TMS3631_FREQ = 16, 13 | TMS3631_MUL = 4 14 | }; 15 | 16 | typedef struct 17 | { 18 | UINT32 freq; 19 | UINT32 count; 20 | } TMSCH; 21 | 22 | typedef struct 23 | { 24 | TMSCH ch[8]; 25 | UINT enable; 26 | } _TMS3631, *TMS3631; 27 | 28 | typedef struct 29 | { 30 | SINT32 left; 31 | SINT32 right; 32 | SINT32 feet[16]; 33 | UINT32 freqtbl[64]; 34 | } TMS3631CFG; 35 | 36 | #ifdef __cplusplus 37 | extern "C" 38 | { 39 | #endif 40 | 41 | void tms3631_initialize(UINT rate); 42 | void tms3631_setvol(const UINT8 *vol); 43 | 44 | void tms3631_reset(TMS3631 tms); 45 | void tms3631_setkey(TMS3631 tms, REG8 ch, REG8 key); 46 | void tms3631_setenable(TMS3631 tms, REG8 enable); 47 | 48 | void SOUNDCALL tms3631_getpcm(TMS3631 tms, SINT32 *pcm, UINT count); 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | -------------------------------------------------------------------------------- /mem/dmax86.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | 8 | void dmax86(void) { 9 | 10 | DMACH ch; 11 | REG8 bit; 12 | 13 | if (dmac.working) { 14 | ch = dmac.dmach; 15 | bit = 1; 16 | do { 17 | if (dmac.working & bit) { 18 | // DMA working ! 19 | if (!ch->leng.w) { 20 | dmac.stat |= bit; 21 | dmac.working &= ~bit; 22 | ch->proc.extproc(DMAEXT_END); 23 | } 24 | ch->leng.w--; 25 | 26 | switch(ch->mode & 0x0c) { 27 | case 0x00: // verifty 28 | ch->proc.inproc(); 29 | break; 30 | 31 | case 0x04: // port->mem 32 | MEMP_WRITE8(ch->adrs.d, ch->proc.inproc()); 33 | break; 34 | 35 | default: 36 | ch->proc.outproc(MEMP_READ8(ch->adrs.d)); 37 | break; 38 | } 39 | ch->adrs.d += ((ch->mode & 0x20)?-1:1); 40 | } 41 | ch++; 42 | bit <<= 1; 43 | } while(bit & 0x0f); 44 | } 45 | } 46 | 47 | -------------------------------------------------------------------------------- /mem/dmav30.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | 8 | void dmav30(void) { 9 | 10 | DMACH ch; 11 | REG8 bit; 12 | 13 | if (dmac.working) { 14 | ch = dmac.dmach; 15 | bit = 1; 16 | do { 17 | if (dmac.working & bit) { 18 | // DMA working ! 19 | if (!ch->leng.w) { 20 | dmac.stat |= bit; 21 | dmac.working &= ~bit; 22 | ch->proc.extproc(DMAEXT_END); 23 | } 24 | ch->leng.w--; 25 | 26 | switch(ch->mode & 0x0c) { 27 | case 0x00: // verifty 28 | ch->proc.inproc(); 29 | break; 30 | 31 | case 0x04: // port->mem 32 | MEMP_WRITE8(ch->adrs.d, ch->proc.inproc()); 33 | break; 34 | 35 | default: 36 | ch->proc.outproc(MEMP_READ8(ch->adrs.d)); 37 | break; 38 | } 39 | ch->adrs.w[DMA16_LOW] += ((ch->mode & 0x20)?-1:1); 40 | } 41 | ch++; 42 | bit <<= 1; 43 | } while(bit & 0x0f); 44 | } 45 | } 46 | 47 | -------------------------------------------------------------------------------- /sdl/fontmng.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file fongmng.h 3 | * @brief Interface of the font manager 4 | */ 5 | 6 | #pragma once 7 | 8 | enum 9 | { 10 | FDAT_BOLD = 0x01, 11 | FDAT_PROPORTIONAL = 0x02, 12 | FDAT_ALIAS = 0x04, 13 | FDAT_ANSI = 0x08 14 | }; 15 | 16 | enum 17 | { 18 | FDAT_DEPTH = 255, 19 | FDAT_DEPTHBIT = 8 20 | }; 21 | 22 | typedef struct 23 | { 24 | int width; 25 | int height; 26 | int pitch; 27 | } _FNTDAT, *FNTDAT; 28 | 29 | 30 | #ifdef __cplusplus 31 | extern "C" 32 | { 33 | #endif 34 | 35 | void *fontmng_create(int size, UINT type, const char *fontface); 36 | void fontmng_destroy(void *hdl); 37 | 38 | BRESULT fontmng_getsize(void *hdl, const char *string, POINT_T *pt); 39 | BRESULT fontmng_getdrawsize(void *hdl, const char *string, POINT_T *pt); 40 | FNTDAT fontmng_get(void *hdl, const char *string); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | 46 | 47 | 48 | // ---- for SDL 49 | 50 | BRESULT fontmng_init(void); 51 | void fontmng_setdeffontname(const char *name); 52 | -------------------------------------------------------------------------------- /windows/debuguty/viewitem.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file viewitem.h 3 | * @brief DebugUty 用ビュー基底クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | class CDebugUtyView; 9 | 10 | /** 11 | * @brief デバグ表示アイテムの基底クラス 12 | */ 13 | class CDebugUtyItem 14 | { 15 | public: 16 | static CDebugUtyItem* New(UINT nID, CDebugUtyView* lpView, const CDebugUtyItem* lpItem = NULL); 17 | 18 | CDebugUtyItem(CDebugUtyView* lpView, UINT nID); 19 | virtual ~CDebugUtyItem(); 20 | UINT GetID() const; 21 | 22 | virtual void Initialize(const CDebugUtyItem* lpItem = NULL); 23 | virtual bool Update(); 24 | virtual bool Lock(); 25 | virtual void Unlock(); 26 | virtual bool IsLocked(); 27 | virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam); 28 | virtual void OnPaint(HDC hDC, const RECT& rect); 29 | 30 | protected: 31 | CDebugUtyView* m_lpView; //!< ビュー クラス 32 | UINT m_nID; //!< ID 33 | }; 34 | 35 | /** 36 | * ID を返す 37 | * @return ID 38 | */ 39 | inline UINT CDebugUtyItem::GetID() const 40 | { 41 | return m_nID; 42 | } 43 | -------------------------------------------------------------------------------- /windows/resources/1252/np2vs2019_1252.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 15 | 16 | 17 | 18 | 19 | リソース ファイル 20 | 21 | 22 | -------------------------------------------------------------------------------- /windows/resources/932/np2vs2019_932.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 15 | 16 | 17 | 18 | 19 | リソース ファイル 20 | 21 | 22 | -------------------------------------------------------------------------------- /windows/resources/936/np2vs2019_936.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 15 | 16 | 17 | 18 | 19 | リソース ファイル 20 | 21 | 22 | -------------------------------------------------------------------------------- /windows/resources/950/np2vs2019_950.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 15 | 16 | 17 | 18 | 19 | リソース ファイル 20 | 21 | 22 | -------------------------------------------------------------------------------- /cbus/board14.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file board14.h 3 | * @brief Interface of PC-9801-14 4 | */ 5 | 6 | #pragma once 7 | 8 | /** 9 | * @breif The sturecture of PC-9801-14 10 | */ 11 | struct musicgen_t 12 | { 13 | UINT8 porta; 14 | UINT8 portb; 15 | UINT8 portc; 16 | UINT8 mask; 17 | UINT8 key[8]; 18 | int sync; 19 | int ch; 20 | }; 21 | struct musicgen_old_t // ステートセーブ互換性維持用(変更禁止) 22 | { 23 | UINT8 porta; 24 | UINT8 portb; 25 | UINT8 portc; 26 | UINT8 mask; 27 | UINT8 key[8]; 28 | int sync; 29 | int ch; 30 | }; 31 | 32 | typedef struct musicgen_t MUSICGEN; 33 | typedef struct musicgen_old_t MUSICGEN_OLD; 34 | 35 | #ifdef __cplusplus 36 | extern "C" 37 | { 38 | #endif 39 | 40 | extern MUSICGEN g_musicgen; 41 | 42 | void musicgenint(NEVENTITEM item); 43 | UINT board14_pitcount(void); 44 | 45 | void board14_allkeymake(void); 46 | 47 | void board14_reset(const NP2CFG *pConfig, BOOL bEnable); 48 | void board14_bind(void); 49 | void board14_unbind(void); 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | -------------------------------------------------------------------------------- /sound/pcmmix.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file pcmmix.h 3 | * @brief Interface of the pcm sound 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | 10 | enum { 11 | PMIXFLAG_L = 0x0001, 12 | PMIXFLAG_R = 0x0002, 13 | PMIXFLAG_LOOP = 0x0004 14 | }; 15 | 16 | typedef struct { 17 | UINT32 playing; 18 | UINT32 enable; 19 | } PMIXHDR; 20 | 21 | typedef struct { 22 | SINT16 *sample; 23 | UINT samples; 24 | } PMIXDAT; 25 | 26 | typedef struct { 27 | const SINT16 *pcm; 28 | UINT remain; 29 | PMIXDAT data; 30 | UINT flag; 31 | SINT32 volume; 32 | } PMIXTRK; 33 | 34 | typedef struct { 35 | PMIXHDR hdr; 36 | PMIXTRK trk[1]; 37 | } _PCMMIX, *PCMMIX; 38 | 39 | 40 | #ifdef __cplusplus 41 | extern "C" 42 | { 43 | #endif 44 | 45 | BRESULT pcmmix_regist(PMIXDAT *dat, void *datptr, UINT datsize, UINT rate); 46 | BRESULT pcmmix_regfile(PMIXDAT *dat, const OEMCHAR *fname, UINT rate); 47 | 48 | void SOUNDCALL pcmmix_getpcm(PCMMIX hdl, SINT32 *pcm, UINT count); 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | -------------------------------------------------------------------------------- /vram/scrnsave.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file scrnsave.h 3 | * @brief Interface of the screen saver 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | 10 | /** 11 | * types 12 | */ 13 | enum tagScrnSaveType 14 | { 15 | SCRNSAVE_1BIT = 0, 16 | SCRNSAVE_4BIT = 1, 17 | SCRNSAVE_8BIT = 2, 18 | SCRNSAVE_24BIT = 3 19 | }; 20 | 21 | /** 22 | * flags 23 | */ 24 | enum tagScrnSaveFlags 25 | { 26 | SCRNSAVE_AUTO = 0 27 | }; 28 | 29 | struct tagScrnSave; 30 | typedef struct tagScrnSave * SCRNSAVE; 31 | 32 | 33 | #ifdef __cplusplus 34 | extern "C" 35 | { 36 | #endif 37 | 38 | SCRNSAVE scrnsave_create(void); 39 | void scrnsave_destroy(SCRNSAVE hdl); 40 | int scrnsave_gettype(SCRNSAVE hdl); 41 | BRESULT scrnsave_writebmp(SCRNSAVE hdl, const OEMCHAR *filename, UINT flag); 42 | BRESULT scrnsave_getbmp(SCRNSAVE hdl, BMPFILE *lpbf, BMPINFO *lpbi, UINT8 **lplppal, UINT8 **lplppixels, UINT flag); 43 | BRESULT scrnsave_writegif(SCRNSAVE hdl, const OEMCHAR *filename, UINT flag); 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | -------------------------------------------------------------------------------- /windows/dialog/c_combodata.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file c_combodata.h 3 | * @brief コンボ データ クラスの宣言およびインターフェイスの定義をします 4 | */ 5 | 6 | #pragma once 7 | 8 | #include "misc/DlgProc.h" 9 | 10 | /** 11 | * @brief コンボ データ クラス 12 | */ 13 | class CComboData : public CComboBoxProc 14 | { 15 | public: 16 | /** 17 | * @brief エントリー 18 | */ 19 | struct Value 20 | { 21 | UINT32 nNumber; /*!< 数値 */ 22 | UINT32 nItemData; /*!< 値 */ 23 | }; 24 | 25 | /** 26 | * @brief エントリー 27 | */ 28 | struct Entry 29 | { 30 | LPCTSTR lpcszString; /*!< 文字列 */ 31 | UINT32 nItemData; /*!< 値 */ 32 | }; 33 | 34 | void Add(const UINT32* lpValues, UINT cchValues); 35 | void Add(const Value* lpValues, UINT cchValues); 36 | void Add(const Entry* lpEntries, UINT cchEntries); 37 | int Add(UINT32 nValue); 38 | int Add(UINT32 nValue, UINT32 nItemData); 39 | int Add(LPCTSTR lpString, UINT32 nItemData); 40 | int FindItemData(UINT32 nValue) const; 41 | bool SetCurItemData(UINT32 nValue); 42 | UINT32 GetCurItemData(UINT32 nDefault) const; 43 | }; 44 | -------------------------------------------------------------------------------- /io/egc.h: -------------------------------------------------------------------------------- 1 | 2 | typedef union { 3 | UINT8 _b[2]; 4 | UINT16 w; 5 | } EGCWORD; 6 | 7 | typedef union { 8 | UINT8 _b[4][2]; 9 | UINT16 w[4]; 10 | UINT32 d[2]; 11 | UINT64 q; 12 | } EGCQUAD; 13 | 14 | typedef struct { 15 | UINT16 access; 16 | UINT16 fgbg; 17 | UINT16 ope; 18 | UINT16 fg; 19 | EGCWORD mask; 20 | UINT16 bg; 21 | UINT16 sft; 22 | UINT16 leng; 23 | EGCQUAD lastvram; 24 | EGCQUAD patreg; 25 | EGCQUAD fgc; 26 | EGCQUAD bgc; 27 | 28 | int func; 29 | UINT remain; 30 | UINT stack; 31 | UINT8 *inptr; 32 | UINT8 *outptr; 33 | EGCWORD mask2; 34 | EGCWORD srcmask; 35 | UINT8 srcbit; 36 | UINT8 dstbit; 37 | UINT8 sft8bitl; 38 | UINT8 sft8bitr; 39 | 40 | UINT padding_b[4]; 41 | UINT8 buf[4096/8 + 4*4]; 42 | UINT padding_a[4]; 43 | } _EGC, *EGC; 44 | 45 | 46 | #ifdef __cplusplus 47 | extern "C" { 48 | #endif 49 | 50 | void egc_reset(const NP2CFG *pConfig); 51 | void egc_bind(void); 52 | void IOOUTCALL egc_w16(UINT port, REG16 value); 53 | 54 | #ifdef __cplusplus 55 | } 56 | #endif 57 | 58 | --------------------------------------------------------------------------------