Cleaned up ibm.h a bit

This commit is contained in:
SarahW 2016-11-28 20:06:17 +00:00
commit bfc69a4bea
14 changed files with 6 additions and 77 deletions

View file

@ -28,7 +28,6 @@ extern int cpl_override;
int has_fpu;
extern int fpucount;
int times;
uint16_t rds;
uint16_t ea_rseg;

View file

@ -37,7 +37,6 @@ int cpl_override=0;
int has_fpu;
int fpucount=0;
int times;
uint16_t rds;
uint16_t ea_rseg;

View file

@ -98,7 +98,6 @@ int oldcpl;
int tempc;
uint8_t opcode;
int times=0;
uint16_t pc2,pc3;
int noint=0;

View file

@ -4,7 +4,7 @@
#define printf pclog
/*Memory*/
uint8_t *ram,*vram;
uint8_t *ram;
uint32_t rammask;
@ -175,11 +175,8 @@ COMPILE_TIME_ASSERT(sizeof(cpu_state) <= 128);
#define cpu_state_offset(MEMBER) ((uintptr_t)&cpu_state.MEMBER - (uintptr_t)&cpu_state - 128)
/*x86reg regs[8];*/
uint16_t flags,eflags;
uint32_t /*cs,ds,es,ss,*/oldds,oldss,olddslimit,oldsslimit,olddslimitw,oldsslimitw;
//uint16_t msw;
uint32_t oldds,oldss,olddslimit,oldsslimit,olddslimitw,oldsslimitw;
extern int ins,output;
extern int cycdiff;
@ -194,7 +191,6 @@ uint8_t *pccache2;
_cs,_ds,_es,_ss are the segment structures
CS,DS,ES,SS is the 16-bit data
cs,ds,es,ss are defines to the bases*/
//uint16_t CS,DS,ES,SS;
#define CS _cs.seg
#define DS _ds.seg
#define ES _es.seg
@ -286,7 +282,6 @@ typedef struct PIT
PIT pit;
void setpitclock(float clock);
int pitcount;
float pit_timer0_freq();
@ -320,7 +315,6 @@ typedef struct PPI
} PPI;
PPI ppi;
extern int key_inhibit;
/*PIC*/
@ -334,7 +328,6 @@ typedef struct PIC
PIC pic,pic2;
extern int pic_intpending;
int intcount;
int disctime;
@ -439,44 +432,17 @@ int cpuspeed;
/*Video*/
void (*pollvideo)();
void pollega();
int readflash;
uint8_t hercctrl;
int slowega,egacycles,egacycles2;
extern uint8_t gdcreg[16];
extern int egareads,egawrites;
extern int cga_comp;
extern int vid_resize;
extern int vid_api;
extern int winsizex,winsizey;
extern int chain4;
uint8_t readvram(uint16_t addr);
void writevram(uint16_t addr, uint8_t val);
void writevramgen(uint16_t addr, uint8_t val);
uint8_t readtandyvram(uint16_t addr);
void writetandy(uint16_t addr, uint8_t val);
void writetandyvram(uint16_t addr, uint8_t val);
extern int et4k_b8000;
extern int changeframecount;
extern uint8_t changedvram[(8192*1024)/1024];
void writeega_chain4(uint32_t addr, uint8_t val);
extern uint32_t svgarbank,svgawbank;
/*Serial*/
extern int mousedelay;
/*Sound*/
uint8_t spkstat;
float spktime;
int rtctime;
int soundtime,gustime,gustime2,vidtime;
int ppispeakon;
float CGACONST;
float MDACONST;
@ -488,10 +454,6 @@ int gated,speakval,speakon;
/*Sound Blaster*/
/*int sbenable,sblatchi,sblatcho,sbcount,sb_enable_i,sb_count_i;
int16_t sbdat;*/
void setsbclock(float clock);
#define SADLIB 1 /*No DSP*/
#define SB1 2 /*DSP v1.05*/
#define SB15 3 /*DSP v2.00*/
@ -503,11 +465,6 @@ void setsbclock(float clock);
#define SND_WSS 9 /*Windows Sound System*/
#define SND_PAS16 10 /*Pro Audio Spectrum 16*/
int sbtype;
int clocks[3][12][4];
int at70hz;
char pcempath[512];
@ -544,15 +501,9 @@ void pclog(const char *format, ...);
void fatal(const char *format, ...);
extern int nmi;
extern int times;
extern float isa_timing, bus_timing;
extern int frame;
uint8_t *vramp;
uint64_t timer_read();
extern uint64_t timer_freq;

View file

@ -55,7 +55,7 @@ uint32_t biosmask;
int readlnum=0,writelnum=0;
int cachesize=256;
uint8_t *ram,*rom,*vram;
uint8_t *ram,*rom;
uint8_t romext[32768];
static void mem_load_xtide_bios()
@ -1815,7 +1815,6 @@ void mem_init()
ram = malloc((mem_size + 384) * 1024);
rom = malloc(0x20000);
vram = malloc(0x800000);
readlookup2 = malloc(1024 * 1024 * sizeof(uintptr_t));
writelookup2 = malloc(1024 * 1024 * sizeof(uintptr_t));
cachelookup2 = malloc(1024 * 1024);

View file

@ -15,6 +15,8 @@ int nvr_dosave = 0;
static int nvr_onesec_time = 0, nvr_onesec_cnt = 0;
static int rtctime;
void getnvrtime()
{
time_get(nvrram);

View file

@ -42,7 +42,6 @@
int window_w, window_h, window_x, window_y, window_remember;
int start_in_fullscreen = 0;
int frame = 0;
int cdrom_enabled;
int CPUID;
@ -58,7 +57,6 @@ extern int readlnum,writelnum;
void fullspeed();
int framecount,fps;
int intcount;
int output;
int atfullspeed;
@ -495,8 +493,6 @@ void runpc()
egareads=egawrites=0;
cycles_lost = 0;
mmuflush=0;
intcount=0;
intcount=pitcount=0;
emu_fps = frames;
frames = 0;
}
@ -507,7 +503,6 @@ void runpc()
set_window_title(s);
}
done++;
frame++;
}
void fullspeed()
@ -619,7 +614,6 @@ void loadconfig(char *fn)
if (p) strcpy(iso_path, p);
else strcpy(iso_path, "");
slowega = config_get_int(NULL, "slow_video", 1);
cache = config_get_int(NULL, "cache", 3);
cga_comp = config_get_int(NULL, "cga_composite", 0);
@ -714,8 +708,6 @@ void saveconfig()
config_set_int(NULL, "sndcard", sound_card_current);
config_set_int(NULL, "cpu_speed", cpuspeed);
config_set_int(NULL, "has_fpu", hasfpu);
config_set_int(NULL, "slow_video", slowega);
config_set_int(NULL, "cache", cache);
config_set_int(NULL, "cga_composite", cga_comp);
config_set_string(NULL, "disc_a", discfns[0]);
config_set_string(NULL, "disc_b", discfns[1]);

View file

@ -59,7 +59,6 @@ void pit_reset()
pit.m[0]=pit.m[1]=pit.m[2]=0;
pit.ctrls[0]=pit.ctrls[1]=pit.ctrls[2]=0;
pit.thit[0]=1;
spkstat=0;
pit.gate[0] = pit.gate[1] = 1;
pit.gate[2] = 0;
pit.using_timer[0] = pit.using_timer[1] = pit.using_timer[2] = 1;

View file

@ -2,8 +2,6 @@
void sound_add_handler(void (*get_buffer)(int32_t *buffer, int len, void *p), void *p);
extern int sbtype;
extern int sound_card_current;
int sound_card_available(int card);

View file

@ -276,7 +276,7 @@ void gd5429_hwcursor_draw(svga_t *svga, int displine)
int xx;
int offset = svga->hwcursor_latch.x - svga->hwcursor_latch.xoff;
pclog("HWcursor %i %i %i %i %x %02X %02X\n", svga->hwcursor_latch.x, svga->hwcursor_latch.y, offset, displine, svga->hwcursor_latch.addr, vram[svga->hwcursor_latch.addr], vram[svga->hwcursor_latch.addr + 0x80]);
pclog("HWcursor %i %i %i %i %x %02X %02X\n", svga->hwcursor_latch.x, svga->hwcursor_latch.y, offset, displine, svga->hwcursor_latch.addr, svga->vram[svga->hwcursor_latch.addr], svga->vram[svga->hwcursor_latch.addr + 0x80]);
for (x = 0; x < 32; x += 8)
{
dat[0] = svga->vram[svga->hwcursor_latch.addr];

View file

@ -156,7 +156,6 @@ void et4000w32p_out(uint16_t addr, uint8_t val, void *p)
{
case 6:
svga->gdcreg[svga->gdcaddr & 15] = val;
//et4k_b8000=((crtc[0x36]&0x38)==0x28) && ((gdcreg[6]&0xC)==4);
et4000w32p_recalcmapping(et4000);
return;
}

View file

@ -235,8 +235,6 @@ void paradise_recalctimings(svga_t *svga)
svga->render = svga_render_8bpp_highres;
}
#define egacycles 1
#define egacycles2 1
void paradise_write(uint32_t addr, uint8_t val, void *p)
{
paradise_t *paradise = (paradise_t *)p;

View file

@ -740,7 +740,6 @@ int svga_init(svga_t *svga, void *p, int memsize,
mem_mapping_add(&svga->mapping, 0xa0000, 0x20000, svga_read, svga_readw, svga_readl, svga_write, svga_writew, svga_writel, NULL, 0, svga);
timer_add(svga_poll, &svga->vidtime, TIMER_ALWAYS_ENABLED, svga);
vramp = svga->vram;
svga_pri = svga;
@ -757,8 +756,6 @@ void svga_close(svga_t *svga)
svga_pri = NULL;
}
#define egacycles 1
#define egacycles2 1
void svga_write(uint32_t addr, uint8_t val, void *p)
{
svga_t *svga = (svga_t *)p;

View file

@ -137,9 +137,6 @@ static BOOL CALLBACK config_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR
h=GetDlgItem(hdlg, IDC_CHECKSSI);
SendMessage(h, BM_SETCHECK, SSI2001, 0);
h=GetDlgItem(hdlg, IDC_CHECK2);
SendMessage(h, BM_SETCHECK, slowega, 0);
h=GetDlgItem(hdlg, IDC_CHECK4);
SendMessage(h, BM_SETCHECK, cga_comp, 0);