Skip to content
Permalink
Browse files
Merge pull request #2237 from jriwanek-forks/named-initializers-2
Named initializers part 2
  • Loading branch information
OBattler committed Mar 18, 2022
2 parents ebd4607 + 3b73ce3 commit 3fe794c59bcef3f07f780089715f92cba0c91a28
Showing with 2,577 additions and 2,531 deletions.
  1. +84 −18 src/device/isamem.c
  2. +1 −0 src/include/86box/device.h
  3. +12 −12 src/video/agpgart.c
  4. +34 −32 src/video/vid_ati18800.c
  5. +75 −72 src/video/vid_ati28800.c
  6. +12 −8 src/video/vid_ati68860_ramdac.c
  7. +50 −54 src/video/vid_ati_mach64.c
  8. +36 −22 src/video/vid_att20c49x_ramdac.c
  9. +12 −8 src/video/vid_att2xc498_ramdac.c
  10. +12 −7 src/video/vid_av9194.c
  11. +60 −36 src/video/vid_bt48x_ramdac.c
  12. +11 −11 src/video/vid_cga.c
  13. +358 −382 src/video/vid_cl54xx.c
  14. +11 −10 src/video/vid_colorplus.c
  15. +24 −24 src/video/vid_compaq_cga.c
  16. +72 −67 src/video/vid_ega.c
  17. +55 −45 src/video/vid_et4000.c
  18. +154 −143 src/video/vid_et4000w32.c
  19. +11 −8 src/video/vid_f82c425.c
  20. +12 −11 src/video/vid_genius.c
  21. +11 −9 src/video/vid_hercules.c
  22. +11 −9 src/video/vid_herculesplus.c
  23. +73 −76 src/video/vid_ht216.c
  24. +11 −6 src/video/vid_ibm_rgb528_ramdac.c
  25. +24 −16 src/video/vid_icd2061.c
  26. +12 −8 src/video/vid_ics2494.c
  27. +12 −8 src/video/vid_ics2595.c
  28. +11 −8 src/video/vid_im1024.c
  29. +11 −10 src/video/vid_incolor.c
  30. +11 −8 src/video/vid_mda.c
  31. +33 −33 src/video/vid_mga.c
  32. +11 −10 src/video/vid_nga.c
  33. +55 −44 src/video/vid_oak_oti.c
  34. +24 −24 src/video/vid_ogc.c
  35. +12 −13 src/video/vid_paradise.c
  36. +11 −10 src/video/vid_pgc.c
  37. +11 −9 src/video/vid_rtg310x.c
  38. +619 −724 src/video/vid_s3.c
  39. +191 −252 src/video/vid_s3_virge.c
  40. +48 −28 src/video/vid_sc1148x_ramdac.c
  41. +12 −8 src/video/vid_sc1502x_ramdac.c
  42. +48 −29 src/video/vid_sdac_ramdac.c
  43. +12 −12 src/video/vid_sigma.c
  44. +12 −8 src/video/vid_stg_ramdac.c
  45. +72 −78 src/video/vid_tgui9440.c
  46. +11 −10 src/video/vid_ti_cf62011.c
  47. +12 −8 src/video/vid_tkd8001_ramdac.c
  48. +40 −44 src/video/vid_tvga.c
  49. +12 −8 src/video/vid_tvp3026_ramdac.c
  50. +36 −39 src/video/vid_vga.c
  51. +12 −12 src/video/vid_wy700.c
@@ -88,11 +88,13 @@

#define ISAMEM_IBMXT_CARD 0
#define ISAMEM_GENXT_CARD 1
#define ISAMEM_IBMAT_CARD 2
#define ISAMEM_GENAT_CARD 3
#define ISAMEM_P5PAK_CARD 4
#define ISAMEM_A6PAK_CARD 5
#define ISAMEM_EMS5150_CARD 6
#define ISAMEM_RAMCARD_CARD 2
#define ISAMEM_SYSTEMCARD_CARD 3
#define ISAMEM_IBMAT_CARD 4
#define ISAMEM_GENAT_CARD 5
#define ISAMEM_P5PAK_CARD 6
#define ISAMEM_A6PAK_CARD 7
#define ISAMEM_EMS5150_CARD 8
#define ISAMEM_EV159_CARD 10
#define ISAMEM_RAMPAGEXT_CARD 11
#define ISAMEM_ABOVEBOARD_CARD 12
@@ -416,6 +418,8 @@ isamem_init(const device_t *info)
switch(dev->board) {
case ISAMEM_IBMXT_CARD: /* IBM PC/XT Memory Expansion Card */
case ISAMEM_GENXT_CARD: /* Generic PC/XT Memory Expansion Card */
case ISAMEM_RAMCARD_CARD: /* Microsoft RAMCard for IBM PC */
case ISAMEM_SYSTEMCARD_CARD: /* Microsoft SystemCard */
case ISAMEM_P5PAK_CARD: /* Paradise Systems 5-PAK */
case ISAMEM_A6PAK_CARD: /* AST SixPakPlus */
dev->total_size = device_get_config_int("size");
@@ -736,6 +740,66 @@ static const device_t genericxt_device = {
.config = genericxt_config
};

static const device_config_t msramcard_config[] = {
// clang-format off
{
"size", "Memory Size", CONFIG_SPINNER, "", 64, "",
{ 0, 256, 64 },
{ { 0 } }
},
{
"start", "Start Address", CONFIG_SPINNER, "", 0, "",
{ 0, 624, 64 },
{ { 0 } }
},
{ "", "", -1 }
// clang-format on
};

static const device_t msramcard_device = {
.name = "Microsoft RAMCard for IBM PC",
.internal_name = "msramcard",
.flags = DEVICE_ISA,
.local = ISAMEM_RAMCARD_CARD,
.init = isamem_init,
.close = isamem_close,
.reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = msramcard_config
};

static const device_config_t mssystemcard_config[] = {
// clang-format off
{
"size", "Memory Size", CONFIG_SPINNER, "", 64, "",
{ 0, 256, 64 },
{ { 0 } }
},
{
"start", "Start Address", CONFIG_SPINNER, "", 0, "",
{ 0, 624, 64 },
{ { 0 } }
},
{ "", "", -1 }
// clang-format on
};

static const device_t mssystemcard_device = {
.name = "Microsoft SystemCard",
.internal_name = "mssystemcard",
.flags = DEVICE_ISA,
.local = ISAMEM_SYSTEMCARD_CARD,
.init = isamem_init,
.close = isamem_close,
.reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = mssystemcard_config
};

static const device_config_t ibmat_config[] = {
// clang-format off
{
@@ -1178,25 +1242,27 @@ static const struct {
const device_t *dev;
} boards[] = {
// clang-format off
{ &isa_none_device },
{ &ibmxt_device },
{ &genericxt_device },
{ &ibmat_device },
{ &genericat_device },
{ &p5pak_device },
{ &a6pak_device },
{ &ems5150_device },
{ &ev159_device },
{ &isa_none_device },
{ &ibmxt_device },
{ &genericxt_device },
{ &msramcard_device },
{ &mssystemcard_device },
{ &ibmat_device },
{ &genericat_device },
{ &p5pak_device },
{ &a6pak_device },
{ &ems5150_device },
{ &ev159_device },
#if defined(DEV_BRANCH) && defined(USE_ISAMEM_BRAT)
{ &brat_device },
{ &brat_device },
#endif
#if defined(DEV_BRANCH) && defined(USE_ISAMEM_RAMPAGE)
{ &rampage_device },
{ &rampage_device },
#endif
#if defined(DEV_BRANCH) && defined(USE_ISAMEM_IAB)
{ &iab_device },
{ &iab_device },
#endif
{ NULL }
{ NULL }
// clang-format on
};

@@ -40,6 +40,7 @@
# define EMU_DEVICE_H


#define CONFIG_END -1
#define CONFIG_STRING 0
#define CONFIG_INT 1
#define CONFIG_BINARY 2
@@ -179,16 +179,16 @@ agpgart_close(void *priv)
free(dev);
}


const device_t agpgart_device =
{
"AGP Graphics Address Remapping Table",
"agpgart",
DEVICE_PCI,
0,
agpgart_init, agpgart_close, NULL,
{ NULL },
NULL,
NULL,
NULL
const device_t agpgart_device = {
.name = "AGP Graphics Address Remapping Table",
.internal_name = "agpgart",
.flags = DEVICE_PCI,
.local = 0,
.init = agpgart_init,
.close = agpgart_close,
.reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
};
@@ -281,45 +281,47 @@ static void ati18800_force_redraw(void *p)
}

#if defined(DEV_BRANCH) && defined(USE_VGAWONDER)
const device_t ati18800_wonder_device =
{
"ATI-18800",
"ati18800w",
DEVICE_ISA, ATI18800_WONDER,
ati18800_init,
ati18800_close,
NULL,
{ ati18800_wonder_available },
ati18800_speed_changed,
ati18800_force_redraw,
NULL
const device_t ati18800_wonder_device = {
.name = "ATI-18800",
.internal_name = "ati18800w",
.flags = DEVICE_ISA,
.local = ATI18800_WONDER,
.init = ati18800_init,
.close = ati18800_close,
.reset = NULL,
{ .available = ati18800_wonder_available },
.speed_changed = ati18800_speed_changed,
.force_redraw = ati18800_force_redraw,
.config = NULL
};
#endif

const device_t ati18800_vga88_device =
{
"ATI-18800-1",
"ati18800v",
DEVICE_ISA, ATI18800_VGA88,
ati18800_init,
ati18800_close,
NULL,
{ ati18800_vga88_available },
ati18800_speed_changed,
ati18800_force_redraw,
NULL
.name = "ATI-18800-1",
.internal_name = "ati18800v",
.flags = DEVICE_ISA,
.local = ATI18800_VGA88,
.init = ati18800_init,
.close = ati18800_close,
.reset = NULL,
{ .available = ati18800_vga88_available },
.speed_changed = ati18800_speed_changed,
.force_redraw = ati18800_force_redraw,
.config = NULL
};

const device_t ati18800_device =
{
"ATI-18800-5",
"ati18800",
DEVICE_ISA, ATI18800_EDGE16,
ati18800_init,
ati18800_close,
NULL,
{ ati18800_available },
ati18800_speed_changed,
ati18800_force_redraw,
NULL
.name = "ATI-18800-5",
.internal_name = "ati18800",
.flags = DEVICE_ISA,
.local = ATI18800_EDGE16,
.init = ati18800_init,
.close = ati18800_close,
.reset = NULL,
{ .available = ati18800_available },
.speed_changed = ati18800_speed_changed,
.force_redraw = ati18800_force_redraw,
.config = NULL
};

0 comments on commit 3fe794c

Please sign in to comment.