mirror of
https://github.com/86Box/86Box.git
synced 2026-02-24 02:18:20 -07:00
More cleanups. Lowercased all BIOS ROM filenames. Added ISA Cirrus-Logic to the video card table.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Main include file for the application.
|
||||
*
|
||||
* Version: @(#)86box.h 1.0.9 2017/10/28
|
||||
* Version: @(#)86box.h 1.0.10 2017/10/30
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
@@ -114,6 +114,7 @@ extern void pc_full_speed(void);
|
||||
extern void pc_speed_changed(void);
|
||||
extern void pc_send_cad(void);
|
||||
extern void pc_send_cae(void);
|
||||
extern void pc_send_cab(void);
|
||||
extern void pc_thread(void *param);
|
||||
extern void pc_start(void);
|
||||
extern void pc_onesec(void);
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
|
||||
|
||||
#define MFM_TIME (TIMER_USEC*10LL)
|
||||
#define MFM_DEBUG 0
|
||||
|
||||
#define STAT_ERR 0x01
|
||||
#define STAT_INDEX 0x02
|
||||
@@ -238,7 +237,7 @@ mfm_cmd(mfm_t *mfm, uint8_t val)
|
||||
switch (val & 0xf0) {
|
||||
case CMD_RESTORE:
|
||||
drive->steprate = (val & 0x0f);
|
||||
#if MFM_DEBUG
|
||||
#if ENABLE_HDC_LOG
|
||||
pclog("WD1003(%d) restore, step=%d\n",
|
||||
mfm->drvsel, drive->steprate);
|
||||
#endif
|
||||
@@ -263,7 +262,7 @@ mfm_cmd(mfm_t *mfm, uint8_t val)
|
||||
case CMD_READ+1:
|
||||
case CMD_READ+2:
|
||||
case CMD_READ+3:
|
||||
#if MFM_DEBUG
|
||||
#if ENABLE_HDC_LOG
|
||||
pclog("WD1003(%d) read, opt=%d\n",
|
||||
mfm->drvsel, val&0x03);
|
||||
#endif
|
||||
@@ -280,7 +279,7 @@ mfm_cmd(mfm_t *mfm, uint8_t val)
|
||||
case CMD_WRITE+1:
|
||||
case CMD_WRITE+2:
|
||||
case CMD_WRITE+3:
|
||||
#if MFM_DEBUG
|
||||
#if ENABLE_HDC_LOG
|
||||
pclog("WD1003(%d) write, opt=%d\n",
|
||||
mfm->drvsel, val & 0x03);
|
||||
#endif
|
||||
@@ -384,7 +383,7 @@ mfm_write(uint16_t port, uint8_t val, void *priv)
|
||||
{
|
||||
mfm_t *mfm = (mfm_t *)priv;
|
||||
|
||||
#if MFM_DEBUG > 1
|
||||
#if ENABLE_HDC_LOG > 1
|
||||
pclog("WD1003 write(%04x, %02x)\n", port, val);
|
||||
#endif
|
||||
switch (port) {
|
||||
@@ -520,7 +519,7 @@ mfm_read(uint16_t port, void *priv)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#if MFM_DEBUG > 1
|
||||
#if ENABLE_HDC_LOG > 1
|
||||
pclog("WD1003 read(%04x) = %02x\n", port, ret);
|
||||
#endif
|
||||
|
||||
@@ -533,7 +532,7 @@ do_seek(mfm_t *mfm)
|
||||
{
|
||||
drive_t *drive = &mfm->drives[mfm->drvsel];
|
||||
|
||||
#if MFM_DEBUG
|
||||
#if ENABLE_HDC_LOG
|
||||
pclog("WD1003(%d) seek(%d) max=%d\n",
|
||||
mfm->drvsel,mfm->cylinder,drive->tracks);
|
||||
#endif
|
||||
@@ -553,7 +552,7 @@ do_callback(void *priv)
|
||||
|
||||
mfm->callback = 0LL;
|
||||
if (mfm->reset) {
|
||||
#if MFM_DEBUG
|
||||
#if ENABLE_HDC_LOG
|
||||
pclog("WD1003(%d) reset\n", mfm->drvsel);
|
||||
#endif
|
||||
mfm->status = STAT_READY|STAT_DSC;
|
||||
@@ -575,7 +574,7 @@ do_callback(void *priv)
|
||||
|
||||
switch (mfm->command) {
|
||||
case CMD_SEEK:
|
||||
#if MFM_DEBUG
|
||||
#if ENABLE_HDC_LOG
|
||||
pclog("WD1003(%d) seek, step=%d\n",
|
||||
mfm->drvsel, drive->steprate);
|
||||
#endif
|
||||
@@ -585,7 +584,7 @@ do_callback(void *priv)
|
||||
break;
|
||||
|
||||
case CMD_READ:
|
||||
#if MFM_DEBUG
|
||||
#if ENABLE_HDC_LOG
|
||||
pclog("WD1003(%d) read(%d,%d,%d)\n",
|
||||
mfm->drvsel, mfm->cylinder, mfm->head, mfm->sector);
|
||||
#endif
|
||||
@@ -606,7 +605,7 @@ do_callback(void *priv)
|
||||
break;
|
||||
|
||||
case CMD_WRITE:
|
||||
#if MFM_DEBUG
|
||||
#if ENABLE_HDC_LOG
|
||||
pclog("WD1003(%d) write(%d,%d,%d)\n",
|
||||
mfm->drvsel, mfm->cylinder, mfm->head, mfm->sector);
|
||||
#endif
|
||||
@@ -635,7 +634,7 @@ do_callback(void *priv)
|
||||
break;
|
||||
|
||||
case CMD_VERIFY:
|
||||
#if MFM_DEBUG
|
||||
#if ENABLE_HDC_LOG
|
||||
pclog("WD1003(%d) verify(%d,%d,%d)\n",
|
||||
mfm->drvsel, mfm->cylinder, mfm->head, mfm->sector);
|
||||
#endif
|
||||
@@ -647,7 +646,7 @@ do_callback(void *priv)
|
||||
break;
|
||||
|
||||
case CMD_FORMAT:
|
||||
#if MFM_DEBUG
|
||||
#if ENABLE_HDC_LOG
|
||||
pclog("WD1003(%d) format(%d,%d)\n",
|
||||
mfm->drvsel, mfm->cylinder, mfm->head);
|
||||
#endif
|
||||
@@ -667,7 +666,7 @@ do_callback(void *priv)
|
||||
break;
|
||||
|
||||
case CMD_DIAGNOSE:
|
||||
#if MFM_DEBUG
|
||||
#if ENABLE_HDC_LOG
|
||||
pclog("WD1003(%d) diag\n", mfm->drvsel);
|
||||
#endif
|
||||
drive->steprate = 0x0f;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* !!!NOTE!!! The goal is to GET RID of this file. Do NOT add stuff !!
|
||||
*
|
||||
* Version: @(#)ibm.h 1.0.10 2017/10/16
|
||||
* Version: @(#)ibm.h 1.0.11 2017/10/17
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -449,6 +449,11 @@ enum
|
||||
|
||||
GFX_TRIGEM_UNK, /*Unknown TriGem graphics card with Hangeul ROM*/
|
||||
GFX_MIRO_VISION964, /*S3 Vision964 (Miro Crystal)*/
|
||||
GFX_CL_GD5422, /*Cirrus Logic CL-GD5422*/
|
||||
GFX_CL_GD5430, /*Cirrus Logic CL-GD5430*/
|
||||
GFX_CL_GD5434, /*Cirrus Logic CL-GD5434*/
|
||||
GFX_CL_GD5436, /*Cirrus Logic CL-GD5436*/
|
||||
GFX_CL_GD5440, /*Cirrus Logic CL-GD5440*/
|
||||
|
||||
GFX_MAX
|
||||
};
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Handling of the emulated machines.
|
||||
*
|
||||
* Version: @(#)machine.c 1.0.21 2017/10/27
|
||||
* Version: @(#)machine.c 1.0.22 2017/10/30
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -79,6 +79,9 @@ machine_t machines[] =
|
||||
{"[286 ISA] IBM PS/2 model 30-286", ROM_IBMPS2_M30_286, "ibmps2_m30_286", {{"", cpus_ps2_m30_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_PS2_HDD, 1, 16, 1, 127, machine_ps2_m30_286_init, NULL },
|
||||
{"[286 ISA] IBM XT Model 286", ROM_IBMXT286, "ibmxt286", {{"", cpus_ibmxt286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT, 256,15872, 128, 0, machine_at_top_remap_init, NULL },
|
||||
{"[286 ISA] Samsung SPC-4200P", ROM_SPC4200P, "spc4200p", {{"", cpus_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT | MACHINE_PS2, 512, 2048, 128, 127, machine_at_scat_init, NULL },
|
||||
#ifdef WALTJE
|
||||
{"[286 ISA] OpenAT 286", ROM_OPENAT, "open_at", {{"", cpus_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT, 512, 4096, 128, 127, machine_at_init, NULL },
|
||||
#endif
|
||||
|
||||
{"[286 MCA] IBM PS/2 model 50", ROM_IBMPS2_M50, "ibmps2_m50", {{"", cpus_ps2_m30_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MACHINE_MCA | MACHINE_AT | MACHINE_PS2 | MACHINE_PS2_HDD, 1, 16, 1, 63, machine_ps2_model_50_init, NULL },
|
||||
|
||||
|
||||
@@ -86,6 +86,8 @@ poll_thread(void *arg)
|
||||
/* Wait for a poll request. */
|
||||
network_poll();
|
||||
|
||||
if (pcap == NULL) break;
|
||||
|
||||
/* Wait for the next packet to arrive. */
|
||||
data = (uint8_t *)f_pcap_next((pcap_t *)pcap, &h);
|
||||
if (data != NULL) {
|
||||
@@ -115,7 +117,8 @@ poll_thread(void *arg)
|
||||
}
|
||||
|
||||
/* No longer needed. */
|
||||
thread_destroy_event(evt);
|
||||
if (evt != NULL)
|
||||
thread_destroy_event(evt);
|
||||
|
||||
pclog("PCAP: polling stopped.\n");
|
||||
thread_set_event(poll_state);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Handle SLiRP library processing.
|
||||
*
|
||||
* Version: @(#)net_slirp.c 1.0.11 2017/10/28
|
||||
* Version: @(#)net_slirp.c 1.0.12 2017/10/30
|
||||
*
|
||||
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
@@ -87,6 +87,9 @@ poll_thread(UNUSED(void *arg))
|
||||
/* See if there is any work. */
|
||||
slirp_tic();
|
||||
|
||||
/* Our queue may have been nuked.. */
|
||||
if (slirpq == NULL) break;
|
||||
|
||||
/* Wait for the next packet to arrive. */
|
||||
if (QueuePeek(slirpq) != 0) {
|
||||
/* Grab a packet from the queue. */
|
||||
@@ -110,7 +113,8 @@ poll_thread(UNUSED(void *arg))
|
||||
}
|
||||
|
||||
/* No longer needed. */
|
||||
thread_destroy_event(evt);
|
||||
if (evt != NULL)
|
||||
thread_destroy_event(evt);
|
||||
|
||||
pclog("SLiRP: polling stopped.\n");
|
||||
thread_set_event(poll_state);
|
||||
|
||||
15
src/pc.c
15
src/pc.c
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Main emulator module where most things are controlled.
|
||||
*
|
||||
* Version: @(#)pc.c 1.0.37 2017/10/28
|
||||
* Version: @(#)pc.c 1.0.38 2017/10/30
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -611,6 +611,19 @@ pc_send_cae(void)
|
||||
}
|
||||
|
||||
|
||||
/* Send the machine a Control-Alt-Break sequence. */
|
||||
void
|
||||
pc_send_cab(void)
|
||||
{
|
||||
pc_keyboard_send(29); /* Ctrl key pressed */
|
||||
pc_keyboard_send(56); /* Alt key pressed */
|
||||
pc_keyboard_send(1); /* Esc key pressed */
|
||||
pc_keyboard_send(157); /* Ctrl key released */
|
||||
pc_keyboard_send(184); /* Alt key released */
|
||||
pc_keyboard_send(129); /* Esc key released */
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
pc_reset_hard_close(void)
|
||||
{
|
||||
|
||||
98
src/rom.c
98
src/rom.c
@@ -13,7 +13,7 @@
|
||||
* - c386sx16 BIOS fails checksum
|
||||
* - the loadfont() calls should be done elsewhere
|
||||
*
|
||||
* Version: @(#)rom.c 1.0.14 2017/10/17
|
||||
* Version: @(#)rom.c 1.0.16 2017/10/31
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -314,8 +314,8 @@ rom_load_bios(int rom_id)
|
||||
|
||||
case ROM_IBMXT286: /* IBM PX-XT 286 */
|
||||
if (rom_load_interleaved(
|
||||
L"roms/machines/ibmxt286/BIOS_5162_21APR86_U34_78X7460_27256.BIN",
|
||||
L"roms/machines/ibmxt286/BIOS_5162_21APR86_U35_78X7461_27256.BIN",
|
||||
L"roms/machines/ibmxt286/bios_5162_21apr86_u34_78x7460_27256.bin",
|
||||
L"roms/machines/ibmxt286/bios_5162_21apr86_u35_78x7461_27256.bin",
|
||||
0x000000, 65536, 0, rom)) return(1);
|
||||
break;
|
||||
|
||||
@@ -332,6 +332,14 @@ rom_load_bios(int rom_id)
|
||||
0x000000, 65536, 0, rom)) return(1);
|
||||
break;
|
||||
|
||||
#ifdef WALTJE
|
||||
case ROM_OPENAT: /* PC/AT clone with OpenBIOS */
|
||||
if (rom_load_linear(
|
||||
L"roms/machines/open_at/bios.bin",
|
||||
0x000000, 65536, 0, rom)) return(1);
|
||||
break;
|
||||
#endif
|
||||
|
||||
case ROM_GENXT: /* Generic PC-XT clone */
|
||||
if (rom_load_linear(
|
||||
L"roms/machines/genxt/pcxt.rom",
|
||||
@@ -386,15 +394,15 @@ rom_load_bios(int rom_id)
|
||||
|
||||
case ROM_PORTABLE:
|
||||
if (rom_load_linear(
|
||||
L"roms/machines/portable/Compaq Portable Plus 100666-001 Rev C u47.bin",
|
||||
L"roms/machines/portable/compaq portable plus 100666-001 rev c u47.bin",
|
||||
0x00e000, 8192, 0, rom)) return(1);
|
||||
break;
|
||||
|
||||
#if NOT_USED
|
||||
case ROM_PORTABLEII:
|
||||
if (! rom_load_interleaved(
|
||||
L"roms/machines/portableii/106438-001.BIN",
|
||||
L"roms/machines/portableii/106437-001.BIN",
|
||||
L"roms/machines/portableii/106438-001.bin",
|
||||
L"roms/machines/portableii/106437-001.bin",
|
||||
0x000000, 32768, 0, rom)) break;
|
||||
biosmask = 0x7fff;
|
||||
return(1);
|
||||
@@ -402,8 +410,8 @@ rom_load_bios(int rom_id)
|
||||
case ROM_PORTABLEIII:
|
||||
case ROM_PORTABLEIII386:
|
||||
if (rom_load_interleaved(
|
||||
L"roms/machines/portableiii/109738-002.BIN",
|
||||
L"roms/machines/portableiii/109737-002.BIN",
|
||||
L"roms/machines/portableiii/109738-002.bin",
|
||||
L"roms/machines/portableiii/109737-002.bin",
|
||||
0x000000, 32768, 0, rom)) return(1);
|
||||
biosmask = 0x7fff;
|
||||
break;
|
||||
@@ -411,7 +419,7 @@ rom_load_bios(int rom_id)
|
||||
|
||||
case ROM_DTKXT:
|
||||
if (rom_load_linear(
|
||||
L"roms/machines/dtk/DTK_ERSO_2.42_2764.bin",
|
||||
L"roms/machines/dtk/dtk_erso_2.42_2764.bin",
|
||||
0x00e000, 8192, 0, rom)) return(1);
|
||||
break;
|
||||
|
||||
@@ -459,13 +467,13 @@ rom_load_bios(int rom_id)
|
||||
|
||||
case ROM_AMI386DX_OPTI495: /* uses the OPTi 82C495 chipset */
|
||||
if (rom_load_linear(
|
||||
L"roms/machines/ami386dx/OPT495SX.AMI",
|
||||
L"roms/machines/ami386dx/opt495sx.ami",
|
||||
0x000000, 65536, 0, rom)) return(1);
|
||||
break;
|
||||
|
||||
case ROM_MR386DX_OPTI495: /* uses the OPTi 82C495 chipset */
|
||||
if (rom_load_linear(
|
||||
L"roms/machines/mr386dx/OPT495SX.MR",
|
||||
L"roms/machines/mr386dx/opt495sx.mr",
|
||||
0x000000, 65536, 0, rom)) return(1);
|
||||
break;
|
||||
|
||||
@@ -473,7 +481,7 @@ rom_load_bios(int rom_id)
|
||||
case ROM_AWARD386DX_OPTI495: /* uses the OPTi 82C495 chipset */
|
||||
case ROM_AWARD486_OPTI495: /* uses the OPTi 82C495 chipset */
|
||||
if (rom_load_linear(
|
||||
L"roms/machines/award495/OPT495S.AWA",
|
||||
L"roms/machines/award495/opt495s.awa",
|
||||
0x000000, 65536, 0, rom)) return(1);
|
||||
break;
|
||||
|
||||
@@ -505,39 +513,39 @@ rom_load_bios(int rom_id)
|
||||
|
||||
case ROM_AMI486:
|
||||
if (rom_load_linear(
|
||||
L"roms/machines/ami486/ami486.BIN",
|
||||
L"roms/machines/ami486/ami486.bin",
|
||||
0x000000, 65536, 0, rom)) return(1);
|
||||
break;
|
||||
|
||||
case ROM_WIN486:
|
||||
if (rom_load_linear(
|
||||
L"roms/machines/win486/ALI1429G.AMW",
|
||||
L"roms/machines/win486/ali1429g.amw",
|
||||
0x000000, 65536, 0, rom)) return(1);
|
||||
break;
|
||||
|
||||
case ROM_430VX:
|
||||
if (! rom_load_linear(
|
||||
L"roms/machines/430vx/55XWUQ0E.BIN",
|
||||
L"roms/machines/430vx/55xwuq0e.bin",
|
||||
0x000000, 131072, 0, rom)) break;
|
||||
biosmask = 0x1ffff;
|
||||
return(1);
|
||||
|
||||
case ROM_REVENGE:
|
||||
if (! rom_load_linear(
|
||||
L"roms/machines/revenge/1009AF2_.BIO",
|
||||
L"roms/machines/revenge/1009af2_.bio",
|
||||
0x010000, 65536, 128, rom)) break;
|
||||
if (! rom_load_linear(
|
||||
L"roms/machines/revenge/1009AF2_.BI1",
|
||||
L"roms/machines/revenge/1009af2_.bi1",
|
||||
0x000000, 0x00c000, 128, rom)) break;
|
||||
biosmask = 0x1ffff;
|
||||
return(1);
|
||||
|
||||
case ROM_ENDEAVOR:
|
||||
if (! rom_load_linear(
|
||||
L"roms/machines/endeavor/1006CB0_.BIO",
|
||||
L"roms/machines/endeavor/1006cb0_.bio",
|
||||
0x010000, 65536, 128, rom)) break;
|
||||
if (! rom_load_linear(
|
||||
L"roms/machines/endeavor/1006CB0_.BI1",
|
||||
L"roms/machines/endeavor/1006cb0_.bi1",
|
||||
0x000000, 0x00d000, 128, rom)) break;
|
||||
biosmask = 0x1ffff;
|
||||
return(1);
|
||||
@@ -559,40 +567,40 @@ rom_load_bios(int rom_id)
|
||||
|
||||
case ROM_IBMPS1_2133:
|
||||
if (! rom_load_linear(
|
||||
L"roms/machines/ibmps1_2133/PS1_2133_52G2974_ROM.bin",
|
||||
L"roms/machines/ibmps1_2133/ps1_2133_52g2974_rom.bin",
|
||||
0x000000, 131072, 0, rom)) break;
|
||||
biosmask = 0x1ffff;
|
||||
return(1);
|
||||
|
||||
case ROM_DESKPRO_386:
|
||||
if (! rom_load_interleaved(
|
||||
L"roms/machines/deskpro386/109592-005.U11.bin",
|
||||
L"roms/machines/deskpro386/109591-005.U13.bin",
|
||||
L"roms/machines/deskpro386/109592-005.u11.bin",
|
||||
L"roms/machines/deskpro386/109591-005.u13.bin",
|
||||
0x000000, 32768, 0, rom)) break;
|
||||
biosmask = 0x7fff;
|
||||
return(1);
|
||||
|
||||
case ROM_AMIXT:
|
||||
if (rom_load_linear(
|
||||
L"roms/machines/amixt/AMI_8088_BIOS_31JAN89.BIN",
|
||||
L"roms/machines/amixt/ami_8088_bios_31jan89.bin",
|
||||
0x00e000, 8192, 0, rom)) return(1);
|
||||
break;
|
||||
|
||||
case ROM_LTXT:
|
||||
if (rom_load_linear(
|
||||
L"roms/machines/ltxt/27C64.bin",
|
||||
L"roms/machines/ltxt/27c64.bin",
|
||||
0x00e000, 8192, 0, rom)) return(1);
|
||||
break;
|
||||
|
||||
case ROM_LXT3:
|
||||
if (rom_load_linear(
|
||||
L"roms/machines/lxt3/27C64D.bin",
|
||||
L"roms/machines/lxt3/27c64d.bin",
|
||||
0x00e000, 8192, 0, rom)) return(1);
|
||||
break;
|
||||
|
||||
case ROM_SPC4200P: /* Samsung SPC-4200P */
|
||||
if (rom_load_linear(
|
||||
L"roms/machines/spc4200p/U8.01",
|
||||
L"roms/machines/spc4200p/u8.01",
|
||||
0x000000, 65536, 0, rom)) return(1);
|
||||
break;
|
||||
|
||||
@@ -643,7 +651,7 @@ rom_load_bios(int rom_id)
|
||||
#if 0
|
||||
case ROM_586MC1:
|
||||
if (! rom_load_linear(
|
||||
L"roms/machines/586mc1/IS.34",
|
||||
L"roms/machines/586mc1/is.34",
|
||||
0x000000, 131072, 0, rom)) break;
|
||||
biosmask = 0x1ffff;
|
||||
return(1);
|
||||
@@ -651,45 +659,45 @@ rom_load_bios(int rom_id)
|
||||
|
||||
case ROM_PLATO:
|
||||
if (! rom_load_linear(
|
||||
L"roms/machines/plato/1016AX1_.BIO",
|
||||
L"roms/machines/plato/1016ax1_.bio",
|
||||
0x010000, 65536, 128, rom)) break;
|
||||
if (! rom_load_linear(
|
||||
L"roms/machines/plato/1016AX1_.BI1",
|
||||
L"roms/machines/plato/1016ax1_.bi1",
|
||||
0x000000, 0x00d000, 128, rom)) break;
|
||||
biosmask = 0x1ffff;
|
||||
return(1);
|
||||
|
||||
case ROM_MB500N:
|
||||
if (! rom_load_linear(
|
||||
L"roms/machines/mb500n/031396S.BIN",
|
||||
L"roms/machines/mb500n/031396s.bin",
|
||||
0x000000, 131072, 0, rom)) break;
|
||||
biosmask = 0x1ffff;
|
||||
return(1);
|
||||
|
||||
case ROM_AP53:
|
||||
if (! rom_load_linear(
|
||||
L"roms/machines/ap53/AP53R2C0.ROM",
|
||||
L"roms/machines/ap53/ap53r2c0.rom",
|
||||
0x000000, 131072, 0, rom)) break;
|
||||
biosmask = 0x1ffff;
|
||||
return(1);
|
||||
|
||||
case ROM_P55T2S:
|
||||
if (! rom_load_linear(
|
||||
L"roms/machines/p55t2s/S6Y08T.ROM",
|
||||
L"roms/machines/p55t2s/s6y08t.rom",
|
||||
0x000000, 131072, 0, rom)) break;
|
||||
biosmask = 0x1ffff;
|
||||
return(1);
|
||||
|
||||
case ROM_PRESIDENT:
|
||||
if (! rom_load_linear(
|
||||
L"roms/machines/president/BIOS.BIN",
|
||||
L"roms/machines/president/bios.bin",
|
||||
0x000000, 131072, 0, rom)) break;
|
||||
biosmask = 0x1ffff;
|
||||
return(1);
|
||||
|
||||
case ROM_P54TP4XE:
|
||||
if (! rom_load_linear(
|
||||
L"roms/machines/p54tp4xe/T15I0302.AWD",
|
||||
L"roms/machines/p54tp4xe/t15i0302.awd",
|
||||
0x000000, 131072, 0, rom)) break;
|
||||
biosmask = 0x1ffff;
|
||||
return(1);
|
||||
@@ -703,69 +711,69 @@ rom_load_bios(int rom_id)
|
||||
|
||||
case ROM_ACERV35N:
|
||||
if (! rom_load_linear(
|
||||
L"roms/machines/acerv35n/V35ND1S1.BIN",
|
||||
L"roms/machines/acerv35n/v35nd1s1.bin",
|
||||
0x000000, 131072, 0, rom)) break;
|
||||
biosmask = 0x1ffff;
|
||||
return(1);
|
||||
|
||||
case ROM_P55VA:
|
||||
if (! rom_load_linear(
|
||||
L"roms/machines/p55va/VA021297.BIN",
|
||||
L"roms/machines/p55va/va021297.bin",
|
||||
0x000000, 131072, 0, rom)) break;
|
||||
biosmask = 0x1ffff;
|
||||
return(1);
|
||||
|
||||
case ROM_P55T2P4:
|
||||
if (! rom_load_linear(
|
||||
L"roms/machines/p55t2p4/0207_J2.BIN",
|
||||
L"roms/machines/p55t2p4/0207_j2.bin",
|
||||
0x000000, 131072, 0, rom)) break;
|
||||
biosmask = 0x1ffff;
|
||||
return(1);
|
||||
|
||||
case ROM_P55TVP4:
|
||||
if (! rom_load_linear(
|
||||
L"roms/machines/p55tvp4/TV5I0204.AWD",
|
||||
L"roms/machines/p55tvp4/tv5i0204.awd",
|
||||
0x000000, 131072, 0, rom)) break;
|
||||
biosmask = 0x1ffff;
|
||||
return(1);
|
||||
|
||||
case ROM_440FX: /* working Tyan BIOS */
|
||||
if (! rom_load_linear(
|
||||
L"roms/machines/440fx/NTMAW501.BIN",
|
||||
L"roms/machines/440fx/ntmaw501.bin",
|
||||
0x000000, 131072, 0, rom)) break;
|
||||
biosmask = 0x1ffff;
|
||||
return(1);
|
||||
|
||||
case ROM_S1668: /* working Tyan BIOS */
|
||||
if (! rom_load_linear(
|
||||
L"roms/machines/tpatx/S1668P.ROM",
|
||||
L"roms/machines/tpatx/s1668p.rom",
|
||||
0x000000, 131072, 0, rom)) break;
|
||||
biosmask = 0x1ffff;
|
||||
return(1);
|
||||
|
||||
case ROM_THOR:
|
||||
if (! rom_load_linear(
|
||||
L"roms/machines/thor/1006CN0_.BIO",
|
||||
L"roms/machines/thor/1006cn0_.bio",
|
||||
0x010000, 65536, 128, rom)) break;
|
||||
if (! rom_load_linear(
|
||||
L"roms/machines/thor/1006CN0_.BI1",
|
||||
L"roms/machines/thor/1006cn0_.bi1",
|
||||
0x000000, 65536, 128, rom)) break;
|
||||
biosmask = 0x1ffff;
|
||||
return(1);
|
||||
|
||||
case ROM_MRTHOR:
|
||||
if (! rom_load_linear(
|
||||
L"roms/machines/mrthor/MR_ATX.BIO",
|
||||
L"roms/machines/mrthor/mr_atx.bio",
|
||||
0x000000, 131072, 0, rom)) break;
|
||||
biosmask = 0x1ffff;
|
||||
return(1);
|
||||
|
||||
case ROM_ZAPPA:
|
||||
if (! rom_load_linear(
|
||||
L"roms/machines/zappa/1006BS0_.BIO",
|
||||
L"roms/machines/zappa/1006bs0_.bio",
|
||||
0x010000, 65536, 128, rom)) break;
|
||||
if (! rom_load_linear(
|
||||
L"roms/machines/zappa/1006BS0_.BI1",
|
||||
L"roms/machines/zappa/1006bs0_.bi1",
|
||||
0x000000, 65536, 128, rom)) break;
|
||||
biosmask = 0x1ffff;
|
||||
return(1);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Definitions for the ROM image handler.
|
||||
*
|
||||
* Version: @(#)rom.h 1.0.2 2017/09/25
|
||||
* Version: @(#)rom.h 1.0.3 2017/10/30
|
||||
*
|
||||
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Copyright 2017 Fred N. van Kempen.
|
||||
@@ -113,6 +113,7 @@ enum {
|
||||
|
||||
ROM_PRESIDENT, /* President Award 430FX PCI/430FX/Award/Unknown SIO */
|
||||
ROM_IBMPS2_M80_486,
|
||||
ROM_OPENAT, /* PC/AT clone with Open BIOS */
|
||||
|
||||
ROM_MAX
|
||||
};
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* ATI 18800 emulation (VGA Edge-16)
|
||||
*
|
||||
* Version: @(#)vid_ati18800.c 1.0.1 2017/10/16
|
||||
* Version: @(#)vid_ati18800.c 1.0.2 2017/10/31
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -33,6 +33,9 @@
|
||||
#include "vid_svga.h"
|
||||
|
||||
|
||||
#define BIOS_ROM_PATH L"roms/video/ati18800/vga88.bin"
|
||||
|
||||
|
||||
typedef struct ati18800_t
|
||||
{
|
||||
svga_t svga;
|
||||
@@ -183,7 +186,7 @@ static void *ati18800_init(device_t *info)
|
||||
ati18800_t *ati18800 = malloc(sizeof(ati18800_t));
|
||||
memset(ati18800, 0, sizeof(ati18800_t));
|
||||
|
||||
rom_init(&ati18800->bios_rom, L"roms/video/ati18800/vga88.BIN", 0xc0000, 0x10000, 0xffff, 0, MEM_MAPPING_EXTERNAL);
|
||||
rom_init(&ati18800->bios_rom, BIOS_ROM_PATH, 0xc0000, 0x10000, 0xffff, 0, MEM_MAPPING_EXTERNAL);
|
||||
|
||||
svga_init(&ati18800->svga, ati18800, 1 << 19, /*512kb*/
|
||||
NULL,
|
||||
@@ -203,7 +206,7 @@ static void *ati18800_init(device_t *info)
|
||||
|
||||
static int ati18800_available(void)
|
||||
{
|
||||
return rom_present(L"roms/video/ati18800/vga88.BIN");
|
||||
return rom_present(BIOS_ROM_PATH);
|
||||
}
|
||||
|
||||
static void ati18800_close(void *p)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* ATI 28800 emulation (VGA Charger)
|
||||
*
|
||||
* Version: @(#)vid_ati28800.c 1.0.1 2017/10/16
|
||||
* Version: @(#)vid_ati28800.c 1.0.2 2017/10/31
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -35,6 +35,15 @@
|
||||
#include "vid_svga_render.h"
|
||||
|
||||
|
||||
#define BIOS_VGAXL_EVEN_PATH L"roms/video/ati28800/xleven.bin"
|
||||
#define BIOS_VGAXL_ODD_PATH L"roms/video/ati28800/xlodd.bin"
|
||||
|
||||
#define BIOS_XL24_EVEN_PATH L"roms/video/ati28800/112-14318-102.bin"
|
||||
#define BIOS_XL24_ODD_PATH L"roms/video/ati28800/112-14319-102.bin"
|
||||
|
||||
#define BIOS_ROM_PATH L"roms/video/ati28800/bios.bin"
|
||||
|
||||
|
||||
typedef struct ati28800_t
|
||||
{
|
||||
svga_t svga;
|
||||
@@ -372,93 +381,124 @@ static void ati28800_recalctimings(svga_t *svga)
|
||||
}
|
||||
}
|
||||
|
||||
static void *ati28800_init(device_t *info)
|
||||
{
|
||||
uint32_t memory = 512;
|
||||
ati28800_t *ati28800;
|
||||
/* if (gfxcard == GFX_VGAWONDERXL) */ memory = device_get_config_int("memory");
|
||||
memory <<= 10;
|
||||
ati28800 = malloc(sizeof(ati28800_t));
|
||||
memset(ati28800, 0, sizeof(ati28800_t));
|
||||
|
||||
if (gfxcard == GFX_VGAWONDERXL)
|
||||
{
|
||||
rom_init_interleaved(&ati28800->bios_rom,
|
||||
L"roms/video/ati28800/XLEVEN.BIN",
|
||||
L"roms/video/ati28800/XLODD.BIN",
|
||||
0xc0000, 0x10000, 0xffff, 0, MEM_MAPPING_EXTERNAL);
|
||||
}
|
||||
else if (gfxcard == GFX_VGAWONDERXL24)
|
||||
{
|
||||
rom_init_interleaved(&ati28800->bios_rom,
|
||||
L"roms/video/ati28800/112-14318-102.bin",
|
||||
L"roms/video/ati28800/112-14319-102.bin",
|
||||
0xc0000, 0x10000, 0xffff, 0, MEM_MAPPING_EXTERNAL);
|
||||
}
|
||||
else
|
||||
rom_init(&ati28800->bios_rom, L"roms/video/ati28800/bios.bin", 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
|
||||
svga_init(&ati28800->svga, ati28800, memory, /*512kb*/
|
||||
ati28800_recalctimings,
|
||||
static void *
|
||||
ati28800_init(device_t *info)
|
||||
{
|
||||
uint32_t memory = 512;
|
||||
ati28800_t *ati;
|
||||
|
||||
#if 0
|
||||
if (info->type == GFX_VGAWONDERXL)
|
||||
#endif
|
||||
memory = device_get_config_int("memory");
|
||||
memory <<= 10;
|
||||
ati = malloc(sizeof(ati28800_t));
|
||||
memset(ati, 0x00, sizeof(ati28800_t));
|
||||
|
||||
switch(info->local) {
|
||||
case GFX_VGAWONDERXL:
|
||||
rom_init_interleaved(&ati->bios_rom,
|
||||
BIOS_VGAXL_EVEN_PATH,
|
||||
BIOS_VGAXL_ODD_PATH,
|
||||
0xc0000, 0x10000, 0xffff,
|
||||
0, MEM_MAPPING_EXTERNAL);
|
||||
break;
|
||||
|
||||
case GFX_VGAWONDERXL24:
|
||||
rom_init_interleaved(&ati->bios_rom,
|
||||
BIOS_XL24_EVEN_PATH,
|
||||
BIOS_XL24_ODD_PATH,
|
||||
0xc0000, 0x10000, 0xffff,
|
||||
0, MEM_MAPPING_EXTERNAL);
|
||||
break;
|
||||
|
||||
default:
|
||||
rom_init(&ati->bios_rom,
|
||||
BIOS_ROM_PATH,
|
||||
0xc0000, 0x8000, 0x7fff,
|
||||
0, MEM_MAPPING_EXTERNAL);
|
||||
break;
|
||||
}
|
||||
|
||||
svga_init(&ati->svga, ati, memory, /*512kb*/
|
||||
ati28800_recalctimings,
|
||||
ati28800_in, ati28800_out,
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
io_sethandler(0x01ce, 0x0002, ati28800_in, NULL, NULL, ati28800_out, NULL, NULL, ati28800);
|
||||
io_sethandler(0x03c0, 0x0020, ati28800_in, NULL, NULL, ati28800_out, NULL, NULL, ati28800);
|
||||
io_sethandler(0x01ce, 2,
|
||||
ati28800_in, NULL, NULL,
|
||||
ati28800_out, NULL, NULL, ati);
|
||||
io_sethandler(0x03c0, 32,
|
||||
ati28800_in, NULL, NULL,
|
||||
ati28800_out, NULL, NULL, ati);
|
||||
|
||||
ati28800->svga.miscout = 1;
|
||||
ati->svga.miscout = 1;
|
||||
|
||||
ati_eeprom_load(&ati28800->eeprom, L"ati28800.nvr", 0);
|
||||
ati_eeprom_load(&ati->eeprom, L"ati28800.nvr", 0);
|
||||
|
||||
return ati28800;
|
||||
return(ati);
|
||||
}
|
||||
|
||||
static int ati28800_available(void)
|
||||
|
||||
static int
|
||||
ati28800_available(void)
|
||||
{
|
||||
return rom_present(L"roms/video/ati28800/bios.bin");
|
||||
return(rom_present(BIOS_ROM_PATH));
|
||||
}
|
||||
|
||||
static int compaq_ati28800_available(void)
|
||||
|
||||
static int
|
||||
compaq_ati28800_available(void)
|
||||
{
|
||||
return (rom_present(L"roms/video/ati28800/XLEVEN.bin") && rom_present(L"roms/video/ati28800/XLODD.bin"));
|
||||
return((rom_present(BIOS_VGAXL_EVEN_PATH) && rom_present(BIOS_VGAXL_ODD_PATH)));
|
||||
}
|
||||
|
||||
static int ati28800_wonderxl24_available(void)
|
||||
|
||||
static int
|
||||
ati28800_wonderxl24_available(void)
|
||||
{
|
||||
return (rom_present(L"roms/video/ati28800/112-14318-102.bin") && rom_present(L"roms/video/ati28800/112-14319-102.bin"));
|
||||
return((rom_present(BIOS_XL24_EVEN_PATH) && rom_present(BIOS_XL24_ODD_PATH)));
|
||||
}
|
||||
|
||||
static void ati28800_close(void *p)
|
||||
|
||||
static void
|
||||
ati28800_close(void *priv)
|
||||
{
|
||||
ati28800_t *ati28800 = (ati28800_t *)p;
|
||||
ati28800_t *ati = (ati28800_t *)priv;
|
||||
|
||||
svga_close(&ati28800->svga);
|
||||
|
||||
free(ati28800);
|
||||
svga_close(&ati->svga);
|
||||
|
||||
free(ati);
|
||||
}
|
||||
|
||||
static void ati28800_speed_changed(void *p)
|
||||
|
||||
static void
|
||||
ati28800_speed_changed(void *priv)
|
||||
{
|
||||
ati28800_t *ati28800 = (ati28800_t *)p;
|
||||
|
||||
ati28800_svga_recalctimings(ati28800);
|
||||
ati28800_t *ati = (ati28800_t *)priv;
|
||||
|
||||
ati28800_svga_recalctimings(ati);
|
||||
}
|
||||
|
||||
static void ati28800_force_redraw(void *p)
|
||||
|
||||
static void
|
||||
ati28800_force_redraw(void *priv)
|
||||
{
|
||||
ati28800_t *ati28800 = (ati28800_t *)p;
|
||||
ati28800_t *ati = (ati28800_t *)priv;
|
||||
|
||||
ati28800->svga.fullchange = changeframecount;
|
||||
ati->svga.fullchange = changeframecount;
|
||||
}
|
||||
|
||||
static void ati28800_add_status_info(char *s, int max_len, void *p)
|
||||
static void ati28800_add_status_info(char *s, int max_len, void *priv)
|
||||
{
|
||||
ati28800_t *ati28800 = (ati28800_t *)p;
|
||||
|
||||
svga_add_status_info(s, max_len, &ati28800->svga);
|
||||
ati28800_t *ati = (ati28800_t *)priv;
|
||||
|
||||
svga_add_status_info(s, max_len, &ati->svga);
|
||||
}
|
||||
|
||||
|
||||
static device_config_t ati28800_config[] =
|
||||
{
|
||||
{
|
||||
@@ -509,9 +549,7 @@ device_t ati28800_device =
|
||||
"ATI-28800",
|
||||
DEVICE_ISA,
|
||||
0,
|
||||
ati28800_init,
|
||||
ati28800_close,
|
||||
NULL,
|
||||
ati28800_init, ati28800_close, NULL,
|
||||
ati28800_available,
|
||||
ati28800_speed_changed,
|
||||
ati28800_force_redraw,
|
||||
@@ -523,10 +561,8 @@ device_t compaq_ati28800_device =
|
||||
{
|
||||
"Compaq ATI-28800",
|
||||
DEVICE_ISA,
|
||||
0,
|
||||
ati28800_init,
|
||||
ati28800_close,
|
||||
NULL,
|
||||
GFX_VGAWONDERXL,
|
||||
ati28800_init, ati28800_close, NULL,
|
||||
compaq_ati28800_available,
|
||||
ati28800_speed_changed,
|
||||
ati28800_force_redraw,
|
||||
@@ -538,10 +574,8 @@ device_t ati28800_wonderxl24_device =
|
||||
{
|
||||
"ATI-28800 (VGA Wonder XL24)",
|
||||
DEVICE_ISA,
|
||||
0,
|
||||
ati28800_init,
|
||||
ati28800_close,
|
||||
NULL,
|
||||
GFX_VGAWONDERXL24,
|
||||
ati28800_init, ati28800_close, NULL,
|
||||
ati28800_wonderxl24_available,
|
||||
ati28800_speed_changed,
|
||||
ati28800_force_redraw,
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
* 7 If set can remove "snow" in some cases
|
||||
* (A860_Delay_L ?) ??
|
||||
*
|
||||
* Version: @(#)vid_ati68860.c 1.0.1 2017/10/16
|
||||
* Version: @(#)vid_ati68860.c 1.0.2 2017/10/31
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* ATi Mach64 graphics card emulation.
|
||||
*
|
||||
* Version: @(#)vid_ati_mach64.c 1.0.5 2017/10/16
|
||||
* Version: @(#)vid_ati_mach64.c 1.0.6 2017/10/31
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -40,6 +40,10 @@
|
||||
#undef CLAMP
|
||||
#endif
|
||||
|
||||
#define BIOS_ROM_PATH L"roms/video/mach64/bios.bin"
|
||||
#define BIOS_ROMVT2_PATH L"roms/video/mach64/atimach64vt2pci.bin"
|
||||
|
||||
|
||||
#define FIFO_SIZE 65536
|
||||
#define FIFO_MASK (FIFO_SIZE - 1)
|
||||
#define FIFO_ENTRY_SIZE (1 << 31)
|
||||
@@ -3358,7 +3362,7 @@ static void *mach64gx_init(device_t *info)
|
||||
|
||||
ati_eeprom_load(&mach64->eeprom, L"mach64.nvr", 1);
|
||||
|
||||
rom_init(&mach64->bios_rom, L"roms/video/mach64/bios.bin", 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
rom_init(&mach64->bios_rom, BIOS_ROM_PATH, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
|
||||
return mach64;
|
||||
}
|
||||
@@ -3376,7 +3380,7 @@ static void *mach64vt2_init(device_t *info)
|
||||
|
||||
ati_eeprom_load(&mach64->eeprom, L"mach64vt.nvr", 1);
|
||||
|
||||
rom_init(&mach64->bios_rom, L"roms/video/mach64/atimach64vt2pci.bin", 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
rom_init(&mach64->bios_rom, BIOS_ROMVT2_PATH, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
|
||||
svga->vblank_start = mach64_vblank_start;
|
||||
|
||||
@@ -3385,11 +3389,11 @@ static void *mach64vt2_init(device_t *info)
|
||||
|
||||
int mach64gx_available(void)
|
||||
{
|
||||
return rom_present(L"roms/video/mach64/bios.bin");
|
||||
return rom_present(BIOS_ROM_PATH);
|
||||
}
|
||||
int mach64vt2_available(void)
|
||||
{
|
||||
return rom_present(L"roms/video/mach64/atimach64vt2pci.bin");
|
||||
return rom_present(BIOS_ROMVT2_PATH);
|
||||
}
|
||||
|
||||
void mach64_close(void *p)
|
||||
@@ -3517,9 +3521,7 @@ device_t mach64gx_vlb_device =
|
||||
"ATI Mach64GX VLB",
|
||||
DEVICE_VLB,
|
||||
0,
|
||||
mach64gx_init,
|
||||
mach64_close,
|
||||
NULL,
|
||||
mach64gx_init, mach64_close, NULL,
|
||||
mach64gx_available,
|
||||
mach64_speed_changed,
|
||||
mach64_force_redraw,
|
||||
@@ -3532,9 +3534,7 @@ device_t mach64gx_pci_device =
|
||||
"ATI Mach64GX PCI",
|
||||
DEVICE_PCI,
|
||||
0,
|
||||
mach64gx_init,
|
||||
mach64_close,
|
||||
NULL,
|
||||
mach64gx_init, mach64_close, NULL,
|
||||
mach64gx_available,
|
||||
mach64_speed_changed,
|
||||
mach64_force_redraw,
|
||||
@@ -3547,9 +3547,7 @@ device_t mach64vt2_device =
|
||||
"ATI Mach64VT2",
|
||||
DEVICE_PCI,
|
||||
0,
|
||||
mach64vt2_init,
|
||||
mach64_close,
|
||||
NULL,
|
||||
mach64vt2_init, mach64_close, NULL,
|
||||
mach64vt2_available,
|
||||
mach64_speed_changed,
|
||||
mach64_force_redraw,
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Emulation of select Cirrus Logic cards.
|
||||
*
|
||||
* Version: @(#)vid_cl_gd.c 1.0.2 2017/10/26
|
||||
* Version: @(#)vid_cl_gd.c 1.0.3 2017/10/31
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -35,15 +35,27 @@
|
||||
#include "vid_cl_gd_blit.h"
|
||||
|
||||
|
||||
void cirrus_update_bank_ptr(clgd_t *clgd, uint8_t bank_index);
|
||||
void clgd_recalctimings(svga_t *svga);
|
||||
#define BIOS_GD5422_PATH L"roms/video/cirruslogic/cl5422.rom"
|
||||
#define BIOS_GD5429_PATH L"roms/video/cirruslogic/5429.vbi"
|
||||
#define BIOS_GD5430_PATH L"roms/video/cirruslogic/pci.bin"
|
||||
#define BIOS_GD5430VL_PATH L"roms/video/cirruslogic/diamondvlbus.bin"
|
||||
#define BIOS_GD5434_PATH L"roms/video/cirruslogic/japan.bin"
|
||||
#define BIOS_GD5436_PATH L"roms/video/cirruslogic/5436.vbi"
|
||||
#define BIOS_GD5440_PATH L"roms/video/cirruslogic/5440bios.bin"
|
||||
#define BIOS_GD5446_PATH L"roms/video/cirruslogic/5446bv.vbi"
|
||||
#define BIOS_GD6235_PATH L"roms/video/cirruslogic/vga6235.rom"
|
||||
|
||||
|
||||
void cirrus_update_bank_ptr(clgd_t *clgd, uint8_t bank_index);
|
||||
void clgd_recalctimings(svga_t *svga);
|
||||
|
||||
void svga_write_cirrus(uint32_t addr, uint8_t val, void *p);
|
||||
void svga_write_cirrus_linear(uint32_t addr, uint8_t val, void *p);
|
||||
void svga_write_cirrus_linear_bitblt(uint32_t addr, uint8_t val, void *p);
|
||||
uint8_t svga_read_cirrus(uint32_t addr, void *p);
|
||||
uint8_t svga_read_cirrus_linear(uint32_t addr, void *p);
|
||||
uint8_t svga_read_cirrus_linear_bitblt(uint32_t addr, void *p);
|
||||
|
||||
void svga_write_cirrus(uint32_t addr, uint8_t val, void *p);
|
||||
void svga_write_cirrus_linear(uint32_t addr, uint8_t val, void *p);
|
||||
void svga_write_cirrus_linear_bitblt(uint32_t addr, uint8_t val, void *p);
|
||||
uint8_t svga_read_cirrus(uint32_t addr, void *p);
|
||||
uint8_t svga_read_cirrus_linear(uint32_t addr, void *p);
|
||||
uint8_t svga_read_cirrus_linear_bitblt(uint32_t addr, void *p);
|
||||
|
||||
void clgd_out(uint16_t addr, uint8_t val, void *p)
|
||||
{
|
||||
@@ -425,7 +437,7 @@ void clgd_recalctimings(svga_t *svga)
|
||||
// pclog("MA now %05X %02X\n", svga->ma_latch, svga->crtc[0x1b]);
|
||||
}
|
||||
|
||||
void clgd_hwcursor_draw(svga_t *svga, int displine)
|
||||
static void clgd_hwcursor_draw(svga_t *svga, int displine)
|
||||
{
|
||||
int x;
|
||||
uint8_t dat[2];
|
||||
@@ -519,7 +531,7 @@ generic_io:
|
||||
}
|
||||
}
|
||||
|
||||
void svga_write_mode45_8bpp(clgd_t *clgd, uint8_t mode, uint32_t offset, uint8_t mem_value)
|
||||
static void svga_write_mode45_8bpp(clgd_t *clgd, uint8_t mode, uint32_t offset, uint8_t mem_value)
|
||||
{
|
||||
int x;
|
||||
uint8_t val = mem_value;
|
||||
@@ -550,7 +562,7 @@ void svga_write_mode45_8bpp(clgd_t *clgd, uint8_t mode, uint32_t offset, uint8_t
|
||||
}
|
||||
}
|
||||
|
||||
void svga_write_mode45_16bpp(clgd_t *clgd, unsigned mode, unsigned offset, uint32_t mem_value)
|
||||
static void svga_write_mode45_16bpp(clgd_t *clgd, unsigned mode, unsigned offset, uint32_t mem_value)
|
||||
{
|
||||
int x;
|
||||
unsigned val = mem_value;
|
||||
@@ -583,7 +595,7 @@ void svga_write_mode45_16bpp(clgd_t *clgd, unsigned mode, unsigned offset, uint3
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t cirrus_mmio_blt_read(uint32_t address, void *p)
|
||||
static uint8_t cirrus_mmio_blt_read(uint32_t address, void *p)
|
||||
{
|
||||
clgd_t *clgd = (clgd_t *)p;
|
||||
svga_t *svga = &clgd->svga;
|
||||
@@ -689,7 +701,7 @@ uint8_t cirrus_mmio_blt_read(uint32_t address, void *p)
|
||||
return value;
|
||||
}
|
||||
|
||||
void cirrus_mmio_blt_write(uint32_t address, uint8_t value, void *p)
|
||||
static void cirrus_mmio_blt_write(uint32_t address, uint8_t value, void *p)
|
||||
{
|
||||
clgd_t *clgd = (clgd_t *)p;
|
||||
svga_t *svga = &clgd->svga;
|
||||
@@ -839,207 +851,220 @@ uint8_t cirrus_read(uint32_t addr, void *p)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void *clgd_common_init(wchar_t *romfn, uint8_t id)
|
||||
|
||||
static void *clgd_init(device_t *info)
|
||||
{
|
||||
clgd = malloc(sizeof(clgd_t));
|
||||
svga_t *svga = &clgd->svga;
|
||||
memset(clgd, 0, sizeof(clgd_t));
|
||||
wchar_t *romfn = NULL;
|
||||
int id = info->local;
|
||||
|
||||
memset(clgd, 0x00, sizeof(clgd_t));
|
||||
|
||||
switch(id) {
|
||||
case CIRRUS_ID_CLGD5422:
|
||||
romfn = BIOS_GD5422_PATH;
|
||||
break;
|
||||
|
||||
case CIRRUS_ID_CLGD5429:
|
||||
romfn = BIOS_GD5429_PATH;
|
||||
break;
|
||||
|
||||
case CIRRUS_ID_CLGD5430:
|
||||
romfn = BIOS_GD5430_PATH;
|
||||
break;
|
||||
|
||||
case CIRRUS_ID_CLGD5430VL:
|
||||
romfn = BIOS_GD5430VL_PATH;
|
||||
id = CIRRUS_ID_CLGD5430;
|
||||
break;
|
||||
|
||||
case CIRRUS_ID_CLGD5434:
|
||||
romfn = BIOS_GD5434_PATH;
|
||||
break;
|
||||
|
||||
case CIRRUS_ID_CLGD5436:
|
||||
romfn = BIOS_GD5436_PATH;
|
||||
break;
|
||||
|
||||
case CIRRUS_ID_CLGD5440:
|
||||
romfn = BIOS_GD5440_PATH;
|
||||
break;
|
||||
|
||||
case CIRRUS_ID_CLGD5446:
|
||||
romfn = BIOS_GD5446_PATH;
|
||||
break;
|
||||
|
||||
case CIRRUS_ID_CLGD6235:
|
||||
romfn = BIOS_GD6235_PATH;
|
||||
break;
|
||||
}
|
||||
|
||||
rom_init(&clgd->bios_rom, romfn,
|
||||
0xc0000, 0x8000, 0x7fff,
|
||||
0, MEM_MAPPING_EXTERNAL);
|
||||
|
||||
rom_init(&clgd->bios_rom, romfn, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
|
||||
svga_init(&clgd->svga, clgd, 1 << 21, /*2mb*/
|
||||
clgd_recalctimings,
|
||||
clgd_in, clgd_out,
|
||||
clgd_hwcursor_draw,
|
||||
NULL);
|
||||
clgd_recalctimings,
|
||||
clgd_in, clgd_out,
|
||||
clgd_hwcursor_draw,
|
||||
NULL);
|
||||
|
||||
mem_mapping_set_handler(&svga->mapping, cirrus_read, NULL, NULL, cirrus_write, NULL, NULL);
|
||||
mem_mapping_set_handler(&svga->mapping,
|
||||
cirrus_read, NULL, NULL,
|
||||
cirrus_write, NULL, NULL);
|
||||
mem_mapping_set_p(&svga->mapping, clgd);
|
||||
|
||||
mem_mapping_add(&clgd->mmio_mapping, 0, 0, cirrus_mmio_blt_read, NULL, NULL, cirrus_mmio_blt_write, NULL, NULL, NULL, 0, clgd);
|
||||
mem_mapping_add(&clgd->mmio_mapping, 0, 0,
|
||||
cirrus_mmio_blt_read, NULL, NULL,
|
||||
cirrus_mmio_blt_write, NULL, NULL, NULL, 0, clgd);
|
||||
|
||||
io_sethandler(0x03c0, 0x0020, clgd_in, NULL, NULL, clgd_out, NULL, NULL, clgd);
|
||||
|
||||
if (id < CIRRUS_ID_CLGD5428)
|
||||
{
|
||||
/* 1 MB */
|
||||
clgd->vram_size = (1 << 20);
|
||||
clgd->vram_code = 2;
|
||||
io_sethandler(0x03c0, 32,
|
||||
clgd_in, NULL, NULL,
|
||||
clgd_out, NULL, NULL, clgd);
|
||||
|
||||
svga->seqregs[0xf] = 0x18;
|
||||
svga->seqregs[0x1f] = 0x22;
|
||||
}
|
||||
else if ((id >= CIRRUS_ID_CLGD5428) && (id <= CIRRUS_ID_CLGD5430))
|
||||
{
|
||||
/* 2 MB */
|
||||
clgd->vram_size = (1 << 21);
|
||||
clgd->vram_code = 3;
|
||||
if (id < CIRRUS_ID_CLGD5428) {
|
||||
/* 1 MB */
|
||||
clgd->vram_size = (1 << 20);
|
||||
clgd->vram_code = 2;
|
||||
|
||||
svga->seqregs[0xf] = 0x18;
|
||||
svga->seqregs[0x1f] = 0x22;
|
||||
}
|
||||
else if (id >= CIRRUS_ID_CLGD5434)
|
||||
{
|
||||
/* 4 MB */
|
||||
clgd->vram_size = (1 << 22);
|
||||
clgd->vram_code = 4;
|
||||
svga->seqregs[0xf] = 0x18;
|
||||
svga->seqregs[0x1f] = 0x22;
|
||||
} else if ((id >= CIRRUS_ID_CLGD5428) && (id <= CIRRUS_ID_CLGD5430)) {
|
||||
/* 2 MB */
|
||||
clgd->vram_size = (1 << 21);
|
||||
clgd->vram_code = 3;
|
||||
|
||||
svga->seqregs[0xf] = 0x98;
|
||||
svga->seqregs[0x1f] = 0x2d;
|
||||
svga->seqregs[0x17] = 0x20;
|
||||
svga->gdcreg[0x18] = 0xf;
|
||||
}
|
||||
svga->seqregs[0xf] = 0x18;
|
||||
svga->seqregs[0x1f] = 0x22;
|
||||
} else if (id >= CIRRUS_ID_CLGD5434) {
|
||||
/* 4 MB */
|
||||
clgd->vram_size = (1 << 22);
|
||||
clgd->vram_code = 4;
|
||||
|
||||
// Seems the 5436 and 5446 BIOS'es never turn on that bit until it's actually needed,
|
||||
// therefore they also don't turn it back off on 640x480x4bpp,
|
||||
// therefore, we need to make sure the VRAM mask is correct at start.
|
||||
svga->vram_display_mask = (svga->crtc[0x1b] & 2) ? (clgd->vram_size - 1) : 0x3ffff;
|
||||
clgd->linear_mmio_mask = (svga->crtc[0x1b] & 2) ? (clgd->vram_size - 256) : (0x40000 - 256);
|
||||
svga->seqregs[0xf] = 0x98;
|
||||
svga->seqregs[0x1f] = 0x2d;
|
||||
svga->seqregs[0x17] = 0x20;
|
||||
svga->gdcreg[0x18] = 0xf;
|
||||
}
|
||||
|
||||
svga->seqregs[0x15] = clgd->vram_code;
|
||||
if ((id >= CIRRUS_ID_CLGD5422) && (id <= CIRRUS_ID_CLGD5429)) svga->seqregs[0xa] = (clgd->vram_code << 3);
|
||||
// Seems the 5436 and 5446 BIOS'es never turn on that bit until it's actually needed,
|
||||
// therefore they also don't turn it back off on 640x480x4bpp,
|
||||
// therefore, we need to make sure the VRAM mask is correct at start.
|
||||
svga->vram_display_mask = (svga->crtc[0x1b] & 2) ? (clgd->vram_size - 1) : 0x3ffff;
|
||||
clgd->linear_mmio_mask = (svga->crtc[0x1b] & 2) ? (clgd->vram_size - 256) : (0x40000 - 256);
|
||||
|
||||
svga->crtc[0x27] = id;
|
||||
svga->seqregs[0x15] = clgd->vram_code;
|
||||
if ((id >= CIRRUS_ID_CLGD5422) && (id <= CIRRUS_ID_CLGD5429))
|
||||
svga->seqregs[0xa] = (clgd->vram_code << 3);
|
||||
|
||||
// clgd_recalc_mapping(clgd);
|
||||
/* force refresh */
|
||||
// cirrus_update_bank_ptr(s, 0);
|
||||
// cirrus_update_bank_ptr(s, 1);
|
||||
svga->crtc[0x27] = id;
|
||||
|
||||
init_rops();
|
||||
// clgd_recalc_mapping(clgd);
|
||||
/* force refresh */
|
||||
// cirrus_update_bank_ptr(s, 0);
|
||||
// cirrus_update_bank_ptr(s, 1);
|
||||
|
||||
init_rops();
|
||||
|
||||
return clgd;
|
||||
}
|
||||
|
||||
|
||||
void *gd6235_init(device_t *info)
|
||||
{
|
||||
return clgd_common_init(L"roms/video/cirruslogic/vga6235.rom", CIRRUS_ID_CLGD6235);
|
||||
}
|
||||
|
||||
void *gd5422_init(device_t *info)
|
||||
{
|
||||
return clgd_common_init(L"roms/video/cirruslogic/CL5422.ROM", CIRRUS_ID_CLGD5422);
|
||||
}
|
||||
|
||||
void *gd5429_init(device_t *info)
|
||||
{
|
||||
return clgd_common_init(L"roms/video/cirruslogic/5429.vbi", CIRRUS_ID_CLGD5429);
|
||||
}
|
||||
|
||||
void *gd5430_init(device_t *info)
|
||||
{
|
||||
return clgd_common_init(L"roms/video/cirruslogic/pci.BIN", CIRRUS_ID_CLGD5430);
|
||||
}
|
||||
|
||||
void *dia5430_init(device_t *info)
|
||||
{
|
||||
return clgd_common_init(L"roms/video/cirruslogic/diamondvlbus.BIN", CIRRUS_ID_CLGD5430);
|
||||
}
|
||||
|
||||
void *gd5434_init(device_t *info)
|
||||
{
|
||||
return clgd_common_init(L"roms/video/cirruslogic/japan.BIN", CIRRUS_ID_CLGD5434);
|
||||
}
|
||||
|
||||
void *gd5436_init(device_t *info)
|
||||
{
|
||||
return clgd_common_init(L"roms/video/cirruslogic/5436.VBI", CIRRUS_ID_CLGD5436);
|
||||
}
|
||||
|
||||
void *gd5440_init(device_t *info)
|
||||
{
|
||||
return clgd_common_init(L"roms/video/cirruslogic/5440BIOS.BIN", CIRRUS_ID_CLGD5440);
|
||||
}
|
||||
|
||||
void *gd5446_init(device_t *info)
|
||||
{
|
||||
return clgd_common_init(L"roms/video/cirruslogic/5446BV.VBI", CIRRUS_ID_CLGD5446);
|
||||
}
|
||||
|
||||
static int gd5422_available(void)
|
||||
{
|
||||
return rom_present(L"roms/video/cirruslogic/CL5422.ROM");
|
||||
}
|
||||
|
||||
static int gd5429_available(void)
|
||||
{
|
||||
return rom_present(L"roms/video/cirruslogic/5429.vbi");
|
||||
}
|
||||
|
||||
static int gd5430_available(void)
|
||||
{
|
||||
return rom_present(L"roms/video/cirruslogic/pci.BIN");
|
||||
}
|
||||
|
||||
static int dia5430_available(void)
|
||||
{
|
||||
return rom_present(L"roms/video/cirruslogic/diamondvlbus.BIN");
|
||||
}
|
||||
|
||||
static int gd5434_available(void)
|
||||
{
|
||||
return rom_present(L"roms/video/cirruslogic/japan.BIN");
|
||||
}
|
||||
|
||||
static int gd5436_available(void)
|
||||
{
|
||||
return rom_present(L"roms/video/cirruslogic/5436.VBI");
|
||||
}
|
||||
|
||||
static int gd5440_available(void)
|
||||
{
|
||||
return rom_present(L"roms/video/cirruslogic/5440BIOS.BIN");
|
||||
}
|
||||
|
||||
static int gd5446_available(void)
|
||||
{
|
||||
return rom_present(L"roms/video/cirruslogic/5446BV.VBI");
|
||||
}
|
||||
|
||||
static int gd6235_available(void)
|
||||
{
|
||||
return rom_present(L"roms/video/cirruslogic/vga6235.rom");
|
||||
}
|
||||
|
||||
void clgd_close(void *p)
|
||||
static void clgd_close(void *p)
|
||||
{
|
||||
clgd_t *clgd = (clgd_t *)p;
|
||||
|
||||
svga_close(&clgd->svga);
|
||||
|
||||
|
||||
free(clgd);
|
||||
}
|
||||
|
||||
void clgd_speed_changed(void *p)
|
||||
|
||||
static void clgd_speed_changed(void *p)
|
||||
{
|
||||
clgd_t *clgd = (clgd_t *)p;
|
||||
|
||||
|
||||
svga_recalctimings(&clgd->svga);
|
||||
}
|
||||
|
||||
void clgd_force_redraw(void *p)
|
||||
|
||||
static void clgd_force_redraw(void *p)
|
||||
{
|
||||
clgd_t *clgd = (clgd_t *)p;
|
||||
|
||||
clgd->svga.fullchange = changeframecount;
|
||||
}
|
||||
|
||||
void clgd_add_status_info(char *s, int max_len, void *p)
|
||||
|
||||
static void clgd_add_status_info(char *s, int max_len, void *p)
|
||||
{
|
||||
clgd_t *clgd = (clgd_t *)p;
|
||||
|
||||
|
||||
svga_add_status_info(s, max_len, &clgd->svga);
|
||||
}
|
||||
|
||||
|
||||
static int gd5422_available(void)
|
||||
{
|
||||
return rom_present(BIOS_GD5422_PATH);
|
||||
}
|
||||
|
||||
|
||||
static int gd5429_available(void)
|
||||
{
|
||||
return rom_present(BIOS_GD5429_PATH);
|
||||
}
|
||||
|
||||
|
||||
static int gd5430_available(void)
|
||||
{
|
||||
return rom_present(BIOS_GD5430_PATH);
|
||||
}
|
||||
|
||||
|
||||
static int dia5430_available(void)
|
||||
{
|
||||
return rom_present(BIOS_GD5430VL_PATH);
|
||||
}
|
||||
|
||||
|
||||
static int gd5434_available(void)
|
||||
{
|
||||
return rom_present(BIOS_GD5434_PATH);
|
||||
}
|
||||
|
||||
|
||||
static int gd5436_available(void)
|
||||
{
|
||||
return rom_present(BIOS_GD5436_PATH);
|
||||
}
|
||||
|
||||
|
||||
static int gd5440_available(void)
|
||||
{
|
||||
return rom_present(BIOS_GD5440_PATH);
|
||||
}
|
||||
|
||||
|
||||
static int gd5446_available(void)
|
||||
{
|
||||
return rom_present(BIOS_GD5446_PATH);
|
||||
}
|
||||
|
||||
|
||||
static int gd6235_available(void)
|
||||
{
|
||||
return rom_present(BIOS_GD6235_PATH);
|
||||
}
|
||||
|
||||
|
||||
device_t gd5422_device =
|
||||
{
|
||||
"Cirrus Logic GD5422",
|
||||
DEVICE_ISA | DEVICE_NOT_WORKING,
|
||||
0,
|
||||
gd5422_init,
|
||||
clgd_close,
|
||||
NULL,
|
||||
CIRRUS_ID_CLGD5422,
|
||||
clgd_init, clgd_close, NULL,
|
||||
gd5422_available,
|
||||
clgd_speed_changed,
|
||||
clgd_force_redraw,
|
||||
@@ -1051,10 +1076,8 @@ device_t gd5429_device =
|
||||
{
|
||||
"Cirrus Logic GD5429",
|
||||
DEVICE_VLB | DEVICE_NOT_WORKING,
|
||||
0,
|
||||
gd5429_init,
|
||||
clgd_close,
|
||||
NULL,
|
||||
CIRRUS_ID_CLGD5429,
|
||||
clgd_init, clgd_close, NULL,
|
||||
gd5429_available,
|
||||
clgd_speed_changed,
|
||||
clgd_force_redraw,
|
||||
@@ -1066,10 +1089,8 @@ device_t gd5430_device =
|
||||
{
|
||||
"Cirrus Logic GD5430",
|
||||
DEVICE_ISA | DEVICE_NOT_WORKING,
|
||||
0,
|
||||
gd5430_init,
|
||||
clgd_close,
|
||||
NULL,
|
||||
CIRRUS_ID_CLGD5430,
|
||||
clgd_init, clgd_close, NULL,
|
||||
gd5430_available,
|
||||
clgd_speed_changed,
|
||||
clgd_force_redraw,
|
||||
@@ -1079,12 +1100,10 @@ device_t gd5430_device =
|
||||
|
||||
device_t dia5430_device =
|
||||
{
|
||||
"Diamond CL-GD5430",
|
||||
DEVICE_ISA | DEVICE_NOT_WORKING,
|
||||
0,
|
||||
dia5430_init,
|
||||
clgd_close,
|
||||
NULL,
|
||||
"Diamond CL-GD5430 VLB",
|
||||
DEVICE_VLB | DEVICE_NOT_WORKING,
|
||||
CIRRUS_ID_CLGD5430VL,
|
||||
clgd_init, clgd_close, NULL,
|
||||
dia5430_available,
|
||||
clgd_speed_changed,
|
||||
clgd_force_redraw,
|
||||
@@ -1096,10 +1115,8 @@ device_t gd5434_device =
|
||||
{
|
||||
"Cirrus Logic GD5434",
|
||||
DEVICE_ISA | DEVICE_NOT_WORKING,
|
||||
0,
|
||||
gd5434_init,
|
||||
clgd_close,
|
||||
NULL,
|
||||
CIRRUS_ID_CLGD5434,
|
||||
clgd_init, clgd_close, NULL,
|
||||
gd5434_available,
|
||||
clgd_speed_changed,
|
||||
clgd_force_redraw,
|
||||
@@ -1111,10 +1128,8 @@ device_t gd5436_device =
|
||||
{
|
||||
"Cirrus Logic GD5436",
|
||||
DEVICE_ISA | DEVICE_NOT_WORKING,
|
||||
0,
|
||||
gd5436_init,
|
||||
clgd_close,
|
||||
NULL,
|
||||
CIRRUS_ID_CLGD5436,
|
||||
clgd_init, clgd_close, NULL,
|
||||
gd5436_available,
|
||||
clgd_speed_changed,
|
||||
clgd_force_redraw,
|
||||
@@ -1126,10 +1141,8 @@ device_t gd5440_device =
|
||||
{
|
||||
"Cirrus Logic GD5440",
|
||||
DEVICE_ISA | DEVICE_NOT_WORKING,
|
||||
0,
|
||||
gd5440_init,
|
||||
clgd_close,
|
||||
NULL,
|
||||
CIRRUS_ID_CLGD5440,
|
||||
clgd_init, clgd_close, NULL,
|
||||
gd5440_available,
|
||||
clgd_speed_changed,
|
||||
clgd_force_redraw,
|
||||
@@ -1141,10 +1154,8 @@ device_t gd5446_device =
|
||||
{
|
||||
"Cirrus Logic GD5446",
|
||||
DEVICE_VLB | DEVICE_NOT_WORKING,
|
||||
0,
|
||||
gd5446_init,
|
||||
clgd_close,
|
||||
NULL,
|
||||
CIRRUS_ID_CLGD5446,
|
||||
clgd_init, clgd_close, NULL,
|
||||
gd5446_available,
|
||||
clgd_speed_changed,
|
||||
clgd_force_redraw,
|
||||
@@ -1156,10 +1167,8 @@ device_t gd6235_device =
|
||||
{
|
||||
"Cirrus Logic GD6235",
|
||||
DEVICE_ISA | DEVICE_NOT_WORKING,
|
||||
0,
|
||||
gd6235_init,
|
||||
clgd_close,
|
||||
NULL,
|
||||
CIRRUS_ID_CLGD6235,
|
||||
clgd_init, clgd_close, NULL,
|
||||
gd6235_available,
|
||||
clgd_speed_changed,
|
||||
clgd_force_redraw,
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#define CIRRUS_ID_CLGD5428 (0x26<<2)
|
||||
#define CIRRUS_ID_CLGD5429 (0x27<<2)
|
||||
#define CIRRUS_ID_CLGD5430 (0x28<<2)
|
||||
#define CIRRUS_ID_CLGD5430VL (0x28<<2)+10000 /* gets fixed in code */
|
||||
#define CIRRUS_ID_CLGD5432 0xA2
|
||||
#define CIRRUS_ID_CLGD5434O (0x29<<2) /* O = obsolete, never used? */
|
||||
#define CIRRUS_ID_CLGD5434 (0x2A<<2)
|
||||
@@ -216,4 +217,4 @@ void clgd_recalctimings(svga_t *svga);
|
||||
void cirrus_update_memory_access(clgd_t *clgd);
|
||||
|
||||
void cirrus_write(uint32_t addr, uint8_t val, void *p);
|
||||
uint8_t cirrus_read(uint32_t addr, void *p);
|
||||
uint8_t cirrus_read(uint32_t addr, void *p);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* Emulation of the EGA, Chips & Technologies SuperEGA, and
|
||||
* AX JEGA graphics cards.
|
||||
*
|
||||
* Version: @(#)vid_ega.c 1.0.8 2017/10/18
|
||||
* Version: @(#)vid_ega.c 1.0.9 2017/10/31
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -35,6 +35,11 @@
|
||||
#include "vid_ega_render.h"
|
||||
|
||||
|
||||
#define BIOS_IBM_PATH L"roms/video/ega/ibm_6277356_ega_card_u44_27128.bin"
|
||||
#define BIOS_CPQ_PATH L"roms/video/ega/108281-001.bin"
|
||||
#define BIOS_SEGA_PATH L"roms/video/ega/lega.vbi"
|
||||
|
||||
|
||||
extern uint8_t edatlookup[4][4];
|
||||
|
||||
static uint8_t ega_rotate[8][256];
|
||||
@@ -152,6 +157,7 @@ void ega_jega_read_font(ega_t *ega)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void ega_out(uint16_t addr, uint8_t val, void *p)
|
||||
{
|
||||
ega_t *ega = (ega_t *)p;
|
||||
@@ -351,7 +357,7 @@ void ega_out(uint16_t addr, uint8_t val, void *p)
|
||||
*
|
||||
* Note by Tohka: Code from PCE.
|
||||
*/
|
||||
static uint8_t ega_get_input_status_0(ega_t *ega)
|
||||
uint8_t ega_get_input_status_0(ega_t *ega)
|
||||
{
|
||||
unsigned bit;
|
||||
uint8_t status0 = 0;
|
||||
@@ -368,6 +374,7 @@ static uint8_t ega_get_input_status_0(ega_t *ega)
|
||||
return status0;
|
||||
}
|
||||
|
||||
|
||||
uint8_t ega_in(uint16_t addr, void *p)
|
||||
{
|
||||
ega_t *ega = (ega_t *)p;
|
||||
@@ -460,6 +467,7 @@ uint8_t ega_in(uint16_t addr, void *p)
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
|
||||
void ega_recalctimings(ega_t *ega)
|
||||
{
|
||||
double _dispontime, _dispofftime, disptime;
|
||||
@@ -517,6 +525,7 @@ void ega_recalctimings(ega_t *ega)
|
||||
ega->dispofftime = (int64_t)(_dispofftime * (1LL << TIMER_SHIFT));
|
||||
}
|
||||
|
||||
|
||||
void ega_poll(void *p)
|
||||
{
|
||||
ega_t *ega = (ega_t *)p;
|
||||
@@ -935,6 +944,7 @@ void ega_write(uint32_t addr, uint8_t val, void *p)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
uint8_t ega_read(uint32_t addr, void *p)
|
||||
{
|
||||
ega_t *ega = (ega_t *)p;
|
||||
@@ -984,6 +994,7 @@ uint8_t ega_read(uint32_t addr, void *p)
|
||||
return ega->vram[addr | readplane];
|
||||
}
|
||||
|
||||
|
||||
void ega_init(ega_t *ega)
|
||||
{
|
||||
int c, d, e;
|
||||
@@ -1030,7 +1041,8 @@ void ega_init(ega_t *ega)
|
||||
old_overscan_color = 0;
|
||||
}
|
||||
|
||||
void ega_common_defaults(ega_t *ega)
|
||||
|
||||
static void ega_common_defaults(ega_t *ega)
|
||||
{
|
||||
ega->miscout |= 0x22;
|
||||
ega->enablevram = 1;
|
||||
@@ -1046,15 +1058,17 @@ void ega_common_defaults(ega_t *ega)
|
||||
#endif
|
||||
}
|
||||
|
||||
void *ega_standalone_init()
|
||||
|
||||
static void *ega_standalone_init(device_t *info)
|
||||
{
|
||||
ega_t *ega = malloc(sizeof(ega_t));
|
||||
memset(ega, 0, sizeof(ega_t));
|
||||
|
||||
|
||||
overscan_x = 16;
|
||||
overscan_y = 28;
|
||||
|
||||
rom_init(&ega->bios_rom, L"roms/video/ega/ibm_6277356_ega_card_u44_27128.bin", 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
rom_init(&ega->bios_rom, BIOS_IBM_PATH,
|
||||
0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
|
||||
if (ega->bios_rom.rom[0x3ffe] == 0xaa && ega->bios_rom.rom[0x3fff] == 0x55)
|
||||
{
|
||||
@@ -1087,7 +1101,8 @@ void *ega_standalone_init()
|
||||
return ega;
|
||||
}
|
||||
|
||||
void *cpqega_standalone_init()
|
||||
|
||||
static void *cpqega_standalone_init(device_t *info)
|
||||
{
|
||||
ega_t *ega = malloc(sizeof(ega_t));
|
||||
memset(ega, 0, sizeof(ega_t));
|
||||
@@ -1095,7 +1110,8 @@ void *cpqega_standalone_init()
|
||||
overscan_x = 16;
|
||||
overscan_y = 28;
|
||||
|
||||
rom_init(&ega->bios_rom, L"roms/video/ega/108281-001.bin", 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
rom_init(&ega->bios_rom, BIOS_CPQ_PATH,
|
||||
0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
|
||||
if (ega->bios_rom.rom[0x3ffe] == 0xaa && ega->bios_rom.rom[0x3fff] == 0x55)
|
||||
{
|
||||
@@ -1126,15 +1142,17 @@ void *cpqega_standalone_init()
|
||||
return ega;
|
||||
}
|
||||
|
||||
void *sega_standalone_init(device_t *info)
|
||||
|
||||
static void *sega_standalone_init(device_t *info)
|
||||
{
|
||||
ega_t *ega = malloc(sizeof(ega_t));
|
||||
memset(ega, 0, sizeof(ega_t));
|
||||
|
||||
|
||||
overscan_x = 16;
|
||||
overscan_y = 28;
|
||||
|
||||
rom_init(&ega->bios_rom, L"roms/video/ega/lega.vbi", 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
rom_init(&ega->bios_rom, BIOS_SEGA_PATH,
|
||||
0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
|
||||
if (ega->bios_rom.rom[0x3ffe] == 0xaa && ega->bios_rom.rom[0x3fff] == 0x55)
|
||||
{
|
||||
@@ -1262,7 +1280,7 @@ static void LoadFontxFile(wchar_t *fname)
|
||||
|
||||
void *jega_standalone_init(device_t *info)
|
||||
{
|
||||
ega_t *ega = (ega_t *) sega_standalone_init();
|
||||
ega_t *ega = (ega_t *)sega_standalone_init(info);
|
||||
|
||||
LoadFontxFile(L"roms/video/ega/JPNHN19X.FNT");
|
||||
LoadFontxFile(L"roms/video/ega/JPNZN16X.FNT");
|
||||
@@ -1273,22 +1291,26 @@ void *jega_standalone_init(device_t *info)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static int ega_standalone_available(void)
|
||||
{
|
||||
return rom_present(L"roms/video/ega/ibm_6277356_ega_card_u44_27128.bin");
|
||||
return rom_present(BIOS_IBM_PATH);
|
||||
}
|
||||
|
||||
|
||||
static int cpqega_standalone_available(void)
|
||||
{
|
||||
return rom_present(L"roms/video/ega/108281-001.bin");
|
||||
return rom_present(BIOS_CPQ_PATH);
|
||||
}
|
||||
|
||||
|
||||
static int sega_standalone_available(void)
|
||||
{
|
||||
return rom_present(L"roms/video/ega/lega.vbi");
|
||||
return rom_present(BIOS_SEGA_PATH);
|
||||
}
|
||||
|
||||
void ega_close(void *p)
|
||||
|
||||
static void ega_close(void *p)
|
||||
{
|
||||
ega_t *ega = (ega_t *)p;
|
||||
|
||||
@@ -1296,13 +1318,15 @@ void ega_close(void *p)
|
||||
free(ega);
|
||||
}
|
||||
|
||||
void ega_speed_changed(void *p)
|
||||
|
||||
static void ega_speed_changed(void *p)
|
||||
{
|
||||
ega_t *ega = (ega_t *)p;
|
||||
|
||||
ega_recalctimings(ega);
|
||||
}
|
||||
|
||||
|
||||
static device_config_t ega_config[] =
|
||||
{
|
||||
{
|
||||
@@ -1327,14 +1351,13 @@ static device_config_t ega_config[] =
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
device_t ega_device =
|
||||
{
|
||||
"EGA",
|
||||
DEVICE_ISA,
|
||||
0,
|
||||
ega_standalone_init,
|
||||
ega_close,
|
||||
NULL,
|
||||
ega_standalone_init, ega_close, NULL,
|
||||
ega_standalone_available,
|
||||
ega_speed_changed,
|
||||
NULL,
|
||||
@@ -1347,9 +1370,7 @@ device_t cpqega_device =
|
||||
"Compaq EGA",
|
||||
DEVICE_ISA,
|
||||
0,
|
||||
cpqega_standalone_init,
|
||||
ega_close,
|
||||
NULL,
|
||||
cpqega_standalone_init, ega_close, NULL,
|
||||
cpqega_standalone_available,
|
||||
ega_speed_changed,
|
||||
NULL,
|
||||
@@ -1362,9 +1383,7 @@ device_t sega_device =
|
||||
"SuperEGA",
|
||||
DEVICE_ISA,
|
||||
0,
|
||||
sega_standalone_init,
|
||||
ega_close,
|
||||
NULL,
|
||||
sega_standalone_init, ega_close, NULL,
|
||||
sega_standalone_available,
|
||||
ega_speed_changed,
|
||||
NULL,
|
||||
@@ -1378,9 +1397,7 @@ device_t jega_device =
|
||||
"AX JEGA",
|
||||
DEVICE_ISA,
|
||||
0,
|
||||
jega_standalone_init,
|
||||
ega_close,
|
||||
NULL,
|
||||
jega_standalone_init, ega_close, NULL,
|
||||
sega_standalone_available,
|
||||
ega_speed_changed,
|
||||
NULL,
|
||||
|
||||
@@ -9,17 +9,17 @@
|
||||
* Emulation of the EGA, Chips & Technologies SuperEGA, and
|
||||
* AX JEGA graphics cards.
|
||||
*
|
||||
* Version: @(#)vid_ega.h 1.0.1 2017/06/05
|
||||
* Version: @(#)vid_ega.h 1.0.2 2017/10/31
|
||||
*
|
||||
* Author: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* akm,
|
||||
*
|
||||
* Copyright 2008-2017 Sarah Walker.
|
||||
* Copyright 2016-2017 Miran Grca.
|
||||
* Copyright 2017-2017 akm.
|
||||
* Copyright 2016,2017 Miran Grca.
|
||||
* Copyright 2017 akm.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct ega_t
|
||||
{
|
||||
@@ -102,7 +102,6 @@ typedef struct ega_t
|
||||
|
||||
extern int update_overscan;
|
||||
|
||||
void *ega_standalone_init();
|
||||
void ega_out(uint16_t addr, uint8_t val, void *p);
|
||||
uint8_t ega_in(uint16_t addr, void *p);
|
||||
void ega_poll(void *p);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Emulation of the Tseng Labs ET4000.
|
||||
*
|
||||
* Version: @(#)vid_et4000.c 1.0.1 2017/10/16
|
||||
* Version: @(#)vid_et4000.c 1.0.2 2017/10/31
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -33,6 +33,9 @@
|
||||
#include "vid_et4000.h"
|
||||
|
||||
|
||||
#define BIOS_ROM_PATH L"roms/video/et4000/et4000.bin"
|
||||
|
||||
|
||||
typedef struct et4000_t
|
||||
{
|
||||
svga_t svga;
|
||||
@@ -163,7 +166,7 @@ void *et4000_init(device_t *info)
|
||||
et4000_t *et4000 = malloc(sizeof(et4000_t));
|
||||
memset(et4000, 0, sizeof(et4000_t));
|
||||
|
||||
rom_init(&et4000->bios_rom, L"roms/video/et4000/et4000.BIN", 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
rom_init(&et4000->bios_rom, BIOS_ROM_PATH, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
|
||||
io_sethandler(0x03c0, 0x0020, et4000_in, NULL, NULL, et4000_out, NULL, NULL, et4000);
|
||||
|
||||
@@ -178,7 +181,7 @@ void *et4000_init(device_t *info)
|
||||
|
||||
static int et4000_available(void)
|
||||
{
|
||||
return rom_present(L"roms/video/et4000/et4000.BIN");
|
||||
return rom_present(BIOS_ROM_PATH);
|
||||
}
|
||||
|
||||
void et4000_close(void *p)
|
||||
@@ -214,13 +217,11 @@ void et4000_add_status_info(char *s, int max_len, void *p)
|
||||
device_t et4000_device =
|
||||
{
|
||||
"Tseng Labs ET4000AX",
|
||||
DEVICE_ISA,
|
||||
0,
|
||||
et4000_init,
|
||||
et4000_close,
|
||||
NULL,
|
||||
DEVICE_ISA, 0,
|
||||
et4000_init, et4000_close, NULL,
|
||||
et4000_available,
|
||||
et4000_speed_changed,
|
||||
et4000_force_redraw,
|
||||
et4000_add_status_info
|
||||
et4000_add_status_info,
|
||||
NULL
|
||||
};
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* Known bugs: Accelerator doesn't work in planar modes
|
||||
*
|
||||
* Version: @(#)vid_et4000w32.c 1.0.2 2017/10/16
|
||||
* Version: @(#)vid_et4000w32.c 1.0.3 2017/10/31
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -37,6 +37,9 @@
|
||||
#include "vid_stg_ramdac.h"
|
||||
|
||||
|
||||
#define BIOS_ROM_PATH L"roms/video/et4000w32/et4000w32.bin"
|
||||
|
||||
|
||||
#define FIFO_SIZE 65536
|
||||
#define FIFO_MASK (FIFO_SIZE - 1)
|
||||
#define FIFO_ENTRY_SIZE (1 << 31)
|
||||
@@ -1173,7 +1176,7 @@ void *et4000w32p_init(device_t *info)
|
||||
et4000w32p_hwcursor_draw,
|
||||
NULL);
|
||||
|
||||
rom_init(&et4000->bios_rom, L"roms/video/et4000w32/et4000w32.bin", 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
rom_init(&et4000->bios_rom, BIOS_ROM_PATH, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
et4000->pci = !!(info->flags & DEVICE_PCI);
|
||||
if (info->flags & DEVICE_PCI)
|
||||
mem_mapping_disable(&et4000->bios_rom.mapping);
|
||||
@@ -1210,7 +1213,7 @@ void *et4000w32p_init(device_t *info)
|
||||
|
||||
int et4000w32p_available(void)
|
||||
{
|
||||
return rom_present(L"roms/video/et4000w32/et4000w32.bin");
|
||||
return rom_present(BIOS_ROM_PATH);
|
||||
}
|
||||
|
||||
void et4000w32p_close(void *p)
|
||||
@@ -1280,11 +1283,8 @@ static device_config_t et4000w32p_config[] =
|
||||
device_t et4000w32p_vlb_device =
|
||||
{
|
||||
"Tseng Labs ET4000/w32p VLB",
|
||||
DEVICE_VLB,
|
||||
0,
|
||||
et4000w32p_init,
|
||||
et4000w32p_close,
|
||||
NULL,
|
||||
DEVICE_VLB, 0,
|
||||
et4000w32p_init, et4000w32p_close, NULL,
|
||||
et4000w32p_available,
|
||||
et4000w32p_speed_changed,
|
||||
et4000w32p_force_redraw,
|
||||
@@ -1295,11 +1295,8 @@ device_t et4000w32p_vlb_device =
|
||||
device_t et4000w32p_pci_device =
|
||||
{
|
||||
"Tseng Labs ET4000/w32p PCI",
|
||||
DEVICE_PCI,
|
||||
0,
|
||||
et4000w32p_init,
|
||||
et4000w32p_close,
|
||||
NULL,
|
||||
DEVICE_PCI, 0,
|
||||
et4000w32p_init, et4000w32p_close, NULL,
|
||||
et4000w32p_available,
|
||||
et4000w32p_speed_changed,
|
||||
et4000w32p_force_redraw,
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* MDSI Genius VHR emulation.
|
||||
*
|
||||
* Version: @(#)vid_genius.c 1.0.4 2017/10/22
|
||||
* Version: @(#)vid_genius.c 1.0.5 2017/10/31
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -33,6 +33,9 @@
|
||||
#include "vid_genius.h"
|
||||
|
||||
|
||||
#define BIOS_ROM_PATH L"roms/video/genius/8x12.bin"
|
||||
|
||||
|
||||
#define GENIUS_XSIZE 728
|
||||
#define GENIUS_YSIZE 1008
|
||||
|
||||
@@ -90,7 +93,6 @@ extern uint8_t fontdat8x12[256][16];
|
||||
* in an 8x12 cell if necessary.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
typedef struct genius_t
|
||||
{
|
||||
@@ -394,8 +396,6 @@ void genius_textline(genius_t *genius, uint8_t background)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Draw a line in the CGA 640x200 mode */
|
||||
void genius_cgaline(genius_t *genius)
|
||||
{
|
||||
@@ -433,8 +433,6 @@ void genius_cgaline(genius_t *genius)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Draw a line in the native high-resolution mode */
|
||||
void genius_hiresline(genius_t *genius)
|
||||
{
|
||||
@@ -471,8 +469,6 @@ void genius_hiresline(genius_t *genius)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void genius_poll(void *p)
|
||||
{
|
||||
genius_t *genius = (genius_t *)p;
|
||||
@@ -632,7 +628,7 @@ void genius_close(void *p)
|
||||
|
||||
static int genius_available(void)
|
||||
{
|
||||
return rom_present(L"roms/video/genius/8x12.bin");
|
||||
return rom_present(BIOS_ROM_PATH);
|
||||
}
|
||||
|
||||
void genius_speed_changed(void *p)
|
||||
@@ -646,9 +642,7 @@ device_t genius_device =
|
||||
{
|
||||
"Genius VHR",
|
||||
DEVICE_ISA, 0,
|
||||
genius_init,
|
||||
genius_close,
|
||||
NULL,
|
||||
genius_init, genius_close, NULL,
|
||||
genius_available,
|
||||
genius_speed_changed,
|
||||
NULL,
|
||||
|
||||
@@ -415,13 +415,12 @@ static device_config_t hercules_config[] =
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
device_t hercules_device =
|
||||
{
|
||||
"Hercules",
|
||||
DEVICE_ISA, 0,
|
||||
hercules_init,
|
||||
hercules_close,
|
||||
NULL,
|
||||
hercules_init, hercules_close, NULL,
|
||||
NULL,
|
||||
hercules_speed_changed,
|
||||
NULL,
|
||||
|
||||
@@ -730,9 +730,7 @@ device_t herculesplus_device =
|
||||
{
|
||||
"Hercules Plus",
|
||||
DEVICE_ISA, 0,
|
||||
herculesplus_init,
|
||||
herculesplus_close,
|
||||
NULL,
|
||||
herculesplus_init, herculesplus_close, NULL,
|
||||
NULL,
|
||||
herculesplus_speed_changed,
|
||||
NULL,
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Hercules InColor emulation.
|
||||
*
|
||||
* Version: @(#)vid_incolor.c 1.0.3 2017/10/18
|
||||
* Version: @(#)vid_incolor.c 1.0.4 2017/10/31
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -1076,9 +1076,7 @@ device_t incolor_device =
|
||||
{
|
||||
"Hercules InColor",
|
||||
DEVICE_ISA, 0,
|
||||
incolor_init,
|
||||
incolor_close,
|
||||
NULL,
|
||||
incolor_init, incolor_close, NULL,
|
||||
NULL,
|
||||
incolor_speed_changed,
|
||||
NULL,
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* MDA emulation.
|
||||
*
|
||||
* Version: @(#)vid_mda.c 1.0.5 2017/10/22
|
||||
* Version: @(#)vid_mda.c 1.0.6 2017/10/31
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -364,13 +364,12 @@ static device_config_t mda_config[] =
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
device_t mda_device =
|
||||
{
|
||||
"MDA",
|
||||
DEVICE_ISA, 0,
|
||||
mda_init,
|
||||
mda_close,
|
||||
NULL,
|
||||
mda_init, mda_close, NULL,
|
||||
NULL,
|
||||
mda_speed_changed,
|
||||
NULL,
|
||||
|
||||
@@ -507,8 +507,8 @@ device_t m24_device =
|
||||
{
|
||||
"Olivetti M24 (video)",
|
||||
0, 0,
|
||||
m24_init,
|
||||
m24_close,
|
||||
NULL, NULL, m24_speed_changed,
|
||||
m24_init, m24_close, NULL,
|
||||
NULL,
|
||||
m24_speed_changed,
|
||||
NULL, NULL, NULL
|
||||
};
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Oak OTI067/077 emulation.
|
||||
*
|
||||
* Version: @(#)vid_oti067.c 1.0.1 2017/10/16
|
||||
* Version: @(#)vid_oti067.c 1.0.2 2017/10/31
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -32,6 +32,10 @@
|
||||
#include "vid_svga.h"
|
||||
|
||||
|
||||
#define BIOS_67_PATH L"roms/video/oti/bios.bin"
|
||||
#define BIOS_77_PATH L"roms/video/oti/oti077.vbi"
|
||||
|
||||
|
||||
typedef struct {
|
||||
svga_t svga;
|
||||
|
||||
@@ -196,65 +200,42 @@ oti_recalctimings(svga_t *svga)
|
||||
|
||||
|
||||
static void *
|
||||
oti_common_init(wchar_t *bios_fn, int vram_size, int chip_id)
|
||||
oti_init(device_t *info)
|
||||
{
|
||||
oti_t *oti = malloc(sizeof(oti_t));
|
||||
wchar_t *romfn = NULL;
|
||||
|
||||
memset(oti, 0x00, sizeof(oti_t));
|
||||
oti->chip_id = info->local;
|
||||
|
||||
rom_init(&oti->bios_rom, bios_fn,
|
||||
switch(oti->chip_id) {
|
||||
case 2:
|
||||
romfn = BIOS_67_PATH;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
romfn = BIOS_77_PATH;
|
||||
break;
|
||||
}
|
||||
|
||||
rom_init(&oti->bios_rom, romfn,
|
||||
0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
|
||||
oti->vram_size = vram_size;
|
||||
oti->vram_mask = (vram_size << 10) - 1;
|
||||
oti->vram_size = device_get_config_int("memory");
|
||||
oti->vram_mask = (oti->vram_size << 10) - 1;
|
||||
|
||||
oti->chip_id = chip_id;
|
||||
|
||||
svga_init(&oti->svga, oti, vram_size << 10,
|
||||
svga_init(&oti->svga, oti, oti->vram_size << 10,
|
||||
oti_recalctimings, oti_in, oti_out, NULL, NULL);
|
||||
|
||||
io_sethandler(0x03c0, 32,
|
||||
oti_in, NULL, NULL, oti_out, NULL, NULL, oti);
|
||||
io_sethandler(0x46e8, 1, oti_pos_in,NULL,NULL, oti_pos_out,NULL,NULL, oti);
|
||||
|
||||
oti->svga.miscout = 1;
|
||||
|
||||
return(oti);
|
||||
}
|
||||
|
||||
|
||||
static void *
|
||||
oti067_init(device_t *info)
|
||||
{
|
||||
int vram_size = device_get_config_int("memory");
|
||||
|
||||
return(oti_common_init(L"roms/video/oti/bios.bin", vram_size, 2));
|
||||
}
|
||||
|
||||
|
||||
static void *
|
||||
oti077_init(device_t *info)
|
||||
{
|
||||
int vram_size = device_get_config_int("memory");
|
||||
|
||||
return(oti_common_init(L"roms/video/oti/oti077.vbi", vram_size, 5));
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
oti067_available(void)
|
||||
{
|
||||
return(rom_present(L"roms/video/oti/bios.bin"));
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
oti077_available(void)
|
||||
{
|
||||
return(rom_present(L"roms/video/oti/oti077.vbi"));
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
oti_close(void *p)
|
||||
{
|
||||
@@ -293,6 +274,13 @@ oti_add_status_info(char *s, int max_len, void *p)
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
oti067_available(void)
|
||||
{
|
||||
return(rom_present(BIOS_67_PATH));
|
||||
}
|
||||
|
||||
|
||||
static device_config_t oti067_config[] =
|
||||
{
|
||||
{
|
||||
@@ -314,6 +302,14 @@ static device_config_t oti067_config[] =
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
static int
|
||||
oti077_available(void)
|
||||
{
|
||||
return(rom_present(BIOS_77_PATH));
|
||||
}
|
||||
|
||||
|
||||
static device_config_t oti077_config[] =
|
||||
{
|
||||
{
|
||||
@@ -343,10 +339,8 @@ device_t oti067_device =
|
||||
{
|
||||
"Oak OTI-067",
|
||||
DEVICE_ISA,
|
||||
0,
|
||||
oti067_init,
|
||||
oti_close,
|
||||
NULL,
|
||||
2,
|
||||
oti_init, oti_close, NULL,
|
||||
oti067_available,
|
||||
oti_speed_changed,
|
||||
oti_force_redraw,
|
||||
@@ -358,10 +352,8 @@ device_t oti077_device =
|
||||
{
|
||||
"Oak OTI-077",
|
||||
DEVICE_ISA,
|
||||
0,
|
||||
oti077_init,
|
||||
oti_close,
|
||||
NULL,
|
||||
5,
|
||||
oti_init, oti_close, NULL,
|
||||
oti077_available,
|
||||
oti_speed_changed,
|
||||
oti_force_redraw,
|
||||
|
||||
@@ -504,9 +504,7 @@ device_t pc1512_device =
|
||||
{
|
||||
"Amstrad PC1512 (video)",
|
||||
0, 0,
|
||||
pc1512_init,
|
||||
pc1512_close,
|
||||
NULL,
|
||||
pc1512_init, pc1512_close, NULL,
|
||||
NULL,
|
||||
pc1512_speed_changed,
|
||||
NULL,
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* S3 emulation.
|
||||
*
|
||||
* Version: @(#)vid_s3.c 1.0.2 2017/10/16
|
||||
* Version: @(#)vid_s3.c 1.0.3 2017/10/31
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -2266,7 +2266,7 @@ void *s3_vision864_init(device_t *info, wchar_t *bios_fn)
|
||||
|
||||
static void *s3_bahamas64_init(device_t *info)
|
||||
{
|
||||
s3_t *s3 = s3_vision864_init(info, L"roms/video/s3/bahamas64.BIN");
|
||||
s3_t *s3 = s3_vision864_init(info, L"roms/video/s3/bahamas64.bin");
|
||||
return s3;
|
||||
}
|
||||
|
||||
@@ -2278,7 +2278,7 @@ static void *s3_phoenix_vision864_init(device_t *info)
|
||||
|
||||
static int s3_bahamas64_available(void)
|
||||
{
|
||||
return rom_present(L"roms/video/s3/bahamas64.BIN");
|
||||
return rom_present(L"roms/video/s3/bahamas64.bin");
|
||||
}
|
||||
|
||||
static int s3_phoenix_vision864_available(void)
|
||||
@@ -2288,7 +2288,7 @@ static int s3_phoenix_vision864_available(void)
|
||||
|
||||
static void *s3_phoenix_trio32_init(device_t *info)
|
||||
{
|
||||
s3_t *s3 = s3_init(info, L"roms/video/s3/86C732P.bin", S3_TRIO32);
|
||||
s3_t *s3 = s3_init(info, L"roms/video/s3/86c732p.bin", S3_TRIO32);
|
||||
|
||||
s3->id = 0xe1; /*Trio32*/
|
||||
s3->id_ext = 0x10;
|
||||
@@ -2303,7 +2303,7 @@ static void *s3_phoenix_trio32_init(device_t *info)
|
||||
|
||||
static int s3_phoenix_trio32_available(void)
|
||||
{
|
||||
return rom_present(L"roms/video/s3/86C732P.bin");
|
||||
return rom_present(L"roms/video/s3/86c732p.bin");
|
||||
}
|
||||
|
||||
static void *s3_trio64_init(device_t *info, wchar_t *bios_fn)
|
||||
@@ -2328,13 +2328,13 @@ static void *s3_9fx_init(device_t *info)
|
||||
|
||||
static void *s3_phoenix_trio64_init(device_t *info)
|
||||
{
|
||||
s3_t *s3 = s3_trio64_init(info, L"roms/video/s3/86C764X1.bin");
|
||||
s3_t *s3 = s3_trio64_init(info, L"roms/video/s3/86c764x1.bin");
|
||||
return s3;
|
||||
}
|
||||
|
||||
static void *s3_diamond_stealth64_init(device_t *info)
|
||||
{
|
||||
s3_t *s3 = s3_trio64_init(info, L"roms/video/s3/STEALT64.BIN");
|
||||
s3_t *s3 = s3_trio64_init(info, L"roms/video/s3/stealt64.bin");
|
||||
return s3;
|
||||
}
|
||||
|
||||
@@ -2350,7 +2350,7 @@ static int s3_phoenix_trio64_available(void)
|
||||
|
||||
static int s3_diamond_stealth64_available(void)
|
||||
{
|
||||
return rom_present(L"roms/video/s3/STEALT64.BIN");
|
||||
return rom_present(L"roms/video/s3/stealt64.bin");
|
||||
}
|
||||
|
||||
static void s3_close(void *p)
|
||||
|
||||
@@ -3884,7 +3884,7 @@ static void *s3_virge_988_init(device_t *info)
|
||||
|
||||
virge->pci = !!(info->flags & DEVICE_PCI);
|
||||
|
||||
rom_init(&virge->bios_rom, L"roms/video/s3virge/diamondstealth3000.VBI", 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
rom_init(&virge->bios_rom, L"roms/video/s3virge/diamondstealth3000.vbi", 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
if (info->flags & DEVICE_PCI)
|
||||
mem_mapping_disable(&virge->bios_rom.mapping);
|
||||
|
||||
@@ -4106,7 +4106,7 @@ static int s3_virge_available(void)
|
||||
|
||||
static int s3_virge_988_available(void)
|
||||
{
|
||||
return rom_present(L"roms/video/s3virge/diamondstealth3000.VBI");
|
||||
return rom_present(L"roms/video/s3virge/diamondstealth3000.vbi");
|
||||
}
|
||||
|
||||
static int s3_virge_375_1_available(void)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Define all known video cards.
|
||||
*
|
||||
* Version: @(#)vid_table.c 1.0.3 2017/10/26
|
||||
* Version: @(#)vid_table.c 1.0.4 2017/10/31
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
@@ -88,6 +88,13 @@ video_cards[] = {
|
||||
{"[ISA] ATI VGA Edge-16 (ATI-18800)", "ati18800", &ati18800_device, GFX_VGAEDGE16 },
|
||||
{"[ISA] CGA", "cga", &cga_device, GFX_CGA },
|
||||
{"[ISA] Chips & Technologies SuperEGA", "superega", &sega_device, GFX_SUPER_EGA },
|
||||
#if defined(DEV_BRANCH) && defined(USE_CIRRUS)
|
||||
{"[ISA] Cirrus Logic CL-GD5422", "cl_gd5422", &gd5422_device, GFX_CL_GD5422 },
|
||||
{"[ISA] Cirrus Logic CL-GD5430", "cl_gd5430", &gd5430_device, GFX_CL_GD5430 },
|
||||
{"[ISA] Cirrus Logic CL-GD5434", "cl_gd5434", &gd5434_device, GFX_CL_GD5434 },
|
||||
{"[ISA] Cirrus Logic CL-GD5436", "cl_gd5436", &gd5436_device, GFX_CL_GD5436 },
|
||||
{"[ISA] Cirrus Logic CL-GD5440", "cl_gd5440", &gd5440_device, GFX_CL_GD5440 },
|
||||
#endif
|
||||
{"[ISA] Compaq ATI VGA Wonder XL (ATI-28800-5)","compaq_ati28800", &compaq_ati28800_device, GFX_VGAWONDERXL },
|
||||
{"[ISA] Compaq EGA", "compaq_ega", &cpqega_device, GFX_COMPAQ_EGA },
|
||||
{"[ISA] EGA", "ega", &ega_device, GFX_EGA },
|
||||
@@ -125,8 +132,9 @@ video_cards[] = {
|
||||
{"[PCI] Trident TGUI9440", "tgui9440_pci", &tgui9440_pci_device, GFX_TGUI9440_PCI },
|
||||
{"[VLB] ATI Graphics Pro Turbo (Mach64 GX)", "mach64x_vlb", &mach64gx_vlb_device, GFX_MACH64GX_VLB },
|
||||
#if defined(DEV_BRANCH) && defined(USE_CIRRUS)
|
||||
{"[VLB] Cirrus Logic CL-GD5429", "cl_gd5429", &gd5429_device, GFX_CL_GD5429},
|
||||
{"[VLB] Cirrus Logic CL-GD5446", "cl_gd5446", &gd5446_device, GFX_CL_GD5446},
|
||||
{"[VLB] Cirrus Logic CL-GD5429", "cl_gd5429", &gd5429_device, GFX_CL_GD5429 },
|
||||
{"[VLB] Cirrus Logic CL-GD5430", "cl_gd5430_vlb", &dia5430_device, GFX_CL_GD5430 },
|
||||
{"[VLB] Cirrus Logic CL-GD5446", "cl_gd5446", &gd5446_device, GFX_CL_GD5446 },
|
||||
#endif
|
||||
{"[VLB] Diamond Stealth 32 (Tseng ET4000/w32p)","stealth32_vlb", &et4000w32p_vlb_device, GFX_ET4000W32_VLB },
|
||||
{"[VLB] Diamond Stealth 3D 2000 (S3 ViRGE)", "stealth3d_2000_vlb", &s3_virge_vlb_device, GFX_VIRGE_VLB },
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Trident TVGA (8900D) emulation.
|
||||
*
|
||||
* Version: @(#)vid_tvga.c 1.0.1 2017/10/16
|
||||
* Version: @(#)vid_tvga.c 1.0.2 2017/10/31
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -306,7 +306,7 @@ static void *tvga8900d_init(device_t *info)
|
||||
tvga->vram_size = device_get_config_int("memory") << 10;
|
||||
tvga->vram_mask = tvga->vram_size - 1;
|
||||
|
||||
rom_init(&tvga->bios_rom, L"roms/video/tvga/TRIDENT.BIN", 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
rom_init(&tvga->bios_rom, L"roms/video/tvga/trident.bin", 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
|
||||
svga_init(&tvga->svga, tvga, tvga->vram_size,
|
||||
tvga_recalctimings,
|
||||
@@ -321,7 +321,7 @@ static void *tvga8900d_init(device_t *info)
|
||||
|
||||
static int tvga8900d_available(void)
|
||||
{
|
||||
return rom_present(L"roms/video/tvga/TRIDENT.BIN");
|
||||
return rom_present(L"roms/video/tvga/trident.bin");
|
||||
}
|
||||
|
||||
void tvga_close(void *p)
|
||||
|
||||
Reference in New Issue
Block a user