diff --git a/src/Makefile.mingw b/src/Makefile.mingw index f15fece5c..cb53dabfc 100644 --- a/src/Makefile.mingw +++ b/src/Makefile.mingw @@ -8,7 +8,7 @@ # # Modified Makefile for Win32 (MinGW32) environment. # -# Version: @(#)Makefile.mingw 1.0.36 2017/08/21 +# Version: @(#)Makefile.mingw 1.0.37 2017/08/23 # # Authors: Miran Grca, # Fred N. van Kempen, @@ -20,7 +20,7 @@ PROG = 86Box endif # Various compile-time options. -# -DROM_TRACE=0xcd800 traces ROM access from segment C800 +# -DROM_TRACE=0xc800 traces ROM access from segment C800 # -DIO_TRACE=0x66 traces I/O on port 0x66 STUFF = @@ -66,13 +66,13 @@ endif ######################################################################### # Nothing should need changing from here on.. # ######################################################################### -VPATH = . cpu \ - sound \ - sound/munt sound/munt/c_interface sound/munt/sha1 \ - sound/munt/srchelper \ - sound/resid-fp \ - video lzf network network/slirp win -PLAT = win/ +VPATH = . CPU \ + SOUND \ + SOUND/MUNT SOUND/MUNT/c_interface SOUND/MUNT/sha1 \ + SOUND/MUNT/srchelper \ + SOUND/RESID-FP \ + VIDEO LZF NETWORK NETWORK/SLIRP WIN +PLAT = WIN/ ifeq ($(X64), y) CPP = g++.exe -m64 CC = gcc.exe -m64 @@ -325,24 +325,24 @@ clean: 86Box.res: 86Box.rc @echo Processing $< - @$(WINDRES) $(RFLAGS) $(EXTRAS) -i win/86Box.rc -o 86Box.res + @$(WINDRES) $(RFLAGS) $(EXTRAS) -i WIN/86Box.rc -o 86Box.res pcap_if.res: pcap_if.rc @echo Processing $< - @$(WINDRES) $(RFLAGS) -i win/pcap_if.rc -o pcap_if.res + @$(WINDRES) $(RFLAGS) -i WIN/pcap_if.rc -o pcap_if.res # Module dependencies. -acer386sx.o: ibm.h cpu/cpu.h io.h device.h model.h +acer386sx.o: ibm.h CPU/cpu.h io.h device.h model.h -ali1429.o: ibm.h cpu/cpu.h io.h mem.h device.h model.h +ali1429.o: ibm.h CPU/cpu.h io.h mem.h device.h model.h -amstrad.o: ibm.h cpu/cpu.h io.h device.h model.h keyboard.h lpt.h mouse.h +amstrad.o: ibm.h CPU/cpu.h io.h device.h model.h keyboard.h lpt.h mouse.h bugger.o: ibm.h io.h bugger.h cdrom.o: 86box.h cdrom.h ibm.h ide.h piix.h scsi.h timer.h \ - win/plat_iodev.h + WIN/plat_iodev.h cdrom_dosbox.o: cdrom_dosbox.h @@ -352,21 +352,21 @@ cdrom_ioctl.o: ibm.h cdrom.h cdrom_ioctl.h scsi.h cdrom_null.o: ibm.h cdrom.h cdrom_ioctl.h -compaq.o: ibm.h cpu/cpu.h mem.h device.h model.h +compaq.o: ibm.h CPU/cpu.h mem.h device.h model.h config.o: cdrom.h config.h device.h disc.h fdc.h fdd.h ibm.h \ - cpu/cpu.h gameport.h ide.h hdd.h model.h mouse.h \ - network/network.h nvr.h scsi.h win/plat_joystick.h \ - win/plat_midi.h sound/snd_dbopl.h sound/snd_mpu401.h \ - sound/snd_opl.h sound/sound.h video/video.h win/win.h \ - win/resource.h win/win_language.h + CPU/cpu.h gameport.h ide.h hdd.h model.h mouse.h \ + NETWORK/network.h nvr.h scsi.h WIN/plat_joystick.h \ + WIN/plat_midi.h SOUND/snd_dbopl.h SOUND/snd_mpu401.h \ + SOUND/snd_opl.h SOUND/sound.h VIDEO/video.h WIN/win.h \ + WIN/resource.h WIN/win_language.h -device.o: ibm.h cpu/cpu.h config.h device.h model.h sound/sound.h +device.o: ibm.h CPU/cpu.h config.h device.h model.h SOUND/sound.h disc.o: ibm.h config.h disc.h disc_fdi.h disc_img.h disc_86f.h \ disc_td0.h disc_imd.h fdc.h fdd.h timer.h -disc_86f.o: lzf/lzf.h config.h dma.h disc.h disc_86f.h disc_random.h \ +disc_86f.o: LZF/lzf.h config.h dma.h disc.h disc_86f.h disc_random.h \ fdc.h fdd.h ibm.h disc_fdi.o: ibm.h disc.h disc_img.h disc_fdi.h fdc.h fdd.h fdi2raw.h \ @@ -377,7 +377,7 @@ disc_random.o: disc_random.h disc_td0.o: ibm.h disc.h disc_td0.h fdc.h fdd.h -dma.o: ibm.h cpu/x86.h mem.h io.h dma.h +dma.o: ibm.h CPU/x86.h mem.h io.h dma.h esdi_at.o: ibm.h device.h hdd_image.h io.h mem.h pic.h rom.h timer.h \ esdi_at.h @@ -395,11 +395,11 @@ fdd.o: ibm.h disc.h fdc.h fdd.h fdi2raw.o: fdi2raw.h ibm.h -gameport.o: ibm.h cpu/cpu.h device.h io.h timer.h gameport.h \ +gameport.o: ibm.h CPU/cpu.h device.h io.h timer.h gameport.h \ joystick_ch_flightstick_pro.h joystick_standard.h \ joystick_sw_pad.h joystick_tm_fcs.h plat_joystick.h -hdd.o: ibm.h cpu/cpu.h device.h hdd.h model.h esdi_at.h \ +hdd.o: ibm.h CPU/cpu.h device.h hdd.h model.h esdi_at.h \ hdd_esdi.h mfm_at.h mfm_xebec.h xtide.h hdd_image.o: ibm.h ide.h hdd_image.h @@ -407,29 +407,29 @@ hdd_image.o: ibm.h ide.h hdd_image.h hdd_esdi.o: ibm.h device.h dma.h hdd_image.h io.h mca.h mem.h \ pic.h rom.h timer.h hdd_esdi.h -headland.o: ibm.h cpu/cpu.h io.h mem.h device.h model.h +headland.o: ibm.h CPU/cpu.h io.h mem.h device.h model.h -i430fx.o: ibm.h cpu/cpu.h mem.h pci.h device.h model.h +i430fx.o: ibm.h CPU/cpu.h mem.h pci.h device.h model.h -i430hx.o: ibm.h cpu/cpu.h io.h mem.h pci.h device.h model.h +i430hx.o: ibm.h CPU/cpu.h io.h mem.h pci.h device.h model.h -i430lx.o: ibm.h cpu/cpu.h mem.h pci.h device.h model.h +i430lx.o: ibm.h CPU/cpu.h mem.h pci.h device.h model.h -i430nx.o: ibm.h cpu/cpu.h mem.h pci.h device.h model.h +i430nx.o: ibm.h CPU/cpu.h mem.h pci.h device.h model.h -i430vx.o: ibm.h cpu/cpu.h io.h mem.h pci.h device.h model.h +i430vx.o: ibm.h CPU/cpu.h io.h mem.h pci.h device.h model.h -i440fx.o: ibm.h cpu/cpu.h io.h mem.h pci.h device.h model.h +i440fx.o: ibm.h CPU/cpu.h io.h mem.h pci.h device.h model.h ide.o: 86box.h cdrom.h hdd_image.h ibm.h io.h pic.h timer.h cdrom.h scsi.h ide.h -intel.o: ibm.h cpu/cpu.h io.h mem.h pit.h timer.h intel.h +intel.o: ibm.h CPU/cpu.h io.h mem.h pit.h timer.h intel.h -intel_flash.o: ibm.h cpu/cpu.h device.h mem.h model.h rom.h +intel_flash.o: ibm.h CPU/cpu.h device.h mem.h model.h rom.h io.o: ibm.h io.h -jim.o: ibm.h cpu/cpu.h io.h device.h model.h +jim.o: ibm.h CPU/cpu.h io.h device.h model.h joystick_ch_flightstick_pro.o: ibm.h device.h timer.h gameport.h \ joystick_standard.h plat_joystick.h @@ -445,23 +445,23 @@ joystick_tm_fcs.o: ibm.h device.h timer.h gameport.h \ keyboard.o: ibm.h plat_keyboard.h keyboard.h -keyboard_amstrad.o: ibm.h io.h mem.h pic.h pit.h timer.h sound/sound.h \ - sound/snd_speaker.h keyboard.h keyboard_amstrad.h +keyboard_amstrad.o: ibm.h io.h mem.h pic.h pit.h timer.h SOUND/sound.h \ + SOUND/snd_speaker.h keyboard.h keyboard_amstrad.h keyboard_at.o: ibm.h io.h mem.h pic.h pit.h timer.h disc.h fdc.h \ - sound/sound.h sound/snd_speaker.h keyboard.h keyboard_at.h + SOUND/sound.h SOUND/snd_speaker.h keyboard.h keyboard_at.h keyboard_olim24.o: ibm.h io.h mem.h pic.h pit.h timer.h mouse.h \ - sound/sound.h sound/snd_speaker.h keyboard.h keyboard_olim24.h + SOUND/sound.h SOUND/snd_speaker.h keyboard.h keyboard_olim24.h keyboard_pcjr.o: ibm.h io.h mem.h nmi.h pic.h pit.h timer.h \ - device.h sound/sound.h sound/snd_speaker.h \ - sound/snd_sn76489.h keyboard.h keyboard_pcjr.h + device.h SOUND/sound.h SOUND/snd_speaker.h \ + SOUND/snd_sn76489.h keyboard.h keyboard_pcjr.h keyboard_xt.o: ibm.h io.h mem.h pic.h pit.h timer.h device.h tandy_eeprom.h \ - sound/sound.h sound/snd_speaker.h keyboard.h keyboard_xt.h + SOUND/sound.h SOUND/snd_speaker.h keyboard.h keyboard_xt.h -laserxt.o: ibm.h cpu/cpu.h io.h mem.h device.h model.h +laserxt.o: ibm.h CPU/cpu.h io.h mem.h device.h model.h lpt.o: ibm.h io.h lpt.h @@ -469,8 +469,8 @@ mca.o: ibm.h io.h mem.h mca.h mcr.o: ibm.h -mem.o: ibm.h cpu/cpu.h cpu/x86_ops.h cpu/x86.h config.h \ - io.h mem.h rom.h cpu/codegen.h video/video.h +mem.o: ibm.h CPU/cpu.h CPU/x86_ops.h CPU/x86.h config.h \ + io.h mem.h rom.h CPU/codegen.h VIDEO/video.h memregs.o: ibm.h io.h memregs.h @@ -478,19 +478,19 @@ mfm_at.o: ibm.h device.h hdd_image.h io.h pic.h timer.h mfm_at.h mfm_xebec.o: ibm.h device.h dma.h hdd_image.h io.h mem.h pic.h rom.h timer.h mfm_xebec.h -model.o: ibm.h io.h mem.h rom.h device.h model.h cpu/cpu.h \ +model.o: ibm.h io.h mem.h rom.h device.h model.h CPU/cpu.h \ mouse.h cdrom.h disc.h dma.h fdc.h \ fdc37c665.h fdc37c669.h fdc37c932fr.h \ gameport.h ide.h intel.h intel_flash.h \ keyboard_amstrad.h keyboard_at.h keyboard_olim24.h \ keyboard_pcjr.h keyboard_xt.h lpt.h mem.h memregs.h \ nmi.h nvr.h pc87306.h pci.h pic.h piix.h pit.h ps2_mca.h \ - serial.h sis85c471.h sio.h sound/snd_ps1.h sound/snd_pssj.h \ - sound/snd_sn76489.h tandy_eeprom.h tandy_rom.h \ - video/vid_pcjr.h video/vid_tandy.h w83877f.h wd76c10.h \ + serial.h sis85c471.h sio.h SOUND/snd_ps1.h SOUND/snd_pssj.h \ + SOUND/snd_sn76489.h tandy_eeprom.h tandy_rom.h \ + VIDEO/vid_pcjr.h VIDEO/vid_tandy.h w83877f.h wd76c10.h \ xtide.h bugger.h -mouse.o: ibm.h cpu/cpu.h device.h model.h mouse.h keyboard_olim24.h +mouse.o: ibm.h CPU/cpu.h device.h model.h mouse.h keyboard_olim24.h mouse_bus.o: ibm.h io.h pic.h timer.h mouse.h @@ -498,28 +498,28 @@ mouse_ps2.o: ibm.h keyboard_at.h mouse.h plat_mouse.h mouse_serial.o: ibm.h timer.h serial.h mouse.h -neat.o: ibm.h cpu/cpu.h io.h device.h model.h +neat.o: ibm.h CPU/cpu.h io.h device.h model.h nmi.o: ibm.h io.h nmi.h -nvr.o: ibm.h cpu/cpu.h device.h io.h mem.h model.h nvr.h \ +nvr.o: ibm.h CPU/cpu.h device.h io.h mem.h model.h nvr.h \ pic.h rom.h timer.h rtc.h -olivetti_m24.o: ibm.h cpu/cpu.h io.h device.h model.h +olivetti_m24.o: ibm.h CPU/cpu.h io.h device.h model.h -opti495.o: ibm.h cpu/cpu.h io.h mem.h device.h model.h +opti495.o: ibm.h CPU/cpu.h io.h mem.h device.h model.h -pc.o: 86box.h ibm.h mem.h cpu/cpu.h cpu/x86_ops.h cpu/codegen.h \ +pc.o: 86box.h ibm.h mem.h CPU/cpu.h CPU/x86_ops.h CPU/codegen.h \ dma.h nvr.h pic.h pit.h timer.h device.h model.h disc.h \ disc_86f.h disc_fdi.h disc_imd.h disc_img.h disc_td0.h \ disc_random.h config.h fdc.h fdd.h gameport.h plat_joystick.h \ plat_midi.h hdd.h ide.h cdrom.h cdrom_ioctl.h cdrom_image.h \ cdrom_null.h scsi.h keyboard.h plat_keyboard.h keyboard_at.h \ - mouse.h plat_mouse.h network/network.h serial.h \ - sound/sound.h sound/snd_cms.h sound/snd_dbopl.h \ - sound/snd_mpu401.h sound/snd_opl.h sound/snd_gus.h \ - sound/snd_sb.h sound/snd_speaker.h sound/snd_ssi2001.h \ - video/video.h video/vid_voodoo.h win/plat_ui.h + mouse.h plat_mouse.h NETWORK/network.h serial.h \ + SOUND/sound.h SOUND/snd_cms.h SOUND/snd_dbopl.h \ + SOUND/snd_mpu401.h SOUND/snd_opl.h SOUND/snd_gus.h \ + SOUND/snd_sb.h SOUND/snd_speaker.h SOUND/snd_ssi2001.h \ + VIDEO/video.h VIDEO/vid_voodoo.h WIN/plat_ui.h pc87306.o: ibm.h disc.h fdc.h fdd.h ide.h io.h lpt.h serial.h pc87306.h @@ -529,16 +529,16 @@ pic.o: ibm.h io.h pic.h pit.h piix.o: ibm.h dma.h ide.h io.h mem.h pci.h piix.h -pit.o: ibm.h cpu/cpu.h dma.h io.h pic.h pit.h device.h timer.h \ - model.h sound/snd_speaker.h video/video.h +pit.o: ibm.h CPU/cpu.h dma.h io.h pic.h pit.h device.h timer.h \ + model.h SOUND/snd_speaker.h video/video.h ppi.o: ibm.h pit.h plat_keyboard.h plat_mouse.h -ps1.o: ibm.h cpu/cpu.h io.h mem.h rom.h device.h model.h lpt.h serial.h +ps1.o: ibm.h CPU/cpu.h io.h mem.h rom.h device.h model.h lpt.h serial.h -ps2.o: ibm.h cpu/cpu.h io.h mem.h rom.h device.h model.h lpt.h serial.h +ps2.o: ibm.h CPU/cpu.h io.h mem.h rom.h device.h model.h lpt.h serial.h -ps2_mca.o: ibm.h cpu/cpu.h cpu/x86.h io.h mca.h mem.h rom.h device.h \ +ps2_mca.o: ibm.h CPU/cpu.h CPU/x86.h io.h mca.h mem.h rom.h device.h \ lpt.h ps2_mca.h ps2_nvr.h serial.h ps2_nvr.o: ibm.h device.h io.h mem.h rom.h ps2_nvr.h @@ -547,7 +547,7 @@ rom.o: config.h ibm.h mem.h rom.h rtc.o: nvr.h rtc.h -scat.o: ibm.h cpu/cpu.h io.h mem.h device.h model.h +scat.o: ibm.h CPU/cpu.h io.h mem.h device.h model.h scsi.o: 86box.h ibm.h timer.h device.h cdrom.h scsi.h \ scsi_aha154x.h scsi_buslogic.h @@ -562,7 +562,7 @@ scsi_buslogic.o: ibm.h io.h mem.h rom.h dma.h pic.h pci.h timer.h \ scsi_buslogic.h scsi_disk.o: 86box.h cdrom.h hdd_image.h ibm.h ide.h piix.h scsi.h \ - scsi_disk.h timer.h win/plat_iodev.h + scsi_disk.h timer.h WIN/plat_iodev.h serial.o: ibm.h io.h pic.h timer.h serial.h plat_serial.h @@ -571,7 +571,7 @@ serial_old.o: ibm.h io.h mouse.h pic.h serial.h timer.h sio.o: ibm.h cdrom.h disc.h dma.h fdc.h keyboard_at.h ide.h \ io.h mem.h pci.h sio.h -sis496.o: ibm.h cpu/cpu.h io.h mem.h pci.h device.h model.h +sis496.o: ibm.h CPU/cpu.h io.h mem.h pci.h device.h model.h sis50x.o: ibm.h device.h io.h mem.h pci.h sis50x.h @@ -593,233 +593,229 @@ wd76c10.o: ibm.h disc.h fdc.h io.h mem.h serial.h wd76c10.h xtide.o: ibm.h io.h mem.h rom.h device.h ide.h xtide.h -# cpu/ -386.o: ibm.h cpu/cpu.h cpu/x86.h cpu/x87.h mem.h disc.h fdc.h pic.h timer.h cpu/386_common.h +386.o: ibm.h CPU/cpu.h CPU/x86.h CPU/x87.h mem.h disc.h fdc.h pic.h timer.h CPU/386_common.h -386_dynarec.o: ibm.h cpu/cpu.h cpu/x86.h cpu/x86_ops.h cpu/x87.h mem.h cpu/codegen.h disc.h fdc.h pic.h timer.h cpu/386_common.h \ - cpu/x86_ops.h cpu/x86seg.h cpu/x86_ops_arith.h cpu/x86_ops_atomic.h cpu/x86_ops_bcd.h cpu/x86_ops_bit.h \ - cpu/x86_ops_bitscan.h cpu/x86_ops_call.h cpu/x86_ops_flag.h cpu/x86_ops_fpu.h cpu/x86_ops_inc_dec.h cpu/x86_ops_int.h \ - cpu/x86_ops_io.h cpu/x86_ops_jump.h cpu/x86_ops_misc.h \ - cpu/x87_ops_arith.h cpu/x87_ops_misc.h cpu/x87_ops_loadstore.h \ - cpu/x87_ops.h cpu/x86_ops_i686.h cpu/x86_ops_mmx.h \ - cpu/x86_ops_mmx_arith.h cpu/x86_ops_mmx_cmp.h cpu/x86_ops_mmx_logic.h cpu/x86_ops_mmx_pack.h cpu/x86_ops_mmx_shift.h \ - cpu/x86_ops_mov.h cpu/x86_ops_mov_ctrl.h cpu/x86_ops_mov_seg.h cpu/x86_ops_movx.h cpu/x86_ops_msr.h cpu/x86_ops_mul.h \ - cpu/x86_ops_pmode.h cpu/x86_ops_prefix.h cpu/x86_ops_rep.h cpu/x86_ops_ret.h cpu/x86_ops_set.h cpu/x86_ops_shift.h \ - cpu/x86_ops_stack.h cpu/x86_ops_string.h cpu/x86_ops_xchg.h \ - cpu/386_ops.h +386_dynarec.o: ibm.h CPU/cpu.h CPU/x86.h CPU/x86_ops.h CPU/x87.h mem.h CPU/codegen.h disc.h fdc.h pic.h timer.h CPU/386_common.h \ + CPU/x86_ops.h CPU/x86seg.h CPU/x86_ops_arith.h CPU/x86_ops_atomic.h CPU/x86_ops_bcd.h CPU/x86_ops_bit.h \ + CPU/x86_ops_bitscan.h CPU/x86_ops_call.h CPU/x86_ops_flag.h CPU/x86_ops_fpu.h CPU/x86_ops_inc_dec.h CPU/x86_ops_int.h \ + CPU/x86_ops_io.h CPU/x86_ops_jump.h CPU/x86_ops_misc.h \ + CPU/x87_ops_arith.h CPU/x87_ops_misc.h CPU/x87_ops_loadstore.h \ + CPU/x87_ops.h CPU/x86_ops_i686.h CPU/x86_ops_mmx.h \ + CPU/x86_ops_mmx_arith.h CPU/x86_ops_mmx_cmp.h CPU/x86_ops_mmx_logic.h CPU/x86_ops_mmx_pack.h CPU/x86_ops_mmx_shift.h \ + CPU/x86_ops_mov.h CPU/x86_ops_mov_ctrl.h CPU/x86_ops_mov_seg.h CPU/x86_ops_movx.h CPU/x86_ops_msr.h CPU/x86_ops_mul.h \ + CPU/x86_ops_pmode.h CPU/x86_ops_prefix.h CPU/x86_ops_rep.h CPU/x86_ops_ret.h CPU/x86_ops_set.h CPU/x86_ops_shift.h \ + CPU/x86_ops_stack.h CPU/x86_ops_string.h CPU/x86_ops_xchg.h \ + CPU/386_ops.h -386_dynarec_ops.o: ibm.h cpu/cpu.h cpu/x86.h cpu/x86_ops.h cpu/x87.h cpu/x86_flags.h mem.h cpu/codegen.h pic.h cpu/386_common.h \ - cpu/x86_ops.h cpu/x86seg.h cpu/x86_ops_arith.h cpu/x86_ops_atomic.h cpu/x86_ops_bcd.h cpu/x86_ops_bit.h \ - cpu/x86_ops_bitscan.h cpu/x86_ops_call.h cpu/x86_ops_flag.h cpu/x86_ops_fpu.h cpu/x86_ops_inc_dec.h cpu/x86_ops_int.h \ - cpu/x86_ops_io.h cpu/x86_ops_jump.h cpu/x86_ops_misc.h \ - cpu/x87_ops_arith.h cpu/x87_ops_misc.h cpu/x87_ops_loadstore.h \ - cpu/x87_ops.h cpu/x86_ops_i686.h cpu/x86_ops_mmx.h \ - cpu/x86_ops_mmx_arith.h cpu/x86_ops_mmx_cmp.h cpu/x86_ops_mmx_logic.h cpu/x86_ops_mmx_pack.h cpu/x86_ops_mmx_shift.h \ - cpu/x86_ops_mov.h cpu/x86_ops_mov_ctrl.h cpu/x86_ops_mov_seg.h cpu/x86_ops_movx.h cpu/x86_ops_msr.h cpu/x86_ops_mul.h \ - cpu/x86_ops_pmode.h cpu/x86_ops_prefix.h cpu/x86_ops_rep.h cpu/x86_ops_ret.h cpu/x86_ops_set.h cpu/x86_ops_shift.h \ - cpu/x86_ops_stack.h cpu/x86_ops_string.h cpu/x86_ops_xchg.h \ - cpu/386_ops.h +386_dynarec_ops.o: ibm.h CPU/cpu.h CPU/x86.h CPU/x86_ops.h CPU/x87.h CPU/x86_flags.h mem.h CPU/codegen.h pic.h CPU/386_common.h \ + CPU/x86_ops.h CPU/x86seg.h CPU/x86_ops_arith.h CPU/x86_ops_atomic.h CPU/x86_ops_bcd.h CPU/x86_ops_bit.h \ + CPU/x86_ops_bitscan.h CPU/x86_ops_call.h CPU/x86_ops_flag.h CPU/x86_ops_fpu.h CPU/x86_ops_inc_dec.h CPU/x86_ops_int.h \ + CPU/x86_ops_io.h CPU/x86_ops_jump.h CPU/x86_ops_misc.h \ + CPU/x87_ops_arith.h CPU/x87_ops_misc.h CPU/x87_ops_loadstore.h \ + CPU/x87_ops.h CPU/x86_ops_i686.h CPU/x86_ops_mmx.h \ + CPU/x86_ops_mmx_arith.h CPU/x86_ops_mmx_cmp.h CPU/x86_ops_mmx_logic.h CPU/x86_ops_mmx_pack.h CPU/x86_ops_mmx_shift.h \ + CPU/x86_ops_mov.h CPU/x86_ops_mov_ctrl.h CPU/x86_ops_mov_seg.h CPU/x86_ops_movx.h CPU/x86_ops_msr.h CPU/x86_ops_mul.h \ + CPU/x86_ops_pmode.h CPU/x86_ops_prefix.h CPU/x86_ops_rep.h CPU/x86_ops_ret.h CPU/x86_ops_set.h CPU/x86_ops_shift.h \ + CPU/x86_ops_stack.h CPU/x86_ops_string.h CPU/x86_ops_xchg.h \ + CPU/386_ops.h -808x.o: ibm.h cpu/cpu.h cpu/x86.h keyboard.h mem.h nmi.h pic.h scsi.h timer.h +808x.o: ibm.h CPU/cpu.h CPU/x86.h keyboard.h mem.h nmi.h pic.h scsi.h timer.h -codegen.o: ibm.h cpu/x86_ops.h mem.h cpu/codegen.h +codegen.o: ibm.h CPU/x86_ops.h mem.h CPU/codegen.h -codegen_ops.o: ibm.h mem.h cpu/x86.h cpu/x86_ops.h cpu/x86_flags.h cpu/x87.h cpu/386_common.h cpu/cpu.h cpu/codegen.h cpu/codegen_ops.h \ - cpu/$(CGOPS) cpu/codegen_ops_arith.h cpu/codegen_ops_fpu.h cpu/codegen_ops_jump.h cpu/codegen_ops_logic.h cpu/codegen_ops_misc.h \ - cpu/codegen_ops_mmx.h cpu/codegen_ops_mov.h cpu/codegen_ops_shift.h cpu/codegen_ops_stack.h cpu/codegen_ops_xchg.h +codegen_ops.o: ibm.h mem.h CPU/x86.h CPU/x86_ops.h CPU/x86_flags.h CPU/x87.h CPU/386_common.h CPU/cpu.h CPU/codegen.h CPU/codegen_ops.h \ + CPU/$(CGOPS) CPU/codegen_ops_arith.h CPU/codegen_ops_fpu.h CPU/codegen_ops_jump.h CPU/codegen_ops_logic.h CPU/codegen_ops_misc.h \ + CPU/codegen_ops_mmx.h CPU/codegen_ops_mov.h CPU/codegen_ops_shift.h CPU/codegen_ops_stack.h CPU/codegen_ops_xchg.h -codegen_timing_486.o: ibm.h cpu/cpu.h cpu/x86.h cpu/x87_ops.h cpu/x87.h mem.h cpu/codegen.h cpu/codegen_ops.h cpu/codegen_timing_common.h +codegen_timing_486.o: ibm.h CPU/cpu.h CPU/x86.h CPU/x87_ops.h CPU/x87.h mem.h CPU/codegen.h CPU/codegen_ops.h CPU/codegen_timing_common.h -codegen_timing_686.o: ibm.h cpu/cpu.h cpu/x86.h cpu/x87_ops.h cpu/x87.h mem.h cpu/codegen.h cpu/codegen_timing_common.h +codegen_timing_686.o: ibm.h CPU/cpu.h CPU/x86.h CPU/x87_ops.h CPU/x87.h mem.h CPU/codegen.h CPU/codegen_timing_common.h -codegen_timing_common.o: ibm.h cpu/codegen_timing_common.h +codegen_timing_common.o: ibm.h CPU/codegen_timing_common.h -codegen_timing_pentium.o: ibm.h cpu/cpu.h cpu/x86.h cpu/x87_ops.h cpu/x87.h mem.h cpu/codegen.h cpu/codegen_ops.h cpu/codegen_timing_common.h +codegen_timing_pentium.o: ibm.h CPU/cpu.h CPU/x86.h CPU/x87_ops.h CPU/x87.h mem.h CPU/codegen.h CPU/codegen_ops.h CPU/codegen_timing_common.h -codegen_timing_winchip.o: ibm.h cpu/cpu.h cpu/x86.h cpu/x87_ops.h cpu/x87.h mem.h cpu/codegen.h cpu/codegen_ops.h cpu/codegen_timing_common.h +codegen_timing_winchip.o: ibm.h CPU/cpu.h CPU/x86.h CPU/x87_ops.h CPU/x87.h mem.h CPU/codegen.h CPU/codegen_ops.h CPU/codegen_timing_common.h -codegen_x86.o: ibm.h cpu/cpu.h cpu/x86.h cpu/x86_flags.h cpu/x86_ops.h cpu/x87.h mem.h cpu/386_common.h cpu/codegen.h cpu/codegen_ops.h \ - cpu/codegen_ops_x86.h +codegen_x86.o: ibm.h CPU/cpu.h CPU/x86.h CPU/x86_flags.h CPU/x86_ops.h CPU/x87.h mem.h CPU/386_common.h CPU/codegen.h CPU/codegen_ops.h \ + CPU/codegen_ops_x86.h -codegen_x86-64.o: ibm.h mem.h cpu/cpu.h cpu/x86.h cpu/x86_flags.h cpu/x86_ops.h cpu/x87.h cpu/386_common.h cpu/codegen.h cpu/codegen_ops.h \ - cpu/codegen_ops_x86-64.h +codegen_x86-64.o: ibm.h mem.h CPU/cpu.h CPU/x86.h CPU/x86_flags.h CPU/x86_ops.h CPU/x87.h CPU/386_common.h CPU/codegen.h CPU/codegen_ops.h \ + CPU/codegen_ops_x86-64.h -cpu.o: ibm.h cpu/cpu.h device.h model.h io.h cpu/x86_ops.h mem.h pci.h cpu/codegen.h +cpu.o: ibm.h CPU/cpu.h device.h model.h io.h CPU/x86_ops.h mem.h pci.h CPU/codegen.h -x86seg.o: ibm.h mem.h nvr.h cpu/x86.h cpu/386.h cpu/386_common.h cpu/cpu.h +x86seg.o: ibm.h mem.h nvr.h CPU/x86.h CPU/386.h CPU/386_common.h CPU/cpu.h -x87.o: ibm.h pic.h cpu/x86.h cpu/x86_flags.h cpu/x86_ops.h cpu/x87.h cpu/386_common.h +x87.o: ibm.h pic.h CPU/x86.h CPU/x86_flags.h CPU/x86_ops.h CPU/x87.h CPU/386_common.h -# network/ -net_ne2000.o: ibm.h io.h mem.h rom.h pci.h pic.h device.h config.h disc_random.h network/network.h network/net_ne2000.h network/bswap.h +net_ne2000.o: ibm.h io.h mem.h rom.h pci.h pic.h device.h config.h disc_random.h NETWORK/network.h NETWORK/net_ne2000.h NETWORK/bswap.h -net_pcap.o: ibm.h config.h device.h network/network.h win/plat_dynld.h win/plat_thread.h +net_pcap.o: ibm.h config.h device.h NETWORK/network.h WIN/plat_dynld.h WIN/plat_thread.h -net_slirp.o: network/slirp/slirp.h network/slirp/queue.h ibm.h config.h device.h network/network.h win/plat_thread.h +net_slirp.o: NETWORK/slirp/slirp.h NETWORK/slirp/queue.h ibm.h config.h device.h NETWORK/network.h WIN/plat_thread.h -network.o: ibm.h device.h network/network.h network/net_ne2000.h win/plat_ui.h +network.o: ibm.h device.h NETWORK/network.h NETWORK/net_ne2000.h WIN/plat_ui.h -# video/ -vid_ati_eeprom.o: ibm.h mem.h rom.h video/vid_ati_eeprom.h +vid_ati_eeprom.o: ibm.h mem.h rom.h VIDEO/vid_ati_eeprom.h -vid_ati_mach64.o: ibm.h device.h io.h mem.h pci.h rom.h win/plat_thread.h video/video.h video/vid_svga.h video/vid_svga_render.h \ - video/vid_ati68860_ramdac.h video/vid_ati_eeprom.h video/vid_ics2595.h +vid_ati_mach64.o: ibm.h device.h io.h mem.h pci.h rom.h WIN/plat_thread.h VIDEO/video.h VIDEO/vid_svga.h VIDEO/vid_svga_render.h \ + VIDEO/vid_ati68860_ramdac.h VIDEO/vid_ati_eeprom.h VIDEO/vid_ics2595.h -vid_ati18800.o: ibm.h io.h mem.h rom.h device.h video/video.h video/vid_ati18800.h video/vid_ati_eeprom.h video/vid_svga.h +vid_ati18800.o: ibm.h io.h mem.h rom.h device.h VIDEO/video.h VIDEO/vid_ati18800.h VIDEO/vid_ati_eeprom.h VIDEO/vid_svga.h -vid_ati28800.o: ibm.h io.h mem.h rom.h device.h timer.h video/video.h video/vid_ati28800.h video/vid_ati_eeprom.h video/vid_svga.h \ - video/vid_svga_render.h +vid_ati28800.o: ibm.h io.h mem.h rom.h device.h timer.h VIDEO/video.h VIDEO/vid_ati28800.h VIDEO/vid_ati_eeprom.h VIDEO/vid_svga.h \ + VIDEO/vid_svga_render.h -vid_ati68860_ramdac.o: ibm.h mem.h video/video.h video/vid_svga.h video/vid_ati68860_ramdac.h video/vid_svga_render.h +vid_ati68860_ramdac.o: ibm.h mem.h VIDEO/video.h VIDEO/vid_svga.h VIDEO/vid_ati68860_ramdac.h VIDEO/vid_svga_render.h -vid_cga.o: ibm.h io.h mem.h timer.h device.h video/video.h video/vid_cga.h video/vid_cga_comp.h win/win_cgapal.h +vid_cga.o: ibm.h io.h mem.h timer.h device.h VIDEO/video.h VIDEO/vid_cga.h VIDEO/vid_cga_comp.h WIN/win_cgapal.h -vid_cga_comp.o: ibm.h device.h mem.h video/vid_cga.h video/vid_cga_comp.h +vid_cga_comp.o: ibm.h device.h mem.h VIDEO/vid_cga.h VIDEO/vid_cga_comp.h -vid_cl_gd.o: ibm.h io.h mem.h rom.h device.h video/video.h video/vid_svga.h video/vid_svga_render.h video/vid_cl_ramdac.h \ - video/vid_cl_gd.h video/vid_cl_gd_blit.h +vid_cl_gd.o: ibm.h io.h mem.h rom.h device.h VIDEO/video.h VIDEO/vid_svga.h VIDEO/vid_svga_render.h VIDEO/vid_cl_ramdac.h \ + VIDEO/vid_cl_gd.h VIDEO/vid_cl_gd_blit.h -vid_cl_gd_blit.o: ibm.h io.h mem.h rom.h device.h video/video.h video/vid_svga.h video/vid_svga_render.h video/vid_cl_ramdac.h \ - video/vid_cl_gd.h video/vid_cl_gd_blit.h video/vid_cl_gd_vga_rop.h +vid_cl_gd_blit.o: ibm.h io.h mem.h rom.h device.h VIDEO/video.h VIDEO/vid_svga.h VIDEO/vid_svga_render.h VIDEO/vid_cl_ramdac.h \ + VIDEO/vid_cl_gd.h VIDEO/vid_cl_gd_blit.h VIDEO/vid_cl_gd_vga_rop.h -vid_cl_gd_ramdac.o: ibm.h mem.h rom.h device.h video/video.h video/vid_svga.h video/vid_cl_ramdac.h video/vid_cl_gd.h \ - video/vid_cl_gd_blit.h +vid_cl_gd_ramdac.o: ibm.h mem.h rom.h device.h VIDEO/video.h VIDEO/vid_svga.h VIDEO/vid_cl_ramdac.h VIDEO/vid_cl_gd.h \ + VIDEO/vid_cl_gd_blit.h -vid_colorplus.o: ibm.h io.h mem.h timer.h device.h video/video.h video/vid_cga.h video/vid_colorplus.h video/vid_cga_comp.h +vid_colorplus.o: ibm.h io.h mem.h timer.h device.h VIDEO/video.h VIDEO/vid_cga.h VIDEO/vid_colorplus.h VIDEO/vid_cga_comp.h -vid_ega.o: ibm.h io.h mem.h rom.h timer.h device.h video/video.h video/vid_ega.h video/vid_ega_render.h +vid_ega.o: ibm.h io.h mem.h rom.h timer.h device.h VIDEO/video.h VIDEO/vid_ega.h VIDEO/vid_ega_render.h -vid_ega_render.o: ibm.h device.h mem.h rom.h video/video.h video/vid_ega.h video/vid_ega_render.h +vid_ega_render.o: ibm.h device.h mem.h rom.h VIDEO/video.h VIDEO/vid_ega.h VIDEO/vid_ega_render.h -vid_et4000.o: ibm.h io.h mem.h rom.h device.h video/video.h video/vid_svga.h video/vid_sc1502x_ramdac.h video/vid_et4000.h +vid_et4000.o: ibm.h io.h mem.h rom.h device.h VIDEO/video.h VIDEO/vid_svga.h VIDEO/vid_sc1502x_ramdac.h VIDEO/vid_et4000.h -vid_et4000w32.o: ibm.h io.h mem.h pci.h rom.h device.h win/plat_thread.h video/video.h video/vid_svga.h video/vid_icd2061.h \ - video/vid_stg_ramdac.h +vid_et4000w32.o: ibm.h io.h mem.h pci.h rom.h device.h WIN/plat_thread.h VIDEO/video.h VIDEO/vid_svga.h VIDEO/vid_icd2061.h \ + VIDEO/vid_stg_ramdac.h -vid_genius.o: ibm.h io.h mem.h rom.h timer.h device.h video/video.h video/vid_genius.h +vid_genius.o: ibm.h io.h mem.h rom.h timer.h device.h VIDEO/video.h VIDEO/vid_genius.h -vid_hercules.o: ibm.h mem.h io.h timer.h device.h video/video.h video/vid_hercules.h win/win_cgapal.h +vid_hercules.o: ibm.h mem.h io.h timer.h device.h VIDEO/video.h VIDEO/vid_hercules.h WIN/win_cgapal.h -vid_herculesplus.o: ibm.h io.h mem.h timer.h device.h video/video.h video/vid_herculesplus.h +vid_herculesplus.o: ibm.h io.h mem.h timer.h device.h VIDEO/video.h VIDEO/vid_herculesplus.h -vid_icd2061.o: ibm.h video/vid_icd2061.h +vid_icd2061.o: ibm.h VIDEO/vid_icd2061.h -vid_ics2595.o: ibm.h video/vid_ics2595.h +vid_ics2595.o: ibm.h VIDEO/vid_ics2595.h -vid_incolor.o: ibm.h io.h mem.h timer.h device.h video/video.h video/vid_incolor.h +vid_incolor.o: ibm.h io.h mem.h timer.h device.h VIDEO/video.h VIDEO/vid_incolor.h -vid_mda.o: ibm.h io.h mem.h timer.h device.h video/video.h video/vid_mda.h win/win_cgapal.h +vid_mda.o: ibm.h io.h mem.h timer.h device.h VIDEO/video.h VIDEO/vid_mda.h WIN/win_cgapal.h -vid_nv_riva128.o: ibm.h io.h mem.h pci.h pic.h rom.h timer.h device.h win/plat_thread.h video/video.h video/vid_svga.h \ - video/vid_svga_render.h +vid_nv_riva128.o: ibm.h io.h mem.h pci.h pic.h rom.h timer.h device.h WIN/plat_thread.h VIDEO/video.h VIDEO/vid_svga.h \ + VIDEO/vid_svga_render.h -vid_olivetti_m24.o: ibm.h io.h mem.h timer.h device.h video/video.h video/vid_olivetti_m24.h +vid_olivetti_m24.o: ibm.h io.h mem.h timer.h device.h VIDEO/video.h VIDEO/vid_olivetti_m24.h -vid_oti067.o: ibm.h io.h mem.h rom.h device.h video/video.h video/vid_oti067.h video/vid_svga.h +vid_oti067.o: ibm.h io.h mem.h rom.h device.h VIDEO/video.h VIDEO/vid_oti067.h VIDEO/vid_svga.h -vid_paradise.o: ibm.h io.h mem.h rom.h device.h video/video.h video/vid_paradise.h video/vid_svga.h video/vid_svga_render.h +vid_paradise.o: ibm.h io.h mem.h rom.h device.h VIDEO/video.h VIDEO/vid_paradise.h VIDEO/vid_svga.h VIDEO/vid_svga_render.h -vid_pc200.o: ibm.h io.h mem.h timer.h device.h video/video.h video/vid_cga.h video/vid_pc200.h +vid_pc200.o: ibm.h io.h mem.h timer.h device.h VIDEO/video.h VIDEO/vid_cga.h VIDEO/vid_pc200.h -vid_pc1512.o: ibm.h io.h mem.h timer.h device.h video/video.h video/vid_pc1512.h +vid_pc1512.o: ibm.h io.h mem.h timer.h device.h VIDEO/video.h VIDEO/vid_pc1512.h -vid_pc1640.o: ibm.h io.h mem.h rom.h timer.h device.h video/video.h video/vid_cga.h video/vid_ega.h video/vid_pc1640.h +vid_pc1640.o: ibm.h io.h mem.h rom.h timer.h device.h VIDEO/video.h VIDEO/vid_cga.h VIDEO/vid_ega.h VIDEO/vid_pc1640.h -vid_pcjr.o: ibm.h io.h mem.h pic.h timer.h device.h video/video.h video/vid_cga_comp.h video/vid_pcjr.h +vid_pcjr.o: ibm.h io.h mem.h pic.h timer.h device.h VIDEO/video.h VIDEO/vid_cga_comp.h VIDEO/vid_pcjr.h -vid_ps1_svga.o: ibm.h io.h mem.h rom.h device.h video/video.h video/vid_svga.h video/vid_vga.h +vid_ps1_svga.o: ibm.h io.h mem.h rom.h device.h VIDEO/video.h VIDEO/vid_svga.h VIDEO/vid_vga.h -vid_s3.o: ibm.h device.h io.h mem.h pci.h rom.h win/plat_thread.h video/video.h video/vid_s3.h video/vid_svga.h \ - video/vid_svga_render.h video/vid_sdac_ramdac.h +vid_s3.o: ibm.h device.h io.h mem.h pci.h rom.h WIN/plat_thread.h VIDEO/video.h VIDEO/vid_s3.h VIDEO/vid_svga.h \ + VIDEO/vid_svga_render.h VIDEO/vid_sdac_ramdac.h -vid_s3_virge.o: ibm.h io.h mem.h pci.h rom.h device.h win/plat_thread.h video/video.h video/vid_s3_virge.h video/vid_svga.h \ - video/vid_svga_render.h +vid_s3_virge.o: ibm.h io.h mem.h pci.h rom.h device.h WIN/plat_thread.h VIDEO/video.h VIDEO/vid_s3_virge.h VIDEO/vid_svga.h \ + VIDEO/vid_svga_render.h -vid_sc1502x_ramdac.o: ibm.h mem.h video/video.h video/vid_svga.h video/vid_sc1502x_ramdac.h +vid_sc1502x_ramdac.o: ibm.h mem.h VIDEO/video.h VIDEO/vid_svga.h VIDEO/vid_sc1502x_ramdac.h -vid_sdac_ramdac.o: ibm.h mem.h video/video.h video/vid_svga.h video/vid_sdac_ramdac.h +vid_sdac_ramdac.o: ibm.h mem.h VIDEO/video.h VIDEO/vid_svga.h VIDEO/vid_sdac_ramdac.h -vid_stg_ramdac.o: ibm.h mem.h video/video.h video/vid_svga.h video/vid_stg_ramdac.h +vid_stg_ramdac.o: ibm.h mem.h VIDEO/video.h VIDEO/vid_svga.h VIDEO/vid_stg_ramdac.h -vid_svga.o: ibm.h io.h mem.h rom.h timer.h video/video.h video/vid_svga.h video/vid_svga_render.h +vid_svga.o: ibm.h io.h mem.h rom.h timer.h VIDEO/video.h VIDEO/vid_svga.h VIDEO/vid_svga_render.h -vid_svga_render.o: ibm.h mem.h video/video.h video/vid_svga.h video/vid_svga_render.h +vid_svga_render.o: ibm.h mem.h VIDEO/video.h VIDEO/vid_svga.h VIDEO/vid_svga_render.h -vid_tandy.o: ibm.h io.h mem.h timer.h device.h video/video.h video/vid_tandy.h video/vid_cga_comp.h +vid_tandy.o: ibm.h io.h mem.h timer.h device.h VIDEO/video.h VIDEO/vid_tandy.h VIDEO/vid_cga_comp.h -vid_tandysl.o: ibm.h io.h mem.h timer.h device.h video/video.h video/vid_tandysl.h +vid_tandysl.o: ibm.h io.h mem.h timer.h device.h VIDEO/video.h VIDEO/vid_tandysl.h -vid_tgui9440.o: ibm.h io.h mem.h pci.h rom.h device.h win/plat_thread.h video/video.h video/vid_svga.h video/vid_svga_render.h \ - video/vid_tkd8001_ramdac.h video/vid_tgui9440.h +vid_tgui9440.o: ibm.h io.h mem.h pci.h rom.h device.h WIN/plat_thread.h VIDEO/video.h VIDEO/vid_svga.h VIDEO/vid_svga_render.h \ + VIDEO/vid_tkd8001_ramdac.h VIDEO/vid_tgui9440.h -vid_tkd8001_ramdac.o: ibm.h mem.h video/video.h video/vid_svga.h video/vid_tkd8001_ramdac.h +vid_tkd8001_ramdac.o: ibm.h mem.h VIDEO/video.h VIDEO/vid_svga.h VIDEO/vid_tkd8001_ramdac.h -vid_tvga.o: ibm.h io.h mem.h rom.h device.h video/video.h video/vid_svga.h video/vid_svga_render.h video/vid_tkd8001_ramdac.h \ - video/vid_tvga.h +vid_tvga.o: ibm.h io.h mem.h rom.h device.h VIDEO/video.h VIDEO/vid_svga.h VIDEO/vid_svga_render.h VIDEO/vid_tkd8001_ramdac.h \ + VIDEO/vid_tvga.h -vid_vga.o: ibm.h io.h mem.h rom.h device.h video/video.h video/vid_svga.h video/vid_vga.h +vid_vga.o: ibm.h io.h mem.h rom.h device.h VIDEO/video.h VIDEO/vid_svga.h VIDEO/vid_vga.h -vid_voodoo.o: ibm.h cpu/cpu.h mem.h rom.h pci.h timer.h device.h win/plat_thread.h video/video.h video/vid_svga.h \ - video/vid_voodoo.h video/vid_voodoo_dither.h video/$(VCG) +vid_voodoo.o: ibm.h CPU/cpu.h mem.h rom.h pci.h timer.h device.h WIN/plat_thread.h VIDEO/video.h VIDEO/vid_svga.h \ + VIDEO/vid_voodoo.h VIDEO/vid_voodoo_dither.h VIDEO/$(VCG) -vid_wy700.o: ibm.h io.h mem.h timer.h device.h video/video.h video/vid_wy700.h +vid_wy700.o: ibm.h io.h mem.h timer.h device.h VIDEO/video.h VIDEO/vid_wy700.h -video.o: ibm.h cpu/cpu.h io.h mem.h rom.h config.h device.h timer.h win/plat_thread.h video/video.h video/vid_svga.h \ - win/resource.h win/win.h win/win_cgapal.h \ - video/vid_ati18800.h video/vid_ati28800.h video/vid_ati_mach64.h video/vid_cga.h \ - video/vid_cl_ramdac.h video/vid_cl_gd.h \ - video/vid_ega.h video/vid_et4000.h video/vid_et4000w32.h video/vid_genius.h video/vid_hercules.h \ - video/vid_herculesplus.h video/vid_incolor.h video/vid_colorplus.h video/vid_mda.h \ - video/vid_nv_riva128.h \ - video/vid_olivetti_m24.h video/vid_oti067.h video/vid_paradise.h video/vid_pc1512.h video/vid_pc1640.h \ - video/vid_pc200.h video/vid_pcjr.h video/vid_ps1_svga.h video/vid_s3.h video/vid_s3_virge.h video/vid_tandy.h \ - video/vid_tandysl.h video/vid_tgui9440.h video/vid_tvga.h video/vid_vga.h video/vid_wy700.h +video.o: ibm.h CPU/cpu.h io.h mem.h rom.h config.h device.h timer.h WIN/plat_thread.h VIDEO/video.h VIDEO/vid_svga.h \ + WIN/resource.h WIN/win.h WIN/win_cgapal.h \ + VIDEO/vid_ati18800.h VIDEO/vid_ati28800.h VIDEO/vid_ati_mach64.h VIDEO/vid_cga.h \ + VIDEO/vid_cl_ramdac.h VIDEO/vid_cl_gd.h \ + VIDEO/vid_ega.h VIDEO/vid_et4000.h VIDEO/vid_et4000w32.h VIDEO/vid_genius.h VIDEO/vid_hercules.h \ + VIDEO/vid_herculesplus.h VIDEO/vid_incolor.h VIDEO/vid_colorplus.h VIDEO/vid_mda.h \ + VIDEO/vid_nv_riva128.h \ + VIDEO/vid_olivetti_m24.h VIDEO/vid_oti067.h VIDEO/vid_paradise.h VIDEO/vid_pc1512.h VIDEO/vid_pc1640.h \ + VIDEO/vid_pc200.h VIDEO/vid_pcjr.h VIDEO/vid_ps1_svga.h VIDEO/vid_s3.h VIDEO/vid_s3_virge.h VIDEO/vid_tandy.h \ + VIDEO/vid_tandysl.h VIDEO/vid_tgui9440.h VIDEO/vid_tvga.h VIDEO/vid_vga.h VIDEO/vid_wy700.h -# win/ -win.o: 86box.h device.h disc.h fdd.h hdd.h ibm.h cpu/cpu.h mem.h rom.h nvr.h config.h model.h ide.h cdrom.h cdrom_null.h \ - cdrom_ioctl.h cdrom_image.h scsi.h scsi_disk.h video/video.h video/vid_ega.h mouse.h sound/sound.h sound/snd_dbopl.h \ - win/plat_keyboard.h win/plat_iodev.h win/plat_mouse.h win/plat_midi.h win/plat_thread.h win/plat_ticks.h win/plat_ui.h \ - win/resource.h win/win.h win/win_cgapal.h win/win_ddraw.h win/win_d3d.h win/win_language.h +win.o: 86box.h device.h disc.h fdd.h hdd.h ibm.h CPU/cpu.h mem.h rom.h nvr.h config.h model.h ide.h cdrom.h cdrom_null.h \ + cdrom_ioctl.h cdrom_image.h scsi.h scsi_disk.h VIDEO/video.h VIDEO/vid_ega.h mouse.h SOUND/sound.h SOUND/snd_dbopl.h \ + WIN/plat_keyboard.h WIN/plat_iodev.h WIN/plat_mouse.h WIN/plat_midi.h WIN/plat_thread.h WIN/plat_ticks.h WIN/plat_ui.h \ + WIN/resource.h WIN/win.h WIN/win_cgapal.h WIN/win_ddraw.h WIN/win_d3d.h WIN/win_language.h -win_d3d.o: video/video.h win/win.h win/resource.h win/win_d3d.h win/win_cgapal.h +win_d3d.o: VIDEO/video.h WIN/win.h WIN/resource.h WIN/win_d3d.h WIN/win_cgapal.h -win_d3d_fs.o: 86box.h video/video.h win/win.h win/resource.h win/win_d3d.h win/win_cgapal.h +win_d3d_fs.o: 86box.h VIDEO/video.h WIN/win.h WIN/resource.h WIN/win_d3d.h WIN/win_cgapal.h -win_ddraw.o: video/video.h win/resource.h win/win_ddraw.h win/win_cgapal.h +win_ddraw.o: VIDEO/video.h WIN/resource.h WIN/win_ddraw.h WIN/win_cgapal.h -win_ddraw_fs.o: video/video.h win/resource.h win/win_ddraw.h win/win_cgapal.h +win_ddraw_fs.o: VIDEO/video.h WIN/resource.h WIN/win_ddraw.h WIN/win_cgapal.h -win_ddraw_screenshot.o: video/video.h win/resource.h win/win.h win/win_ddraw.h win/win_language.h +win_ddraw_screenshot.o: VIDEO/video.h WIN/resource.h WIN/win.h WIN/win_ddraw.h WIN/win_language.h -win_deviceconfig.o: win/plat_midi.h win/resource.h win/win.h win/win_language.h +win_deviceconfig.o: WIN/plat_midi.h WIN/resource.h WIN/win.h WIN/win_language.h -win_dynld.o: win/plat_dynld.h win/resource.h ibm.h +win_dynld.o: WIN/plat_dynld.h WIN/resource.h ibm.h -win_iodev.o: ibm.h device.h cdrom.h cdrom_image.h cdrom_ioctl.h cdrom_null.h scsi_disk.h win/plat_iodev.h win/resource.h win/win.h +win_iodev.o: ibm.h device.h cdrom.h cdrom_image.h cdrom_ioctl.h cdrom_null.h scsi_disk.h WIN/plat_iodev.h WIN/resource.h WIN/win.h -win_joystick.o: device.h gameport.h win/plat_joystick.h win/resource.h win/win.h +win_joystick.o: device.h gameport.h WIN/plat_joystick.h WIN/resource.h WIN/win.h -win_joystickconfig.o: ibm.h config.h device.h gameport.h win/plat_joystick.h win/resource.h win/win.h +win_joystickconfig.o: ibm.h config.h device.h gameport.h WIN/plat_joystick.h WIN/resource.h WIN/win.h -win_keyboard.o: device.h win/plat_keyboard.h win/resource.h win/win.h +win_keyboard.o: device.h WIN/plat_keyboard.h WIN/resource.h WIN/win.h -win_language.o: ibm.h device.h ide.h win/plat_ui.h win/resource.h win/win.h win/win_language.h io.h mem.h rom.h device.h ide.h xtide.h +win_language.o: ibm.h device.h ide.h WIN/plat_ui.h WIN/resource.h WIN/win.h WIN/win_language.h io.h mem.h rom.h device.h ide.h xtide.h -win_midi.o: ibm.h config.h sound/midi.h win/plat_midi.h win/resource.h +win_midi.o: ibm.h config.h SOUND/midi.h WIN/plat_midi.h WIN/resource.h -win_mouse.o: win/plat_mouse.h win/resource.h win/win.h +win_mouse.o: WIN/plat_mouse.h WIN/resource.h WIN/win.h -win_opendir.o: ibm.h win/plat_dir.h win/resource.h +win_opendir.o: ibm.h WIN/plat_dir.h WIN/resource.h -win_serial.o: win/plat_thread.h win/plat_serial.h win/resource.h +win_serial.o: WIN/plat_thread.h WIN/plat_serial.h WIN/resource.h -win_settings.o: ibm.h mem.h cpu/cpu.h nvr.h device.h model.h cdrom.h disc.h fdd.h hdd.h ide.h scsi.h network/network.h sound/midi.h \ - sound/sound.h sound/snd_dbopl.h sound/snd_mpu401.h video/video.h video/vid_voodoo.h gameport.h mouse.h win/plat_midi.h \ - win/resource.h win/win.h win/win_language.h +win_settings.o: ibm.h mem.h CPU/cpu.h nvr.h device.h model.h cdrom.h disc.h fdd.h hdd.h ide.h scsi.h NETWORK/network.h SOUND/midi.h \ + SOUND/sound.h SOUND/snd_dbopl.h SOUND/snd_mpu401.h VIDEO/video.h VIDEO/vid_voodoo.h gameport.h mouse.h WIN/plat_midi.h \ + WIN/resource.h WIN/win.h WIN/win_language.h -win_status.o: ibm.h mem.h cpu/x86_ops.h cpu/codegen.h device.h win/resource.h win/win.h +win_status.o: ibm.h mem.h CPU/x86_ops.h CPU/codegen.h device.h WIN/resource.h WIN/win.h -win_video.o: video/video.h win/resource.h win/win_cgapal.h +win_video.o: VIDEO/video.h WIN/resource.h WIN/win_cgapal.h # End of Makefile.mingw. diff --git a/src/NETWORK/net_slirp.c b/src/NETWORK/net_slirp.c index b271c4ca8..16f74c3f4 100644 --- a/src/NETWORK/net_slirp.c +++ b/src/NETWORK/net_slirp.c @@ -16,8 +16,8 @@ #include #include #include -#include "slirp/slirp.h" -#include "slirp/queue.h" +#include "SLIRP/slirp.h" +#include "SLIRP/queue.h" #include "../ibm.h" #include "../config.h" #include "../device.h" diff --git a/src/WIN/win.c b/src/WIN/win.c index 3a4af8df8..cf95c4eec 100644 --- a/src/WIN/win.c +++ b/src/WIN/win.c @@ -8,13 +8,13 @@ * * The Emulator's Windows core. * - * Version: @(#)win.c 1.0.3 2017/06/12 + * Version: @(#)win.c 1.0.4 2017/08/23 * * Authors: Sarah Walker, * Miran Grca, * Fred N. van Kempen, * Copyright 2008-2017 Sarah Walker. - * Copyright 2016-2017 Miran Grca. + * Copyright 2016,2017 Miran Grca. */ #include #include @@ -26,9 +26,9 @@ #include "../fdd.h" #include "../hdd.h" #include "../ibm.h" -#include "../cpu/cpu.h" +#include "../CPU/cpu.h" #include "../mem.h" -#include "../network/network.h" +#include "../NETWORK/network.h" #include "../rom.h" #include "../nvr.h" #include "../config.h" @@ -40,11 +40,11 @@ #include "../cdrom_image.h" #include "../scsi.h" #include "../scsi_disk.h" -#include "../video/video.h" -#include "../video/vid_ega.h" +#include "../VIDEO/video.h" +#include "../VIDEO/vid_ega.h" #include "../mouse.h" -#include "../sound/sound.h" -#include "../sound/snd_dbopl.h" +#include "../SOUND/sound.h" +#include "../SOUND/snd_dbopl.h" #include "plat_keyboard.h" #include "plat_iodev.h" #include "plat_mouse.h" diff --git a/src/WIN/win_d3d.cc b/src/WIN/win_d3d.cc index dc597fc86..6dc5743bb 100644 --- a/src/WIN/win_d3d.cc +++ b/src/WIN/win_d3d.cc @@ -8,15 +8,15 @@ * * Direct3D 9 rendererer and screenshots taking. * - * Version: @(#)win_d3d.cc 1.0.0 2017/05/30 + * Version: @(#)win_d3d.cc 1.0.1 2017/08/23 * * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. - * Copyright 2016-2017 Miran Grca. + * Copyright 2016,2017 Miran Grca. */ #include -#include "../video/video.h" +#include "../VIDEO/video.h" #include "win.h" #include "win_d3d.h" #include "win_cgapal.h" diff --git a/src/WIN/win_d3d_fs.cc b/src/WIN/win_d3d_fs.cc index de168cc97..bbd10669c 100644 --- a/src/WIN/win_d3d_fs.cc +++ b/src/WIN/win_d3d_fs.cc @@ -8,17 +8,17 @@ * * Direct3D 9 full screen rendererer and screenshots taking. * - * Version: @(#)win_d3d_fs.cc 1.0.1 2017/06/03 + * Version: @(#)win_d3d_fs.cc 1.0.2 2017/08/23 * * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. - * Copyright 2016-2017 Miran Grca. + * Copyright 2016,2017 Miran Grca. */ #include #include #include "../86box.h" -#include "../video/video.h" +#include "../VIDEO/video.h" #include "win.h" #include "win_d3d.h" #include "win_cgapal.h" diff --git a/src/WIN/win_ddraw.cc b/src/WIN/win_ddraw.cc index e87265f87..434ced8c4 100644 --- a/src/WIN/win_ddraw.cc +++ b/src/WIN/win_ddraw.cc @@ -3,7 +3,7 @@ */ #include #include -#include "../video/video.h" +#include "../VIDEO/video.h" #include "win_ddraw.h" #include "win_cgapal.h" diff --git a/src/WIN/win_ddraw_fs.cc b/src/WIN/win_ddraw_fs.cc index abb390093..9f2ddb92e 100644 --- a/src/WIN/win_ddraw_fs.cc +++ b/src/WIN/win_ddraw_fs.cc @@ -2,7 +2,7 @@ see COPYING for more details */ #include -#include "../video/video.h" +#include "../VIDEO/video.h" #include "win_ddraw.h" #include "win_cgapal.h" diff --git a/src/WIN/win_ddraw_screenshot.cc b/src/WIN/win_ddraw_screenshot.cc index 292c0eb93..d7e589617 100644 --- a/src/WIN/win_ddraw_screenshot.cc +++ b/src/WIN/win_ddraw_screenshot.cc @@ -8,10 +8,10 @@ * * DirectDraw screenshot taking code. * - * Version: @(#)win_ddraw_screenshot.cc 1.0.0 2017/05/30 + * Version: @(#)win_ddraw_screenshot.cc 1.0.1 2017/08/23 * * Author: Miran Grca, - * Copyright 2016-2017 Miran Grca. + * Copyright 2016,2017 Miran Grca. */ #include @@ -20,7 +20,7 @@ #define BITMAP WINDOWS_BITMAP #include #undef BITMAP -#include "../video/video.h" +#include "../VIDEO/video.h" #include "win.h" #include "win_ddraw.h" #include "win_language.h" diff --git a/src/WIN/win_settings.c b/src/WIN/win_settings.c index cdb83f93c..f6332b0a8 100644 --- a/src/WIN/win_settings.c +++ b/src/WIN/win_settings.c @@ -8,7 +8,7 @@ * * Windows 86Box Settings dialog handler. * - * Version: @(#)win_settings.c 1.0.6 2017/06/21 + * Version: @(#)win_settings.c 1.0.7 2017/08/23 * * Author: Miran Grca, * Copyright 2016-2017 Miran Grca. @@ -23,7 +23,7 @@ #include #include "../ibm.h" #include "../mem.h" -#include "../cpu/cpu.h" +#include "../CPU/cpu.h" #include "../nvr.h" #include "../device.h" #include "../model.h" @@ -33,13 +33,13 @@ #include "../hdd.h" #include "../ide.h" #include "../scsi.h" -#include "../network/network.h" -#include "../sound/midi.h" -#include "../sound/sound.h" -#include "../sound/snd_dbopl.h" -#include "../sound/snd_mpu401.h" -#include "../video/video.h" -#include "../video/vid_voodoo.h" +#include "../NETWORK/network.h" +#include "../SOUND/sound.h" +#include "../SOUND/midi.h" +#include "../SOUND/snd_dbopl.h" +#include "../SOUND/snd_mpu401.h" +#include "../VIDEO/video.h" +#include "../VIDEO/vid_voodoo.h" #include "../gameport.h" #include "../mouse.h" #include "plat_midi.h" diff --git a/src/WIN/win_status.c b/src/WIN/win_status.c index 0a0fc659c..d981f5e0e 100644 --- a/src/WIN/win_status.c +++ b/src/WIN/win_status.c @@ -8,8 +8,8 @@ #include "../ibm.h" #include "../mem.h" -#include "../cpu/x86_ops.h" -#include "../cpu/codegen.h" +#include "../CPU/x86_ops.h" +#include "../CPU/codegen.h" #include "../device.h" #include "win.h" diff --git a/src/WIN/win_video.c b/src/WIN/win_video.c index 3a50f7b9f..39c18c751 100644 --- a/src/WIN/win_video.c +++ b/src/WIN/win_video.c @@ -4,7 +4,7 @@ #include #include #include -#include "../video/video.h" +#include "../VIDEO/video.h" #include "win_cgapal.h" diff --git a/src/acer386sx.c b/src/acer386sx.c index 47f0cbca8..8f1547313 100644 --- a/src/acer386sx.c +++ b/src/acer386sx.c @@ -2,7 +2,7 @@ see COPYING for more details */ #include "ibm.h" -#include "cpu/cpu.h" +#include "CPU/cpu.h" #include "io.h" #include "device.h" #include "model.h" diff --git a/src/ali1429.c b/src/ali1429.c index 7c24efcb2..f930fea3d 100644 --- a/src/ali1429.c +++ b/src/ali1429.c @@ -3,7 +3,7 @@ */ #include #include "ibm.h" -#include "cpu/cpu.h" +#include "CPU/cpu.h" #include "io.h" #include "mem.h" #include "device.h" diff --git a/src/amstrad.c b/src/amstrad.c index cb18923d7..e3e6e1aba 100644 --- a/src/amstrad.c +++ b/src/amstrad.c @@ -1,6 +1,6 @@ #include #include "ibm.h" -#include "cpu/cpu.h" +#include "CPU/cpu.h" #include "io.h" #include "device.h" #include "model.h" diff --git a/src/cdrom.c b/src/cdrom.c index bfc213b3a..88c62ef67 100644 --- a/src/cdrom.c +++ b/src/cdrom.c @@ -9,7 +9,7 @@ * Implementation of the CD-ROM drive with SCSI(-like) * commands, for both ATAPI and SCSI usage. * - * Version: @(#)cdrom.c 1.0.1 2017/06/03 + * Version: @(#)cdrom.c 1.0.2 2017/08/23 * * Author: Miran Grca, * Copyright 2016-2017 Miran Grca. @@ -27,7 +27,7 @@ #include "piix.h" #include "scsi.h" #include "timer.h" -#include "win/plat_iodev.h" +#include "WIN/plat_iodev.h" /* Bits of 'status' */ #define ERR_STAT 0x01 diff --git a/src/cdrom_dosbox.h b/src/cdrom_dosbox.h index 8a6364f48..d580f6dc6 100644 --- a/src/cdrom_dosbox.h +++ b/src/cdrom_dosbox.h @@ -27,11 +27,6 @@ #include #include #include -//#include "dosbox.h" -//#include "mem.h" -//#include "mixer.h" -//#include "SDL.h" -//#include "SDL_thread.h" #include typedef signed int Bits; diff --git a/src/cdrom_ioctl.h b/src/cdrom_ioctl.h index b57689bf9..b9a75f8d0 100644 --- a/src/cdrom_ioctl.h +++ b/src/cdrom_ioctl.h @@ -12,12 +12,12 @@ * This file lists the functions provided by various platform- * specific cdrom-ioctl files. * - * Version: @(#)cdrom_ioctl.h 1.0.1 2017/06/03 + * Version: @(#)cdrom_ioctl.h 1.0.2 2017/08/23 * * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2016 Sarah Walker. - * Copyright 2016-2017 Miran Grca. + * Copyright 2016,2017 Miran Grca. */ #ifndef EMU_CDROM_IOCTL_H #define EMU_CDROM_IOCTL_H diff --git a/src/cdrom_null.h b/src/cdrom_null.h index 75cc71da5..f57a5c66d 100644 --- a/src/cdrom_null.h +++ b/src/cdrom_null.h @@ -9,12 +9,12 @@ * Implementation of the CD-ROM null interface for unmounted * guest CD-ROM drives. * - * Version: @(#)cdrom_null.h 1.0.1 2017/06/03 + * Version: @(#)cdrom_null.h 1.0.2 2017/08/23 * * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2016 Sarah Walker. - * Copyright 2016-2017 Miran Grca. + * Copyright 2016,2017 Miran Grca. */ #ifndef EMU_CDROM_NULL_H #define EMU_CDROM_NULL_H diff --git a/src/compaq.c b/src/compaq.c index b5dae9e7b..8eb44c0d3 100644 --- a/src/compaq.c +++ b/src/compaq.c @@ -2,7 +2,7 @@ see COPYING for more details */ #include "ibm.h" -#include "cpu/cpu.h" +#include "CPU/cpu.h" #include "mem.h" #include "device.h" #include "model.h" diff --git a/src/config.c b/src/config.c index cd23f69c0..c52afec38 100644 --- a/src/config.c +++ b/src/config.c @@ -8,7 +8,7 @@ * * Configuration file handler. * - * Version: @(#)config.c 1.0.0 2017/07/26 + * Version: @(#)config.c 1.0.1 2017/08/23 * * Authors: Sarah Walker, * Miran Grca, @@ -17,7 +17,6 @@ * Copyright 2008-2017 Sarah Walker. * Copyright 2016-2017 Miran Grca. * Copyright 2017-2017 Fred N. van Kempen. - * Copyright 2017-2017 Overdoze. * * NOTE: Forcing config files to be in Unicode encoding breaks it on * Windows XP, and possibly also Vista. Use -DANSI_CFG for use @@ -36,26 +35,26 @@ #include "fdc.h" #include "fdd.h" #include "ibm.h" -#include "cpu/cpu.h" +#include "CPU/cpu.h" #include "gameport.h" #include "ide.h" #include "hdd.h" #include "model.h" #include "mouse.h" -#include "network/network.h" +#include "NETWORK/network.h" #include "nvr.h" #include "scsi.h" -#include "win/plat_joystick.h" -#include "win/plat_midi.h" -#include "sound/midi.h" -#include "sound/snd_dbopl.h" -#include "sound/snd_mpu401.h" -#include "sound/snd_opl.h" -#include "sound/sound.h" -#include "video/video.h" +#include "WIN/plat_joystick.h" +#include "WIN/plat_midi.h" +#include "SOUND/midi.h" +#include "SOUND/snd_dbopl.h" +#include "SOUND/snd_mpu401.h" +#include "SOUND/snd_opl.h" +#include "SOUND/sound.h" +#include "VIDEO/video.h" -#include "win/win.h" -#include "win/win_language.h" +#include "WIN/win.h" +#include "WIN/win_language.h" wchar_t config_file_default[256]; diff --git a/src/config.h b/src/config.h index a7c15383f..352d19faa 100644 --- a/src/config.h +++ b/src/config.h @@ -8,17 +8,20 @@ * * Configuration file handler header. * - * Version: @(#)config.h 1.0.0 2017/07/26 + * Version: @(#)config.h 1.0.1 2017/08/23 * * Authors: Sarah Walker, * Miran Grca, * Fred N. van Kempen, * Overdoze, * Copyright 2008-2017 Sarah Walker. - * Copyright 2016-2017 Miran Grca. - * Copyright 2017-2017 Fred N. van Kempen. - * Copyright 2017-2017 Overdoze. + * Copyright 2016,2017 Miran Grca. + * Copyright 2017 Fred N. van Kempen. */ +#ifndef EMU_CONFIG_H +# define EMU_CONFIG_H + + extern wchar_t config_file_default[256]; @@ -60,3 +63,6 @@ extern void saveconfig(void); #ifdef __cplusplus } #endif + + +#endif /*EMU_CONFIG_H*/ diff --git a/src/device.c b/src/device.c index 9d8968f82..93412ec2e 100644 --- a/src/device.c +++ b/src/device.c @@ -17,11 +17,11 @@ * Copyright 2016-2017 Miran Grca. */ #include "ibm.h" -#include "cpu/cpu.h" +#include "CPU/cpu.h" #include "config.h" #include "device.h" #include "model.h" -#include "sound/sound.h" +#include "SOUND/sound.h" static void *device_priv[256]; diff --git a/src/device.h b/src/device.h index 8948551fd..789003adb 100644 --- a/src/device.h +++ b/src/device.h @@ -9,12 +9,12 @@ * Implementation of the generic device interface to handle * all devices attached to the emulator. * - * Version: @(#)device.h 1.0.1 2017/06/03 + * Version: @(#)device.h 1.0.2 2017/08/23 * * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2016 Sarah Walker. - * Copyright 2016-2017 Miran Grca. + * Copyright 2016,2017 Miran Grca. */ #ifndef EMU_DEVICE_H # define EMU_DEVICE_H diff --git a/src/disc.h b/src/disc.h index b6f5f7c43..84369d537 100644 --- a/src/disc.h +++ b/src/disc.h @@ -9,12 +9,12 @@ * Generic floppy disk interface that communicates with the * other handlers. * - * Version: @(#)disc.h 1.0.1 2017/06/03 + * Version: @(#)disc.h 1.0.2 2017/08/23 * * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. - * Copyright 2016-2017 Miran Grca. + * Copyright 2016,2017 Miran Grca. */ #ifndef EMU_DISC_H # define EMU_DISC_H diff --git a/src/disc_86f.c b/src/disc_86f.c index 95a03e86d..dd2016591 100644 --- a/src/disc_86f.c +++ b/src/disc_86f.c @@ -10,7 +10,7 @@ * data in the form of FM/MFM-encoded transitions) which also * forms the core of the emulator's floppy disk emulation. * - * Version: @(#)disc_86f.c 1.0.0 2017/05/30 + * Version: @(#)disc_86f.c 1.0.1 2017/08/23 * * Author: Miran Grca, * Copyright 2016-2017 Miran Grca. @@ -24,7 +24,7 @@ #include #include -#include "lzf/lzf.h" +#include "LZF/lzf.h" #include "config.h" #include "dma.h" diff --git a/src/disc_86f.h b/src/disc_86f.h index bea967108..4e0e832dd 100644 --- a/src/disc_86f.h +++ b/src/disc_86f.h @@ -10,30 +10,33 @@ * data in the form of FM/MFM-encoded transitions) which also * forms the core of the emulator's floppy disk emulation. * - * Version: @(#)disc_86f.h 1.0.0 2017/05/30 + * Version: @(#)disc_86f.h 1.0.1 2017/08/23 * * Author: Miran Grca, * Copyright 2016-2017 Miran Grca. */ +#ifndef EMU_DISC_86F_H +# define EMU_DISC_86F_H -void d86f_init(); -void d86f_load(int drive, wchar_t *fn); -void d86f_close(int drive); -void d86f_seek(int drive, int track); -int d86f_hole(int drive); -double d86f_byteperiod(int drive); -void d86f_stop(int drive); -void d86f_poll(); -int d86f_realtrack(int track, int drive); -void d86f_reset(int drive, int side); -void d86f_readsector(int drive, int sector, int track, int side, int density, int sector_size); -void d86f_writesector(int drive, int sector, int track, int side, int density, int sector_size); -void d86f_comparesector(int drive, int sector, int track, int side, int rate, int sector_size); -void d86f_readaddress(int drive, int side, int density); -void d86f_format(int drive, int side, int density, uint8_t fill); -void d86f_prepare_track_layout(int drive, int side); -void d86f_set_version(int drive, uint16_t version); +extern void d86f_init(void); +extern void d86f_load(int drive, wchar_t *fn); +extern void d86f_close(int drive); +extern void d86f_seek(int drive, int track); +extern int d86f_hole(int drive); +extern double d86f_byteperiod(int drive); +extern void d86f_stop(int drive); +extern void d86f_poll(int drive); +extern int d86f_realtrack(int track, int drive); +extern void d86f_reset(int drive, int side); +extern void d86f_readsector(int drive, int sector, int track, int side, int density, int sector_size); +extern void d86f_writesector(int drive, int sector, int track, int side, int density, int sector_size); +extern void d86f_comparesector(int drive, int sector, int track, int side, int rate, int sector_size); +extern void d86f_readaddress(int drive, int side, int density); +extern void d86f_format(int drive, int side, int density, uint8_t fill); + +extern void d86f_prepare_track_layout(int drive, int side); +extern void d86f_set_version(int drive, uint16_t version); #define length_gap0 80 #define length_gap1 50 @@ -63,5 +66,8 @@ extern int gap4_size[2]; #define D86FVER 0x020B -void d86f_initialize_last_sector_id(int drive, int c, int h, int r, int n); -void d86f_zero_bit_field(int drive, int side); +extern void d86f_initialize_last_sector_id(int drive, int c, int h, int r, int n); +extern void d86f_zero_bit_field(int drive, int side); + + +#endif /*EMU_DISC_86F_H*/ diff --git a/src/disc_fdi.h b/src/disc_fdi.h index ae77e0279..b8ad9a614 100644 --- a/src/disc_fdi.h +++ b/src/disc_fdi.h @@ -9,24 +9,30 @@ * Implementation of the FDI floppy stream image format * interface to the FDI2RAW module. * - * Version: @(#)disc_fdi.h 1.0.0 2017/05/30 + * Version: @(#)disc_fdi.h 1.0.1 2017/08/23 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. - * Copyright 2016-2017 Miran Grca. + * Copyright 2016,2017 Miran Grca. */ +#ifndef EMU_DISC_FDI_H +# define EMU_DISC_FDI_H -void fdi_init(); -void fdi_load(int drive, wchar_t *fn); -void fdi_close(int drive); -void fdi_seek(int drive, int track); -void fdi_readsector(int drive, int sector, int track, int side, int density, int sector_size); -void fdi_writesector(int drive, int sector, int track, int side, int density, int sector_size); -void fdi_comparesector(int drive, int sector, int track, int side, int density, int sector_size); -void fdi_readaddress(int drive, int sector, int side, int density); -void fdi_format(int drive, int sector, int side, int density, uint8_t fill); -int fdi_hole(int drive); -double fdi_byteperiod(int drive); -void fdi_stop(); -void fdi_poll(); + +extern void fdi_init(void); +extern void fdi_load(int drive, wchar_t *fn); +extern void fdi_close(int drive); +extern void fdi_seek(int drive, int track); +extern void fdi_readsector(int drive, int sector, int track, int side, int density, int sector_size); +extern void fdi_writesector(int drive, int sector, int track, int side, int density, int sector_size); +extern void fdi_comparesector(int drive, int sector, int track, int side, int density, int sector_size); +extern void fdi_readaddress(int drive, int sector, int side, int density); +extern void fdi_format(int drive, int sector, int side, int density, uint8_t fill); +extern int fdi_hole(int drive); +extern double fdi_byteperiod(int drive); +extern void fdi_stop(void); +extern void fdi_poll(void); + + +#endif /*EMU_DISC_FDI_H*/ diff --git a/src/disc_imd.h b/src/disc_imd.h index f017cebf0..128156cbb 100644 --- a/src/disc_imd.h +++ b/src/disc_imd.h @@ -8,13 +8,19 @@ * * Implementation of the IMD floppy image format. * - * Version: @(#)disc_imd.h 1.0.0 2017/05/30 + * Version: @(#)disc_imd.h 1.0.1 2017/08/23 * * Author: Miran Grca, - * Copyright 2016-2017 Miran Grca. + * Copyright 2016,2017 Miran Grca. */ +#ifndef EMU_DISK_IMD_H +# define EMU_DISK_IMD_H -void imd_init(); -void imd_load(int drive, wchar_t *fn); -void imd_close(int drive); -void imd_seek(int drive, int track); + +extern void imd_init(void); +extern void imd_load(int drive, wchar_t *fn); +extern void imd_close(int drive); +extern void imd_seek(int drive, int track); + + +#endif /*EMU_DISK_IMD_H*/ diff --git a/src/disc_img.h b/src/disc_img.h index 94c4780cf..9fc2a97bf 100644 --- a/src/disc_img.h +++ b/src/disc_img.h @@ -9,15 +9,21 @@ * Implementation of the raw sector-based floppy image format, * as well as the Japanese FDI, CopyQM, and FDF formats. * - * Version: @(#)disc_img.h 1.0.0 2017/05/30 + * Version: @(#)disc_img.h 1.0.1 2017/08/23 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. - * Copyright 2016-2017 Miran Grca. + * Copyright 2016,2017 Miran Grca. */ +#ifndef EMU_DISC_IMG_H +# define EMU_DISC_IMG_H -void img_init(); -void img_load(int drive, wchar_t *fn); -void img_close(int drive); -void img_seek(int drive, int track); + +extern void img_init(void); +extern void img_load(int drive, wchar_t *fn); +extern void img_close(int drive); +extern void img_seek(int drive, int track); + + +#endif /*EMU_DISC_IMG_H*/ diff --git a/src/disc_random.h b/src/disc_random.h index 601e9d84f..a7e34e246 100644 --- a/src/disc_random.h +++ b/src/disc_random.h @@ -9,11 +9,17 @@ * A better random number generation, used for floppy weak bits * and network MAC address generation. * - * Version: @(#)disc_random.h 1.0.0 2017/05/30 + * Version: @(#)disc_random.h 1.0.1 2017/08/23 * * Author: Miran Grca, - * Copyright 2016-2017 Miran Grca. + * Copyright 2016,2017 Miran Grca. */ +#ifndef EMU_DISC_RANDOM_H +# define EMU_DISC_RANDOM_H -uint8_t disc_random_generate(); -void disc_random_init(); + +extern uint8_t disc_random_generate(void); +extern void disc_random_init(void); + + +#endif /*EMU_DISC_RANDOM_H*/ diff --git a/src/disc_td0.c b/src/disc_td0.c index af9963e40..a0247b66e 100644 --- a/src/disc_td0.c +++ b/src/disc_td0.c @@ -6,11 +6,11 @@ * * This file is part of the 86Box distribution. * -* Implementation of the Teledisk floppy image format. - * - * Version: @(#)disc_td0.c 1.0.0 2017/05/30 + * Implementation of the Teledisk floppy image format. * - * Author: Milodrag Milanovic, + * Version: @(#)disc_td0.c 1.0.1 2017/08/23 + * + * Authors: Milodrag Milanovic, * Haruhiko OKUMURA, * Haruyasu YOSHIZAKI, * Kenji RIKITAKE, diff --git a/src/disc_td0.h b/src/disc_td0.h index e28f2dc7d..16831d9bc 100644 --- a/src/disc_td0.h +++ b/src/disc_td0.h @@ -8,9 +8,9 @@ * * Implementation of the Teledisk floppy image format. * - * Version: @(#)disc_td0.h 1.0.0 2017/05/30 + * Version: @(#)disc_td0.h 1.0.1 2017/08/23 * - * Author: Milodrag Milanovic, + * Authors: Milodrag Milanovic, * Haruhiko OKUMURA, * Haruyasu YOSHIZAKI, * Kenji RIKITAKE, @@ -19,10 +19,16 @@ * Copyright 1988-2017 Haruyasu YOSHIZAKI. * Copyright 1988-2017 Kenji RIKITAKE. * Copyright 2013-2017 Milodrag Milanovic. - * Copyright 2016-2017 Miran Grca. + * Copyright 2016,2017 Miran Grca. */ +#ifndef EMU_DISC_TD0_H +# define EMU_DISC_TD0_H -void td0_init(); -void td0_load(int drive, wchar_t *fn); -void td0_close(int drive); -void td0_seek(int drive, int track); + +extern void td0_init(void); +extern void td0_load(int drive, wchar_t *fn); +extern void td0_close(int drive); +extern void td0_seek(int drive, int track); + + +#endif /*EMU_DISC_TD0_H*/ diff --git a/src/dma.c b/src/dma.c index ae95ffafa..9350d0197 100644 --- a/src/dma.c +++ b/src/dma.c @@ -8,7 +8,7 @@ * * Implementation of the Intel DMA controllers. * - * Version: @(#)dma.c 1.0.1 2017/06/03 + * Version: @(#)dma.c 1.0.2 2017/08/23 * * Authors: Sarah Walker, * Miran Grca, @@ -16,7 +16,7 @@ * Copyright 2016-2017 Miran Grca. */ #include "ibm.h" -#include "cpu/x86.h" +#include "CPU/x86.h" #include "mem.h" #include "io.h" #include "dma.h" diff --git a/src/dma.h b/src/dma.h index 29b3bba23..8e791d9dc 100644 --- a/src/dma.h +++ b/src/dma.h @@ -8,12 +8,12 @@ * * Implementation of the Intel DMA controllers. * - * Version: @(#)dma.h 1.0.1 2017/06/03 + * Version: @(#)dma.h 1.0.2 2017/08/23 * * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. - * Copyright 2016-2017 Miran Grca. + * Copyright 2016,2017 Miran Grca. */ #ifndef EMU_DMA_H # define EMU_DMA_H diff --git a/src/fdc.c b/src/fdc.c index 6e5aa6869..7724dd542 100644 --- a/src/fdc.c +++ b/src/fdc.c @@ -9,14 +9,13 @@ * Implementation of the NEC uPD-765 and compatible floppy disk * controller. * - * Version: @(#)fdc.c 1.0.0 2017/05/30 + * Version: @(#)fdc.c 1.0.1 2017/08/23 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. * Copyright 2016-2017 Miran Grca. */ - #include #include #include diff --git a/src/fdc.h b/src/fdc.h index 0e8c42654..fdac322b4 100644 --- a/src/fdc.h +++ b/src/fdc.h @@ -9,78 +9,84 @@ * Implementation of the NEC uPD-765 and compatible floppy disk * controller. * - * Version: @(#)fdc.h 1.0.0 2017/05/30 + * Version: @(#)fdc.h 1.0.1 2017/08/23 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. - * Copyright 2016-2017 Miran Grca. + * Copyright 2016,2017 Miran Grca. */ +#ifndef EMU_FDC_H +# define EMU_FDC_H -void fdc_init(); -void fdc_add(); -void fdc_add_for_superio(); -void fdc_add_pcjr(); -void fdc_add_tandy(); -void fdc_remove(); -void fdc_reset(); -void fdc_poll(); -void fdc_abort(); -void fdc_discchange_clear(int drive); -void fdc_set_dskchg_activelow(); -void fdc_3f1_enable(int enable); -void fdc_set_ps1(); -int fdc_get_bit_rate(); -int fdc_get_bitcell_period(); + +extern void fdc_init(void); +extern void fdc_add(void); +extern void fdc_add_for_superio(void); +extern void fdc_add_pcjr(void); +extern void fdc_add_tandy(void); +extern void fdc_remove(void); +extern void fdc_reset(void); +extern void fdc_poll(void); +extern void fdc_abort(void); +extern void fdc_discchange_clear(int drive); +extern void fdc_set_dskchg_activelow(void); +extern void fdc_3f1_enable(int enable); +extern void fdc_set_ps1(void); +extern int fdc_get_bit_rate(void); +extern int fdc_get_bitcell_period(void); /* A few functions to communicate between Super I/O chips and the FDC. */ -void fdc_update_is_nsc(int is_nsc); -void fdc_update_max_track(int max_track); -void fdc_update_enh_mode(int enh_mode); -int fdc_get_rwc(int drive); -void fdc_update_rwc(int drive, int rwc); -int fdc_get_boot_drive(); -void fdc_update_boot_drive(int boot_drive); -void fdc_update_densel_polarity(int densel_polarity); -uint8_t fdc_get_densel_polarity(); -void fdc_update_densel_force(int densel_force); -void fdc_update_drvrate(int drive, int drvrate); -void fdc_update_drv2en(int drv2en); +extern void fdc_update_is_nsc(int is_nsc); +extern void fdc_update_max_track(int max_track); +extern void fdc_update_enh_mode(int enh_mode); +extern int fdc_get_rwc(int drive); +extern void fdc_update_rwc(int drive, int rwc); +extern int fdc_get_boot_drive(void); +extern void fdc_update_boot_drive(int boot_drive); +extern void fdc_update_densel_polarity(int densel_polarity); +extern uint8_t fdc_get_densel_polarity(void); +extern void fdc_update_densel_force(int densel_force); +extern void fdc_update_drvrate(int drive, int drvrate); +extern void fdc_update_drv2en(int drv2en); -void fdc_noidam(); -void fdc_nosector(); -void fdc_nodataam(); -void fdc_cannotformat(); -void fdc_wrongcylinder(); -void fdc_badcylinder(); +extern void fdc_noidam(void); +extern void fdc_nosector(void); +extern void fdc_nodataam(void); +extern void fdc_cannotformat(void); +extern void fdc_wrongcylinder(void); +extern void fdc_badcylinder(void); -sector_id_t fdc_get_read_track_sector(); -int fdc_get_compare_condition(); -int fdc_is_deleted(); -int fdc_is_sk(); -void fdc_set_wrong_am(); -int fdc_get_drive(); -int fdc_get_perp(); -int fdc_get_format_n(); -int fdc_is_mfm(); -double fdc_get_hut(); -double fdc_get_hlt(); -void fdc_request_next_sector_id(); -void fdc_stop_id_request(); -int fdc_get_gap(); -int fdc_get_gap2(int drive); -int fdc_get_dtl(); -int fdc_get_format_sectors(); +extern sector_id_t fdc_get_read_track_sector(void); +extern int fdc_get_compare_condition(void); +extern int fdc_is_deleted(void); +extern int fdc_is_sk(void); +extern void fdc_set_wrong_am(void); +extern int fdc_get_drive(void); +extern int fdc_get_perp(void); +extern int fdc_get_format_n(void); +extern int fdc_is_mfm(void); +extern double fdc_get_hut(void); +extern double fdc_get_hlt(void); +extern void fdc_request_next_sector_id(void); +extern void fdc_stop_id_request(void); +extern int fdc_get_gap(void); +extern int fdc_get_gap2(int drive); +extern int fdc_get_dtl(void); +extern int fdc_get_format_sectors(void); -void fdc_finishcompare(int satisfying); -void fdc_finishread(); -void fdc_sector_finishcompare(int satisfying); -void fdc_sector_finishread(); -void fdc_track_finishread(int condition); -int fdc_is_verify(); +extern void fdc_finishcompare(int satisfying); +extern void fdc_finishread(void); +extern void fdc_sector_finishcompare(int satisfying); +extern void fdc_sector_finishread(void); +extern void fdc_track_finishread(int condition); +extern int fdc_is_verify(void); -int real_drive(int drive); -void fdc_overrun(); -void fdc_set_base(int base, int super_io); -int fdc_ps1_525(); -void fdc_hard_reset(); +extern int real_drive(int drive); +extern void fdc_overrun(void); +extern void fdc_set_base(int base, int super_io); +extern int fdc_ps1_525(void); +extern void fdc_hard_reset(void); + + +#endif /*EMU_FDC_H*/ diff --git a/src/fdc37c665.c b/src/fdc37c665.c index 56623d054..c85a9df96 100644 --- a/src/fdc37c665.c +++ b/src/fdc37c665.c @@ -8,14 +8,13 @@ * * Implementation of the SMC FDC37C665 Super I/O Chip. * - * Version: @(#)fdc37c665.c 1.0.0 2017/05/30 + * Version: @(#)fdc37c665.c 1.0.1 2017/08/23 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. * Copyright 2016-2017 Miran Grca. */ - #include "ibm.h" #include "disc.h" diff --git a/src/fdc37c665.h b/src/fdc37c665.h index cbe28216f..c953d1cab 100644 --- a/src/fdc37c665.h +++ b/src/fdc37c665.h @@ -8,12 +8,12 @@ * * Implementation of the SMC FDC37C665 Super I/O Chip. * - * Version: @(#)fdc37c665.h 1.0.0 2017/05/30 + * Version: @(#)fdc37c665.h 1.0.1 2017/08/23 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. - * Copyright 2016-2017 Miran Grca. + * Copyright 2016,2017 Miran Grca. */ -extern void fdc37c665_init(); +extern void fdc37c665_init(void); diff --git a/src/fdc37c669.h b/src/fdc37c669.h index 31189524a..cd90f27c8 100644 --- a/src/fdc37c669.h +++ b/src/fdc37c669.h @@ -8,10 +8,10 @@ * * Implementation of the SMC FDC37C669 Super I/O Chip. * - * Version: @(#)fdc37c669.h 1.0.0 2017/05/30 + * Version: @(#)fdc37c669.h 1.0.1 2017/08/23 * * Author: Miran Grca, - * Copyright 2016-2017 Miran Grca. + * Copyright 2016,2017 Miran Grca. */ -extern void fdc37c669_init(); +extern void fdc37c669_init(void); diff --git a/src/fdc37c932fr.h b/src/fdc37c932fr.h index 1e48bb0e9..bf844e76b 100644 --- a/src/fdc37c932fr.h +++ b/src/fdc37c932fr.h @@ -8,10 +8,10 @@ * * Implementation of the SMC FDC37C932FR Super I/O Chip. * - * Version: @(#)fdc37c932fr.h 1.0.0 2017/05/30 + * Version: @(#)fdc37c932fr.h 1.0.1 2017/08/23 * * Author: Miran Grca, - * Copyright 2016-2017 Miran Grca. + * Copyright 2016,2017 Miran Grca. */ -extern void fdc37c932fr_init(); +extern void fdc37c932fr_init(void); diff --git a/src/fdd.c b/src/fdd.c index 2fb24c5ec..d93af02f8 100644 --- a/src/fdd.c +++ b/src/fdd.c @@ -8,19 +8,19 @@ * * Implementation of the floppy drive emulation. * - * Version: @(#)fdd.c 1.0.0 2017/05/30 + * Version: @(#)fdd.c 1.0.1 2017/08/23 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. * Copyright 2016-2017 Miran Grca. */ - #include "ibm.h" #include "disc.h" #include "fdc.h" #include "fdd.h" + static struct { int type; diff --git a/src/fdd.h b/src/fdd.h index 3caf5250f..7fe0bf479 100644 --- a/src/fdd.h +++ b/src/fdd.h @@ -8,48 +8,57 @@ * * Implementation of the floppy drive emulation. * - * Version: @(#)fdd.h 1.0.0 2017/05/30 + * Version: @(#)fdd.h 1.0.1 2017/08/23 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. - * Copyright 2016-2017 Miran Grca. + * Copyright 2016,2017 Miran Grca. */ +#ifndef EMU_FDD_H +# define EMU_FDD_H + #define SEEK_RECALIBRATE -999 -void fdd_forced_seek(int drive, int track_diff); -void fdd_seek(int drive, int track_diff); -int fdd_track0(int drive); -int fdd_getrpm(int drive); -void fdd_set_densel(int densel); -int fdd_can_read_medium(int drive); -int fdd_doublestep_40(int drive); -int fdd_is_525(int drive); -int fdd_is_dd(int drive); -int fdd_is_ed(int drive); -int fdd_is_double_sided(int drive); -void fdd_set_head(int drive, int head); -int fdd_get_head(int drive); -void fdd_set_turbo(int drive, int turbo); -int fdd_get_turbo(int drive); -void fdd_set_check_bpb(int drive, int check_bpb); -int fdd_get_check_bpb(int drive); -void fdd_set_type(int drive, int type); -int fdd_get_type(int drive); - -int fdd_get_flags(int drive); extern int fdd_swap; -void fdd_init(); -int fdd_get_densel(int drive); -void fdd_setswap(int swap); +extern void fdd_forced_seek(int drive, int track_diff); +extern void fdd_seek(int drive, int track_diff); +extern int fdd_track0(int drive); +extern int fdd_getrpm(int drive); +extern void fdd_set_densel(int densel); +extern int fdd_can_read_medium(int drive); +extern int fdd_doublestep_40(int drive); +extern int fdd_is_525(int drive); +extern int fdd_is_dd(int drive); +extern int fdd_is_ed(int drive); +extern int fdd_is_double_sided(int drive); +extern void fdd_set_head(int drive, int head); +extern int fdd_get_head(int drive); +extern void fdd_set_turbo(int drive, int turbo); +extern int fdd_get_turbo(int drive); +extern void fdd_set_check_bpb(int drive, int check_bpb); +extern int fdd_get_check_bpb(int drive); -char *fdd_getname(int type); +extern void fdd_set_type(int drive, int type); +extern int fdd_get_type(int drive); -char *fdd_get_internal_name(int type); -int fdd_get_from_internal_name(char *s); +extern int fdd_get_flags(int drive); -int fdd_track(int drive); +extern void fdd_init(void); +extern int fdd_get_densel(int drive); + +extern void fdd_setswap(int swap); + +extern char *fdd_getname(int type); + +extern char *fdd_get_internal_name(int type); +extern int fdd_get_from_internal_name(char *s); + +extern int fdd_track(int drive); + + +#endif /*EMU_FDD_H*/ diff --git a/src/gameport.c b/src/gameport.c index 7cb0e0142..7de6913a1 100644 --- a/src/gameport.c +++ b/src/gameport.c @@ -4,7 +4,7 @@ #include #include #include "ibm.h" -#include "cpu/cpu.h" +#include "CPU/cpu.h" #include "device.h" #include "io.h" #include "timer.h" diff --git a/src/gameport.h b/src/gameport.h index dbe01246a..f81762ce1 100644 --- a/src/gameport.h +++ b/src/gameport.h @@ -1,13 +1,17 @@ /* Copyright holders: Sarah Walker see COPYING for more details */ -extern device_t gameport_device; -extern device_t gameport_201_device; +#ifndef EMU_GAMEPORT_H +# define EMU_GAMEPORT_H + + +#define AXIS_NOT_PRESENT -99999 + typedef struct { char name[80]; - void *(*init)(); + void *(*init)(void); void (*close)(void *p); uint8_t (*read)(void *p); void (*write)(void *p); @@ -20,16 +24,22 @@ typedef struct char pov_names[4][32]; } joystick_if_t; +extern device_t gameport_device; +extern device_t gameport_201_device; + extern int joystick_type; -char *joystick_get_name(int joystick); -int joystick_get_max_joysticks(int joystick); -int joystick_get_axis_count(int joystick); -int joystick_get_button_count(int joystick); -int joystick_get_pov_count(int joystick); -char *joystick_get_axis_name(int joystick, int id); -char *joystick_get_button_name(int joystick, int id); -char *joystick_get_pov_name(int joystick, int id); -void gameport_update_joystick_type(); -#define AXIS_NOT_PRESENT -99999 +extern char *joystick_get_name(int joystick); +extern int joystick_get_max_joysticks(int joystick); +extern int joystick_get_axis_count(int joystick); +extern int joystick_get_button_count(int joystick); +extern int joystick_get_pov_count(int joystick); +extern char *joystick_get_axis_name(int joystick, int id); +extern char *joystick_get_button_name(int joystick, int id); +extern char *joystick_get_pov_name(int joystick, int id); + +extern void gameport_update_joystick_type(void); + + +#endif /*EMU_GAMEPORT_H*/ diff --git a/src/hdd.c b/src/hdd.c index 63160f5fe..169410050 100644 --- a/src/hdd.c +++ b/src/hdd.c @@ -10,13 +10,13 @@ #include "mfm_xebec.h" #include "xtide.h" + char hdd_controller_name[16]; +hard_disk_t hdc[HDC_NUM]; static device_t null_hdd_device; - static int hdd_controller_current; -hard_disk_t hdc[HDC_NUM]; static struct { diff --git a/src/hdd.h b/src/hdd.h index 605118623..ff42de816 100644 --- a/src/hdd.h +++ b/src/hdd.h @@ -1,8 +1,16 @@ -char *hdd_controller_get_name(int hdd); -char *hdd_controller_get_internal_name(int hdd); -int hdd_controller_get_flags(int hdd); -int hdd_controller_available(int hdd); -int hdd_controller_current_is_mfm(); -void hdd_controller_init(char *internal_name); +#ifndef EMU_HDD_H +# define EMU_HDD_H + extern char hdd_controller_name[16]; + + +extern char *hdd_controller_get_name(int hdd); +extern char *hdd_controller_get_internal_name(int hdd); +extern int hdd_controller_get_flags(int hdd); +extern int hdd_controller_available(int hdd); +extern int hdd_controller_current_is_mfm(void); +extern void hdd_controller_init(char *internal_name); + + +#endif /*EMU_HDD_H*/ diff --git a/src/hdd_image.h b/src/hdd_image.h index f0b3b08b5..d04710999 100644 --- a/src/hdd_image.h +++ b/src/hdd_image.h @@ -1,3 +1,7 @@ +#ifndef EMU_HDD_IMAGE_H +# define EMU_HDD_IMAGE_H + + extern int hdd_image_load(int id); extern void hdd_image_seek(uint8_t id, uint32_t sector); extern void hdd_image_read(uint8_t id, uint32_t sector, uint32_t count, uint8_t *buffer); @@ -11,3 +15,6 @@ extern uint8_t hdd_image_get_type(uint8_t id); extern void hdd_image_specify(uint8_t id, uint64_t hpc, uint64_t spt); extern void hdd_image_unload(uint8_t id, int fn_preserve); extern void hdd_image_close(uint8_t id); + + +#endif /*EMU_HDD_IMAGE_H*/ diff --git a/src/headland.c b/src/headland.c index a80c1b876..ef5efb2bc 100644 --- a/src/headland.c +++ b/src/headland.c @@ -2,7 +2,7 @@ see COPYING for more details */ #include "ibm.h" -#include "cpu/cpu.h" +#include "CPU/cpu.h" #include "io.h" #include "mem.h" #include "device.h" diff --git a/src/i430fx.c b/src/i430fx.c index 4ea5db75c..fa9a8cb23 100644 --- a/src/i430fx.c +++ b/src/i430fx.c @@ -8,7 +8,7 @@ * * Implementation of the Intel 430FX PCISet chip. * - * Version: @(#)i430fx.c 1.0.1 2017/06/17 + * Version: @(#)i430fx.c 1.0.2 2017/08/23 * * Authors: Sarah Walker, * Miran Grca, @@ -17,7 +17,7 @@ */ #include #include "ibm.h" -#include "cpu/cpu.h" +#include "CPU/cpu.h" #include "mem.h" #include "pci.h" #include "device.h" diff --git a/src/i430hx.c b/src/i430hx.c index 699fab21b..f7412453a 100644 --- a/src/i430hx.c +++ b/src/i430hx.c @@ -8,7 +8,7 @@ * * Implementation of the Intel 430HX PCISet chip. * - * Version: @(#)i430hx.c 1.0.1 2017/06/17 + * Version: @(#)i430hx.c 1.0.2 2017/08/23 * * Authors: Sarah Walker, * Miran Grca, @@ -17,7 +17,7 @@ */ #include #include "ibm.h" -#include "cpu/cpu.h" +#include "CPU/cpu.h" #include "io.h" #include "mem.h" #include "pci.h" diff --git a/src/i430lx.c b/src/i430lx.c index be015391d..935c9e6e7 100644 --- a/src/i430lx.c +++ b/src/i430lx.c @@ -8,7 +8,7 @@ * * Implementation of the Intel 430LX PCISet chip. * - * Version: @(#)i430lx.c 1.0.1 2017/06/17 + * Version: @(#)i430lx.c 1.0.2 2017/08/23 * * Authors: Sarah Walker, * Miran Grca, @@ -17,7 +17,7 @@ */ #include #include "ibm.h" -#include "cpu/cpu.h" +#include "CPU/cpu.h" #include "mem.h" #include "pci.h" #include "device.h" diff --git a/src/i430nx.c b/src/i430nx.c index b17bde0fe..5ddd0df9f 100644 --- a/src/i430nx.c +++ b/src/i430nx.c @@ -8,7 +8,7 @@ * * Implementation of the Intel 430NX PCISet chip. * - * Version: @(#)i430nx.c 1.0.1 2017/06/17 + * Version: @(#)i430nx.c 1.0.2 2017/08/23 * * Authors: Sarah Walker, * Miran Grca, @@ -17,7 +17,7 @@ */ #include #include "ibm.h" -#include "cpu/cpu.h" +#include "CPU/cpu.h" #include "mem.h" #include "pci.h" #include "device.h" diff --git a/src/i430vx.c b/src/i430vx.c index 967701251..0e5c50117 100644 --- a/src/i430vx.c +++ b/src/i430vx.c @@ -8,7 +8,7 @@ * * Implementation of the Intel 430VX PCISet chip. * - * Version: @(#)i430vx.c 1.0.2 2017/06/17 + * Version: @(#)i430vx.c 1.0.3 2017/08/23 * * Authors: Sarah Walker, * Miran Grca, @@ -17,7 +17,7 @@ */ #include #include "ibm.h" -#include "cpu/cpu.h" +#include "CPU/cpu.h" #include "io.h" #include "mem.h" #include "pci.h" diff --git a/src/i440fx.c b/src/i440fx.c index 811215c63..bedcde6df 100644 --- a/src/i440fx.c +++ b/src/i440fx.c @@ -8,7 +8,7 @@ * * Implementation of the Intel 440FX PCISet chip. * - * Version: @(#)i440fx.c 1.0.1 2017/06/17 + * Version: @(#)i440fx.c 1.0.2 2017/08/23 * * Authors: Sarah Walker, * Miran Grca, @@ -17,7 +17,7 @@ */ #include #include "ibm.h" -#include "cpu/cpu.h" +#include "CPU/cpu.h" #include "io.h" #include "mem.h" #include "pci.h" diff --git a/src/i82335.h b/src/i82335.h index 048730b80..7cb4c4ef3 100644 --- a/src/i82335.h +++ b/src/i82335.h @@ -1 +1 @@ -void i82335_init(); +extern void i82335_init(void); diff --git a/src/ide.h b/src/ide.h index 953cb3731..ad3295ee8 100644 --- a/src/ide.h +++ b/src/ide.h @@ -9,14 +9,14 @@ * Implementation of the IDE emulation for hard disks and ATAPI * CD-ROM devices. * - * Version: @(#)ide.h 1.0.0 2017/05/30 + * Version: @(#)ide.h 1.0.1 2017/08/23 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * TheCollector1995, * Copyright 2008-2017 Sarah Walker. - * Copyright 2016-2017 Miran Grca. - * Copyright 2016-2017 TheCollector1995. + * Copyright 2016,2017 Miran Grca. + * Copyright 2016,2017 TheCollector1995. */ #ifndef EMU_IDE_H # define EMU_IDE_H @@ -63,42 +63,42 @@ extern int ideboard; extern int ide_enable[5]; extern int ide_irq[5]; -IDE ide_drives[IDE_NUM + XTIDE_NUM]; - - +extern IDE ide_drives[IDE_NUM + XTIDE_NUM]; extern int idecallback[5]; -extern void writeide(int ide_board, uint16_t addr, uint8_t val); -extern void writeidew(int ide_board, uint16_t val); -extern uint8_t readide(int ide_board, uint16_t addr); -extern uint16_t readidew(int ide_board); -extern void callbackide(int ide_board); -extern void resetide(void); -extern void ide_init(void); -extern void ide_xtide_init(void); -extern void ide_ter_init(void); -extern void ide_qua_init(void); -extern void ide_pri_enable(void); -extern void ide_sec_enable(void); -extern void ide_ter_enable(void); -extern void ide_qua_enable(void); -extern void ide_pri_disable(void); -extern void ide_sec_disable(void); -extern void ide_ter_disable(void); -extern void ide_qua_disable(void); -extern void ide_set_bus_master(int (*read)(int channel, uint8_t *data, int transfer_length), int (*write)(int channel, uint8_t *data, int transfer_length), void (*set_irq)(int channel)); -void ide_irq_raise(IDE *ide); -void ide_irq_lower(IDE *ide); -void ide_padstr8(uint8_t *buf, int buf_size, const char *src); +extern void writeide(int ide_board, uint16_t addr, uint8_t val); +extern void writeidew(int ide_board, uint16_t val); +extern uint8_t readide(int ide_board, uint16_t addr); +extern uint16_t readidew(int ide_board); +extern void callbackide(int ide_board); +extern void resetide(void); +extern void ide_init(void); +extern void ide_xtide_init(void); +extern void ide_ter_init(void); +extern void ide_qua_init(void); +extern void ide_pri_enable(void); +extern void ide_sec_enable(void); +extern void ide_ter_enable(void); +extern void ide_qua_enable(void); +extern void ide_pri_disable(void); +extern void ide_sec_disable(void); +extern void ide_ter_disable(void); +extern void ide_qua_disable(void); +extern void ide_set_bus_master(int (*read)(int channel, uint8_t *data, int transfer_length), int (*write)(int channel, uint8_t *data, int transfer_length), void (*set_irq)(int channel)); -void win_cdrom_eject(uint8_t id); -void win_cdrom_reload(uint8_t id); +extern void ide_irq_raise(IDE *ide); +extern void ide_irq_lower(IDE *ide); -void ide_pri_disable(void); -void ide_pri_enable_ex(void); -void ide_set_base(int controller, uint16_t port); -void ide_set_side(int controller, uint16_t port); +extern void ide_padstr8(uint8_t *buf, int buf_size, const char *src); + +extern void win_cdrom_eject(uint8_t id); +extern void win_cdrom_reload(uint8_t id); + +extern void ide_pri_disable(void); +extern void ide_pri_enable_ex(void); +extern void ide_set_base(int controller, uint16_t port); +extern void ide_set_side(int controller, uint16_t port); #endif /*EMU_IDE_H*/ diff --git a/src/intel.c b/src/intel.c index 01560852f..89d5d6b5b 100644 --- a/src/intel.c +++ b/src/intel.c @@ -2,7 +2,7 @@ see COPYING for more details */ #include "ibm.h" -#include "cpu/cpu.h" +#include "CPU/cpu.h" #include "io.h" #include "mem.h" #include "pit.h" diff --git a/src/intel.h b/src/intel.h index 7fe2f8c0b..d2603bcbd 100644 --- a/src/intel.h +++ b/src/intel.h @@ -1,5 +1,5 @@ /* Copyright holders: Sarah Walker see COPYING for more details */ -void intel_batman_init(); -void intel_endeavor_init(); +extern void intel_batman_init(void); +extern void intel_endeavor_init(void); diff --git a/src/intel_flash.c b/src/intel_flash.c index e07195754..51d37897d 100644 --- a/src/intel_flash.c +++ b/src/intel_flash.c @@ -8,9 +8,9 @@ * * Implementation of the Intel 2 Mbit 8-bit flash devices. * - * Version: @(#)intel_flash.c 1.0.0 2017/05/30 + * Version: @(#)intel_flash.c 1.0.1 2017/08/23 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. * Copyright 2016-2017 Miran Grca. diff --git a/src/io.c b/src/io.c index ca9259e75..dd10e42c9 100644 --- a/src/io.c +++ b/src/io.c @@ -16,7 +16,7 @@ void (*port_outl[0x10000][2])(uint16_t addr, uint32_t val, void *priv); void *port_priv[0x10000][2]; -void io_init() +void io_init(void) { int c; pclog("io_init\n"); diff --git a/src/io.h b/src/io.h index c9dfbdd4c..384ca4662 100644 --- a/src/io.h +++ b/src/io.h @@ -1,9 +1,9 @@ /* Copyright holders: Sarah Walker see COPYING for more details */ -void io_init(); +extern void io_init(void); -void io_sethandler(uint16_t base, int size, +extern void io_sethandler(uint16_t base, int size, uint8_t (*inb)(uint16_t addr, void *priv), uint16_t (*inw)(uint16_t addr, void *priv), uint32_t (*inl)(uint16_t addr, void *priv), @@ -12,7 +12,7 @@ void io_sethandler(uint16_t base, int size, void (*outl)(uint16_t addr, uint32_t val, void *priv), void *priv); -void io_removehandler(uint16_t base, int size, +extern void io_removehandler(uint16_t base, int size, uint8_t (*inb)(uint16_t addr, void *priv), uint16_t (*inw)(uint16_t addr, void *priv), uint32_t (*inl)(uint16_t addr, void *priv), diff --git a/src/jim.c b/src/jim.c index 6ac1b16f0..39dc91eb5 100644 --- a/src/jim.c +++ b/src/jim.c @@ -4,7 +4,7 @@ #include #include #include "ibm.h" -#include "cpu/cpu.h" +#include "CPU/cpu.h" #include "io.h" #include "device.h" #include "model.h" diff --git a/src/joystick_tm_fcs.c b/src/joystick_tm_fcs.c index 1380c052d..93babc162 100644 --- a/src/joystick_tm_fcs.c +++ b/src/joystick_tm_fcs.c @@ -7,7 +7,7 @@ #include "plat_joystick.h" -static void *tm_fcs_init() +static void *tm_fcs_init(void) { return NULL; } diff --git a/src/keyboard.c b/src/keyboard.c index d551fa622..cf9729715 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -8,9 +8,9 @@ * * Host to guest keyboard interface and keyboard scan code sets. * - * Version: @(#)keyboard.c 1.0.0 2017/05/30 + * Version: @(#)keyboard.c 1.0.1 2017/08/23 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. * Copyright 2016-2017 Miran Grca. diff --git a/src/keyboard.h b/src/keyboard.h index 0c3a1b651..ce4b65758 100644 --- a/src/keyboard.h +++ b/src/keyboard.h @@ -8,22 +8,29 @@ * * Host to guest keyboard interface and keyboard scan code sets. * - * Version: @(#)keyboard.h 1.0.0 2017/05/30 + * Version: @(#)keyboard.h 1.0.1 2017/08/23 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. - * Copyright 2016-2017 Miran Grca. + * Copyright 2016,2017 Miran Grca. */ +#ifndef EMU_KEYBOARD_H +# define EMU_KEYBOARD_H + -extern void (*keyboard_send)(uint8_t val); -extern void (*keyboard_poll)(); extern int keyboard_scan; - extern int pcem_key[272]; extern uint8_t mode; -void keyboard_process(); extern uint8_t set3_flags[272]; extern uint8_t set3_all_repeat; extern uint8_t set3_all_break; + + +extern void (*keyboard_send)(uint8_t val); +extern void (*keyboard_poll)(void); +extern void keyboard_process(void); + + +#endif /*EMU_KEYBOARD_H*/ diff --git a/src/keyboard_amstrad.c b/src/keyboard_amstrad.c index f87cfd983..42de0b029 100644 --- a/src/keyboard_amstrad.c +++ b/src/keyboard_amstrad.c @@ -8,8 +8,8 @@ #include "pic.h" #include "pit.h" #include "timer.h" -#include "sound/sound.h" -#include "sound/snd_speaker.h" +#include "SOUND/sound.h" +#include "SOUND/snd_speaker.h" #include "keyboard.h" #include "keyboard_amstrad.h" @@ -37,7 +37,7 @@ static int key_queue_start = 0, key_queue_end = 0; static uint8_t amstrad_systemstat_1, amstrad_systemstat_2; -void keyboard_amstrad_poll() +void keyboard_amstrad_poll(void) { keybsenddelay += (1000 * TIMER_USEC); if (keyboard_amstrad.wantirq) @@ -156,14 +156,14 @@ uint8_t keyboard_amstrad_read(uint16_t port, void *priv) return temp; } -void keyboard_amstrad_reset() +void keyboard_amstrad_reset(void) { keyboard_amstrad.wantirq = 0; keyboard_scan = 1; } -void keyboard_amstrad_init() +void keyboard_amstrad_init(void) { pclog("keyboard_amstrad_init\n"); io_sethandler(0x0060, 0x0006, keyboard_amstrad_read, NULL, NULL, keyboard_amstrad_write, NULL, NULL, NULL); @@ -171,5 +171,5 @@ void keyboard_amstrad_init() keyboard_send = keyboard_amstrad_adddata; keyboard_poll = keyboard_amstrad_poll; - timer_add(keyboard_amstrad_poll, &keybsenddelay, TIMER_ALWAYS_ENABLED, NULL); + timer_add((void (*)(void *))keyboard_amstrad_poll, &keybsenddelay, TIMER_ALWAYS_ENABLED, NULL); } diff --git a/src/keyboard_amstrad.h b/src/keyboard_amstrad.h index cc893b7b0..f799e6c73 100644 --- a/src/keyboard_amstrad.h +++ b/src/keyboard_amstrad.h @@ -1,6 +1,6 @@ /* Copyright holders: Sarah Walker see COPYING for more details */ -void keyboard_amstrad_init(); -void keyboard_amstrad_reset(); -void keyboard_amstrad_poll(); +extern void keyboard_amstrad_init(void); +extern void keyboard_amstrad_reset(void); +extern void keyboard_amstrad_poll(void); diff --git a/src/keyboard_at.c b/src/keyboard_at.c index fbd9c02e1..4af50ece7 100644 --- a/src/keyboard_at.c +++ b/src/keyboard_at.c @@ -8,14 +8,13 @@ * * Intel 8042 (AT keyboard controller) emulation. * - * Version: @(#)keyboard_at.c 1.0.0 2017/05/30 + * Version: @(#)keyboard_at.c 1.0.1 2017/08/23 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. * Copyright 2016-2017 Miran Grca. */ - #include #include "ibm.h" #include "io.h" @@ -25,8 +24,8 @@ #include "timer.h" #include "disc.h" #include "fdc.h" -#include "sound/sound.h" -#include "sound/snd_speaker.h" +#include "SOUND/sound.h" +#include "SOUND/snd_speaker.h" #include "keyboard.h" #include "keyboard_at.h" @@ -143,7 +142,7 @@ static uint8_t nont_to_t[256] = { 0xFF, 0x43, 0x41, 0x3F, 0x3D, 0x3B, 0x3C, 0x58 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF }; -void keyboard_at_poll() +static void keyboard_at_poll(void) { keybsenddelay += (1000 * TIMER_USEC); @@ -775,7 +774,7 @@ uint8_t keyboard_at_read(uint16_t port, void *priv) return temp; } -void keyboard_at_reset() +void keyboard_at_reset(void) { keyboard_at.initialised = 0; keyboard_at.status = STAT_LOCK | STAT_CD; @@ -805,7 +804,7 @@ static void at_refresh(void *p) keyboard_at.refresh_time += PS2_REFRESH_TIME; } -void keyboard_at_init() +void keyboard_at_init(void) { io_sethandler(0x0060, 0x0005, keyboard_at_read, NULL, NULL, keyboard_at_write, NULL, NULL, NULL); keyboard_at_reset(); @@ -816,7 +815,7 @@ void keyboard_at_init() keyboard_at.is_ps2 = 0; dtrans = 0; - timer_add(keyboard_at_poll, &keybsenddelay, TIMER_ALWAYS_ENABLED, NULL); + timer_add((void (*)(void *))keyboard_at_poll, &keybsenddelay, TIMER_ALWAYS_ENABLED, NULL); } void keyboard_at_set_mouse(void (*mouse_write)(uint8_t val, void *p), void *p) @@ -825,7 +824,7 @@ void keyboard_at_set_mouse(void (*mouse_write)(uint8_t val, void *p), void *p) keyboard_at.mouse_p = p; } -void keyboard_at_init_ps2() +void keyboard_at_init_ps2(void) { timer_add(at_refresh, &keyboard_at.refresh_time, TIMER_ALWAYS_ENABLED, NULL); keyboard_at.is_ps2 = 1; diff --git a/src/keyboard_at.h b/src/keyboard_at.h index d92101543..c8d9c7a15 100644 --- a/src/keyboard_at.h +++ b/src/keyboard_at.h @@ -8,21 +8,22 @@ * * Intel 8042 (AT keyboard controller) emulation. * - * Version: @(#)keyboard_at.h 1.0.0 2017/05/30 + * Version: @(#)keyboard_at.h 1.0.1 2017/08/23 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. - * Copyright 2016-2017 Miran Grca. + * Copyright 2016,2017 Miran Grca. */ -void keyboard_at_init(); -void keyboard_at_init_ps2(); -void keyboard_at_reset(); -void keyboard_at_poll(); -void keyboard_at_adddata_keyboard_raw(uint8_t val); -void keyboard_at_adddata_mouse(uint8_t val); -void keyboard_at_set_mouse(void (*mouse_write)(uint8_t val, void *p), void *p); extern int mouse_queue_start, mouse_queue_end; extern int mouse_scan; + + +extern void keyboard_at_init(void); +extern void keyboard_at_init_ps2(void); +extern void keyboard_at_reset(void); +extern void keyboard_at_adddata_keyboard_raw(uint8_t val); +extern void keyboard_at_adddata_mouse(uint8_t val); +extern void keyboard_at_set_mouse(void (*mouse_write)(uint8_t val, void *p), void *p); diff --git a/src/keyboard_olim24.c b/src/keyboard_olim24.c index 55c2f1868..16aacc041 100644 --- a/src/keyboard_olim24.c +++ b/src/keyboard_olim24.c @@ -6,8 +6,8 @@ #include "pit.h" #include "timer.h" #include "mouse.h" -#include "sound/sound.h" -#include "sound/snd_speaker.h" +#include "SOUND/sound.h" +#include "SOUND/snd_speaker.h" #include "keyboard.h" #include "keyboard_olim24.h" @@ -42,7 +42,8 @@ static int key_queue_start = 0, key_queue_end = 0; static uint8_t mouse_scancodes[7]; -void keyboard_olim24_poll() + +static void keyboard_olim24_poll(void) { keybsenddelay += (1000 * TIMER_USEC); if (keyboard_olim24.wantirq) @@ -62,6 +63,7 @@ void keyboard_olim24_poll() } } + void keyboard_olim24_adddata(uint8_t val) { key_queue[key_queue_end] = val; @@ -70,7 +72,8 @@ void keyboard_olim24_adddata(uint8_t val) return; } -void keyboard_olim24_write(uint16_t port, uint8_t val, void *priv) + +static void keyboard_olim24_write(uint16_t port, uint8_t val, void *priv) { pclog("keyboard_olim24 : write %04X %02X\n", port, val); /* if (ram[8] == 0xc3) @@ -155,7 +158,8 @@ void keyboard_olim24_write(uint16_t port, uint8_t val, void *priv) } } -uint8_t keyboard_olim24_read(uint16_t port, void *priv) + +static uint8_t keyboard_olim24_read(uint16_t port, void *priv) { uint8_t temp = 0xff; switch (port) @@ -191,7 +195,8 @@ uint8_t keyboard_olim24_read(uint16_t port, void *priv) return temp; } -void keyboard_olim24_reset() + +void keyboard_olim24_reset(void) { keyboard_olim24.status = STAT_LOCK | STAT_CD; keyboard_olim24.wantirq = 0; @@ -304,7 +309,8 @@ uint8_t mouse_olim24_poll(int x, int y, int z, int b, void *p) return(0); } -static void *mouse_olim24_init() + +static void *mouse_olim24_init(void) { mouse_olim24_t *mouse = (mouse_olim24_t *)malloc(sizeof(mouse_olim24_t)); memset(mouse, 0, sizeof(mouse_olim24_t)); @@ -312,6 +318,7 @@ static void *mouse_olim24_init() return mouse; } + static void mouse_olim24_close(void *p) { mouse_olim24_t *mouse = (mouse_olim24_t *)p; @@ -319,6 +326,7 @@ static void mouse_olim24_close(void *p) free(mouse); } + mouse_t mouse_olim24 = { "Olivetti M24 mouse", @@ -329,7 +337,7 @@ mouse_t mouse_olim24 = mouse_olim24_poll }; -void keyboard_olim24_init() +void keyboard_olim24_init(void) { io_sethandler(0x0060, 0x0002, keyboard_olim24_read, NULL, NULL, keyboard_olim24_write, NULL, NULL, NULL); io_sethandler(0x0064, 0x0001, keyboard_olim24_read, NULL, NULL, keyboard_olim24_write, NULL, NULL, NULL); @@ -337,5 +345,5 @@ void keyboard_olim24_init() keyboard_send = keyboard_olim24_adddata; keyboard_poll = keyboard_olim24_poll; - timer_add(keyboard_olim24_poll, &keybsenddelay, TIMER_ALWAYS_ENABLED, NULL); + timer_add((void(*)(void *))keyboard_olim24_poll, &keybsenddelay, TIMER_ALWAYS_ENABLED, NULL); } diff --git a/src/keyboard_olim24.h b/src/keyboard_olim24.h index 305a3e245..f4be13c40 100644 --- a/src/keyboard_olim24.h +++ b/src/keyboard_olim24.h @@ -1,3 +1,2 @@ -void keyboard_olim24_init(); -void keyboard_olim24_reset(); -void keyboard_olim24_poll(); +extern void keyboard_olim24_init(void); +extern void keyboard_olim24_reset(void); diff --git a/src/keyboard_pcjr.c b/src/keyboard_pcjr.c index a7005d77b..e052a3a70 100644 --- a/src/keyboard_pcjr.c +++ b/src/keyboard_pcjr.c @@ -10,9 +10,9 @@ #include "pit.h" #include "timer.h" #include "device.h" -#include "sound/sound.h" -#include "sound/snd_speaker.h" -#include "sound/snd_sn76489.h" +#include "SOUND/sound.h" +#include "SOUND/snd_speaker.h" +#include "SOUND/snd_sn76489.h" #include "keyboard.h" #include "keyboard_pcjr.h" @@ -197,5 +197,5 @@ void keyboard_pcjr_init() keyboard_send = keyboard_pcjr_adddata; keyboard_poll = keyboard_pcjr_poll; - timer_add(keyboard_pcjr_poll, &keybsenddelay, TIMER_ALWAYS_ENABLED, NULL); + timer_add((void (*)(void *))keyboard_pcjr_poll, &keybsenddelay, TIMER_ALWAYS_ENABLED, NULL); } diff --git a/src/keyboard_pcjr.h b/src/keyboard_pcjr.h index 796fe1fc3..424b3e70d 100644 --- a/src/keyboard_pcjr.h +++ b/src/keyboard_pcjr.h @@ -1,6 +1,6 @@ /* Copyright holders: Sarah Walker see COPYING for more details */ -void keyboard_pcjr_init(); -void keyboard_pcjr_reset(); -void keyboard_pcjr_poll(); +extern void keyboard_pcjr_init(void); +extern void keyboard_pcjr_reset(void); +extern void keyboard_pcjr_poll(void); diff --git a/src/keyboard_xt.c b/src/keyboard_xt.c index c4497f9b9..58d31399e 100644 --- a/src/keyboard_xt.c +++ b/src/keyboard_xt.c @@ -10,8 +10,8 @@ #include "timer.h" #include "device.h" #include "tandy_eeprom.h" -#include "sound/sound.h" -#include "sound/snd_speaker.h" +#include "SOUND/sound.h" +#include "SOUND/Snd_speaker.h" #include "keyboard.h" #include "keyboard_xt.h" @@ -39,7 +39,8 @@ struct static uint8_t key_queue[16]; static int key_queue_start = 0, key_queue_end = 0; -void keyboard_xt_poll() + +static void keyboard_xt_poll(void) { keybsenddelay += (1000 * TIMER_USEC); if (key_queue_start != key_queue_end && !keyboard_xt.blocked) @@ -60,7 +61,7 @@ void keyboard_xt_adddata(uint8_t val) return; } -void keyboard_xt_write(uint16_t port, uint8_t val, void *priv) +static void keyboard_xt_write(uint16_t port, uint8_t val, void *priv) { switch (port) { @@ -94,7 +95,7 @@ void keyboard_xt_write(uint16_t port, uint8_t val, void *priv) } } -uint8_t keyboard_xt_read(uint16_t port, void *priv) +static uint8_t keyboard_xt_read(uint16_t port, void *priv) { uint8_t temp; switch (port) @@ -151,14 +152,14 @@ uint8_t keyboard_xt_read(uint16_t port, void *priv) return temp; } -void keyboard_xt_reset() +void keyboard_xt_reset(void) { keyboard_xt.blocked = 0; keyboard_scan = 1; } -void keyboard_xt_init() +void keyboard_xt_init(void) { io_sethandler(0x0060, 0x0004, keyboard_xt_read, NULL, NULL, keyboard_xt_write, NULL, NULL, NULL); keyboard_xt_reset(); @@ -166,10 +167,10 @@ void keyboard_xt_init() keyboard_poll = keyboard_xt_poll; keyboard_xt.tandy = 0; - timer_add(keyboard_xt_poll, &keybsenddelay, TIMER_ALWAYS_ENABLED, NULL); + timer_add((void (*)(void *))keyboard_xt_poll, &keybsenddelay, TIMER_ALWAYS_ENABLED, NULL); } -void keyboard_tandy_init() +void keyboard_tandy_init(void) { io_sethandler(0x0060, 0x0004, keyboard_xt_read, NULL, NULL, keyboard_xt_write, NULL, NULL, NULL); keyboard_xt_reset(); @@ -177,5 +178,5 @@ void keyboard_tandy_init() keyboard_poll = keyboard_xt_poll; keyboard_xt.tandy = (romset != ROM_TANDY) ? 1 : 0; - timer_add(keyboard_xt_poll, &keybsenddelay, TIMER_ALWAYS_ENABLED, NULL); + timer_add((void (*)(void *))keyboard_xt_poll, &keybsenddelay, TIMER_ALWAYS_ENABLED, NULL); } diff --git a/src/keyboard_xt.h b/src/keyboard_xt.h index 7569ed2fa..a5fbb7b6f 100644 --- a/src/keyboard_xt.h +++ b/src/keyboard_xt.h @@ -1,7 +1,6 @@ /* Copyright holders: Sarah Walker see COPYING for more details */ -void keyboard_xt_init(); -void keyboard_tandy_init(); -void keyboard_xt_reset(); -void keyboard_xt_poll(); +extern void keyboard_xt_init(void); +extern void keyboard_tandy_init(void); +extern void keyboard_xt_reset(void); diff --git a/src/laserxt.c b/src/laserxt.c index 33afbce37..da9a5695d 100644 --- a/src/laserxt.c +++ b/src/laserxt.c @@ -1,6 +1,6 @@ /*This is the chipset used in the LaserXT series model*/ #include "ibm.h" -#include "cpu/cpu.h" +#include "CPU/cpu.h" #include "io.h" #include "mem.h" #include "device.h" diff --git a/src/lpt.c b/src/lpt.c index d8458b28e..736784981 100644 --- a/src/lpt.c +++ b/src/lpt.c @@ -3,12 +3,13 @@ */ #include "ibm.h" #include "io.h" - #include "lpt.h" + static uint8_t lpt1_dat, lpt2_dat, lpt3_dat; static uint8_t lpt1_ctrl, lpt2_ctrl, lpt3_ctrl; + void lpt1_write(uint16_t port, uint8_t val, void *priv) { switch (port & 3) @@ -83,7 +84,7 @@ uint8_t lpt3_read(uint16_t port, void *priv) uint16_t lpt_addr[3] = { 0x378, 0x278, 0x3bc }; -void lpt_init() +void lpt_init(void) { if (lpt_enabled) { @@ -102,7 +103,7 @@ void lpt1_init(uint16_t port) lpt_addr[0] = port; } } -void lpt1_remove() +void lpt1_remove(void) { if (lpt_enabled) { @@ -117,7 +118,7 @@ void lpt2_init(uint16_t port) lpt_addr[1] = port; } } -void lpt2_remove() +void lpt2_remove(void) { if (lpt_enabled) { @@ -125,7 +126,7 @@ void lpt2_remove() } } -void lpt2_remove_ams() +void lpt2_remove_ams(void) { if (lpt_enabled) { @@ -141,7 +142,7 @@ void lpt3_init(uint16_t port) lpt_addr[2] = port; } } -void lpt3_remove() +void lpt3_remove(void) { if (lpt_enabled) { diff --git a/src/lpt.h b/src/lpt.h index 78968b5a3..0568f55fd 100644 --- a/src/lpt.h +++ b/src/lpt.h @@ -1,11 +1,11 @@ /* Copyright holders: Sarah Walker see COPYING for more details */ -extern void lpt_init(); +extern void lpt_init(void); extern void lpt1_init(uint16_t port); -extern void lpt1_remove(); +extern void lpt1_remove(void); extern void lpt2_init(uint16_t port); -extern void lpt2_remove(); -extern void lpt2_remove_ams(); +extern void lpt2_remove(void); +extern void lpt2_remove_ams(void); extern void lpt3_init(uint16_t port); -extern void lpt3_remove(); +extern void lpt3_remove(void); diff --git a/src/mca.c b/src/mca.c index aacebd792..878b6f53d 100644 --- a/src/mca.c +++ b/src/mca.c @@ -1,15 +1,17 @@ #include "ibm.h" #include "io.h" #include "mem.h" - #include "mca.h" + void (*mca_card_write[8])(int addr, uint8_t val, void *priv); uint8_t (*mca_card_read[8])(int addr, void *priv); void *mca_priv[8]; + static int mca_index; static int mca_nr_cards; + void mca_init(int nr_cards) { int c; diff --git a/src/mca.h b/src/mca.h index 90d7f07ef..26e29e7c5 100644 --- a/src/mca.h +++ b/src/mca.h @@ -1,5 +1,5 @@ -void mca_init(int nr_cards); -void mca_add(uint8_t (*read)(int addr, void *priv), void (*write)(int addr, uint8_t val, void *priv), void *priv); -void mca_set_index(int index); -uint8_t mca_read(uint16_t port); -void mca_write(uint16_t port, uint8_t val); +extern void mca_init(int nr_cards); +extern void mca_add(uint8_t (*read)(int addr, void *priv), void (*write)(int addr, uint8_t val, void *priv), void *priv); +extern void mca_set_index(int index); +extern uint8_t mca_read(uint16_t port); +extern void mca_write(uint16_t port, uint8_t val); diff --git a/src/mcr.c b/src/mcr.c index 1cc47f441..1638afa1a 100644 --- a/src/mcr.c +++ b/src/mcr.c @@ -3,10 +3,13 @@ It controls memory addressing and shadowing*/ #include "ibm.h" + int nextreg6; uint8_t mcr22; int mcrlock,mcrfirst; -void resetmcr() + + +void resetmcr(void) { mcrlock=0; mcrfirst=1; diff --git a/src/mem.c b/src/mem.c index 7634c3622..a7170ae5f 100644 --- a/src/mem.c +++ b/src/mem.c @@ -10,15 +10,15 @@ #include #include #include "ibm.h" -#include "cpu/cpu.h" -#include "cpu/x86_ops.h" -#include "cpu/x86.h" +#include "CPU/cpu.h" +#include "CPU/x86_ops.h" +#include "CPU/x86.h" #include "config.h" #include "io.h" #include "mem.h" #include "rom.h" -#include "cpu/codegen.h" -#include "video/video.h" +#include "CPU/codegen.h" +#include "VIDEO/video.h" page_t *pages; diff --git a/src/memregs.c b/src/memregs.c index 6d002f512..75b8a1a58 100644 --- a/src/memregs.c +++ b/src/memregs.c @@ -9,17 +9,17 @@ * Emulation of the memory I/O scratch registers on ports 0xE1 * and 0xE2, used by just about any emulated machine. * - * Version: @(#)memregs.c 1.0.0 2017/05/30 + * Version: @(#)memregs.c 1.0.1 2017/08/23 * * Author: Miran Grca, * Copyright 2016-2017 Miran Grca. */ #include "ibm.h" - #include "io.h" #include "memregs.h" + static uint8_t mem_regs[16] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; static uint8_t mem_reg_ffff = 0; @@ -44,14 +44,14 @@ uint8_t memregs_read(uint16_t port, void *priv) return mem_regs[port & 0xf]; } -void memregs_init() +void memregs_init(void) { pclog("Memory Registers Init\n"); io_sethandler(0x00e1, 0x0002, memregs_read, NULL, NULL, memregs_write, NULL, NULL, NULL); } -void powermate_memregs_init() +void powermate_memregs_init(void) { pclog("Memory Registers Init\n"); diff --git a/src/memregs.h b/src/memregs.h index cb8d626b7..c44cc21ed 100644 --- a/src/memregs.h +++ b/src/memregs.h @@ -9,11 +9,17 @@ * Emulation of the memory I/O scratch registers on ports 0xE1 * and 0xE2, used by just about any emulated machine. * - * Version: @(#)memregs.h 1.0.0 2017/05/30 + * Version: @(#)memregs.h 1.0.1 2017/08/23 * * Author: Miran Grca, - * Copyright 2016-2017 Miran Grca. + * Copyright 2016,2017 Miran Grca. */ +#ifndef EMU_MEMREGS_H +# define EMU_MEMREGS_H -extern void memregs_init(); -void powermate_memregs_init(); + +extern void powermate_memregs_init(void); +extern void memregs_init(void); + + +#endif /*EMU_MEMREGS_H*/ diff --git a/src/mfm_at.c b/src/mfm_at.c index eca973a85..c6531bbfd 100644 --- a/src/mfm_at.c +++ b/src/mfm_at.c @@ -6,7 +6,6 @@ #include "io.h" #include "pic.h" #include "timer.h" - #include "mfm_at.h" diff --git a/src/mfm_xebec.c b/src/mfm_xebec.c index 800d0eb44..f581d92d9 100644 --- a/src/mfm_xebec.c +++ b/src/mfm_xebec.c @@ -10,9 +10,9 @@ #include "pic.h" #include "rom.h" #include "timer.h" - #include "mfm_xebec.h" + #define XEBEC_TIME (2000 * TIMER_USEC) enum diff --git a/src/model.c b/src/model.c index 3e0efa828..a72cef74d 100644 --- a/src/model.c +++ b/src/model.c @@ -8,7 +8,7 @@ * * Handling of the emulated machines. * - * Version: @(#)model.c 1.0.5 2017/07/27 + * Version: @(#)model.c 1.0.6 2017/08/23 * * Authors: Sarah Walker, * Miran Grca, @@ -19,7 +19,7 @@ #include #include "ibm.h" -#include "cpu/cpu.h" +#include "CPU/cpu.h" #include "io.h" #include "mem.h" #include "rom.h" @@ -58,17 +58,17 @@ #include "serial.h" #include "sis85c471.h" #include "sio.h" -#include "sound/snd_ps1.h" -#include "sound/snd_pssj.h" -#include "sound/snd_sn76489.h" +#include "SOUND/snd_ps1.h" +#include "SOUND/snd_pssj.h" +#include "SOUND/snd_sn76489.h" #if 0 #include "superio_detect.h" #endif #include "tandy_eeprom.h" #include "tandy_rom.h" #include "um8669f.h" -#include "video/vid_pcjr.h" -#include "video/vid_tandy.h" +#include "VIDEO/vid_pcjr.h" +#include "VIDEO/vid_tandy.h" #include "w83877f.h" #include "wd76c10.h" #include "xtide.h" diff --git a/src/mouse.c b/src/mouse.c index 4a2d53f0b..5b1747197 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -8,7 +8,7 @@ * * Common driver module for MOUSE devices. * - * Version: @(#)mouse.c 1.0.5 2017/07/27 + * Version: @(#)mouse.c 1.0.6 2017/08/23 * * Authors: Sarah Walker, * Miran Grca, @@ -18,7 +18,7 @@ * Copyright 2016-2017 Miran Grca. */ #include "ibm.h" -#include "cpu/cpu.h" +#include "CPU/cpu.h" #include "device.h" #include "mouse.h" #include "model.h" diff --git a/src/neat.c b/src/neat.c index 85063e591..a8feb6f05 100644 --- a/src/neat.c +++ b/src/neat.c @@ -3,7 +3,7 @@ */ /*This is the chipset used in the AMI 286 clone model*/ #include "ibm.h" -#include "cpu/cpu.h" +#include "CPU/cpu.h" #include "io.h" #include "device.h" #include "model.h" diff --git a/src/nmi.c b/src/nmi.c index a6ca4480e..59b50fd65 100644 --- a/src/nmi.c +++ b/src/nmi.c @@ -5,14 +5,17 @@ #include "io.h" #include "nmi.h" + int nmi_mask; + void nmi_write(uint16_t port, uint8_t val, void *p) { nmi_mask = val & 0x80; } -void nmi_init() + +void nmi_init(void) { io_sethandler(0x00a0, 0x0001, NULL, NULL, NULL, nmi_write, NULL, NULL, NULL); nmi_mask = 0; diff --git a/src/nmi.h b/src/nmi.h index 87c073bc6..5d3b9c744 100644 --- a/src/nmi.h +++ b/src/nmi.h @@ -1,8 +1,8 @@ /* Copyright holders: Sarah Walker see COPYING for more details */ -void nmi_init(); -void nmi_write(uint16_t port, uint8_t val, void *p); extern int nmi_mask; +extern void nmi_init(void); +extern void nmi_write(uint16_t port, uint8_t val, void *p); diff --git a/src/nvr.c b/src/nvr.c index 03c642043..589d8fa7c 100644 --- a/src/nvr.c +++ b/src/nvr.c @@ -34,17 +34,17 @@ #include "timer.h" #include "rtc.h" + int oldmodel; int nvrmask=63; char nvrram[128]; int nvraddr; - int nvr_dosave = 0; static int nvr_onesec_time = 0, nvr_onesec_cnt = 0; - static int rtctime; + void getnvrtime(void) { time_get(nvrram); diff --git a/src/olivetti_m24.c b/src/olivetti_m24.c index 3c9e24ba7..67e354fc3 100644 --- a/src/olivetti_m24.c +++ b/src/olivetti_m24.c @@ -2,7 +2,7 @@ see COPYING for more details */ #include "ibm.h" -#include "cpu/cpu.h" +#include "CPU/cpu.h" #include "io.h" #include "device.h" #include "model.h" diff --git a/src/opti495.c b/src/opti495.c index b9a6e2e30..5a82251f4 100644 --- a/src/opti495.c +++ b/src/opti495.c @@ -252,7 +252,7 @@ Note: the block address is forced to be a multiple of the block size by SeeAlso: #P0178,#P0187 */ #include "ibm.h" -#include "cpu/cpu.h" +#include "CPU/cpu.h" #include "io.h" #include "mem.h" #include "device.h" diff --git a/src/pc.c b/src/pc.c index 2695067ab..35c33598d 100644 --- a/src/pc.c +++ b/src/pc.c @@ -22,9 +22,9 @@ #include "86box.h" #include "ibm.h" #include "mem.h" -#include "cpu/cpu.h" -#include "cpu/x86_ops.h" -#include "cpu/codegen.h" +#include "CPU/cpu.h" +#include "CPU/x86_ops.h" +#include "CPU/codegen.h" #include "dma.h" #include "nvr.h" #include "pic.h" @@ -52,9 +52,9 @@ #include "cdrom_null.h" #include "keyboard.h" #include "keyboard_at.h" -#include "sound/midi.h" +#include "SOUND/midi.h" #include "mouse.h" -#include "network/network.h" +#include "NETWORK/network.h" #ifdef WALTJE # define UNICODE # include "plat_dir.h" @@ -67,17 +67,17 @@ #include "plat_ui.h" #include "scsi.h" #include "serial.h" -#include "sound/sound.h" -#include "sound/snd_cms.h" -#include "sound/snd_dbopl.h" -#include "sound/snd_mpu401.h" -#include "sound/snd_opl.h" -#include "sound/snd_gus.h" -#include "sound/snd_sb.h" -#include "sound/snd_speaker.h" -#include "sound/snd_ssi2001.h" -#include "video/video.h" -#include "video/vid_voodoo.h" +#include "SOUND/sound.h" +#include "SOUND/snd_cms.h" +#include "SOUND/snd_dbopl.h" +#include "SOUND/snd_mpu401.h" +#include "SOUND/snd_opl.h" +#include "SOUND/snd_gus.h" +#include "SOUND/snd_sb.h" +#include "SOUND/snd_speaker.h" +#include "SOUND/snd_ssi2001.h" +#include "VIDEO/video.h" +#include "VIDEO/vid_voodoo.h" wchar_t pcempath[512]; diff --git a/src/pc87306.h b/src/pc87306.h index d1891fdd8..1a7661798 100644 --- a/src/pc87306.h +++ b/src/pc87306.h @@ -9,10 +9,10 @@ * Emulation of the National Semiconductors PC87306 Super I/O * chip. * - * Version: @(#)pc87306.h 1.0.0 2017/05/30 + * Version: @(#)pc87306.h 1.0.1 2017/08/23 * * Author: Miran Grca, - * Copyright 2016-2017 Miran Grca. + * Copyright 2016,2017 Miran Grca. */ -extern void pc87306_init(); +extern void pc87306_init(void); diff --git a/src/pci.c b/src/pci.c index 397442c4c..251e288ab 100644 --- a/src/pci.c +++ b/src/pci.c @@ -2,9 +2,9 @@ #include "io.h" #include "mem.h" #include "pic.h" - #include "pci.h" + void (*pci_card_write[32])(int func, int addr, uint8_t val, void *priv); uint8_t (*pci_card_read[32])(int func, int addr, void *priv); void *pci_priv[32]; diff --git a/src/pic.c b/src/pic.c index 7c20125e9..4c927c980 100644 --- a/src/pic.c +++ b/src/pic.c @@ -3,13 +3,14 @@ #include "pic.h" #include "pit.h" + int output; int intclear; int keywaiting=0; int pic_intpending; - PIC pic, pic2; + void pic_updatepending() { uint16_t temp_pending = 0; diff --git a/src/pic.h b/src/pic.h index 74660941a..09dd45c99 100644 --- a/src/pic.h +++ b/src/pic.h @@ -1,10 +1,10 @@ -void pic_init(); -void pic2_init(); -void pic_reset(); +extern void pic_init(void); +extern void pic2_init(void); +extern void pic_reset(void); -void picint(uint16_t num); -void picintlevel(uint16_t num); -void picintc(uint16_t num); -uint8_t picinterrupt(); -void picclear(int num); -void dumppic(); +extern void picint(uint16_t num); +extern void picintlevel(uint16_t num); +extern void picintc(uint16_t num); +extern uint8_t picinterrupt(void); +extern void picclear(int num); +extern void dumppic(void); diff --git a/src/piix.c b/src/piix.c index 584f1ccc3..002d7de3b 100644 --- a/src/piix.c +++ b/src/piix.c @@ -8,9 +8,9 @@ * * Emulation core dispatcher. * - * Version: @(#)piix.c 1.0.0 2017/05/30 + * Version: @(#)piix.c 1.0.1 2017/08/23 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. * Copyright 2016-2017 Miran Grca. @@ -29,16 +29,18 @@ #include "io.h" #include "mem.h" #include "pci.h" - #include "piix.h" + uint8_t piix_33 = 0; +static uint8_t piix_type = 1; +static uint8_t card_piix[256], card_piix_ide[256]; + + uint8_t piix_bus_master_read(uint16_t port, void *priv); void piix_bus_master_write(uint16_t port, uint8_t val, void *priv); -static uint8_t piix_type = 1; -static uint8_t card_piix[256], card_piix_ide[256]; void piix_write(int func, int addr, uint8_t val, void *priv) { diff --git a/src/piix.h b/src/piix.h index a922ff41e..f30634ae4 100644 --- a/src/piix.h +++ b/src/piix.h @@ -8,20 +8,20 @@ * * Emulation core dispatcher. * - * Version: @(#)piix.h 1.0.0 2017/05/30 + * Version: @(#)piix.h 1.0.1 2017/08/23 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. - * Copyright 2016-2017 Miran Grca. + * Copyright 2016,2017 Miran Grca. */ -void piix_init(int card, int pci_a, int pci_b, int pci_c, int pci_d); -void piix3_init(int card, int pci_a, int pci_b, int pci_c, int pci_d); +extern void piix_init(int card, int pci_a, int pci_b, int pci_c, int pci_d); +extern void piix3_init(int card, int pci_a, int pci_b, int pci_c, int pci_d); -uint8_t piix_bus_master_read(uint16_t port, void *priv); -void piix_bus_master_write(uint16_t port, uint8_t val, void *priv); +extern uint8_t piix_bus_master_read(uint16_t port, void *priv); +extern void piix_bus_master_write(uint16_t port, uint8_t val, void *priv); -int piix_bus_master_get_count(int channel); +extern int piix_bus_master_get_count(int channel); -int piix_bus_master_dma_read_ex(int channel, uint8_t *data); +extern int piix_bus_master_dma_read_ex(int channel, uint8_t *data); diff --git a/src/pit.c b/src/pit.c index 144630d5f..ba4afcde1 100644 --- a/src/pit.c +++ b/src/pit.c @@ -4,8 +4,8 @@ Expects aa55 back*/ #include -#include "ibm.h" -#include "cpu/cpu.h" +#include "IBM.h" +#include "CPU/cpu.h" #include "dma.h" #include "io.h" #include "pic.h" @@ -13,8 +13,8 @@ #include "device.h" #include "timer.h" #include "model.h" -#include "sound/snd_speaker.h" -#include "video/video.h" +#include "SOUND/snd_speaker.h" +#include "VIDEO/video.h" /*B0 to 40, two writes to 43, then two reads - value does not change!*/ diff --git a/src/pit.h b/src/pit.h index a827e9581..67db785b8 100644 --- a/src/pit.h +++ b/src/pit.h @@ -1,16 +1,17 @@ extern double PITCONST; -void pit_init(); -void pit_ps2_init(); -void pit_reset(PIT *pit); -void pit_set_gate(PIT *pit, int channel, int gate); -void pit_set_using_timer(PIT *pit, int t, int using_timer); -void pit_set_out_func(PIT *pit, int t, void (*func)(int new_out, int old_out)); -void pit_clock(PIT *pit, int t); + +extern void pit_init(void); +extern void pit_ps2_init(void); +extern void pit_reset(PIT *pit); +extern void pit_set_gate(PIT *pit, int channel, int gate); +extern void pit_set_using_timer(PIT *pit, int t, int using_timer); +extern void pit_set_out_func(PIT *pit, int t, void (*func)(int new_out, int old_out)); +extern void pit_clock(PIT *pit, int t); -void pit_null_timer(int new_out, int old_out); -void pit_irq0_timer(int new_out, int old_out); -void pit_irq0_timer_pcjr(int new_out, int old_out); -void pit_refresh_timer_xt(int new_out, int old_out); -void pit_refresh_timer_at(int new_out, int old_out); -void pit_speaker_timer(int new_out, int old_out); +extern void pit_null_timer(int new_out, int old_out); +extern void pit_irq0_timer(int new_out, int old_out); +extern void pit_irq0_timer_pcjr(int new_out, int old_out); +extern void pit_refresh_timer_xt(int new_out, int old_out); +extern void pit_refresh_timer_at(int new_out, int old_out); +extern void pit_speaker_timer(int new_out, int old_out); diff --git a/src/ps1.c b/src/ps1.c index 3efcc500b..782937bf9 100644 --- a/src/ps1.c +++ b/src/ps1.c @@ -2,7 +2,7 @@ see COPYING for more details */ #include "ibm.h" -#include "cpu/cpu.h" +#include "CPU/cpu.h" #include "io.h" #include "mem.h" #include "rom.h" diff --git a/src/ps2.c b/src/ps2.c index 9042b12e8..b37a6de99 100644 --- a/src/ps2.c +++ b/src/ps2.c @@ -1,5 +1,5 @@ #include "ibm.h" -#include "cpu/cpu.h" +#include "CPU/cpu.h" #include "io.h" #include "mem.h" #include "rom.h" diff --git a/src/ps2_mca.c b/src/ps2_mca.c index 1a31e07d5..9bf9c522f 100644 --- a/src/ps2_mca.c +++ b/src/ps2_mca.c @@ -1,6 +1,6 @@ #include "ibm.h" -#include "cpu/cpu.h" -#include "cpu/x86.h" +#include "CPU/cpu.h" +#include "CPU/x86.h" #include "io.h" #include "mca.h" #include "mem.h" diff --git a/src/ps2_mca.h b/src/ps2_mca.h index 8f242257e..c93492c99 100644 --- a/src/ps2_mca.h +++ b/src/ps2_mca.h @@ -1,3 +1,3 @@ -void ps2_mca_board_model_50_init(); -void ps2_mca_board_model_55sx_init(); -void ps2_mca_board_model_80_type2_init(); +extern void ps2_mca_board_model_50_init(void); +extern void ps2_mca_board_model_55sx_init(void); +extern void ps2_mca_board_model_80_type2_init(void); diff --git a/src/ps2_nvr.c b/src/ps2_nvr.c index 33661c813..bc62519a1 100644 --- a/src/ps2_nvr.c +++ b/src/ps2_nvr.c @@ -6,12 +6,14 @@ #include "rom.h" #include "ps2_nvr.h" + typedef struct ps2_nvr_t { int addr; uint8_t ram[8192]; } ps2_nvr_t; + static uint8_t ps2_nvr_read(uint16_t port, void *p) { ps2_nvr_t *nvr = (ps2_nvr_t *)p; diff --git a/src/rom.h b/src/rom.h index 39016d69f..a2f85d01f 100644 --- a/src/rom.h +++ b/src/rom.h @@ -1,10 +1,10 @@ /* Copyright holders: Sarah Walker see COPYING for more details */ -FILE *romfopen(wchar_t *fn, wchar_t *mode); -FILE *nvrfopen(wchar_t *fn, wchar_t *mode); -int rom_getfile(wchar_t *fn, wchar_t *s, int size); -int rom_present(wchar_t *fn); +extern FILE *romfopen(wchar_t *fn, wchar_t *mode); +extern FILE *nvrfopen(wchar_t *fn, wchar_t *mode); +extern int rom_getfile(wchar_t *fn, wchar_t *s, int size); +extern int rom_present(wchar_t *fn); typedef struct rom_t { @@ -13,9 +13,9 @@ typedef struct rom_t mem_mapping_t mapping; } rom_t; -int rom_init(rom_t *rom, wchar_t *fn, uint32_t address, int size, int mask, int file_offset, uint32_t flags); -int rom_init_interleaved(rom_t *rom, wchar_t *fn_low, wchar_t *fn_high, uint32_t address, int size, int mask, int file_offset, uint32_t flags); +extern int rom_init(rom_t *rom, wchar_t *fn, uint32_t address, int size, int mask, int file_offset, uint32_t flags); +extern int rom_init_interleaved(rom_t *rom, wchar_t *fn_low, wchar_t *fn_high, uint32_t address, int size, int mask, int file_offset, uint32_t flags); -uint8_t rom_read(uint32_t addr, void *p); -uint16_t rom_readw(uint32_t addr, void *p); -uint32_t rom_readl(uint32_t addr, void *p); +extern uint8_t rom_read(uint32_t addr, void *p); +extern uint16_t rom_readw(uint32_t addr, void *p); +extern uint32_t rom_readl(uint32_t addr, void *p); diff --git a/src/rtc.c b/src/rtc.c index 323a36c6c..478eba9e0 100644 --- a/src/rtc.c +++ b/src/rtc.c @@ -48,7 +48,7 @@ static int rtc_get_days(int org_month, int org_year) } /* Called when the internal clock gets updated */ -static void rtc_recalc() +static void rtc_recalc(void) { if (internal_clock.sec == 60) { @@ -78,7 +78,7 @@ static void rtc_recalc() } /* Called when ticking the second */ -void rtc_tick() +void rtc_tick(void) { internal_clock.sec++; rtc_recalc(); @@ -125,7 +125,7 @@ void time_update(char *nvrram, int reg) } /* Called to obtain the current day of the week based on the internal clock */ -static int time_week_day() +static int time_week_day(void) { int day_of_month = internal_clock.mday; int month2 = internal_clock.mon; diff --git a/src/rtc.h b/src/rtc.h index 78718143b..151be0c7c 100644 --- a/src/rtc.h +++ b/src/rtc.h @@ -167,8 +167,8 @@ enum RTC_RD_BITS RTC_VRT = 0x80 }; -void rtc_tick(); -void time_update(char *nvrram, int reg); -void time_get(char *nvrram); -void time_internal_set_nvrram(char *nvrram); -void time_internal_sync(char *nvrram); +extern void rtc_tick(void); +extern void time_update(char *nvrram, int reg); +extern void time_get(char *nvrram); +extern void time_internal_set_nvrram(char *nvrram); +extern void time_internal_sync(char *nvrram); diff --git a/src/scat.c b/src/scat.c index 78f6b52d3..bd1d2683e 100644 --- a/src/scat.c +++ b/src/scat.c @@ -7,6 +7,7 @@ #include "CPU/x86.h" #include "CPU/cpu.h" + static uint8_t scat_regs[256]; static int scat_index; static uint8_t scat_port_92 = 0; @@ -19,10 +20,12 @@ static mem_mapping_t scat_shadowram_mapping[6]; static mem_mapping_t scat_4000_9FFF_mapping[24]; static mem_mapping_t scat_A000_BFFF_mapping; + uint8_t scat_read(uint16_t port, void *priv); void scat_write(uint16_t port, uint8_t val, void *priv); -void scat_shadow_state_update() + +void scat_shadow_state_update(void) { int i, val; @@ -51,6 +54,7 @@ void scat_shadow_state_update() flushmmucache(); } + void scat_set_xms_bound(uint8_t val) { uint32_t max_xms_size = (mem_size >= 16384) ? 0xFC0000 : mem_size << 10; @@ -134,6 +138,7 @@ void scat_set_xms_bound(uint8_t val) } } + uint32_t get_scat_addr(uint32_t addr, scat_t *p) { if (p && (scat_regs[SCAT_EMS_CONTROL] & 0x80) && (p->regs_2x9 & 0x80)) @@ -155,7 +160,8 @@ uint32_t get_scat_addr(uint32_t addr, scat_t *p) return addr; } -void scat_memmap_state_update() + +void scat_memmap_state_update(void) { int i; uint32_t addr; @@ -176,6 +182,7 @@ void scat_memmap_state_update() flushmmucache(); } + void scat_set_global_EMS_state(int state) { int i; @@ -203,6 +210,7 @@ void scat_set_global_EMS_state(int state) } } + void scat_write(uint16_t port, uint8_t val, void *priv) { uint8_t scat_reg_valid = 0, scat_shadow_update = 0, scat_map_update = 0, index; @@ -382,6 +390,7 @@ void scat_write(uint16_t port, uint8_t val, void *priv) } } + uint8_t scat_read(uint16_t port, void *priv) { uint8_t val = 0xff, index; @@ -433,6 +442,7 @@ uint8_t scat_read(uint16_t port, void *priv) return val; } + uint8_t mem_read_scatems(uint32_t addr, void *priv) { uint8_t val = 0xff; @@ -445,6 +455,7 @@ uint8_t mem_read_scatems(uint32_t addr, void *priv) return val; } + void mem_write_scatems(uint32_t addr, uint8_t val, void *priv) { scat_t *stat = (scat_t *)priv; @@ -454,7 +465,8 @@ void mem_write_scatems(uint32_t addr, uint8_t val, void *priv) mem_write_ram(addr, val, priv); } -void scat_init() + +void scat_init(void) { int i; diff --git a/src/scat.h b/src/scat.h index 1fee0cee3..3d2fcf2a5 100644 --- a/src/scat.h +++ b/src/scat.h @@ -19,4 +19,4 @@ typedef struct scat_t uint8_t regs_2x9; } scat_t; -void scat_init(); +extern void scat_init(void); diff --git a/src/scsi.c b/src/scsi.c index 93513aa5d..6cd849f6d 100644 --- a/src/scsi.c +++ b/src/scsi.c @@ -8,14 +8,14 @@ * * Handling of the SCSI controllers. * - * Version: @(#)scsi.c 1.0.1 2017/08/22 + * Version: @(#)scsi.c 1.0.2 2017/08/23 * * Authors: TheCollector1995, * Miran Grca, * Fred N. van Kempen, * Copyright 2008-2017 TheCollector1995. - * Copyright 2016-2017 Miran Grca. - * Copyright 2017-2017 Fred N. van Kempen. + * Copyright 2016,2017 Miran Grca. + * Copyright 2017 Fred N. van Kempen. */ #include #include @@ -107,7 +107,7 @@ int scsi_card_get_from_internal_name(char *s) } -void scsi_card_init() +void scsi_card_init(void) { int i, j; @@ -117,20 +117,20 @@ void scsi_card_init() build_scsi_cdrom_map(); for (i=0; i<16; i++) + { + for (j=0; j<8; j++) { - for (j=0; j<8; j++) - { - if (scsi_hard_disks[i][j] != 0xff) { - SCSIDevices[i][j].LunType = SCSI_DISK; - } - else if (scsi_cdrom_drives[i][j] != 0xff) { - SCSIDevices[i][j].LunType = SCSI_CDROM; - } - else - { - SCSIDevices[i][j].LunType = SCSI_NONE; - } + if (scsi_hard_disks[i][j] != 0xff) { + SCSIDevices[i][j].LunType = SCSI_DISK; } + else if (scsi_cdrom_drives[i][j] != 0xff) { + SCSIDevices[i][j].LunType = SCSI_CDROM; + } + else + { + SCSIDevices[i][j].LunType = SCSI_NONE; + } + } } if (scsi_cards[scsi_card_current].device) diff --git a/src/scsi.h b/src/scsi.h index 8c6add567..b39216ad0 100644 --- a/src/scsi.h +++ b/src/scsi.h @@ -8,17 +8,17 @@ * * SCSI controller handler header. * - * Version: @(#)scsi_h 1.0.0 2017/08/22 + * Version: @(#)scsi_h 1.0.1 2017/08/23 * * Authors: TheCollector1995, * Miran Grca, * Fred N. van Kempen, - * Copyright 2008-2017 TheCollector1995. - * Copyright 2016-2017 Miran Grca. - * Copyright 2017-2017 Fred N. van Kempen. + * Copyright 2016,2017 TheCollector1995. + * Copyright 2016,2017 Miran Grca. + * Copyright 2017 Fred N. van Kempen. */ -#ifndef SCSI_H -#define SCSI_H +#ifndef EMU_SCSI_H +#define EMU_SCSI_H #ifdef WALTJE @@ -208,13 +208,13 @@ extern uint8_t page_flags[256]; extern uint8_t prefix_len; extern uint8_t page_current; -uint32_t DataLength; -uint32_t DataPointer; +extern uint32_t DataLength; +extern uint32_t DataPointer; -int SectorLBA; -int SectorLen; +extern int SectorLBA; +extern int SectorLen; -int MediaPresent; +extern int MediaPresent; extern uint8_t SCSIStatus; extern uint8_t SCSIPhase; @@ -258,40 +258,40 @@ struct extern void SCSIReset(uint8_t id, uint8_t lun); -uint32_t SCSICDROMModeSense(uint8_t *buf, uint32_t pos, uint8_t type); -uint8_t SCSICDROMSetProfile(uint8_t *buf, uint8_t *index, uint16_t profile); -int SCSICDROMReadDVDStructure(int format, const uint8_t *packet, uint8_t *buf); -uint32_t SCSICDROMEventStatus(uint8_t *buffer); -void SCSICDROM_Insert(); +extern uint32_t SCSICDROMModeSense(uint8_t *buf, uint32_t pos, uint8_t type); +extern uint8_t SCSICDROMSetProfile(uint8_t *buf, uint8_t *index, uint16_t profile); +extern int SCSICDROMReadDVDStructure(int format, const uint8_t *packet, uint8_t *buf); +extern uint32_t SCSICDROMEventStatus(uint8_t *buffer); +extern void SCSICDROM_Insert(void); -int cdrom_add_error_and_subchannel(uint8_t *b, int real_sector_type); -int cdrom_LBAtoMSF_accurate(); +extern int cdrom_add_error_and_subchannel(uint8_t *b, int real_sector_type); +extern int cdrom_LBAtoMSF_accurate(void); -int mode_select_init(uint8_t command, uint16_t pl_length, uint8_t do_save); -int mode_select_terminate(int force); -int mode_select_write(uint8_t val); +extern int mode_select_init(uint8_t command, uint16_t pl_length, uint8_t do_save); +extern int mode_select_terminate(int force); +extern int mode_select_write(uint8_t val); extern int scsi_card_current; -int scsi_card_available(int card); -char *scsi_card_getname(int card); -struct device_t *scsi_card_getdevice(int card); -int scsi_card_has_config(int card); -char *scsi_card_get_internal_name(int card); -int scsi_card_get_from_internal_name(char *s); -void scsi_card_init(); -void scsi_card_reset(void); +extern int scsi_card_available(int card); +extern char *scsi_card_getname(int card); +extern struct device_t *scsi_card_getdevice(int card); +extern int scsi_card_has_config(int card); +extern char *scsi_card_get_internal_name(int card); +extern int scsi_card_get_from_internal_name(char *s); +extern void scsi_card_init(); +extern void scsi_card_reset(void); extern uint8_t scsi_hard_disks[16][8]; -int scsi_hd_err_stat_to_scsi(uint8_t id); -int scsi_hd_phase_to_scsi(uint8_t id); -int find_hdc_for_scsi_id(uint8_t scsi_id, uint8_t scsi_lun); -void build_scsi_hd_map(); -void scsi_hd_reset(uint8_t id); -void scsi_hd_request_sense_for_scsi(uint8_t id, uint8_t *buffer, uint8_t alloc_length); -void scsi_hd_command(uint8_t id, uint8_t *cdb); -void scsi_hd_callback(uint8_t id); +extern int scsi_hd_err_stat_to_scsi(uint8_t id); +extern int scsi_hd_phase_to_scsi(uint8_t id); +extern int find_hdc_for_scsi_id(uint8_t scsi_id, uint8_t scsi_lun); +extern void build_scsi_hd_map(void); +extern void scsi_hd_reset(uint8_t id); +extern void scsi_hd_request_sense_for_scsi(uint8_t id, uint8_t *buffer, uint8_t alloc_length); +extern void scsi_hd_command(uint8_t id, uint8_t *cdb); +extern void scsi_hd_callback(uint8_t id); #pragma pack(push,1) @@ -320,7 +320,7 @@ typedef struct } BIOSCMD; #pragma pack(pop) -uint8_t HACommand03Handler(uint8_t last_id, BIOSCMD *BiosCmd); +extern uint8_t HACommand03Handler(uint8_t last_id, BIOSCMD *BiosCmd); /* @@ -346,4 +346,4 @@ typedef struct { #pragma pack(pop) -#endif +#endif /*EMU_SCSI_H*/ diff --git a/src/scsi_buslogic.c b/src/scsi_buslogic.c index 0c6c7471e..5097ba3e7 100644 --- a/src/scsi_buslogic.c +++ b/src/scsi_buslogic.c @@ -10,14 +10,13 @@ * 0 - BT-542B ISA; * 1 - BT-958 PCI (but BT-542B ISA on non-PCI machines) * - * Version: @(#)scsi_buslogic.c 1.0.7 2017/08/22 + * Version: @(#)scsi_buslogic.c 1.0.8 2017/08/23 * * Authors: TheCollector1995, * Miran Grca, * Fred N. van Kempen, - * Copyright 2008-2017 Sarah Walker. - * Copyright 2016-2017 Miran Grca. - * Copyright 2017-2017 Fred N. van Kempen. + * Copyright 2016,2017 Miran Grca. + * Copyright 2017 Fred N. van Kempen. */ #include #include diff --git a/src/scsi_buslogic.h b/src/scsi_buslogic.h index e835ea989..f6d60f94d 100644 --- a/src/scsi_buslogic.h +++ b/src/scsi_buslogic.h @@ -7,14 +7,13 @@ * Emulation of BusLogic BT-542B ISA and BT-958D PCI SCSI * controllers. * - * Version: @(#)scsi_buslogic.h 1.0.0 2017/05/30 + * Version: @(#)scsi_buslogic.h 1.0.1 2017/08/23 * - * Author: TheCollector1995, + * Authors: TheCollector1995, * Miran Grca, * Fred N. van Kempen, - * Copyright 2008-2017 Sarah Walker. - * Copyright 2016-2017 Miran Grca. - * Copyright 2017-2017 Fred N. van Kempen. + * Copyright 2016,2017 Miran Grca. + * Copyright 2017 Fred N. van Kempen. */ #ifndef SCSI_BUSLOGIC_H diff --git a/src/scsi_device.c b/src/scsi_device.c index 043f2ee32..05e71c08a 100644 --- a/src/scsi_device.c +++ b/src/scsi_device.c @@ -8,12 +8,12 @@ * * The generic SCSI device command handler. * - * Version: @(#)scsi_device.c 1.0.0 2017/08/22 + * Version: @(#)scsi_device.c 1.0.1 2017/08/23 * * Authors: Miran Grca, * Fred N. van Kempen, - * Copyright 2016-2017 Miran Grca. - * Copyright 2017-2017 Fred N. van Kempen. + * Copyright 2016,2017 Miran Grca. + * Copyright 2017 Fred N. van Kempen. */ #include "ibm.h" #include "scsi.h" diff --git a/src/scsi_disk.c b/src/scsi_disk.c index c51e2a6da..8a19c7cbb 100644 --- a/src/scsi_disk.c +++ b/src/scsi_disk.c @@ -6,10 +6,10 @@ * * Emulation of SCSI fixed and removable disks. * - * Version: @(#)scsi_disk.c 1.0.3 2017/07/30 + * Version: @(#)scsi_disk.c 1.0.5 2017/08/23 * * Author: Miran Grca, - * Copyright 2017-2017 Miran Grca. + * Copyright 2017 Miran Grca. */ #include #include @@ -25,7 +25,8 @@ #include "scsi.h" #include "scsi_disk.h" #include "timer.h" -#include "win/plat_iodev.h" +#include "WIN/plat_iodev.h" + /* Bits of 'status' */ #define ERR_STAT 0x01 @@ -46,79 +47,83 @@ #define scsi_hd_asc shdc[id].sense[12] #define scsi_hd_ascq shdc[id].sense[13] -scsi_hard_disk_t shdc[HDC_NUM]; +scsi_hard_disk_t shdc[HDC_NUM]; FILE *shdf[HDC_NUM]; -uint8_t scsi_hard_disks[16][8] = { { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, - { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, - { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, - { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, - { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, - { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, - { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, - { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, - { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, - { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, - { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, - { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, - { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, - { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, - { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, - { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF } }; +uint8_t scsi_hard_disks[16][8] = { + { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, + { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, + { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, + { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, + { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, + { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, + { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, + { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, + { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, + { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, + { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, + { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, + { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, + { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, + { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, + { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF } +}; + /* Table of all SCSI commands and their flags, needed for the new disc change / not ready handler. */ -uint8_t scsi_hd_command_flags[0x100] = -{ - IMPLEMENTED | CHECK_READY | NONDATA, /* 0x00 */ - IMPLEMENTED | ALLOW_UA | NONDATA | SCSI_ONLY, /* 0x01 */ - 0, - IMPLEMENTED | ALLOW_UA, /* 0x03 */ - IMPLEMENTED | CHECK_READY | ALLOW_UA | NONDATA | SCSI_ONLY, /* 0x04 */ - 0, 0, 0, - IMPLEMENTED | CHECK_READY, /* 0x08 */ - 0, - IMPLEMENTED | CHECK_READY, /* 0x0A */ - 0, 0, 0, 0, 0, 0, 0, - IMPLEMENTED | ALLOW_UA, /* 0x12 */ - IMPLEMENTED | CHECK_READY | NONDATA | SCSI_ONLY, /* 0x13 */ - 0, 0, 0, 0, 0, 0, 0, - IMPLEMENTED | CHECK_READY, /* 0x1B */ - 0, 0, - IMPLEMENTED | CHECK_READY, /* 0x1E */ - 0, 0, 0, 0, 0, 0, - IMPLEMENTED | CHECK_READY, /* 0x25 */ - 0, 0, - IMPLEMENTED | CHECK_READY, /* 0x28 */ - 0, - IMPLEMENTED | CHECK_READY, /* 0x2A */ - 0, 0, 0, 0, - IMPLEMENTED | CHECK_READY | NONDATA | SCSI_ONLY, /* 0x2F */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - IMPLEMENTED | CHECK_READY, /* 0xA8 */ - 0, - IMPLEMENTED | CHECK_READY, /* 0xAA */ - 0, 0, 0, 0, - IMPLEMENTED | CHECK_READY | NONDATA | SCSI_ONLY, /* 0xAF */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - IMPLEMENTED, /* 0xBD */ - 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +uint8_t scsi_hd_command_flags[0x100] = { + IMPLEMENTED | CHECK_READY | NONDATA, /* 0x00 */ + IMPLEMENTED | ALLOW_UA | NONDATA | SCSI_ONLY, /* 0x01 */ + 0, + IMPLEMENTED | ALLOW_UA, /* 0x03 */ + IMPLEMENTED | CHECK_READY | ALLOW_UA | NONDATA | SCSI_ONLY, /* 0x04 */ + 0, 0, 0, + IMPLEMENTED | CHECK_READY, /* 0x08 */ + 0, + IMPLEMENTED | CHECK_READY, /* 0x0A */ + 0, 0, 0, 0, 0, 0, 0, + IMPLEMENTED | ALLOW_UA, /* 0x12 */ + IMPLEMENTED | CHECK_READY | NONDATA | SCSI_ONLY, /* 0x13 */ + 0, 0, 0, 0, 0, 0, 0, + IMPLEMENTED | CHECK_READY, /* 0x1B */ + 0, 0, + IMPLEMENTED | CHECK_READY, /* 0x1E */ + 0, 0, 0, 0, 0, 0, + IMPLEMENTED | CHECK_READY, /* 0x25 */ + 0, 0, + IMPLEMENTED | CHECK_READY, /* 0x28 */ + 0, + IMPLEMENTED | CHECK_READY, /* 0x2A */ + 0, 0, 0, 0, + IMPLEMENTED | CHECK_READY | NONDATA | SCSI_ONLY, /* 0x2F */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + IMPLEMENTED | CHECK_READY, /* 0xA8 */ + 0, + IMPLEMENTED | CHECK_READY, /* 0xAA */ + 0, 0, 0, 0, + IMPLEMENTED | CHECK_READY | NONDATA | SCSI_ONLY, /* 0xAF */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + IMPLEMENTED, /* 0xBD */ + 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + /* #define ENABLE_SCSI_HD_LOG 0 */ int scsi_hd_do_log = 0; + void scsi_hd_log(const char *format, ...) { #ifdef ENABLE_SCSI_HD_LOG @@ -133,6 +138,7 @@ void scsi_hd_log(const char *format, ...) #endif } + /* Translates ATAPI status (ERR_STAT flag) to SCSI status. */ int scsi_hd_err_stat_to_scsi(uint8_t id) { @@ -148,6 +154,7 @@ int scsi_hd_err_stat_to_scsi(uint8_t id) return SCSI_STATUS_OK; } + /* Translates ATAPI phase (DRQ, I/O, C/D) to SCSI phase (MSG, C/D, I/O). */ int scsi_hd_phase_to_scsi(uint8_t id) { @@ -181,6 +188,7 @@ int scsi_hd_phase_to_scsi(uint8_t id) return 0; } + int find_hdc_for_scsi_id(uint8_t scsi_id, uint8_t scsi_lun) { uint8_t i = 0; @@ -203,11 +211,13 @@ int find_hdc_for_scsi_id(uint8_t scsi_id, uint8_t scsi_lun) return 0xff; } + void scsi_disk_insert(uint8_t id) { shdc[id].unit_attention = (hdc[id].bus == HDD_BUS_SCSI_REMOVABLE) ? 1 : 0; } + void scsi_loadhd(int scsi_id, int scsi_lun, int id) { int ret = 0; @@ -227,6 +237,7 @@ void scsi_loadhd(int scsi_id, int scsi_lun, int id) } } + void scsi_reloadhd(int id) { int ret = 0; @@ -249,12 +260,14 @@ void scsi_reloadhd(int id) } } + void scsi_unloadhd(int scsi_id, int scsi_lun, int id) { hdd_image_unload(id, 1); } -void build_scsi_hd_map() + +void build_scsi_hd_map(void) { uint8_t i = 0; uint8_t j = 0; @@ -281,6 +294,7 @@ void build_scsi_hd_map() } } + int scsi_hd_read_capacity(uint8_t id, uint8_t *cdb, uint8_t *buffer, uint32_t *len) { int size = 0; @@ -303,6 +317,7 @@ int scsi_hd_read_capacity(uint8_t id, uint8_t *cdb, uint8_t *buffer, uint32_t *l return 1; } + void scsi_hd_update_request_length(uint8_t id, int len, int block_len) { /* For media access commands, make sure the requested DRQ length matches the block length. */ @@ -346,6 +361,7 @@ void scsi_hd_update_request_length(uint8_t id, int len, int block_len) return; } + static void scsi_hd_command_common(uint8_t id) { shdc[id].status = BUSY_STAT; @@ -361,12 +377,14 @@ static void scsi_hd_command_common(uint8_t id) } } + void scsi_hd_command_complete(uint8_t id) { shdc[id].packet_status = CDROM_PHASE_COMPLETE; scsi_hd_command_common(id); } + static void scsi_hd_command_read_dma(uint8_t id) { shdc[id].packet_status = CDROM_PHASE_DATA_IN_DMA; @@ -374,12 +392,14 @@ static void scsi_hd_command_read_dma(uint8_t id) shdc[id].total_read = 0; } + static void scsi_hd_command_write_dma(uint8_t id) { shdc[id].packet_status = CDROM_PHASE_DATA_OUT_DMA; scsi_hd_command_common(id); } + void scsi_hd_data_command_finish(uint8_t id, int len, int block_len, int alloc_len, int direction) { scsi_hd_log("SCSI HD %i: Finishing command (%02X): %i, %i, %i, %i, %i\n", id, shdc[id].current_cdb[0], len, block_len, alloc_len, direction, shdc[id].request_length); @@ -412,12 +432,14 @@ void scsi_hd_data_command_finish(uint8_t id, int len, int block_len, int alloc_l scsi_hd_log("SCSI HD %i: Status: %i, cylinder %i, packet length: %i, position: %i, phase: %i\n", id, shdc[id].packet_status, shdc[id].request_length, shdc[id].packet_len, shdc[id].pos, shdc[id].phase); } + static void scsi_hd_sense_clear(int id, int command) { shdc[id].previous_command = command; scsi_hd_sense_key = scsi_hd_asc = scsi_hd_ascq = 0; } + static void scsi_hd_cmd_error(uint8_t id) { shdc[id].error = ((scsi_hd_sense_key & 0xf) << 4) | ABRT_ERR; @@ -432,6 +454,7 @@ static void scsi_hd_cmd_error(uint8_t id) scsi_hd_log("SCSI HD %i: ERROR: %02X/%02X/%02X\n", id, scsi_hd_sense_key, scsi_hd_asc, scsi_hd_ascq); } + static void scsi_hd_unit_attention(uint8_t id) { shdc[id].error = (SENSE_NOT_READY << 4) | ABRT_ERR; @@ -446,6 +469,7 @@ static void scsi_hd_unit_attention(uint8_t id) scsi_hd_log("SCSI HD %i: UNIT ATTENTION\n", id); } + static void scsi_hd_not_ready(uint8_t id) { scsi_hd_sense_key = SENSE_NOT_READY; @@ -454,6 +478,7 @@ static void scsi_hd_not_ready(uint8_t id) scsi_hd_cmd_error(id); } + static void scsi_hd_write_protected(uint8_t id) { scsi_hd_sense_key = SENSE_UNIT_ATTENTION; @@ -462,6 +487,7 @@ static void scsi_hd_write_protected(uint8_t id) scsi_hd_cmd_error(id); } + static void scsi_hd_invalid_lun(uint8_t id) { scsi_hd_sense_key = SENSE_ILLEGAL_REQUEST; @@ -470,6 +496,7 @@ static void scsi_hd_invalid_lun(uint8_t id) scsi_hd_cmd_error(id); } + static void scsi_hd_illegal_opcode(uint8_t id) { scsi_hd_sense_key = SENSE_ILLEGAL_REQUEST; @@ -478,6 +505,7 @@ static void scsi_hd_illegal_opcode(uint8_t id) scsi_hd_cmd_error(id); } + void scsi_hd_lba_out_of_range(uint8_t id) { scsi_hd_sense_key = SENSE_ILLEGAL_REQUEST; @@ -486,6 +514,7 @@ void scsi_hd_lba_out_of_range(uint8_t id) scsi_hd_cmd_error(id); } + static void scsi_hd_invalid_field(uint8_t id) { scsi_hd_sense_key = SENSE_ILLEGAL_REQUEST; @@ -495,6 +524,7 @@ static void scsi_hd_invalid_field(uint8_t id) shdc[id].status = 0x53; } + static void scsi_hd_data_phase_error(uint8_t id) { scsi_hd_sense_key = SENSE_ILLEGAL_REQUEST; @@ -503,6 +533,7 @@ static void scsi_hd_data_phase_error(uint8_t id) scsi_hd_cmd_error(id); } + /*SCSI Sense Initialization*/ void scsi_hd_sense_code_ok(uint8_t id) { @@ -511,6 +542,7 @@ void scsi_hd_sense_code_ok(uint8_t id) scsi_hd_ascq = 0; } + int scsi_hd_pre_execution_check(uint8_t id, uint8_t *cdb) { int ready = 1; @@ -599,12 +631,14 @@ int scsi_hd_pre_execution_check(uint8_t id, uint8_t *cdb) return 1; } + static void scsi_hd_seek(uint8_t id, uint32_t pos) { /* scsi_hd_log("SCSI HD %i: Seek %08X\n", id, pos); */ hdd_image_seek(id, pos); } + static void scsi_hd_rezero(uint8_t id) { if (id == 255) @@ -616,6 +650,7 @@ static void scsi_hd_rezero(uint8_t id) scsi_hd_seek(id, 0); } + void scsi_hd_reset(uint8_t id) { scsi_hd_rezero(id); @@ -624,6 +659,7 @@ void scsi_hd_reset(uint8_t id) shdc[id].packet_status = 0xff; } + void scsi_hd_request_sense(uint8_t id, uint8_t *buffer, uint8_t alloc_length) { /*Will return 18 bytes of 0*/ @@ -655,6 +691,7 @@ void scsi_hd_request_sense(uint8_t id, uint8_t *buffer, uint8_t alloc_length) scsi_hd_sense_clear(id, GPCMD_REQUEST_SENSE); } + void scsi_hd_request_sense_for_scsi(uint8_t id, uint8_t *buffer, uint8_t alloc_length) { int ready = 1; @@ -690,6 +727,7 @@ void scsi_hd_request_sense_for_scsi(uint8_t id, uint8_t *buffer, uint8_t alloc_l scsi_hd_request_sense(id, buffer, alloc_length); } + void scsi_hd_command(uint8_t id, uint8_t *cdb) { /* uint8_t *hdbufferb = (uint8_t *) shdc[id].buffer; */ @@ -1106,7 +1144,6 @@ atapi_out: /* scsi_hd_log("SCSI HD %i: Phase: %02X, request length: %i\n", shdc[id].phase, shdc[id].request_length); */ } -void scsi_hd_callback(uint8_t id); /* If the result is 1, issue an IRQ, otherwise not. */ void scsi_hd_callback(uint8_t id) diff --git a/src/scsi_disk.h b/src/scsi_disk.h index 7d5b23e85..c6c8991ad 100644 --- a/src/scsi_disk.h +++ b/src/scsi_disk.h @@ -6,10 +6,10 @@ * * Emulation of SCSI fixed and removable disks. * - * Version: @(#)scsi_disk.h 1.0.0 2017/05/30 + * Version: @(#)scsi_disk.h 1.0.1 2017/08/23 * * Author: Miran Grca, - * Copyright 2017-2017 Miran Grca. + * Copyright 2017 Miran Grca. */ #pragma pack(push,1) diff --git a/src/sio.c b/src/sio.c index 17e278fc4..dd51810b2 100644 --- a/src/sio.c +++ b/src/sio.c @@ -6,16 +6,14 @@ * * Emulation of Intel System I/O PCI chip. * - * Version: @(#)sio.c 1.0.1 2017/06/02 + * Version: @(#)sio.c 1.0.2 2017/08/23 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. - * Copyright 2016-2017 Miran Grca. + * Copyright 2016,2017 Miran Grca. */ - #include - #include "ibm.h" #include "cdrom.h" #include "disc.h" @@ -26,11 +24,12 @@ #include "io.h" #include "mem.h" #include "pci.h" - #include "sio.h" + static uint8_t card_sio[256]; + void sio_write(int func, int addr, uint8_t val, void *priv) { if (func > 0) @@ -120,6 +119,7 @@ void sio_write(int func, int addr, uint8_t val, void *priv) card_sio[addr] = val; } + uint8_t sio_read(int func, int addr, void *priv) { if (func > 0) @@ -128,13 +128,16 @@ uint8_t sio_read(int func, int addr, void *priv) return card_sio[addr]; } + static int trc_reg = 0; + uint8_t trc_read(uint16_t port, void *priv) { return trc_reg & 0xfb; } + void trc_reset(uint8_t val) { int i = 0; @@ -175,6 +178,7 @@ void trc_reset(uint8_t val) resetx86(); } + void trc_write(uint16_t port, uint8_t val, void *priv) { pclog("TRC Write: %02X\n", val); @@ -185,6 +189,7 @@ void trc_write(uint16_t port, uint8_t val, void *priv) trc_reg = val & 0xfd; } + void trc_init(void) { trc_reg = 0; @@ -192,6 +197,7 @@ void trc_init(void) io_sethandler(0x0cf9, 0x0001, trc_read, NULL, NULL, trc_write, NULL, NULL, NULL); } + void sio_reset(void) { memset(card_sio, 0, 256); @@ -216,6 +222,7 @@ void sio_reset(void) card_sio[0xa8] = 0x0f; } + void sio_init(int card, int pci_a, int pci_b, int pci_c, int pci_d) { pci_add_specific(card, sio_read, sio_write, NULL); diff --git a/src/sio.h b/src/sio.h index 0e3ea651f..bc986dda9 100644 --- a/src/sio.h +++ b/src/sio.h @@ -6,12 +6,12 @@ * * Emulation of Intel System I/O PCI chip. * - * Version: @(#)sio.h 1.0.1 2017/06/02 + * Version: @(#)sio.h 1.0.2 2017/08/23 * * Author: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. - * Copyright 2016-2017 Miran Grca. + * Copyright 2016,2017 Miran Grca. */ void trc_init(void); diff --git a/src/sis496.c b/src/sis496.c index aff1b3eaa..674c50180 100644 --- a/src/sis496.c +++ b/src/sis496.c @@ -3,7 +3,7 @@ */ #include #include "ibm.h" -#include "cpu/cpu.h" +#include "CPU/cpu.h" #include "io.h" #include "mem.h" #include "pci.h" diff --git a/src/sis50x.c b/src/sis50x.c index 59e887d78..9a27958d5 100644 --- a/src/sis50x.c +++ b/src/sis50x.c @@ -6,21 +6,20 @@ * * Emulation of the SiS 50x PCI chips. * - * Version: @(#)sis50x.c 1.0.0 2017/05/30 + * Version: @(#)sis50x.c 1.0.1 2017/08/23 * * Author: Miran Grca, - * Copyright 2017-2017 Miran Grca. + * Copyright 2017 Miran Grca. */ - #include #include "ibm.h" #include "device.h" #include "io.h" #include "mem.h" #include "pci.h" - #include "sis50x.h" + typedef struct sis501_t { uint8_t pci_conf[256]; @@ -38,7 +37,8 @@ typedef struct sis50x_t uint8_t reg; } sis50x_t; -void sis501_recalcmapping(sis501_t *sis501) + +static void sis501_recalcmapping(sis501_t *sis501) { int c, d; @@ -75,7 +75,8 @@ void sis501_recalcmapping(sis501_t *sis501) shadowbios = 1; } -void sis501_write(int func, int addr, uint8_t val, void *p) + +static void sis501_write(int func, int addr, uint8_t val, void *p) { sis501_t *sis501 = (sis501_t *)p; //pclog("sis501_write : addr=%02x val=%02x\n", addr, val); @@ -94,7 +95,8 @@ void sis501_write(int func, int addr, uint8_t val, void *p) sis501->pci_conf[addr] = val; } -void sis501_turbo_write(uint16_t port, uint8_t val, void *priv) + +static void sis501_turbo_write(uint16_t port, uint8_t val, void *priv) { sis501_t *sis501 = (sis501_t *)priv; @@ -111,7 +113,8 @@ void sis501_turbo_write(uint16_t port, uint8_t val, void *priv) } } -void sis503_write(int func, int addr, uint8_t val, void *p) + +static void sis503_write(int func, int addr, uint8_t val, void *p) { sis503_t *sis503 = (sis503_t *)p; //pclog("sis503_write : addr=%02x val=%02x\n", addr, val); @@ -120,7 +123,8 @@ void sis503_write(int func, int addr, uint8_t val, void *p) sis503->pci_conf[addr] = val; } -void sis50x_write(uint16_t port, uint8_t val, void *priv) + +static void sis50x_write(uint16_t port, uint8_t val, void *priv) { sis50x_t *sis50x = (sis50x_t *)priv; @@ -134,28 +138,32 @@ void sis50x_write(uint16_t port, uint8_t val, void *priv) } } -uint8_t sis501_read(int func, int addr, void *p) + +static uint8_t sis501_read(int func, int addr, void *p) { sis501_t *sis501 = (sis501_t *)p; return sis501->pci_conf[addr]; } -uint8_t sis501_turbo_read(uint16_t port, void *priv) + +static uint8_t sis501_turbo_read(uint16_t port, void *priv) { sis501_t *sis501 = (sis501_t *)priv; return sis501->turbo_reg; } -uint8_t sis503_read(int func, int addr, void *p) + +static uint8_t sis503_read(int func, int addr, void *p) { sis503_t *sis503 = (sis503_t *)p; return sis503->pci_conf[addr]; } -uint8_t sis50x_read(uint16_t port, void *priv) + +static uint8_t sis50x_read(uint16_t port, void *priv) { sis50x_t *sis50x = (sis50x_t *)priv; @@ -172,7 +180,8 @@ uint8_t sis50x_read(uint16_t port, void *priv) } } -void *sis501_init() + +static void *sis501_init(void) { sis501_t *sis501 = malloc(sizeof(sis501_t)); memset(sis501, 0, sizeof(sis501_t)); @@ -206,7 +215,8 @@ void *sis501_init() return sis501; } -void *sis503_init() + +static void *sis503_init(void) { sis503_t *sis503 = malloc(sizeof(sis503_t)); memset(sis503, 0, sizeof(sis503_t)); @@ -236,7 +246,8 @@ void *sis503_init() return sis503; } -void *sis50x_init() + +static void *sis50x_init(void) { sis50x_t *sis50x = malloc(sizeof(sis50x_t)); memset(sis50x, 0, sizeof(sis50x_t)); @@ -244,27 +255,31 @@ void *sis50x_init() io_sethandler(0x22, 0x0002, sis50x_read, NULL, NULL, sis50x_write, NULL, NULL, sis50x); } -void sis501_close(void *p) + +static void sis501_close(void *p) { sis501_t *sis501 = (sis501_t *)p; free(sis501); } -void sis503_close(void *p) + +static void sis503_close(void *p) { sis503_t *sis503 = (sis503_t *)p; free(sis503); } -void sis50x_close(void *p) + +static void sis50x_close(void *p) { sis50x_t *sis50x = (sis50x_t *)p; free(sis50x); } + device_t sis501_device = { "SiS 501/502", diff --git a/src/sis50x.h b/src/sis50x.h index df5565043..27fc70a34 100644 --- a/src/sis50x.h +++ b/src/sis50x.h @@ -6,10 +6,10 @@ * * Emulation of the SiS 50x PCI chips. * - * Version: @(#)sis50x.h 1.0.0 2017/05/30 + * Version: @(#)sis50x.h 1.0.1 2017/08/23 * * Author: Miran Grca, - * Copyright 2017-2017 Miran Grca. + * Copyright 2017 Miran Grca. */ extern device_t sis501_device; diff --git a/src/sis85c471.c b/src/sis85c471.c index f56716f43..8b337a30c 100644 --- a/src/sis85c471.c +++ b/src/sis85c471.c @@ -6,20 +6,16 @@ * * Emulation of the SiS 85c471 chip. * - * Version: @(#)sis85c471.c 1.0.0 2017/05/30 + * SiS sis85c471 Super I/O Chip + * Used by Batman's Revenge + * + * Version: @(#)sis85c471.c 1.0.1 2017/08/23 * * Author: Miran Grca, - * Copyright 2017-2017 Miran Grca. + * Copyright 2017 Miran Grca. */ - -/* - SiS sis85c471 Super I/O Chip - Used by Batman's Revenge -*/ - #include "ibm.h" #include "ide.h" - #include "disc.h" #include "fdc.h" #include "fdd.h" @@ -28,10 +24,12 @@ #include "serial.h" #include "sis85c471.h" + static int sis85c471_curreg; static uint8_t sis85c471_regs[39]; -void sis85c471_write(uint16_t port, uint8_t val, void *priv) + +static void sis85c471_write(uint16_t port, uint8_t val, void *priv) { uint8_t index = (port & 1) ? 0 : 1; uint8_t x; @@ -92,7 +90,8 @@ process_value: sis85c471_curreg = 0; } -uint8_t sis85c471_read(uint16_t port, void *priv) + +static uint8_t sis85c471_read(uint16_t port, void *priv) { uint8_t index = (port & 1) ? 0 : 1; uint8_t temp; @@ -110,7 +109,8 @@ uint8_t sis85c471_read(uint16_t port, void *priv) return 0xFF; } -void sis85c471_init() + +void sis85c471_init(void) { int i = 0; diff --git a/src/sis85c471.h b/src/sis85c471.h index 5a69fdf65..0aae5aaff 100644 --- a/src/sis85c471.h +++ b/src/sis85c471.h @@ -6,13 +6,10 @@ * * Emulation of the SiS 85c471 chip. * - * Version: @(#)sis85c471.h 1.0.0 2017/05/30 + * Version: @(#)sis85c471.h 1.0.1 2017/08/23 * * Author: Miran Grca, - * Copyright 2017-2017 Miran Grca. + * Copyright 2017 Miran Grca. */ -/* Copyright holders: Tenshi - see COPYING for more details -*/ -extern void sis85c471_init(); +extern void sis85c471_init(void); diff --git a/src/superio_detect.c b/src/superio_detect.c index dbedca3cd..44292b017 100644 --- a/src/superio_detect.c +++ b/src/superio_detect.c @@ -2,20 +2,20 @@ SMSC SMC FDC37C665 Super I/O Chip Used by Batman's Revenge */ - #include "ibm.h" - #include "io.h" #include "disc.h" #include "fdd.h" #include "fdc.h" #include "superio_detect.h" + static int fdc37c665_locked; static int fdc37c665_curreg = 0; static uint8_t detect_regs[2]; static uint8_t tries; + void superio_detect_write(uint16_t port, uint8_t val, void *priv) { uint8_t index = (port & 1) ? 0 : 1; @@ -27,6 +27,7 @@ void superio_detect_write(uint16_t port, uint8_t val, void *priv) return; } + uint8_t superio_detect_read(uint16_t port, void *priv) { pclog("superio_detect_read : port=%04x = %02X\n", port, detect_regs[port & 1]); @@ -34,7 +35,8 @@ uint8_t superio_detect_read(uint16_t port, void *priv) return detect_regs[port & 1]; } -void superio_detect_init() + +void superio_detect_init(void) { fdc_remove(); fdc_add_for_superio(); diff --git a/src/superio_detect.h b/src/superio_detect.h index 542fafac5..5d7525ac6 100644 --- a/src/superio_detect.h +++ b/src/superio_detect.h @@ -1 +1 @@ -extern void superio_detect_init(); +extern void superio_detect_init(void); diff --git a/src/tandy_eeprom.c b/src/tandy_eeprom.c index 0a5751d90..8e9e9fc27 100644 --- a/src/tandy_eeprom.c +++ b/src/tandy_eeprom.c @@ -9,6 +9,7 @@ #include "rom.h" #include "tandy_eeprom.h" + typedef struct { int state; @@ -29,8 +30,10 @@ enum EEPROM_WRITE }; + static int eeprom_data_out; + void tandy_eeprom_write(uint16_t addr, uint8_t val, void *p) { tandy_eeprom_t *eeprom = (tandy_eeprom_t *)p; @@ -110,12 +113,14 @@ void tandy_eeprom_write(uint16_t addr, uint8_t val, void *p) eeprom->clock = val & 4; } -int tandy_eeprom_read() + +int tandy_eeprom_read(void) { return eeprom_data_out; } -void *tandy_eeprom_init() + +static void *tandy_eeprom_init(void) { tandy_eeprom_t *eeprom = malloc(sizeof(tandy_eeprom_t)); FILE *f = NULL; @@ -145,6 +150,7 @@ void *tandy_eeprom_init() return eeprom; } + void tandy_eeprom_close(void *p) { tandy_eeprom_t *eeprom = (tandy_eeprom_t *)p; @@ -165,6 +171,7 @@ void tandy_eeprom_close(void *p) free(eeprom); } + device_t tandy_eeprom_device = { "Tandy EEPROM", diff --git a/src/tandy_eeprom.h b/src/tandy_eeprom.h index 9d2a053d1..5ec491a67 100644 --- a/src/tandy_eeprom.h +++ b/src/tandy_eeprom.h @@ -2,4 +2,6 @@ see COPYING for more details */ device_t tandy_eeprom_device; -int tandy_eeprom_read(); + + +extern int tandy_eeprom_read(void); diff --git a/src/tandy_rom.c b/src/tandy_rom.c index f3aee6eaf..aa6ffb9fb 100644 --- a/src/tandy_rom.c +++ b/src/tandy_rom.c @@ -9,26 +9,33 @@ #include "rom.h" #include "tandy_rom.h" + static uint8_t *tandy_rom; static uint8_t tandy_rom_bank; static int tandy_rom_offset; static mem_mapping_t tandy_rom_mapping; + uint8_t tandy_read_rom(uint32_t addr, void *p) { uint32_t addr2 = (addr & 0xffff) + tandy_rom_offset; return tandy_rom[addr2]; } + + uint16_t tandy_read_romw(uint32_t addr, void *p) { uint32_t addr2 = (addr & 0xffff) + tandy_rom_offset; return *(uint16_t *)&tandy_rom[addr2]; } + + uint32_t tandy_read_roml(uint32_t addr, void *p) { return *(uint32_t *)&tandy_rom[addr]; } + uint8_t tandy_rom_bank_read(uint16_t port, void *p) { if (port == 0xffea) @@ -36,6 +43,8 @@ uint8_t tandy_rom_bank_read(uint16_t port, void *p) else return 0xff; } + + void tandy_rom_bank_write(uint16_t port, uint8_t val, void *p) { if (port == 0xffea) @@ -46,7 +55,8 @@ void tandy_rom_bank_write(uint16_t port, uint8_t val, void *p) } } -void *tandy_rom_init() + +void *tandy_rom_init(void) { FILE *f, *ff; int c; @@ -73,11 +83,13 @@ void *tandy_rom_init() return tandy_rom; } + void tandy_rom_close(void *p) { free(p); } + device_t tandy_rom_device = { "Tandy 1000SL/2 ROM", diff --git a/src/timer.c b/src/timer.c index 82eabe39c..212f1b021 100644 --- a/src/timer.c +++ b/src/timer.c @@ -1,16 +1,18 @@ #include "ibm.h" - -/*#include "sound_opl.h" +#if 0 +//FIXME: Kotori, do we need to keep this? --FvK +#include "sound_opl.h" #include "adlibgold.h" #include "sound_pas16.h" #include "sound_sb.h" #include "sound_sb_dsp.h" -#include "sound_wss.h"*/ +#include "sound_wss.h" +#endif #include "timer.h" + #define TIMERS_MAX 64 -int TIMER_USEC; static struct { @@ -21,13 +23,16 @@ static struct int *count; } timers[TIMERS_MAX]; + +int TIMER_USEC; int timers_present = 0; int timer_one = 1; int timer_count = 0, timer_latch = 0; int timer_start = 0; -void timer_process() + +void timer_process(void) { int c; int process = 0; @@ -80,7 +85,8 @@ void timer_process() } } -void timer_update_outstanding() + +void timer_update_outstanding(void) { int c; timer_latch = 0x7fffffff; @@ -92,13 +98,15 @@ void timer_update_outstanding() timer_count = timer_latch = (timer_latch + ((1 << TIMER_SHIFT) - 1)) >> TIMER_SHIFT; } -void timer_reset() + +void timer_reset(void) { pclog("timer_reset\n"); timers_present = 0; timer_latch = timer_count = 0; } + int timer_add(void (*callback)(void *priv), int *count, int *enable, void *priv) { int i = 0; @@ -128,6 +136,7 @@ int timer_add(void (*callback)(void *priv), int *count, int *enable, void *priv) return -1; } + void timer_set_callback(int timer, void (*callback)(void *priv)) { timers[timer].callback = callback; diff --git a/src/um8669f.c b/src/um8669f.c index 5e089aaec..af2516746 100644 --- a/src/um8669f.c +++ b/src/um8669f.c @@ -31,6 +31,7 @@ PnP registers : #include "serial.h" #include "um8669f.h" + typedef struct um8669f_t { int locked; @@ -48,8 +49,10 @@ typedef struct um8669f_t } dev[8]; } um8669f_t; + static um8669f_t um8669f_global; + #define DEV_FDC 0 #define DEV_COM1 1 #define DEV_COM2 2 @@ -63,6 +66,7 @@ static um8669f_t um8669f_global; #define REG_IRQ 0x70 #define REG_DMA 0x74 + void um8669f_pnp_write(uint16_t port, uint8_t val, void *p) { um8669f_t *um8669f = (um8669f_t *)p; @@ -146,6 +150,7 @@ void um8669f_pnp_write(uint16_t port, uint8_t val, void *p) } } + uint8_t um8669f_pnp_read(uint16_t port, void *p) { um8669f_t *um8669f = (um8669f_t *)p; @@ -171,6 +176,7 @@ uint8_t um8669f_pnp_read(uint16_t port, void *p) return 0xff; } + void um8669f_write(uint16_t port, uint8_t val, void *p) { um8669f_t *um8669f = (um8669f_t *)p; @@ -207,6 +213,7 @@ void um8669f_write(uint16_t port, uint8_t val, void *p) } } + uint8_t um8669f_read(uint16_t port, void *p) { um8669f_t *um8669f = (um8669f_t *)p; @@ -221,6 +228,7 @@ uint8_t um8669f_read(uint16_t port, void *p) return um8669f->regs_108[um8669f->cur_reg_108]; } + void um8669f_reset(void) { fdc_update_is_nsc(0); @@ -267,7 +275,8 @@ void um8669f_reset(void) um8669f_global.dev[DEV_LPT1].irq = 7; } -void um8669f_init() + +void um8669f_init(void) { io_sethandler(0x0108, 0x0002, um8669f_read, NULL, NULL, um8669f_write, NULL, NULL, &um8669f_global); diff --git a/src/um8669f.h b/src/um8669f.h index 409ad51c2..669dd27b5 100644 --- a/src/um8669f.h +++ b/src/um8669f.h @@ -1 +1 @@ -extern void um8669f_init(); +extern void um8669f_init(void); diff --git a/src/usb.c b/src/usb.c index 330f408de..58a507216 100644 --- a/src/usb.c +++ b/src/usb.c @@ -1,19 +1,20 @@ /* Copyright holders: Melissa Goad see COPYING for more details */ - #include - #include "ibm.h" #include "io.h" #include "mem.h" - #include "usb.h" -void (*usb_packet_handle[32])(usb_packet_t* packet, void *priv); + void *usb_priv[32]; static int usb_min_card, usb_max_card; + +void (*usb_packet_handle[32])(usb_packet_t* packet, void *priv); + + void usb_init(int min_card, int max_card) { int c; @@ -25,12 +26,14 @@ void usb_init(int min_card, int max_card) usb_max_card = max_card; } + void usb_add_specific(int card, void (*packet_handle)(usb_packet_t *packet, void *priv), void *priv) { usb_packet_handle[card] = packet_handle; usb_priv[card] = priv; } + void usb_add(void (*packet_handle)(usb_packet_t *packet, void *priv), void *priv) { int c; diff --git a/src/w83877f.c b/src/w83877f.c index f9fc3c6ec..1589e1aed 100644 --- a/src/w83877f.c +++ b/src/w83877f.c @@ -8,19 +8,15 @@ * * Emulation of the Winbond W83877F Super I/O Chip. * - * Version: @(#)w83877f.c 1.0.0 2017/05/30 + * Winbond W83877F Super I/O Chip + * Used by the Award 430HX + * + * Version: @(#)w83877f.c 1.0.1 2017/08/23 * * Author: Miran Grca, - * Copyright 2016-2017 Miran Grca. + * Copyright 2016,2017 Miran Grca. */ - -/* - Winbond W83877F Super I/O Chip - Used by the Award 430HX -*/ - #include "ibm.h" - #include "disc.h" #include "fdc.h" #include "fdd.h" @@ -29,6 +25,7 @@ #include "serial.h" #include "w83877f.h" + static int w83877f_locked; static int w83877f_rw_locked = 0; static int w83877f_curreg = 0; @@ -39,6 +36,7 @@ static int winbond_port = 0x3f0; static int winbond_key = 0x89; static int winbond_key_times = 1; + void w83877f_write(uint16_t port, uint8_t val, void *priv); uint8_t w83877f_read(uint16_t port, void *priv); @@ -208,7 +206,8 @@ static uint16_t lpt1_valid_ports[3] = {0x3BC, 0x378, 0x278}; static uint16_t com1_valid_ports[9] = {0x3F8, 0x2F8, 0x3E8, 0x2E8}; static uint16_t com2_valid_ports[9] = {0x3F8, 0x2F8, 0x3E8, 0x2E8}; -static void w83877f_remap() + +static void w83877f_remap(void) { io_removehandler(0x250, 0x0002, w83877f_read, NULL, NULL, w83877f_write, NULL, NULL, NULL); io_removehandler(0x3f0, 0x0002, w83877f_read, NULL, NULL, w83877f_write, NULL, NULL, NULL); @@ -219,6 +218,7 @@ static void w83877f_remap() pclog("W83877F: Remapped to port %04X, key %02X\n", winbond_port, winbond_key); } + static uint8_t is_in_array(uint16_t *port_array, uint8_t max, uint16_t port) { uint8_t i = 0; @@ -230,6 +230,7 @@ static uint8_t is_in_array(uint16_t *port_array, uint8_t max, uint16_t port) return 0; } + static uint16_t make_port(uint8_t reg) { uint16_t p = 0; @@ -283,6 +284,7 @@ static uint16_t make_port(uint8_t reg) return p; } + void w83877f_serial_handler(int id) { int reg_mask = (id - 1) ? 0x10 : 0x20; @@ -301,6 +303,7 @@ void w83877f_serial_handler(int id) } } + void w83877f_write(uint16_t port, uint8_t val, void *priv) { uint8_t index = (port & 1) ? 0 : 1; @@ -459,6 +462,7 @@ process_value: } } + uint8_t w83877f_read(uint16_t port, void *priv) { uint8_t index = (port & 1) ? 0 : 1; @@ -483,6 +487,7 @@ uint8_t w83877f_read(uint16_t port, void *priv) } } + void w83877f_reset(void) { lpt1_remove(); @@ -529,7 +534,8 @@ void w83877f_reset(void) w83877f_rw_locked = 0; } -void w83877f_init() + +void w83877f_init(void) { lpt2_remove(); diff --git a/src/w83877f.h b/src/w83877f.h index f4a103c94..c373f4874 100644 --- a/src/w83877f.h +++ b/src/w83877f.h @@ -8,10 +8,10 @@ * * Emulation of the Winbond W83877F Super I/O Chip. * - * Version: @(#)w83877f.h 1.0.0 2017/05/30 + * Version: @(#)w83877f.h 1.0.1 2017/08/23 * * Author: Miran Grca, * Copyright 2016-2017 Miran Grca. */ -extern void w83877f_init(); +extern void w83877f_init(void); diff --git a/src/wd76c10.c b/src/wd76c10.c index 93c48de8b..09926fcfc 100644 --- a/src/wd76c10.c +++ b/src/wd76c10.c @@ -9,12 +9,15 @@ #include "serial.h" #include "wd76c10.h" + static uint16_t wd76c10_0092; static uint16_t wd76c10_2072; static uint16_t wd76c10_2872; static uint16_t wd76c10_5872; -uint16_t wd76c10_read(uint16_t port, void *priv) + +static uint16_t +wd76c10_read(uint16_t port, void *priv) { switch (port) { @@ -33,7 +36,9 @@ uint16_t wd76c10_read(uint16_t port, void *priv) return 0; } -void wd76c10_write(uint16_t port, uint16_t val, void *priv) + +static void +wd76c10_write(uint16_t port, uint16_t val, void *priv) { pclog("WD76C10 write %04X %04X\n", port, val); switch (port) @@ -88,14 +93,18 @@ void wd76c10_write(uint16_t port, uint16_t val, void *priv) } } -uint8_t wd76c10_readb(uint16_t port, void *priv) + +static uint8_t +wd76c10_readb(uint16_t port, void *priv) { if (port & 1) return wd76c10_read(port & ~1, priv) >> 8; return wd76c10_read(port, priv) & 0xff; } -void wd76c10_writeb(uint16_t port, uint8_t val, void *priv) + +static void +wd76c10_writeb(uint16_t port, uint8_t val, void *priv) { uint16_t temp = wd76c10_read(port, priv); if (port & 1) @@ -104,10 +113,19 @@ void wd76c10_writeb(uint16_t port, uint8_t val, void *priv) wd76c10_write(port , (temp & 0xff00) | val, priv); } -void wd76c10_init() + +void wd76c10_init(void) { - io_sethandler(0x0092, 0x0002, wd76c10_readb, wd76c10_read, NULL, wd76c10_writeb, wd76c10_write, NULL, NULL); - io_sethandler(0x2072, 0x0002, wd76c10_readb, wd76c10_read, NULL, wd76c10_writeb, wd76c10_write, NULL, NULL); - io_sethandler(0x2872, 0x0002, wd76c10_readb, wd76c10_read, NULL, wd76c10_writeb, wd76c10_write, NULL, NULL); - io_sethandler(0x5872, 0x0002, wd76c10_readb, wd76c10_read, NULL, wd76c10_writeb, wd76c10_write, NULL, NULL); + io_sethandler(0x0092, 2, + wd76c10_readb, wd76c10_read, NULL, + wd76c10_writeb, wd76c10_write, NULL, NULL); + io_sethandler(0x2072, 2, + wd76c10_readb, wd76c10_read, NULL, + wd76c10_writeb, wd76c10_write, NULL, NULL); + io_sethandler(0x2872, 2, + wd76c10_readb, wd76c10_read, NULL, + wd76c10_writeb, wd76c10_write, NULL, NULL); + io_sethandler(0x5872, 2, + wd76c10_readb, wd76c10_read, NULL, + wd76c10_writeb, wd76c10_write, NULL, NULL); } diff --git a/src/wd76c10.h b/src/wd76c10.h index 66683165a..8b500c507 100644 --- a/src/wd76c10.h +++ b/src/wd76c10.h @@ -1,4 +1,4 @@ /* Copyright holders: Sarah Walker see COPYING for more details */ -void wd76c10_init(); +extern void wd76c10_init(void); diff --git a/src/xtide.c b/src/xtide.c index f5bcee364..a9d805e96 100644 --- a/src/xtide.c +++ b/src/xtide.c @@ -13,7 +13,7 @@ * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. - * Copyright 2016-2017 Miran Grca. + * Copyright 2016,2017 Miran Grca. */ #include #include "ibm.h" diff --git a/src/xtide.h b/src/xtide.h index f1f0a3da2..8137cbbb0 100644 --- a/src/xtide.h +++ b/src/xtide.h @@ -8,12 +8,12 @@ * * XT IDE controller emulation. * - * Version: @(#)xtide.h 1.0.1 2017/06/03 + * Version: @(#)xtide.h 1.0.2 2017/08/23 * * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. - * Copyright 2016-2017 Miran Grca. + * Copyright 2016,2017 Miran Grca. */ #ifndef EMU_XTIDE_H # define EMU_XTIDE_H