Added Toshiba T3100e emulation. Patch from John Elliott.
This commit is contained in:
parent
c28490cc2f
commit
5d5fa1402a
21 changed files with 1277 additions and 26 deletions
|
|
@ -23,11 +23,12 @@ opti495.c paths.c pc.c pci.c pic.c piix.c pit.c ppi.c ps1.c ps2.c ps2_mca.c ps2_
|
|||
serial.c sio.c sis496.c sound.c sound_ad1848.c sound_adlib.c sound_adlibgold.c sound_audiopci.c sound_cms.c sound_emu8k.c sound_gus.c \
|
||||
sound_mpu401_uart.c sound_opl.c sound_pas16.c sound_ps1.c sound_pssj.c sound_sb.c sound_sb_dsp.c sound_sn76489.c \
|
||||
sound_speaker.c sound_ssi2001.c sound_wss.c sound_ym7128.c soundopenal.c tandy_eeprom.c tandy_rom.c \
|
||||
t3100e.c \
|
||||
timer.c um8669f.c um8881f.c vid_ati_eeprom.c vid_ati_mach64.c vid_ati18800.c vid_ati28800.c \
|
||||
vid_ati68860_ramdac.c vid_cga.c vid_cl5429.c vid_colorplus.c vid_ega.c vid_et4000.c vid_et4000w32.c vid_genius.c vid_hercules.c \
|
||||
vid_icd2061.c vid_ics2595.c vid_incolor.c vid_mda.c vid_olivetti_m24.c vid_oti067.c vid_paradise.c vid_pc200.c \
|
||||
vid_pc1512.c vid_pc1640.c vid_pcjr.c vid_ps1_svga.c vid_s3.c vid_s3_virge.c vid_sdac_ramdac.c \
|
||||
vid_stg_ramdac.c vid_svga.c vid_svga_render.c vid_tandy.c vid_tandysl.c vid_tgui9440.c \
|
||||
vid_stg_ramdac.c vid_svga.c vid_svga_render.c vid_t3100e.c vid_tandy.c vid_tandysl.c vid_tgui9440.c \
|
||||
vid_tkd8001_ramdac.c vid_tvga.c vid_unk_ramdac.c vid_vga.c vid_voodoo.c video.c wd76c10.c vid_wy700.c \
|
||||
x86seg.c x87.c xtide.c sound_dbopl.cc sound_resid.cc dosbox/cdrom_image.cpp dosbox/dbopl.cpp \
|
||||
dosbox/nukedopl.cpp dosbox/vid_cga_comp.c resid-fp/convolve.cc resid-fp/convolve-sse.cc resid-fp/envelope.cc \
|
||||
|
|
|
|||
|
|
@ -14,12 +14,12 @@ laserxt.o lpt.o lpt_dac.o lpt_dss.o mca.o mcr.o mem.o mfm_at.o mfm_xebec.o model
|
|||
opti495.o paths.o pc.o pci.o pic.o piix.o pit.o ppi.o ps1.o ps2.o ps2_mca.o ps2_nvr.o rom.o rtc.o scat.o scsi.o scsi_53c400.o scsi_aha1540.o scsi_cd.o scsi_hd.o \
|
||||
serial.o sio.o sis496.o sound.o sound_ad1848.o sound_adlib.o sound_adlibgold.o sound_audiopci.o sound_cms.o sound_emu8k.o sound_gus.o \
|
||||
sound_mpu401_uart.o sound_opl.o sound_pas16.o sound_ps1.o sound_pssj.o sound_sb.o sound_sb_dsp.o sound_sn76489.o \
|
||||
sound_speaker.o sound_ssi2001.o sound_wss.o sound_ym7128.o soundopenal.o tandy_eeprom.o tandy_rom.o thread-pthread.o \
|
||||
sound_speaker.o sound_ssi2001.o sound_wss.o sound_ym7128.o soundopenal.o t3100e.o tandy_eeprom.o tandy_rom.o thread-pthread.o \
|
||||
timer.o um8669f.o um8881f.o vid_ati_eeprom.o vid_ati_mach64.o vid_ati18800.o vid_ati28800.o \
|
||||
vid_ati68860_ramdac.o vid_cga.o vid_cl5429.o vid_colorplus.o vid_ega.o vid_et4000.o vid_et4000w32.o vid_genius.o vid_hercules.o \
|
||||
vid_icd2061.o vid_ics2595.o vid_incolor.o vid_mda.o vid_olivetti_m24.o vid_oti067.o vid_paradise.o vid_pc200.o \
|
||||
vid_pc1512.o vid_pc1640.o vid_pcjr.o vid_ps1_svga.o vid_s3.o vid_s3_virge.o vid_sdac_ramdac.o \
|
||||
vid_stg_ramdac.o vid_svga.o vid_svga_render.o vid_tandy.o vid_tandysl.o vid_tgui9440.o \
|
||||
vid_stg_ramdac.o vid_svga.o vid_svga_render.o vid_t3100e.o vid_tandy.o vid_tandysl.o vid_tgui9440.o \
|
||||
vid_tkd8001_ramdac.o vid_tvga.o vid_unk_ramdac.o vid_vga.o vid_wy700.o vid_voodoo.o video.o wd76c10.o \
|
||||
x86seg.o x87.o xtide.o sound_dbopl.o sound_resid.o
|
||||
DBOBJ = cdrom_image.o dbopl.o nukedopl.o vid_cga_comp.o
|
||||
|
|
|
|||
|
|
@ -13,12 +13,12 @@ laserxt.o lpt.o lpt_dac.o lpt_dss.o mca.o mcr.o mem.o mfm_at.o mfm_xebec.o model
|
|||
opti495.o paths.o pc.o pci.o pic.o piix.o pit.o ppi.o ps1.o ps2.o ps2_mca.o ps2_nvr.o rom.o rtc.o scat.o scsi.o scsi_53c400.o scsi_aha1540.o scsi_cd.o scsi_hd.o \
|
||||
serial.o sio.o sis496.o sound.o sound_ad1848.o sound_adlib.o sound_adlibgold.o sound_audiopci.o sound_cms.o sound_emu8k.o sound_gus.o \
|
||||
sound_mpu401_uart.o sound_opl.o sound_pas16.o sound_ps1.o sound_pssj.o sound_sb.o sound_sb_dsp.o sound_sn76489.o \
|
||||
sound_speaker.o sound_ssi2001.o sound_wss.o sound_ym7128.o soundopenal.o tandy_eeprom.o tandy_rom.o \
|
||||
sound_speaker.o sound_ssi2001.o sound_wss.o sound_ym7128.o soundopenal.o t3100e.o tandy_eeprom.o tandy_rom.o \
|
||||
timer.o um8669f.o um8881f.o vid_ati_eeprom.o vid_ati_mach64.o vid_ati18800.o vid_ati28800.o \
|
||||
vid_ati68860_ramdac.o vid_cga.o vid_cl5429.o vid_colorplus.o vid_ega.o vid_et4000.o vid_et4000w32.o vid_genius.o vid_hercules.o \
|
||||
vid_icd2061.o vid_ics2595.o vid_incolor.o vid_mda.o vid_olivetti_m24.o vid_oti067.o vid_paradise.o vid_pc200.o \
|
||||
vid_pc1512.o vid_pc1640.o vid_pcjr.o vid_ps1_svga.o vid_s3.o vid_s3_virge.o vid_sdac_ramdac.o \
|
||||
vid_stg_ramdac.o vid_svga.o vid_svga_render.o vid_tandy.o vid_tandysl.o vid_tgui9440.o \
|
||||
vid_stg_ramdac.o vid_svga.o vid_svga_render.o vid_t3100e.o vid_tandy.o vid_tandysl.o vid_tgui9440.o \
|
||||
vid_tkd8001_ramdac.o vid_tvga.o vid_unk_ramdac.o vid_vga.o vid_voodoo.o vid_wy700.o video.o wd76c10.o \
|
||||
x86seg.o x87.o xtide.o sound_dbopl.o sound_resid.o \
|
||||
wx-main.o wx-config_sel.o wx-dialogbox.o wx-utils.o wx-app.o wx-sdl2-joystick.o wx-sdl2-mouse.o wx-sdl2-keyboard.o wx-sdl2-video.o wx-sdl2-midi.o \
|
||||
|
|
|
|||
|
|
@ -13,12 +13,12 @@ laserxt.o lpt.o lpt_dac.o lpt_dss.o mca.o mcr.o mem.o mfm_at.o mfm_xebec.o model
|
|||
opti495.o paths.o pc.o pci.o pic.o piix.o pit.o ppi.o ps1.o ps2.o ps2_mca.o ps2_nvr.o rom.o rtc.o scat.o scsi.o scsi_53c400.o scsi_aha1540.o scsi_cd.o scsi_hd.o \
|
||||
serial.o sio.o sis496.o sound.o sound_ad1848.o sound_adlib.o sound_adlibgold.o sound_audiopci.o sound_cms.o sound_emu8k.o sound_gus.o \
|
||||
sound_mpu401_uart.o sound_opl.o sound_pas16.o sound_ps1.o sound_pssj.o sound_sb.o sound_sb_dsp.o sound_sn76489.o \
|
||||
sound_speaker.o sound_ssi2001.o sound_wss.o sound_ym7128.o soundopenal.o tandy_eeprom.o tandy_rom.o thread-pthread.o \
|
||||
sound_speaker.o sound_ssi2001.o sound_wss.o sound_ym7128.o soundopenal.o t3100e.o tandy_eeprom.o tandy_rom.o thread-pthread.o \
|
||||
timer.o um8669f.o um8881f.o vid_ati_eeprom.o vid_ati_mach64.o vid_ati18800.o vid_ati28800.o \
|
||||
vid_ati68860_ramdac.o vid_cga.o vid_cl5429.o vid_colorplus.o vid_ega.o vid_et4000.o vid_et4000w32.o vid_genius.o vid_hercules.o \
|
||||
vid_icd2061.o vid_ics2595.o vid_incolor.o vid_mda.o vid_olivetti_m24.o vid_oti067.o vid_paradise.o vid_pc200.o \
|
||||
vid_pc1512.o vid_pc1640.o vid_pcjr.o vid_ps1_svga.o vid_s3.o vid_s3_virge.o vid_sdac_ramdac.o \
|
||||
vid_stg_ramdac.o vid_svga.o vid_svga_render.o vid_tandy.o vid_tandysl.o vid_tgui9440.o \
|
||||
vid_stg_ramdac.o vid_svga.o vid_svga_render.o vid_t3100e.o vid_tandy.o vid_tandysl.o vid_tgui9440.o \
|
||||
vid_tkd8001_ramdac.o vid_tvga.o vid_unk_ramdac.o vid_vga.o vid_voodoo.o vid_wy700.o video.o wd76c10.o \
|
||||
x86seg.o x87.o xtide.o sound_dbopl.o sound_resid.o
|
||||
DBOBJ = cdrom_image.o dbopl.o nukedopl.o vid_cga_comp.o
|
||||
|
|
|
|||
|
|
@ -13,12 +13,12 @@ laserxt.o lpt.o lpt_dac.o lpt_dss.o mca.o mcr.o mem.o mfm_at.o mfm_xebec.o model
|
|||
opti495.o paths.o pc.o pci.o pic.o piix.o pit.o ppi.o ps1.o ps2.o ps2_mca.o ps2_nvr.o rom.o rtc.o scat.o scsi.o scsi_53c400.o scsi_aha1540.o scsi_cd.o scsi_hd.o \
|
||||
serial.o sio.o sis496.o sound.o sound_ad1848.o sound_adlib.o sound_adlibgold.o sound_audiopci.o sound_cms.o sound_emu8k.o sound_gus.o \
|
||||
sound_mpu401_uart.o sound_opl.o sound_pas16.o sound_ps1.o sound_pssj.o sound_sb.o sound_sb_dsp.o sound_sn76489.o \
|
||||
sound_speaker.o sound_ssi2001.o sound_wss.o sound_ym7128.o soundopenal.o tandy_eeprom.o tandy_rom.o \
|
||||
sound_speaker.o sound_ssi2001.o sound_wss.o sound_ym7128.o soundopenal.o t3100e.o tandy_eeprom.o tandy_rom.o \
|
||||
timer.o um8669f.o um8881f.o vid_ati_eeprom.o vid_ati_mach64.o vid_ati18800.o vid_ati28800.o \
|
||||
vid_ati68860_ramdac.o vid_cga.o vid_cl5429.o vid_colorplus.o vid_ega.o vid_et4000.o vid_et4000w32.o vid_genius.o vid_hercules.o \
|
||||
vid_icd2061.o vid_ics2595.o vid_incolor.o vid_mda.o vid_olivetti_m24.o vid_oti067.o vid_paradise.o vid_pc200.o \
|
||||
vid_pc1512.o vid_pc1640.o vid_pcjr.o vid_ps1_svga.o vid_s3.o vid_s3_virge.o vid_sdac_ramdac.o \
|
||||
vid_stg_ramdac.o vid_svga.o vid_svga_render.o vid_tandy.o vid_tandysl.o vid_tgui9440.o \
|
||||
vid_stg_ramdac.o vid_svga.o vid_svga_render.o vid_t3100e.o vid_tandy.o vid_tandysl.o vid_tgui9440.o \
|
||||
vid_tkd8001_ramdac.o vid_tvga.o vid_unk_ramdac.o vid_vga.o vid_voodoo.o vid_wy700.o video.o wd76c10.o \
|
||||
x86seg.o x87.o xtide.o sound_dbopl.o sound_resid.o \
|
||||
wx-main.o wx-config_sel.o wx-dialogbox.o wx-utils.o wx-app.o wx-sdl2-joystick.o wx-sdl2-mouse.o wx-sdl2-keyboard.o wx-sdl2-video.o wx-sdl2-midi.o \
|
||||
|
|
|
|||
|
|
@ -12,12 +12,12 @@ OBJ = 386.o 386_dynarec.o 386_dynarec_ops.o 808x.o acer386sx.o ali1429.o amstrad
|
|||
scat.o scsi.o scsi_53c400.o scsi_aha1540.o scsi_cd.o scsi_hd.o serial.o sio.o sis496.o sound.o sound_ad1848.o sound_adlib.o sound_adlibgold.o sound_audiopci.o sound_cms.o sound_dbopl.o \
|
||||
sound_emu8k.o sound_gus.o sound_mpu401_uart.o sound_opl.o sound_pas16.o sound_ps1.o sound_pssj.o sound_resid.o \
|
||||
sound_sb.o sound_sb_dsp.o sound_sn76489.o sound_speaker.o sound_ssi2001.o sound_wss.o \
|
||||
sound_ym7128.o soundopenal.o tandy_eeprom.o tandy_rom.o timer.o um8881f.o um8669f.o vid_ati_eeprom.o vid_ati_mach64.o vid_ati18800.o \
|
||||
sound_ym7128.o soundopenal.o t3100e.o tandy_eeprom.o tandy_rom.o timer.o um8881f.o um8669f.o vid_ati_eeprom.o vid_ati_mach64.o vid_ati18800.o \
|
||||
vid_ati28800.o vid_ati68860_ramdac.o vid_cga.o vid_cl5429.o vid_colorplus.o vid_ega.o vid_et4000.o \
|
||||
vid_et4000w32.o vid_et4000w32i.o vid_genius.o vid_hercules.o vid_icd2061.o vid_ics2595.o vid_incolor.o vid_mda.o \
|
||||
vid_olivetti_m24.o vid_oti067.o vid_paradise.o vid_pc1512.o vid_pc1640.o vid_pc200.o \
|
||||
vid_pcjr.o vid_ps1_svga.o vid_s3.o vid_s3_virge.o vid_sdac_ramdac.o vid_stg_ramdac.o vid_svga.o \
|
||||
vid_svga_render.o vid_tandy.o vid_tandysl.o vid_tgui9440.o vid_tkd8001_ramdac.o vid_tvga.o vid_unk_ramdac.o \
|
||||
vid_svga_render.o vid_t3100e.o vid_tandy.o vid_tandysl.o vid_tgui9440.o vid_tkd8001_ramdac.o vid_tvga.o vid_unk_ramdac.o \
|
||||
vid_vga.o vid_voodoo.o vid_wy700.o video.o wd76c10.o win.o win-config.o win-config_sel.o win-d3d.o win-d3d-fs.o win-ddraw.o \
|
||||
win-ddraw-fs.o win-deviceconfig.o win-hdconf.o win-joystick.o win-joystickconfig.o win-keyboard.o win-midi.o win-mouse.o \
|
||||
win-status.o win-video.o x86seg.o x87.o xtide.o pc.res
|
||||
|
|
|
|||
|
|
@ -13,12 +13,12 @@ OBJ = 386.o 386_dynarec.o 386_dynarec_ops.o 808x.o acer386sx.o ali1429.o amstrad
|
|||
scat.o scsi.o scsi_53c400.o scsi_aha1540.o scsi_cd.o scsi_hd.o serial.o sio.o sis496.o sound.o sound_ad1848.o sound_adlib.o sound_adlibgold.o sound_audiopci.o sound_cms.o sound_dbopl.o \
|
||||
sound_emu8k.o sound_gus.o sound_mpu401_uart.o sound_opl.o sound_pas16.o sound_ps1.o sound_pssj.o sound_resid.o \
|
||||
sound_sb.o sound_sb_dsp.o sound_sn76489.o sound_speaker.o sound_ssi2001.o sound_wss.o \
|
||||
sound_ym7128.o soundopenal.o tandy_eeprom.o tandy_rom.o timer.o um8881f.o um8669f.o vid_ati_eeprom.o vid_ati_mach64.o vid_ati18800.o \
|
||||
sound_ym7128.o soundopenal.o t3100e.o tandy_eeprom.o tandy_rom.o timer.o um8881f.o um8669f.o vid_ati_eeprom.o vid_ati_mach64.o vid_ati18800.o \
|
||||
vid_ati28800.o vid_ati68860_ramdac.o vid_cga.o vid_cl5429.o vid_colorplus.o vid_ega.o vid_et4000.o \
|
||||
vid_et4000w32.o vid_et4000w32i.o vid_genius.o vid_hercules.o vid_icd2061.o vid_ics2595.o vid_incolor.o vid_mda.o \
|
||||
vid_olivetti_m24.o vid_oti067.o vid_paradise.o vid_pc1512.o vid_pc1640.o vid_pc200.o \
|
||||
vid_pcjr.o vid_ps1_svga.o vid_s3.o vid_s3_virge.o vid_sdac_ramdac.o vid_stg_ramdac.o vid_svga.o \
|
||||
vid_svga_render.o vid_tandy.o vid_tandysl.o vid_tgui9440.o vid_tkd8001_ramdac.o vid_tvga.o vid_unk_ramdac.o \
|
||||
vid_svga_render.o vid_t3100e.o vid_tandy.o vid_tandysl.o vid_tgui9440.o vid_tkd8001_ramdac.o vid_tvga.o vid_unk_ramdac.o \
|
||||
vid_vga.o vid_voodoo.o vid_wy700.o video.o wd76c10.o win.o win-config.o win-config_sel.o win-d3d.o win-d3d-fs.o win-ddraw.o \
|
||||
win-ddraw-fs.o win-deviceconfig.o win-hdconf.o win-joystick.o win-joystickconfig.o win-keyboard.o win-midi.o win-mouse.o \
|
||||
win-networkconfig.o win-status.o win-video.o x86seg.o x87.o xtide.o pc.res
|
||||
|
|
|
|||
|
|
@ -15,12 +15,12 @@ OBJ = 386.o 386_dynarec.o 386_dynarec_ops.o 808x.o acer386sx.o ali1429.o amstrad
|
|||
scat.o scsi.o scsi_53c400.o scsi_aha1540.o scsi_cd.o scsi_hd.o serial.o sio.o sis496.o sound.o sound_ad1848.o sound_adlib.o sound_adlibgold.o sound_audiopci.o sound_cms.o sound_dbopl.o \
|
||||
sound_emu8k.o sound_gus.o sound_mpu401_uart.o sound_opl.o sound_pas16.o sound_ps1.o sound_pssj.o sound_resid.o \
|
||||
sound_sb.o sound_sb_dsp.o sound_sn76489.o sound_speaker.o sound_ssi2001.o sound_wss.o \
|
||||
sound_ym7128.o soundopenal.o tandy_eeprom.o tandy_rom.o timer.o um8881f.o um8669f.o vid_ati_eeprom.o vid_ati_mach64.o vid_ati18800.o \
|
||||
sound_ym7128.o soundopenal.o t3100e.o tandy_eeprom.o tandy_rom.o timer.o um8881f.o um8669f.o vid_ati_eeprom.o vid_ati_mach64.o vid_ati18800.o \
|
||||
vid_ati28800.o vid_ati68860_ramdac.o vid_cga.o vid_cl5429.o vid_colorplus.o vid_ega.o vid_et4000.o \
|
||||
vid_et4000w32.o vid_et4000w32i.o vid_genius.o vid_hercules.o vid_icd2061.o vid_ics2595.o vid_incolor.o vid_mda.o \
|
||||
vid_olivetti_m24.o vid_oti067.o vid_paradise.o vid_pc1512.o vid_pc1640.o vid_pc200.o \
|
||||
vid_pcjr.o vid_ps1_svga.o vid_s3.o vid_s3_virge.o vid_sdac_ramdac.o vid_stg_ramdac.o vid_svga.o \
|
||||
vid_svga_render.o vid_tandy.o vid_tandysl.o vid_tgui9440.o vid_tkd8001_ramdac.o vid_tvga.o vid_unk_ramdac.o \
|
||||
vid_svga_render.o vid_t3100e.o vid_tandy.o vid_tandysl.o vid_tgui9440.o vid_tkd8001_ramdac.o vid_tvga.o vid_unk_ramdac.o \
|
||||
vid_vga.o vid_voodoo.o vid_wy700.o video.o wd76c10.o x86seg.o x87.o xtide.o win-midi.o \
|
||||
wx-main.o wx-config_sel.o wx-dialogbox.o wx-utils.o wx-app.o wx-sdl2-joystick.o wx-sdl2-mouse.o wx-sdl2-keyboard.o wx-sdl2-video.o \
|
||||
wx-sdl2.o wx-config.o wx-deviceconfig.o wx-status.o wx-sdl2-status.o wx-resources.o wx-thread.o wx-common.o wx-sdl2-display-win.o \
|
||||
|
|
|
|||
|
|
@ -15,12 +15,12 @@ OBJ = 386.o 386_dynarec.o 386_dynarec_ops.o 808x.o acer386sx.o ali1429.o amstrad
|
|||
scat.o scsi.o scsi_53c400.o scsi_aha1540.o scsi_cd.o scsi_hd.o serial.o sio.o sis496.o sound.o sound_ad1848.o sound_adlib.o sound_adlibgold.o sound_audiopci.o sound_cms.o sound_dbopl.o \
|
||||
sound_emu8k.o sound_gus.o sound_mpu401_uart.o sound_opl.o sound_pas16.o sound_ps1.o sound_pssj.o sound_resid.o \
|
||||
sound_sb.o sound_sb_dsp.o sound_sn76489.o sound_speaker.o sound_ssi2001.o sound_wss.o \
|
||||
sound_ym7128.o soundopenal.o tandy_eeprom.o tandy_rom.o timer.o um8881f.o um8669f.o vid_ati_eeprom.o vid_ati_mach64.o vid_ati18800.o \
|
||||
sound_ym7128.o soundopenal.o t3100e.o tandy_eeprom.o tandy_rom.o timer.o um8881f.o um8669f.o vid_ati_eeprom.o vid_ati_mach64.o vid_ati18800.o \
|
||||
vid_ati28800.o vid_ati68860_ramdac.o vid_cga.o vid_cl5429.o vid_colorplus.o vid_ega.o vid_et4000.o \
|
||||
vid_et4000w32.o vid_et4000w32i.o vid_genius.o vid_hercules.o vid_icd2061.o vid_ics2595.o vid_incolor.o vid_mda.o \
|
||||
vid_olivetti_m24.o vid_oti067.o vid_paradise.o vid_pc1512.o vid_pc1640.o vid_pc200.o \
|
||||
vid_pcjr.o vid_ps1_svga.o vid_s3.o vid_s3_virge.o vid_sdac_ramdac.o vid_stg_ramdac.o vid_svga.o \
|
||||
vid_svga_render.o vid_tandy.o vid_tandysl.o vid_tgui9440.o vid_tkd8001_ramdac.o vid_tvga.o vid_unk_ramdac.o \
|
||||
vid_svga_render.o vid_t3100e.o vid_tandy.o vid_tandysl.o vid_tgui9440.o vid_tkd8001_ramdac.o vid_tvga.o vid_unk_ramdac.o \
|
||||
vid_vga.o vid_voodoo.o vid_wy700.o video.o wd76c10.o x86seg.o x87.o xtide.o win-midi.o \
|
||||
wx-main.o wx-config_sel.o wx-dialogbox.o wx-utils.o wx-app.o wx-sdl2-joystick.o wx-sdl2-mouse.o wx-sdl2-keyboard.o wx-sdl2-video.o \
|
||||
wx-sdl2.o wx-config.o wx-deviceconfig.o wx-hostconfig.o wx-status.o wx-sdl2-status.o wx-resources.o wx-thread.o wx-common.o wx-sdl2-display-win.o \
|
||||
|
|
|
|||
|
|
@ -12,12 +12,12 @@ OBJ = 386.o 386_dynarec.o 386_dynarec_ops.o 808x.o acer386sx.o ali1429.o amstrad
|
|||
scat.o scsi.o scsi_53c400.o scsi_aha1540.o scsi_cd.o scsi_hd.o serial.o sio.o sis496.o sound.o sound_ad1848.o sound_adlib.o sound_adlibgold.o sound_audiopci.o sound_cms.o sound_dbopl.o \
|
||||
sound_emu8k.o sound_gus.o sound_mpu401_uart.o sound_opl.o sound_pas16.o sound_ps1.o sound_pssj.o sound_resid.o \
|
||||
sound_sb.o sound_sb_dsp.o sound_sn76489.o sound_speaker.o sound_ssi2001.o sound_wss.o sound_ym7128.o \
|
||||
soundopenal.o tandy_eeprom.o tandy_rom.o timer.o um8881f.o um8669f.o vid_ati_eeprom.o vid_ati_mach64.o vid_ati18800.o \
|
||||
soundopenal.o t3100e.o tandy_eeprom.o tandy_rom.o timer.o um8881f.o um8669f.o vid_ati_eeprom.o vid_ati_mach64.o vid_ati18800.o \
|
||||
vid_ati28800.o vid_ati68860_ramdac.o vid_cga.o vid_cl5429.o vid_colorplus.o vid_ega.o vid_et4000.o \
|
||||
vid_et4000w32.o vid_et4000w32i.o vid_genius.o vid_hercules.o vid_icd2061.o vid_ics2595.o vid_incolor.o vid_mda.o \
|
||||
vid_olivetti_m24.o vid_oti067.o vid_paradise.o vid_pc1512.o vid_pc1640.o vid_pc200.o \
|
||||
vid_pcjr.o vid_ps1_svga.o vid_s3.o vid_s3_virge.o vid_sdac_ramdac.o vid_stg_ramdac.o vid_svga.o \
|
||||
vid_svga_render.o vid_tandy.o vid_tandysl.o vid_tgui9440.o vid_tkd8001_ramdac.o vid_tvga.o vid_unk_ramdac.o \
|
||||
vid_svga_render.o vid_t3100e.o vid_tandy.o vid_tandysl.o vid_tgui9440.o vid_tkd8001_ramdac.o vid_tvga.o vid_unk_ramdac.o \
|
||||
vid_vga.o vid_voodoo.o vid_wy700.o video.o wd76c10.o win.o win-config.o win-config_sel.o win-d3d.o win-d3d-fs.o win-ddraw.o \
|
||||
win-ddraw-fs.o win-deviceconfig.o win-hdconf.o win-joystick.o win-joystickconfig.o win-keyboard.o win-midi.o win-mouse.o \
|
||||
win-status.o win-video.o x86seg.o x87.o xtide.o pc.res
|
||||
|
|
|
|||
|
|
@ -12,12 +12,12 @@ laserxt.o lpt.o lpt_dac.o lpt_dss.o mca.o mcr.o mem.o mfm_at.o mfm_xebec.o model
|
|||
opti495.o paths.o pc.o pci.o pic.o piix.o pit.o ppi.o ps1.o ps2.o ps2_mca.o ps2_nvr.o rom.o rtc.o scat.o scsi.o scsi_53c400.o scsi_aha1540.o scsi_cd.o scsi_hd.o \
|
||||
serial.o sio.o sis496.o sound.o sound_ad1848.o sound_adlib.o sound_adlibgold.o sound_audiopci.o sound_cms.o sound_emu8k.o sound_gus.o \
|
||||
sound_mpu401_uart.o sound_opl.o sound_pas16.o sound_ps1.o sound_pssj.o sound_sb.o sound_sb_dsp.o sound_sn76489.o \
|
||||
sound_speaker.o sound_ssi2001.o sound_wss.o sound_ym7128.o soundopenal.o tandy_eeprom.o tandy_rom.o \
|
||||
sound_speaker.o sound_ssi2001.o sound_wss.o sound_ym7128.o soundopenal.o t3100e.o tandy_eeprom.o tandy_rom.o \
|
||||
timer.o um8669f.o um8881f.o vid_ati_eeprom.o vid_ati_mach64.o vid_ati18800.o vid_ati28800.o \
|
||||
vid_ati68860_ramdac.o vid_cga.o vid_cl5429.o vid_colorplus.o vid_ega.o vid_et4000.o vid_et4000w32.o vid_genius.o vid_hercules.o \
|
||||
vid_icd2061.o vid_ics2595.o vid_incolor.o vid_mda.o vid_olivetti_m24.o vid_oti067.o vid_paradise.o vid_pc200.o \
|
||||
vid_pc1512.o vid_pc1640.o vid_pcjr.o vid_ps1_svga.o vid_s3.o vid_s3_virge.o vid_sdac_ramdac.o \
|
||||
vid_stg_ramdac.o vid_svga.o vid_svga_render.o vid_tandy.o vid_tandysl.o vid_tgui9440.o \
|
||||
vid_stg_ramdac.o vid_svga.o vid_svga_render.o vid_t3100e.o vid_tandy.o vid_tandysl.o vid_tgui9440.o \
|
||||
vid_tkd8001_ramdac.o vid_tvga.o vid_unk_ramdac.o vid_vga.o vid_voodoo.o vid_wy700.o video.o wd76c10.o \
|
||||
x86seg.o x87.o xtide.o sound_dbopl.o sound_resid.o \
|
||||
wx-main.o wx-config_sel.o wx-dialogbox.o wx-utils.o wx-app.o wx-sdl2-joystick.o wx-sdl2-mouse.o wx-sdl2-keyboard.o wx-sdl2-video.o wx-sdl2-midi.o \
|
||||
|
|
|
|||
|
|
@ -370,7 +370,7 @@ char discfns[2][256];
|
|||
int driveempty[2];
|
||||
|
||||
#define MDA ((gfxcard==GFX_MDA || gfxcard==GFX_HERCULES || gfxcard==GFX_INCOLOR || gfxcard==GFX_GENIUS) && (romset<ROM_TANDY || romset>=ROM_IBMAT))
|
||||
#define VGA ((gfxcard>=GFX_TVGA || romset==ROM_ACER386) && gfxcard!=GFX_COLORPLUS && gfxcard!=GFX_INCOLOR && gfxcard!=GFX_WY700 && gfxcard!=GFX_GENIUS && romset!=ROM_PC1640 && romset!=ROM_PC1512 && romset!=ROM_TANDY && romset!=ROM_PC200)
|
||||
#define VGA ((gfxcard>=GFX_TVGA || romset==ROM_ACER386) && gfxcard!=GFX_COLORPLUS && gfxcard!=GFX_INCOLOR && gfxcard!=GFX_WY700 && gfxcard!=GFX_GENIUS && romset!=ROM_PC1640 && romset!=ROM_PC1512 && romset!=ROM_TANDY && romset!=ROM_PC200 && romset != ROM_T3100E)
|
||||
#define PCJR (romset == ROM_IBMPCJR)
|
||||
#define AMIBIOS (romset==ROM_AMI386SX || romset==ROM_AMI486 || romset == ROM_WIN486)
|
||||
|
||||
|
|
@ -436,6 +436,7 @@ enum
|
|||
ROM_EPSON_PCAX,
|
||||
ROM_EPSON_PCAX2E,
|
||||
ROM_EPSON_PCAX3,
|
||||
ROM_T3100E,
|
||||
|
||||
ROM_MAX
|
||||
};
|
||||
|
|
|
|||
|
|
@ -357,6 +357,9 @@ void keyboard_at_write(uint16_t port, uint8_t val, void *priv)
|
|||
key_ctrl_queue_start = key_ctrl_queue_end = 0;
|
||||
keyboard_at.status &= ~STAT_OFULL;
|
||||
}
|
||||
/* T3100e expects STAT_IFULL to be set immediately
|
||||
* after sending 0xAA */
|
||||
keyboard_at.status |= STAT_IFULL;
|
||||
keyboard_at.status |= STAT_SYSFLAG;
|
||||
keyboard_at.mem[0] |= 0x04;
|
||||
keyboard_at_adddata(0x55);
|
||||
|
|
@ -382,6 +385,18 @@ void keyboard_at_write(uint16_t port, uint8_t val, void *priv)
|
|||
case 0xae: /*Enable keyboard*/
|
||||
keyboard_at.mem[0] &= ~0x10;
|
||||
break;
|
||||
|
||||
case 0xbb: /* Read 'Fn' key - sent by Toshiba 3100e
|
||||
BIOS. Return it for right Ctrl and right
|
||||
Alt; on the real T3100e, these keystrokes
|
||||
could only be generated using 'Fn'. */
|
||||
if (pcem_key[0xb8] || /* Right Alt */
|
||||
pcem_key[0x9d]) /* Right Ctrl */
|
||||
{
|
||||
keyboard_at_adddata(0x04);
|
||||
}
|
||||
else keyboard_at_adddata(0x00);
|
||||
break;
|
||||
|
||||
case 0xc0: /*Read input port*/
|
||||
keyboard_at_adddata(keyboard_at.input_port | 4);
|
||||
|
|
@ -504,6 +519,7 @@ static void at_refresh(void *p)
|
|||
void keyboard_at_init()
|
||||
{
|
||||
//return;
|
||||
memset(&keyboard_at, 0, sizeof(keyboard_at));
|
||||
io_sethandler(0x0060, 0x0005, keyboard_at_read, NULL, NULL, keyboard_at_write, NULL, NULL, NULL);
|
||||
keyboard_at_reset();
|
||||
keyboard_send = keyboard_at_adddata_keyboard;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ static mem_mapping_t base_mapping;
|
|||
mem_mapping_t ram_low_mapping;
|
||||
mem_mapping_t ram_high_mapping;
|
||||
mem_mapping_t ram_mid_mapping;
|
||||
static mem_mapping_t ram_remapped_mapping;
|
||||
mem_mapping_t ram_remapped_mapping;
|
||||
mem_mapping_t bios_mapping[8];
|
||||
mem_mapping_t bios_high_mapping[8];
|
||||
static mem_mapping_t romext_mapping;
|
||||
|
|
@ -755,6 +755,13 @@ int loadbios()
|
|||
fclose(f);
|
||||
return 1;
|
||||
|
||||
case ROM_T3100E:
|
||||
loadfont("t3100e/t3100e_font.bin", 5);
|
||||
f=romfopen("t3100e/t3100e.rom","rb");
|
||||
if (!f) break;
|
||||
fread(rom,65536,1,f);
|
||||
fclose(f);
|
||||
return 1;
|
||||
}
|
||||
printf("Failed to load ROM!\n");
|
||||
if (f) fclose(f);
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ void at_i430vx_init();
|
|||
void at_batman_init();
|
||||
void at_endeavor_init();
|
||||
void xt_laserxt_init();
|
||||
void at_t3100e_init();
|
||||
int model;
|
||||
|
||||
int AMSTRAD, AT, PCI, TANDY;
|
||||
|
|
@ -132,7 +133,8 @@ MODEL models[] =
|
|||
{"[286] IBM XT Model 286", ROM_IBMXT286, "ibmxt286", { {"", cpus_ibmxt286}, {"", NULL}, {"", NULL}}, 0, MODEL_AT, 256,15872,128, ibm_at_init, NULL},
|
||||
{"[286] Samsung SPC-4200P", ROM_SPC4200P, "spc4200p", { {"", cpus_286}, {"", NULL}, {"", NULL}}, 0, MODEL_AT|MODEL_PS2|MODEL_HAS_IDE, 512,2048, 128, at_scat_init, NULL},
|
||||
{"[286] Samsung SPC-4216P", ROM_SPC4216P, "spc4216p", { {"", cpus_286}, {"", NULL}, {"", NULL}}, 0, MODEL_AT|MODEL_PS2|MODEL_HAS_IDE, 1, 5, 1, at_scat_init, NULL},
|
||||
|
||||
{"[286] Toshiba 3100e", ROM_T3100E, "t3100e", { {"", cpus_286}, {"", NULL}, {"", NULL}}, 1, MODEL_AT|MODEL_HAS_IDE, 1024,5120,256, at_t3100e_init, NULL},
|
||||
|
||||
{"[386SX] Acer 386SX25/N", ROM_ACER386, "acer386", { {"Intel", cpus_acer}, {"", NULL}, {"", NULL}}, 1, MODEL_AT|MODEL_PS2|MODEL_HAS_IDE, 1, 16, 1, at_acer386sx_init, NULL},
|
||||
{"[386SX] AMI 386SX clone", ROM_AMI386SX, "ami386", { {"Intel", cpus_i386SX}, {"AMD", cpus_Am386SX}, {"Cyrix", cpus_486SLC}}, 0, MODEL_AT|MODEL_HAS_IDE, 512,16384,128, at_headland_init, NULL},
|
||||
{"[386SX] Amstrad MegaPC", ROM_MEGAPC, "megapc", { {"Intel", cpus_i386SX}, {"AMD", cpus_Am386SX}, {"Cyrix", cpus_486SLC}}, 1, MODEL_AT|MODEL_PS2|MODEL_HAS_IDE, 1, 16, 1, at_wd76c10_init, NULL},
|
||||
|
|
|
|||
|
|
@ -278,6 +278,8 @@ void loadnvr()
|
|||
case ROM_EPSON_PCAX: f = nvrfopen("epson_pcax.nvr", "rb"); nvrmask = 127; break;
|
||||
case ROM_EPSON_PCAX2E: f = nvrfopen("epson_pcax2e.nvr", "rb"); nvrmask = 127; break;
|
||||
case ROM_EPSON_PCAX3: f = nvrfopen("epson_pcax3.nvr", "rb"); nvrmask = 127; break;
|
||||
case ROM_T3100E: f = nvrfopen("t3100e.nvr", "rb"); break;
|
||||
|
||||
default: return;
|
||||
}
|
||||
if (!f)
|
||||
|
|
@ -349,6 +351,7 @@ void savenvr()
|
|||
case ROM_EPSON_PCAX: f = nvrfopen("epson_pcax.nvr", "wb"); break;
|
||||
case ROM_EPSON_PCAX2E: f = nvrfopen("epson_pcax2e.nvr", "wb"); break;
|
||||
case ROM_EPSON_PCAX3: f = nvrfopen("epson_pcax3.nvr", "wb"); break;
|
||||
case ROM_T3100E: f = nvrfopen("t3100e.nvr", "wb"); break;
|
||||
default: return;
|
||||
}
|
||||
fwrite(nvrram,128,1,f);
|
||||
|
|
|
|||
596
src/t3100e.c
Normal file
596
src/t3100e.c
Normal file
|
|
@ -0,0 +1,596 @@
|
|||
#include "ibm.h"
|
||||
#include "cpu.h"
|
||||
#include "model.h"
|
||||
#include "io.h"
|
||||
#include "mouse.h"
|
||||
#include "mem.h"
|
||||
#include "device.h"
|
||||
#include "vid_t3100e.h"
|
||||
|
||||
/* The Toshiba 3100e is a 286-based portable.
|
||||
*
|
||||
* To bring up the BIOS setup screen hold down the 'Fn' key on booting
|
||||
*
|
||||
* Memory management
|
||||
* ~~~~~~~~~~~~~~~~~
|
||||
*
|
||||
* Motherboard memory is divided into:
|
||||
* - Conventional memory: Either 512k or 640k
|
||||
* - Upper memory: Either 512k or 384k, depending on amount of
|
||||
* conventional memory. Upper memory can be
|
||||
* used either as EMS or XMS.
|
||||
* - High memory: 0-4Mb, depending on RAM installed. The BIOS
|
||||
* setup screen allows some or all of this to be
|
||||
* used as EMS; the remainder is XMS.
|
||||
*
|
||||
* Additional memory (either EMS or XMS) can also be provided by ISA
|
||||
* expansion cards.
|
||||
*
|
||||
* Under test in PCEM, the BIOS will boot with up to 65368Kb of memory in
|
||||
* total (16Mb less 16k). However it will give an error with RAM sizes
|
||||
* above 8Mb, if any of the high memory is allocated as EMS, because the
|
||||
* builtin EMS page registers can only access up to 8Mb.
|
||||
*
|
||||
* Memory is controlled by writes to I/O port 8084h:
|
||||
* Bit 7: Always 0 }
|
||||
* Bit 6: Always 1 } These bits select which motherboard function to
|
||||
* Bit 5: Always 0 } access.
|
||||
* Bit 4: Set to treat upper RAM as XMS
|
||||
* Bit 3: Enable external RAM boards?
|
||||
* Bit 2: Set for 640k conventional memory, clear for 512k
|
||||
* Bit 1: Enable RAM beyond 1Mb.
|
||||
* Bit 0: Enable EMS.
|
||||
*
|
||||
* The last value written to this port is saved at 0040:0093h, and in
|
||||
* CMOS memory at offset 0x37. If the top bit of the CMOS byte is set,
|
||||
* then high memory is being provided by an add-on card rather than the
|
||||
* mainboard; accordingly, the BIOS will not allow high memory to be
|
||||
* used as EMS.
|
||||
*
|
||||
* EMS is controlled by 16 page registers:
|
||||
*
|
||||
* Page mapped at 0xD000 0xD400 0xD800 0xDC00
|
||||
* ------------------------------------------------------
|
||||
* Pages 0x00-0x7F 0x208 0x4208 0x8208 0xc208
|
||||
* Pages 0x80-0xFF 0x218 0x4218 0x8218 0xc218
|
||||
* Pages 0x100-0x17F 0x258 0x4258 0x8258 0xc258
|
||||
* Pages 0x180-0x1FF 0x268 0x4268 0x8268 0xc268
|
||||
*
|
||||
* The value written has bit 7 set to enable EMS, reset to disable it.
|
||||
*
|
||||
* So: OUT 0x208, 0x80 will page in the first 16k page at 0xD0000.
|
||||
* OUT 0x208, 0x00 will page out EMS, leaving nothing at 0xD0000.
|
||||
* OUT 0x4208, 0x80 will page in the first 16k page at 0xD4000.
|
||||
* OUT 0x218, 0x80 will page in the 129th 16k page at 0xD0000.
|
||||
*
|
||||
* etc.
|
||||
*
|
||||
* To use EMS from DOS, you will need the Toshiba EMS driver (TOSHEMM.ZIP).
|
||||
* This supports the above system, plus further ranges of ports at
|
||||
* 0x_2A8, 0x_2B8, 0x_2C8.
|
||||
*
|
||||
*/
|
||||
|
||||
static const int t3100e_log = 0;
|
||||
|
||||
extern uint8_t *ram; /* Physical RAM */
|
||||
|
||||
/* Features not implemented:
|
||||
* > Four video fonts.
|
||||
* > BIOS-controlled mapping of serial ports to IRQs.
|
||||
* > Custom keyboard controller. This has a number of extra commands in the
|
||||
* 0xB0-0xBC range, for such things as turbo on/off, and switching the
|
||||
* keyboard between AT and PS/2 modes. Currently I have only implemented
|
||||
* command 0xBB, so that self-test completes successfully. Commands include:
|
||||
*
|
||||
* 0xB0: Turbo on
|
||||
* 0xB1: Turbo off
|
||||
* 0xB2: Internal display on?
|
||||
* 0xB3: Internal display off?
|
||||
* 0xB5: Get settings byte (bottom bit is colour / mono setting)
|
||||
* 0xB6: Set settings byte
|
||||
* 0xB7: Behave as 101-key PS/2 keyboard
|
||||
* 0xB8: Behave as 84-key AT keyboard
|
||||
* 0xBB: Return a byte, bit 2 is Fn key state, other bits unknown.
|
||||
*
|
||||
* The other main I/O port needed to POST is:
|
||||
* 0x8084: System control.
|
||||
* Top 3 bits give command, bottom 5 bits give parameters.
|
||||
* 000 => set serial port IRQ / addresses
|
||||
* bit 4: IRQ5 serial port base: 1 => 0x338, 0 => 0x3E8
|
||||
* bits 3, 2, 0 specify serial IRQs for COM1, COM2, COM3:
|
||||
* 00 0 => 4, 3, 5
|
||||
* 00 1 => 4, 5, 3
|
||||
* 01 0 => 3, 4, 5
|
||||
* 01 1 => 3, 5, 4
|
||||
* 10 0 => 4, -, 3
|
||||
* 10 1 => 3, -, 4
|
||||
* 010 => set memory mappings
|
||||
* bit 4 set if upper RAM is XMS
|
||||
* bit 3 enable add-on memory boards beyond 5Mb?
|
||||
* bit 2 set for 640k sysram, clear for 512k sysram
|
||||
* bit 1 enable mainboard XMS
|
||||
* bit 0 enable mainboard EMS
|
||||
* 100 => set parallel mode / LCD settings
|
||||
* bit 4 set for bidirectional parallel port
|
||||
* bit 3 set to disable internal CGA
|
||||
* bit 2 set for single-pixel LCD font
|
||||
* bits 0,1 for display font
|
||||
*/
|
||||
|
||||
void at_init();
|
||||
|
||||
/* The T3100e motherboard can (and does) dynamically reassign RAM between
|
||||
* conventional, XMS and EMS. This translates to monkeying with the mappings.
|
||||
*/
|
||||
|
||||
extern mem_mapping_t base_mapping;
|
||||
|
||||
extern mem_mapping_t ram_low_mapping; /* This is to switch conventional RAM
|
||||
* between 512k and 640k */
|
||||
|
||||
extern mem_mapping_t ram_mid_mapping; /* This will not be used */
|
||||
|
||||
extern mem_mapping_t ram_high_mapping; /* This is RAM beyond 1Mb if any */
|
||||
|
||||
extern mem_mapping_t ram_remapped_mapping; /* This will not be used */
|
||||
|
||||
extern uint8_t *ram;
|
||||
|
||||
static unsigned t3100e_ems_page_reg[] =
|
||||
{
|
||||
0x208, 0x4208, 0x8208, 0xc208, /* The first four map the first 2Mb */
|
||||
/* of RAM into the page frame */
|
||||
0x218, 0x4218, 0x8218, 0xc218, /* The next four map the next 2Mb */
|
||||
/* of RAM */
|
||||
0x258, 0x4258, 0x8258, 0xc258, /* and so on. */
|
||||
0x268, 0x4268, 0x8268, 0xc268,
|
||||
};
|
||||
|
||||
struct t3100e_ems_regs
|
||||
{
|
||||
uint8_t page[16];
|
||||
mem_mapping_t mapping[4];
|
||||
uint32_t page_exec[4]; /* Physical location of memory pages */
|
||||
uint32_t upper_base; /* Start of upper RAM */
|
||||
uint8_t upper_pages; /* Pages of EMS available from upper RAM */
|
||||
uint8_t upper_is_ems; /* Upper RAM is EMS? */
|
||||
mem_mapping_t upper_mapping;
|
||||
|
||||
} t3100e_ems;
|
||||
|
||||
void t3100e_ems_out(uint16_t addr, uint8_t val, void *p);
|
||||
|
||||
|
||||
/* Given a memory address (which ought to be in the page frame at 0xD0000),
|
||||
* which page does it relate to? */
|
||||
static int addr_to_page(uint32_t addr)
|
||||
{
|
||||
if ((addr & 0xF0000) == 0xD0000)
|
||||
{
|
||||
return ((addr >> 14) & 3);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* And vice versa: Given a page slot, which memory address does it
|
||||
* correspond to? */
|
||||
static uint32_t page_to_addr(int pg)
|
||||
{
|
||||
return 0xD0000 + ((pg & 3) * 16384);
|
||||
}
|
||||
|
||||
/* Given an EMS page ID, return its physical address in RAM. */
|
||||
uint32_t t3100e_ems_execaddr(struct t3100e_ems_regs *regs,
|
||||
int pg, uint16_t val)
|
||||
{
|
||||
uint32_t addr;
|
||||
|
||||
if (!(val & 0x80)) return 0; /* Bit 7 reset => not mapped */
|
||||
|
||||
val &= 0x7F;
|
||||
val += (0x80 * (pg >> 2)); /* The high bits of the register bank */
|
||||
/* are used to extend val to allow up */
|
||||
/* to 8Mb of EMS to be accessed */
|
||||
|
||||
/* Is it in the upper memory range? */
|
||||
if (regs->upper_is_ems)
|
||||
{
|
||||
if (val < regs->upper_pages)
|
||||
{
|
||||
addr = regs->upper_base + 0x4000 * val;
|
||||
return addr;
|
||||
}
|
||||
val -= regs->upper_pages;
|
||||
}
|
||||
/* Otherwise work down from the top of high RAM (so, the more EMS,
|
||||
* the less XMS) */
|
||||
if ((val * 0x4000) + 0x100000 >= (mem_size * 1024))
|
||||
{
|
||||
return 0; /* Not enough high RAM for this page */
|
||||
}
|
||||
/* High RAM found */
|
||||
addr = (mem_size * 1024) - 0x4000 * (val + 1);
|
||||
|
||||
return addr;
|
||||
}
|
||||
|
||||
|
||||
/* The registers governing the EMS ports are in rather a nonintuitive order */
|
||||
static int port_to_page(uint16_t addr)
|
||||
{
|
||||
switch (addr)
|
||||
{
|
||||
case 0x208: return 0;
|
||||
case 0x4208: return 1;
|
||||
case 0x8208: return 2;
|
||||
case 0xC208: return 3;
|
||||
case 0x218: return 4;
|
||||
case 0x4218: return 5;
|
||||
case 0x8218: return 6;
|
||||
case 0xC218: return 7;
|
||||
case 0x258: return 8;
|
||||
case 0x4258: return 9;
|
||||
case 0x8258: return 10;
|
||||
case 0xC258: return 11;
|
||||
case 0x268: return 12;
|
||||
case 0x4268: return 13;
|
||||
case 0x8268: return 14;
|
||||
case 0xC268: return 15;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Used to dump the memory mapping table, for debugging
|
||||
void dump_mappings()
|
||||
{
|
||||
mem_mapping_t *mm = base_mapping.next;
|
||||
|
||||
if (!t3100e_log) return;
|
||||
while (mm)
|
||||
{
|
||||
const char *name = "";
|
||||
uint32_t offset = (uint32_t)(mm->exec - ram);
|
||||
|
||||
if (mm == &ram_low_mapping ) name = "LOW ";
|
||||
if (mm == &ram_mid_mapping ) name = "MID ";
|
||||
if (mm == &ram_high_mapping) name = "HIGH";
|
||||
if (mm == &t3100e_ems.upper_mapping) name = "UPPR";
|
||||
if (mm == &t3100e_ems.mapping[0])
|
||||
{
|
||||
name = "EMS0";
|
||||
offset = t3100e_ems.page_exec[0];
|
||||
}
|
||||
if (mm == &t3100e_ems.mapping[1])
|
||||
{
|
||||
name = "EMS1";
|
||||
offset = t3100e_ems.page_exec[1];
|
||||
}
|
||||
if (mm == &t3100e_ems.mapping[2])
|
||||
{
|
||||
name = "EMS2";
|
||||
offset = t3100e_ems.page_exec[2];
|
||||
}
|
||||
if (mm == &t3100e_ems.mapping[3])
|
||||
{
|
||||
name = "EMS3";
|
||||
offset = t3100e_ems.page_exec[3];
|
||||
}
|
||||
|
||||
pclog(" %p | base=%05x size=%05x %c @ %06x %s\n", mm,
|
||||
mm->base, mm->size, mm->enable ? 'Y' : 'N',
|
||||
offset, name);
|
||||
|
||||
mm = mm->next;
|
||||
}
|
||||
}*/
|
||||
|
||||
void t3100e_map_ram(uint8_t val)
|
||||
{
|
||||
int n;
|
||||
int32_t upper_len;
|
||||
|
||||
if (t3100e_log)
|
||||
{
|
||||
pclog("OUT 0x8084, %02x [ set memory mapping :", val | 0x40);
|
||||
if (val & 1) pclog("ENABLE_EMS ");
|
||||
if (val & 2) pclog("ENABLE_XMS ");
|
||||
if (val & 4) pclog("640K ");
|
||||
if (val & 8) pclog("X8X ");
|
||||
if (val & 16) pclog("UPPER_IS_XMS ");
|
||||
pclog("\n");
|
||||
}
|
||||
/* Bit 2 controls size of conventional memory */
|
||||
if (val & 4)
|
||||
{
|
||||
t3100e_ems.upper_base = 0xA0000;
|
||||
t3100e_ems.upper_pages = 24;
|
||||
}
|
||||
else
|
||||
{
|
||||
t3100e_ems.upper_base = 0x80000;
|
||||
t3100e_ems.upper_pages = 32;
|
||||
}
|
||||
upper_len = t3100e_ems.upper_pages * 16384;
|
||||
|
||||
mem_mapping_set_addr(&ram_low_mapping, 0, t3100e_ems.upper_base);
|
||||
/* Bit 0 set if upper RAM is EMS */
|
||||
t3100e_ems.upper_is_ems = (val & 1);
|
||||
|
||||
/* Bit 1 set if high RAM is enabled */
|
||||
if (val & 2)
|
||||
{
|
||||
mem_mapping_enable(&ram_high_mapping);
|
||||
}
|
||||
else
|
||||
{
|
||||
mem_mapping_disable(&ram_high_mapping);
|
||||
}
|
||||
|
||||
/* Bit 4 set if upper RAM is mapped to high memory
|
||||
* (and bit 1 set if XMS enabled) */
|
||||
if ((val & 0x12) == 0x12)
|
||||
{
|
||||
mem_mapping_set_addr(&t3100e_ems.upper_mapping,
|
||||
mem_size * 1024,
|
||||
upper_len);
|
||||
mem_mapping_enable(&t3100e_ems.upper_mapping);
|
||||
}
|
||||
else
|
||||
{
|
||||
mem_mapping_disable(&t3100e_ems.upper_mapping);
|
||||
}
|
||||
/* Recalculate EMS mappings */
|
||||
for (n = 0; n < 4; n++)
|
||||
{
|
||||
t3100e_ems_out(t3100e_ems_page_reg[n], t3100e_ems.page[n],
|
||||
&t3100e_ems);
|
||||
}
|
||||
|
||||
//dump_mappings();
|
||||
}
|
||||
|
||||
|
||||
uint8_t t3100e_sys_in(uint16_t addr, void *p)
|
||||
{
|
||||
// struct t3100e_ems_regs *regs = (struct t3100e_ems_regs *)p;
|
||||
|
||||
/* XXX Not implemented. Seems to return 0x0C on real hardware */
|
||||
if (t3100e_log) pclog("IN 0x8084\n");
|
||||
return 0x0C;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Handle writes to the T3100e system control port at 0x8084 */
|
||||
void t3100e_sys_out(uint16_t addr, uint8_t val, void *p)
|
||||
{
|
||||
// struct t3100e_ems_regs *regs = (struct t3100e_ems_regs *)p;
|
||||
|
||||
switch (val & 0xE0)
|
||||
{
|
||||
case 0x00: /* Set serial port IRQs. Not implemented */
|
||||
if (t3100e_log) pclog("OUT 0x8084, %02x [ set serial port IRQs]\n", val);
|
||||
break;
|
||||
case 0x40: /* Set RAM mappings. */
|
||||
t3100e_map_ram(val & 0x1F);
|
||||
break;
|
||||
|
||||
case 0x80: /* Set video options. */
|
||||
t3100e_video_options_set(val & 0x1F); break;
|
||||
|
||||
/* Other options not implemented. */
|
||||
default: if (t3100e_log) pclog("OUT 0x8084, %02x\n", val); break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Read EMS page register */
|
||||
uint8_t t3100e_ems_in(uint16_t addr, void *p)
|
||||
{
|
||||
struct t3100e_ems_regs *regs = (struct t3100e_ems_regs *)p;
|
||||
|
||||
return regs->page[port_to_page(addr)];
|
||||
|
||||
}
|
||||
|
||||
/* Write EMS page register */
|
||||
void t3100e_ems_out(uint16_t addr, uint8_t val, void *p)
|
||||
{
|
||||
struct t3100e_ems_regs *regs = (struct t3100e_ems_regs *)p;
|
||||
int pg = port_to_page(addr);
|
||||
|
||||
regs->page_exec[pg & 3] = t3100e_ems_execaddr(regs, pg, val);
|
||||
if (t3100e_log) pclog("EMS: page %d %02x -> %02x [%06x]\n",
|
||||
pg, regs->page[pg], val, regs->page_exec[pg & 3]);
|
||||
regs->page[pg] = val;
|
||||
|
||||
pg &= 3;
|
||||
/* Bit 7 set if page is enabled, reset if page is disabled */
|
||||
if (regs->page_exec[pg])
|
||||
{
|
||||
if (t3100e_log) pclog("Enabling EMS RAM at %05x\n",
|
||||
page_to_addr(pg));
|
||||
mem_mapping_enable(®s->mapping[pg]);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (t3100e_log) pclog("Disabling EMS RAM at %05x\n",
|
||||
page_to_addr(pg));
|
||||
mem_mapping_disable(®s->mapping[pg]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Read RAM in the EMS page frame */
|
||||
static uint8_t ems_read_ram(uint32_t addr, void *priv)
|
||||
{
|
||||
struct t3100e_ems_regs *regs = (struct t3100e_ems_regs *)priv;
|
||||
int pg = addr_to_page(addr);
|
||||
|
||||
if (pg < 0) return 0xFF;
|
||||
addr = regs->page_exec[pg] + (addr & 0x3FFF);
|
||||
return ram[addr];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static uint16_t ems_read_ramw(uint32_t addr, void *priv)
|
||||
{
|
||||
struct t3100e_ems_regs *regs = (struct t3100e_ems_regs *)priv;
|
||||
int pg = addr_to_page(addr);
|
||||
|
||||
if (pg < 0) return 0xFF;
|
||||
//pclog("ems_read_ramw addr=%05x ", addr);
|
||||
addr = regs->page_exec[pg] + (addr & 0x3FFF);
|
||||
//pclog("-> %06x val=%04x\n", addr, *(uint16_t *)&ram[addr]);
|
||||
return *(uint16_t *)&ram[addr];
|
||||
}
|
||||
|
||||
|
||||
static uint32_t ems_read_raml(uint32_t addr, void *priv)
|
||||
{
|
||||
struct t3100e_ems_regs *regs = (struct t3100e_ems_regs *)priv;
|
||||
int pg = addr_to_page(addr);
|
||||
|
||||
if (pg < 0) return 0xFF;
|
||||
addr = regs->page_exec[pg] + (addr & 0x3FFF);
|
||||
return *(uint32_t *)&ram[addr];
|
||||
}
|
||||
|
||||
/* Write RAM in the EMS page frame */
|
||||
static void ems_write_ram(uint32_t addr, uint8_t val, void *priv)
|
||||
{
|
||||
struct t3100e_ems_regs *regs = (struct t3100e_ems_regs *)priv;
|
||||
int pg = addr_to_page(addr);
|
||||
|
||||
if (pg < 0) return;
|
||||
addr = regs->page_exec[pg] + (addr & 0x3FFF);
|
||||
ram[addr] = val;
|
||||
}
|
||||
|
||||
|
||||
static void ems_write_ramw(uint32_t addr, uint16_t val, void *priv)
|
||||
{
|
||||
struct t3100e_ems_regs *regs = (struct t3100e_ems_regs *)priv;
|
||||
int pg = addr_to_page(addr);
|
||||
|
||||
if (pg < 0) return;
|
||||
//pclog("ems_write_ramw addr=%05x ", addr);
|
||||
addr = regs->page_exec[pg] + (addr & 0x3FFF);
|
||||
//pclog("-> %06x val=%04x\n", addr, val);
|
||||
|
||||
*(uint16_t *)&ram[addr] = val;
|
||||
}
|
||||
|
||||
|
||||
static void ems_write_raml(uint32_t addr, uint32_t val, void *priv)
|
||||
{
|
||||
struct t3100e_ems_regs *regs = (struct t3100e_ems_regs *)priv;
|
||||
int pg = addr_to_page(addr);
|
||||
|
||||
if (pg < 0) return;
|
||||
addr = regs->page_exec[pg] + (addr & 0x3FFF);
|
||||
*(uint32_t *)&ram[addr] = val;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Read RAM in the upper area. This is basically what the 'remapped'
|
||||
* mapping in mem.c does, except that the upper area can move around */
|
||||
static uint8_t upper_read_ram(uint32_t addr, void *priv)
|
||||
{
|
||||
struct t3100e_ems_regs *regs = (struct t3100e_ems_regs *)priv;
|
||||
|
||||
addr = (addr - (1024 * mem_size)) + regs->upper_base;
|
||||
return ram[addr];
|
||||
}
|
||||
|
||||
static uint16_t upper_read_ramw(uint32_t addr, void *priv)
|
||||
{
|
||||
struct t3100e_ems_regs *regs = (struct t3100e_ems_regs *)priv;
|
||||
|
||||
addr = (addr - (1024 * mem_size)) + regs->upper_base;
|
||||
return *(uint16_t *)&ram[addr];
|
||||
}
|
||||
|
||||
static uint32_t upper_read_raml(uint32_t addr, void *priv)
|
||||
{
|
||||
struct t3100e_ems_regs *regs = (struct t3100e_ems_regs *)priv;
|
||||
|
||||
addr = (addr - (1024 * mem_size)) + regs->upper_base;
|
||||
return *(uint32_t *)&ram[addr];
|
||||
}
|
||||
|
||||
|
||||
static void upper_write_ram(uint32_t addr, uint8_t val, void *priv)
|
||||
{
|
||||
struct t3100e_ems_regs *regs = (struct t3100e_ems_regs *)priv;
|
||||
|
||||
addr = (addr - (1024 * mem_size)) + regs->upper_base;
|
||||
ram[addr] = val;
|
||||
}
|
||||
|
||||
|
||||
static void upper_write_ramw(uint32_t addr, uint16_t val, void *priv)
|
||||
{
|
||||
struct t3100e_ems_regs *regs = (struct t3100e_ems_regs *)priv;
|
||||
|
||||
addr = (addr - (1024 * mem_size)) + regs->upper_base;
|
||||
*(uint16_t *)&ram[addr] = val;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void upper_write_raml(uint32_t addr, uint32_t val, void *priv)
|
||||
{
|
||||
struct t3100e_ems_regs *regs = (struct t3100e_ems_regs *)priv;
|
||||
|
||||
addr = (addr - (1024 * mem_size)) + regs->upper_base;
|
||||
*(uint32_t *)&ram[addr] = val;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void at_t3100e_init()
|
||||
{
|
||||
int pg;
|
||||
|
||||
memset(&t3100e_ems, 0, sizeof(t3100e_ems));
|
||||
|
||||
at_init();
|
||||
/* Hook up system control port */
|
||||
io_sethandler(0x8084, 0x0001,
|
||||
t3100e_sys_in, NULL, NULL,
|
||||
t3100e_sys_out, NULL, NULL, &t3100e_ems);
|
||||
|
||||
/* Start monitoring all 16 EMS registers */
|
||||
for (pg = 0; pg < 16; pg++)
|
||||
{
|
||||
io_sethandler(t3100e_ems_page_reg[pg], 0x0001,
|
||||
t3100e_ems_in, NULL, NULL,
|
||||
t3100e_ems_out, NULL, NULL, &t3100e_ems);
|
||||
}
|
||||
|
||||
/* Map the EMS page frame */
|
||||
for (pg = 0; pg < 4; pg++)
|
||||
{
|
||||
if (t3100e_log) pclog("Adding memory map at %x for page %d\n", page_to_addr(pg), pg);
|
||||
mem_mapping_add(&t3100e_ems.mapping[pg],
|
||||
page_to_addr(pg), 16384,
|
||||
ems_read_ram, ems_read_ramw, ems_read_raml,
|
||||
ems_write_ram, ems_write_ramw, ems_write_raml,
|
||||
NULL, MEM_MAPPING_EXTERNAL,
|
||||
&t3100e_ems);
|
||||
/* Start them all off disabled */
|
||||
mem_mapping_disable(&t3100e_ems.mapping[pg]);
|
||||
}
|
||||
/* Mapping for upper RAM when in use as XMS*/
|
||||
mem_mapping_add(&t3100e_ems.upper_mapping, mem_size * 1024, 384 * 1024,
|
||||
upper_read_ram, upper_read_ramw, upper_read_raml,
|
||||
upper_write_ram, upper_write_ramw, upper_write_raml,
|
||||
NULL, MEM_MAPPING_INTERNAL, &t3100e_ems);
|
||||
mem_mapping_disable(&t3100e_ems.upper_mapping);
|
||||
mem_mapping_disable(&ram_remapped_mapping);
|
||||
}
|
||||
606
src/vid_t3100e.c
Normal file
606
src/vid_t3100e.c
Normal file
|
|
@ -0,0 +1,606 @@
|
|||
/* Emulate the Toshiba 3100e plasma display. This display has a fixed 640x400
|
||||
* resolution. */
|
||||
#include <stdlib.h>
|
||||
#include "ibm.h"
|
||||
#include "device.h"
|
||||
#include "io.h"
|
||||
#include "mem.h"
|
||||
#include "timer.h"
|
||||
#include "video.h"
|
||||
#include "vid_t3100e.h"
|
||||
|
||||
#define T3100E_XSIZE 640
|
||||
#define T3100E_YSIZE 400
|
||||
|
||||
/* T3100e CRTC regs (from the ROM):
|
||||
*
|
||||
* Selecting a character height of 3 seems to be sufficient to convert the
|
||||
* 640x200 graphics mode to 640x400 (and, by analogy, 320x200 to 320x400).
|
||||
*
|
||||
*
|
||||
* Horiz-----> Vert------> I ch
|
||||
* 38 28 2D 0A 1F 06 19 1C 02 07 06 07 CO40
|
||||
* 71 50 5A 0A 1F 06 19 1C 02 07 06 07 CO80
|
||||
* 38 28 2D 0A 7F 06 64 70 02 01 06 07 Graphics
|
||||
* 61 50 52 0F 19 06 19 19 02 0D 0B 0C MONO
|
||||
* 2D 28 22 0A 67 00 64 67 02 03 06 07 640x400
|
||||
*/
|
||||
void updatewindowsize(int x, int y);
|
||||
|
||||
/* Mapping of attributes to colours */
|
||||
static uint32_t amber, black;
|
||||
static uint32_t blinkcols[256][2];
|
||||
static uint32_t normcols[256][2];
|
||||
|
||||
/* Video options set by the motherboard; they will be picked up by the card
|
||||
* on the next poll.
|
||||
*
|
||||
* Bit 3: Disable built-in video (for add-on card)
|
||||
* Bit 2: Thin font
|
||||
* Bits 0,1: Font set (not currently implemented)
|
||||
*/
|
||||
static uint8_t st_video_options;
|
||||
|
||||
void t3100e_video_options_set(uint8_t options)
|
||||
{
|
||||
st_video_options = options;
|
||||
}
|
||||
|
||||
|
||||
typedef struct t3100e_t
|
||||
{
|
||||
mem_mapping_t mapping;
|
||||
|
||||
uint8_t cga_crtc[32]; /* The CRTC as the host PC sees it. Most
|
||||
* of the registers are ignored by the plasma
|
||||
* display. */
|
||||
int cga_crtcreg; /* Current CRTC register */
|
||||
uint8_t cga_ctrl; /* CGA control register */
|
||||
uint8_t cga_colour; /* CGA colour register */
|
||||
uint8_t cga_stat; /* CGA status (IN 0x3DA) */
|
||||
|
||||
int font; /* Current font, 0-3 */
|
||||
int enabled; /* Hardware enabled, 0 or 1 */
|
||||
|
||||
int dispontime, dispofftime;
|
||||
int vidtime;
|
||||
|
||||
int linepos, displine;
|
||||
int vc;
|
||||
int dispon, blink;
|
||||
int vsynctime;
|
||||
uint8_t video_options;
|
||||
|
||||
uint8_t *vram;
|
||||
} t3100e_t;
|
||||
|
||||
|
||||
void t3100e_recalctimings(t3100e_t *t3100e);
|
||||
void t3100e_write(uint32_t addr, uint8_t val, void *p);
|
||||
uint8_t t3100e_read(uint32_t addr, void *p);
|
||||
|
||||
|
||||
void t3100e_out(uint16_t addr, uint8_t val, void *p)
|
||||
{
|
||||
t3100e_t *t3100e = (t3100e_t *)p;
|
||||
switch (addr)
|
||||
{
|
||||
/* Emulated CRTC, register select */
|
||||
case 0x3d0: case 0x3d2: case 0x3d4: case 0x3d6:
|
||||
t3100e->cga_crtcreg = val & 31;
|
||||
break;
|
||||
|
||||
/* Emulated CRTC, value */
|
||||
case 0x3d1: case 0x3d3: case 0x3d5: case 0x3d7:
|
||||
t3100e->cga_crtc[t3100e->cga_crtcreg] = val;
|
||||
|
||||
t3100e_recalctimings(t3100e);
|
||||
return;
|
||||
|
||||
/* CGA control register */
|
||||
case 0x3D8:
|
||||
t3100e->cga_ctrl = val;
|
||||
return;
|
||||
/* CGA colour register */
|
||||
case 0x3D9:
|
||||
t3100e->cga_colour = val;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t t3100e_in(uint16_t addr, void *p)
|
||||
{
|
||||
t3100e_t *t3100e = (t3100e_t *)p;
|
||||
switch (addr)
|
||||
{
|
||||
case 0x3d0: case 0x3d2: case 0x3d4: case 0x3d6:
|
||||
return t3100e->cga_crtcreg;
|
||||
case 0x3d1: case 0x3d3: case 0x3d5: case 0x3d7:
|
||||
return t3100e->cga_crtc[t3100e->cga_crtcreg];
|
||||
case 0x3d8:
|
||||
return t3100e->cga_ctrl;
|
||||
case 0x3d9:
|
||||
return t3100e->cga_colour;
|
||||
case 0x3da:
|
||||
return t3100e->cga_stat;
|
||||
}
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void t3100e_write(uint32_t addr, uint8_t val, void *p)
|
||||
{
|
||||
t3100e_t *t3100e = (t3100e_t *)p;
|
||||
egawrites++;
|
||||
|
||||
// pclog("CGA_WRITE %04X %02X\n", addr, val);
|
||||
t3100e->vram[addr & 0x7fff] = val;
|
||||
cycles -= 4;
|
||||
}
|
||||
|
||||
|
||||
|
||||
uint8_t t3100e_read(uint32_t addr, void *p)
|
||||
{
|
||||
t3100e_t *t3100e = (t3100e_t *)p;
|
||||
egareads++;
|
||||
cycles -= 4;
|
||||
|
||||
// pclog("CGA_READ %04X\n", addr);
|
||||
return t3100e->vram[addr & 0x7fff];
|
||||
}
|
||||
|
||||
|
||||
|
||||
void t3100e_recalctimings(t3100e_t *t3100e)
|
||||
{
|
||||
double disptime;
|
||||
double _dispontime, _dispofftime;
|
||||
|
||||
disptime = 651;
|
||||
_dispontime = 640;
|
||||
_dispofftime = disptime - _dispontime;
|
||||
t3100e->dispontime = (int)(_dispontime * (1 << TIMER_SHIFT));
|
||||
t3100e->dispofftime = (int)(_dispofftime * (1 << TIMER_SHIFT));
|
||||
}
|
||||
|
||||
|
||||
/* Draw a row of text in 80-column mode */
|
||||
void t3100e_text_row80(t3100e_t *t3100e)
|
||||
{
|
||||
uint32_t cols[2];
|
||||
int x, c;
|
||||
uint8_t chr, attr;
|
||||
int drawcursor;
|
||||
int cursorline;
|
||||
int bold;
|
||||
int blink;
|
||||
uint16_t addr;
|
||||
uint8_t sc;
|
||||
uint16_t ma = (t3100e->cga_crtc[13] | (t3100e->cga_crtc[12] << 8)) & 0x7fff;
|
||||
uint16_t ca = (t3100e->cga_crtc[15] | (t3100e->cga_crtc[14] << 8)) & 0x7fff;
|
||||
|
||||
sc = (t3100e->displine) & 15;
|
||||
addr = ((ma & ~1) + (t3100e->displine >> 4) * 80) * 2;
|
||||
ma += (t3100e->displine >> 4) * 80;
|
||||
|
||||
if ((t3100e->cga_crtc[10] & 0x60) == 0x20)
|
||||
{
|
||||
cursorline = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
cursorline = ((t3100e->cga_crtc[10] & 0x0F)*2 <= sc) &&
|
||||
((t3100e->cga_crtc[11] & 0x0F)*2 >= sc);
|
||||
}
|
||||
for (x = 0; x < 80; x++)
|
||||
{
|
||||
chr = t3100e->vram[(addr + 2 * x) & 0x7FFF];
|
||||
attr = t3100e->vram[(addr + 2 * x + 1) & 0x7FFF];
|
||||
drawcursor = ((ma == ca) && cursorline &&
|
||||
(t3100e->cga_ctrl & 8) && (t3100e->blink & 16));
|
||||
|
||||
blink = ((t3100e->blink & 16) && (t3100e->cga_ctrl & 0x20) &&
|
||||
(attr & 0x80) && !drawcursor);
|
||||
|
||||
/* XXX We should also be taking account of bits 0,1 of
|
||||
* options to select one of the four ROM character sets;
|
||||
* but these are not currently emulated. */
|
||||
|
||||
if (t3100e->video_options & 4)
|
||||
bold = (attr & 8) ? chr + 256 : chr;
|
||||
else
|
||||
bold = (attr & 8) ? chr : chr + 256;
|
||||
|
||||
if (t3100e->cga_ctrl & 0x20) /* Blink */
|
||||
{
|
||||
cols[1] = blinkcols[attr][1];
|
||||
cols[0] = blinkcols[attr][0];
|
||||
if (blink) cols[1] = cols[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
cols[1] = normcols[attr][1];
|
||||
cols[0] = normcols[attr][0];
|
||||
}
|
||||
if (drawcursor)
|
||||
{
|
||||
for (c = 0; c < 8; c++)
|
||||
{
|
||||
((uint32_t *)buffer32->line[t3100e->displine])[(x << 3) + c] = cols[(fontdatm[bold][sc] & (1 << (c ^ 7))) ? 1 : 0] ^ (amber ^ black);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (c = 0; c < 8; c++)
|
||||
((uint32_t *)buffer32->line[t3100e->displine])[(x << 3) + c] = cols[(fontdatm[bold][sc] & (1 << (c ^ 7))) ? 1 : 0];
|
||||
}
|
||||
++ma;
|
||||
}
|
||||
}
|
||||
|
||||
/* Draw a row of text in 40-column mode */
|
||||
void t3100e_text_row40(t3100e_t *t3100e)
|
||||
{
|
||||
uint32_t cols[2];
|
||||
int x, c;
|
||||
uint8_t chr, attr;
|
||||
int drawcursor;
|
||||
int cursorline;
|
||||
int bold;
|
||||
int blink;
|
||||
uint16_t addr;
|
||||
uint8_t sc;
|
||||
uint16_t ma = (t3100e->cga_crtc[13] | (t3100e->cga_crtc[12] << 8)) & 0x7fff;
|
||||
uint16_t ca = (t3100e->cga_crtc[15] | (t3100e->cga_crtc[14] << 8)) & 0x7fff;
|
||||
|
||||
sc = (t3100e->displine) & 15;
|
||||
addr = ((ma & ~1) + (t3100e->displine >> 4) * 40) * 2;
|
||||
ma += (t3100e->displine >> 4) * 40;
|
||||
|
||||
if ((t3100e->cga_crtc[10] & 0x60) == 0x20)
|
||||
{
|
||||
cursorline = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
cursorline = ((t3100e->cga_crtc[10] & 0x0F)*2 <= sc) &&
|
||||
((t3100e->cga_crtc[11] & 0x0F)*2 >= sc);
|
||||
}
|
||||
for (x = 0; x < 40; x++)
|
||||
{
|
||||
chr = t3100e->vram[(addr + 2 * x) & 0x7FFF];
|
||||
attr = t3100e->vram[(addr + 2 * x + 1) & 0x7FFF];
|
||||
drawcursor = ((ma == ca) && cursorline &&
|
||||
(t3100e->cga_ctrl & 8) && (t3100e->blink & 16));
|
||||
|
||||
blink = ((t3100e->blink & 16) && (t3100e->cga_ctrl & 0x20) &&
|
||||
(attr & 0x80) && !drawcursor);
|
||||
|
||||
if (t3100e->video_options & 4)
|
||||
bold = (attr & 8) ? chr + 256 : chr;
|
||||
else bold = (attr & 8) ? chr : chr + 256;
|
||||
|
||||
if (t3100e->cga_ctrl & 0x20) /* Blink */
|
||||
{
|
||||
cols[1] = blinkcols[attr][1];
|
||||
cols[0] = blinkcols[attr][0];
|
||||
if (blink) cols[1] = cols[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
cols[1] = normcols[attr][1];
|
||||
cols[0] = normcols[attr][0];
|
||||
}
|
||||
if (drawcursor)
|
||||
{
|
||||
for (c = 0; c < 8; c++)
|
||||
{
|
||||
((uint32_t *)buffer32->line[t3100e->displine])[(x << 4) + c*2] =
|
||||
((uint32_t *)buffer32->line[t3100e->displine])[(x << 4) + c*2 + 1] = cols[(fontdatm[bold][sc] & (1 << (c ^ 7))) ? 1 : 0] ^ (amber ^ black);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (c = 0; c < 8; c++)
|
||||
{
|
||||
((uint32_t *)buffer32->line[t3100e->displine])[(x << 4) + c*2] =
|
||||
((uint32_t *)buffer32->line[t3100e->displine])[(x << 4) + c*2+1] = cols[(fontdatm[bold][sc] & (1 << (c ^ 7))) ? 1 : 0];
|
||||
}
|
||||
}
|
||||
++ma;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Draw a line in CGA 640x200 or T3100e 640x400 mode */
|
||||
void t3100e_cgaline6(t3100e_t *t3100e)
|
||||
{
|
||||
int x, c;
|
||||
uint8_t dat;
|
||||
uint32_t ink = 0;
|
||||
uint16_t addr;
|
||||
uint32_t fg = (t3100e->cga_colour & 0x0F) ? amber : black;
|
||||
uint32_t bg = black;
|
||||
|
||||
uint16_t ma = (t3100e->cga_crtc[13] | (t3100e->cga_crtc[12] << 8)) & 0x7fff;
|
||||
|
||||
if (t3100e->cga_crtc[9] == 3) /* 640*400 */
|
||||
{
|
||||
addr = ((t3100e->displine) & 1) * 0x2000 +
|
||||
((t3100e->displine >> 1) & 1) * 0x4000 +
|
||||
(t3100e->displine >> 2) * 80 +
|
||||
((ma & ~1) << 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
addr = ((t3100e->displine >> 1) & 1) * 0x2000 +
|
||||
(t3100e->displine >> 2) * 80 +
|
||||
((ma & ~1) << 1);
|
||||
}
|
||||
for (x = 0; x < 80; x++)
|
||||
{
|
||||
dat = t3100e->vram[addr & 0x7FFF];
|
||||
addr++;
|
||||
|
||||
for (c = 0; c < 8; c++)
|
||||
{
|
||||
ink = (dat & 0x80) ? fg : bg;
|
||||
if (!(t3100e->cga_ctrl & 8)) ink = black;
|
||||
((uint32_t *)buffer32->line[t3100e->displine])[x*8+c] = ink;
|
||||
dat = dat << 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Draw a line in CGA 320x200 mode. Here the CGA colours are converted to
|
||||
* dither patterns: colour 1 to 25% grey, colour 2 to 50% grey */
|
||||
void t3100e_cgaline4(t3100e_t *t3100e)
|
||||
{
|
||||
int x, c;
|
||||
uint8_t dat, pattern;
|
||||
uint32_t ink0, ink1;
|
||||
uint16_t addr;
|
||||
|
||||
uint16_t ma = (t3100e->cga_crtc[13] | (t3100e->cga_crtc[12] << 8)) & 0x7fff;
|
||||
if (t3100e->cga_crtc[9] == 3) /* 320*400 undocumented */
|
||||
{
|
||||
addr = ((t3100e->displine) & 1) * 0x2000 +
|
||||
((t3100e->displine >> 1) & 1) * 0x4000 +
|
||||
(t3100e->displine >> 2) * 80 +
|
||||
((ma & ~1) << 1);
|
||||
}
|
||||
else /* 320*200 */
|
||||
{
|
||||
addr = ((t3100e->displine >> 1) & 1) * 0x2000 +
|
||||
(t3100e->displine >> 2) * 80 +
|
||||
((ma & ~1) << 1);
|
||||
}
|
||||
for (x = 0; x < 80; x++)
|
||||
{
|
||||
dat = t3100e->vram[addr & 0x7FFF];
|
||||
addr++;
|
||||
|
||||
for (c = 0; c < 4; c++)
|
||||
{
|
||||
pattern = (dat & 0xC0) >> 6;
|
||||
if (!(t3100e->cga_ctrl & 8)) pattern = 0;
|
||||
|
||||
switch (pattern & 3)
|
||||
{
|
||||
case 0: ink0 = ink1 = black; break;
|
||||
case 1: if (t3100e->displine & 1)
|
||||
{
|
||||
ink0 = black; ink1 = black;
|
||||
}
|
||||
else
|
||||
{
|
||||
ink0 = amber; ink1 = black;
|
||||
}
|
||||
break;
|
||||
case 2: if (t3100e->displine & 1)
|
||||
{
|
||||
ink0 = black; ink1 = amber;
|
||||
}
|
||||
else
|
||||
{
|
||||
ink0 = amber; ink1 = black;
|
||||
}
|
||||
break;
|
||||
case 3: ink0 = ink1 = amber; break;
|
||||
|
||||
}
|
||||
((uint32_t *)buffer32->line[t3100e->displine])[x*8+2*c] = ink0;
|
||||
((uint32_t *)buffer32->line[t3100e->displine])[x*8+2*c+1] = ink1;
|
||||
dat = dat << 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void t3100e_poll(void *p)
|
||||
{
|
||||
t3100e_t *t3100e = (t3100e_t *)p;
|
||||
|
||||
if (t3100e->video_options != st_video_options)
|
||||
{
|
||||
t3100e->video_options = st_video_options;
|
||||
|
||||
if (t3100e->video_options & 8) /* Disable internal CGA */
|
||||
mem_mapping_disable(&t3100e->mapping);
|
||||
else mem_mapping_enable(&t3100e->mapping);
|
||||
|
||||
}
|
||||
|
||||
if (!t3100e->linepos)
|
||||
{
|
||||
t3100e->vidtime += t3100e->dispofftime;
|
||||
t3100e->cga_stat |= 1;
|
||||
t3100e->linepos = 1;
|
||||
if (t3100e->dispon)
|
||||
{
|
||||
if (t3100e->displine == 0)
|
||||
{
|
||||
video_wait_for_buffer();
|
||||
}
|
||||
|
||||
/* Graphics */
|
||||
if (t3100e->cga_ctrl & 0x02)
|
||||
{
|
||||
if (t3100e->cga_ctrl & 0x10)
|
||||
t3100e_cgaline6(t3100e);
|
||||
else t3100e_cgaline4(t3100e);
|
||||
}
|
||||
else
|
||||
if (t3100e->cga_ctrl & 0x01) /* High-res text */
|
||||
{
|
||||
t3100e_text_row80(t3100e);
|
||||
}
|
||||
else
|
||||
{
|
||||
t3100e_text_row40(t3100e);
|
||||
}
|
||||
}
|
||||
t3100e->displine++;
|
||||
/* Hardcode a fixed refresh rate and VSYNC timing */
|
||||
if (t3100e->displine == 400) /* Start of VSYNC */
|
||||
{
|
||||
t3100e->cga_stat |= 8;
|
||||
t3100e->dispon = 0;
|
||||
}
|
||||
if (t3100e->displine == 416) /* End of VSYNC */
|
||||
{
|
||||
t3100e->displine = 0;
|
||||
t3100e->cga_stat &= ~8;
|
||||
t3100e->dispon = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (t3100e->dispon)
|
||||
{
|
||||
t3100e->cga_stat &= ~1;
|
||||
}
|
||||
t3100e->vidtime += t3100e->dispontime;
|
||||
t3100e->linepos = 0;
|
||||
|
||||
if (t3100e->displine == 400)
|
||||
{
|
||||
/* Hardcode 640x400 window size */
|
||||
if (T3100E_XSIZE != xsize || T3100E_YSIZE != ysize)
|
||||
{
|
||||
xsize = T3100E_XSIZE;
|
||||
ysize = T3100E_YSIZE;
|
||||
if (xsize < 64) xsize = 656;
|
||||
if (ysize < 32) ysize = 200;
|
||||
updatewindowsize(xsize, ysize);
|
||||
}
|
||||
video_blit_memtoscreen(0, 0, 0, ysize, xsize, ysize);
|
||||
|
||||
frames++;
|
||||
/* Fixed 640x400 resolution */
|
||||
video_res_x = T3100E_XSIZE;
|
||||
video_res_y = T3100E_YSIZE;
|
||||
|
||||
if (t3100e->cga_ctrl & 0x02)
|
||||
{
|
||||
if (t3100e->cga_ctrl & 0x10)
|
||||
video_bpp = 1;
|
||||
else video_bpp = 2;
|
||||
|
||||
}
|
||||
else video_bpp = 0;
|
||||
t3100e->blink++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void *t3100e_init()
|
||||
{
|
||||
int n;
|
||||
t3100e_t *t3100e = malloc(sizeof(t3100e_t));
|
||||
memset(t3100e, 0, sizeof(t3100e_t));
|
||||
|
||||
/* 32k video RAM */
|
||||
t3100e->vram = malloc(0x8000);
|
||||
|
||||
timer_add(t3100e_poll, &t3100e->vidtime, TIMER_ALWAYS_ENABLED, t3100e);
|
||||
|
||||
/* Occupy memory between 0xB8000 and 0xBFFFF */
|
||||
mem_mapping_add(&t3100e->mapping, 0xb8000, 0x8000, t3100e_read, NULL, NULL, t3100e_write, NULL, NULL, NULL, 0, t3100e);
|
||||
/* Respond to CGA I/O ports */
|
||||
io_sethandler(0x03d0, 0x000c, t3100e_in, NULL, NULL, t3100e_out, NULL, NULL, t3100e);
|
||||
|
||||
/* Set up colours */
|
||||
amber = makecol(0xf7, 0x7C, 0x34);
|
||||
black = makecol(0x17, 0x0C, 0x00);
|
||||
|
||||
/* Initialise the attribute mapping. Start by defaulting everything
|
||||
* to black on amber */
|
||||
for (n = 0; n < 256; n++)
|
||||
{
|
||||
blinkcols[n][0] = normcols[n][0] = amber;
|
||||
blinkcols[n][1] = normcols[n][1] = black;
|
||||
}
|
||||
/* Except 00-0F and 80-8F which are amber on black */
|
||||
for (n = 0; n < 16; n++)
|
||||
{
|
||||
blinkcols[n][0] = normcols[n][0] = black;
|
||||
blinkcols[n][1] = normcols[n][1] = amber;
|
||||
blinkcols[n+128][0] = normcols[n+128][0] = black;
|
||||
blinkcols[n+128][1] = normcols[n+128][1] = amber;
|
||||
}
|
||||
/* In the normal range, 00 11 22 .. FF are black */
|
||||
for (n = 0; n <= 0xFF; n += 0x11)
|
||||
{
|
||||
normcols[n][0] = normcols[n][1] = black;
|
||||
}
|
||||
/* In the blinking range, 00 11 22 .. 77 and 80 91 A2 .. F7 are black */
|
||||
for (n = 0; n <= 0x77; n += 0x11)
|
||||
{
|
||||
blinkcols[n][0] = blinkcols[n][1] = black;
|
||||
blinkcols[n+128][0] = blinkcols[n+128][1] = black;
|
||||
}
|
||||
|
||||
/* Start off in 80x25 text mode */
|
||||
t3100e->cga_stat = 0xF4;
|
||||
t3100e->enabled = 1;
|
||||
t3100e->video_options = 0xFF;
|
||||
return t3100e;
|
||||
}
|
||||
|
||||
void t3100e_close(void *p)
|
||||
{
|
||||
t3100e_t *t3100e = (t3100e_t *)p;
|
||||
|
||||
free(t3100e->vram);
|
||||
free(t3100e);
|
||||
}
|
||||
|
||||
void t3100e_speed_changed(void *p)
|
||||
{
|
||||
t3100e_t *t3100e = (t3100e_t *)p;
|
||||
|
||||
t3100e_recalctimings(t3100e);
|
||||
}
|
||||
|
||||
device_t t3100e_device =
|
||||
{
|
||||
"Toshiba T3100e",
|
||||
0,
|
||||
t3100e_init,
|
||||
t3100e_close,
|
||||
NULL,
|
||||
t3100e_speed_changed,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
3
src/vid_t3100e.h
Normal file
3
src/vid_t3100e.h
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
extern device_t t3100e_device;
|
||||
|
||||
void t3100e_video_options_set(uint8_t options);
|
||||
18
src/video.c
18
src/video.c
|
|
@ -41,6 +41,7 @@
|
|||
#include "vid_tvga.h"
|
||||
#include "vid_vga.h"
|
||||
#include "vid_wy700.h"
|
||||
#include "vid_t3100e.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
|
@ -311,6 +312,10 @@ void video_init()
|
|||
case ROM_IBMPS1_2121:
|
||||
device_add(&ps1_m2121_svga_device);
|
||||
return;
|
||||
|
||||
case ROM_T3100E:
|
||||
device_add(&t3100e_device);
|
||||
return;
|
||||
}
|
||||
device_add(video_cards[video_old_to_new(gfxcard)].device);
|
||||
}
|
||||
|
|
@ -319,7 +324,7 @@ void video_init()
|
|||
BITMAP *buffer32;
|
||||
|
||||
uint8_t fontdat[256][8];
|
||||
uint8_t fontdatm[256][16];
|
||||
uint8_t fontdatm[512][16];
|
||||
uint8_t fontdatw[512][32]; /* Wyse700 font */
|
||||
uint8_t fontdat8x12[256][16]; /* MDSI Genius font */
|
||||
|
||||
|
|
@ -329,6 +334,8 @@ void loadfont(char *s, int format)
|
|||
{
|
||||
FILE *f=romfopen(s,"rb");
|
||||
int c,d;
|
||||
|
||||
pclog("loadfont %i %s %p\n", format, s, f);
|
||||
if (!f)
|
||||
{
|
||||
return;
|
||||
|
|
@ -412,6 +419,15 @@ void loadfont(char *s, int format)
|
|||
}
|
||||
}
|
||||
break;
|
||||
case 5: /* Toshiba 3100e */
|
||||
for (c=0;c<512;c++)
|
||||
{
|
||||
for (d=0;d<16;d++)
|
||||
{
|
||||
fontdatm[c][d]=getc(f);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
fclose(f);
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ extern int fullchange;
|
|||
extern int changeframecount;
|
||||
|
||||
extern uint8_t fontdat[256][8];
|
||||
extern uint8_t fontdatm[256][16];
|
||||
extern uint8_t fontdatm[512][16];
|
||||
|
||||
extern uint32_t *video_15to32, *video_16to32;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue