Linux build compatibility changes

This commit is contained in:
SpinDizzy 2020-07-03 09:15:08 +00:00
parent 12081a9ff7
commit 6af882548f
4 changed files with 45 additions and 86 deletions

View file

@ -984,9 +984,9 @@ UINT8 CModel3::Read8(UINT32 addr)
if (addr > 0xc00101ff) if (addr > 0xc00101ff)
{ {
printf("R8 ATTENTION OUT OF RANGE\n"); printf("R8 ATTENTION OUT OF RANGE\n");
MessageBox(NULL, "Out of Range", NULL, MB_OK); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Out of Range", NULL);
} }
printf("R8 ioreg @%x=%x\n", (addr & 0x1FF), netBuffer[0x10000 + ((addr & 0x1FF) / 2)]); //printf("R8 ioreg @%x=%x\n", (addr & 0x1FF), netBuffer[0x10000 + ((addr & 0x1FF) / 2)]);
return netBuffer[0x10000 + ((addr & 0x1FF) / 2)]; return netBuffer[0x10000 + ((addr & 0x1FF) / 2)];
case 2: case 2:
@ -994,7 +994,7 @@ UINT8 CModel3::Read8(UINT32 addr)
if (addr > 0xc002ffff) if (addr > 0xc002ffff)
{ {
printf("R8 ATTENTION OUT OF RANGE\n"); printf("R8 ATTENTION OUT OF RANGE\n");
MessageBox(NULL, "Out of Range", NULL, MB_OK); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Out of Range", NULL);
} }
//printf("R8 netram @%x=%x\n", (addr & 0x1FFFF), netRAM[addr & 0x1ffff]); //printf("R8 netram @%x=%x\n", (addr & 0x1FFFF), netRAM[addr & 0x1ffff]);
return netRAM[((addr & 0x1FFFF) / 2)]; return netRAM[((addr & 0x1FFFF) / 2)];
@ -1004,7 +1004,7 @@ UINT8 CModel3::Read8(UINT32 addr)
default: default:
printf("R8 ATTENTION OUT OF RANGE\n"); printf("R8 ATTENTION OUT OF RANGE\n");
MessageBox(NULL, "Out of Range", NULL, MB_OK); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Out of Range", NULL);
break; break;
} }
} }
@ -1130,7 +1130,7 @@ UINT16 CModel3::Read16(UINT32 addr)
default: default:
#ifdef NET_BOARD #ifdef NET_BOARD
printf("CMODEL3 : unknown R16 : %x (%x)\n", addr, addr >> 24); printf("CMODEL3 : unknown R16 : %x (%x)\n", addr, addr >> 24);
MessageBox(NULL, "CMODEL3 : Unknown R16", NULL, MB_OK); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "CMODEL3 : Unknown R16", NULL);
#endif #endif
break; break;
} }
@ -1297,10 +1297,10 @@ UINT32 CModel3::Read32(UINT32 addr)
UINT32 test; UINT32 test;
test = (*(UINT32 *)&netBuffer[0x10000 + ((addr & 0x1FF) / 2)]); test = (*(UINT32 *)&netBuffer[0x10000 + ((addr & 0x1FF) / 2)]);
if (((FLIPENDIAN32(test) & 0x00ff0000) != 0x00900000) && ((FLIPENDIAN32(test) & 0x00ff0000) != 0x00a00000) && ((FLIPENDIAN32(test) & 0x00ff0000) != 0x00b00000) && ((FLIPENDIAN32(test) & 0x00ff0000) != 0x00800000) && ((FLIPENDIAN32(test) & 0x00ff0000) != 0x00f00000)) /*if (((FLIPENDIAN32(test) & 0x00ff0000) != 0x00900000) && ((FLIPENDIAN32(test) & 0x00ff0000) != 0x00a00000) && ((FLIPENDIAN32(test) & 0x00ff0000) != 0x00b00000) && ((FLIPENDIAN32(test) & 0x00ff0000) != 0x00800000) && ((FLIPENDIAN32(test) & 0x00ff0000) != 0x00f00000))
{ {
printf("R32 ioreg @%x=%04x\n", (addr /*& 0x1FF*/), FLIPENDIAN32(test) >> 16); printf("R32 ioreg @%x=%04x\n", (addr), FLIPENDIAN32(test) >> 16);
} }*/
result = (*(UINT32 *)&netBuffer[0x10000 + ((addr & 0x1FF) / 2)]) & 0x0000ffff; result = (*(UINT32 *)&netBuffer[0x10000 + ((addr & 0x1FF) / 2)]) & 0x0000ffff;
return FLIPENDIAN32(result); return FLIPENDIAN32(result);
@ -1469,7 +1469,7 @@ void CModel3::Write8(UINT32 addr, UINT8 data)
printf("W8 ATTENTION OUT OF RANGE\n"); printf("W8 ATTENTION OUT OF RANGE\n");
} }
printf("W8 ioreg @%x<-%x\n", (addr & 0x1FF), data); //printf("W8 ioreg @%x<-%x\n", (addr & 0x1FF), data);
*(UINT8 *)&netBuffer[0x10000 + ((addr & 0x1FF) / 2)] = data; *(UINT8 *)&netBuffer[0x10000 + ((addr & 0x1FF) / 2)] = data;
break; break;
@ -1812,7 +1812,7 @@ void CModel3::Write32(UINT32 addr, UINT32 data)
printf("W32 ATTENTION OUT OF RANGE\n"); printf("W32 ATTENTION OUT OF RANGE\n");
} }
printf("W32 ioreg @%x<-%04x\n", (addr /*& 0x1FF*/), data>>16); //printf("W32 ioreg @%x<-%04x\n", (addr /*& 0x1FF*/), data>>16);
*(UINT16 *)&netBuffer[0x10000 + ((addr & 0x1FF) / 2)] = FLIPENDIAN16(data >> 16); *(UINT16 *)&netBuffer[0x10000 + ((addr & 0x1FF) / 2)] = FLIPENDIAN16(data >> 16);
break; break;

View file

@ -149,8 +149,7 @@ UINT8 CNetBoard::Read8(UINT32 a)
if (a > 0x0ffff) if (a > 0x0ffff)
{ {
printf("OUT OF RANGE RAM[%x]\n", a); printf("OUT OF RANGE RAM[%x]\n", a);
MessageBox(NULL, "Out of Range", NULL, MB_OK); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Out of Range", NULL);
//MessageBeep(MB_ICONWARNING);
} }
return RAM[a]; return RAM[a];
@ -159,8 +158,7 @@ UINT8 CNetBoard::Read8(UINT32 a)
if ((a & 0xfff) > 0xff) if ((a & 0xfff) > 0xff)
{ {
printf("OUT OF RANGE ctrlrw[%x]\n", a); printf("OUT OF RANGE ctrlrw[%x]\n", a);
MessageBox(NULL, "Out of Range", NULL, MB_OK); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Out of Range", NULL);
//MessageBeep(MB_ICONWARNING);
} }
switch (a & 0xff) switch (a & 0xff)
{ {
@ -171,8 +169,7 @@ UINT8 CNetBoard::Read8(UINT32 a)
default: default:
printf("unknown 400(%x)\n", a & 0xff); printf("unknown 400(%x)\n", a & 0xff);
MessageBox(NULL, "Unknown R8 CTRLRW", NULL, MB_OK); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Unknown R8 CTRLRW", NULL);
//MessageBeep(MB_ICONWARNING);
return ctrlrw[a&0xff]; return ctrlrw[a&0xff];
break; break;
@ -184,8 +181,7 @@ UINT8 CNetBoard::Read8(UINT32 a)
if ((a & 0x3ffff) > 0xffff) if ((a & 0x3ffff) > 0xffff)
{ {
printf("OUT OF RANGE CommRAM[%x]\n", a); printf("OUT OF RANGE CommRAM[%x]\n", a);
MessageBox(NULL, "Out of Range", NULL, MB_OK); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Out of Range", NULL);
//MessageBeep(MB_ICONWARNING);
} }
return CommRAM[a & 0xffff]; return CommRAM[a & 0xffff];
@ -194,8 +190,7 @@ UINT8 CNetBoard::Read8(UINT32 a)
if ((a & 0xfff) > 0xff) if ((a & 0xfff) > 0xff)
{ {
printf("OUT OF RANGE ioreg[%x]\n", a); printf("OUT OF RANGE ioreg[%x]\n", a);
MessageBox(NULL, "Out of Range", NULL, MB_OK); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Out of Range", NULL);
//MessageBeep(MB_ICONWARNING);
} }
switch (a & 0xff) switch (a & 0xff)
@ -234,8 +229,7 @@ UINT8 CNetBoard::Read8(UINT32 a)
default: default:
printf("unknown c00(%x)\n", a & 0xff); printf("unknown c00(%x)\n", a & 0xff);
//MessageBeep(MB_ICONWARNING); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Unknown R8 IOREG", NULL);
MessageBox(NULL, "Unknown R8 IOREG", NULL, MB_OK);
return ioreg[a&0xff]; return ioreg[a&0xff];
break; break;
@ -244,8 +238,7 @@ UINT8 CNetBoard::Read8(UINT32 a)
default: default:
printf("NetBoard 68K: Unknown R8 (%02X) addr=%x\n", (a >> 16) & 0xF,a&0x0fffff); printf("NetBoard 68K: Unknown R8 (%02X) addr=%x\n", (a >> 16) & 0xF,a&0x0fffff);
//MessageBeep(MB_ICONWARNING); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Unknown R8", NULL);
MessageBox(NULL, "Unknown R8", NULL, MB_OK);
break; break;
} }
@ -262,8 +255,7 @@ UINT16 CNetBoard::Read16(UINT32 a)
if (a > 0x0ffff) if (a > 0x0ffff)
{ {
printf("OUT OF RANGE RAM[%x]\n", a); printf("OUT OF RANGE RAM[%x]\n", a);
//MessageBeep(MB_ICONWARNING); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Out of Range", NULL);
MessageBox(NULL, "Out of Range", NULL, MB_OK);
} }
result = *(UINT16 *)&RAM[a]; result = *(UINT16 *)&RAM[a];
return result; return result;
@ -273,8 +265,7 @@ UINT16 CNetBoard::Read16(UINT32 a)
if ((a & 0xfff) > 0xff) if ((a & 0xfff) > 0xff)
{ {
printf("OUT OF RANGE ctrlrw[%x]\n", a); printf("OUT OF RANGE ctrlrw[%x]\n", a);
//MessageBeep(MB_ICONWARNING); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Out of Range", NULL);
MessageBox(NULL, "Out of Range", NULL, MB_OK);
} }
switch (a & 0xff) switch (a & 0xff)
@ -288,8 +279,7 @@ UINT16 CNetBoard::Read16(UINT32 a)
default: default:
result = *(UINT16 *)&ctrlrw[a & 0xff]; result = *(UINT16 *)&ctrlrw[a & 0xff];
printf("unknown 400(%x)\n", a & 0xff); printf("unknown 400(%x)\n", a & 0xff);
MessageBox(NULL, "Unknown R16 CTRLRW", NULL, MB_OK); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Unknown R16 CTRLRW", NULL);
//MessageBeep(MB_ICONWARNING);
return result; return result;
break; break;
@ -300,8 +290,7 @@ UINT16 CNetBoard::Read16(UINT32 a)
if ((a & 0x3ffff) > 0xffff) if ((a & 0x3ffff) > 0xffff)
{ {
printf("OUT OF RANGE CommRAM[%x]\n", a); printf("OUT OF RANGE CommRAM[%x]\n", a);
//MessageBeep(MB_ICONWARNING); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Out of Range", NULL);
MessageBox(NULL, "Out of Range", NULL, MB_OK);
} }
result = *(UINT16 *)&CommRAM[a & 0xffff]; result = *(UINT16 *)&CommRAM[a & 0xffff];
return result; return result;
@ -311,8 +300,7 @@ UINT16 CNetBoard::Read16(UINT32 a)
if ((a & 0xfff) > 0xff) if ((a & 0xfff) > 0xff)
{ {
printf("OUT OF RANGE ioreg[%x]\n", a); printf("OUT OF RANGE ioreg[%x]\n", a);
MessageBox(NULL, "Out of Range", NULL, MB_OK); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Out of Range", NULL);
//MessageBeep(MB_ICONWARNING);
} }
switch (a & 0xff) switch (a & 0xff)
@ -330,15 +318,13 @@ UINT16 CNetBoard::Read16(UINT32 a)
default: default:
result = *(UINT16 *)&ioreg[a & 0xff]; result = *(UINT16 *)&ioreg[a & 0xff];
printf("unknown c00(%x)\n", a & 0xff); printf("unknown c00(%x)\n", a & 0xff);
MessageBox(NULL, "Unknown R16 IOREG", NULL, MB_OK); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Unknown R16 IOREG", NULL);
//MessageBeep(MB_ICONWARNING);
return result; return result;
} }
default: default:
printf("NetBoard 68K: Unknown R16 %02X addr=%x\n", (a >> 16) & 0xF,a&0x0fffff); printf("NetBoard 68K: Unknown R16 %02X addr=%x\n", (a >> 16) & 0xF,a&0x0fffff);
//MessageBeep(MB_ICONWARNING); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Unknown R16", NULL);
MessageBox(NULL, "Unknown R16", NULL, MB_OK);
break; break;
} }
@ -357,8 +343,7 @@ UINT32 CNetBoard::Read32(UINT32 a)
if (a > 0x0ffff) if (a > 0x0ffff)
{ {
printf("OUT OF RANGE RAM[%x]\n", a); printf("OUT OF RANGE RAM[%x]\n", a);
//MessageBeep(MB_ICONWARNING); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Out of Range", NULL);
MessageBox(NULL, "Out of Range", NULL, MB_OK);
} }
//printf("Netboard R32\tRAM[%x]=%x\n", a,(hi << 16) | lo); //printf("Netboard R32\tRAM[%x]=%x\n", a,(hi << 16) | lo);
result = (hi << 16) | lo; result = (hi << 16) | lo;
@ -371,7 +356,6 @@ UINT32 CNetBoard::Read32(UINT32 a)
{ {
printf("OUT OF RANGE ctrlrw[%x]\n", a); printf("OUT OF RANGE ctrlrw[%x]\n", a);
MessageBox(NULL, "Out of Range", NULL, MB_OK); MessageBox(NULL, "Out of Range", NULL, MB_OK);
//MessageBeep(MB_ICONWARNING);
} }
printf("Netboard R32\tctrlrw[%x]=%x\n", a, (hi << 16) | lo); printf("Netboard R32\tctrlrw[%x]=%x\n", a, (hi << 16) | lo);
result = (hi << 16) | lo; result = (hi << 16) | lo;
@ -383,8 +367,7 @@ UINT32 CNetBoard::Read32(UINT32 a)
if ((a & 0x3ffff) > 0xffff) if ((a & 0x3ffff) > 0xffff)
{ {
printf("OUT OF RANGE CommRAM[%x]\n", a); printf("OUT OF RANGE CommRAM[%x]\n", a);
MessageBox(NULL, "Out of Range", NULL, MB_OK); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Out of Range", NULL);
//MessageBeep(MB_ICONWARNING);
} }
//if (((a & 0xffff) > 0 && (a & 0xffff) < 0xff) || ((a & 0xffff) > 0xefff && (a & 0xffff) < 0xffff)) printf("Netboard R32\tCommRAM[%x] = %x\n", a & 0xffff, (hi << 16) | lo); //if (((a & 0xffff) > 0 && (a & 0xffff) < 0xff) || ((a & 0xffff) > 0xefff && (a & 0xffff) < 0xffff)) printf("Netboard R32\tCommRAM[%x] = %x\n", a & 0xffff, (hi << 16) | lo);
result = (hi << 16) | lo; result = (hi << 16) | lo;
@ -397,7 +380,6 @@ UINT32 CNetBoard::Read32(UINT32 a)
{ {
printf("OUT OF RANGE ioreg[%x]\n", a); printf("OUT OF RANGE ioreg[%x]\n", a);
MessageBox(NULL, "Out of Range", NULL, MB_OK); MessageBox(NULL, "Out of Range", NULL, MB_OK);
//MessageBeep(MB_ICONWARNING);
} }
printf("Netboard R32\tioreg[%x]=%x\n", a, (hi << 16) | lo); printf("Netboard R32\tioreg[%x]=%x\n", a, (hi << 16) | lo);
result = (hi << 16) | lo; result = (hi << 16) | lo;
@ -405,8 +387,7 @@ UINT32 CNetBoard::Read32(UINT32 a)
default: default:
printf("NetBoard 68K: Unknown R32 (%02X) a=%x\n", (a >> 16) & 0xF, a & 0xffff); printf("NetBoard 68K: Unknown R32 (%02X) a=%x\n", (a >> 16) & 0xF, a & 0xffff);
//MessageBeep(MB_ICONWARNING); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Unknown R32", NULL);
MessageBox(NULL, "Unknown R32", NULL, MB_OK);
break; break;
} }
@ -422,8 +403,7 @@ void CNetBoard::Write8(UINT32 a, UINT8 d)
if (a > 0x0ffff) if (a > 0x0ffff)
{ {
printf("OUT OF RANGE RAM[%x]\n", a); printf("OUT OF RANGE RAM[%x]\n", a);
//MessageBeep(MB_ICONWARNING); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Out of Range", NULL);
MessageBox(NULL, "Out of Range", NULL, MB_OK);
} }
RAM[a] = d; RAM[a] = d;
break; break;
@ -433,8 +413,7 @@ void CNetBoard::Write8(UINT32 a, UINT8 d)
if ((a & 0xfff) > 0xff) if ((a & 0xfff) > 0xff)
{ {
printf("OUT OF RANGE ctrlrw[%x]\n", a); printf("OUT OF RANGE ctrlrw[%x]\n", a);
MessageBox(NULL, "Out of Range", NULL, MB_OK); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Out of Range", NULL);
//MessageBeep(MB_ICONWARNING);
} }
switch (a & 0xff) switch (a & 0xff)
@ -465,8 +444,7 @@ void CNetBoard::Write8(UINT32 a, UINT8 d)
default: default:
printf("unknown 400(%x)\n", a & 0xff); printf("unknown 400(%x)\n", a & 0xff);
ctrlrw[a & 0xff] = d; ctrlrw[a & 0xff] = d;
MessageBox(NULL, "Unknown W8 CTRLRW", NULL, MB_OK); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Unknown W8 CTRLRW", NULL);
//MessageBeep(MB_ICONWARNING);
break; break;
} }
@ -478,8 +456,7 @@ void CNetBoard::Write8(UINT32 a, UINT8 d)
if ((a & 0x3ffff) > 0xffff) if ((a & 0x3ffff) > 0xffff)
{ {
printf("OUT OF RANGE CommRAM[%x]\n", a); printf("OUT OF RANGE CommRAM[%x]\n", a);
MessageBox(NULL, "Out of Range", NULL, MB_OK); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Out of Range", NULL);
//MessageBeep(MB_ICONWARNING);
} }
CommRAM[a & 0xffff] = d; CommRAM[a & 0xffff] = d;
break; break;
@ -489,8 +466,7 @@ void CNetBoard::Write8(UINT32 a, UINT8 d)
if ((a & 0xfff) > 0xff) if ((a & 0xfff) > 0xff)
{ {
printf("OUT OF RANGE ioreg[%x]\n", a); printf("OUT OF RANGE ioreg[%x]\n", a);
MessageBox(NULL, "Out of Range", NULL, MB_OK); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Out of Range", NULL);
//MessageBeep(MB_ICONWARNING);
} }
switch (a & 0xff) switch (a & 0xff)
@ -923,8 +899,7 @@ void CNetBoard::Write8(UINT32 a, UINT8 d)
default: default:
printf("unknown c00(%x)\n", a & 0xff); printf("unknown c00(%x)\n", a & 0xff);
ioreg[a & 0xff] = d; ioreg[a & 0xff] = d;
MessageBox(NULL, "Unknown W8 IOREG", NULL, MB_OK); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Unknown W8 IOREG", NULL);
//MessageBeep(MB_ICONWARNING);
break; break;
} }
@ -934,8 +909,7 @@ void CNetBoard::Write8(UINT32 a, UINT8 d)
default: default:
printf("NetBoard 68K: Unknown W8 (%x) %06X<-%02X\n", (a >> 16) & 0xF, a, d); printf("NetBoard 68K: Unknown W8 (%x) %06X<-%02X\n", (a >> 16) & 0xF, a, d);
MessageBox(NULL, "Unknown W8", NULL, MB_OK); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Unknown W8", NULL);
//MessageBeep(MB_ICONWARNING);
break; break;
} }
} }
@ -949,8 +923,7 @@ void CNetBoard::Write16(UINT32 a, UINT16 d)
if (a > 0x0ffff) if (a > 0x0ffff)
{ {
printf("OUT OF RANGE RAM[%x]\n", a); printf("OUT OF RANGE RAM[%x]\n", a);
MessageBox(NULL, "Out of Range", NULL, MB_OK); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Out of Range", NULL);
//MessageBeep(MB_ICONWARNING);
} }
*(UINT16 *)&RAM[a] = d; *(UINT16 *)&RAM[a] = d;
break; break;
@ -960,8 +933,7 @@ void CNetBoard::Write16(UINT32 a, UINT16 d)
if ((a & 0xfff) > 0xff) if ((a & 0xfff) > 0xff)
{ {
printf("OUT OF RANGE ctrlrw[%x]\n", a); printf("OUT OF RANGE ctrlrw[%x]\n", a);
MessageBox(NULL, "Out of Range", NULL, MB_OK); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Out of Range", NULL);
//MessageBeep(MB_ICONWARNING);
} }
switch (a & 0xff) switch (a & 0xff)
@ -1017,8 +989,7 @@ void CNetBoard::Write16(UINT32 a, UINT16 d)
default: default:
*(UINT16 *)&ctrlrw[a & 0xff] = d; *(UINT16 *)&ctrlrw[a & 0xff] = d;
printf("unknown 400(%x)\n", a & 0xff); printf("unknown 400(%x)\n", a & 0xff);
MessageBox(NULL, "Unknown W16 CTRLRW", NULL, MB_OK); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Unknown W16 CTRLRW", NULL);
//MessageBeep(MB_ICONWARNING);
break; break;
} }
@ -1029,8 +1000,7 @@ void CNetBoard::Write16(UINT32 a, UINT16 d)
if ((a & 0x3ffff) > 0xffff) if ((a & 0x3ffff) > 0xffff)
{ {
printf("OUT OF RANGE CommRAM[%x]\n", a); printf("OUT OF RANGE CommRAM[%x]\n", a);
MessageBox(NULL, "Out of Range", NULL, MB_OK); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Out of Range", NULL);
//MessageBeep(MB_ICONWARNING);
} }
*(UINT16 *)&CommRAM[a & 0xffff] = d; *(UINT16 *)&CommRAM[a & 0xffff] = d;
break; break;
@ -1040,8 +1010,7 @@ void CNetBoard::Write16(UINT32 a, UINT16 d)
if ((a & 0xfff) > 0xff) if ((a & 0xfff) > 0xff)
{ {
printf("OUT OF RANGE ioreg[%x]\n", a); printf("OUT OF RANGE ioreg[%x]\n", a);
MessageBox(NULL, "Out of Range", NULL, MB_OK); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Out of Range", NULL);
//MessageBeep(MB_ICONWARNING);
} }
switch (a & 0xff) switch (a & 0xff)
@ -1071,7 +1040,6 @@ void CNetBoard::Write16(UINT32 a, UINT16 d)
DPRINTF("d=%x\n", d); DPRINTF("d=%x\n", d);
*(UINT16 *)&ioreg[a & 0xff] = d; *(UINT16 *)&ioreg[a & 0xff] = d;
//MessageBox(NULL, "d > 1", NULL, MB_OK); //MessageBox(NULL, "d > 1", NULL, MB_OK);
//MessageBeep(MB_ICONWARNING);
} }
DPRINTF("d = %x \n",d); DPRINTF("d = %x \n",d);
@ -1089,8 +1057,7 @@ void CNetBoard::Write16(UINT32 a, UINT16 d)
default: default:
printf("unknown c00(%x)\n", a & 0xff); printf("unknown c00(%x)\n", a & 0xff);
MessageBox(NULL, "Unknown W16 IOREG", NULL, MB_OK); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Unknown W16 IOREG", NULL);
//MessageBeep(MB_ICONWARNING);
break; break;
} }
@ -1100,8 +1067,7 @@ void CNetBoard::Write16(UINT32 a, UINT16 d)
default: default:
printf("NetBoard 68K: Unknown W16 (%x) %06X<-%04X\n", (a >> 16) & 0xF,a, d); printf("NetBoard 68K: Unknown W16 (%x) %06X<-%04X\n", (a >> 16) & 0xF,a, d);
MessageBox(NULL, "Unknown W16", NULL, MB_OK); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Unknown W16", NULL);
//MessageBeep(MB_ICONWARNING);
break; break;
} }
} }
@ -1115,8 +1081,7 @@ void CNetBoard::Write32(UINT32 a, UINT32 d)
if (a > 0x0ffff) if (a > 0x0ffff)
{ {
printf("OUT OF RANGE RAM[%x]\n", a); printf("OUT OF RANGE RAM[%x]\n", a);
MessageBox(NULL, "Out of Range", NULL, MB_OK); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Out of Range", NULL);
//MessageBeep(MB_ICONWARNING);
} }
*(UINT16 *)&RAM[a] = (d >> 16); *(UINT16 *)&RAM[a] = (d >> 16);
*(UINT16 *)&RAM[a + 2] = (d & 0xFFFF); *(UINT16 *)&RAM[a + 2] = (d & 0xFFFF);
@ -1128,7 +1093,6 @@ void CNetBoard::Write32(UINT32 a, UINT32 d)
{ {
printf("OUT OF RANGE ctrlrw[%x]\n", a); printf("OUT OF RANGE ctrlrw[%x]\n", a);
MessageBox(NULL, "Out of Range", NULL, MB_OK); MessageBox(NULL, "Out of Range", NULL, MB_OK);
//MessageBeep(MB_ICONWARNING);
} }
*(UINT16 *)&ctrlrw[a] = (d >> 16); *(UINT16 *)&ctrlrw[a] = (d >> 16);
*(UINT16 *)&ctrlrw[a + 2] = (d & 0xFFFF); *(UINT16 *)&ctrlrw[a + 2] = (d & 0xFFFF);
@ -1139,8 +1103,7 @@ void CNetBoard::Write32(UINT32 a, UINT32 d)
if ((a & 0x3ffff) > 0xffff) if ((a & 0x3ffff) > 0xffff)
{ {
printf("OUT OF RANGE CommRAM[%x]\n", a); printf("OUT OF RANGE CommRAM[%x]\n", a);
MessageBox(NULL, "Out of Range", NULL, MB_OK); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Out of Range", NULL);
//MessageBeep(MB_ICONWARNING);
} }
*(UINT16 *)&CommRAM[a & 0xffff] = (d >> 16); *(UINT16 *)&CommRAM[a & 0xffff] = (d >> 16);
@ -1153,7 +1116,6 @@ void CNetBoard::Write32(UINT32 a, UINT32 d)
{ {
printf("OUT OF RANGE ioreg[%x]\n", a); printf("OUT OF RANGE ioreg[%x]\n", a);
MessageBox(NULL, "Out of Range", NULL, MB_OK); MessageBox(NULL, "Out of Range", NULL, MB_OK);
//MessageBeep(MB_ICONWARNING);
} }
*(UINT16 *)&ioreg[a] = (d >> 16); *(UINT16 *)&ioreg[a] = (d >> 16);
*(UINT16 *)&ioreg[a + 2] = (d & 0xFFFF); *(UINT16 *)&ioreg[a + 2] = (d & 0xFFFF);
@ -1164,8 +1126,7 @@ void CNetBoard::Write32(UINT32 a, UINT32 d)
default: default:
printf("NetBoard 68K: Unknown W32 (%x) %08X<-%08X\n", (a >> 16) & 0xF,a, d); printf("NetBoard 68K: Unknown W32 (%x) %08X<-%08X\n", (a >> 16) & 0xF,a, d);
MessageBox(NULL, "Unknown W32", NULL, MB_OK); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Info", "Unknown W32", NULL);
//MessageBeep(MB_ICONWARNING);
break; break;
} }

View file

@ -4,8 +4,6 @@
#include "Types.h" #include "Types.h"
#include "CPU/Bus.h" #include "CPU/Bus.h"
#include "OSD/Thread.h" #include "OSD/Thread.h"
#include <winsock2.h>
#include <ws2tcpip.h>
#include <memory> #include <memory>
#include "TCPSend.h" #include "TCPSend.h"
#include "TCPReceive.h" #include "TCPReceive.h"

View file

@ -27,7 +27,7 @@
#ifndef INCLUDED_SUPERMODEL_H #ifndef INCLUDED_SUPERMODEL_H
#define INCLUDED_SUPERMODEL_H #define INCLUDED_SUPERMODEL_H
#ifdef NET_BOARD #if (defined NET_BOARD && defined _WIN32)
#include "Winsock2.h" // force include winsock2 before windows.h because conflict with winsock1 #include "Winsock2.h" // force include winsock2 before windows.h because conflict with winsock1
#endif #endif
// Used throughout Supermodel // Used throughout Supermodel