Small fixes here and there.
Updated 808x.c to properly handle MUL/IMUL (false detection of V20 More changes in video block. Partly applied upstream patches for Amstrad machines.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 808x CPU emulation.
|
||||
*
|
||||
* Version: @(#)808x.c 1.0.14 2019/02/28
|
||||
* Version: @(#)808x.c 1.0.15 2019/03/05
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Andrew Jenner (reenigne), <andrew@reenigne.org>
|
||||
@@ -2657,6 +2657,8 @@ opcodestart:
|
||||
do_mul(AL, cpu_data);
|
||||
AL = (uint8_t)cpu_data;
|
||||
AH = (uint8_t)cpu_dest;
|
||||
if (! is_nec)
|
||||
cpu_data |= AH;
|
||||
set_co_do_mul(AH != (((AL & 0x80) == 0) || ((rmdat & 0x38) == 0x20) ? 0 : 0xff));
|
||||
}
|
||||
set_zf(bits);
|
||||
|
||||
11
src/device.c
11
src/device.c
@@ -9,13 +9,13 @@
|
||||
* Implementation of the generic device interface to handle
|
||||
* all devices attached to the emulator.
|
||||
*
|
||||
* Version: @(#)device.c 1.0.18 2018/11/13
|
||||
* Version: @(#)device.c 1.0.19 2019/03/05
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Sarah Walker, <tommowalker@tommowalker.co.uk>
|
||||
*
|
||||
* Copyright 2017,2018 Fred N. van Kempen.
|
||||
* Copyright 2017-2019 Fred N. van Kempen.
|
||||
* Copyright 2016-2018 Miran Grca.
|
||||
* Copyright 2008-2018 Sarah Walker.
|
||||
*
|
||||
@@ -213,6 +213,13 @@ device_add_ex(const device_t *d, void *priv)
|
||||
|
||||
devices[c] = (device_t *)d;
|
||||
device_priv[c] = priv;
|
||||
|
||||
/*
|
||||
* Do set the 'current' pointer, so we can do configuration
|
||||
* right after adding our device. Obviously, this will only
|
||||
* be valid until the next device is added.
|
||||
*/
|
||||
device_current = (device_t *)d;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -120,8 +120,8 @@ CDROM_Interface_Image::BinaryFile::getLength(void)
|
||||
if (file == NULL) return 0;
|
||||
|
||||
fseeko64(file, 0, SEEK_END);
|
||||
len = ftello64(file);
|
||||
DEBUG("CDROM: binary_length(%08lx) = %" PRIu64 "\n", file, len);
|
||||
len = (off64_t)ftello64(file);
|
||||
DEBUG("CDROM: binary_length(%08lx) = %" PRIu64 "\n", file, (uint64_t)len);
|
||||
|
||||
return len;
|
||||
}
|
||||
@@ -586,7 +586,7 @@ CDROM_Interface_Image::CueLoadSheet(const wchar_t *cuefile)
|
||||
currPregap = 0;
|
||||
prestart = 0;
|
||||
|
||||
track.number = CueGetNumber(&line);
|
||||
track.number = (int)CueGetNumber(&line);
|
||||
track.track_number = track.number;
|
||||
string type;
|
||||
success = CueGetKeyword(type, &line);
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
*
|
||||
* Implementation of the network module.
|
||||
*
|
||||
* Version: @(#)network.c 1.0.18 2018/11/12
|
||||
* Version: @(#)network.c 1.0.19 2019/03/06
|
||||
*
|
||||
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
* Copyright 2017,2018 Fred N. van Kempen.
|
||||
* Copyright 2017-2019 Fred N. van Kempen.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with
|
||||
* or without modification, are permitted provided that the
|
||||
@@ -50,9 +50,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <wchar.h>
|
||||
#ifdef _DEBUG
|
||||
# include <ctype.h>
|
||||
#endif
|
||||
#define HAVE_STDARG_H
|
||||
#define dbglog network_log
|
||||
#include "../../emu.h"
|
||||
@@ -150,48 +147,6 @@ network_available(int net)
|
||||
}
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
/* Dump a buffer in hex to output buffer. */
|
||||
void
|
||||
hexdump_p(char *ptr, uint8_t *bufp, int len)
|
||||
{
|
||||
# define is_print(c) (isalnum((int)(c)) || ((c) == ' '))
|
||||
char asci[20];
|
||||
uint8_t c;
|
||||
int addr;
|
||||
|
||||
addr = 0;
|
||||
while (len-- > 0) {
|
||||
c = bufp[addr];
|
||||
if ((addr % 16) == 0) {
|
||||
sprintf(ptr, "%06X %02X", addr, c);
|
||||
} else {
|
||||
sprintf(ptr, " %02X", c);
|
||||
}
|
||||
ptr += strlen(ptr);
|
||||
asci[(addr & 15)] = (char)((is_print(c) ? c : '.') & 0xff);
|
||||
if ((++addr % 16) == 0) {
|
||||
asci[16] = '\0';
|
||||
sprintf(ptr, " | %s |\n", asci);
|
||||
ptr += strlen(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
if (addr % 16) {
|
||||
while (addr % 16) {
|
||||
sprintf(ptr, " ");
|
||||
ptr += strlen(ptr);
|
||||
asci[(addr & 15)] = ' ';
|
||||
addr++;
|
||||
}
|
||||
asci[16] = '\0';
|
||||
sprintf(ptr, " | %s |\n", asci);
|
||||
ptr += strlen(ptr);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _LOGGING
|
||||
void
|
||||
network_log(int level, const char *fmt, ...)
|
||||
@@ -416,7 +371,7 @@ network_tx(uint8_t *bufp, int len)
|
||||
{
|
||||
ui_sb_icon_update(SB_NETWORK, 1);
|
||||
|
||||
#ifdef ENABLE_NETWORK_DUMP
|
||||
#if defined(WALTJE) && defined(_DEBUG) && defined(ENABLE_NETWORK_DUMP)
|
||||
{
|
||||
char temp[8192];
|
||||
hexdump_p(temp, bufp, len);
|
||||
@@ -436,7 +391,7 @@ network_rx(uint8_t *bufp, int len)
|
||||
{
|
||||
ui_sb_icon_update(SB_NETWORK, 1);
|
||||
|
||||
#ifdef ENABLE_NETWORK_DUMP
|
||||
#if defined(WALTJE) && defined(_DEBUG) && defined(ENABLE_NETWORK_DUMP)
|
||||
{
|
||||
char temp[8192];
|
||||
hexdump_p(temp, bufp, len);
|
||||
|
||||
@@ -189,14 +189,14 @@
|
||||
* including the later update (DS12887A) which implemented a
|
||||
* "century" register to be compatible with Y2K.
|
||||
*
|
||||
* Version: @(#)nvr_at.c 1.0.11 2018/09/22
|
||||
* Version: @(#)nvr_at.c 1.0.12 2019/03/06
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Mahod,
|
||||
* Sarah Walker, <tommowalker@tommowalker.co.uk>
|
||||
*
|
||||
* Copyright 2017,2018 Fred N. van Kempen.
|
||||
* Copyright 2017-2019 Fred N. van Kempen.
|
||||
* Copyright 2016-2018 Miran Grca.
|
||||
* Copyright 2008-2018 Sarah Walker.
|
||||
*
|
||||
@@ -753,7 +753,7 @@ const device_t ps_nvr_device = {
|
||||
|
||||
const device_t amstrad_nvr_device = {
|
||||
"Amstrad NVRAM",
|
||||
MACHINE_ISA | MACHINE_AT,
|
||||
DEVICE_ISA | DEVICE_AT,
|
||||
3,
|
||||
nvr_at_init, nvr_at_close, NULL,
|
||||
NULL, NULL, NULL, NULL,
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Emulation of the old and new IBM CGA graphics cards.
|
||||
*
|
||||
* Version: @(#)vid_cga.c 1.0.12 2019/03/04
|
||||
* Version: @(#)vid_cga.c 1.0.13 2019/03/05
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -653,7 +653,8 @@ cga_standalone_init(const device_t *info)
|
||||
cga_palette = (dev->rgb_type << 1);
|
||||
cgapal_rebuild();
|
||||
|
||||
video_load_font(CGA_FONT_ROM_PATH, (dev->font_type) ? 2 : 1);
|
||||
video_load_font(CGA_FONT_ROM_PATH,
|
||||
(dev->font_type) ? FONT_CGA_THICK : FONT_CGA_THIN);
|
||||
|
||||
video_inform(VID_TYPE_CGA, info->vid_timing);
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
* W = 3 bus clocks
|
||||
* L = 4 bus clocks
|
||||
*
|
||||
* Version: @(#)video.c 1.0.25 2019/03/03
|
||||
* Version: @(#)video.c 1.0.25 2019/03/05
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -93,8 +93,8 @@ int video_do_log = ENABLE_VIDEO_LOG;
|
||||
#endif
|
||||
|
||||
/* These will go away soon. */
|
||||
uint8_t fontdat[256][8]; /* IBM CGA font */
|
||||
uint8_t fontdatm[256][16]; /* IBM MDA font */
|
||||
uint8_t fontdat[1024][8]; /* IBM CGA font */
|
||||
uint8_t fontdatm[1024][16]; /* IBM MDA font */
|
||||
dbcs_font_t *fontdatk = NULL, /* Korean KSC-5601 font */
|
||||
*fontdatk_user = NULL; /* Korean KSC-5601 font (user)*/
|
||||
|
||||
@@ -899,28 +899,28 @@ video_reset_font(void)
|
||||
|
||||
/* Load a font from its ROM source. */
|
||||
void
|
||||
video_load_font(const wchar_t *s, int format)
|
||||
video_load_font(const wchar_t *s, fontformat_t num)
|
||||
{
|
||||
FILE *fp;
|
||||
int c;
|
||||
|
||||
fp = plat_fopen(rom_path(s), L"rb");
|
||||
if (fp == NULL) {
|
||||
ERRLOG("VIDEO: cannot load font '%ls', fmt=%i\n", s, format);
|
||||
ERRLOG("VIDEO: cannot load font '%ls', fmt=%i\n", s, num);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (format) {
|
||||
case 0: /* MDA */
|
||||
switch (num) {
|
||||
case FONT_MDA: /* MDA */
|
||||
for (c = 0; c < 256; c++)
|
||||
(void)fread(&fontdatm[c][0], 1, 8, fp);
|
||||
for (c = 0; c < 256; c++)
|
||||
(void)fread(&fontdatm[c][8], 1, 8, fp);
|
||||
break;
|
||||
|
||||
case 1: /* CGA, thin font */
|
||||
case 2: /* CGA, thick font */
|
||||
if (format == 2) {
|
||||
case FONT_CGA_THIN: /* CGA, thin font */
|
||||
case FONT_CGA_THICK: /* CGA, thick font */
|
||||
if (num == FONT_CGA_THICK) {
|
||||
/* Use the second ("thick") font in the ROM. */
|
||||
(void)fseek(fp, 2048, SEEK_SET);
|
||||
}
|
||||
@@ -929,7 +929,7 @@ video_load_font(const wchar_t *s, int format)
|
||||
break;
|
||||
}
|
||||
|
||||
DEBUG("VIDEO: font #%i loaded\n", format);
|
||||
DEBUG("VIDEO: font #%i loaded\n", num);
|
||||
|
||||
(void)fclose(fp);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Definitions for the video controller module.
|
||||
*
|
||||
* Version: @(#)video.h 1.0.27 2019/03/03
|
||||
* Version: @(#)video.h 1.0.28 2019/03/05
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -76,6 +76,12 @@ enum {
|
||||
FULLSCR_SCALE_KEEPRATIO
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
FONT_MDA = 0, /* MDA 8x14 */
|
||||
FONT_CGA_THIN, /* CGA 8x8, thin lines */
|
||||
FONT_CGA_THICK, /* CGA 8x8, thick lines */
|
||||
} fontformat_t;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -114,8 +120,8 @@ typedef rgb_t PALETTE[256];
|
||||
extern int changeframecount;
|
||||
|
||||
/* These will go away soon. */
|
||||
extern uint8_t fontdat[256][8];
|
||||
extern uint8_t fontdatm[256][16];
|
||||
extern uint8_t fontdat[1024][8]; /* 1024 characters */
|
||||
extern uint8_t fontdatm[1024][16]; /* 1024 characters */
|
||||
extern dbcs_font_t *fontdatk,
|
||||
*fontdatk_user;
|
||||
|
||||
@@ -348,7 +354,7 @@ extern void video_update_timing(void);
|
||||
extern void video_inform(int type, const video_timings_t *ptr);
|
||||
extern int video_type(void);
|
||||
extern void video_reset_font(void);
|
||||
extern void video_load_font(const wchar_t *s, int format);
|
||||
extern void video_load_font(const wchar_t *s, fontformat_t num);
|
||||
extern uint8_t video_force_resize_get(void);
|
||||
extern void video_force_resize_set(uint8_t res);
|
||||
extern uint32_t video_color_transform(uint32_t color);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* "extern" reference to its device into the video.h file,
|
||||
* and add an entry for it into the table here.
|
||||
*
|
||||
* Version: @(#)video_dev.c 1.0.32 2019/03/03
|
||||
* Version: @(#)video_dev.c 1.0.33 2019/03/05
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -216,7 +216,7 @@ video_reset(void)
|
||||
video_reset_font();
|
||||
|
||||
/* Initialize the video font tables. */
|
||||
video_load_font(L"video/ibm/mda/mda.rom", 0);
|
||||
video_load_font(L"video/ibm/mda/mda.rom", FONT_MDA);
|
||||
|
||||
/* Do not initialize internal cards here. */
|
||||
if ((video_card == VID_NONE) || \
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
* BIOSES: I need to re-do the bios.txt format so we can load non-BIOS
|
||||
* ROM files for a given machine, such as font roms here..
|
||||
*
|
||||
* Version: @(#)m_amstrad.c 1.0.22 2019/03/03
|
||||
* Version: @(#)m_amstrad.c 1.0.23 2019/03/06
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -109,6 +109,7 @@ typedef struct {
|
||||
uint8_t crtc[32];
|
||||
int crtcreg;
|
||||
int cga_enabled; /* 1640 */
|
||||
int fontbase; /* 1512/200 */
|
||||
uint8_t cgacol,
|
||||
cgamode,
|
||||
stat;
|
||||
@@ -133,7 +134,7 @@ typedef struct {
|
||||
int firstline,
|
||||
lastline;
|
||||
uint8_t *vram;
|
||||
uint8_t fontdat[256][8]; /* 1512/200 */
|
||||
uint8_t fontdat[1024][8]; /* 1512/200 */
|
||||
} amsvid_t;
|
||||
|
||||
typedef struct {
|
||||
@@ -269,10 +270,14 @@ vid_write_1512(uint32_t addr, uint8_t val, void *priv)
|
||||
addr &= 0x3fff;
|
||||
|
||||
if ((vid->cgamode & 0x12) == 0x12) {
|
||||
if (vid->plane_write & 1) vid->vram[addr] = val;
|
||||
if (vid->plane_write & 2) vid->vram[addr | 0x4000] = val;
|
||||
if (vid->plane_write & 4) vid->vram[addr | 0x8000] = val;
|
||||
if (vid->plane_write & 8) vid->vram[addr | 0xc000] = val;
|
||||
if (vid->plane_write & 0x01)
|
||||
vid->vram[addr] = val;
|
||||
if (vid->plane_write & 0x02)
|
||||
vid->vram[addr | 0x4000] = val;
|
||||
if (vid->plane_write & 0x04)
|
||||
vid->vram[addr | 0x8000] = val;
|
||||
if (vid->plane_write & 0x08)
|
||||
vid->vram[addr | 0xc000] = val;
|
||||
} else
|
||||
vid->vram[addr] = val;
|
||||
}
|
||||
@@ -348,10 +353,10 @@ vid_poll_1512(void *priv)
|
||||
}
|
||||
if (drawcursor) {
|
||||
for (c = 0; c < 8; c++)
|
||||
buffer->line[vid->displine][(x << 3) + c + 8] = cols[(vid->fontdat[chr][vid->sc & 7] & (1 << (c ^ 7))) ? 1 : 0] ^ 15;
|
||||
buffer->line[vid->displine][(x << 3) + c + 8] = cols[(vid->fontdat[chr + vid->fontbase][vid->sc & 7] & (1 << (c ^ 7))) ? 1 : 0] ^ 15;
|
||||
} else {
|
||||
for (c = 0; c < 8; c++)
|
||||
buffer->line[vid->displine][(x << 3) + c + 8] = cols[(vid->fontdat[chr][vid->sc & 7] & (1 << (c ^ 7))) ? 1 : 0];
|
||||
buffer->line[vid->displine][(x << 3) + c + 8] = cols[(vid->fontdat[chr + vid->fontbase][vid->sc & 7] & (1 << (c ^ 7))) ? 1 : 0];
|
||||
}
|
||||
vid->ma++;
|
||||
}
|
||||
@@ -373,11 +378,11 @@ vid_poll_1512(void *priv)
|
||||
if (drawcursor) {
|
||||
for (c = 0; c < 8; c++)
|
||||
buffer->line[vid->displine][(x << 4) + (c << 1) + 8] =
|
||||
buffer->line[vid->displine][(x << 4) + (c << 1) + 1 + 8] = cols[(vid->fontdat[chr][vid->sc & 7] & (1 << (c ^ 7))) ? 1 : 0] ^ 15;
|
||||
buffer->line[vid->displine][(x << 4) + (c << 1) + 1 + 8] = cols[(vid->fontdat[chr + vid->fontbase][vid->sc & 7] & (1 << (c ^ 7))) ? 1 : 0] ^ 15;
|
||||
} else {
|
||||
for (c = 0; c < 8; c++)
|
||||
buffer->line[vid->displine][(x << 4) + (c << 1) + 8] =
|
||||
buffer->line[vid->displine][(x << 4) + (c << 1) + 1 + 8] = cols[(vid->fontdat[chr][vid->sc & 7] & (1 << (c ^ 7))) ? 1 : 0];
|
||||
buffer->line[vid->displine][(x << 4) + (c << 1) + 1 + 8] = cols[(vid->fontdat[chr + vid->fontbase][vid->sc & 7] & (1 << (c ^ 7))) ? 1 : 0];
|
||||
}
|
||||
}
|
||||
} else if (! (vid->cgamode & 16)) {
|
||||
@@ -534,51 +539,6 @@ vid_poll_1512(void *priv)
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
vid_init_1512(amstrad_t *ams, const wchar_t *fn, int num)
|
||||
{
|
||||
amsvid_t *vid;
|
||||
FILE *fp;
|
||||
int c;
|
||||
|
||||
/* Allocate a video controller block. */
|
||||
vid = (amsvid_t *)mem_alloc(sizeof(amsvid_t));
|
||||
memset(vid, 0x00, sizeof(amsvid_t));
|
||||
|
||||
/* Load the PC1512 CGA Character Set ROM. */
|
||||
fp = plat_fopen(rom_path(fn), L"rb");
|
||||
if (fp != NULL) {
|
||||
if (num == 8) {
|
||||
/* Use the second ("thick") font in the ROM. */
|
||||
(void)fseek(fp, 2048, SEEK_SET);
|
||||
}
|
||||
for (c = 0; c < 256; c++)
|
||||
(void)fread(&vid->fontdat[c][0], 1, 8, fp);
|
||||
(void)fclose(fp);
|
||||
} else {
|
||||
ERRLOG("AMSTRAD: cannot load font '%ls'\n", fn);
|
||||
return;
|
||||
}
|
||||
|
||||
vid->vram = (uint8_t *)mem_alloc(0x10000);
|
||||
vid->cgacol = 7;
|
||||
vid->cgamode = 0x12;
|
||||
|
||||
timer_add(vid_poll_1512, &vid->vidtime, TIMER_ALWAYS_ENABLED, vid);
|
||||
mem_map_add(&vid->cga.mapping, 0xb8000, 0x08000,
|
||||
vid_read_1512, NULL, NULL, vid_write_1512, NULL, NULL,
|
||||
NULL, 0, vid);
|
||||
io_sethandler(0x03d0, 16,
|
||||
vid_in_1512, NULL, NULL, vid_out_1512, NULL, NULL, vid);
|
||||
|
||||
overscan_x = overscan_y = 16;
|
||||
|
||||
video_inform(VID_TYPE_CGA, &pc1512_timing);
|
||||
|
||||
ams->vid = vid;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
vid_close_1512(void *priv)
|
||||
{
|
||||
@@ -598,15 +558,98 @@ vid_speed_change_1512(void *priv)
|
||||
}
|
||||
|
||||
|
||||
static const device_t vid_1512_device = {
|
||||
"Amstrad PC1512 (video)",
|
||||
static void
|
||||
vid_init_1512(amstrad_t *ams, const wchar_t *fn, int num)
|
||||
{
|
||||
amsvid_t *vid;
|
||||
FILE *fp;
|
||||
int c, d;
|
||||
|
||||
/* Allocate a video controller block. */
|
||||
vid = (amsvid_t *)mem_alloc(sizeof(amsvid_t));
|
||||
memset(vid, 0x00, sizeof(amsvid_t));
|
||||
|
||||
/* Load the PC1512 CGA Character Set ROM. */
|
||||
fp = plat_fopen(rom_path(fn), L"rb");
|
||||
if (fp != NULL) {
|
||||
if (num == FONT_CGA_THICK) {
|
||||
/* Use the second ("thick") font in the ROM. */
|
||||
(void)fseek(fp, 2048, SEEK_SET);
|
||||
}
|
||||
|
||||
/* The ROM has 4 fonts. */
|
||||
for (d = 0; d < 4; d++) {
|
||||
/* 8x8 CGA. */
|
||||
for (c = 0; c < 256; c++)
|
||||
fread(&vid->fontdat[256 * d + c], 1, 8, fp);
|
||||
}
|
||||
|
||||
(void)fclose(fp);
|
||||
} else {
|
||||
ERRLOG("AMSTRAD: cannot load fonts from '%ls'\n", fn);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Add the device to the system. */
|
||||
device_add_ex(&m_amstrad_1512_device, vid);
|
||||
|
||||
vid->fontbase = (device_get_config_int("codepage") & 3) * 256;
|
||||
|
||||
vid->vram = (uint8_t *)mem_alloc(0x10000);
|
||||
vid->cgacol = 7;
|
||||
vid->cgamode = 0x12;
|
||||
|
||||
timer_add(vid_poll_1512, &vid->vidtime, TIMER_ALWAYS_ENABLED, vid);
|
||||
mem_map_add(&vid->cga.mapping, 0xb8000, 0x08000,
|
||||
vid_read_1512, NULL, NULL, vid_write_1512, NULL, NULL,
|
||||
NULL, 0, vid);
|
||||
io_sethandler(0x03d0, 16,
|
||||
vid_in_1512, NULL, NULL, vid_out_1512, NULL, NULL, vid);
|
||||
|
||||
overscan_x = overscan_y = 16;
|
||||
|
||||
cgapal_rebuild();
|
||||
|
||||
video_inform(VID_TYPE_CGA, &pc1512_timing);
|
||||
|
||||
ams->vid = vid;
|
||||
}
|
||||
|
||||
|
||||
static const device_config_t pc1512_config[] = {
|
||||
{
|
||||
"codepage", "Hardware font", CONFIG_SELECTION, "", 3,
|
||||
{
|
||||
{
|
||||
"US English", 3
|
||||
},
|
||||
// FIXME: what is 2 ??
|
||||
{
|
||||
"Danish", 1
|
||||
},
|
||||
{
|
||||
"Greek", 0
|
||||
},
|
||||
{
|
||||
""
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"", "", -1
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
const device_t m_amstrad_1512_device = {
|
||||
"Amstrad PC1512",
|
||||
0, 0,
|
||||
NULL, vid_close_1512, NULL,
|
||||
NULL,
|
||||
vid_speed_change_1512,
|
||||
NULL,
|
||||
&pc1512_timing,
|
||||
NULL
|
||||
pc1512_config
|
||||
};
|
||||
|
||||
|
||||
@@ -769,7 +812,7 @@ vid_speed_changed_1640(void *priv)
|
||||
|
||||
|
||||
static const device_t vid_1640_device = {
|
||||
"Amstrad PC1640 (video)",
|
||||
"Amstrad PC1640",
|
||||
0, 0,
|
||||
NULL, vid_close_1640, NULL,
|
||||
NULL,
|
||||
@@ -858,7 +901,7 @@ vid_in_200(uint16_t addr, void *priv)
|
||||
|
||||
|
||||
static void
|
||||
vid_init_200(amstrad_t *ams, const wchar_t *fn)
|
||||
vid_init_200(amstrad_t *dev, const wchar_t *fn)
|
||||
{
|
||||
amsvid_t *vid;
|
||||
cga_t *cga;
|
||||
@@ -869,32 +912,37 @@ vid_init_200(amstrad_t *ams, const wchar_t *fn)
|
||||
vid = (amsvid_t *)mem_alloc(sizeof(amsvid_t));
|
||||
memset(vid, 0x00, sizeof(amsvid_t));
|
||||
|
||||
/* Add the device to the system. */
|
||||
device_add_ex(&m_amstrad_200_device, vid);
|
||||
|
||||
vid->fontbase = (device_get_config_int("codepage") & 3) * 256;
|
||||
|
||||
/* Load the PC200 CGA Character Set ROM. */
|
||||
fp = plat_fopen(rom_path(fn), L"rb");
|
||||
if (fp != NULL) {
|
||||
for (c = 0; c < 256; c++)
|
||||
(void)fread(&fontdatm[c][0], 1, 8, fp);
|
||||
for (c = 0; c < 256; c++)
|
||||
(void)fread(&fontdatm[c][8], 1, 8, fp);
|
||||
/* The ROM has 4 fonts. */
|
||||
for (d = 0; d < 4; d++) {
|
||||
/* 8x14 MDA in 8x16 cell. */
|
||||
for (c = 0; c < 256; c++)
|
||||
fread(&fontdatm[256 * d + c], 1, 16, fp);
|
||||
|
||||
(void)fseek(fp, 4096, SEEK_SET);
|
||||
|
||||
for (c = 0; c < 256; c++) {
|
||||
(void)fread(&fontdat[c][0], 1, 8, fp);
|
||||
|
||||
for (d = 0; d < 8; d++)
|
||||
(void)fgetc(fp);
|
||||
/* 8x8 CGA in 8x16 cell. */
|
||||
for (c = 0; c < 256; c++) {
|
||||
fread(&fontdat[256 * d + c], 1, 8, fp);
|
||||
fseek(fp, 8, SEEK_CUR);
|
||||
}
|
||||
}
|
||||
|
||||
(void)fclose(fp);
|
||||
} else {
|
||||
ERRLOG("AMSTRAD: cannot load font '%ls'\n", fn);
|
||||
ERRLOG("AMSTRAD: cannot load fonts from '%ls'\n", fn);
|
||||
return;
|
||||
}
|
||||
|
||||
cga = &vid->cga;
|
||||
cga->vram = (uint8_t *)mem_alloc(0x4000);
|
||||
cga_init(cga);
|
||||
vid->cga.fontbase = vid->fontbase;
|
||||
|
||||
mem_map_add(&vid->cga.mapping, 0xb8000, 0x08000,
|
||||
cga_read,NULL,NULL, cga_write,NULL,NULL, NULL, 0, cga);
|
||||
@@ -905,9 +953,11 @@ vid_init_200(amstrad_t *ams, const wchar_t *fn)
|
||||
|
||||
overscan_x = overscan_y = 16;
|
||||
|
||||
cgapal_rebuild();
|
||||
|
||||
video_inform(VID_TYPE_CGA, &pc200_timing);
|
||||
|
||||
ams->vid = vid;
|
||||
dev->vid = vid;
|
||||
}
|
||||
|
||||
|
||||
@@ -931,71 +981,104 @@ vid_speed_changed_200(void *priv)
|
||||
}
|
||||
|
||||
|
||||
static const device_t vid_200_device = {
|
||||
"Amstrad PC200 (video)",
|
||||
/*
|
||||
* TODO: Should have options here for:
|
||||
*
|
||||
* > Video emulation (CGA / MDA)
|
||||
* > Display port (TTL or RF)
|
||||
*/
|
||||
static const device_config_t pc200_config[] = {
|
||||
{
|
||||
"codepage", "Hardware font", CONFIG_SELECTION, "", 3,
|
||||
{
|
||||
{
|
||||
"US English", 3
|
||||
},
|
||||
{
|
||||
"Portugese", 2
|
||||
},
|
||||
{
|
||||
"Norwegian", 1
|
||||
},
|
||||
{
|
||||
"Greek", 0
|
||||
},
|
||||
{
|
||||
""
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"", "", -1
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
const device_t m_amstrad_200_device = {
|
||||
"Amstrad PC200",
|
||||
0, 0,
|
||||
NULL, vid_close_200, NULL,
|
||||
NULL,
|
||||
vid_speed_changed_200,
|
||||
NULL,
|
||||
&pc200_timing,
|
||||
NULL
|
||||
pc200_config
|
||||
};
|
||||
|
||||
|
||||
static void
|
||||
mse_write(uint16_t addr, uint8_t val, void *priv)
|
||||
{
|
||||
amstrad_t *ams = (amstrad_t *)priv;
|
||||
amstrad_t *dev = (amstrad_t *)priv;
|
||||
|
||||
if (addr == 0x78)
|
||||
ams->mousex = 0;
|
||||
if (addr == 0x0078)
|
||||
dev->mousex = 0;
|
||||
else
|
||||
ams->mousey = 0;
|
||||
dev->mousey = 0;
|
||||
}
|
||||
|
||||
|
||||
static uint8_t
|
||||
mse_read(uint16_t addr, void *priv)
|
||||
{
|
||||
amstrad_t *ams = (amstrad_t *)priv;
|
||||
amstrad_t *dev = (amstrad_t *)priv;
|
||||
|
||||
if (addr == 0x78)
|
||||
return(ams->mousex);
|
||||
if (addr == 0x0078)
|
||||
return(dev->mousex);
|
||||
|
||||
return(ams->mousey);
|
||||
return(dev->mousey);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
mse_poll(int x, int y, int z, int b, void *priv)
|
||||
{
|
||||
amstrad_t *ams = (amstrad_t *)priv;
|
||||
amstrad_t *dev = (amstrad_t *)priv;
|
||||
|
||||
ams->mousex += x;
|
||||
ams->mousey -= y;
|
||||
dev->mousex += x;
|
||||
dev->mousey -= y;
|
||||
|
||||
if ((b & 1) && !(ams->oldb & 1))
|
||||
if ((b & 1) && !(dev->oldb & 1))
|
||||
keyboard_send(0x7e);
|
||||
if ((b & 2) && !(ams->oldb & 2))
|
||||
if ((b & 2) && !(dev->oldb & 2))
|
||||
keyboard_send(0x7d);
|
||||
if (!(b & 1) && (ams->oldb & 1))
|
||||
if (!(b & 1) && (dev->oldb & 1))
|
||||
keyboard_send(0xfe);
|
||||
if (!(b & 2) && (ams->oldb & 2))
|
||||
if (!(b & 2) && (dev->oldb & 2))
|
||||
keyboard_send(0xfd);
|
||||
|
||||
ams->oldb = b;
|
||||
dev->oldb = b;
|
||||
|
||||
return(0);
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
kbd_adddata(uint16_t val)
|
||||
{
|
||||
key_queue[key_queue_end] = (uint8_t)(val&0xff);
|
||||
key_queue[key_queue_end] = (uint8_t)(val & 0xff);
|
||||
DBGLOG(1, "AMSkb: %02X added to key queue at %i\n", val, key_queue_end);
|
||||
key_queue_end = (key_queue_end + 1) & 0xf;
|
||||
key_queue_end = (key_queue_end + 1) & 0x0f;
|
||||
}
|
||||
|
||||
|
||||
@@ -1009,9 +1092,9 @@ kbd_adddata_ex(uint16_t val)
|
||||
static void
|
||||
kbd_write(uint16_t port, uint8_t val, void *priv)
|
||||
{
|
||||
amstrad_t *ams = (amstrad_t *)priv;
|
||||
amstrad_t *dev = (amstrad_t *)priv;
|
||||
|
||||
DBGLOG(2, "AMSkb: write %04X %02X %02X\n", port, val, ams->pb);
|
||||
DBGLOG(2, "AMSkb: write %04X %02X %02X\n", port, val, dev->pb);
|
||||
|
||||
switch (port) {
|
||||
case 0x61:
|
||||
@@ -1029,12 +1112,12 @@ kbd_write(uint16_t port, uint8_t val, void *priv)
|
||||
*
|
||||
* This register is controlled by BIOS and/or ROS.
|
||||
*/
|
||||
DBGLOG(1, "AMSkb: write PB %02x (%02x)\n", val, ams->pb);
|
||||
if (!(ams->pb & 0x40) && (val & 0x40)) { /*Reset keyboard*/
|
||||
DBGLOG(1, "AMSkb: write PB %02x (%02x)\n", val, dev->pb);
|
||||
if (!(dev->pb & 0x40) && (val & 0x40)) { /*Reset keyboard*/
|
||||
DEBUG("AMSkb: reset keyboard\n");
|
||||
kbd_adddata(0xaa);
|
||||
}
|
||||
ams->pb = val;
|
||||
dev->pb = val;
|
||||
ppi.pb = val;
|
||||
|
||||
timer_process();
|
||||
@@ -1049,7 +1132,7 @@ kbd_write(uint16_t port, uint8_t val, void *priv)
|
||||
|
||||
if (val & 0x80) {
|
||||
/* Keyboard enabled, so enable PA reading. */
|
||||
ams->pa = 0x00;
|
||||
dev->pa = 0x00;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1057,11 +1140,11 @@ kbd_write(uint16_t port, uint8_t val, void *priv)
|
||||
break;
|
||||
|
||||
case 0x64:
|
||||
ams->stat1 = val;
|
||||
dev->stat1 = val;
|
||||
break;
|
||||
|
||||
case 0x65:
|
||||
ams->stat2 = val;
|
||||
dev->stat2 = val;
|
||||
break;
|
||||
|
||||
case 0x66:
|
||||
@@ -1077,12 +1160,12 @@ kbd_write(uint16_t port, uint8_t val, void *priv)
|
||||
static uint8_t
|
||||
kbd_read(uint16_t port, void *priv)
|
||||
{
|
||||
amstrad_t *ams = (amstrad_t *)priv;
|
||||
amstrad_t *dev = (amstrad_t *)priv;
|
||||
uint8_t ret = 0xff;
|
||||
|
||||
switch (port) {
|
||||
case 0x60:
|
||||
if (ams->pb & 0x80) {
|
||||
if (dev->pb & 0x80) {
|
||||
/*
|
||||
* PortA - System Status 1
|
||||
*
|
||||
@@ -1105,21 +1188,21 @@ kbd_read(uint16_t port, void *priv)
|
||||
* 2. The ROS then sets the initial VDU state based
|
||||
* on the DDM value.
|
||||
*/
|
||||
ret = (0x0d | ams->stat1) & 0x7f;
|
||||
ret = (0x0d | dev->stat1) & 0x7f;
|
||||
} else {
|
||||
ret = ams->pa;
|
||||
ret = dev->pa;
|
||||
if (key_queue_start == key_queue_end) {
|
||||
ams->wantirq = 0;
|
||||
dev->wantirq = 0;
|
||||
} else {
|
||||
ams->key_waiting = key_queue[key_queue_start];
|
||||
dev->key_waiting = key_queue[key_queue_start];
|
||||
key_queue_start = (key_queue_start + 1) & 0xf;
|
||||
ams->wantirq = 1;
|
||||
dev->wantirq = 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x61:
|
||||
ret = ams->pb;
|
||||
ret = dev->pb;
|
||||
break;
|
||||
|
||||
case 0x62:
|
||||
@@ -1148,10 +1231,10 @@ kbd_read(uint16_t port, void *priv)
|
||||
* 10001 608K bytes (96K external).
|
||||
* 10010 640K bytes (128K external or fitted on-board).
|
||||
*/
|
||||
if (ams->pb & 0x04)
|
||||
ret = ams->stat2 & 0x0f;
|
||||
if (dev->pb & 0x04)
|
||||
ret = dev->stat2 & 0x0f;
|
||||
else
|
||||
ret = ams->stat2 >> 4;
|
||||
ret = dev->stat2 >> 4;
|
||||
ret |= (ppispeakon ? 0x20 : 0);
|
||||
if (nmi)
|
||||
ret |= 0x40;
|
||||
@@ -1168,23 +1251,23 @@ kbd_read(uint16_t port, void *priv)
|
||||
static void
|
||||
kbd_poll(void *priv)
|
||||
{
|
||||
amstrad_t *ams = (amstrad_t *)priv;
|
||||
amstrad_t *dev = (amstrad_t *)priv;
|
||||
|
||||
keyboard_delay += (1000 * TIMER_USEC);
|
||||
|
||||
if (ams->wantirq)
|
||||
{
|
||||
ams->wantirq = 0;
|
||||
if (dev->wantirq)
|
||||
{
|
||||
dev->wantirq = 0;
|
||||
dev->pa = dev->key_waiting;
|
||||
picint(2);
|
||||
DBGLOG(1, "AMSkb: take IRQ\n");
|
||||
}
|
||||
|
||||
if (key_queue_start != key_queue_end && !ams->pa) {
|
||||
|
||||
if (key_queue_start != key_queue_end && !dev->pa) {
|
||||
dev->key_waiting = key_queue[key_queue_start];
|
||||
DBGLOG(1, "AMSkb: reading %02X from the key queue at %i\n",
|
||||
ams->key_waiting, key_queue_start);
|
||||
key_queue_start = (key_queue_start + 1) & 0xf;
|
||||
DBGLOG(1, "AMSkb: reading %02X from the key queue at %i\n",
|
||||
dev->key_waiting, key_queue_start);
|
||||
key_queue_start = (key_queue_start + 1) & 0x0f;
|
||||
dev->wantirq = 1;
|
||||
}
|
||||
}
|
||||
@@ -1192,11 +1275,11 @@ kbd_poll(void *priv)
|
||||
|
||||
static void
|
||||
ams_write(uint16_t port, uint8_t val, void *priv)
|
||||
{
|
||||
{
|
||||
amstrad_t *dev = (amstrad_t *)priv;
|
||||
|
||||
switch (port) {
|
||||
case 0xdead:
|
||||
case 0xdead:
|
||||
dev->dead = val;
|
||||
break;
|
||||
}
|
||||
@@ -1205,7 +1288,7 @@ ams_write(uint16_t port, uint8_t val, void *priv)
|
||||
|
||||
static uint8_t
|
||||
ams_read(uint16_t port, void *priv)
|
||||
{
|
||||
{
|
||||
amstrad_t *dev = (amstrad_t *)priv;
|
||||
uint8_t ret = 0xff;
|
||||
|
||||
@@ -1223,7 +1306,7 @@ ams_read(uint16_t port, void *priv)
|
||||
ret = 0x02; /* ENGLISH. no Diags mode */
|
||||
break;
|
||||
|
||||
case 0x037a: /* printer status */
|
||||
case 0x037a: /* printer status */
|
||||
switch(dev->type) {
|
||||
case 0:
|
||||
ret = 0x20;
|
||||
@@ -1238,7 +1321,7 @@ ams_read(uint16_t port, void *priv)
|
||||
}
|
||||
break;
|
||||
|
||||
case 0xdead:
|
||||
case 0xdead:
|
||||
ret = dev->dead;
|
||||
break;
|
||||
}
|
||||
@@ -1250,23 +1333,22 @@ static void
|
||||
static void
|
||||
amstrad_common_init(const machine_t *model, void *arg, int type)
|
||||
{
|
||||
romdef_t *roms = (romdef_t *)arg;
|
||||
romdef_t *roms = (romdef_t *)arg;
|
||||
amstrad_t *dev;
|
||||
|
||||
ams = (amstrad_t *)mem_alloc(sizeof(amstrad_t));
|
||||
memset(ams, 0x00, sizeof(amstrad_t));
|
||||
|
||||
dev = (amstrad_t *)mem_alloc(sizeof(amstrad_t));
|
||||
memset(dev, 0x00, sizeof(amstrad_t));
|
||||
dev->type = type;
|
||||
|
||||
machine_common_init(model, arg);
|
||||
|
||||
nmi_init();
|
||||
|
||||
|
||||
switch(dev->type) {
|
||||
case 0: /* 1512 */
|
||||
device_add(&fdc_xt_device);
|
||||
if (video_card == VID_INTERNAL) {
|
||||
/* Initialize the internal CGA controller. */
|
||||
vid_init_1512(ams, roms->fontfn, roms->fontnum);
|
||||
/* Initialize the internal CGA controller. */
|
||||
vid_init_1512(dev, roms->fontfn, roms->fontnum);
|
||||
}
|
||||
break;
|
||||
@@ -1274,8 +1356,8 @@ amstrad_common_init(const machine_t *model, void *arg, int type)
|
||||
case 1: /* 1640 */
|
||||
device_add(&fdc_xt_device);
|
||||
if (video_card == VID_INTERNAL) {
|
||||
/* Initialize the internal CGA/EGA controller. */
|
||||
vid_init_1640(ams, roms->vidfn, roms->vidsz);
|
||||
/* Initialize the internal CGA/EGA controller. */
|
||||
vid_init_1640(dev, roms->vidfn, roms->vidsz);
|
||||
device_add_ex(&vid_1640_device, dev->vid);
|
||||
}
|
||||
break;
|
||||
@@ -1283,8 +1365,7 @@ amstrad_common_init(const machine_t *model, void *arg, int type)
|
||||
case 2: /* PC200 */
|
||||
device_add(&fdc_xt_device);
|
||||
if (video_card == VID_INTERNAL) {
|
||||
/* Initialize the internal CGA controller. */
|
||||
vid_init_200(ams, roms->fontfn);
|
||||
/* Initialize the internal CGA controller. */
|
||||
vid_init_200(dev, roms->fontfn);
|
||||
}
|
||||
break;
|
||||
@@ -1318,22 +1399,22 @@ amstrad_common_init(const machine_t *model, void *arg, int type)
|
||||
|
||||
//FIXME: parallel_remove_amstrad();
|
||||
|
||||
io_sethandler(0x0078, 1,
|
||||
io_sethandler(0x0078, 1,
|
||||
mse_read, NULL, NULL, mse_write, NULL, NULL, dev);
|
||||
|
||||
io_sethandler(0x007a, 1,
|
||||
io_sethandler(0x007a, 1,
|
||||
mse_read, NULL, NULL, mse_write, NULL, NULL, dev);
|
||||
|
||||
io_sethandler(0x0379, 2,
|
||||
io_sethandler(0x0379, 2,
|
||||
ams_read, NULL, NULL, NULL, NULL, NULL, dev);
|
||||
|
||||
io_sethandler(0xdead, 1,
|
||||
io_sethandler(0xdead, 1,
|
||||
ams_read, NULL, NULL, ams_write, NULL, NULL, dev);
|
||||
|
||||
/* Initialize the (custom) keyboard/mouse interface. */
|
||||
/* Initialize the (custom) keyboard/mouse interface. */
|
||||
dev->wantirq = 0;
|
||||
io_sethandler(0x0060, 7,
|
||||
kbd_read, NULL, NULL, kbd_write, NULL, NULL, ams);
|
||||
io_sethandler(0x0060, 7,
|
||||
kbd_read, NULL, NULL, kbd_write, NULL, NULL, dev);
|
||||
timer_add(kbd_poll, &keyboard_delay, TIMER_ALWAYS_ENABLED, dev);
|
||||
keyboard_set_table(scancode_xt);
|
||||
keyboard_send = kbd_adddata_ex;
|
||||
@@ -1341,7 +1422,7 @@ amstrad_common_init(const machine_t *model, void *arg, int type)
|
||||
|
||||
/* Tell mouse driver about our internal mouse. */
|
||||
if (mouse_type == MOUSE_INTERNAL) {
|
||||
mouse_reset();
|
||||
mouse_reset();
|
||||
mouse_set_poll(mse_poll, dev);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
*
|
||||
* FIXME: The ROM drive should be re-done using the "option file".
|
||||
*
|
||||
* Version: @(#)m_xt_t1000.c 1.0.15 2019/02/16
|
||||
* Version: @(#)m_xt_t1000.c 1.0.16 2019/03/05
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -152,6 +152,8 @@
|
||||
|
||||
#define T1000_ROMDOS_SIZE (512*1024UL) /* Max romdrive size is 512k */
|
||||
#define T1000_ROMDOS_PATH L"machines/toshiba/t1000/t1000dos.rom"
|
||||
#define T1000_FONT_PATH L"machines/toshiba/t1000/t1000font.rom"
|
||||
#define T1200_FONT_PATH L"machines/toshiba/t1200/t1000font.bin"
|
||||
|
||||
|
||||
enum TC8521_ADDR {
|
||||
@@ -1007,7 +1009,7 @@ m_xt_t1000_init(const machine_t *model, void *arg)
|
||||
tc8521_init(&t1000.nvr, model->nvrsz);
|
||||
|
||||
if (video_card == VID_INTERNAL) {
|
||||
/* Load the T1000 CGA Font ROM. */
|
||||
/* Load the T1000 CGA Font ROM. */
|
||||
video_load_font(T1000_FONT_PATH, FONT_CGA_THICK);
|
||||
|
||||
device_add(&t1000_video_device);
|
||||
@@ -1081,7 +1083,7 @@ m_xt_t1200_init(const machine_t *model, void *arg)
|
||||
tc8521_init(&t1000.nvr, model->nvrsz);
|
||||
|
||||
if (video_card == VID_INTERNAL) {
|
||||
/* Load the T1200 CGA Font ROM. */
|
||||
/* Load the T1200 CGA Font ROM. */
|
||||
video_load_font(T1200_FONT_PATH, FONT_CGA_THICK);
|
||||
|
||||
device_add(&t1200_video_device);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Handling of the emulated machines.
|
||||
*
|
||||
* Version: @(#)machine.h 1.0.27 2019/02/16
|
||||
* Version: @(#)machine.h 1.0.28 2019/03/05
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -207,8 +207,14 @@ extern void m_ps2_model_70_type4_init(const machine_t *, void *);
|
||||
extern void m_ps2_model_80_init(const machine_t *, void *);
|
||||
|
||||
extern void m_amstrad_1512_init(const machine_t *, void *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t m_amstrad_1512_device;
|
||||
#endif
|
||||
extern void m_amstrad_1640_init(const machine_t *, void *);
|
||||
extern void m_amstrad_200_init(const machine_t *, void *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t m_amstrad_200_device;
|
||||
#endif
|
||||
extern void m_amstrad_2086_init(const machine_t *, void *);
|
||||
extern void m_amstrad_3086_init(const machine_t *, void *);
|
||||
extern void m_amstrad_mega_init(const machine_t *, void *);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Handling of the emulated machines.
|
||||
*
|
||||
* Version: @(#)machine_table.c 1.0.36 2019/03/04
|
||||
* Version: @(#)machine_table.c 1.0.37 2019/03/05
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -87,11 +87,11 @@ const machine_t machines[] = {
|
||||
{ "[8088] Zenith Data SupersPORT", "zenith_supersport", L"zenith/supersport", -1, {{"Intel", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA, 128, 640, 128, 0, m_zenith_supersport_init, NULL, NULL },
|
||||
|
||||
/* 8086 */
|
||||
{ "[8086] Amstrad PC1512", "amstrad_pc1512", L"amstrad/pc1512", -1, {{"Intel", cpus_pc1512}, {"NEC", cpus_nec}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_VIDEO | MACHINE_MOUSE, 512, 640, 128, 64, m_amstrad_1512_init, NULL, NULL },
|
||||
{ "[8086] Amstrad PC1512", "amstrad_pc1512", L"amstrad/pc1512", -1, {{"Intel", cpus_pc1512}, {"NEC", cpus_nec}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_VIDEO | MACHINE_MOUSE, 512, 640, 128, 64, m_amstrad_1512_init, &m_amstrad_1512_device, NULL },
|
||||
{ "[8086] Amstrad PC1640", "amstrad_pc1640", L"amstrad/pc1640", -1, {{"Intel", cpus_8086}, {"NEC", cpus_nec}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_VIDEO | MACHINE_MOUSE, 640, 640, 0, 64, m_amstrad_1640_init, NULL, NULL },
|
||||
{ "[8086] Amstrad PC2086", "amstrad_pc2086", L"amstrad/pc2086", -1, {{"Intel", cpus_8086}, {"NEC", cpus_nec}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA | MACHINE_VIDEO | MACHINE_MOUSE, 640, 640, 0, 64, m_amstrad_2086_init, NULL, NULL },
|
||||
{ "[8086] Amstrad PC3086", "amstrad_pc3086", L"amstrad/pc3086", -1, {{"Intel", cpus_8086}, {"NEC", cpus_nec}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA | MACHINE_VIDEO | MACHINE_MOUSE, 640, 640, 0, 64, m_amstrad_3086_init, NULL, NULL },
|
||||
{ "[8086] Amstrad PC20(0)", "amstrad_pc200", L"amstrad/pc200", -1, {{"Intel", cpus_8086}, {"NEC", cpus_nec}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA | MACHINE_VIDEO | MACHINE_MOUSE, 512, 640, 128, 64, m_amstrad_200_init, NULL, NULL },
|
||||
{ "[8086] Amstrad PC20(0)", "amstrad_pc200", L"amstrad/pc200", -1, {{"Intel", cpus_8086}, {"NEC", cpus_nec}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA | MACHINE_VIDEO | MACHINE_MOUSE, 512, 640, 128, 64, m_amstrad_200_init, &m_amstrad_200_device, NULL },
|
||||
{ "[8086] Olivetti M24", "olivetti_m24", L"olivetti/m24", -1, {{"Intel", cpus_8086}, {"NEC", cpus_nec}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA | MACHINE_VIDEO | MACHINE_MOUSE, 128, 640, 128, 0, m_olim24_init, NULL, NULL },
|
||||
{ "[8086] Tandy 1000 SL/2", "tandy_1000sl2", L"tandy/t1000sl2", -1, {{"Intel", cpus_8086}, {"NEC", cpus_nec}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA, 512, 768, 128, 0, m_tandy1k_sl2_init, &m_tandy1k_sl2_device, NULL },
|
||||
{ "[8086] Toshiba T1200", "toshiba_t1200", L"toshiba/t1200", -1, {{"Intel", cpus_8086}, {"NEC", cpus_nec}, {"", NULL}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA | MACHINE_VIDEO | MACHINE_HDC, 1024, 2048,1024, 64, m_xt_t1200_init, &t1200_video_device, m_xt_t1x00_close },
|
||||
|
||||
Reference in New Issue
Block a user