The ATi Mach64GX now uses a different bios for the VLB variant, and also added the ISA variant.

This commit is contained in:
OBattler
2018-01-21 13:59:21 +01:00
parent 2b8b4d5ba4
commit 7348a45802
5 changed files with 55 additions and 20 deletions

View File

@@ -8,13 +8,13 @@
*
* ATi Mach64 graphics card emulation.
*
* Version: @(#)vid_ati_mach64.c 1.0.8 2017/11/04
* Version: @(#)vid_ati_mach64.c 1.0.9 2018/01/21
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
* Copyright 2008-2018 Sarah Walker.
* Copyright 2016-2018 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
@@ -41,6 +41,8 @@
#endif
#define BIOS_ROM_PATH L"roms/video/mach64/bios.bin"
#define BIOS_ISA_ROM_PATH L"roms/video/mach64/mach64.bin"
#define BIOS_VLB_ROM_PATH L"roms/video/mach64/mach64_vlb_dram.bin"
#define BIOS_ROMVT2_PATH L"roms/video/mach64/atimach64vt2pci.bin"
@@ -3392,7 +3394,12 @@ static void *mach64gx_init(device_t *info)
ati_eeprom_load(&mach64->eeprom, L"mach64.nvr", 1);
rom_init(&mach64->bios_rom, BIOS_ROM_PATH, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
if (info->flags & DEVICE_PCI)
rom_init(&mach64->bios_rom, BIOS_ROM_PATH, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
else if (info->flags & DEVICE_VLB)
rom_init(&mach64->bios_rom, BIOS_VLB_ROM_PATH, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
else
rom_init(&mach64->bios_rom, BIOS_ISA_ROM_PATH, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
return mach64;
}
@@ -3421,6 +3428,14 @@ int mach64gx_available(void)
{
return rom_present(BIOS_ROM_PATH);
}
int mach64gx_isa_available(void)
{
return rom_present(BIOS_ISA_ROM_PATH);
}
int mach64gx_vlb_available(void)
{
return rom_present(BIOS_VLB_ROM_PATH);
}
int mach64vt2_available(void)
{
return rom_present(BIOS_ROMVT2_PATH);
@@ -3546,13 +3561,26 @@ static device_config_t mach64vt2_config[] =
}
};
device_t mach64gx_isa_device =
{
"ATI Mach64GX ISA",
DEVICE_ISA,
0,
mach64gx_init, mach64_close, NULL,
mach64gx_isa_available,
mach64_speed_changed,
mach64_force_redraw,
mach64_add_status_info,
mach64gx_config
};
device_t mach64gx_vlb_device =
{
"ATI Mach64GX VLB",
DEVICE_VLB,
0,
mach64gx_init, mach64_close, NULL,
mach64gx_available,
mach64gx_vlb_available,
mach64_speed_changed,
mach64_force_redraw,
mach64_add_status_info,

View File

@@ -8,14 +8,15 @@
*
* ATi Mach64 graphics card emulation.
*
* Version: @(#)vid_ati_mach64.h 1.0.0 2017/05/30
* Version: @(#)vid_ati_mach64.h 1.0.1 2018/01/21
*
* Author: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016-2017 Miran Grca.
* Copyright 2008-2018 Sarah Walker.
* Copyright 2016-2018 Miran Grca.
*/
extern device_t mach64gx_isa_device;
extern device_t mach64gx_vlb_device;
extern device_t mach64gx_pci_device;
extern device_t mach64vt2_device;

View File

@@ -8,13 +8,13 @@
*
* Define all known video cards.
*
* Version: @(#)vid_table.c 1.0.8 2017/12/31
* Version: @(#)vid_table.c 1.0.9 2018/01/21
*
* Authors: Miran Grca, <mgrca8@gmail.com>
* Fred N. van Kempen, <decwiz@yahoo.com>
*
* Copyright 2016,2017 Miran Grca.
* Copyright 2017 Fred N. van Kempen.
* Copyright 2016-2018 Miran Grca.
* Copyright 2017,2018 Fred N. van Kempen.
*/
#include <stdio.h>
#include <stdint.h>
@@ -82,6 +82,8 @@ video_cards[] = {
NULL, GFX_NONE },
{ "Internal", "internal",
NULL, GFX_INTERNAL },
{ "[ISA] ATI Graphics Pro Turbo (Mach64 GX)", "mach64x_vlb",
&mach64gx_isa_device, GFX_MACH64GX_ISA },
{ "[ISA] ATI VGA Charger (ATI-28800-5)", "ati28800",
&ati28800_device, GFX_VGACHARGER },
{ "[ISA] ATI VGA Charger (ATI-28800-5)", "ati28800",

View File

@@ -8,15 +8,15 @@
*
* Definitions for the video controller module.
*
* Version: @(#)video.h 1.0.7 2017/12/31
* Version: @(#)video.h 1.0.8 2018/01/21
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
* Fred N. van Kempen, <decwiz@yahoo.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
* Copyright 2017 Fred N. van Kempen.
* Copyright 2008-2018 Sarah Walker.
* Copyright 2016-2018 Miran Grca.
* Copyright 2017,2018 Fred N. van Kempen.
*/
#ifndef EMU_VIDEO_H
# define EMU_VIDEO_H
@@ -49,6 +49,7 @@ enum {
GFX_VGAEDGE16, /* ATI VGA Edge-16 (18800-1) */
GFX_VGACHARGER, /* ATI VGA Charger (28800-5) */
GFX_OTI067, /* Oak OTI-067 */
GFX_MACH64GX_ISA, /* ATI Graphics Pro Turbo (Mach64) VLB */
GFX_MACH64GX_VLB, /* ATI Graphics Pro Turbo (Mach64) VLB */
GFX_MACH64GX_PCI, /* ATI Graphics Pro Turbo (Mach64) PCI */
GFX_CL_GD5429, /* Cirrus Logic CL-GD5429 */

View File

@@ -8,7 +8,7 @@
*
* Windows raw keyboard input handler.
*
* Version: @(#)win_keyboard.c 1.0.6 2018/01/20
* Version: @(#)win_keyboard.c 1.0.7 2018/01/20
*
* Author: Miran Grca, <mgrca8@gmail.com>
*
@@ -44,7 +44,10 @@ convert_scan_code(UINT16 scan_code)
scan_code |= 0x0100;
} else if (scan_code == 0xE11D)
scan_code = 0xE000;
else if (scan_code > 0x00FF) {
/* E0 00 is sent by some USB keyboards for their special keys, as it is an
invalid scan code (it has no untranslated set 2 equivalent), we mark it
appropriately so it does not get passed through. */
else if ((scan_code > 0x00FF) || (scan_code == 0xE000)) {
scan_code = 0xFFFF;
}
@@ -134,9 +137,8 @@ keyboard_handle(LPARAM lParam, int infocus)
/* If it's not a scan code that starts with 0xE1 */
if (!(rawKB.Flags & RI_KEY_E1)) {
if (rawKB.Flags & RI_KEY_E0) {
if (rawKB.Flags & RI_KEY_E0)
scancode |= (0xE0 << 8);
}
/* Translate the scan code to 9-bit */
scancode = convert_scan_code(scancode);
@@ -180,7 +182,8 @@ keyboard_handle(LPARAM lParam, int infocus)
anyway).
Also, take a potential mapping into
account. */
}
} else
scancode = 0xFFFF;
if (scancode != 0xFFFF)
keyboard_input(!(rawKB.Flags & RI_KEY_BREAK), scancode);
}