#define WD_COMMAND 0x18
#define WD_DATA 0x19
#define WD_QUEUE_TAG 0x1a
-#define WD_AUXILIARY_STATUS 0x1f
+#define WD_AUXILIARY_STATUS 0x1f
/* WD commands */
#define WD_CMD_RESET 0x00
#define WD_CMD_ABORT 0x01
#define WD_CMD_WAIT_SEL_RECEIVE 0x0c
#define WD_CMD_TRANS_ADDR 0x18
#define WD_CMD_TRANS_INFO 0x20
-#define WD_CMD_TRANSFER_PAD 0x21
+#define WD_CMD_TRANSFER_PAD 0x21
#define WD_CMD_SBT_MODE 0x80
-#define CSR_MSGIN 0x20
+#define CSR_MSGIN 0x20
#define CSR_SDP 0x21
#define CSR_SEL_ABORT 0x22
#define CSR_RESEL_ABORT 0x25
-#define CSR_RESEL_ABORT_AM 0x27
+#define CSR_RESEL_ABORT_AM 0x27
#define CSR_ABORT 0x28
/* successful completion interrupts */
#define CSR_RESELECT 0x10
/* terminated interrupts */
#define CSR_INVALID 0x40
#define CSR_UNEXP_DISC 0x41
-#define CSR_TIMEOUT 0x42
-#define CSR_PARITY 0x43
+#define CSR_TIMEOUT 0x42
+#define CSR_PARITY 0x43
#define CSR_PARITY_ATN 0x44
#define CSR_BAD_STATUS 0x45
-#define CSR_UNEXP 0x48
+#define CSR_UNEXP 0x48
/* service required interrupts */
-#define CSR_RESEL 0x80
-#define CSR_RESEL_AM 0x81
-#define CSR_DISC 0x85
-#define CSR_SRV_REQ 0x88
-/* SCSI Bus Phases */
+#define CSR_RESEL 0x80
+#define CSR_RESEL_AM 0x81
+#define CSR_DISC 0x85
+#define CSR_SRV_REQ 0x88
+/* SCSI Bus Phases */
#define PHS_DATA_OUT 0x00
#define PHS_DATA_IN 0x01
#define PHS_COMMAND 0x02
if ((dmac_cntr & SCNTR_INTEN) && (dmac_istr & (ISTR_INTS | ISTR_E_INT)))
return 1;
} else {
- if ((dmac_cntr & CNTR_INTEN) && (dmac_istr & (ISTR_INTS | ISTR_E_INT)))
+ if ((dmac_cntr & CNTR_INTEN) && (dmac_istr & (ISTR_INTS | ISTR_E_INT)))
return 1;
}
return 0;
if (isirq()) {
uae_int_requested |= 2;
#if A2091_DEBUG > 2 || A3000_DEBUG > 2
- write_log("Interrupt_RETHINK\n");
+ write_log ("Interrupt_RETHINK\n");
#endif
} else {
uae_int_requested &= ~2;
static void dmac_start_dma(void)
{
#if A3000_DEBUG > 0 || A2091_DEBUG > 0
- write_log("DMAC DMA started, ADDR=%08X, LEN=%08X words\n", dmac_acr, dmac_wtc);
+ write_log ("DMAC DMA started, ADDR=%08X, LEN=%08X words\n", dmac_acr, dmac_wtc);
#endif
dmac_dma = 1;
}
{
#if WD33C93_DEBUG > 0
if (superdmac)
- write_log("A3000 %s SCSI reset\n", WD33C93);
+ write_log ("A3000 %s SCSI reset\n", WD33C93);
else
- write_log("A2091 %s SCSI reset\n", WD33C93);
+ write_log ("A2091 %s SCSI reset\n", WD33C93);
#endif
}
wdregs[WD_SCSI_STATUS] = scsidelay_status;
auxstatus |= 0x80;
#if WD33C93_DEBUG > 0
- write_log("%s STATUS=%02X\n", WD33C93, scsidelay_status);
+ write_log ("%s STATUS=%02X\n", WD33C93, scsidelay_status);
#endif
if (!currprefs.cs_a2091 && currprefs.cs_mbdmac != 1)
return;
INT2();
#if A2091_DEBUG > 2 || A3000_DEBUG > 2
- write_log("Interrupt\n");
+ write_log ("Interrupt\n");
#endif
}
{
int phase = wdregs[WD_COMMAND_PHASE];
#if WD33C93_DEBUG > 0
- write_log("* %s select and transfer, ID=%d phase=%02X\n", WD33C93, wdregs[WD_DESTINATION_ID] & 0x7, phase);
+ write_log ("* %s select and transfer, ID=%d phase=%02X\n", WD33C93, wdregs[WD_DESTINATION_ID] & 0x7, phase);
#endif
if (!SCSIID) {
set_status(CSR_TIMEOUT, 0);
if (currprefs.cs_cdtvscsi)
cdtv_getdmadata(&dmac_acr);
if (SCSIID->direction == 0) {
- write_log("%s DMA but no data!?\n", WD33C93);
+ write_log ("%s DMA but no data!?\n", WD33C93);
} else if (SCSIID->direction < 0) {
for (;;) {
uae_u8 v;
int status = scsi_receive_data(SCSIID, &v);
- put_byte(dmac_acr, v);
+ put_byte (dmac_acr, v);
if (wd_dataoffset < sizeof wd_data)
- wd_data[wd_dataoffset++] = v;
+ wd_data[wd_dataoffset++] = v;
dmac_acr++;
if (status)
break;
} else if (SCSIID->direction > 0) {
for (;;) {
int status;
- uae_u8 v = get_byte(dmac_acr);
+ uae_u8 v = get_byte (dmac_acr);
if (wd_dataoffset < sizeof wd_data)
wd_data[wd_dataoffset++] = v;
status = scsi_send_data(SCSIID, v);
static void wd_do_transfer_out(void)
{
#if WD33C93_DEBUG > 0
- write_log("%s SCSI O [%02X] %d/%d %s\n", WD33C93, wdregs[WD_COMMAND_PHASE], wd_dataoffset, wd_tc, scsitostring());
+ write_log ("%s SCSI O [%02X] %d/%d %s\n", WD33C93, wdregs[WD_COMMAND_PHASE], wd_dataoffset, wd_tc, scsitostring());
#endif
if (wdregs[WD_COMMAND_PHASE] == 0x11) {
wdregs[WD_COMMAND_PHASE] = 0x20;
} else {
scsi_emulate_cmd(SCSIID);
if (SCSIID->data_len <= 0 || SCSIID->status != 0 || SCSIID->direction == 0) {
- wd_phase = CSR_XFER_DONE | PHS_STATUS;
+ wd_phase = CSR_XFER_DONE | PHS_STATUS;
wdregs[WD_COMMAND_PHASE] = 0x47;
} else {
- wd_phase = CSR_XFER_DONE | PHS_DATA_IN;
+ wd_phase = CSR_XFER_DONE | PHS_DATA_IN;
wdregs[WD_COMMAND_PHASE] = 0x3f;
}
}
scsi_emulate_cmd(SCSIID);
wd_phase = CSR_XFER_DONE | PHS_STATUS;
}
- wdregs[WD_COMMAND_PHASE] = 0x47;
+ wdregs[WD_COMMAND_PHASE] = 0x47;
}
wd_dataoffset = 0;
set_status(wd_phase, SCSIID->direction ? 0 : 1);
static void wd_do_transfer_in(void)
{
#if WD33C93_DEBUG > 0
- write_log("%s SCSI I [%02X] %d/%d %s\n", WD33C93, wdregs[WD_COMMAND_PHASE], wd_dataoffset, wd_tc, scsitostring());
+ write_log ("%s SCSI I [%02X] %d/%d %s\n", WD33C93, wdregs[WD_COMMAND_PHASE], wd_dataoffset, wd_tc, scsitostring());
#endif
wd_dataoffset = 0;
if (wdregs[WD_COMMAND_PHASE] >= 0x36 && wdregs[WD_COMMAND_PHASE] < 0x47) {
tmp_tc = wdregs[WD_TRANSFER_COUNT_LSB] | (wdregs[WD_TRANSFER_COUNT] << 8) | (wdregs[WD_TRANSFER_COUNT_MSB] << 16);
#if WD33C93_DEBUG > 0
- write_log("* %s select and transfer with atn, ID=%d PHASE=%02X TC=%d\n",
+ write_log ("* %s select and transfer with atn, ID=%d PHASE=%02X TC=%d\n",
WD33C93, wdregs[WD_DESTINATION_ID] & 0x7, wdregs[WD_COMMAND_PHASE], tmp_tc);
#endif
if (wdregs[WD_COMMAND] & 0x80)
wdregs[WD_COMMAND_PHASE] = 0x36;
}
if (wdregs[WD_COMMAND_PHASE] <= 0x41) {
- wd_tc = tmp_tc;
- wd_dataoffset = 0;
- wdregs[WD_COMMAND_PHASE] = 0x45;
+ wd_tc = tmp_tc;
+ wd_dataoffset = 0;
+ wdregs[WD_COMMAND_PHASE] = 0x45;
if (wd_tc == 0) {
if (SCSIID->direction != 0 && SCSIID->status == 0) {
wd_phase = CSR_UNEXP;
}
if ((wdregs[WD_CONTROL] >> 5) == 4) {
if (wd_phase == (CSR_XFER_DONE | PHS_DATA_IN))
- do_dma();
+ do_dma();
else if(wd_phase == (CSR_XFER_DONE | PHS_DATA_OUT))
- do_dma();
+ do_dma();
}
}
wd_tc = 1;
wd_dataoffset = 0;
#if WD33C93_DEBUG > 0
- write_log("* %s transfer info phase=%02x len=%d dma=%d\n", WD33C93, wdregs[WD_COMMAND_PHASE], wd_tc, wdregs[WD_CONTROL] >> 5);
+ write_log ("* %s transfer info phase=%02x len=%d dma=%d\n", WD33C93, wdregs[WD_COMMAND_PHASE], wd_tc, wdregs[WD_CONTROL] >> 5);
#endif
scsi_start_transfer(SCSIID, wd_tc);
if (wdregs[WD_COMMAND_PHASE] >= 0x36 && wdregs[WD_COMMAND_PHASE] <= 0x3f)
wdregs[WD_COMMAND_PHASE] = 0x45;
if ((wdregs[WD_CONTROL] >> 5) == 4) {
- do_dma();
+ do_dma();
if (SCSIID->direction < 0)
wd_do_transfer_in();
else if (SCSIID->direction > 0)
static void wd_cmd_sel_atn(void)
{
#if WD33C93_DEBUG > 0
- write_log("* %s select with atn, ID=%d\n", WD33C93, wdregs[WD_DESTINATION_ID] & 0x7);
+ write_log ("* %s select with atn, ID=%d\n", WD33C93, wdregs[WD_DESTINATION_ID] & 0x7);
#endif
wd_phase = 0;
wdregs[WD_COMMAND_PHASE] = 0;
int i;
#if WD33C93_DEBUG > 0
- write_log("%s reset\n", WD33C93);
+ write_log ("%s reset\n", WD33C93);
#endif
for (i = 1; i < 0x16; i++)
wdregs[i] = 0;
static void wd_cmd_abort(void)
{
#if WD33C93_DEBUG > 0
- write_log("%s abort\n", WD33C93);
+ write_log ("%s abort\n", WD33C93);
#endif
set_status(CSR_SEL_ABORT, 0);
}
{
#if WD33C93_DEBUG > 1
if (WD33C93_DEBUG > 3 || sasr != WD_DATA)
- write_log("W %s REG %02.2X (%d) = %02.2X (%d) PC=%08X\n", WD33C93, sasr, sasr, d, d, M68K_GETPC);
+ write_log ("W %s REG %02.2X (%d) = %02.2X (%d) PC=%08X\n", WD33C93, sasr, sasr, d, d, M68K_GETPC);
#endif
if (!writeonlyreg(sasr))
wdregs[sasr] = d;
if (!wd_used) {
wd_used = 1;
- write_log("%s in use\n", WD33C93);
+ write_log ("%s in use\n", WD33C93);
}
if (sasr == WD_COMMAND_PHASE) {
#if WD33C93_DEBUG > 0
- write_log("%s PHASE=%02X\n", WD33C93, d);
+ write_log ("%s PHASE=%02X\n", WD33C93, d);
#endif
} else if (sasr == WD_DATA) {
if (wd_dataoffset < sizeof wd_data)
break;
break;
case WD_CMD_SEL_ATN:
- wd_cmd_sel_atn();
+ wd_cmd_sel_atn();
break;
case WD_CMD_SEL_ATN_XFER:
wd_cmd_sel_xfer_atn();
wd_cmd_trans_info();
break;
default:
- write_log("%s unimplemented/unknown command %02.X\n", WD33C93, d);
+ write_log ("%s unimplemented/unknown command %02.X\n", WD33C93, d);
break;
}
}
uae_u8 wdscsi_get(void)
{
uae_u8 v, osasr = sasr;
-
+
v = wdregs[sasr];
if (sasr == WD_DATA) {
int status = scsi_receive_data(SCSIID, &v);
incsasr(0);
#if WD33C93_DEBUG > 1
if (WD33C93_DEBUG > 3 || osasr != WD_DATA)
- write_log("R %s REG %02.2X (%d) = %02.2X (%d) PC=%08X\n", WD33C93, osasr, osasr, v, v, M68K_GETPC);
+ write_log ("R %s REG %02.2X (%d) = %02.2X (%d) PC=%08X\n", WD33C93, osasr, osasr, v, v, M68K_GETPC);
#endif
return v;
}
{
uae_u32 vaddr = addr;
uae_u32 v = 0xffffffff;
-
+
if (currprefs.cs_mbdmac > 1)
return 0;
while (devices[i] >= 0 && j < 7) {
if (scsis[j] == NULL) {
scsis[j] = scsi_alloc_native(j, devices[i]);
- write_log("SCSI: %d:'%s'\n", j, dis[i].label);
+ write_log ("SCSI: %d:'%s'\n", j, dis[i].label);
i++;
}
j++;
rombank = 0;
rl = getromlistbyids(roms);
if (rl) {
- write_log("A590/A2091 BOOT ROM '%s' %d.%d ", rl->path, rl->rd->ver, rl->rd->rev);
+ write_log ("A590/A2091 BOOT ROM '%s' %d.%d ", rl->path, rl->rd->ver, rl->rd->rev);
z = zfile_fopen(rl->path, "rb");
if (z) {
if (rl->rd->id == 56) {
int i;
rom_size = 32768;
rombankswitcher = 1;
- rom = (uae_u8*)xmalloc (rom_size * 2);
+ rom = (uae_u8*)xmalloc (rom_size * 2);
for (i = 0; i < rom_size; i++)
zfile_fread(rom + i * 2, 1, 1, z);
- } else {
+ } else {
rom_size = 16384;
rom = (uae_u8*)xmalloc (rom_size);
zfile_fread (rom, rom_size, 1, z);
}
zfile_fclose(z);
rom_mask = rom_size - 1;
- write_log("loaded\n");
+ write_log ("loaded\n");
} else {
- write_log("failed to load\n");
+ write_log ("failed to load\n");
}
} else {
romwarning(roms);
#define AKIKO_DEBUG_NVRAM 0
#define AKIKO_DEBUG_IO 0
-#define AKIKO_DEBUG_IO_CMD 0
+#define AKIKO_DEBUG_IO_CMD 1
static void irq(void)
{
* unnecessarily complex and not 100% correct..
*/
-enum i2c { I2C_WAIT, I2C_START, I2C_DEVICEADDR, I2C_WORDADDR, I2C_DATA };
+enum i2c { I2C_WAIT, I2C_START, I2C_DEVICEADDR, I2C_WORDADDR, I2C_DATA };
/* size of EEPROM, don't try to change,
* (hardcoded in Kickstart)
*/
-#define NVRAM_SIZE 1024
+#define NVRAM_SIZE 1024
/* max size of one write request */
-#define NVRAM_PAGE_SIZE 16
+#define NVRAM_PAGE_SIZE 16
static uae_u8 cd32_nvram[NVRAM_SIZE], nvram_writetmp[NVRAM_PAGE_SIZE];
static int nvram_address, nvram_writeaddr;
static int nvram_rw;
-static int bitcounter = -1, direction = -1;
+static int bitcounter = -1, direction = -1;
static uae_u8 nvram_byte;
static int scl_out, scl_in, scl_dir, oscl, sda_out, sda_in, sda_dir, osda;
static int sda_dir_nvram;
static int state = I2C_WAIT;
-static void nvram_write (int offset, int len)
+static void nvram_write (int offset, int len)
{
struct zfile *f;
bitcounter = -1;
}
} else {
- //write_log("NVRAM received bit %d, offset %d\n", sda_out, bitcounter);
+ //write_log ("NVRAM received bit %d, offset %d\n", sda_out, bitcounter);
nvram_byte <<= 1;
nvram_byte |= sda_out;
bitcounter++;
nvram_byte = cd32_nvram[nvram_address];
sda_dir_nvram = 1;
sda_in = (nvram_byte & 0x80) ? 1 : 0;
- //write_log("NVRAM sent bit %d, offset %d\n", sda_in, bitcounter);
+ //write_log ("NVRAM sent bit %d, offset %d\n", sda_in, bitcounter);
nvram_byte <<= 1;
bitcounter++;
if (bitcounter == 8) {
* this piece of crap emulates real CD32 CDROM controller and drive :)
*/
-#define CDSTATUS_FRAME 0x80000000
+#define CDSTATUS_FRAME 0x80000000
#define CDSTATUS_UNK1 0x40000000 /* not used by ROM */
#define CDSTATUS_UNK2 0x20000000 /* not used by ROM */
-#define CDSTATUS_DATA_AVAILABLE 0x10000000
-#define CDSTATUS_DATASECTOR_ERROR 0x08000000 /* ?? */
-#define CDSTATUS_DATASECTOR 0x04000000
+#define CDSTATUS_DATA_AVAILABLE 0x10000000
+#define CDSTATUS_DATASECTOR_ERROR 0x08000000 /* ?? */
+#define CDSTATUS_DATASECTOR 0x04000000
-#define CDS_ERROR 0x80
-#define CDS_PLAYING 0x08
+#define CDS_ERROR 0x80
+#define CDS_PLAYING 0x08
#define AUDIO_STATUS_NOT_SUPPORTED 0x00
#define AUDIO_STATUS_IN_PROGRESS 0x11
static uae_u32 cdrom_address1, cdrom_address2;
static uae_u32 cdrom_longmask;
static uae_u32 cdrom_readmask_r, cdrom_readmask_w;
-static uae_u8 cdrom_command_offset_complete; /* 0x19 */
+static uae_u8 cdrom_command_offset_complete; /* 0x19 */
static uae_u8 cdrom_command_offset_todo; /* 0x1d */
-static uae_u8 cdrom_result_complete; /* 0x1a */
-static uae_u8 cdrom_result_last_pos; /* 0x1f */
+static uae_u8 cdrom_result_complete; /* 0x1a */
+static uae_u8 cdrom_result_last_pos; /* 0x1f */
static uae_u8 cdrom_result_buffer[32];
static uae_u8 cdrom_command_buffer[32];
static uae_u8 cdrom_command;
}
/* convert minutes, seconds and frames -> logical sector number */
-static int msf2lsn (int msf)
+static int msf2lsn (int msf)
{
int sector = (((msf >> 16) & 0xff) * 60 * 75 + ((msf >> 8) & 0xff) * 75 + ((msf >> 0) & 0xff)) - 150;
if (sector < 0)
}
/* convert logical sector number -> minutes, seconds and frames */
-static int lsn2msf (int sectors)
+static int lsn2msf (int sectors)
{
int msf;
sectors += 150;
return msf;
}
-static void cdaudiostop (void)
+static void cdaudiostop (void)
{
cdrom_playing = 0;
cdrom_paused = 0;
}
static uae_u32 last_play_end;
-static int cd_play_audio (uae_u32 startmsf, uae_u32 endmsf, int scan)
+static int cd_play_audio (uae_u32 startmsf, uae_u32 endmsf, int scan)
{
if (endmsf >= lsn2msf (cdrom_leadout))
endmsf = lsn2msf (cdrom_leadout);
last_play_end = endmsf;
- return sys_command_cd_play (DF_IOCTL, unitnum,startmsf, endmsf, scan);
+ return sys_command_cd_play (DF_IOCTL, unitnum, startmsf, endmsf, scan);
}
return;
}
#if AKIKO_DEBUG_IO_CMD
- write_log("read sector=%d, scnt=%d -> %d\n", cdrom_data_offset, cdrom_sector_counter, sector);
+ write_log ("read sector=%d, scnt=%d -> %d\n", cdrom_data_offset, cdrom_sector_counter, sector);
#endif
cdrom_readmask_w &= ~(1 << j);
}
if (i == MAX_TOTAL_DEVICES)
return;
if (unitnum >= 0) {
+ int ou = unitnum;
cdaudiostop();
- sys_command_close(DF_IOCTL, unitnum);
+ unitnum = -1;
+ sys_command_close(DF_IOCTL, ou);
}
if (sys_command_open(DF_IOCTL, i) > 0) {
unitnum = i;
cd_hunt = 0;
- write_log("CD32: autodetected unit %d\n", unitnum);
- } else {
- unitnum = -1;
+ write_log ("CD32: autodetected unit %d\n", unitnum);
}
}
}
if (cdrom_playing) {
static int frame2counter;
- frame2counter--;
- if (frame2counter <= 0) {
+ frame2counter--;
+ if (frame2counter <= 0) {
uae_u8 *s;
frame2counter = 312 * 50 * 2;
s = sys_command_cd_qcode (DF_IOCTL, unitnum);
static volatile int akiko_thread_running;
/* cdrom data buffering thread */
-static void *akiko_thread (void *null)
+static void *akiko_thread (void *null)
{
int i;
uae_u8 *tmp1;
(sector_buffer_sector_1 < 0 || sector < sector_buffer_sector_1 || sector >= sector_buffer_sector_1 + SECTOR_BUFFER_SIZE * 2 / 3 || i != SECTOR_BUFFER_SIZE)) {
memset (sector_buffer_info_2, 0, SECTOR_BUFFER_SIZE);
#if AKIKO_DEBUG_IO_CMD
- write_log("filling buffer sector=%d (max=%d)\n", sector, cdrom_data_end);
+ write_log ("filling buffer sector=%d (max=%d)\n", sector, cdrom_data_end);
#endif
sector_buffer_sector_2 = sector;
offset = 0;
{
return v >> ((3 - offset) * 8);
}
+
STATIC_INLINE void akiko_put_long (uae_u32 *p, int offset, int v)
{
*p &= ~(0xff << ((3 - offset) * 8));
{
/* "CAFE" = Akiko identification.
* Kickstart ignores Akiko C2P if this ID isn't correct */
- case 0x02:
+ case 0x02:
v = 0xCA;
break;
- case 0x03:
+ case 0x03:
v = 0xFE;
break;
if (currprefs.cs_cd32cd) {
/* CDROM control */
- case 0x04:
- case 0x05:
- case 0x06:
- case 0x07:
+ case 0x04:
+ case 0x05:
+ case 0x06:
+ case 0x07:
v = akiko_get_long (cdrom_status1, addr - 0x04);
break;
- case 0x08:
- case 0x09:
- case 0x0a:
- case 0x0b:
+ case 0x08:
+ case 0x09:
+ case 0x0a:
+ case 0x0b:
v = akiko_get_long (cdrom_status2, addr - 0x08);
break;
- case 0x10:
- case 0x11:
- case 0x12:
- case 0x13:
+ case 0x10:
+ case 0x11:
+ case 0x12:
+ case 0x13:
v = akiko_get_long (cdrom_address1, addr - 0x10);
break;
- case 0x14:
- case 0x15:
- case 0x16:
- case 0x17:
+ case 0x14:
+ case 0x15:
+ case 0x16:
+ case 0x17:
v = akiko_get_long (cdrom_address2, addr - 0x14);
break;
- case 0x18:
+ case 0x18:
v = cdrom_status3;
break;
- case 0x19:
+ case 0x19:
v = cdrom_command_offset_complete;
break;
- case 0x1a:
+ case 0x1a:
v = cdrom_result_complete;
break;
- case 0x1f:
+ case 0x1f:
v = cdrom_result_last_pos;
break;
- case 0x20:
- case 0x21:
+ case 0x20:
+ case 0x21:
v = akiko_get_long (cdrom_readmask_r, addr - 0x20 + 2);
break;
- case 0x24:
- case 0x25:
- case 0x26:
- case 0x27:
+ case 0x24:
+ case 0x25:
+ case 0x26:
+ case 0x27:
v = akiko_get_long (cdrom_longmask, addr - 0x24);
break;
} else if (addr < 0x30) {
break;
}
- /* NVRAM */
- case 0x30:
- case 0x31:
- case 0x32:
- case 0x33:
+ /* NVRAM */
+ case 0x30:
+ case 0x31:
+ case 0x32:
+ case 0x33:
if (currprefs.cs_cd32nvram)
- v = akiko_nvram_read (addr - 0x30);
- break;
+ v = akiko_nvram_read (addr - 0x30);
+ break;
/* C2P */
case 0x38:
case 0x39:
- case 0x3a:
+ case 0x3a:
case 0x3b:
if (currprefs.cs_cd32c2p)
v = akiko_c2p_read (addr - 0x38);
switch (addr)
{
if (currprefs.cs_cd32cd) {
- case 0x04:
- case 0x05:
- case 0x06:
- case 0x07:
+ case 0x04:
+ case 0x05:
+ case 0x06:
+ case 0x07:
akiko_put_long (&cdrom_status1, addr - 0x04, v);
break;
- case 0x08:
- case 0x09:
- case 0x0a:
- case 0x0b:
+ case 0x08:
+ case 0x09:
+ case 0x0a:
+ case 0x0b:
akiko_put_long (&cdrom_status2, addr - 0x08, v);
if (addr == 8)
cdrom_status1 &= cdrom_status2;
break;
- case 0x10:
- case 0x11:
- case 0x12:
- case 0x13:
+ case 0x10:
+ case 0x11:
+ case 0x12:
+ case 0x13:
akiko_put_long (&cdrom_address1, addr - 0x10, v);
break;
- case 0x14:
- case 0x15:
- case 0x16:
- case 0x17:
+ case 0x14:
+ case 0x15:
+ case 0x16:
+ case 0x17:
akiko_put_long (&cdrom_address2, addr - 0x14, v);
break;
- case 0x18:
+ case 0x18:
cdrom_status3 = v;
break;
- case 0x19:
+ case 0x19:
cdrom_command_offset_complete = v;
break;
- case 0x1a:
+ case 0x1a:
cdrom_result_complete = v;
break;
- case 0x1d:
+ case 0x1d:
cdrom_command_offset_todo = v;
break;
- case 0x1f:
+ case 0x1f:
cdrom_result_last_pos = v;
break;
- case 0x20:
+ case 0x20:
write_readmask(v <<8);
break;
- case 0x21:
+ case 0x21:
write_readmask(v);
break;
- case 0x24:
- case 0x25:
- case 0x26:
- case 0x27:
+ case 0x24:
+ case 0x25:
+ case 0x26:
+ case 0x27:
tmp = cdrom_longmask;
akiko_put_long (&cdrom_longmask, addr - 0x24, v);
if ((cdrom_longmask & 0x04000000) && !(tmp & 0x04000000))
break;
}
- case 0x30:
- case 0x31:
- case 0x32:
- case 0x33:
+ case 0x30:
+ case 0x31:
+ case 0x32:
+ case 0x33:
if (currprefs.cs_cd32nvram)
akiko_nvram_write (addr - 0x30, v);
break;
- case 0x38:
- case 0x39:
- case 0x3a:
- case 0x3b:
+ case 0x38:
+ case 0x39:
+ case 0x3a:
+ case 0x3b:
if (currprefs.cs_cd32c2p)
akiko_c2p_write (addr - 0x38, v);
- break;
+ break;
default:
write_log ("akiko_bput: unknown address %08.8X\n", addr);
#endif
addr &= 0xfff;
if((addr < 0x30 && AKIKO_DEBUG_IO))
- write_log("akiko_wput %08.8X: %08.8X=%04.4X\n", M68K_GETPC, addr, v & 0xffff);
+ write_log ("akiko_wput %08.8X: %08.8X=%04.4X\n", M68K_GETPC, addr, v & 0xffff);
akiko_bput2 (addr + 1, v & 0xff, 0);
akiko_bput2 (addr + 0, v >> 8, 0);
}
#endif
addr &= 0xffff;
if(addr < 0x30 && AKIKO_DEBUG_IO)
- write_log("akiko_lput %08.8X: %08.8X=%08.8X\n", M68K_GETPC, addr, v);
+ write_log ("akiko_lput %08.8X: %08.8X=%08.8X\n", M68K_GETPC, addr, v);
akiko_bput2 (addr + 3, (v >> 0) & 0xff, 0);
akiko_bput2 (addr + 2, (v >> 8) & 0xff, 0);
akiko_bput2 (addr + 1, (v >> 16) & 0xff, 0);
restore_u16 ();
cdrom_status1 = restore_u32 ();
cdrom_status2 = restore_u32 ();
- restore_u32();
+ restore_u32 ();
cdrom_address1 = restore_u32 ();
cdrom_address2 = restore_u32 ();
cdrom_status3 = restore_u8 ();
cdrom_readmask_w = restore_u16 ();
restore_u16 ();
cdrom_longmask = restore_u32 ();
- restore_u32();
- restore_u32();
- v = restore_u32();
+ restore_u32 ();
+ restore_u32 ();
+ v = restore_u32 ();
scl_dir = (v & 0x8000) ? 1 : 0;
sda_dir = (v & 0x4000) ? 1 : 0;
- restore_u32();
- restore_u32();
+ restore_u32 ();
+ restore_u32 ();
for (i = 0; i < 8; i++)
akiko_buffer[i] = restore_u32 ();
cdrom_speed = restore_u8 ();
cdrom_current_sector = (uae_s8)restore_u8 ();
- restore_u32();
- restore_u8();
- restore_u32();
+ restore_u32 ();
+ restore_u8 ();
+ restore_u32 ();
return src;
}
int cd32_enabled;
-static int m68k_getpc(void) { return 0; }
+static int m68k_getpc (void) { return 0; }
/*
* CD32 1Kb NVRAM (EEPROM) emulation
}
return;
}
- }
+ }
if (bitcounter >= 0) {
if (direction) {
/* Amiga -> NVRAM */
if (scl_out && !oscl) {
if (bitcounter == 8) {
#if AKIKO_DEBUG_NVRAM
- write_log ("RB %02.2X ", nvram_byte, m68k_getpc());
+ write_log ("RB %02.2X ", nvram_byte, m68k_getpc ());
#endif
sda_in = 0; /* ACK */
if (direction > 0) {
bitcounter = -1;
}
} else {
- //write_log("NVRAM received bit %d, offset %d\n", sda_out, bitcounter);
+ //write_log ("NVRAM received bit %d, offset %d\n", sda_out, bitcounter);
nvram_byte <<= 1;
nvram_byte |= sda_out;
bitcounter++;
nvram_byte = cd32_nvram[nvram_address];
sda_dir_nvram = 1;
sda_in = (nvram_byte & 0x80) ? 1 : 0;
- //write_log("NVRAM sent bit %d, offset %d\n", sda_in, bitcounter);
+ //write_log ("NVRAM sent bit %d, offset %d\n", sda_in, bitcounter);
nvram_byte <<= 1;
bitcounter++;
if (bitcounter == 8) {
#if AKIKO_DEBUG_NVRAM
- write_log ("NVRAM sent byte %02.2X address %04.4X PC=%08.8X\n", cd32_nvram[nvram_address], nvram_address, m68k_getpc());
+ write_log ("NVRAM sent byte %02.2X address %04.4X PC=%08.8X\n", cd32_nvram[nvram_address], nvram_address, m68k_getpc ());
#endif
nvram_address++;
nvram_address &= NVRAM_SIZE - 1;
}
bitcounter = 0;
#if AKIKO_DEBUG_NVRAM
- write_log ("I2C_DEVICEADDR: rw %d, address %02.2Xxx PC=%08.8X\n", nvram_rw, nvram_address >> 8, m68k_getpc());
+ write_log ("I2C_DEVICEADDR: rw %d, address %02.2Xxx PC=%08.8X\n", nvram_rw, nvram_address >> 8, m68k_getpc ());
#endif
break;
case I2C_WORDADDR:
nvram_address &= 0x300;
nvram_address |= nvram_byte;
#if AKIKO_DEBUG_NVRAM
- write_log ("I2C_WORDADDR: address %04.4X PC=%08.8X\n", nvram_address, m68k_getpc());
+ write_log ("I2C_WORDADDR: address %04.4X PC=%08.8X\n", nvram_address, m68k_getpc ());
#endif
if (direction < 0) {
memcpy (nvram_writetmp, cd32_nvram + (nvram_address & ~(NVRAM_PAGE_SIZE - 1)), NVRAM_PAGE_SIZE);
} else
return;
#if AKIKO_DEBUG_IO_CMD
- write_log("read sector=%d, scnt=%d -> %d\n", cdrom_data_offset, cdrom_sector_counter, sector);
+ write_log ("read sector=%d, scnt=%d -> %d\n", cdrom_data_offset, cdrom_sector_counter, sector);
#endif
cdrom_readmask_w &= ~(1 << j);
cdrom_status1 |= CDSTATUS_DATASECTOR;
return;
}
}
-
+
static void akiko_internal (void)
{
cdrom_run_command ();
if (cdrom_data_end > 0 && sector >= 0 && (sector_buffer_sector_1 < 0 || sector < sector_buffer_sector_1 || sector >= sector_buffer_sector_1 + SECTOR_BUFFER_SIZE * 2 / 3 || i != SECTOR_BUFFER_SIZE)) {
memset (sector_buffer_info_2, 0, SECTOR_BUFFER_SIZE);
#if AKIKO_DEBUG_IO_CMD
- write_log("filling buffer sector=%d (max=%d)\n", sector, cdrom_data_end);
+ write_log ("filling buffer sector=%d (max=%d)\n", sector, cdrom_data_end);
#endif
sector_buffer_sector_2 = sector;
offset = 0;
akiko_internal ();
uae_sem_post (&akiko_sem);
if (msg && addr < 0x30 && AKIKO_DEBUG_IO)
- write_log ("akiko_bget %08.8X: %08.8X %02.2X\n", m68k_getpc(), addr, v & 0xff);
+ write_log ("akiko_bget %08.8X: %08.8X %02.2X\n", m68k_getpc (), addr, v & 0xff);
return v;
}
v = akiko_bget2 (addr + 1, 0);
v |= akiko_bget2 (addr + 0, 0) << 8;
if (addr < 0x30 && AKIKO_DEBUG_IO)
- write_log ("akiko_wget %08.8X: %08.8X %04.4X\n", m68k_getpc(), addr, v & 0xffff);
+ write_log ("akiko_wget %08.8X: %08.8X %04.4X\n", m68k_getpc (), addr, v & 0xffff);
return v;
}
v |= akiko_bget2 (addr + 1, 0) << 16;
v |= akiko_bget2 (addr + 0, 0) << 24;
if (addr < 0x30 && (addr != 4 && addr != 8) && AKIKO_DEBUG_IO)
- write_log ("akiko_lget %08.8X: %08.8X %08.8X\n", m68k_getpc(), addr, v);
+ write_log ("akiko_lget %08.8X: %08.8X %08.8X\n", m68k_getpc (), addr, v);
return v;
}
addr &= 0xffff;
v &= 0xff;
if(msg && addr < 0x30 && AKIKO_DEBUG_IO)
- write_log ("akiko_bput %08.8X: %08.8X=%02.2X\n", m68k_getpc(), addr, v & 0xff);
+ write_log ("akiko_bput %08.8X: %08.8X=%02.2X\n", m68k_getpc (), addr, v & 0xff);
uae_sem_wait (&akiko_sem);
switch (addr)
{
{
addr &= 0xfff;
if((addr < 0x30 && AKIKO_DEBUG_IO))
- write_log("akiko_wput %08.8X: %08.8X=%04.4X\n", m68k_getpc(), addr, v & 0xffff);
+ write_log ("akiko_wput %08.8X: %08.8X=%04.4X\n", m68k_getpc (), addr, v & 0xffff);
akiko_bput2 (addr + 1, v & 0xff, 0);
akiko_bput2 (addr + 0, v >> 8, 0);
}
{
addr &= 0xffff;
if(addr < 0x30 && AKIKO_DEBUG_IO)
- write_log("akiko_lput %08.8X: %08.8X=%08.8X\n", m68k_getpc(), addr, v);
+ write_log ("akiko_lput %08.8X: %08.8X=%08.8X\n", m68k_getpc (), addr, v);
akiko_bput2 (addr + 3, (v >> 0) & 0xff, 0);
akiko_bput2 (addr + 2, (v >> 8) & 0xff, 0);
akiko_bput2 (addr + 1, (v >> 16) & 0xff, 0);
if (!savestate_state) {
cdrom_playing = cdrom_paused = 0;
cdrom_data_offset = -1;
- uae_sem_init (&akiko_sem, 0, 1);
+ uae_sem_init (&akiko_sem, 0, 1);
}
if (cdromok && !akiko_thread_running) {
akiko_thread_running = 1;
save_u32 (akiko_buffer[i]);
save_u8 ((uae_u8)akiko_read_offset);
save_u8 ((uae_u8)akiko_write_offset);
-
+
save_u32 ((cdrom_playing ? 1 : 0) | (cdrom_paused ? 2 : 0));
if (cdrom_playing)
cd_qcode (0);
*
* Found to work for the following roms by Mark Cox:
* (Yes the date format is inconsistent, i just copied it straight from the rom)
- * 1.15
+ * 1.15
* 2.14 22/02/91 dd/mm/yy
* 3.09 10/13/91 mm/dd/yy
* 3.17 12/17/91 mm/dd/yy
*
* This patch also makes AR3 compatible with KickStart's other than 1.3
* (ROM checksum error is normal with KS != 1.3)
- * NOTE: AR has problems with 68020+ processors
+ * NOTE: AR has problems with 68020+ processors.
* For maximum compatibility select 68000/68010 and A500 speed from UAE
* options.
*
* with<RETURN>
* you<RETURN>
* new<RETURN> (AR3 only)
- *
+ *
* AR1: 64K ROM is visible at 0xf00000-0xf0ffff
* and 16K RAM at 0x9fc000-0x9fffff
* AR2: 128K ROM is visible at 0x400000-0x41ffff
*
* Data: 0-2,1-3,2-4,3-5,4-6,5-7,6-0,7-1
* Addr: 0-3,1-6,2-5,3-7,4-9,5-12,6-14,7-13,8-8,9-11,10-10,11-1,12-0,13-4,14-2,15-15
- *
+ *
*/
#include "sysconfig.h"
static int hrtmem_rom;
static int triggered_once;
-static void hrtmon_unmap_banks(void);
+static void hrtmon_unmap_banks (void);
void check_prefs_changed_carts(int in_memory_reset);
-int action_replay_unload(int in_memory_reset);
+int action_replay_unload (int in_memory_reset);
static int stored_picasso_on = -1;
addr &= hrtmem3_mask;
return hrtmemory3[addr];
}
+
static uae_u32 REGPARAM2 hrtmem3_wget (uaecptr addr)
{
return (hrtmem3_bget (addr) << 8) | hrtmem3_bget (addr + 1);
}
+
static uae_u32 REGPARAM2 hrtmem3_lget (uaecptr addr)
{
return (hrtmem3_wget (addr) << 16) | hrtmem3_wget (addr + 2);
m = (uae_u16 *)(hrtmemory3 + addr);
do_put_mem_word (m, (uae_u16)w);
}
+
static void REGPARAM2 hrtmem3_bput (uaecptr addr, uae_u32 b)
{
addr -= hrtmem3_start & hrtmem3_mask;
static uae_u32 REGPARAM2 hrtmem2_bget (uaecptr addr)
{
if (addr == 0xb8007c && cart_type == CART_SUPER4) {
- static int cnt = 60;
+ static int cnt = 60;
cnt--;
if (cnt == 0)
uae_reset(0);
hrtmem3_xlate, hrtmem3_check, NULL, "Cartridge Bank 3",
hrtmem3_lget, hrtmem3_wget, ABFLAG_RAM
};
-static void copyfromamiga(uae_u8 *dst,uaecptr src,int len)
+
+static void copyfromamiga (uae_u8 *dst, uaecptr src, int len)
{
-while(len--) {
- *dst++ = get_byte (src);
- src++;
-}
+ while (len--) {
+ *dst++ = get_byte (src);
+ src++;
+ }
}
-static void copytoamiga(uaecptr dst,uae_u8 *src,int len)
+
+static void copytoamiga (uaecptr dst, uae_u8 *src, int len)
{
-while(len--) {
- put_byte (dst, *src++);
- dst++;
-}
+ while (len--) {
+ put_byte (dst, *src++);
+ dst++;
+ }
}
int action_replay_flag = ACTION_REPLAY_INACTIVE;
/* returns true if the Program counter is currently in the AR rom. */
int is_ar_pc_in_rom()
{
- uaecptr pc = m68k_getpc(®s) & 0xFFFFFF;
+ uaecptr pc = m68k_getpc (®s) & 0xFFFFFF;
return pc >= arrom_start && pc < arrom_start+arrom_size;
}
/* returns true if the Program counter is currently in the AR RAM. */
int is_ar_pc_in_ram()
{
- uaecptr pc = m68k_getpc(®s) & 0xFFFFFF;
+ uaecptr pc = m68k_getpc (®s) & 0xFFFFFF;
return pc >= arram_start && pc < arram_start+arram_size;
}
STATIC_INLINE int ar3a (uaecptr addr, uae_u8 b, int writing)
{
uaecptr pc;
-/* if ( addr < 8 ) //|| writing ) */
+/* if (addr < 8) //|| writing ) */
/* { */
-/* if ( writing ) */
-/* write_log_debug("ARSTATUS armode:%d, Writing %d to address %p, PC=%p\n", armode, b, addr, m68k_getpc()); */
+/* if (writing) */
+/* write_log_debug("ARSTATUS armode:%d, Writing %d to address %p, PC=%p\n", armode, b, addr, m68k_getpc ()); */
/* else */
-/* write_log_debug("ARSTATUS armode:%d, Reading %d from address %p, PC=%p\n", armode, armemory_rom[addr], addr, m68k_getpc()); */
+/* write_log_debug("ARSTATUS armode:%d, Reading %d from address %p, PC=%p\n", armode, armemory_rom[addr], addr, m68k_getpc ()); */
/* } */
if (armodel == 1) /* With AR1. It is always a read. Actually, it is a strobe on exit of the AR.
* but, it is also read during the checksum routine. */
{
- if (addr < 2)
- {
- if (is_ar_pc_in_rom())
- {
- if (ar_wait_pop)
- {
+ if (addr < 2) {
+ if (is_ar_pc_in_rom()) {
+ if (ar_wait_pop) {
action_replay_flag = ACTION_REPLAY_WAIT_PC;
-/* write_log_debug("SP %p\n", m68k_areg(regs,7)); */
-/* write_log_debug("SP+2 %p\n", m68k_areg(regs,7)+2 ); */
-/* write_log_debug("(SP+2) %p\n", longget(m68k_areg(regs,7)+2)); */
+/* write_log_debug ("SP %p\n", m68k_areg (regs, 7)); */
+/* write_log_debug ("SP+2 %p\n", m68k_areg (regs, 7) + 2); */
+/* write_log_debug ("(SP+2) %p\n", longget (m68k_areg (regs, 7) + 2)); */
ar_wait_pop = 0;
/* We get (SP+2) here, as the first word on the stack is the status register. */
/* We want the following long, which is the return program counter. */
- wait_for_pc = longget(m68k_areg(®s,7)+2); /* Get (SP+2) */
+ wait_for_pc = longget (m68k_areg (®s, 7) + 2); /* Get (SP+2) */
set_special (®s, SPCFLAG_ACTION_REPLAY);
- pc = m68k_getpc(®s);
-/* write_log_debug("Action Replay marked as ACTION_REPLAY_WAIT_PC, PC=%p\n",pc);*/
+ pc = m68k_getpc (®s);
+/* write_log_debug ("Action Replay marked as ACTION_REPLAY_WAIT_PC, PC=%p\n",pc);*/
}
else
{
- uaecptr pc = m68k_getpc(®s);
-/* write_log_debug("Action Replay marked as IDLE, PC=%p\n",pc);*/
+ uaecptr pc = m68k_getpc (®s);
+/* write_log_debug ("Action Replay marked as IDLE, PC=%p\n",pc);*/
action_replay_flag = ACTION_REPLAY_IDLE;
}
}
/* else, we are writing */
else if (addr == 1) {
armode = b;
- if(armode >= 2)
- {
- if ( armode == ARMODE_BREAKPOINT_AR2 )
- {
- write_log("AR2: exit with breakpoint(s) active\n"); /* Correct for AR2 */
- }
- else if ( armode == ARMODE_BREAKPOINT_AR3_RESET_AR2 )
- {
- write_log("AR3: exit waiting for breakpoint.\n"); /* Correct for AR3 (waiting for breakpoint)*/
- }
+ if (armode >= 2) {
+ if (armode == ARMODE_BREAKPOINT_AR2) {
+ write_log ("AR2: exit with breakpoint(s) active\n"); /* Correct for AR2 */
+ } else if (armode == ARMODE_BREAKPOINT_AR3_RESET_AR2 )
+ write_log ("AR3: exit waiting for breakpoint.\n"); /* Correct for AR3 (waiting for breakpoint)*/
else
- {
- write_log("AR2/3: mode(%d) > 3 this shouldn't happen.\n", armode);
- }
- } else {
- write_log("AR: exit with armode(%d)\n", armode);
- }
+ write_log ("AR2/3: mode(%d) > 3 this shouldn't happen.\n", armode);
+ } else
+ write_log ("AR: exit with armode(%d)\n", armode);
+
set_special (®s, SPCFLAG_ACTION_REPLAY);
action_replay_flag = ACTION_REPLAY_HIDE;
} else if (addr == 6) {
static void REGPARAM3 arrom_bput (uaecptr, uae_u32) REGPARAM;
static int REGPARAM3 arrom_check (uaecptr addr, uae_u32 size) REGPARAM;
static uae_u8 *REGPARAM3 arrom_xlate (uaecptr addr) REGPARAM;
-static void action_replay_unmap_banks(void);
+static void action_replay_unmap_banks (void);
static uae_u32 action_replay_calculate_checksum(void);
static uae_u8* get_checksum_location(void);
addr -= arram_start;
addr &= arram_mask;
m = (uae_u32 *)(armemory_ram + addr);
- if (strncmp("T8", (char*)m, 2) == 0)
- write_log_debug("Reading T8 from addr %08.08x PC=%p\n", addr, m68k_getpc(®s));
- if (strncmp("LAME", (char*)m, 4) == 0)
- write_log_debug("Reading LAME from addr %08.08x PC=%p\n", addr, m68k_getpc(®s));
- if (strncmp("RES1", (char*)m, 4) == 0)
- write_log_debug("Reading RES1 from addr %08.08x PC=%p\n", addr, m68k_getpc(®s));
- if (strncmp("ARON", (char*)m, 4) == 0)
- write_log_debug("Reading ARON from addr %08.08x PC=%p\n", addr, m68k_getpc(®s));
- if (strncmp("KILL", (char*)m, 4) == 0)
- write_log_debug("Reading KILL from addr %08.08x PC=%p\n", addr, m68k_getpc(®s));
- if (strncmp("BRON", (char*)m, 4) == 0)
- write_log_debug("Reading BRON from addr %08.08x PC=%p\n", addr, m68k_getpc(®s));
- if (strncmp("PRIN", (char*)m, 4) == 0)
- write_log_debug("Reading PRIN from addr %08.08x PC=%p\n", addr, m68k_getpc(®s));
+ if (strncmp ("T8", (char*)m, 2) == 0)
+ write_log_debug ("Reading T8 from addr %08.08x PC=%p\n", addr, m68k_getpc (®s));
+ if (strncmp ("LAME", (char*)m, 4) == 0)
+ write_log_debug ("Reading LAME from addr %08.08x PC=%p\n", addr, m68k_getpc (®s));
+ if (strncmp ("RES1", (char*)m, 4) == 0)
+ write_log_debug ("Reading RES1 from addr %08.08x PC=%p\n", addr, m68k_getpc (®s));
+ if (strncmp ("ARON", (char*)m, 4) == 0)
+ write_log_debug ("Reading ARON from addr %08.08x PC=%p\n", addr, m68k_getpc (®s));
+ if (strncmp ("KILL", (char*)m, 4) == 0)
+ write_log_debug ("Reading KILL from addr %08.08x PC=%p\n", addr, m68k_getpc (®s));
+ if (strncmp ("BRON", (char*)m, 4) == 0)
+ write_log_debug ("Reading BRON from addr %08.08x PC=%p\n", addr, m68k_getpc (®s));
+ if (strncmp ("PRIN", (char*)m, 4) == 0)
+ write_log_debug ("Reading PRIN from addr %08.08x PC=%p\n", addr, m68k_getpc (®s));
return do_get_mem_long (m);
}
addr -= arram_start;
addr &= arram_mask;
m = (uae_u32 *)(armemory_ram + addr);
- if (strncmp("T8", (char*)m, 2) == 0)
- write_log_debug("Writing T8 to addr %08.08x PC=%p\n", addr, m68k_getpc(®s));
- if (strncmp("LAME", (char*)m, 4) == 0)
- write_log_debug("Writing LAME to addr %08.08x PC=%p\n", addr, m68k_getpc(®s));
- if (strncmp("RES1", (char*)m, 4) == 0)
- write_log_debug("Writing RES1 to addr %08.08x PC=%p\n", addr, m68k_getpc(®s));
- if (strncmp("ARON", (char*)m, 4) == 0)
- write_log_debug("Writing ARON to addr %08.08x PC=%p\n", addr, m68k_getpc(®s));
- if (strncmp("KILL", (char*)m, 4) == 0)
- write_log_debug("Writing KILL to addr %08.08x PC=%p\n", addr, m68k_getpc(®s));
- if (strncmp("BRON", (char*)m, 4) == 0)
- write_log_debug("Writing BRON to addr %08.08x PC=%p\n", addr, m68k_getpc(®s));
- if (strncmp("PRIN", (char*)m, 4) == 0)
- write_log_debug("Writing PRIN to addr %08.08x PC=%p\n", addr, m68k_getpc(®s));
+ if (strncmp ("T8", (char*)m, 2) == 0)
+ write_log_debug ("Writing T8 to addr %08.08x PC=%p\n", addr, m68k_getpc (®s));
+ if (strncmp ("LAME", (char*)m, 4) == 0)
+ write_log_debug ("Writing LAME to addr %08.08x PC=%p\n", addr, m68k_getpc (®s));
+ if (strncmp ("RES1", (char*)m, 4) == 0)
+ write_log_debug ("Writing RES1 to addr %08.08x PC=%p\n", addr, m68k_getpc (®s));
+ if (strncmp ("ARON", (char*)m, 4) == 0)
+ write_log_debug ("Writing ARON to addr %08.08x PC=%p\n", addr, m68k_getpc (®s));
+ if (strncmp ("KILL", (char*)m, 4) == 0)
+ write_log_debug ("Writing KILL to addr %08.08x PC=%p\n", addr, m68k_getpc (®s));
+ if (strncmp ("BRON", (char*)m, 4) == 0)
+ write_log_debug ("Writing BRON to addr %08.08x PC=%p\n", addr, m68k_getpc (®s));
+ if (strncmp ("PRIN", (char*)m, 4) == 0)
+ write_log_debug ("Writing PRIN to addr %08.08x PC=%p\n", addr, m68k_getpc (®s));
do_put_mem_long (m, l);
}
arram_lget, arram_wget, ABFLAG_RAM
};
-static void action_replay_unmap_banks()
+static void action_replay_unmap_banks ()
{
if(!armemory_rom)
return;
if (armodel == 1) {
- action_replay_map_banks();
+ action_replay_map_banks ();
return;
}
map_banks (&dummy_bank, arrom_start >> 16 , arrom_size >> 16, 0);
map_banks (&dummy_bank, arram_start >> 16 , arram_size >> 16, 0);
}
-static void action_replay_map_banks()
+static void action_replay_map_banks ()
{
if(!armemory_rom)
return;
{
#ifdef ACTION_REPLAY_HIDE_CARTRIDGE
if(hide) {
- action_replay_unmap_banks();
+ action_replay_unmap_banks ();
} else {
- action_replay_map_banks();
+ action_replay_map_banks ();
}
#endif
}
action_replay_flag = ACTION_REPLAY_ACTIVE;
set_special (®s, SPCFLAG_ACTION_REPLAY);
copyfromamiga (artemp, regs.vbr + 0x7c, 4);
- copytoamiga (regs.vbr+0x7c, armemory_rom + 0x7c, 4);
+ copytoamiga (regs.vbr + 0x7c, armemory_rom + 0x7c, 4);
NMI ();
}
{
uaecptr old;
int i;
-
+
triggered_once = 1;
cartridge_enter();
hrtmon_flag = ACTION_REPLAY_ACTIVE;
hrtmon_ciab[i * hrtmon_ciadiv + 0] = ar_ciab[i];
}
if (cart_type == CART_AR1200) {
- old = get_long((uaecptr)(regs.vbr + 0x8));
+ old = get_long ((uaecptr)(regs.vbr + 0x8));
put_word (hrtmem_start + 0xc0000, 4);
put_long ((uaecptr)(regs.vbr + 8), get_long (hrtmem_start + 8));
Exception (2, ®s, 0);
} else if (cart_type == CART_SUPER4) {
uae_u32 v = get_long (hrtmem_start + 0x7c);
if (v) {
- old = get_long((uaecptr)(regs.vbr + 0x7c));
+ old = get_long ((uaecptr)(regs.vbr + 0x7c));
put_long ((uaecptr)(regs.vbr + 0x7c), v);
NMI ();
put_long ((uaecptr)(regs.vbr + 0x7c), old);
}
} else {
- old = get_long((uaecptr)(regs.vbr + 0x7c));
+ old = get_long ((uaecptr)(regs.vbr + 0x7c));
put_long ((uaecptr)(regs.vbr + 0x7c), hrtmem_start + 12 + 2 + get_word (hrtmem_start + 14));
NMI ();
//put_long ((uaecptr)(regs.vbr + 0x7c), old);
void cartridge_init (void)
{
if (hrtmemory && cart_type != CART_AR1200) {
- hrtmon_map_banks ();
+ hrtmon_map_banks ();
put_long ((uaecptr)(regs.vbr + 0x7c), hrtmem_start + 12 + 2 + get_word (hrtmem_start + 14));
}
}
if (!hrtmemory)
return;
hrtmon_map_banks ();
- write_log("%s: freeze\n", cart_memnames[cart_type]);
+ write_log ("%s: freeze\n", cart_memnames[cart_type]);
hrtmon_go();
}
return;
triggered_once = 1;
if (armodel == 1) {
- write_log("AR1: Enter PC:%p\n", m68k_getpc(®s));
+ write_log ("AR1: Enter PC:%p\n", m68k_getpc (®s));
action_replay_go1 (7);
unset_special (®s, SPCFLAG_ACTION_REPLAY);
return;
}
if (action_replay_flag == ACTION_REPLAY_DORESET) {
- write_log("AR2/3: reset\n");
+ write_log ("AR2/3: reset\n");
armode = ARMODE_BREAKPOINT_AR3_RESET_AR2;
- }
- else if (armode == ARMODE_FREEZE) {
- write_log("AR2/3: activated (freeze)\n");
- }
- else if (armode >= 2)
- {
- if ( armode == ARMODE_BREAKPOINT_AR2 )
- {
- write_log("AR2: activated (breakpoint)\n");
- }
- else if ( armode == ARMODE_BREAKPOINT_AR3_RESET_AR2 )
- {
- write_log("AR3: activated (breakpoint)\n");
- }
+ } else if (armode == ARMODE_FREEZE) {
+ write_log ("AR2/3: activated (freeze)\n");
+ } else if (armode >= 2) {
+ if (armode == ARMODE_BREAKPOINT_AR2)
+ write_log ("AR2: activated (breakpoint)\n");
+ else if (armode == ARMODE_BREAKPOINT_AR3_RESET_AR2)
+ write_log ("AR3: activated (breakpoint)\n");
else
- {
- write_log("AR2/3: mode(%d) > 3 this shouldn't happen.\n", armode);
- }
+ write_log ("AR2/3: mode(%d) > 3 this shouldn't happen.\n", armode);
armode = ARMODE_BREAKPOINT_ACTIVATED;
}
action_replay_go();
if (currprefs.cart_internal != changed_prefs.cart_internal)
currprefs.cart_internal = changed_prefs.cart_internal;
if (strcmp (currprefs.cartfile, changed_prefs.cartfile) != 0) {
- write_log("Cartridge ROM Prefs changed.\n");
- if (action_replay_unload(in_memory_reset)) {
+ write_log ("Cartridge ROM Prefs changed.\n");
+ if (action_replay_unload (in_memory_reset)) {
memcpy (currprefs.cartfile, changed_prefs.cartfile, sizeof currprefs.cartfile);
#ifdef ACTION_REPLAY
- action_replay_load();
+ action_replay_load ();
action_replay_init(1);
#endif
#ifdef ACTION_REPLAY_HRTMON
- hrtmon_load();
+ hrtmon_load ();
#endif
}
}
{
if (hrtmemory) {
if (savestate_state == STATE_RESTORE) {
- if (m68k_getpc(®s) >= hrtmem_start && m68k_getpc(®s) <= hrtmem_start + hrtmem_size)
- hrtmon_map_banks();
+ if (m68k_getpc (®s) >= hrtmem_start && m68k_getpc (®s) <= hrtmem_start + hrtmem_size)
+ hrtmon_map_banks ();
else
- hrtmon_unmap_banks();
+ hrtmon_unmap_banks ();
}
} else {
if (action_replay_flag == ACTION_REPLAY_INACTIVE)
return;
if (savestate_state == STATE_RESTORE) {
- if (m68k_getpc(®s) >= arrom_start && m68k_getpc(®s) <= arrom_start + arrom_size) {
+ if (m68k_getpc (®s) >= arrom_start && m68k_getpc (®s) <= arrom_start + arrom_size) {
action_replay_flag = ACTION_REPLAY_ACTIVE;
hide_cart (0);
} else {
}
return;
}
- if (armodel == 1) {
+ if (armodel == 1) {
/* We need to mark it as active here, because the kickstart rom jumps directly into it. */
action_replay_flag = ACTION_REPLAY_ACTIVE;
} else {
- write_log_debug("Setting flag to ACTION_REPLAY_WAITRESET\n");
- write_log_debug("armode == %d\n", armode);
+ write_log_debug ("Setting flag to ACTION_REPLAY_WAITRESET\n");
+ write_log_debug ("armode == %d\n", armode);
action_replay_flag = ACTION_REPLAY_WAITRESET;
}
}
return;
if (action_replay_flag == ACTION_REPLAY_INACTIVE)
return;
- if (armode < 2) /* If there are no active breakpoints*/
+ if (armode < 2)
+ /* If there are no active breakpoints */
return;
- if (m68k_getpc(®s) >= 0x200)
+ if (m68k_getpc (®s) >= 0x200)
return;
action_replay_flag = ACTION_REPLAY_ACTIVATE;
set_special (®s, SPCFLAG_ACTION_REPLAY);
int action_replay_freeze(void)
{
- if(action_replay_flag == ACTION_REPLAY_IDLE) {
+ if (action_replay_flag == ACTION_REPLAY_IDLE) {
if (armodel == 1) {
action_replay_chipwrite();
} else {
* 2.14 0xad839d36
* 2.14 0xad839d36
* 1.15 0xee12116
- */
+ */
if (!armemory_rom)
- return 0; /* If there is no rom then i guess the checksum is ok */
+ return 0; /* If there is no rom then i guess the checksum is ok */
checksum_start = (uae_u32*)&armemory_rom[checksum_start_offset[armodel]];
checksum_end = (uae_u32*)&armemory_rom[ar_rom_file_size];
/* Search for first non-zero Long starting from the end of the rom. */
/* Assume long alignment, (will always be true for AR2 and AR3 and the AR1 rom i've got). */
- /* If anyone finds an AR1 rom with a word-aligned checksum, then this code will have to be modified. */
+ /* If anyone finds an AR1 rom with a word-aligned checksum, then this code will have to be modified. */
while (! *(--checksum_end));
if (armodel == 1)
}
}
- stored_checksum = do_get_mem_long(checksum_end);
+ stored_checksum = do_get_mem_long (checksum_end);
return checksum == stored_checksum ? 0 : checksum;
}
/* Replaces the existing cart checksum with a correct one. */
-/* Useful if you want to patch the rom.*/
+/* Useful if you want to patch the rom. */
static void action_replay_fixup_checksum(uae_u32 new_checksum)
{
uae_u32* checksum = (uae_u32*)get_checksum_location();
if (checksum)
- {
- do_put_mem_long(checksum, new_checksum);
- }
+ do_put_mem_long (checksum, new_checksum);
else
- {
- write_log("Unable to locate Checksum in ROM.\n");
- }
+ write_log ("Unable to locate Checksum in ROM.\n");
return;
}
* the search_value is assumed to already be in the local endian format
* return 0 on failure
*/
-static uae_u8* find_absolute_long(uae_u8* start_addr, uae_u8* end_addr, uae_u32 search_value)
+static uae_u8* find_absolute_long (uae_u8* start_addr, uae_u8* end_addr, uae_u32 search_value)
{
uae_u8* addr;
for (addr = start_addr; addr < end_addr;) {
- if (do_get_mem_long((uae_u32*)addr) == search_value) {
+ if (do_get_mem_long ((uae_u32*)addr) == search_value) {
/* write_log_debug("Found %p at offset %p.\n", search_value, addr - start_addr);*/
return addr;
}
uae_u8* start_addr = armemory_rom;
uae_u8* end_addr = get_checksum_location();
-/*
- * To see what the routine below is doing. Here is some code from the Action replay rom where it does the
- * checksum test.
- * AR1:
- * F0D4D0 6100 ???? bsr.w calc_checksum ; calculate the checksum
- * F0D4D4 41FA 147A lea (0xf0e950,PC),a0 ; load the existing checksum.
- * ; do a comparison.
- * AR2:
- * 40EC92 6100 ???? bsr.w calc_checksum
- * 40EC96 41F9 0041 FFFC lea (0x41fffc),a0
- */
+ /*
+ * To see what the routine below is doing. Here is some code from the Action replay rom where it does the
+ * checksum test.
+ * AR1:
+ * F0D4D0 6100 ???? bsr.w calc_checksum ; calculate the checksum
+ * F0D4D4 41FA 147A lea (0xf0e950,PC),a0 ; load the existing checksum.
+ * ; do a comparison.
+ * AR2:
+ * 40EC92 6100 ???? bsr.w calc_checksum
+ * 40EC96 41F9 0041 FFFC lea (0x41fffc),a0
+ */
if (armodel == 1) {
uae_u16 search_value_rel = end_addr - start_addr;
if (addr) {
if (do_get_mem_word((uae_u16*)(addr-6)) == 0x6100 && /* bsr.w */
- do_get_mem_word((uae_u16*)(addr-2)) == 0x41fa) /* lea relative */
+ do_get_mem_word((uae_u16*)(addr-2)) == 0x41fa) /* lea relative */
{
- write_log("Patching to disable ROM TEST.\n");
+ write_log ("Patching to disable ROM TEST.\n");
do_put_mem_word((uae_u16*)(addr-6), 0x4e75); /* rts */
}
}
} else {
uae_u32 search_value_abs = arrom_start + end_addr - start_addr;
- addr = find_absolute_long(start_addr, end_addr, search_value_abs);
+ addr = find_absolute_long (start_addr, end_addr, search_value_abs);
if (addr) {
if (do_get_mem_word((uae_u16*)(addr-6)) == 0x6100 && /* bsr.w */
do_get_mem_word((uae_u16*)(addr-2)) == 0x41f9) /* lea absolute */
{
- write_log("Patching to disable ROM TEST.\n");
+ write_log ("Patching to disable ROM TEST.\n");
do_put_mem_word((uae_u16*)(addr-6), 0x4e75); /* rts */
}
}
if (!armemory_rom)
return;
if (action_replay_calculate_checksum() == 0)
- write_log("Action Replay Checksum is OK.\n");
+ write_log ("Action Replay Checksum is OK.\n");
else
- write_log("Action Replay Checksum is INVALID.\n");
+ write_log ("Action Replay Checksum is INVALID.\n");
disable_rom_test();
}
static void action_replay_setbanks (void)
{
if (!savestate_state && chipmem_bank.lput == chipmem_lput) {
- switch (armodel)
- {
- case 2:
- case 3:
+ switch (armodel) {
+ case 2:
+ case 3:
if (currprefs.cpu_cycle_exact)
chipmem_bank.wput = chipmem_wput_actionreplay23;
chipmem_bank.lput = chipmem_lput_actionreplay23;
break;
- case 1:
+ case 1:
chipmem_bank.bput = chipmem_bput_actionreplay1;
chipmem_bank.wput = chipmem_wput_actionreplay1;
chipmem_bank.lput = chipmem_lput_actionreplay1;
break;
}
- }
+ }
}
static void action_replay_unsetbanks (void)
}
/* param to allow us to unload the cart. Currently we know it is safe if we are doing a reset to unload it.*/
-int action_replay_unload(int in_memory_reset)
+int action_replay_unload (int in_memory_reset)
{
- char* state[] =
- {
- "ACTION_REPLAY_WAIT_PC",
+ static const char *state[] = {
+ "ACTION_REPLAY_WAIT_PC",
"ACTION_REPLAY_INACTIVE",
"ACTION_REPLAY_WAITRESET",
"0",
};
write_log_debug("Action Replay State:(%s)\nHrtmon State:(%s)\n", state[action_replay_flag+3],state[hrtmon_flag+3]);
-
+
if (armemory_rom && armodel == 1) {
if (is_ar_pc_in_ram() || is_ar_pc_in_rom() || action_replay_flag == ACTION_REPLAY_WAIT_PC) {
- write_log("Can't Unload Action Replay 1. It is Active.\n");
+ write_log ("Can't Unload Action Replay 1. It is Active.\n");
return 0;
}
} else {
- if (action_replay_flag != ACTION_REPLAY_IDLE && action_replay_flag != ACTION_REPLAY_INACTIVE) {
- write_log("Can't Unload Action Replay. It is Active.\n");
+ if (action_replay_flag != ACTION_REPLAY_IDLE && action_replay_flag != ACTION_REPLAY_INACTIVE) {
+ write_log ("Can't Unload Action Replay. It is Active.\n");
return 0; /* Don't unload it whilst it's active, or it will crash the amiga if not the emulator */
}
if (hrtmon_flag != ACTION_REPLAY_IDLE && hrtmon_flag != ACTION_REPLAY_INACTIVE) {
- write_log("Can't Unload Hrtmon. It is Active.\n");
+ write_log ("Can't Unload Hrtmon. It is Active.\n");
return 0; /* Don't unload it whilst it's active, or it will crash the amiga if not the emulator */
}
}
- unset_special(®s, SPCFLAG_ACTION_REPLAY); /* This shouldn't be necessary here, but just in case. */
+ unset_special (®s, SPCFLAG_ACTION_REPLAY); /* This shouldn't be necessary here, but just in case. */
action_replay_flag = ACTION_REPLAY_INACTIVE;
hrtmon_flag = ACTION_REPLAY_INACTIVE;
- action_replay_unsetbanks();
- action_replay_unmap_banks();
- hrtmon_unmap_banks();
+ action_replay_unsetbanks ();
+ action_replay_unmap_banks ();
+ hrtmon_unmap_banks ();
/* Make sure you unmap everything before you call action_replay_cleanup() */
- action_replay_cleanup();
+ action_replay_cleanup ();
return 1;
}
}
if (hrtmem3_size) {
hrtmemory3 = mapped_malloc (hrtmem3_size, cart_memnames3[cart_type]);
- memset(hrtmemory3, 0, hrtmem3_size);
+ memset(hrtmemory3, 0, hrtmem3_size);
}
hrtmem3_bank.baseaddr = hrtmemory3;
hrtmem2_bank.baseaddr = hrtmemory2;
}
hrtmon_flag = ACTION_REPLAY_IDLE;
- write_log("%s installed at %08.8X\n", cart_memnames[cart_type], hrtmem_start);
+ write_log ("%s installed at %08.8X\n", cart_memnames[cart_type], hrtmem_start);
return 1;
}
-int action_replay_load(void)
+int action_replay_load (void)
{
struct zfile *f;
uae_u8 header[8];
armodel = 0;
action_replay_flag = ACTION_REPLAY_INACTIVE;
- write_log_debug("Entered action_replay_load()\n");
- /* Don't load a rom if one is already loaded. Use action_replay_unload() first. */
+ write_log_debug("Entered action_replay_load ()\n");
+ /* Don't load a rom if one is already loaded. Use action_replay_unload () first. */
if (armemory_rom || hrtmemory) {
- write_log("action_replay_load() ROM already loaded.\n");
+ write_log ("action_replay_load () ROM already loaded.\n");
return 0;
}
return superiv_init(rd, NULL);
f = zfile_fopen(currprefs.cartfile, "rb");
if (!f) {
- write_log("failed to load '%s' cartridge ROM\n", currprefs.cartfile);
+ write_log ("failed to load '%s' cartridge ROM\n", currprefs.cartfile);
return 0;
}
rd = getromdatabyzfile(f);
if (!rd) {
- write_log("Unknown cartridge ROM\n");
+ write_log ("Unknown cartridge ROM\n");
} else {
if (rd->type & (ROMTYPE_SUPERIV | ROMTYPE_NORDIC | ROMTYPE_XPOWER)) {
return superiv_init(rd, f);
return 0;
}
if (ar_rom_file_size != 65536 && ar_rom_file_size != 131072 && ar_rom_file_size != 262144) {
- write_log("rom size must be 64KB (AR1), 128KB (AR2) or 256KB (AR3)\n");
+ write_log ("rom size must be 64KB (AR1), 128KB (AR2) or 256KB (AR3)\n");
zfile_fclose(f);
return 0;
}
arram_mask = arram_size - 1;
arrom_mask = arrom_size - 1;
armemory_ram = (uae_u8*)xcalloc (arram_size, 1);
- write_log("Action Replay %d installed at %08.8X, size %08.8X\n", armodel, arrom_start, arrom_size);
+ write_log ("Action Replay %d installed at %08.8X, size %08.8X\n", armodel, arrom_start, arrom_size);
action_replay_setbanks ();
action_replay_version();
return armodel;
}
-void action_replay_init (int activate)
+void action_replay_init (int activate)
{
if (!armemory_rom)
return;
cfg->hexmode = TRUE;
cfg->entered = 0;
cfg->keyboard = hrtmon_lang;
- do_put_mem_long(&cfg->max_chip, currprefs.chipmem_size);
- do_put_mem_long(&cfg->mon_size, 0x800000);
+ do_put_mem_long (&cfg->max_chip, currprefs.chipmem_size);
+ do_put_mem_long (&cfg->mon_size, 0x800000);
cfg->ide = currprefs.cs_ide ? 1 : 0;
cfg->a1200 = currprefs.cs_ide == 1 ? 1 : 0; /* type of IDE interface, not Amiga model */
}
-int hrtmon_load(void)
+int hrtmon_load (void)
{
struct zfile *f;
uae_u32 header[4];
struct romdata *rd;
int isinternal = 0;
- /* Don't load a rom if one is already loaded. Use action_replay_unload() first. */
+ /* Don't load a rom if one is already loaded. Use action_replay_unload () first. */
if (armemory_rom)
return 0;
if (hrtmemory)
return 0;
f = zfile_fopen(currprefs.cartfile,"rb");
if(!f) {
- write_log("failed to load '%s' cartridge ROM\n", currprefs.cartfile);
+ write_log ("failed to load '%s' cartridge ROM\n", currprefs.cartfile);
return 0;
}
zfile_fread(header, sizeof header, 1, f);
#else
return 0;
#endif
- cart_type = CART_HRTMON;
+ cart_type = CART_HRTMON;
}
hrtmemory = mapped_malloc (hrtmem_size, cart_memnames[cart_type]);
memset (hrtmemory, 0xff, 0x80000);
}
hrtmem_bank.baseaddr = hrtmemory;
hrtmon_flag = ACTION_REPLAY_IDLE;
- write_log("%s installed at %08.8X\n", cart_memnames[cart_type], hrtmem_start);
+ write_log ("%s installed at %08.8X\n", cart_memnames[cart_type], hrtmem_start);
return 1;
}
-void hrtmon_map_banks()
+void hrtmon_map_banks ()
{
uaecptr addr;
- if(!hrtmemory)
+ if (!hrtmemory)
return;
addr = hrtmem_start;
map_banks (&hrtmem3_bank, hrtmem3_start >> 16, hrtmem3_size >> 16, 0);
}
-static void hrtmon_unmap_banks()
+static void hrtmon_unmap_banks ()
{
uaecptr addr;
- if(!hrtmemory)
+ if (!hrtmemory)
return;
addr = hrtmem_start;
memcpy(arVersionString, armemory_rom+AR_VER_STR_OFFSET, AR_VER_STR_LEN);
arVersionString[AR_VER_STR_LEN]= '\0';
tmp = strchr(arVersionString, 0x0d);
- if ( tmp )
- {
+ if (tmp) {
*tmp = '\0';
}
/* write_log_debug("Version string is : '%s'\n", arVersionString); */
tmp = strchr(arVersionString,')');
- if ( tmp )
- {
+ if (tmp) {
*tmp = '\0';
tmp = strchr(arVersionString, '(');
- if ( tmp )
- {
- if ( *(tmp + 1 ) == 'V' )
- {
+ if (tmp) {
+ if (*(tmp + 1) == 'V') {
pNext = tmp + 2;
tmp = strchr(pNext, '.');
- if ( tmp )
- {
+ if (tmp) {
*tmp = '\0';
iArVersionMajor = atoi(pNext);
pNext = tmp+1;
tmp = strchr(pNext, ' ');
- if ( tmp )
- {
+ if (tmp) {
*tmp = '\0';
iArVersionMinor = atoi(pNext);
}
pNext = tmp+1;
- strcpy(sArDate, pNext);
+ strcpy (sArDate, pNext);
}
}
}
}
- if (iArVersionMajor > 0)
- {
- write_log("Version of cart is '%d.%.02d', date is '%s'\n", iArVersionMajor, iArVersionMinor, sArDate);
+ if (iArVersionMajor > 0) {
+ write_log ("Version of cart is '%d.%.02d', date is '%s'\n", iArVersionMajor, iArVersionMinor, sArDate);
}
}
{
#ifdef ACTION_REPLAY
if (armemory_rom) {
- action_replay_hide();
+ action_replay_hide ();
}
#endif
#ifdef ACTION_REPLAY_HRTMON
if (hrtmemory) {
- hrtmon_hide(); /* It is never really idle */
- hrtmon_flag = ACTION_REPLAY_IDLE;
+ hrtmon_hide (); /* It is never really idle */
+ hrtmon_flag = ACTION_REPLAY_IDLE;
if (cart_type == CART_SUPER4)
- hrtmon_map_banks();
+ hrtmon_map_banks ();
}
#endif
#ifdef ACTION_REPLAY_COMMON
- check_prefs_changed_carts(1);
+ check_prefs_changed_carts (1);
#endif
- action_replay_patch();
- action_replay_checksum_info();
- hrtmon_configure();
+ action_replay_patch ();
+ action_replay_checksum_info ();
+ hrtmon_configure ();
}
uae_u8 *save_hrtmon (int *len, uae_u8 *dstptr)
{
- uae_u8 *dstbak,*dst;
+ uae_u8 *dstbak, *dst;
if (!hrtmemory)
return 0;
save_u8 (0);
save_u32 (0);
strcpy (dst, currprefs.cartfile);
- dst += strlen(dst) + 1;
+ dst += strlen (dst) + 1;
save_u32 (0);
if (!hrtmem_rom) {
save_u32 (hrtmem_size);
- memcpy (dst, hrtmemory, hrtmem_size);
+ memcpy (dst, hrtmemory, hrtmem_size);
dst += hrtmem_size;
} else if (hrtmem2_size) {
save_u32 (hrtmem2_size);
restore_u32 ();
strncpy (changed_prefs.cartfile, src, 255);
strcpy (currprefs.cartfile, changed_prefs.cartfile);
- src += strlen(src) + 1;
+ src += strlen (src) + 1;
hrtmon_load ();
action_replay_load ();
- if (restore_u32() != 0)
+ if (restore_u32 () != 0)
return src;
- size = restore_u32();
+ size = restore_u32 ();
if (!hrtmem_rom) {
if (hrtmemory)
memcpy (hrtmemory, src, size);
memcpy (hrtmemory2, src, size);
}
src += size;
- restore_u32();
+ restore_u32 ();
memcpy (ar_custom, src, sizeof ar_custom);
src += sizeof ar_custom;
- restore_u32();
+ restore_u32 ();
memcpy (ar_ciaa, src, sizeof ar_ciaa);
src += sizeof ar_ciaa;
- restore_u32();
+ restore_u32 ();
memcpy (ar_ciab, src, sizeof ar_ciab);
src += sizeof ar_ciab;
return src;
uae_u8 *save_action_replay (int *len, uae_u8 *dstptr)
{
- uae_u8 *dstbak,*dst;
+ uae_u8 *dstbak, *dst;
if (!armemory_ram || !armemory_rom || !armodel)
return 0;
save_u8 (armodel);
save_u32 (get_crc32 (armemory_rom + 4, arrom_size - 4));
strcpy (dst, currprefs.cartfile);
- dst += strlen(dst) + 1;
+ dst += strlen (dst) + 1;
save_u32 (arrom_size);
save_u32 (arram_size);
memcpy (dst, armemory_ram, arram_size);
crc32 = restore_u32 ();
strncpy (changed_prefs.cartfile, src, 255);
strcpy (currprefs.cartfile, changed_prefs.cartfile);
- src += strlen(src) + 1;
+ src += strlen (src) + 1;
action_replay_load ();
- if (restore_u32() != arrom_size)
+ if (restore_u32 () != arrom_size)
return src;
- if (restore_u32() != arram_size)
+ if (restore_u32 () != arram_size)
return src;
if (armemory_ram)
memcpy (armemory_ram, src, arram_size);
src += arram_size;
- restore_u32();
+ restore_u32 ();
memcpy (ar_custom, src, sizeof ar_custom);
src += sizeof ar_custom;
- restore_u32();
+ restore_u32 ();
src += sizeof ar_ciaa;
- restore_u32();
+ restore_u32 ();
src += sizeof ar_ciab;
return src;
}
#define BIOS_VERSION_211 2
#define BIOS_VERSION_300 3
-
+
static struct arcadiarom roms[] = {
{ 49, "ar_bios.zip", "scpa21", ARCADIA_BIOS, 0, 6, 1, 0, 2, 3, 4, 5, 7 },
for (i = start; i < end; i += 2) {
arbmemory[i] = bswap (arbmemory[i],
rom->b7,rom->b6,rom->b5,rom->b4,rom->b3,rom->b2,rom->b1,rom->b0);
- if (rom->extra == 2)
+ if (rom->extra == 2)
arbmemory[i - 1] = bswap (arbmemory[i - 1],7,6,5,4,3,2,1,0);
}
}
arcadia_rom = is_arcadia(path, cnt);
if (arcadia_rom) {
- arc_rl = getarcadiaroms();
- for (i = 0; arc_rl[i]; i++) {
+ arc_rl = getarcadiaroms();
+ for (i = 0; arc_rl[i]; i++) {
if (arc_rl[i]->rd->id == arcadia_rom->romid) {
- rd = arc_rl[i]->rd;
+ rd = arc_rl[i]->rd;
strcat(path, "/");
strcat(path, arcadia_rom->rom);
- break;
- }
- }
- xfree(arc_rl);
+ break;
+ }
+ }
+ xfree(arc_rl);
}
return rd;
}
#include "7zTypes.h"
typedef struct _CSzByteBuffer
-{
+{
size_t Capacity;
Byte *Items;
}CSzByteBuffer;
UInt32 r = i;
int j;
for (j = 0; j < 8; j++)
- if (r & 1)
- r = (r >> 1) ^ kCrcPoly;
- else
- r >>= 1;
+ if (r & 1)
+ r = (r >> 1) ^ kCrcPoly;
+ else
+ r >>= 1;
g_CrcTable[i] = r;
}
}
void CrcInit(UInt32 *crc) { *crc = 0xFFFFFFFF; }
-UInt32 CrcGetDigest(UInt32 *crc) { return *crc ^ 0xFFFFFFFF; }
+UInt32 CrcGetDigest(UInt32 *crc) { return *crc ^ 0xFFFFFFFF; }
void CrcUpdateByte(UInt32 *crc, Byte b)
{
void CrcUpdateUInt32(UInt32 *crc, UInt32 v);
void CrcUpdateUInt64(UInt32 *crc, UInt64 v);
void CrcUpdate(UInt32 *crc, const void *data, size_t size);
-
+
UInt32 CrcCalculateDigest(const void *data, size_t size);
int CrcVerifyDigest(UInt32 digest, const void *data, size_t size);
#else
const Byte *inBuffer,
#endif
- Byte *outBuffer, size_t outSize,
+ Byte *outBuffer, size_t outSize,
size_t *outSizeProcessed, ISzAlloc *allocMain)
{
UInt32 si;
size_t bufferSize;
RINOK(inStream->Read((void *)inStream, (void **)&inBuffer, inSize - i, &bufferSize));
if (bufferSize == 0)
- return SZE_DATA_ERROR;
+ return SZE_DATA_ERROR;
if (bufferSize > inSize - i)
- return SZE_FAIL;
+ return SZE_FAIL;
*outSizeProcessed += bufferSize;
for (j = 0; j < bufferSize && i < inSize; j++, i++)
- outBuffer[i] = inBuffer[j];
+ outBuffer[i] = inBuffer[j];
}
#else
for (i = 0; i < inSize; i++)
lzmaCallback.InCallback.Read = LzmaReadImp;
#endif
- if (LzmaDecodeProperties(&state.Properties, coder->Properties.Items,
- coder->Properties.Capacity) != LZMA_RESULT_OK)
+ if (LzmaDecodeProperties(&state.Properties, coder->Properties.Items,
+ coder->Properties.Capacity) != LZMA_RESULT_OK)
return SZE_FAIL;
state.Probs = (CProb *)allocMain->Alloc(LzmaGetNumProbs(&state.Properties) * sizeof(CProb));
state.Dictionary = (unsigned char *)allocMain->Alloc(state.Properties.DictionarySize);
if (state.Dictionary == 0)
{
- allocMain->Free(state.Probs);
- return SZE_OUTOFMEMORY;
+ allocMain->Free(state.Probs);
+ return SZE_OUTOFMEMORY;
}
}
LzmaDecoderInit(&state);
#endif
result = LzmaDecode(&state,
- #ifdef _LZMA_IN_CB
- &lzmaCallback.InCallback,
- #else
- inBuffer, (SizeT)inSize, &inProcessed,
- #endif
- outBuffer, (SizeT)outSize, &outSizeProcessedLoc);
+ #ifdef _LZMA_IN_CB
+ &lzmaCallback.InCallback,
+ #else
+ inBuffer, (SizeT)inSize, &inProcessed,
+ #endif
+ outBuffer, (SizeT)outSize, &outSizeProcessedLoc);
*outSizeProcessed = (size_t)outSizeProcessedLoc;
allocMain->Free(state.Probs);
#ifdef _LZMA_OUT_READ
#else
const Byte *inBuffer,
#endif
- Byte *outBuffer, size_t outSize,
+ Byte *outBuffer, size_t outSize,
size_t *outSizeProcessed, ISzAlloc *allocMain);
#endif
#include "7zCrc.h"
SZ_RESULT SzExtract(
- ISzInStream *inStream,
+ ISzInStream *inStream,
CArchiveDatabaseEx *db,
UInt32 fileIndex,
UInt32 *blockIndex,
- Byte **outBuffer,
+ Byte **outBuffer,
size_t *outBufferSize,
- size_t *offset,
- size_t *outSizeProcessed,
+ size_t *offset,
+ size_t *outSizeProcessed,
ISzAlloc *allocMain,
ISzAlloc *allocTemp)
{
*blockIndex = folderIndex;
allocMain->Free(*outBuffer);
*outBuffer = 0;
-
+
RINOK(inStream->Seek(inStream, SzArDbGetFolderStreamPos(db, folderIndex, 0)));
-
+
#ifndef _LZMA_IN_CB
if (packSize != 0)
{
inBuffer = (Byte *)allocTemp->Alloc((size_t)packSize);
if (inBuffer == 0)
- return SZE_OUTOFMEMORY;
+ return SZE_OUTOFMEMORY;
}
res = inStream->Read(inStream, inBuffer, (size_t)packSize, &processedSize);
if (res == SZ_OK && processedSize != (size_t)packSize)
*outBufferSize = (size_t)unPackSize;
if (unPackSize != 0)
{
- *outBuffer = (Byte *)allocMain->Alloc((size_t)unPackSize);
- if (*outBuffer == 0)
- res = SZE_OUTOFMEMORY;
+ *outBuffer = (Byte *)allocMain->Alloc((size_t)unPackSize);
+ if (*outBuffer == 0)
+ res = SZE_OUTOFMEMORY;
}
if (res == SZ_OK)
{
- size_t outRealSize;
- res = SzDecode(db->Database.PackSizes +
- db->FolderStartPackStreamIndex[folderIndex], folder,
- #ifdef _LZMA_IN_CB
- inStream,
- #else
- inBuffer,
- #endif
- *outBuffer, (size_t)unPackSize, &outRealSize, allocTemp);
- if (res == SZ_OK)
- {
- if (outRealSize == (size_t)unPackSize)
- {
- if (folder->UnPackCRCDefined)
- {
- if (!CrcVerifyDigest(folder->UnPackCRC, *outBuffer, (size_t)unPackSize))
- res = SZE_FAIL;
- }
- }
- else
- res = SZE_FAIL;
- }
+ size_t outRealSize;
+ res = SzDecode(db->Database.PackSizes +
+ db->FolderStartPackStreamIndex[folderIndex], folder,
+ #ifdef _LZMA_IN_CB
+ inStream,
+ #else
+ inBuffer,
+ #endif
+ *outBuffer, (size_t)unPackSize, &outRealSize, allocTemp);
+ if (res == SZ_OK)
+ {
+ if (outRealSize == (size_t)unPackSize)
+ {
+ if (folder->UnPackCRCDefined)
+ {
+ if (!CrcVerifyDigest(folder->UnPackCRC, *outBuffer, (size_t)unPackSize))
+ res = SZE_FAIL;
+ }
+ }
+ else
+ res = SZE_FAIL;
+ }
}
}
#ifndef _LZMA_IN_CB
}
if (res == SZ_OK)
{
- UInt32 i;
+ UInt32 i;
CFileItem *fileItem = db->Database.Files + fileIndex;
*offset = 0;
for(i = db->FolderStartFileIndex[folderIndex]; i < fileIndex; i++)
{
if (fileItem->IsFileCRCDefined)
{
- if (!CrcVerifyDigest(fileItem->FileCRC, *outBuffer + *offset, *outSizeProcessed))
- res = SZE_FAIL;
+ if (!CrcVerifyDigest(fileItem->FileCRC, *outBuffer + *offset, *outSizeProcessed))
+ res = SZE_FAIL;
}
}
}
/*
SzExtract extracts file from archive
- *outBuffer must be 0 before first call for each new archive.
+ *outBuffer must be 0 before first call for each new archive.
Extracting cache:
- If you need to decompress more than one file, you can send
+ If you need to decompress more than one file, you can send
these values from previous call:
- *blockIndex,
- *outBuffer,
+ *blockIndex,
+ *outBuffer,
*outBufferSize
- You can consider "*outBuffer" as cache of solid block. If your archive is solid,
+ You can consider "*outBuffer" as cache of solid block. If your archive is solid,
it will increase decompression speed.
-
- If you use external function, you can declare these 3 cache variables
+
+ If you use external function, you can declare these 3 cache variables
(blockIndex, outBuffer, outBufferSize) as static in that external function.
-
+
Free *outBuffer and set *outBuffer to 0, if you want to flush cache.
*/
SZ_RESULT SzExtract(
- ISzInStream *inStream,
+ ISzInStream *inStream,
CArchiveDatabaseEx *db,
UInt32 fileIndex, /* index of file */
UInt32 *blockIndex, /* index of solid block */
enum EIdEnum
{
k7zIdEnd,
-
+
k7zIdHeader,
-
+
k7zIdArchiveProperties,
-
+
k7zIdAdditionalStreamsInfo,
k7zIdMainStreamsInfo,
k7zIdFilesInfo,
-
+
k7zIdPackInfo,
k7zIdUnPackInfo,
k7zIdSubStreamsInfo,
-
+
k7zIdSize,
k7zIdCRC,
-
+
k7zIdFolder,
-
+
k7zIdCodersUnPackSize,
k7zIdNumUnPackStream,
-
+
k7zIdEmptyStream,
k7zIdEmptyFile,
k7zIdAnti,
-
+
k7zIdName,
k7zIdCreationTime,
k7zIdLastAccessTime,
k7zIdLastWriteTime,
k7zIdWinAttributes,
k7zIdComment,
-
+
k7zIdEncodedHeader,
-
+
k7zIdStartPos
};
}
/*
-CFileSize GetFolderPackStreamSize(int folderIndex, int streamIndex) const
+CFileSize GetFolderPackStreamSize(int folderIndex, int streamIndex) const
{
return PackSizes[FolderStartPackStreamIndex[folderIndex] + streamIndex];
}
*/
while(1)
{
- if (folderIndex >= db->Database.NumFolders)
- return SZE_ARCHIVE_ERROR;
- db->FolderStartFileIndex[folderIndex] = i;
- if (db->Database.Folders[folderIndex].NumUnPackStreams != 0)
- break;
- folderIndex++;
+ if (folderIndex >= db->Database.NumFolders)
+ return SZE_ARCHIVE_ERROR;
+ db->FolderStartFileIndex[folderIndex] = i;
+ if (db->Database.Folders[folderIndex].NumUnPackStreams != 0)
+ break;
+ folderIndex++;
}
}
db->FileIndexToFolderIndexMap[i] = folderIndex;
CFileSize SzArDbGetFolderStreamPos(CArchiveDatabaseEx *db, UInt32 folderIndex, UInt32 indexInFolder)
{
- return db->ArchiveInfo.DataStartPosition +
+ return db->ArchiveInfo.DataStartPosition +
db->PackStreamStartPositions[db->FolderStartPackStreamIndex[folderIndex] + indexInFolder];
}
switch(type)
{
case k7zIdCreationTime:
- file.IsCreationTimeDefined = defined;
- if (defined)
- file.CreationTime = fileTime;
- break;
+ file.IsCreationTimeDefined = defined;
+ if (defined)
+ file.CreationTime = fileTime;
+ break;
case k7zIdLastWriteTime:
- file.IsLastWriteTimeDefined = defined;
- if (defined)
- file.LastWriteTime = fileTime;
- break;
+ file.IsLastWriteTimeDefined = defined;
+ if (defined)
+ file.LastWriteTime = fileTime;
+ break;
case k7zIdLastAccessTime:
- file.IsLastAccessTimeDefined = defined;
- if (defined)
- file.LastAccessTime = fileTime;
- break;
+ file.IsLastAccessTimeDefined = defined;
+ if (defined)
+ file.LastAccessTime = fileTime;
+ break;
}
}
return SZ_OK;
return SZ_OK;
}
-SZ_RESULT SzReadID(CSzData *sd, UInt64 *value)
-{
- return SzReadNumber(sd, value);
+SZ_RESULT SzReadID(CSzData *sd, UInt64 *value)
+{
+ return SzReadNumber(sd, value);
}
SZ_RESULT SzSkeepDataSize(CSzData *sd, UInt64 size)
}
SZ_RESULT SzReadHashDigests(
- CSzData *sd,
+ CSzData *sd,
size_t numItems,
- Byte **digestsDefined,
- UInt32 **digests,
+ Byte **digestsDefined,
+ UInt32 **digests,
void * (*allocFunc)(size_t size))
{
size_t i;
}
SZ_RESULT SzReadPackInfo(
- CSzData *sd,
+ CSzData *sd,
CFileSize *dataOffset,
UInt32 *numPackStreams,
CFileSize **packSizes,
break;
if (type == k7zIdCRC)
{
- RINOK(SzReadHashDigests(sd, (size_t)*numPackStreams, packCRCsDefined, packCRCs, allocFunc));
+ RINOK(SzReadHashDigests(sd, (size_t)*numPackStreams, packCRCsDefined, packCRCs, allocFunc));
continue;
}
RINOK(SzSkeepData(sd));
RINOK(SzReadBytes(sd, coder->MethodID.ID, coder->MethodID.IDSize));
if ((mainByte & 0x10) != 0)
{
- RINOK(SzReadNumber32(sd, &coder->NumInStreams));
- RINOK(SzReadNumber32(sd, &coder->NumOutStreams));
+ RINOK(SzReadNumber32(sd, &coder->NumInStreams));
+ RINOK(SzReadNumber32(sd, &coder->NumOutStreams));
}
else
{
- coder->NumInStreams = 1;
- coder->NumOutStreams = 1;
+ coder->NumInStreams = 1;
+ coder->NumOutStreams = 1;
}
if ((mainByte & 0x20) != 0)
{
- UInt64 propertiesSize = 0;
- RINOK(SzReadNumber(sd, &propertiesSize));
- if (!SzByteBufferCreate(&coder->Properties, (size_t)propertiesSize, allocFunc))
- return SZE_OUTOFMEMORY;
- RINOK(SzReadBytes(sd, coder->Properties.Items, (size_t)propertiesSize));
+ UInt64 propertiesSize = 0;
+ RINOK(SzReadNumber(sd, &propertiesSize));
+ if (!SzByteBufferCreate(&coder->Properties, (size_t)propertiesSize, allocFunc))
+ return SZE_OUTOFMEMORY;
+ RINOK(SzReadBytes(sd, coder->Properties.Items, (size_t)propertiesSize));
}
}
while ((mainByte & 0x80) != 0)
RINOK(SzSkeepDataSize(sd, (mainByte & 0xF)));
if ((mainByte & 0x10) != 0)
{
- UInt32 n;
- RINOK(SzReadNumber32(sd, &n));
- RINOK(SzReadNumber32(sd, &n));
+ UInt32 n;
+ RINOK(SzReadNumber32(sd, &n));
+ RINOK(SzReadNumber32(sd, &n));
}
if ((mainByte & 0x20) != 0)
{
- UInt64 propertiesSize = 0;
- RINOK(SzReadNumber(sd, &propertiesSize));
- RINOK(SzSkeepDataSize(sd, propertiesSize));
+ UInt64 propertiesSize = 0;
+ RINOK(SzReadNumber(sd, &propertiesSize));
+ RINOK(SzSkeepDataSize(sd, propertiesSize));
}
}
numInStreams += (UInt32)coder->NumInStreams;
{
CBindPair *bindPair = folder->BindPairs + i;;
RINOK(SzReadNumber32(sd, &bindPair->InIndex));
- RINOK(SzReadNumber32(sd, &bindPair->OutIndex));
+ RINOK(SzReadNumber32(sd, &bindPair->OutIndex));
}
numPackedStreams = numInStreams - (UInt32)numBindPairs;
for (j = 0; j < numInStreams; j++)
if (SzFolderFindBindPairForInStream(folder, j) < 0)
{
- folder->PackStreams[pi++] = j;
- break;
+ folder->PackStreams[pi++] = j;
+ break;
}
}
else
}
SZ_RESULT SzReadUnPackInfo(
- CSzData *sd,
+ CSzData *sd,
UInt32 *numFolders,
CFolder **folders, /* for allocFunc */
void * (*allocFunc)(size_t size),
SZ_RESULT res;
Byte *crcsDefined = 0;
UInt32 *crcs = 0;
- res = SzReadHashDigests(sd, *numFolders, &crcsDefined, &crcs, allocTemp->Alloc);
+ res = SzReadHashDigests(sd, *numFolders, &crcsDefined, &crcs, allocTemp->Alloc);
if (res == SZ_OK)
{
- for(i = 0; i < *numFolders; i++)
- {
- CFolder *folder = (*folders) + i;
- folder->UnPackCRCDefined = crcsDefined[i];
- folder->UnPackCRC = crcs[i];
- }
+ for(i = 0; i < *numFolders; i++)
+ {
+ CFolder *folder = (*folders) + i;
+ folder->UnPackCRCDefined = crcsDefined[i];
+ folder->UnPackCRC = crcs[i];
+ }
}
allocTemp->Free(crcs);
allocTemp->Free(crcsDefined);
}
SZ_RESULT SzReadSubStreamsInfo(
- CSzData *sd,
+ CSzData *sd,
UInt32 numFolders,
CFolder *folders,
UInt32 *numUnPackStreams,
*numUnPackStreams = 0;
for(i = 0; i < numFolders; i++)
{
- UInt32 numStreams;
- RINOK(SzReadNumber32(sd, &numStreams));
- folders[i].NumUnPackStreams = numStreams;
- *numUnPackStreams += numStreams;
+ UInt32 numStreams;
+ RINOK(SzReadNumber32(sd, &numStreams));
+ folders[i].NumUnPackStreams = numStreams;
+ *numUnPackStreams += numStreams;
}
continue;
}
numDigests += numSubstreams;
}
-
+
si = 0;
while(1)
{
if (type == k7zIdCRC)
{
int digestIndex = 0;
- Byte *digestsDefined2 = 0;
+ Byte *digestsDefined2 = 0;
UInt32 *digests2 = 0;
SZ_RESULT res = SzReadHashDigests(sd, numDigests, &digestsDefined2, &digests2, allocTemp->Alloc);
if (res == SZ_OK)
{
- for (i = 0; i < numFolders; i++)
- {
- CFolder *folder = folders + i;
- UInt32 numSubstreams = folder->NumUnPackStreams;
- if (numSubstreams == 1 && folder->UnPackCRCDefined)
- {
- (*digestsDefined)[si] = 1;
- (*digests)[si] = folder->UnPackCRC;
- si++;
- }
- else
- {
- UInt32 j;
- for (j = 0; j < numSubstreams; j++, digestIndex++)
- {
- (*digestsDefined)[si] = digestsDefined2[digestIndex];
- (*digests)[si] = digests2[digestIndex];
- si++;
- }
- }
- }
+ for (i = 0; i < numFolders; i++)
+ {
+ CFolder *folder = folders + i;
+ UInt32 numSubstreams = folder->NumUnPackStreams;
+ if (numSubstreams == 1 && folder->UnPackCRCDefined)
+ {
+ (*digestsDefined)[si] = 1;
+ (*digests)[si] = folder->UnPackCRC;
+ si++;
+ }
+ else
+ {
+ UInt32 j;
+ for (j = 0; j < numSubstreams; j++, digestIndex++)
+ {
+ (*digestsDefined)[si] = digestsDefined2[digestIndex];
+ (*digests)[si] = digests2[digestIndex];
+ si++;
+ }
+ }
+ }
}
allocTemp->Free(digestsDefined2);
allocTemp->Free(digests2);
SZ_RESULT SzReadStreamsInfo(
- CSzData *sd,
+ CSzData *sd,
CFileSize *dataOffset,
CArchiveDatabase *db,
UInt32 *numUnPackStreams,
switch((int)type)
{
case k7zIdEnd:
- return SZ_OK;
+ return SZ_OK;
case k7zIdPackInfo:
{
- RINOK(SzReadPackInfo(sd, dataOffset, &db->NumPackStreams,
- &db->PackSizes, &db->PackCRCsDefined, &db->PackCRCs, allocFunc));
- break;
+ RINOK(SzReadPackInfo(sd, dataOffset, &db->NumPackStreams,
+ &db->PackSizes, &db->PackCRCsDefined, &db->PackCRCs, allocFunc));
+ break;
}
case k7zIdUnPackInfo:
{
- RINOK(SzReadUnPackInfo(sd, &db->NumFolders, &db->Folders, allocFunc, allocTemp));
- break;
+ RINOK(SzReadUnPackInfo(sd, &db->NumFolders, &db->Folders, allocFunc, allocTemp));
+ break;
}
case k7zIdSubStreamsInfo:
{
- RINOK(SzReadSubStreamsInfo(sd, db->NumFolders, db->Folders,
- numUnPackStreams, unPackSizes, digestsDefined, digests, allocTemp));
- break;
+ RINOK(SzReadSubStreamsInfo(sd, db->NumFolders, db->Folders,
+ numUnPackStreams, unPackSizes, digestsDefined, digests, allocTemp));
+ break;
}
default:
- return SZE_FAIL;
+ return SZE_FAIL;
}
}
}
Byte kUtf8Limits[5] = { 0xC0, 0xE0, 0xF0, 0xF8, 0xFC };
-SZ_RESULT SzReadFileNames(CSzData *sd, UInt32 numFiles, CFileItem *files,
+SZ_RESULT SzReadFileNames(CSzData *sd, UInt32 numFiles, CFileItem *files,
void * (*allocFunc)(size_t size))
{
UInt32 i;
pos += 2;
len++;
if (value == 0)
- break;
+ break;
if (value < 0x80)
- continue;
+ continue;
if (value >= 0xD800 && value < 0xE000)
{
- UInt32 c2;
- if (value >= 0xDC00)
- return SZE_ARCHIVE_ERROR;
- if (pos + 2 > sd->Size)
- return SZE_ARCHIVE_ERROR;
- c2 = (UInt32)(sd->Data[pos] | (((UInt32)sd->Data[pos + 1]) << 8));
- pos += 2;
- if (c2 < 0xDC00 || c2 >= 0xE000)
- return SZE_ARCHIVE_ERROR;
- value = ((value - 0xD800) << 10) | (c2 - 0xDC00);
+ UInt32 c2;
+ if (value >= 0xDC00)
+ return SZE_ARCHIVE_ERROR;
+ if (pos + 2 > sd->Size)
+ return SZE_ARCHIVE_ERROR;
+ c2 = (UInt32)(sd->Data[pos] | (((UInt32)sd->Data[pos + 1]) << 8));
+ pos += 2;
+ if (c2 < 0xDC00 || c2 >= 0xE000)
+ return SZE_ARCHIVE_ERROR;
+ value = ((value - 0xD800) << 10) | (c2 - 0xDC00);
}
for (numAdds = 1; numAdds < 5; numAdds++)
- if (value < (((UInt32)1) << (numAdds * 5 + 6)))
- break;
+ if (value < (((UInt32)1) << (numAdds * 5 + 6)))
+ break;
len += numAdds;
}
SzSkeepDataSize(sd, 2);
if (value < 0x80)
{
- file->Name[len++] = (char)value;
- if (value == 0)
- break;
- continue;
+ file->Name[len++] = (char)value;
+ if (value == 0)
+ break;
+ continue;
}
if (value >= 0xD800 && value < 0xE000)
{
- UInt32 c2 = (UInt32)(sd->Data[0] | (((UInt32)sd->Data[1]) << 8));
- SzSkeepDataSize(sd, 2);
- value = ((value - 0xD800) << 10) | (c2 - 0xDC00);
+ UInt32 c2 = (UInt32)(sd->Data[0] | (((UInt32)sd->Data[1]) << 8));
+ SzSkeepDataSize(sd, 2);
+ value = ((value - 0xD800) << 10) | (c2 - 0xDC00);
}
for (numAdds = 1; numAdds < 5; numAdds++)
- if (value < (((UInt32)1) << (numAdds * 5 + 6)))
- break;
+ if (value < (((UInt32)1) << (numAdds * 5 + 6)))
+ break;
file->Name[len++] = (char)(kUtf8Limits[numAdds - 1] + (value >> (6 * numAdds)));
do
{
- numAdds--;
- file->Name[len++] = (char)(0x80 + ((value >> (6 * numAdds)) & 0x3F));
+ numAdds--;
+ file->Name[len++] = (char)(0x80 + ((value >> (6 * numAdds)) & 0x3F));
}
while(numAdds > 0);
}
SZ_RESULT SzReadHeader2(
- CSzData *sd,
+ CSzData *sd,
CArchiveDatabaseEx *db, /* allocMain */
CFileSize **unPackSizes, /* allocTemp */
Byte **digestsDefined, /* allocTemp */
UInt32 **digests, /* allocTemp */
Byte **emptyStreamVector, /* allocTemp */
Byte **emptyFileVector, /* allocTemp */
- ISzAlloc *allocMain,
+ ISzAlloc *allocMain,
ISzAlloc *allocTemp)
{
UInt64 type;
RINOK(SzReadArchiveProperties(sd));
RINOK(SzReadID(sd, &type));
}
-
-
+
+
if (type == k7zIdMainStreamsInfo)
{
RINOK(SzReadStreamsInfo(sd,
- &db->ArchiveInfo.DataStartPosition,
- &db->Database,
- &numUnPackStreams,
- unPackSizes,
- digestsDefined,
- digests, allocMain->Alloc, allocTemp));
+ &db->ArchiveInfo.DataStartPosition,
+ &db->Database,
+ &numUnPackStreams,
+ unPackSizes,
+ digestsDefined,
+ digests, allocMain->Alloc, allocTemp));
db->ArchiveInfo.DataStartPosition += db->ArchiveInfo.StartPositionAfterHeader;
RINOK(SzReadID(sd, &type));
}
return SZ_OK;
if (type != k7zIdFilesInfo)
return SZE_ARCHIVE_ERROR;
-
+
RINOK(SzReadNumber32(sd, &numFiles));
db->Database.NumFiles = numFiles;
{
case k7zIdName:
{
- RINOK(SzReadSwitch(sd));
- RINOK(SzReadFileNames(sd, numFiles, files, allocMain->Alloc))
- break;
+ RINOK(SzReadSwitch(sd));
+ RINOK(SzReadFileNames(sd, numFiles, files, allocMain->Alloc))
+ break;
}
case k7zIdEmptyStream:
{
- RINOK(SzReadBoolVector(sd, numFiles, emptyStreamVector, allocTemp->Alloc));
- numEmptyStreams = 0;
- for (i = 0; i < numFiles; i++)
- if ((*emptyStreamVector)[i])
- numEmptyStreams++;
- break;
+ RINOK(SzReadBoolVector(sd, numFiles, emptyStreamVector, allocTemp->Alloc));
+ numEmptyStreams = 0;
+ for (i = 0; i < numFiles; i++)
+ if ((*emptyStreamVector)[i])
+ numEmptyStreams++;
+ break;
}
case k7zIdEmptyFile:
{
- RINOK(SzReadBoolVector(sd, numEmptyStreams, emptyFileVector, allocTemp->Alloc));
- break;
+ RINOK(SzReadBoolVector(sd, numEmptyStreams, emptyFileVector, allocTemp->Alloc));
+ break;
}
default:
{
- RINOK(SzSkeepDataSize(sd, size));
+ RINOK(SzSkeepDataSize(sd, size));
}
}
}
CFileItem *file = files + i;
file->IsAnti = 0;
if (*emptyStreamVector == 0)
- file->HasStream = 1;
+ file->HasStream = 1;
else
- file->HasStream = (Byte)((*emptyStreamVector)[i] ? 0 : 1);
+ file->HasStream = (Byte)((*emptyStreamVector)[i] ? 0 : 1);
if(file->HasStream)
{
- file->IsDirectory = 0;
- file->Size = (*unPackSizes)[sizeIndex];
- file->FileCRC = (*digests)[sizeIndex];
- file->IsFileCRCDefined = (Byte)(*digestsDefined)[sizeIndex];
- sizeIndex++;
+ file->IsDirectory = 0;
+ file->Size = (*unPackSizes)[sizeIndex];
+ file->FileCRC = (*digests)[sizeIndex];
+ file->IsFileCRCDefined = (Byte)(*digestsDefined)[sizeIndex];
+ sizeIndex++;
}
else
{
- if (*emptyFileVector == 0)
- file->IsDirectory = 1;
- else
- file->IsDirectory = (Byte)((*emptyFileVector)[emptyFileIndex] ? 0 : 1);
- emptyFileIndex++;
- file->Size = 0;
- file->IsFileCRCDefined = 0;
+ if (*emptyFileVector == 0)
+ file->IsDirectory = 1;
+ else
+ file->IsDirectory = (Byte)((*emptyFileVector)[emptyFileIndex] ? 0 : 1);
+ emptyFileIndex++;
+ file->Size = 0;
+ file->IsFileCRCDefined = 0;
}
}
}
}
SZ_RESULT SzReadHeader(
- CSzData *sd,
- CArchiveDatabaseEx *db,
- ISzAlloc *allocMain,
+ CSzData *sd,
+ CArchiveDatabaseEx *db,
+ ISzAlloc *allocMain,
ISzAlloc *allocTemp)
{
CFileSize *unPackSizes = 0;
UInt32 *digests = 0;
Byte *emptyStreamVector = 0;
Byte *emptyFileVector = 0;
- SZ_RESULT res = SzReadHeader2(sd, db,
+ SZ_RESULT res = SzReadHeader2(sd, db,
&unPackSizes, &digestsDefined, &digests,
&emptyStreamVector, &emptyFileVector,
allocMain, allocTemp);
allocTemp->Free(emptyStreamVector);
allocTemp->Free(emptyFileVector);
return res;
-}
+}
SZ_RESULT SzReadAndDecodePackedStreams2(
- ISzInStream *inStream,
+ ISzInStream *inStream,
CSzData *sd,
CSzByteBuffer *outBuffer,
- CFileSize baseOffset,
+ CFileSize baseOffset,
CArchiveDatabase *db,
CFileSize **unPackSizes,
Byte **digestsDefined,
SZ_RESULT res;
RINOK(SzReadStreamsInfo(sd, &dataStartPos, db,
- &numUnPackStreams, unPackSizes, digestsDefined, digests,
+ &numUnPackStreams, unPackSizes, digestsDefined, digests,
allocTemp->Alloc, allocTemp));
-
+
dataStartPos += baseOffset;
if (db->NumFolders != 1)
return SZE_ARCHIVE_ERROR;
folder = db->Folders;
unPackSize = SzFolderGetUnPackSize(folder);
-
+
RINOK(inStream->Seek(inStream, dataStartPos));
#ifndef _LZMA_IN_CB
if (!SzByteBufferCreate(outBuffer, (size_t)unPackSize, allocTemp->Alloc))
return SZE_OUTOFMEMORY;
-
- res = SzDecode(db->PackSizes, folder,
- #ifdef _LZMA_IN_CB
- inStream,
- #else
- *inBuffer,
- #endif
- outBuffer->Items, (size_t)unPackSize,
- &outRealSize, allocTemp);
+
+ res = SzDecode(db->PackSizes, folder,
+ #ifdef _LZMA_IN_CB
+ inStream,
+ #else
+ *inBuffer,
+ #endif
+ outBuffer->Items, (size_t)unPackSize,
+ &outRealSize, allocTemp);
RINOK(res)
if (outRealSize != (UInt32)unPackSize)
return SZE_FAIL;
}
SZ_RESULT SzReadAndDecodePackedStreams(
- ISzInStream *inStream,
+ ISzInStream *inStream,
CSzData *sd,
CSzByteBuffer *outBuffer,
- CFileSize baseOffset,
+ CFileSize baseOffset,
ISzAlloc *allocTemp)
{
CArchiveDatabase db;
#endif
SZ_RESULT res;
SzArchiveDatabaseInit(&db);
- res = SzReadAndDecodePackedStreams2(inStream, sd, outBuffer, baseOffset,
- &db, &unPackSizes, &digestsDefined, &digests,
+ res = SzReadAndDecodePackedStreams2(inStream, sd, outBuffer, baseOffset,
+ &db, &unPackSizes, &digestsDefined, &digests,
#ifndef _LZMA_IN_CB
&inBuffer,
#endif
}
SZ_RESULT SzArchiveOpen2(
- ISzInStream *inStream,
+ ISzInStream *inStream,
CArchiveDatabaseEx *db,
- ISzAlloc *allocMain,
+ ISzAlloc *allocMain,
ISzAlloc *allocTemp)
{
Byte signature[k7zSignatureSize];
pos = k7zStartHeaderSize;
db->ArchiveInfo.StartPositionAfterHeader = pos;
-
+
if (CrcGetDigest(&crc) != crcFromArchive)
return SZE_ARCHIVE_ERROR;
{
while (1)
{
- UInt64 type;
- sd.Data = buffer.Items;
- sd.Size = buffer.Capacity;
- res = SzReadID(&sd, &type);
- if (res != SZ_OK)
- break;
- if (type == k7zIdHeader)
- {
- res = SzReadHeader(&sd, db, allocMain, allocTemp);
- break;
- }
- if (type != k7zIdEncodedHeader)
- {
- res = SZE_ARCHIVE_ERROR;
- break;
- }
- {
- CSzByteBuffer outBuffer;
- res = SzReadAndDecodePackedStreams(inStream, &sd, &outBuffer,
- db->ArchiveInfo.StartPositionAfterHeader,
- allocTemp);
- if (res != SZ_OK)
- {
- SzByteBufferFree(&outBuffer, allocTemp->Free);
- break;
- }
- SzByteBufferFree(&buffer, allocTemp->Free);
- buffer.Items = outBuffer.Items;
- buffer.Capacity = outBuffer.Capacity;
- }
+ UInt64 type;
+ sd.Data = buffer.Items;
+ sd.Size = buffer.Capacity;
+ res = SzReadID(&sd, &type);
+ if (res != SZ_OK)
+ break;
+ if (type == k7zIdHeader)
+ {
+ res = SzReadHeader(&sd, db, allocMain, allocTemp);
+ break;
+ }
+ if (type != k7zIdEncodedHeader)
+ {
+ res = SZE_ARCHIVE_ERROR;
+ break;
+ }
+ {
+ CSzByteBuffer outBuffer;
+ res = SzReadAndDecodePackedStreams(inStream, &sd, &outBuffer,
+ db->ArchiveInfo.StartPositionAfterHeader,
+ allocTemp);
+ if (res != SZ_OK)
+ {
+ SzByteBufferFree(&outBuffer, allocTemp->Free);
+ break;
+ }
+ SzByteBufferFree(&buffer, allocTemp->Free);
+ buffer.Items = outBuffer.Items;
+ buffer.Capacity = outBuffer.Capacity;
+ }
}
}
}
}
SZ_RESULT SzArchiveOpen(
- ISzInStream *inStream,
+ ISzInStream *inStream,
CArchiveDatabaseEx *db,
- ISzAlloc *allocMain,
+ ISzAlloc *allocMain,
ISzAlloc *allocTemp)
{
SZ_RESULT res = SzArchiveOpen2(inStream, db, allocMain, allocTemp);
#include "7zHeader.h"
#include "7zItem.h"
#include "7zAlloc.h"
-
+
typedef struct _CInArchiveInfo
{
- CFileSize StartPositionAfterHeader;
+ CFileSize StartPositionAfterHeader;
CFileSize DataStartPosition;
}CInArchiveInfo;
void *object, /* pointer to ISzInStream itself */
void **buffer, /* out: pointer to buffer with data */
size_t maxRequiredSize, /* max required size to read */
- size_t *processedSize); /* real processed size.
- processedSize can be less than maxRequiredSize.
- If processedSize == 0, then there are no more
- bytes in stream. */
+ size_t *processedSize); /* real processed size.
+ processedSize can be less than maxRequiredSize.
+ If processedSize == 0, then there are no more
+ bytes in stream. */
#else
SZ_RESULT (*Read)(void *object, void *buffer, size_t size, size_t *processedSize);
#endif
SZ_RESULT (*Seek)(void *object, CFileSize pos);
} ISzInStream;
-
+
int SzArchiveOpen(
- ISzInStream *inStream,
+ ISzInStream *inStream,
CArchiveDatabaseEx *db,
- ISzAlloc *allocMain,
+ ISzAlloc *allocMain,
ISzAlloc *allocTemp);
-
+
#endif
}
CFileSize SzFolderGetUnPackSize(CFolder *folder)
-{
+{
int i = (int)SzFolderGetNumOutStreams(folder);
if (i == 0)
return 0;
CCoderInfo *Coders;
UInt32 NumBindPairs;
CBindPair *BindPairs;
- UInt32 NumPackStreams;
+ UInt32 NumPackStreams;
UInt32 *PackStreams;
CFileSize *UnPackSizes;
int UnPackCRCDefined;
/*
CArchiveFileTime LastWriteTime;
CFileSize StartPos;
- UInt32 Attributes;
+ UInt32 Attributes;
*/
CFileSize Size;
UInt32 FileCRC;
-/*
+/*
7zMain.c
Test application for 7z Decoder
LZMA SDK 4.43 Copyright (c) 1999-2006 Igor Pavlov (2006-06-04)
UInt32 i;
for (i = 0; i < db.Database.NumFiles; i++)
{
- CFileItem *f = db.Database.Files + i;
- printf("%10d %s\n", (int)f->Size, f->Name);
+ CFileItem *f = db.Database.Files + i;
+ printf("%10d %s\n", (int)f->Size, f->Name);
}
}
else if (testCommand || extractCommand)
printf("\n");
for (i = 0; i < db.Database.NumFiles; i++)
{
- size_t offset;
- size_t outSizeProcessed;
- CFileItem *f = db.Database.Files + i;
- if (f->IsDirectory)
- printf("Directory ");
- else
- printf(testCommand ?
- "Testing ":
- "Extracting");
- printf(" %s", f->Name);
- if (f->IsDirectory)
- {
- printf("\n");
- continue;
- }
- res = SzExtract(&archiveStream.InStream, &db, i,
- &blockIndex, &outBuffer, &outBufferSize,
- &offset, &outSizeProcessed,
- &allocImp, &allocTempImp);
- if (res != SZ_OK)
- break;
- if (!testCommand)
- {
- FILE *outputHandle;
- UInt32 processedSize;
- char *fileName = f->Name;
- size_t nameLen = strlen(f->Name);
- for (; nameLen > 0; nameLen--)
- if (f->Name[nameLen - 1] == '/')
- {
- fileName = f->Name + nameLen;
- break;
- }
-
- outputHandle = fopen(fileName, "wb+");
- if (outputHandle == 0)
- {
- PrintError("can not open output file");
- res = SZE_FAIL;
- break;
- }
- processedSize = fwrite(outBuffer + offset, 1, outSizeProcessed, outputHandle);
- if (processedSize != outSizeProcessed)
- {
- PrintError("can not write output file");
- res = SZE_FAIL;
- break;
- }
- if (fclose(outputHandle))
- {
- PrintError("can not close output file");
- res = SZE_FAIL;
- break;
- }
- }
- printf("\n");
+ size_t offset;
+ size_t outSizeProcessed;
+ CFileItem *f = db.Database.Files + i;
+ if (f->IsDirectory)
+ printf("Directory ");
+ else
+ printf(testCommand ?
+ "Testing ":
+ "Extracting");
+ printf(" %s", f->Name);
+ if (f->IsDirectory)
+ {
+ printf("\n");
+ continue;
+ }
+ res = SzExtract(&archiveStream.InStream, &db, i,
+ &blockIndex, &outBuffer, &outBufferSize,
+ &offset, &outSizeProcessed,
+ &allocImp, &allocTempImp);
+ if (res != SZ_OK)
+ break;
+ if (!testCommand)
+ {
+ FILE *outputHandle;
+ UInt32 processedSize;
+ char *fileName = f->Name;
+ size_t nameLen = strlen(f->Name);
+ for (; nameLen > 0; nameLen--)
+ if (f->Name[nameLen - 1] == '/')
+ {
+ fileName = f->Name + nameLen;
+ break;
+ }
+
+ outputHandle = fopen(fileName, "wb+");
+ if (outputHandle == 0)
+ {
+ PrintError("can not open output file");
+ res = SZE_FAIL;
+ break;
+ }
+ processedSize = fwrite(outBuffer + offset, 1, outSizeProcessed, outputHandle);
+ if (processedSize != outSizeProcessed)
+ {
+ PrintError("can not write output file");
+ res = SZE_FAIL;
+ break;
+ }
+ if (fclose(outputHandle))
+ {
+ PrintError("can not close output file");
+ res = SZE_FAIL;
+ break;
+ }
+ }
+ printf("\n");
}
allocImp.Free(outBuffer);
}
}
if (res == SZE_OUTOFMEMORY)
PrintError("can not allocate memory");
- else
+ else
printf("\nERROR #%d\n", res);
return 1;
}
#include "7zTypes.h"
#define kMethodIDSize 15
-
+
typedef struct _CMethodID
{
Byte ID[kMethodIDSize];
#ifndef _7ZIP_BYTE_DEFINED
#define _7ZIP_BYTE_DEFINED
typedef unsigned char Byte;
-#endif
+#endif
#ifndef _7ZIP_UINT16_DEFINED
#define _7ZIP_UINT16_DEFINED
typedef unsigned short UInt16;
-#endif
+#endif
#ifndef _7ZIP_UINT32_DEFINED
#define _7ZIP_UINT32_DEFINED
#else
typedef unsigned int UInt32;
#endif
-#endif
+#endif
/* #define _SZ_NO_INT_64 */
/* define it your compiler doesn't support long long int */
#ifndef CFileSize
#ifdef _SZ_FILE_SIZE_64
-typedef UInt64 CFileSize;
+typedef UInt64 CFileSize;
#else
-typedef UInt32 CFileSize;
+typedef UInt32 CFileSize;
#endif
#endif
/*
LzmaDecode.c
LZMA Decoder (optimized for Speed version)
-
+
LZMA SDK 4.40 Copyright (c) 1999-2006 Igor Pavlov (2006-05-01)
http://www.7-zip.org/
LZMA SDK is licensed under two licenses:
1) GNU Lesser General Public License (GNU LGPL)
2) Common Public License (CPL)
- It means that you can select one of these two licenses and
+ It means that you can select one of these two licenses and
follow rules of that license.
SPECIAL EXCEPTION:
- Igor Pavlov, as the author of this Code, expressly permits you to
- statically or dynamically link your Code (or bind by name) to the
- interfaces of this file without subjecting your linked Code to the
- terms of the CPL or GNU LGPL. Any modifications or additions
+ Igor Pavlov, as the author of this Code, expressly permits you to
+ statically or dynamically link your Code (or bind by name) to the
+ interfaces of this file without subjecting your linked Code to the
+ terms of the CPL or GNU LGPL. Any modifications or additions
to this file, however, are subject to the LGPL or CPL terms.
*/
#define RC_TEST { if (Buffer == BufferLim) return LZMA_RESULT_DATA_ERROR; }
#define RC_INIT(buffer, bufferSize) Buffer = buffer; BufferLim = buffer + bufferSize; RC_INIT2
-
+
#endif
#define RC_NORMALIZE if (Range < kTopValue) { RC_TEST; Range <<= 8; Code = (Code << 8) | RC_READ_BYTE; }
#define RC_GET_BIT2(p, mi, A0, A1) IfBit0(p) \
{ UpdateBit0(p); mi <<= 1; A0; } else \
- { UpdateBit1(p); mi = (mi + mi) + 1; A1; }
-
-#define RC_GET_BIT(p, mi) RC_GET_BIT2(p, mi, ; , ;)
+ { UpdateBit1(p); mi = (mi + mi) + 1; A1; }
+
+#define RC_GET_BIT(p, mi) RC_GET_BIT2(p, mi, ; , ;)
#define RangeDecoderBitTreeDecode(probs, numLevels, res) \
{ int i = numLevels; res = 1; \
#define LenLow (LenChoice2 + 1)
#define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits))
#define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits))
-#define kNumLenProbs (LenHigh + kLenNumHighSymbols)
+#define kNumLenProbs (LenHigh + kLenNumHighSymbols)
#define kNumStates 12
int lc = vs->Properties.lc;
#ifdef _LZMA_OUT_READ
-
+
UInt32 Range = vs->Range;
UInt32 Code = vs->Code;
#ifdef _LZMA_IN_CB
UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (lc + vs->Properties.lp));
UInt32 i;
for (i = 0; i < numProbs; i++)
- p[i] = kBitModelTotal >> 1;
+ p[i] = kBitModelTotal >> 1;
rep0 = rep1 = rep2 = rep3 = 1;
state = 0;
globalPos = 0;
for (i = 0; i < numProbs; i++)
p[i] = kBitModelTotal >> 1;
}
-
+
#ifdef _LZMA_IN_CB
RC_INIT;
#else
CProb *prob;
UInt32 bound;
int posState = (int)(
- (nowPos
- #ifdef _LZMA_OUT_READ
- + globalPos
- #endif
- )
- & posStateMask);
+ (nowPos
+ #ifdef _LZMA_OUT_READ
+ + globalPos
+ #endif
+ )
+ & posStateMask);
prob = p + IsMatch + (state << kNumPosBitsMax) + posState;
IfBit0(prob)
{
int symbol = 1;
UpdateBit0(prob)
- prob = p + Literal + (LZMA_LIT_SIZE *
- (((
- (nowPos
- #ifdef _LZMA_OUT_READ
- + globalPos
- #endif
- )
- & literalPosMask) << lc) + (previousByte >> (8 - lc))));
+ prob = p + Literal + (LZMA_LIT_SIZE *
+ (((
+ (nowPos
+ #ifdef _LZMA_OUT_READ
+ + globalPos
+ #endif
+ )
+ & literalPosMask) << lc) + (previousByte >> (8 - lc))));
if (state >= kNumLitStates)
{
- int matchByte;
- #ifdef _LZMA_OUT_READ
- UInt32 pos = dictionaryPos - rep0;
- if (pos >= dictionarySize)
- pos += dictionarySize;
- matchByte = dictionary[pos];
- #else
- matchByte = outStream[nowPos - rep0];
- #endif
- do
- {
- int bit;
- CProb *probLit;
- matchByte <<= 1;
- bit = (matchByte & 0x100);
- probLit = prob + 0x100 + bit + symbol;
- RC_GET_BIT2(probLit, symbol, if (bit != 0) break, if (bit == 0) break)
- }
- while (symbol < 0x100);
+ int matchByte;
+ #ifdef _LZMA_OUT_READ
+ UInt32 pos = dictionaryPos - rep0;
+ if (pos >= dictionarySize)
+ pos += dictionarySize;
+ matchByte = dictionary[pos];
+ #else
+ matchByte = outStream[nowPos - rep0];
+ #endif
+ do
+ {
+ int bit;
+ CProb *probLit;
+ matchByte <<= 1;
+ bit = (matchByte & 0x100);
+ probLit = prob + 0x100 + bit + symbol;
+ RC_GET_BIT2(probLit, symbol, if (bit != 0) break, if (bit == 0) break)
+ }
+ while (symbol < 0x100);
}
while (symbol < 0x100)
{
- CProb *probLit = prob + symbol;
- RC_GET_BIT(probLit, symbol)
+ CProb *probLit = prob + symbol;
+ RC_GET_BIT(probLit, symbol)
}
previousByte = (Byte)symbol;
outStream[nowPos++] = previousByte;
#ifdef _LZMA_OUT_READ
if (distanceLimit < dictionarySize)
- distanceLimit++;
+ distanceLimit++;
dictionary[dictionaryPos] = previousByte;
if (++dictionaryPos == dictionarySize)
- dictionaryPos = 0;
+ dictionaryPos = 0;
#endif
if (state < 4) state = 0;
else if (state < 10) state -= 3;
else state -= 6;
}
- else
+ else
{
UpdateBit1(prob);
prob = p + IsRep + state;
IfBit0(prob)
{
- UpdateBit0(prob);
- rep3 = rep2;
- rep2 = rep1;
- rep1 = rep0;
- state = state < kNumLitStates ? 0 : 3;
- prob = p + LenCoder;
+ UpdateBit0(prob);
+ rep3 = rep2;
+ rep2 = rep1;
+ rep1 = rep0;
+ state = state < kNumLitStates ? 0 : 3;
+ prob = p + LenCoder;
}
else
{
- UpdateBit1(prob);
- prob = p + IsRepG0 + state;
- IfBit0(prob)
- {
- UpdateBit0(prob);
- prob = p + IsRep0Long + (state << kNumPosBitsMax) + posState;
- IfBit0(prob)
- {
- #ifdef _LZMA_OUT_READ
- UInt32 pos;
- #endif
- UpdateBit0(prob);
-
- #ifdef _LZMA_OUT_READ
- if (distanceLimit == 0)
- #else
- if (nowPos == 0)
- #endif
- return LZMA_RESULT_DATA_ERROR;
-
- state = state < kNumLitStates ? 9 : 11;
- #ifdef _LZMA_OUT_READ
- pos = dictionaryPos - rep0;
- if (pos >= dictionarySize)
- pos += dictionarySize;
- previousByte = dictionary[pos];
- dictionary[dictionaryPos] = previousByte;
- if (++dictionaryPos == dictionarySize)
- dictionaryPos = 0;
- #else
- previousByte = outStream[nowPos - rep0];
- #endif
- outStream[nowPos++] = previousByte;
- #ifdef _LZMA_OUT_READ
- if (distanceLimit < dictionarySize)
- distanceLimit++;
- #endif
-
- continue;
- }
- else
- {
- UpdateBit1(prob);
- }
- }
- else
- {
- UInt32 distance;
- UpdateBit1(prob);
- prob = p + IsRepG1 + state;
- IfBit0(prob)
- {
- UpdateBit0(prob);
- distance = rep1;
- }
- else
- {
- UpdateBit1(prob);
- prob = p + IsRepG2 + state;
- IfBit0(prob)
- {
- UpdateBit0(prob);
- distance = rep2;
- }
- else
- {
- UpdateBit1(prob);
- distance = rep3;
- rep3 = rep2;
- }
- rep2 = rep1;
- }
- rep1 = rep0;
- rep0 = distance;
- }
- state = state < kNumLitStates ? 8 : 11;
- prob = p + RepLenCoder;
+ UpdateBit1(prob);
+ prob = p + IsRepG0 + state;
+ IfBit0(prob)
+ {
+ UpdateBit0(prob);
+ prob = p + IsRep0Long + (state << kNumPosBitsMax) + posState;
+ IfBit0(prob)
+ {
+ #ifdef _LZMA_OUT_READ
+ UInt32 pos;
+ #endif
+ UpdateBit0(prob);
+
+ #ifdef _LZMA_OUT_READ
+ if (distanceLimit == 0)
+ #else
+ if (nowPos == 0)
+ #endif
+ return LZMA_RESULT_DATA_ERROR;
+
+ state = state < kNumLitStates ? 9 : 11;
+ #ifdef _LZMA_OUT_READ
+ pos = dictionaryPos - rep0;
+ if (pos >= dictionarySize)
+ pos += dictionarySize;
+ previousByte = dictionary[pos];
+ dictionary[dictionaryPos] = previousByte;
+ if (++dictionaryPos == dictionarySize)
+ dictionaryPos = 0;
+ #else
+ previousByte = outStream[nowPos - rep0];
+ #endif
+ outStream[nowPos++] = previousByte;
+ #ifdef _LZMA_OUT_READ
+ if (distanceLimit < dictionarySize)
+ distanceLimit++;
+ #endif
+
+ continue;
+ }
+ else
+ {
+ UpdateBit1(prob);
+ }
+ }
+ else
+ {
+ UInt32 distance;
+ UpdateBit1(prob);
+ prob = p + IsRepG1 + state;
+ IfBit0(prob)
+ {
+ UpdateBit0(prob);
+ distance = rep1;
+ }
+ else
+ {
+ UpdateBit1(prob);
+ prob = p + IsRepG2 + state;
+ IfBit0(prob)
+ {
+ UpdateBit0(prob);
+ distance = rep2;
+ }
+ else
+ {
+ UpdateBit1(prob);
+ distance = rep3;
+ rep3 = rep2;
+ }
+ rep2 = rep1;
+ }
+ rep1 = rep0;
+ rep0 = distance;
+ }
+ state = state < kNumLitStates ? 8 : 11;
+ prob = p + RepLenCoder;
}
{
- int numBits, offset;
- CProb *probLen = prob + LenChoice;
- IfBit0(probLen)
- {
- UpdateBit0(probLen);
- probLen = prob + LenLow + (posState << kLenNumLowBits);
- offset = 0;
- numBits = kLenNumLowBits;
- }
- else
- {
- UpdateBit1(probLen);
- probLen = prob + LenChoice2;
- IfBit0(probLen)
- {
- UpdateBit0(probLen);
- probLen = prob + LenMid + (posState << kLenNumMidBits);
- offset = kLenNumLowSymbols;
- numBits = kLenNumMidBits;
- }
- else
- {
- UpdateBit1(probLen);
- probLen = prob + LenHigh;
- offset = kLenNumLowSymbols + kLenNumMidSymbols;
- numBits = kLenNumHighBits;
- }
- }
- RangeDecoderBitTreeDecode(probLen, numBits, len);
- len += offset;
+ int numBits, offset;
+ CProb *probLen = prob + LenChoice;
+ IfBit0(probLen)
+ {
+ UpdateBit0(probLen);
+ probLen = prob + LenLow + (posState << kLenNumLowBits);
+ offset = 0;
+ numBits = kLenNumLowBits;
+ }
+ else
+ {
+ UpdateBit1(probLen);
+ probLen = prob + LenChoice2;
+ IfBit0(probLen)
+ {
+ UpdateBit0(probLen);
+ probLen = prob + LenMid + (posState << kLenNumMidBits);
+ offset = kLenNumLowSymbols;
+ numBits = kLenNumMidBits;
+ }
+ else
+ {
+ UpdateBit1(probLen);
+ probLen = prob + LenHigh;
+ offset = kLenNumLowSymbols + kLenNumMidSymbols;
+ numBits = kLenNumHighBits;
+ }
+ }
+ RangeDecoderBitTreeDecode(probLen, numBits, len);
+ len += offset;
}
if (state < 4)
{
- int posSlot;
- state += kNumLitStates;
- prob = p + PosSlot +
- ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) <<
- kNumPosSlotBits);
- RangeDecoderBitTreeDecode(prob, kNumPosSlotBits, posSlot);
- if (posSlot >= kStartPosModelIndex)
- {
- int numDirectBits = ((posSlot >> 1) - 1);
- rep0 = (2 | ((UInt32)posSlot & 1));
- if (posSlot < kEndPosModelIndex)
- {
- rep0 <<= numDirectBits;
- prob = p + SpecPos + rep0 - posSlot - 1;
- }
- else
- {
- numDirectBits -= kNumAlignBits;
- do
- {
- RC_NORMALIZE
- Range >>= 1;
- rep0 <<= 1;
- if (Code >= Range)
- {
- Code -= Range;
- rep0 |= 1;
- }
- }
- while (--numDirectBits != 0);
- prob = p + Align;
- rep0 <<= kNumAlignBits;
- numDirectBits = kNumAlignBits;
- }
- {
- int i = 1;
- int mi = 1;
- do
- {
- CProb *prob3 = prob + mi;
- RC_GET_BIT2(prob3, mi, ; , rep0 |= i);
- i <<= 1;
- }
- while(--numDirectBits != 0);
- }
- }
- else
- rep0 = posSlot;
- if (++rep0 == (UInt32)(0))
- {
- /* it's for stream version */
- len = kLzmaStreamWasFinishedId;
- break;
- }
+ int posSlot;
+ state += kNumLitStates;
+ prob = p + PosSlot +
+ ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) <<
+ kNumPosSlotBits);
+ RangeDecoderBitTreeDecode(prob, kNumPosSlotBits, posSlot);
+ if (posSlot >= kStartPosModelIndex)
+ {
+ int numDirectBits = ((posSlot >> 1) - 1);
+ rep0 = (2 | ((UInt32)posSlot & 1));
+ if (posSlot < kEndPosModelIndex)
+ {
+ rep0 <<= numDirectBits;
+ prob = p + SpecPos + rep0 - posSlot - 1;
+ }
+ else
+ {
+ numDirectBits -= kNumAlignBits;
+ do
+ {
+ RC_NORMALIZE
+ Range >>= 1;
+ rep0 <<= 1;
+ if (Code >= Range)
+ {
+ Code -= Range;
+ rep0 |= 1;
+ }
+ }
+ while (--numDirectBits != 0);
+ prob = p + Align;
+ rep0 <<= kNumAlignBits;
+ numDirectBits = kNumAlignBits;
+ }
+ {
+ int i = 1;
+ int mi = 1;
+ do
+ {
+ CProb *prob3 = prob + mi;
+ RC_GET_BIT2(prob3, mi, ; , rep0 |= i);
+ i <<= 1;
+ }
+ while(--numDirectBits != 0);
+ }
+ }
+ else
+ rep0 = posSlot;
+ if (++rep0 == (UInt32)(0))
+ {
+ /* it's for stream version */
+ len = kLzmaStreamWasFinishedId;
+ break;
+ }
}
len += kMatchMinLen;
#ifdef _LZMA_OUT_READ
- if (rep0 > distanceLimit)
+ if (rep0 > distanceLimit)
#else
if (rep0 > nowPos)
#endif
- return LZMA_RESULT_DATA_ERROR;
+ return LZMA_RESULT_DATA_ERROR;
#ifdef _LZMA_OUT_READ
if (dictionarySize - distanceLimit > (UInt32)len)
- distanceLimit += len;
+ distanceLimit += len;
else
- distanceLimit = dictionarySize;
+ distanceLimit = dictionarySize;
#endif
do
{
- #ifdef _LZMA_OUT_READ
- UInt32 pos = dictionaryPos - rep0;
- if (pos >= dictionarySize)
- pos += dictionarySize;
- previousByte = dictionary[pos];
- dictionary[dictionaryPos] = previousByte;
- if (++dictionaryPos == dictionarySize)
- dictionaryPos = 0;
- #else
- previousByte = outStream[nowPos - rep0];
- #endif
- len--;
- outStream[nowPos++] = previousByte;
+ #ifdef _LZMA_OUT_READ
+ UInt32 pos = dictionaryPos - rep0;
+ if (pos >= dictionarySize)
+ pos += dictionarySize;
+ previousByte = dictionary[pos];
+ dictionary[dictionaryPos] = previousByte;
+ if (++dictionaryPos == dictionarySize)
+ dictionaryPos = 0;
+ #else
+ previousByte = outStream[nowPos - rep0];
+ #endif
+ len--;
+ outStream[nowPos++] = previousByte;
}
while(len != 0 && nowPos < outSize);
}
-/*
+/*
LzmaDecode.h
LZMA Decoder interface
LZMA SDK is licensed under two licenses:
1) GNU Lesser General Public License (GNU LGPL)
2) Common Public License (CPL)
- It means that you can select one of these two licenses and
+ It means that you can select one of these two licenses and
follow rules of that license.
SPECIAL EXCEPTION:
- Igor Pavlov, as the author of this code, expressly permits you to
- statically or dynamically link your code (or bind by name) to the
- interfaces of this file without subjecting your linked code to the
- terms of the CPL or GNU LGPL. Any modifications or additions
+ Igor Pavlov, as the author of this code, expressly permits you to
+ statically or dynamically link your code (or bind by name) to the
+ interfaces of this file without subjecting your linked code to the
+ terms of the CPL or GNU LGPL. Any modifications or additions
to this file, however, are subject to the LGPL or CPL terms.
*/
/* Use read function for output data */
/* #define _LZMA_PROB32 */
-/* It can increase speed on some 32-bit CPUs,
+/* It can increase speed on some 32-bit CPUs,
but memory usage will be doubled in that case */
/* #define _LZMA_LOC_OPT */
-/*
-LzmaTypes.h
+/*
+LzmaTypes.h
Types for LZMA Decoder
#ifndef _7ZIP_BYTE_DEFINED
#define _7ZIP_BYTE_DEFINED
typedef unsigned char Byte;
-#endif
+#endif
#ifndef _7ZIP_UINT16_DEFINED
#define _7ZIP_UINT16_DEFINED
typedef unsigned short UInt16;
-#endif
+#endif
#ifndef _7ZIP_UINT32_DEFINED
#define _7ZIP_UINT32_DEFINED
#else
typedef unsigned int UInt32;
#endif
-#endif
+#endif
/* #define _LZMA_SYSTEM_SIZE_T */
/* Use system's size_t. You can use it to enable 64-bit sizes supporting */
if ( (cmd == CMD_VIEW) || (cmd == CMD_VIEWFULL) ) {
pv = (USHORT)(c_version/100);
- write_log(" Created with DMS version %d.%02d ",pv,c_version-pv*100);
+ write_log (" Created with DMS version %d.%02d ",pv,c_version-pv*100);
if (geninfo & 0x80)
- write_log("Registered\n");
+ write_log ("Registered\n");
else
- write_log("Evaluation\n");
+ write_log ("Evaluation\n");
- write_log(" Creation date : %s",ctime(&date));
- write_log(" Lowest track in archive : %d\n",from);
- write_log(" Highest track in archive : %d\n",to);
- write_log(" Packed data size : %lu\n",pkfsize);
- write_log(" Unpacked data size : %lu\n",unpkfsize);
- write_log(" Disk type of archive : ");
+ write_log (" Creation date : %s",ctime(&date));
+ write_log (" Lowest track in archive : %d\n",from);
+ write_log (" Highest track in archive : %d\n",to);
+ write_log (" Packed data size : %lu\n",pkfsize);
+ write_log (" Unpacked data size : %lu\n",unpkfsize);
+ write_log (" Disk type of archive : ");
/* The original DMS from SDS software (DMS up to 1.11) used other values */
/* in disk type to indicate formats as MS-DOS, AMax and Mac, but it was */
case 0:
case 1:
/* Can also be a non-dos disk */
- write_log("AmigaOS 1.0 OFS\n");
+ write_log ("AmigaOS 1.0 OFS\n");
break;
case 2:
- write_log("AmigaOS 2.0 FFS\n");
+ write_log ("AmigaOS 2.0 FFS\n");
break;
case 3:
- write_log("AmigaOS 3.0 OFS / International\n");
+ write_log ("AmigaOS 3.0 OFS / International\n");
break;
case 4:
- write_log("AmigaOS 3.0 FFS / International\n");
+ write_log ("AmigaOS 3.0 FFS / International\n");
break;
case 5:
- write_log("AmigaOS 3.0 OFS / Dir Cache\n");
+ write_log ("AmigaOS 3.0 OFS / Dir Cache\n");
break;
case 6:
- write_log("AmigaOS 3.0 FFS / Dir Cache\n");
+ write_log ("AmigaOS 3.0 FFS / Dir Cache\n");
break;
case 7:
- write_log("FMS Amiga System File\n");
+ write_log ("FMS Amiga System File\n");
break;
default:
- write_log("Unknown\n");
+ write_log ("Unknown\n");
}
- write_log(" Compression mode used : ");
+ write_log (" Compression mode used : ");
if (cmode>6)
- write_log("Unknown !\n");
+ write_log ("Unknown !\n");
else
- write_log("%s\n",modes[cmode]);
-
- write_log(" General info : ");
- if ((geninfo==0)||(geninfo==0x80)) write_log("None");
- if (geninfo & 1) write_log("NoZero ");
- if (geninfo & 2) write_log("Encrypted ");
- if (geninfo & 4) write_log("Appends ");
- if (geninfo & 8) write_log("Banner ");
- if (geninfo & 16) write_log("HD ");
- if (geninfo & 32) write_log("MS-DOS ");
- if (geninfo & 64) write_log("DMS_DEV_Fixed ");
- if (geninfo & 256) write_log("FILEID.DIZ");
- write_log("\n");
-
- write_log(" Info Header CRC : %04X\n\n",hcrc);
+ write_log ("%s\n",modes[cmode]);
+
+ write_log (" General info : ");
+ if ((geninfo==0)||(geninfo==0x80)) write_log ("None");
+ if (geninfo & 1) write_log ("NoZero ");
+ if (geninfo & 2) write_log ("Encrypted ");
+ if (geninfo & 4) write_log ("Appends ");
+ if (geninfo & 8) write_log ("Banner ");
+ if (geninfo & 16) write_log ("HD ");
+ if (geninfo & 32) write_log ("MS-DOS ");
+ if (geninfo & 64) write_log ("DMS_DEV_Fixed ");
+ if (geninfo & 256) write_log ("FILEID.DIZ");
+ write_log ("\n");
+
+ write_log (" Info Header CRC : %04X\n\n",hcrc);
}
if (cmd == CMD_VIEWFULL) {
- write_log(" Track Plength Ulength Cmode USUM HCRC DCRC Cflag\n");
- write_log(" ------ ------- ------- ------ ---- ---- ---- -----\n");
+ write_log (" Track Plength Ulength Cmode USUM HCRC DCRC Cflag\n");
+ write_log (" ------ ------- ------- ------ ---- ---- ---- -----\n");
}
// if (((cmd==CMD_UNPACK) || (cmd==CMD_SHOWBANNER)) && (geninfo & 2) && (!pwd))
}
}
- if ((cmd == CMD_VIEWFULL) || (cmd == CMD_SHOWDIZ) || (cmd == CMD_SHOWBANNER)) write_log("\n");
+ if ((cmd == CMD_VIEWFULL) || (cmd == CMD_SHOWDIZ) || (cmd == CMD_SHOWBANNER)) write_log ("\n");
if (ret == DMS_FILE_END) ret = NO_PROBLEM;
if (cmd == CMD_VIEWFULL) {
if (number==80)
- write_log(" FileID ");
+ write_log (" FileID ");
else if (number==0xffff)
- write_log(" Banner ");
+ write_log (" Banner ");
else if ((number==0) && (unpklen==1024))
- write_log(" FakeBB ");
+ write_log (" FakeBB ");
else
- write_log(" %2d ",(short)number);
+ write_log (" %2d ",(short)number);
- write_log("%5d %5d %s %04X %04X %04X %0d\n", pklen1, unpklen, modes[cmode], usum, hcrc, dcrc, flags);
+ write_log ("%5d %5d %s %04X %04X %04X %0d\n", pklen1, unpklen, modes[cmode], usum, hcrc, dcrc, flags);
}
if ((pklen1 > TRACK_BUFFER_LEN) || (pklen2 >TRACK_BUFFER_LEN) || (unpklen > TRACK_BUFFER_LEN)) return ERR_BIGTRACK;
//if (pwd && (number!=80)) dms_decrypt(b1,pklen1);
if ((cmd == CMD_UNPACK) && (number<80) && (unpklen>2048)) {
- memset(b2, 0, unpklen);
+ memset(b2, 0, unpklen);
if (!crcerr)
Unpack_Track(b1, b2, pklen2, unpklen, cmode, flags, number, pklen1, usum);
if (zfile_fwrite(b2,1,(size_t)unpklen,fo) != unpklen) return ERR_CANTWRITE;
if (usum1 == Calc_CheckSum(b2,(ULONG)unpklen)) {
passfound = maybeencrypted;
if (passfound)
- write_log("DMS: decryption key = 0x%04.4X\n", pass);
+ write_log ("DMS: decryption key = 0x%04.4X\n", pass);
err = NO_PROBLEM;
pass = prevpass;
break;
while (i<m+len) {
if (*i == 10) {
*i=0;
- write_log("%s\n",j);
+ write_log ("%s\n",j);
j=i+1;
}
i++;
/* ------------------------------------------------------------------------ */
static short child[TREESIZE], parent[TREESIZE], block[TREESIZE], edge[TREESIZE], stock[TREESIZE],
- s_node[TREESIZE / 2]; /* Changed N.Watazaki */
+ s_node[TREESIZE / 2]; /* Changed N.Watazaki */
/* node[..] -> s_node[..] */
static unsigned short freq[TREESIZE];
/* ------------------------------------------------------------------------ */
static unsigned short
-get_word()
+get_word ()
{
int b0, b1;
- b0 = get_byte();
- b1 = get_byte();
+ b0 = get_byte ();
+ b1 = get_byte ();
return (b1 << 8) + b0;
}
/* ------------------------------------------------------------------------ */
static void
-put_word(v)
+put_word (v)
unsigned int v;
{
- put_byte(v);
- put_byte(v >> 8);
+ put_byte (v);
+ put_byte (v >> 8);
}
/* ------------------------------------------------------------------------ */
{
long b0, b1, b2, b3;
- b0 = get_byte();
- b1 = get_byte();
- b2 = get_byte();
- b3 = get_byte();
+ b0 = get_byte ();
+ b1 = get_byte ();
+ b2 = get_byte ();
+ b3 = get_byte ();
return (b3 << 24) + (b2 << 16) + (b1 << 8) + b0;
}
put_longword(v)
long v;
{
- put_byte(v);
- put_byte(v >> 8);
- put_byte(v >> 16);
- put_byte(v >> 24);
+ put_byte (v);
+ put_byte (v >> 8);
+ put_byte (v >> 16);
+ put_byte (v >> 24);
}
/* ------------------------------------------------------------------------ */
return FALSE; /* finish */
}
setup_get(data + I_HEADER_LEVEL);
- hdr->header_level = get_byte();
+ hdr->header_level = get_byte ();
if (hdr->header_level != 2 &&
zfile_fread(data + header_size, sizeof(char), 2, fp) < 2) {
fatal_error("Invalid header (LHarc file ?)");
}
setup_get(data + I_HEADER_CHECKSUM);
- checksum = get_byte();
+ checksum = get_byte ();
if (hdr->header_level == 2) {
hdr->header_size = header_size + checksum*256;
hdr->packed_size = get_longword();
hdr->original_size = get_longword();
hdr->last_modified_stamp = get_longword();
- hdr->attribute = get_byte();
+ hdr->attribute = get_byte ();
- if ((hdr->header_level = get_byte()) != 2) {
+ if ((hdr->header_level = get_byte ()) != 2) {
if (calc_sum(data + I_METHOD, header_size) != checksum)
warning("Checksum error (LHarc file?)", "");
- name_length = get_byte();
+ name_length = get_byte ();
for (i = 0; i < name_length; i++)
- hdr->name[i] = (char) get_byte();
+ hdr->name[i] = (char) get_byte ();
hdr->name[name_length] = '\0';
}
else {
}
} else {
hdr->has_crc = TRUE;
- hdr->crc = get_word();
+ hdr->crc = get_word ();
}
if (extend_size >= 1) {
- hdr->extend_type = get_byte();
+ hdr->extend_type = get_byte ();
extend_size--;
}
if (hdr->extend_type == EXTEND_UNIX || hdr->extend_type == EXTEND_AMIGAOS) {
if (extend_size >= 11) {
- hdr->minor_version = get_byte();
+ hdr->minor_version = get_byte ();
hdr->unix_last_modified_stamp = (time_t) get_longword();
- hdr->unix_mode = get_word();
- hdr->unix_uid = get_word();
- hdr->unix_gid = get_word();
+ hdr->unix_mode = get_word ();
+ hdr->unix_uid = get_word ();
+ hdr->unix_gid = get_word ();
extend_size -= 11;
} else {
hdr->extend_type = EXTEND_GENERIC;
}
}
while (extend_size-- > 0)
- dmy = get_byte();
+ dmy = get_byte ();
if (hdr->extend_type == EXTEND_UNIX)
return TRUE;
} else if (hdr->header_level == 1) {
hdr->has_crc = TRUE;
extend_size = header_size - name_length-25;
- hdr->crc = get_word();
- hdr->extend_type = get_byte();
+ hdr->crc = get_word ();
+ hdr->extend_type = get_byte ();
while (extend_size-- > 0)
- dmy = get_byte();
+ dmy = get_byte ();
} else { /* level 2 */
hdr->has_crc = TRUE;
- hdr->crc = get_word();
- hdr->extend_type = get_byte();
- }
+ hdr->crc = get_word ();
+ hdr->extend_type = get_byte ();
+ }
if (hdr->header_level > 0) {
/* Extend Header */
if (hdr->header_level != 2)
setup_get(data + hdr->header_size);
ptr = get_ptr;
- while ((header_size = get_word()) != 0) {
+ while ((header_size = get_word ()) != 0) {
if (hdr->header_level != 2 &&
((data + LZHEADER_STRAGE - get_ptr < header_size) ||
zfile_fread(get_ptr, sizeof(char), header_size, fp) < header_size)) {
fatal_error("Invalid header (LHa file ?)");
return FALSE;
}
- switch (get_byte()) {
+ switch (get_byte ()) {
case 0:
/*
* header crc
if (header_size >= 256)
return FALSE;
for (i = 0; i < header_size - 3; i++)
- hdr->name[i] = (char) get_byte();
+ hdr->name[i] = (char) get_byte ();
hdr->name[header_size - 3] = '\0';
name_length = header_size - 3;
break;
if (header_size >= FILENAME_LENGTH)
return FALSE;
for (i = 0; i < header_size - 3; i++)
- dirname[i] = (char) get_byte();
+ dirname[i] = (char) get_byte ();
dirname[header_size - 3] = '\0';
convdelim(dirname, DELIM);
dir_length = header_size - 3;
hdr->extend_type == EXTEND_HUMAN ||
hdr->extend_type == EXTEND_AMIGAOS ||
hdr->extend_type == EXTEND_GENERIC)
- hdr->attribute = get_word();
+ hdr->attribute = get_word ();
break;
case 0x50:
/*
* UNIX permission
*/
if (hdr->extend_type == EXTEND_UNIX)
- hdr->unix_mode = get_word();
+ hdr->unix_mode = get_word ();
break;
case 0x51:
/*
* UNIX gid and uid
*/
if (hdr->extend_type == EXTEND_UNIX) {
- hdr->unix_gid = get_word();
- hdr->unix_uid = get_word();
+ hdr->unix_gid = get_word ();
+ hdr->unix_uid = get_word ();
}
break;
case 0x52:
strcpy(&hdr->name[len++], "/");
}
-#ifdef S_IFLNK
+#ifdef S_IFLNK
if (is_symlink(v_stat)) {
char lkname[257];
- int len;
+ int len;
bcopy(LZHDIRS_METHOD, hdr->method, METHOD_TYPE_STRAGE);
hdr->attribute = GENERIC_DIRECTORY_ATTRIBUTE;
hdr->original_size = 0;
unsigned short left[2 * NC - 1], right[2 * NC - 1];
unsigned char c_len[NC], pt_len[NPT];
unsigned short c_freq[2 * NC - 1], c_table[4096], c_code[NC], p_freq[2 * NP - 1],
- pt_table[256], pt_code[NPT], t_freq[2 * NT - 1];
+ pt_table[256], pt_code[NPT], t_freq[2 * NT - 1];
static unsigned char *buf;
static unsigned int bufsiz;
}
}
#endif
- n = fread_crc(&text[(unsigned)(txtsiz - dicsiz)],
- (unsigned)dicsiz, infile);
+ n = fread_crc(&text[(unsigned)(txtsiz - dicsiz)],
+ (unsigned)dicsiz, infile);
remainder += n;
encoded_origsize += n;
crc = unpackable = 0;
/* encode_alloc(); */ /* allocate_memory(); */
- init_slide();
+ init_slide();
encode_set.encode_start();
memset(&text[0], ' ', (long)TXTSIZ);
pos = dicsiz;
if (matchlen > remainder) matchlen = remainder;
- hval = ((((text[dicsiz] << 5) ^ text[dicsiz + 1]) << 5)
- ^ text[dicsiz + 2]) & (unsigned)(HSHSIZ - 1);
+ hval = ((((text[dicsiz] << 5) ^ text[dicsiz + 1]) << 5)
+ ^ text[dicsiz + 2]) & (unsigned)(HSHSIZ - 1);
insert();
while (remainder > 0 && ! unpackable) {
unsigned int i, j, k, c;
unsigned int dicsiz1, offset;
unsigned char *dtext;
-
+
#ifdef DEBUG
fout = fopen("de", "wt");
zn->method = i;
}
zfile_fseek(zf, hdr.packed_size, SEEK_CUR);
-
+
}
return zv;
}
case LARC_METHOD_NUM: /* -lzs- */
lhinterface.dicbit = 11;
decode(&lhinterface);
- break;
+ break;
case LZHUFF1_METHOD_NUM: /* -lh1- */
case LZHUFF4_METHOD_NUM: /* -lh4- */
case LARC5_METHOD_NUM: /* -lz5- */
/* There is an alternate algorithm which is faster but also more complex. */
static int make_decode_table(int number_symbols, int table_size,
- unsigned char *length, unsigned short *table)
+ unsigned char *length, unsigned short *table)
{
register unsigned char bit_num = 0;
register int symbol;
{
do /* symbol is longer than 6 bits */
{
- symbol = huffman20_table[((control >> 6) & 1) + (symbol << 1)];
- if(!shift--)
- {
- shift += 16;
- control += *source++ << 24;
- control += *source++ << 16;
- }
- control >>= 1;
+ symbol = huffman20_table[((control >> 6) & 1) + (symbol << 1)];
+ if(!shift--)
+ {
+ shift += 16;
+ control += *source++ << 24;
+ control += *source++ << 16;
+ }
+ control >>= 1;
} while(symbol >= 20);
temp = 6;
}
unpsize -= s;
crc_calc (pdest, s);
} else {
- write_log("LZX corrupt compressed data\n");
+ write_log ("LZX corrupt compressed data\n");
goto end;
}
}
/* pre-cache all files we just decompressed */
for (;;) {
- if (znfirst->size && !znfirst->f) {
+ if (znfirst->size && !znfirst->f) {
dstf = zfile_fopen_empty (znfirst->name, znfirst->size);
zfile_fwrite(dbuf + znfirst->offset2, znfirst->size, 1, dstf);
znfirst->f = dstf;
actual = zfile_fread(header_comment, 1, temp, in_file);
if(!zfile_ferror(in_file))
{
- if(actual == temp)
- {
- header_comment[temp] = 0;
- crc_calc(header_comment, temp);
- if(sum == crc)
- {
+ if(actual == temp)
+ {
+ header_comment[temp] = 0;
+ crc_calc(header_comment, temp);
+ if(sum == crc)
+ {
unsigned int year, month, day;
unsigned int hour, minute, second;
unsigned char attributes;
- attributes = archive_header[0]; /* file protection modes */
- unpack_size = (archive_header[5] << 24) + (archive_header[4] << 16) + (archive_header[3] << 8) + archive_header[2]; /* unpack size */
- pack_size = (archive_header[9] << 24) + (archive_header[8] << 16) + (archive_header[7] << 8) + archive_header[6]; /* packed size */
- temp = (archive_header[18] << 24) + (archive_header[19] << 16) + (archive_header[20] << 8) + archive_header[21]; /* date */
- year = ((temp >> 17) & 63) + 1970;
- month = (temp >> 23) & 15;
- day = (temp >> 27) & 31;
- hour = (temp >> 12) & 31;
- minute = (temp >> 6) & 63;
- second = temp & 63;
+ attributes = archive_header[0]; /* file protection modes */
+ unpack_size = (archive_header[5] << 24) + (archive_header[4] << 16) + (archive_header[3] << 8) + archive_header[2]; /* unpack size */
+ pack_size = (archive_header[9] << 24) + (archive_header[8] << 16) + (archive_header[7] << 8) + archive_header[6]; /* packed size */
+ temp = (archive_header[18] << 24) + (archive_header[19] << 16) + (archive_header[20] << 8) + archive_header[21]; /* date */
+ year = ((temp >> 17) & 63) + 1970;
+ month = (temp >> 23) & 15;
+ day = (temp >> 27) & 31;
+ hour = (temp >> 12) & 31;
+ minute = (temp >> 6) & 63;
+ second = temp & 63;
memset(&zai, 0, sizeof zai);
zai.name = header_filename;
zn = zvolume_addfile_abs(zv, &zai);
zn->offset2 = merge_size;
- //write_log("%d %d %d %s\n", unpack_size, merge_size, pack_size, zai.name);
- total_pack += pack_size;
- total_unpack += unpack_size;
- total_files++;
- merge_size += unpack_size;
+ //write_log ("%d %d %d %s\n", unpack_size, merge_size, pack_size, zai.name);
+ total_pack += pack_size;
+ total_unpack += unpack_size;
+ total_files++;
+ merge_size += unpack_size;
if(pack_size) /* seek past the packed data */
- {
- merge_size = 0;
+ {
+ merge_size = 0;
zn->offset = zfile_ftell(in_file);
zn->packedsize = pack_size;
- if(!zfile_fseek(in_file, pack_size, SEEK_CUR))
- {
- abort = 0; /* continue */
- }
- }
- else
- abort = 0; /* continue */
- }
- }
+ if(!zfile_fseek(in_file, pack_size, SEEK_CUR))
+ {
+ abort = 0; /* continue */
+ }
+ }
+ else
+ abort = 0; /* continue */
+ }
+ }
}
}
}
--- /dev/null
+
+
+#include <stdio.h>
+
+void *xmalloc(int v)
+{
+ return malloc(v);
+}
+
+void *zfile_fopen(const char *name, const char *mode)
+{
+ return fopen(name, mode);
+}
+void zfile_fclose(void *z)
+{
+ fclose(z);
+}
memcpy (codeptr + haddr, p, hsize);
p += hsize;
} else if (htype != 0x3eb) {
- write_log("RELOC: unknown hunk %08X\n", htype);
+ write_log ("RELOC: unknown hunk %08X\n", htype);
goto end;
}
htype = gl(p);
if (htype == 0x3f2)
continue;
if (htype != 0x3ec) {
- write_log("RELOC: expected 000003EC but got %08X\n", htype);
+ write_log ("RELOC: expected 000003EC but got %08X\n", htype);
goto end;
}
relocnum = gl(p);
p += 4;
- relochunknum = gl(p);
+ relochunknum = gl(p);
p += 4;
- srchunk = hunks[relochunknum];
+ srchunk = hunks[relochunknum];
for (j = 0; j < relocnum; j++) {
uae_u32 off = gl(p);
p += 4;
pl(codeptr + haddr + off, gl(codeptr + haddr + off) + srchunk);
}
}
- write_log("XFD slave '%s' loaded and relocated @%08X (%d bytes) succesfully\n", path, startaddr, codememory - startaddr);
+ write_log ("XFD slave '%s' loaded and relocated @%08X (%d bytes) succesfully\n", path, startaddr, codememory - startaddr);
p = codeptr + startaddr + 8;
if (gl(p + 4) != 'XFDF') {
- write_log("XFD header corrupt\n");
+ write_log ("XFD header corrupt\n");
goto end;
}
p = codeptr + gl(p + 20);
uae_u8 *nameptr = codeptr + name;
struct xfdslave *xfds;
- write_log("- '%s' ver %d, master ver %d, minsize %d\n",
+ write_log ("- '%s' ver %d, master ver %d, minsize %d\n",
nameptr, version, mversion, minsize);
xfds = xcalloc(sizeof(struct xfdslave), 1);
xfds->name = nameptr;
static void initexec(void)
{
-
+
pl(codeptr + 4, exec);
// fake memory allocation functions
while (xfds) {
uaecptr start = xfds->start;
memset(&xregs, 0, sizeof xregs);
- pl(codeptr + freememaddr, codememory + size); // reset start of "free memory"
+ pl(codeptr + freememaddr, codememory + size); // reset start of "free memory"
xregs.regs[0] = size; // D0
xregs.regs[8] = codememory; // A0
xregs.regs[9] = bufferinfo; // A1
APTR xfdbi_UserTargetBuf; /* (V38) Target buffer allocated by user */
ULONG xfdbi_UserTargetBufLen;/* (V38) Target buffer length */
ULONG xfdbi_MinSourceLen; /* (V39) minimum source length (tested by
- master library */
+ master library */
};
#define xfdbi_MaxSpecialLen xfdbi_Error /* Max. length of special info */
that support user targets */
#define XFDFB_USERTARGET 3 /* (V38) xfdbi_DecrunchBuffer() decrunchs
to given xfdbi_UserTarget */
-#define XFDFB_MASTERALLOC 4 /* (V39) master allocated decrunch buffer */
+#define XFDFB_MASTERALLOC 4 /* (V39) master allocated decrunch buffer */
/* Bit masks */
#define XFDFF_RECOGEXTERN (1<<XFDFB_RECOGEXTERN)
int request_word, request_word_skip;
int vpos;
int sample_accum, sample_accum_time;
- int output_state;
+ int sinc_output_state;
sinc_queue_t sinc_queue[SINC_QUEUE_LENGTH];
int sinc_queue_length;
};
memmove (s, s + l, strlen (s + l) + 1);
}
-void audio_sampleripper(int mode)
+void audio_sampleripper (int mode)
{
struct ripped_sample *rs = ripped_samples;
int cnt = 1;
while (rs) {
if (rs->changed) {
rs->changed = 0;
- fetch_screenshotpath(path, sizeof (path));
+ fetch_screenshotpath (path, sizeof (path));
name[0] = 0;
if (currprefs.dfxtype[0] >= 0)
strcpy (name, currprefs.df[0]);
if (!name[0])
underline[0] = 0;
namesplit (name);
- strcpy(extension, "wav");
- sprintf(filename,"%s%s%s%03.3d.%s", path, name, underline, cnt, extension);
+ strcpy (extension, "wav");
+ sprintf (filename, "%s%s%s%03.3d.%s", path, name, underline, cnt, extension);
wavfile = zfile_fopen(filename, "wb");
if (wavfile) {
int freq = rs->per > 0 ? (currprefs.ntscmode ? 3579545 : 3546895 / rs->per) : 8000;
- write_wavheader(wavfile, 0, 0);
- convertsample(rs->sample, rs->len);
- zfile_fwrite(rs->sample, rs->len, 1, wavfile);
- convertsample(rs->sample, rs->len);
- write_wavheader(wavfile, zfile_ftell(wavfile), freq);
- zfile_fclose(wavfile);
- write_log("SAMPLERIPPER: %d: %dHz %d bytes\n", cnt, freq, rs->len);
+ write_wavheader (wavfile, 0, 0);
+ convertsample (rs->sample, rs->len);
+ zfile_fwrite (rs->sample, rs->len, 1, wavfile);
+ convertsample (rs->sample, rs->len);
+ write_wavheader (wavfile, zfile_ftell(wavfile), freq);
+ zfile_fclose (wavfile);
+ write_log ("SAMPLERIPPER: %d: %dHz %d bytes\n", cnt, freq, rs->len);
} else {
- write_log("SAMPLERIPPER: failed to open '%s'\n", filename);
+ write_log ("SAMPLERIPPER: failed to open '%s'\n", filename);
}
}
cnt++;
}
}
-static void do_samplerip(struct audio_channel_data *adp)
+static void do_samplerip (struct audio_channel_data *adp)
{
struct ripped_sample *rs = ripped_samples, *prev;
int len = adp->len * 2;
- uae_u8 *smp = chipmem_bank.xlateaddr(adp->pt);
+ uae_u8 *smp = chipmem_bank.xlateaddr (adp->pt);
int cnt = 0, i;
- if (!smp || !chipmem_bank.check(adp->pt, len))
+ if (!smp || !chipmem_bank.check (adp->pt, len))
return;
for (i = 0; i < len; i++) {
if (smp[i] != 0)
prev = NULL;
while(rs) {
if (rs->sample) {
- if (len == rs->len && !memcmp(rs->sample, smp, len))
+ if (len == rs->len && !memcmp (rs->sample, smp, len))
break;
/* replace old identical but shorter sample */
- if (len > rs->len && !memcmp(rs->sample, smp, rs->len)) {
+ if (len > rs->len && !memcmp (rs->sample, smp, rs->len)) {
xfree(rs->sample);
- rs->sample = (uae_u8*)xmalloc(len);
+ rs->sample = (uae_u8*)xmalloc (len);
memcpy(rs->sample, smp, len);
- write_log("SAMPLERIPPER: replaced sample %d (%d -> %d)\n", cnt, rs->len, len);
+ write_log ("SAMPLERIPPER: replaced sample %d (%d -> %d)\n", cnt, rs->len, len);
rs->len = len;
rs->per = adp->per / CYCLE_UNIT;
rs->changed = 1;
- audio_sampleripper(0);
+ audio_sampleripper (0);
return;
}
}
ripped_samples = rs;
rs->len = len;
rs->per = adp->per / CYCLE_UNIT;
- rs->sample = (uae_u8*)xmalloc(len);
+ rs->sample = (uae_u8*)xmalloc (len);
memcpy(rs->sample, smp, len);
rs->next = NULL;
rs->changed = 1;
- write_log("SAMPLERIPPER: sample added (%06.6X, %d bytes), total %d samples\n", adp->pt, len, ++cnt);
- audio_sampleripper(0);
+ write_log ("SAMPLERIPPER: sample added (%06.6X, %d bytes), total %d samples\n", adp->pt, len, ++cnt);
+ audio_sampleripper (0);
}
static struct audio_channel_data audio_channel[4];
#define MULTIPLICATION_PROFITABLE
#ifdef MULTIPLICATION_PROFITABLE
-typedef uae_s8 sample8_t;
-#define DO_CHANNEL_1(v, c) do { (v) *= audio_channel[c].vol; } while (0)
-#define SBASEVAL16(logn) ((logn) == 1 ? SOUND16_BASE_VAL >> 1 : SOUND16_BASE_VAL)
-#define FINISH_DATA(data,b,logn) do { if (14 - (b) + (logn) > 0) (data) >>= 14 - (b) + (logn); else (data) <<= (b) - 14 - (logn); } while (0);
+typedef uae_s8 sample8_t;
+#define DO_CHANNEL_1(v, c) do { (v) *= audio_channel[c].vol; } while (0)
+#define SBASEVAL16(logn) ((logn) == 1 ? SOUND16_BASE_VAL >> 1 : SOUND16_BASE_VAL)
+#define FINISH_DATA(data, b, logn) do { if (14 - (b) + (logn) > 0) (data) >>= 14 - (b) + (logn); else (data) <<= (b) - 14 - (logn); } while (0);
#else
-typedef uae_u8 sample8_t;
-#define DO_CHANNEL_1(v, c) do { (v) = audio_channel[c].voltbl[(v)]; } while (0)
-#define SBASEVAL16(logn) SOUND16_BASE_VAL
-#define FINISH_DATA(data,b,logn)
+typedef uae_u8 sample8_t;
+#define DO_CHANNEL_1(v, c) do { (v) = audio_channel[c].voltbl[(v)]; } while (0)
+#define SBASEVAL16(logn) SOUND16_BASE_VAL
+#define FINISH_DATA(data, b, logn)
#endif
static uae_u32 right_word_saved[SOUND_MAX_DELAY_BUFFER];
/* Amiga has two separate filtering circuits per channel, a static RC filter
* on A500 and the LED filter. This code emulates both.
- *
+ *
* The Amiga filtering circuitry depends on Amiga model. Older Amigas seem
* to have a 6 dB/oct RC filter with cutoff frequency such that the -6 dB
* point for filter is reached at 6 kHz, while newer Amigas have no filtering.
input = (uae_s16)input;
switch (sound_use_filter) {
-
+
case FILTER_NONE:
return input;
- case FILTER_MODEL_A500:
+ case FILTER_MODEL_A500:
fs->rc1 = a500e_filter1_a0 * input + (1 - a500e_filter1_a0) * fs->rc1 + DENORMAL_OFFSET;
fs->rc2 = a500e_filter2_a0 * fs->rc1 + (1-a500e_filter2_a0) * fs->rc2;
normal_output = fs->rc2;
fs->rc5 = filter_a0 * fs->rc4 + (1 - filter_a0) * fs->rc5;
led_output = fs->rc5;
- break;
-
+ break;
+
case FILTER_MODEL_A1200:
- normal_output = input;
+ normal_output = input;
- fs->rc2 = filter_a0 * normal_output + (1 - filter_a0) * fs->rc2 + DENORMAL_OFFSET;
- fs->rc3 = filter_a0 * fs->rc2 + (1 - filter_a0) * fs->rc3;
- fs->rc4 = filter_a0 * fs->rc3 + (1 - filter_a0) * fs->rc4;
+ fs->rc2 = filter_a0 * normal_output + (1 - filter_a0) * fs->rc2 + DENORMAL_OFFSET;
+ fs->rc3 = filter_a0 * fs->rc2 + (1 - filter_a0) * fs->rc3;
+ fs->rc4 = filter_a0 * fs->rc3 + (1 - filter_a0) * fs->rc4;
- led_output = fs->rc4;
- break;
+ led_output = fs->rc4;
+ break;
}
- if (led_filter_on)
+ if (led_filter_on)
o = led_output;
else
o = normal_output;
saved_ptr2 = (saved_ptr2 + 1) & mixed_stereo_size;
lold = left2_word_saved[saved_ptr2] - SOUND16_BASE_VAL;
- tmp = (rnew * mixed_mul1 + lold * mixed_mul2) / MIXED_STEREO_MAX;
+ tmp = (rnew * mixed_mul2 + lold * mixed_mul1) / MIXED_STEREO_SCALE;
tmp += SOUND16_BASE_VAL;
PUT_SOUND_WORD_RIGHT2 (tmp);
rold = right2_word_saved[saved_ptr2] - SOUND16_BASE_VAL;
- w = (lnew * mixed_mul1 + rold * mixed_mul2) / MIXED_STEREO_MAX;
+ w = (lnew * mixed_mul2 + rold * mixed_mul1) / MIXED_STEREO_SCALE;
}
PUT_SOUND_WORD_LEFT2 (w);
}
#define DO_CHANNEL(v, c) do { (v) &= audio_channel[c].adk_mask; data += v; } while (0);
-static void anti_prehandler(unsigned long best_evtime)
+static void anti_prehandler (unsigned long best_evtime)
{
int i, output;
struct audio_channel_data *acd;
int i;
for (i = 0; i < 4; i++) {
datasp[i] = audio_channel[i].sample_accum_time ? (audio_channel[i].sample_accum / audio_channel[i].sample_accum_time) : 0;
- audio_channel[i].sample_accum = 0;
+ audio_channel[i].sample_accum = 0;
audio_channel[i].sample_accum_time = 0;
}
}
-static void sinc_prehandler(unsigned long best_evtime)
+static void sinc_prehandler (unsigned long best_evtime)
{
int i, j, output;
struct audio_channel_data *acd;
output = (acd->current_sample * acd->vol) & acd->adk_mask;
/* age the sinc queue and truncate it when necessary */
- for (j = 0; j < acd->sinc_queue_length; j += 1) {
+ for (j = 0; j < acd->sinc_queue_length; j += 1) {
acd->sinc_queue[j].age += best_evtime;
- if (acd->sinc_queue[j].age >= SINC_QUEUE_MAX_AGE) {
- acd->sinc_queue_length = j;
+ if (acd->sinc_queue[j].age >= SINC_QUEUE_MAX_AGE) {
+ acd->sinc_queue_length = j;
break;
}
}
-
- /* if output state changes, record the state change and also
- * write data into sinc queue for mixing in the BLEP */
- if (acd->output_state != output) {
- if (acd->sinc_queue_length > SINC_QUEUE_LENGTH - 1) {
- //write_log("warning: sinc queue truncated. Last age: %d.\n", acd->sinc_queue[SINC_QUEUE_LENGTH-1].age);
- acd->sinc_queue_length = SINC_QUEUE_LENGTH - 1;
- }
- /* make room for new and add the new value */
- memmove(&acd->sinc_queue[1], &acd->sinc_queue[0],
- sizeof(acd->sinc_queue[0]) * acd->sinc_queue_length);
- acd->sinc_queue_length += 1;
- acd->sinc_queue[0].age = best_evtime;
- acd->sinc_queue[0].output = output - acd->output_state;
- acd->output_state = output;
- }
+
+ /* if output state changes, record the state change and also
+ * write data into sinc queue for mixing in the BLEP */
+ if (acd->sinc_output_state != output) {
+ if (acd->sinc_queue_length > SINC_QUEUE_LENGTH - 1) {
+ //write_log ("warning: sinc queue truncated. Last age: %d.\n", acd->sinc_queue[SINC_QUEUE_LENGTH-1].age);
+ acd->sinc_queue_length = SINC_QUEUE_LENGTH - 1;
+ }
+ /* make room for new and add the new value */
+ memmove (&acd->sinc_queue[1], &acd->sinc_queue[0],
+ sizeof(acd->sinc_queue[0]) * acd->sinc_queue_length);
+ acd->sinc_queue_length += 1;
+ acd->sinc_queue[0].age = best_evtime;
+ acd->sinc_queue[0].output = output - acd->sinc_output_state;
+ acd->sinc_output_state = output;
+ }
}
}
if (sound_use_filter_sinc) {
n = (sound_use_filter_sinc == FILTER_MODEL_A500) ? 0 : 2;
- if (led_filter_on)
- n += 1;
+ if (led_filter_on)
+ n += 1;
} else {
n = 4;
}
winsinc = winsinc_integral[n];
for (i = 0; i < 4; i += 1) {
- int j, v;
- struct audio_channel_data *acd = &audio_channel[i];
- /* The sum rings with harmonic components up to infinity... */
- int sum = acd->output_state << 17;
- /* ...but we cancel them through mixing in BLEPs instead */
- for (j = 0; j < acd->sinc_queue_length; j += 1)
- sum -= winsinc[acd->sinc_queue[j].age] * acd->sinc_queue[j].output;
- v = sum >> 17;
+ int j, v;
+ struct audio_channel_data *acd = &audio_channel[i];
+ /* The sum rings with harmonic components up to infinity... */
+ int sum = acd->sinc_output_state << 17;
+ /* ...but we cancel them through mixing in BLEPs instead */
+ for (j = 0; j < acd->sinc_queue_length; j += 1)
+ sum -= winsinc[acd->sinc_queue[j].age] * acd->sinc_queue[j].output;
+ v = sum >> 17;
if (v > 32767)
v = 32767;
else if (v < -32768)
static void sample16i_sinc_handler (void)
{
int datas[4], data1;
-
+
samplexx_sinc_handler (datas);
data1 = datas[0] + datas[3] + datas[1] + datas[2];
FINISH_DATA (data1, 16, 2);
{
struct audio_channel_data *cdp;
unsigned long ratio, ratio1;
-#define INTERVAL (scaled_sample_evtime * 3)
+#define INTERVAL (scaled_sample_evtime * 3)
cdp = audio_channel + 0;
ratio1 = cdp->per - cdp->evtime;
ratio = (ratio1 << 12) / INTERVAL;
{
struct audio_channel_data *cdp;
unsigned long ratio, ratio1;
-#define INTERVAL (scaled_sample_evtime * 3)
+#define INTERVAL (scaled_sample_evtime * 3)
cdp = audio_channel + 0;
ratio1 = cdp->per - cdp->evtime;
ratio = (ratio1 << 12) / INTERVAL;
#else
void sample16s_handler (void)
{
- sample16_handler();
+ sample16_handler ();
}
-void sample16si_crux_handler (void)
+static void sample16si_crux_handler (void)
{
- sample16i_crux_handler();
+ sample16i_crux_handler ();
}
-void sample16si_rh_handler (void)
+static void sample16si_rh_handler (void)
{
- sample16i_rh_handler();
+ sample16i_rh_handler ();
}
#endif
static int audio_work_to_do;
-static void zerostate(struct audio_channel_data *cdp)
+static void zerostate (struct audio_channel_data *cdp)
{
cdp->state = 0;
cdp->evtime = MAX_EV;
cdp->request_word = 0;
}
-static void audio_event_reset(void)
+static void audio_event_reset (void)
{
int i;
next_sample_evtime = scaled_sample_evtime;
for (i = 0; i < 4; i++) {
struct audio_channel_data *cdp = audio_channel + i;
- zerostate(cdp);
+ zerostate(cdp);
}
schedule_audio ();
events_schedule ();
}
-
-static void audio_deactivate(void)
+
+static void audio_deactivate (void)
{
if (!currprefs.sound_auto)
return;
audio_event_reset();
}
-int audio_activate(void)
+int audio_activate (void)
{
int ret = 0;
-
+
if (!audio_work_to_do) {
- restart_sound_buffer();
+ restart_sound_buffer ();
ret = 1;
audio_event_reset();
}
audio_work_to_do = 4 * maxvpos * 50;
return ret;
}
-STATIC_INLINE int is_audio_active(void)
+
+STATIC_INLINE int is_audio_active (void)
{
return audio_work_to_do;
}
-
void schedule_audio (void)
{
unsigned long best = MAX_EV;
static int isirq (int nr)
{
- return INTREQR() & (0x80 << nr);
+ return INTREQR () & (0x80 << nr);
}
static void setirq (int nr)
float omega;
/* The BLT correction formula below blows up if the cutoff is above nyquist. */
if (cutoff_freq >= sample_rate / 2)
- return 1.0;
+ return 1.0;
omega = 2 * M_PI * cutoff_freq / sample_rate;
/* Compensate for the bilinear transformation. This allows us to specify the
currprefs.sound_stereo_swap_paula = changed_prefs.sound_stereo_swap_paula;
currprefs.sound_stereo_swap_ahi = changed_prefs.sound_stereo_swap_ahi;
if (currprefs.produce_sound >= 2) {
- if (!init_audio ()) {
+ if (!init_audio ()) {
if (! sound_available) {
- write_log ("Sound is not supported.\n");
+ write_log ("Sound is not supported.\n");
} else {
- write_log ("Sorry, can't initialize sound.\n");
- currprefs.produce_sound = 0;
- /* So we don't do this every frame */
- changed_prefs.produce_sound = 0;
+ write_log ("Sorry, can't initialize sound.\n");
+ currprefs.produce_sound = 0;
+ /* So we don't do this every frame */
+ changed_prefs.produce_sound = 0;
}
}
}
if ((1 << i) & DEBUG_CHANNEL_MASK) {
uae_u16 mask = 0x80 << i;
if ((v2 & mask) != (v3 & mask))
- write_log("AUD%dINTREQ %d->%d %08.8X\n", i, !!(v3 & mask), !!(v2 & mask), M68K_GETPC);
+ write_log ("AUD%dINTREQ %d->%d %08.8X\n", i, !!(v3 & mask), !!(v2 & mask), M68K_GETPC);
}
}
#endif
if ((prevcon & 0xff) != (adkcon & 0xff)) {
audio_activate();
#ifdef DEBUG_AUDIO
- write_log("ADKCON=%02.2x %08.8X\n", adkcon & 0xff, M68K_GETPC);
+ write_log ("ADKCON=%02.2x %08.8X\n", adkcon & 0xff, M68K_GETPC);
#endif
prevcon = adkcon;
}
#endif
uae_boot_rom_size = here() - RTAREA_BASE;
- init_extended_traps();
+ init_extended_traps ();
}
volatile int uae_int_requested = 0;
/* we must not change ce-mode while blitter is running.. */
static int blitter_cycle_exact;
-uae_u16 bltcon0,bltcon1;
-uae_u32 bltapt,bltbpt,bltcpt,bltdpt;
+uae_u16 bltcon0, bltcon1;
+uae_u32 bltapt, bltbpt, bltcpt, bltdpt;
int blinea_shift;
static uae_u16 blinea, blineb;
static int blitline, blitfc, blitfill, blitife, blitsing, blitdesc;
-static int blitonedot,blitsign;
+static int blitonedot, blitsign;
static int blit_add;
static int blit_modadda, blit_modaddb, blit_modaddc, blit_modaddd;
static int blit_ch;
/*
-Confirmed blitter Ãnformation by Toni Wilen
+Confirmed blitter information by Toni Wilen
(order of channels or position of idle cycles are not confirmed)
1=BLTCON0 channel mask
static const int blit_cycle_diagram_finald[] =
{ 0, 2, 0,4 };
-void build_blitfilltable(void)
+void build_blitfilltable (void)
{
unsigned int d, fillmask;
int i;
{
write_log ("APT=%08.8X BPT=%08.8X CPT=%08.8X DPT=%08.8X\n", bltapt, bltbpt, bltcpt, bltdpt);
write_log ("CON0=%04.4X CON1=%04.4X ADAT=%04.4X BDAT=%04.4X CDAT=%04.4X\n",
- bltcon0, bltcon1, blt_info.bltadat, blt_info.bltbdat, blt_info.bltcdat);
+ bltcon0, bltcon1, blt_info.bltadat, blt_info.bltbdat, blt_info.bltcdat);
write_log ("AFWM=%04.4X ALWM=%04.4X AMOD=%04.4X BMOD=%04.4X CMOD=%04.4X DMOD=%04.4X\n",
- blt_info.bltafwm, blt_info.bltalwm,
- blt_info.bltamod & 0xffff, blt_info.bltbmod & 0xffff, blt_info.bltcmod & 0xffff, blt_info.bltdmod & 0xffff);
-}
-
-STATIC_INLINE uae_u8 *blit_xlateptr(uaecptr bltpt, int bytecount)
-{
- if (!chipmem_bank.check(bltpt,bytecount)) return NULL;
- return chipmem_bank.xlateaddr(bltpt);
-}
-
-STATIC_INLINE uae_u8 *blit_xlateptr_desc(uaecptr bltpt, int bytecount)
-{
- if (!chipmem_bank.check(bltpt-bytecount, bytecount)) return NULL;
- return chipmem_bank.xlateaddr(bltpt);
+ blt_info.bltafwm, blt_info.bltalwm,
+ blt_info.bltamod & 0xffff, blt_info.bltbmod & 0xffff, blt_info.bltcmod & 0xffff, blt_info.bltdmod & 0xffff);
}
STATIC_INLINE int channel_state (int cycles)
#endif
}
-static void blitter_dofast(void)
+static void blitter_dofast (void)
{
int i,j;
uaecptr bltadatptr = 0, bltbdatptr = 0, bltcdatptr = 0, bltddatptr = 0;
bltstate = BLT_done;
}
-static void blitter_dofast_desc(void)
+static void blitter_dofast_desc (void)
{
int i,j;
uaecptr bltadatptr = 0, bltbdatptr = 0, bltcdatptr = 0, bltddatptr = 0;
bltstate = BLT_done;
}
-STATIC_INLINE void blitter_read(void)
+STATIC_INLINE void blitter_read (void)
{
if (bltcon0 & 0x200) {
- if (!dmaen(DMA_BLITTER))
+ if (!dmaen (DMA_BLITTER))
return;
blt_info.bltcdat = chipmem_bank.wget(bltcpt);
}
bltstate = BLT_work;
}
-STATIC_INLINE void blitter_write(void)
+STATIC_INLINE void blitter_write (void)
{
if (blt_info.bltddat)
blt_info.blitzero = 0;
/* D-channel state has no effect on linedraw, but C must be enabled or nothing is drawn! */
if (bltcon0 & 0x200) {
- if (!dmaen(DMA_BLITTER))
+ if (!dmaen (DMA_BLITTER))
return;
chipmem_bank.wput(bltdpt, blt_info.bltddat);
}
bltstate = BLT_next;
}
-STATIC_INLINE void blitter_line_incx(void)
+STATIC_INLINE void blitter_line_incx (void)
{
if (++blinea_shift == 16) {
blinea_shift = 0;
}
}
-STATIC_INLINE void blitter_line_decx(void)
+STATIC_INLINE void blitter_line_decx (void)
{
if (blinea_shift-- == 0) {
blinea_shift = 15;
}
}
-STATIC_INLINE void blitter_line_decy(void)
+STATIC_INLINE void blitter_line_decy (void)
{
bltcpt -= blt_info.bltcmod;
blitonedot = 0;
}
-STATIC_INLINE void blitter_line_incy(void)
+STATIC_INLINE void blitter_line_incy (void)
{
bltcpt += blt_info.bltcmod;
blitonedot = 0;
}
-static void blitter_line(void)
+static void blitter_line (void)
{
uae_u16 blitahold = (blinea & blt_info.bltafwm) >> blinea_shift;
uae_u16 blitbhold = blineb & 1 ? 0xFFFF : 0;
blt_info.bltddat = blit_func(blitahold, blitbhold, blitchold, bltcon0 & 0xFF);
}
-static void blitter_line_proc(void)
+static void blitter_line_proc (void)
{
- if (!blitsign){
+ if (!blitsign) {
if (bltcon0 & 0x800)
bltapt += (uae_s16)blt_info.bltamod;
- if (bltcon1 & 0x10){
+ if (bltcon1 & 0x10) {
if (bltcon1 & 0x8)
blitter_line_decy();
else
if (bltcon0 & 0x800)
bltapt += (uae_s16)blt_info.bltbmod;
}
- if (bltcon1 & 0x10){
+ if (bltcon1 & 0x10) {
if (bltcon1 & 0x4)
blitter_line_decx();
else
bltstate = BLT_write;
}
-STATIC_INLINE void blitter_nxline(void)
+STATIC_INLINE void blitter_nxline (void)
{
blineb = (blineb << 1) | (blineb >> 15);
blt_info.vblitsize--;
}
break;
}
- if (canblit(blit_last_hpos) <= 0)
+ if (canblit (blit_last_hpos) <= 0)
break;
}
blit_cyclecounter++;
alloc_cycle_ext (blit_last_hpos, CYCLE_BLITTER);
if (blt_info.vblitsize == 0) {
bltdpt = bltcpt;
- blitter_done();
- return;
+ blitter_done();
+ return;
}
}
- break;
+ break;
}
blit_last_hpos++;
}
#endif
-static void actually_do_blit(void)
+static void actually_do_blit (void)
{
if (blitline) {
do {
- blitter_read();
- blitter_line();
- blitter_line_proc();
- blitter_write();
+ blitter_read ();
+ blitter_line ();
+ blitter_line_proc ();
+ blitter_write ();
bltdpt = bltcpt;
- blitter_nxline();
+ blitter_nxline ();
if (blt_info.vblitsize == 0)
bltstate = BLT_done;
} while (bltstate != BLT_done);
} else {
if (blitdesc)
- blitter_dofast_desc();
+ blitter_dofast_desc ();
else
- blitter_dofast();
+ blitter_dofast ();
bltstate = BLT_done;
}
}
-void blitter_handler(uae_u32 data)
+void blitter_handler (uae_u32 data)
{
static int blitter_stuck;
- if (!dmaen(DMA_BLITTER)) {
+ if (!dmaen (DMA_BLITTER)) {
event2_newevent (ev2_blitter, 10);
blitter_stuck++;
if (blitter_stuck < 20000 || !currprefs.immediate_blits)
/* "free" blitter in immediate mode if it has been "stuck" ~3 frames
* fixes some JIT game incompatibilities
*/
- write_log("Blitter force-unstuck!\n");
+ write_log ("Blitter force-unstuck!\n");
}
blitter_stuck = 0;
if (blit_slowdown > 0 && !currprefs.immediate_blits) {
event2_newevent (ev2_blitter, blit_slowdown);
- blit_slowdown = -1;
- return;
+ blit_slowdown = -1;
+ return;
}
#ifdef BLITTER_DEBUG
if (!blitter_dontdo)
- actually_do_blit();
+ actually_do_blit ();
else
bltstate = BLT_done;
#else
#ifdef BLITTER_DEBUG
if (blitter_delayed_debug) {
blitter_delayed_debug = 0;
- blitter_dump();
+ blitter_dump ();
}
#endif
if (!blitter_cycle_exact)
return;
if (blitline) {
- blt_info.got_cycle = 1;
+ blt_info.got_cycle = 1;
decide_blitter_line (hpos);
return;
}
break;
}
- blt_info.got_cycle = 1;
+ blt_info.got_cycle = 1;
if (c < 0) { /* no channel but bus still needs to be allocated.. */
alloc_cycle_ext (blit_last_hpos, CYCLE_BLITTER);
blit_cyclecounter++;
if (blitline) {
if (blt_info.hblitsize != 2)
write_log ("weird hblitsize in linemode: %d vsize=%d PC%=%x\n",
- blt_info.hblitsize, blt_info.vblitsize, m68k_getpc(®s));
+ blt_info.hblitsize, blt_info.vblitsize, m68k_getpc (®s));
blit_diag = blit_cycle_diagram_line;
} else {
if (con & 2) {
static int warn = 1;
if (warn)
write_log ("warning: weird fill mode (further messages suppressed) PC=%x\n",
- m68k_getpc(®s));
+ m68k_getpc (®s));
warn = 0;
blitife = 0;
}
static int warn = 1;
if (warn)
write_log ("warning: blitter fill without desc (further messages suppressed) PC=%x\n",
- m68k_getpc(®s));
+ m68k_getpc (®s));
warn = 0;
}
blit_diag = blitfill ? blit_cycle_diagram_fill[blit_ch] : blit_cycle_diagram[blit_ch];
}
if ((bltcon1 & 0x80) && (currprefs.chipset_mask & CSMASK_ECS_AGNUS))
- write_log("warning: ECS BLTCON1 DOFF-bit set\n");
+ write_log ("warning: ECS BLTCON1 DOFF-bit set\n");
blit_dmacount = blit_dmacount2 = 0;
blit_nod = 1;
blt_info.blitdownbshift = 16 - blt_info.blitbshift;
}
-void blit_modset (void)
+static void blit_modset (void)
{
int mult;
if (bltstate == BLT_done)
return;
if (bltcon)
- blit_bltset (bltcon);
+ blit_bltset (bltcon);
blit_modset ();
}
if (1) {
if (oldstate != BLT_done)
write_log ("blitter was already active!\n");
- write_log("blitstart: v=%03.3d h=%03.3d %dx%d %d (%d) d=%d f=%02.2X n=%d pc=%p l=%d dma=%04.4X\n",
+ write_log ("blitstart: v=%03.3d h=%03.3d %dx%d %d (%d) d=%d f=%02.2X n=%d pc=%p l=%d dma=%04.4X\n",
vpos, hpos, blt_info.hblitsize, blt_info.vblitsize, cycles, blit_ch,
blitdesc ? 1 : 0, blitfill,
- dmaen(DMA_BLITPRI) ? 1 : 0, M68K_GETPC, blitline, dmacon);
+ dmaen (DMA_BLITPRI) ? 1 : 0, M68K_GETPC, blitline, dmacon);
blitter_dump ();
}
#endif
blit_slowdown = 0;
unset_special (®s, SPCFLAG_BLTNASTY);
- if (dmaen(DMA_BLITPRI))
+ if (dmaen (DMA_BLITPRI))
set_special (®s, SPCFLAG_BLTNASTY);
if (blt_info.vblitsize == 0 || (blitline && blt_info.hblitsize != 2)) {
return;
}
- if (dmaen(DMA_BLITTER))
+ if (dmaen (DMA_BLITTER))
bltstate = BLT_work;
blit_maxcyclecounter = 0x7fffffff;
#ifndef BLITTER_DEBUG
warned = 1;
#endif
- if (m68k_getpc(®s) < 0xe0000 || m68k_getpc(®s) >= 0x10000000)
+ if (m68k_getpc (®s) < 0xe0000 || m68k_getpc (®s) >= 0x10000000)
write_log ("warning: Program does not wait for blitter %p vpos=%d tc=%d\n",
- m68k_getpc(®s), vpos, blit_cyclecounter);
+ m68k_getpc (®s), vpos, blit_cyclecounter);
}
if (blitter_cycle_exact) {
int cycles, ccnt;
if (bltstate == BLT_done)
return 0;
- if (!dmaen(DMA_BLITTER))
+ if (!dmaen (DMA_BLITTER))
return 0;
if (blit_last_cycle >= blit_diag[0] && blit_dmacount == blit_diag[1])
return 0;
return src;
}
-void restore_blitter_finish(void)
+void restore_blitter_finish (void)
{
if (bltstate == BLT_init) {
write_log ("blitter was started but DMA was inactive during save\n");
if (bltcon0 & 0x200) {
if (!dmaen(DMA_BLITTER))
return 1;
- blt_info.bltcdat = chipmem_bank.wget(bltcpt);
+ blt_info.bltcdat = chipmem_bank.wget(bltcpt);
}
bltstate = BLT_work;
return (bltcon0 & 0x200) != 0;
blitter_dofast_desc();
else
blitter_dofast();
- bltstate = BLT_done;
+ bltstate = BLT_done;
}
}
void blitter_handler(void)
{
if (!dmaen(DMA_BLITTER)) {
- eventtab[ev_blitter].active = 1;
- eventtab[ev_blitter].oldcycles = get_cycles ();
- eventtab[ev_blitter].evtime = 10 * CYCLE_UNIT + get_cycles (); /* wait a little */
- return; /* gotta come back later. */
+ eventtab[ev_blitter].active = 1;
+ eventtab[ev_blitter].oldcycles = get_cycles ();
+ eventtab[ev_blitter].evtime = 10 * CYCLE_UNIT + get_cycles (); /* wait a little */
+ return; /* gotta come back later. */
}
if (blit_slowdown > 0) {
eventtab[ev_blitter].active = 1;
- eventtab[ev_blitter].oldcycles = get_cycles ();
- eventtab[ev_blitter].evtime = blit_slowdown * CYCLE_UNIT + get_cycles ();
- blit_slowdown = -1;
- return;
+ eventtab[ev_blitter].oldcycles = get_cycles ();
+ eventtab[ev_blitter].evtime = blit_slowdown * CYCLE_UNIT + get_cycles ();
+ blit_slowdown = -1;
+ return;
}
#ifdef BLITTER_DEBUG
- if (!blitter_dontdo)
+ if (!blitter_dontdo)
actually_do_blit();
else
bltstate = BLT_done;
if (cycles < 0)
return 0;
if (cycles < blit_diag[0])
- return blit_diag[blit_diag[1] + 2 + cycles];
+ return blit_diag[blit_diag[1] + 2 + cycles];
return blit_diag[((cycles - blit_diag[0]) % blit_diag[1]) + 2];
}
if (blitter_hcounter1 == blt_info.hblitsize - 1)
bltadat &= blt_info.bltalwm;
if (blitdesc)
- blitahold = (((uae_u32)bltadat << 16) | preva) >> blt_info.blitdownashift;
+ blitahold = (((uae_u32)bltadat << 16) | preva) >> blt_info.blitdownashift;
else
- blitahold = (((uae_u32)preva << 16) | bltadat) >> blt_info.blitashift;
+ blitahold = (((uae_u32)preva << 16) | bltadat) >> blt_info.blitashift;
preva = bltadat;
ddat = blit_func (blitahold, blt_info.bltbhold, blt_info.bltcdat, mt) & 0xFFFF;
if (bltcon1 & 0x18) {
- uae_u16 d = ddat;
- int ifemode = blitife ? 2 : 0;
- int fc1 = blit_filltable[d & 255][ifemode + blitfc][1];
- ddat = (blit_filltable[d & 255][ifemode + blitfc][0]
+ uae_u16 d = ddat;
+ int ifemode = blitife ? 2 : 0;
+ int fc1 = blit_filltable[d & 255][ifemode + blitfc][1];
+ ddat = (blit_filltable[d & 255][ifemode + blitfc][0]
+ (blit_filltable[d >> 8][ifemode + fc1][0] << 8));
- blitfc = blit_filltable[d >> 8][ifemode + fc1][1];
+ blitfc = blit_filltable[d >> 8][ifemode + fc1][1];
}
-
+
if (ddat)
- blt_info.blitzero = 0;
+ blt_info.blitzero = 0;
return ddat;
}
switch (ch)
{
case 1:
- blt_info.bltadat = chipmem_agnus_wget (bltapt);
+ blt_info.bltadat = chipmem_agnus_wget (bltapt);
bltapt += blit_add;
break;
case 2:
while (blit_last_hpos < hpos) {
int c = channel_state (blit_cyclecounter);
for (;;) {
- if (c && !canblit (blit_last_hpos))
+ if (c && !canblit (blit_last_hpos))
break;
if (c)
cycle_line[blit_last_hpos] |= CYCLE_BLITTER;
return;
}
}
- break;
+ break;
}
blit_last_hpos++;
}
}
#endif
for (;;) {
- if (c && !canblit (blit_last_hpos)) {
+ if (c && !canblit (blit_last_hpos)) {
blit_misscyclecounter++;
break;
}
if (c == 4) {
if (blitter_doddma ()) {
cycle_line[blit_last_hpos] |= CYCLE_BLITTER;
- blit_cyclecounter++;
+ blit_cyclecounter++;
}
} else if (c) {
if (blitter_vcounter1 < blt_info.vblitsize) {
cycle_line[blit_last_hpos] |= CYCLE_BLITTER;
- blitter_dodma (c);
+ blitter_dodma (c);
}
blit_cyclecounter++;
} else {
blit_diag = blit_cycle_diagram_finald;
}
}
- break;
+ break;
}
blit_last_hpos++;
}
if (bltstate != BLT_done) {
/* blitter is currently running
* force finish (no blitter state support yet)
- */
+ */
odmacon = dmacon;
dmacon |= DMA_MASTER | DMA_BLITTER;
write_log ("forcing blitter finish\n");
if (currprefs.blitter_cycle_exact) {
int rounds = 10000;
while (bltstate != BLT_done && rounds > 0) {
- memset (cycle_line, 0, maxhpos);
+ memset (cycle_line, 0, maxhpos);
decide_blitter (maxhpos);
rounds--;
}
{
int i;
- blitline = bltcon1 & 1;
+ blitline = bltcon1 & 1;
blitfill = bltcon1 & 0x18;
blitdesc = bltcon1 & 2;
blit_ch = (bltcon0 & 0x0f00) >> 8;
if (blitline) {
if (blt_info.hblitsize != 2)
write_log ("weird hblitsize in linemode: %d vsize=%d PC%=%x\n", blt_info.hblitsize, blt_info.vblitsize, m68k_getpc());
- blit_diag = blit_cycle_diagram_line;
+ blit_diag = blit_cycle_diagram_line;
blit_singlechannel = 1;
} else {
if (con & 2) {
* negative effects. */
static int warn = 1;
if (warn)
- write_log ("warning: weird fill mode (further messages suppressed) PC=%x\n", m68k_getpc());
+ write_log ("warning: weird fill mode (further messages suppressed) PC=%x\n", m68k_getpc ());
warn = 0;
blitife = 0;
}
if (blitfill && !blitdesc) {
static int warn = 1;
if (warn)
- write_log ("warning: blitter fill without desc (further messages suppressed) PC=%x\n", m68k_getpc());
+ write_log ("warning: blitter fill without desc (further messages suppressed) PC=%x\n", m68k_getpc());
warn = 0;
}
blit_diag = blitfill ? blit_cycle_diagram_fill[blit_ch] : blit_cycle_diagram[blit_ch];
blit_maxcyclecounter = 0;
blit_last_hpos = hpos;
- reset_blit (1|2);
+ reset_blit (1|2);
if (blitline) {
blitsing = bltcon1 & 0x2;
blineb = (blt_info.bltbdat >> blt_info.blitbshift) | (blt_info.bltbdat << (16 - blt_info.blitbshift));
blitsign = bltcon1 & 0x40;
blitonedot = 0;
- cycles = blt_info.vblitsize;
+ cycles = blt_info.vblitsize;
} else {
- blit_firstline_cycles = blit_first_cycle + blit_diag[1] * blt_info.hblitsize * CYCLE_UNIT;
- cycles = blt_info.vblitsize * blt_info.hblitsize;
+ blit_firstline_cycles = blit_first_cycle + blit_diag[1] * blt_info.hblitsize * CYCLE_UNIT;
+ cycles = blt_info.vblitsize * blt_info.hblitsize;
}
#ifdef BLITTER_DEBUG
if (1) {
if (oldstate != BLT_done)
write_log ("blitter was already active!\n");
- write_log("blitstart: v=%03.3d h=%03.3d %dx%d %d (%d) d=%d f=%02.2X n=%d pc=%p l=%d dma=%d\n",
+ write_log ("blitstart: v=%03.3d h=%03.3d %dx%d %d (%d) d=%d f=%02.2X n=%d pc=%p l=%d dma=%d\n",
vpos, hpos, blt_info.hblitsize, blt_info.vblitsize, cycles, blit_ch,
blitdesc ? 1 : 0, blitfill,
- dmaen(DMA_BLITPRI) ? 1 : 0, m68k_getpc(), blitline, dmaen(DMA_BLITTER));
+ dmaen(DMA_BLITPRI) ? 1 : 0, m68k_getpc (), blitline, dmaen(DMA_BLITTER));
blitter_dump ();
}
#endif
unset_special (SPCFLAG_BLTNASTY);
if (dmaen(DMA_BLITPRI))
- set_special (SPCFLAG_BLTNASTY);
+ set_special (SPCFLAG_BLTNASTY);
if (blt_info.vblitsize == 0 || (blitline && blt_info.hblitsize != 2)) {
- blitter_done ();
- return;
+ blitter_done ();
+ return;
}
if (dmaen(DMA_BLITTER))
}
if (currprefs.immediate_blits)
- cycles = 1;
+ cycles = 1;
eventtab[ev_blitter].active = 1;
eventtab[ev_blitter].oldcycles = get_cycles ();
warned = 1;
#endif
write_log ("warning: Program does not wait for blitter %p vpos=%d tc=%d\n",
- m68k_getpc(), vpos, blit_cyclecounter);
+ m68k_getpc (), vpos, blit_cyclecounter);
}
if (currprefs.blitter_cycle_exact) {
if (!dmaen(DMA_BLITTER))
return 0;
if (blit_last_cycle >= blit_diag[0] && blit_dmacount == blit_diag[1])
- return 0;
+ return 0;
cycles = (get_cycles () - blit_first_cycle) / CYCLE_UNIT;
ccnt = 0;
while (blit_last_cycle < cycles) {
{
static int oddfstrt, oddfstop, ototal, ofree;
static int slow;
-
+
if (!totalcycles || ddfstrt < 0 || ddfstop < 0)
return;
if (ddfstrt != oddfstrt || ddfstop != oddfstop || totalcycles != ototal || ofree != freecycles) {
if (dstptr)
dstbak = dst = dstptr;
else
- dstbak = dst = malloc (16);
+ dstbak = dst = malloc (16);
save_u32((bltstate != BLT_done) ? 0 : 1);
*len = dst - dstbak;
return dstbak;
if (bltcon0 & 0x200) {
if (!dmaen(DMA_BLITTER))
return;
- blt_info.bltcdat = chipmem_bank.wget(bltcpt);
+ blt_info.bltcdat = chipmem_bank.wget(bltcpt);
}
bltstate = BLT_work;
}
blitter_dofast_desc();
else
blitter_dofast();
- bltstate = BLT_done;
+ bltstate = BLT_done;
}
}
void blitter_handler(void)
{
if (!dmaen(DMA_BLITTER)) {
- eventtab[ev_blitter].active = 1;
- eventtab[ev_blitter].oldcycles = get_cycles ();
- eventtab[ev_blitter].evtime = 10 * CYCLE_UNIT + get_cycles (); /* wait a little */
- return; /* gotta come back later. */
+ eventtab[ev_blitter].active = 1;
+ eventtab[ev_blitter].oldcycles = get_cycles ();
+ eventtab[ev_blitter].evtime = 10 * CYCLE_UNIT + get_cycles (); /* wait a little */
+ return; /* gotta come back later. */
}
if (blit_slowdown > 0) {
eventtab[ev_blitter].active = 1;
- eventtab[ev_blitter].oldcycles = get_cycles ();
- eventtab[ev_blitter].evtime = blit_slowdown * CYCLE_UNIT + get_cycles ();
- blit_slowdown = -1;
- return;
+ eventtab[ev_blitter].oldcycles = get_cycles ();
+ eventtab[ev_blitter].evtime = blit_slowdown * CYCLE_UNIT + get_cycles ();
+ blit_slowdown = -1;
+ return;
}
#ifdef BLITTER_DEBUG
- if (!blitter_dontdo)
+ if (!blitter_dontdo)
actually_do_blit();
else
bltstate = BLT_done;
if (cycles < 0)
return 0;
if (cycles < blit_diag[0])
- return blit_diag[blit_diag[1] + 2 + cycles];
+ return blit_diag[blit_diag[1] + 2 + cycles];
return blit_diag[((cycles - blit_diag[0]) % blit_diag[1]) + 2];
}
if (blitter_hcounter1 == blt_info.hblitsize - 1)
bltadat &= blt_info.bltalwm;
if (blitdesc)
- blitahold = (((uae_u32)bltadat << 16) | preva) >> blt_info.blitdownashift;
+ blitahold = (((uae_u32)bltadat << 16) | preva) >> blt_info.blitdownashift;
else
- blitahold = (((uae_u32)preva << 16) | bltadat) >> blt_info.blitashift;
+ blitahold = (((uae_u32)preva << 16) | bltadat) >> blt_info.blitashift;
preva = bltadat;
ddat = blit_func (blitahold, blt_info.bltbhold, blt_info.bltcdat, mt) & 0xFFFF;
if (bltcon1 & 0x18) {
- uae_u16 d = ddat;
- int ifemode = blitife ? 2 : 0;
- int fc1 = blit_filltable[d & 255][ifemode + blitfc][1];
- ddat = (blit_filltable[d & 255][ifemode + blitfc][0]
+ uae_u16 d = ddat;
+ int ifemode = blitife ? 2 : 0;
+ int fc1 = blit_filltable[d & 255][ifemode + blitfc][1];
+ ddat = (blit_filltable[d & 255][ifemode + blitfc][0]
+ (blit_filltable[d >> 8][ifemode + fc1][0] << 8));
- blitfc = blit_filltable[d >> 8][ifemode + fc1][1];
+ blitfc = blit_filltable[d >> 8][ifemode + fc1][1];
}
-
+
if (ddat)
- blt_info.blitzero = 0;
+ blt_info.blitzero = 0;
return ddat;
}
switch (ch)
{
case 1:
- blt_info.bltadat = chipmem_agnus_wget (bltapt);
+ blt_info.bltadat = chipmem_agnus_wget (bltapt);
bltapt += blit_add;
break;
case 2:
while (blit_last_hpos < hpos) {
int c = channel_state (blit_cyclecounter);
for (;;) {
- if (blit_cyclecounter < 0) {
+ if (blit_cyclecounter < 0) {
blit_cyclecounter++;
break;
}
- if (c && !canblit (blit_last_hpos))
+ if (c && !canblit (blit_last_hpos))
break;
if (c)
cycle_line[blit_last_hpos] |= CYCLE_BLITTER;
blitter_nxline();
if (!ddat1use && !ddat2use && blt_info.vblitsize == 0) {
bltstate = BLT_done;
- blitter_done ();
+ blitter_done ();
return;
}
}
- break;
+ break;
}
blit_last_hpos++;
}
}
#endif
for (;;) {
- if (c && !canblit (blit_last_hpos)) {
+ if (c && !canblit (blit_last_hpos)) {
blit_misscyclecounter++;
break;
}
if (c == 4) {
if (blitter_doddma ()) {
cycle_line[blit_last_hpos] |= CYCLE_BLITTER;
- blit_cyclecounter++;
+ blit_cyclecounter++;
}
} else if (c) {
if (blitter_vcounter1 < blt_info.vblitsize) {
cycle_line[blit_last_hpos] |= CYCLE_BLITTER;
- blitter_dodma (c);
+ blitter_dodma (c);
}
blit_cyclecounter++;
} else {
blit_diag = blit_cycle_diagram_finald;
}
}
- break;
+ break;
}
blit_last_hpos++;
}
if (bltstate != BLT_done) {
/* blitter is currently running
* force finish (no blitter state support yet)
- */
+ */
odmacon = dmacon;
dmacon |= DMA_MASTER | DMA_BLITTER;
write_log ("forcing blitter finish\n");
if (currprefs.blitter_cycle_exact) {
int rounds = 10000;
while (bltstate != BLT_done && rounds > 0) {
- memset (cycle_line, 0, maxhpos);
+ memset (cycle_line, 0, maxhpos);
decide_blitter (maxhpos);
rounds--;
}
{
int i;
- blitline = bltcon1 & 1;
+ blitline = bltcon1 & 1;
blitfill = bltcon1 & 0x18;
blitdesc = bltcon1 & 2;
blit_ch = (bltcon0 & 0x0f00) >> 8;
if (blitline) {
if (blt_info.hblitsize != 2)
write_log ("weird hblitsize in linemode: %d vsize=%d PC%=%x\n", blt_info.hblitsize, blt_info.vblitsize, m68k_getpc());
- blit_diag = blit_cycle_diagram_line;
+ blit_diag = blit_cycle_diagram_line;
blit_singlechannel = 1;
} else {
if (con & 2) {
* negative effects. */
static int warn = 1;
if (warn)
- write_log ("warning: weird fill mode (further messages suppressed) PC=%x\n", m68k_getpc());
+ write_log ("warning: weird fill mode (further messages suppressed) PC=%x\n", m68k_getpc ());
warn = 0;
blitife = 0;
}
if (blitfill && !blitdesc) {
static int warn = 1;
if (warn)
- write_log ("warning: blitter fill without desc (further messages suppressed) PC=%x\n", m68k_getpc());
+ write_log ("warning: blitter fill without desc (further messages suppressed) PC=%x\n", m68k_getpc());
warn = 0;
}
blit_diag = blitfill ? blit_cycle_diagram_fill[blit_ch] : blit_cycle_diagram[blit_ch];
blit_maxcyclecounter = 0;
blit_last_hpos = hpos;
- reset_blit (1|2);
+ reset_blit (1|2);
if (blitline) {
blit_cyclecounter = -1;
blineb = (blt_info.bltbdat >> blt_info.blitbshift) | (blt_info.bltbdat << (16 - blt_info.blitbshift));
blitsign = bltcon1 & 0x40;
blitonedot = 0;
- cycles = blt_info.vblitsize;
+ cycles = blt_info.vblitsize;
} else {
blit_cyclecounter = -1;
- blit_firstline_cycles = blit_first_cycle + blit_diag[1] * blt_info.hblitsize * CYCLE_UNIT;
- cycles = blt_info.vblitsize * blt_info.hblitsize;
+ blit_firstline_cycles = blit_first_cycle + blit_diag[1] * blt_info.hblitsize * CYCLE_UNIT;
+ cycles = blt_info.vblitsize * blt_info.hblitsize;
}
#ifdef BLITTER_DEBUG
if (1) {
if (oldstate != BLT_done)
write_log ("blitter was already active!\n");
- write_log("blitstart: v=%03.3d h=%03.3d %dx%d %d (%d) d=%d f=%02.2X n=%d pc=%p l=%d dma=%d\n",
+ write_log ("blitstart: v=%03.3d h=%03.3d %dx%d %d (%d) d=%d f=%02.2X n=%d pc=%p l=%d dma=%d\n",
vpos, hpos, blt_info.hblitsize, blt_info.vblitsize, cycles, blit_ch,
blitdesc ? 1 : 0, blitfill,
- dmaen(DMA_BLITPRI) ? 1 : 0, m68k_getpc(), blitline, dmaen(DMA_BLITTER));
+ dmaen(DMA_BLITPRI) ? 1 : 0, m68k_getpc (), blitline, dmaen(DMA_BLITTER));
blitter_dump ();
}
#endif
unset_special (SPCFLAG_BLTNASTY);
if (dmaen(DMA_BLITPRI))
- set_special (SPCFLAG_BLTNASTY);
+ set_special (SPCFLAG_BLTNASTY);
if (blt_info.vblitsize == 0 || (blitline && blt_info.hblitsize != 2)) {
- blitter_done ();
- return;
+ blitter_done ();
+ return;
}
if (dmaen(DMA_BLITTER))
}
if (currprefs.immediate_blits)
- cycles = 1;
+ cycles = 1;
eventtab[ev_blitter].active = 1;
eventtab[ev_blitter].oldcycles = get_cycles ();
warned = 1;
#endif
write_log ("warning: Program does not wait for blitter %p vpos=%d tc=%d\n",
- m68k_getpc(), vpos, blit_cyclecounter);
+ m68k_getpc (), vpos, blit_cyclecounter);
}
if (currprefs.blitter_cycle_exact) {
if (!dmaen(DMA_BLITTER))
return 0;
if (blit_last_cycle >= blit_diag[0] && blit_dmacount == blit_diag[1])
- return 0;
+ return 0;
cycles = (get_cycles () - blit_first_cycle) / CYCLE_UNIT;
ccnt = 0;
while (blit_last_cycle < cycles) {
{
static int oddfstrt, oddfstop, ototal, ofree;
static int slow;
-
+
if (!totalcycles || ddfstrt < 0 || ddfstop < 0)
return;
if (ddfstrt != oddfstrt || ddfstop != oddfstop || totalcycles != ototal || ofree != freecycles) {
if (dstptr)
dstbak = dst = dstptr;
else
- dstbak = dst = malloc (16);
+ dstbak = dst = malloc (16);
save_u32((bltstate != BLT_done) ? 0 : 1);
*len = dst - dstbak;
return dstbak;
if (mode == DF_SCSI || !have_ioctl || !device_func[DF_IOCTL]->ismedia) {
if (quick)
return -1;
- memset(&di, 0, sizeof di);
+ memset(&di, 0, sizeof di);
device_func[DF_SCSI]->info (unitnum, &di);
return di.media_inserted;
} else {
ap = get_long (acmd + 12);
as.cmd_len = get_word (acmd + 16);
for (i = 0; i < as.cmd_len; i++)
- as.cmd[i] = get_byte(ap++);
+ as.cmd[i] = get_byte (ap++);
as.flags = get_byte (acmd + 20);
as.sense_len = get_word (acmd + 26);
ret = sys_command_scsi_direct_native (unitnum, &as);
- put_long(acmd + 8, as.actual);
- put_word(acmd + 18, as.cmdactual);
- put_byte(acmd + 21, as.status);
- put_word(acmd + 28, as.sactual);
+ put_long (acmd + 8, as.actual);
+ put_word (acmd + 18, as.cmdactual);
+ put_byte (acmd + 21, as.status);
+ put_word (acmd + 28, as.sactual);
- ap = get_long(acmd + 22);
+ ap = get_long (acmd + 22);
for (i = 0; i < as.sactual; i++)
- put_byte(ap, as.sensedata[i]);
+ put_byte (ap, as.sensedata[i]);
return ret;
}
{
int i;
for (i = 0; i < cdblen; i++) {
- write_log("%s%02.2X", i > 0 ? "." : "", cdb[i]);
+ write_log ("%s%02.2X", i > 0 ? "." : "", cdb[i]);
}
- write_log("\n");
+ write_log ("\n");
if (data) {
write_log ("DATAOUT: %d\n", datalen);
for (i = 0; i < datalen && i < 100; i++)
- write_log("%s%02.2X", i > 0 ? "." : "", data[i]);
+ write_log ("%s%02.2X", i > 0 ? "." : "", data[i]);
if (datalen > 0)
- write_log("\n");
+ write_log ("\n");
}
}
int i;
write_log ("DATAIN: %d\n", datalen);
for (i = 0; i < datalen && i < 100 && data; i++)
- write_log("%s%02.2X", i > 0 ? "." : "", data[i]);
+ write_log ("%s%02.2X", i > 0 ? "." : "", data[i]);
if (data && datalen > 0)
- write_log("\n");
+ write_log ("\n");
if (senselen > 0) {
- write_log("SENSE: %d,", senselen);
+ write_log ("SENSE: %d,", senselen);
for (i = 0; i < senselen && i < 32; i++) {
- write_log("%s%02.2X", i > 0 ? "." : "", sense[i]);
+ write_log ("%s%02.2X", i > 0 ? "." : "", sense[i]);
}
- write_log("\n");
+ write_log ("\n");
}
}
if (s != INVALID_SOCKET) {
for (iCounter = 1; iCounter <= sb->dtablesize; iCounter++) {
if (iCounter != sd) {
- if (getsock(sb,iCounter) == s) {
+ if (getsock(sb,iCounter) == s) {
releasesock(sb,sd);
return TRUE;
}
if (!addr_valid("getsock4", ot1, 1))
break;
if (strcmp(get_real_address (ot1), get_real_address (ot)) == 0) {
- // Task with same name already exists -> use same dtable
- if (sb1->dtable[sd - 1] != INVALID_SOCKET)
+ // Task with same name already exists -> use same dtable
+ if (sb1->dtable[sd - 1] != INVALID_SOCKET)
return sb1->dtable[sd - 1];
}
nsb = sb1->next;
bsd_int_requested = 0;
if (sbsigqueue != NULL) {
- SB;
+ SB;
for (sb = sbsigqueue; sb; sb = sb->nextsig) {
if (sb->dosignal == 1) {
long sigs;
m68k_dreg (&context->regs, 0) = (((uae_u32) 1) << sb->signal) | sb->eintrsigs;
if ((sigs = CallLib (context, get_long (4), -0x13e)) & sb->eintrsigs) { /* Wait */
- sockabort (sb);
+ sockabort (sb);
bsdsocklib_seterrno (sb, 4); /* EINTR */
// Set signal
if (sd != -1) {
sb->ftable[sd - 1] = sockdata->sockpoolflags[i];
- sockdata->sockpoolids[i] = UNIQUE_ID;
- return sd - 1;
+ sockdata->sockpoolids[i] = UNIQUE_ID;
+ return sd - 1;
}
return -1;
static uae_u32 herrnotextptrs[sizeof (herrortexts) / sizeof (*herrortexts)];
static const uae_u32 number_host_error = sizeof (herrortexts) / sizeof (*herrortexts);
-static const char * const strErr = "Errlist lookup error";
+static const char * const strErr = "Errlist lookup error";
static uae_u32 strErrptr;
if (currtag & 1) {
bsdsocklib_SetDTableSize(sb, currval);
} else {
- put_long(tagptr + 4, sb->dtablesize);
+ put_long (tagptr + 4, sb->dtablesize);
}
break;
case SBTC_ERRNOSTRPTR:
} else {
unsigned long ulTmp;
if (currtag & 0x8000) { /* SBTM_GETREF */
- ulTmp = get_long(currval);
+ ulTmp = get_long (currval);
} else { /* SBTM_GETVAL */
ulTmp = currval;
}
TRACE (("ERRNOSTRPTR),%d", ulTmp));
- if (ulTmp < number_sys_error) {
+ if (ulTmp < number_sys_error) {
tagcopy (currtag, currval, tagptr, &errnotextptrs[ulTmp]);
} else {
tagcopy (currtag, currval, tagptr, &strErrptr);
} else {
unsigned long ulTmp;
if (currtag & 0x8000) { /* SBTM_GETREF */
- ulTmp = get_long(currval);
+ ulTmp = get_long (currval);
} else { /* SBTM_GETVAL */
ulTmp = currval;
}
TRACE (("TAG_UNKNOWN(0x%x)", currtag));
/* Aminetradio uses 0x00004e55 as an ending tag */
if ((currtag & 0xffff8000) == 0) {
- write_log("bsdsocket: WARNING: Corrupted SocketBaseTagList(%x) tag detected (%08.8x)\n",
+ write_log ("bsdsocket: WARNING: Corrupted SocketBaseTagList(%x) tag detected (%08.8x)\n",
m68k_areg (&context->regs, 0), currtag);
goto done;
}
if (!sockdata) {
sockdata = (struct sockd*)xcalloc (sizeof (struct sockd), 1);
- for (i = 0; i < SOCKPOOLSIZE; i++)
+ for (i = 0; i < SOCKPOOLSIZE; i++)
sockdata->sockpoolids[i] = UNIQUE_ID;
}
buf1[0] = (uae_u8)addr;
if (handle != INVALID_HANDLE_VALUE) {
if (!DeviceIoControl (handle, CW_PEEKREG_FULL, buf1, 1, buf2, 1, &did_read, 0))
- write_log("catweasel_do_bget fail err=%d\n", GetLastError());
+ write_log ("catweasel_do_bget fail err=%d\n", GetLastError());
} else {
buf2[0] = ioport_read (cwc.iobase + addr);
}
buf[1] = b;
if (handle != INVALID_HANDLE_VALUE) {
if (!DeviceIoControl (handle, CW_POKEREG_FULL, buf, 2, 0, 0, &did_read, 0))
- write_log("catweasel_do_bput fail err=%d\n", GetLastError());
+ write_log ("catweasel_do_bput fail err=%d\n", GetLastError());
} else {
ioport_write (cwc.iobase + addr, b);
}
return 0;
devInfoListDetail.cbSize = sizeof(devInfoListDetail);
if(SetupDiGetDeviceInfoListDetail(devs,&devInfoListDetail)) {
- devInfo.cbSize = sizeof(devInfo);
+ devInfo.cbSize = sizeof(devInfo);
for(devIndex=0;SetupDiEnumDeviceInfo(devs,devIndex,&devInfo);devIndex++) {
TCHAR devID[MAX_DEVICE_ID_LEN];
if(CM_Get_Device_ID_Ex(devInfo.DevInst,devID,MAX_DEVICE_ID_LEN,0,devInfoListDetail.RemoteMachineHandle)!=CR_SUCCESS)
BOOL haveConfig = FALSE;
ULONG dataSize;
PBYTE resDesData;
- RES_DES prevResDes, resDes;
- RESOURCEID resId = ResType_IO;
+ RES_DES prevResDes, resDes;
+ RESOURCEID resId = ResType_IO;
devInfoListDetail.cbSize = sizeof(devInfoListDetail);
if((!SetupDiGetDeviceInfoListDetail(devs,&devInfoListDetail)) ||
if (resId == ResType_IO) {
PIO_RESOURCE pIoData = (PIO_RESOURCE)resDesData;
if(pIoData->IO_Header.IOD_Alloc_End-pIoData->IO_Header.IOD_Alloc_Base+1) {
- write_log("CW: PCI SCAN: CWMK%d @%I64X - %I64X\n", cw,
+ write_log ("CW: PCI SCAN: CWMK%d @%I64X - %I64X\n", cw,
pIoData->IO_Header.IOD_Alloc_Base,pIoData->IO_Header.IOD_Alloc_End);
cwc.iobase = (int)pIoData->IO_Header.IOD_Alloc_Base;
cwc.direct_type = cw;
}
free (resDesData);
}
- if(prevResDes != config)
+ if(prevResDes != config)
CM_Free_Res_Des_Handle(prevResDes);
- CM_Free_Log_Conf_Handle(config);
+ CM_Free_Log_Conf_Handle(config);
}
}
}
if (force_direct_catweasel >= 100) {
- cwc.iobase = force_direct_catweasel & 0xffff;
+ cwc.iobase = force_direct_catweasel & 0xffff;
if (force_direct_catweasel > 0xffff) {
cwc.direct_type = force_direct_catweasel >> 16;
} else {
}
if (handle == INVALID_HANDLE_VALUE) {
- strcpy(name, "[DIRECT]");
+ strcpy(name, "[DIRECT]");
if (cwc.direct_type && ioport_init()) {
if (cwc.direct_type == 4 && catweasel4_configure()) {
cwc.type = 4;
sprintf(p, " SID1=%d", cwc.sid[1]);
}
}
- write_log("%s\n", tmp);
+ write_log ("%s\n", tmp);
detected = 1;
return 1;
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
if (h != INVALID_HANDLE_VALUE) {
CloseHandle (h);
- write_log("CW: Windows driver device detected '%s'\n", name);
+ write_log ("CW: Windows driver device detected '%s'\n", name);
detected = 1;
return TRUE;
}
}
if (h == INVALID_HANDLE_VALUE) {
if (force_direct_catweasel >= 100) {
- if (ioport_init())
+ if (ioport_init())
return TRUE;
return FALSE;
}
uae_u8 b;
int size;
int shift;
-
+
size=len-(sync-start);
memcpy(dst,sync,size);
dst+=size;
start++;
}
return tmpmfmbuffer;
-}
+}
#define SCANOFFSET 1 /* scanning range in bytes, -SCANOFFSET to SCANOFFSET */
#define SCANOFFSET2 20
{
int i,bits,bytes,matched;
uae_u8 *sync2bak=sync2;
-
+
sync1+=SCANOFFSET2;
sync2+=SCANOFFSET2;
while(sync1 < sync2bak - 2*SCANOFFSET - SCANOFFSET2 - SCANLENGHT) {
sync2++;
}
return 0;
-}
+}
static unsigned char threshtab[128];
c->drives[i].number = i;
c->drives[i].contr = c;
c->drives[i].diskindrive = 0;
-
+
/* select only the respective drive, step to track 0 */
if(i == 0) {
CWSetCReg(c, c->crm_sel0, c->crm_dir | c->crm_sel1);
CWTriggerStep(c);
sleep_millis(6);
}
-
+
if(j < 86) {
c->drives[i].type = 1;
c->drives[i].track = 0;
}
return 0;
}
-
+
int catweasel_read(catweasel_drive *d, int side, int clock, int rawmode)
{
int iobase = d->contr->iobase;
#define L2_P (43*2*2)
#define RS_L12_BITS 8
-static uae_u32 build_edc(uae_u8 *inout, int from, int upto)
+static uae_u32 build_edc (const uae_u8 *inout, int from, int upto)
{
- uae_u8 *p = inout + from;
+ const uae_u8 *p = inout + from;
uae_u32 result = 0;
for (; from <= upto; from++)
result = EDC_crctable[(result ^ *p++) & 0xff] ^ (result >> 8);
/* ISTR bits. */
#define ISTR_INTX (1<<8)
#define ISTR_INT_F (1<<7)
-#define ISTR_INTS (1<<6)
+#define ISTR_INTS (1<<6)
#define ISTR_E_INT (1<<5)
#define ISTR_INT_P (1<<4)
-#define ISTR_UE_INT (1<<3)
+#define ISTR_UE_INT (1<<3)
#define ISTR_OE_INT (1<<2)
#define ISTR_FF_FLG (1<<1)
-#define ISTR_FE_FLG (1<<0)
+#define ISTR_FE_FLG (1<<0)
#define AUDIO_STATUS_NOT_SUPPORTED 0x00
#define AUDIO_STATUS_IN_PROGRESS 0x11
{
uae_u8 *buf;
int i;
-
+
datatrack = 0;
buf = sys_command_cd_toc (DF_IOCTL, unitnum);
if (!buf)
static int read_sectors(int start, int length)
{
- write_log("READ DATA sector %d, %d sectors (blocksize=%d)\n", start, length, cdtv_sectorsize);
+ write_log ("READ DATA sector %d, %d sectors (blocksize=%d)\n", start, length, cdtv_sectorsize);
cdrom_sector = start;
cdrom_sectors = length;
cdrom_offset = start * cdtv_sectorsize;
i /= 11;
end = last_cd_position;
for (j = 0; j < i; j++) {
- uae_u8 *s = cdrom_toc + 4 + j * 11;
+ uae_u8 *s = cdrom_toc + 4 + j * 11;
if (track_start == s[3])
start = (s[8] << 16) | (s[9] << 8) | s[10];
if (track_end == s[3])
}
play_end = msf2lsn(end);
play_start = msf2lsn(start);
- write_log("PLAY CD AUDIO from %d-%d, %06.6X (%d) to %06.6X (%d)\n",
+ write_log ("PLAY CD AUDIO from %d-%d, %06.6X (%d) to %06.6X (%d)\n",
track_start, track_end, start, msf2lsn(start), end, msf2lsn(end));
play_state = 1;
return 0;
end = last_cd_position;
play_end = msf2lsn(end);
play_start = msf2lsn(start);
- write_log("PLAY CD AUDIO from %06.6X (%d) to %06.6X (%d)\n",
+ write_log ("PLAY CD AUDIO from %06.6X (%d) to %06.6X (%d)\n",
start, msf2lsn(start), end, msf2lsn(end));
play_state = 1;
return 0;
size = ((p[8] << 16) | (p[9] << 8) | p[10]);
out[2] = size >> 16;
out[3] = size >> 8;
- out[4] = size >> 0;
+ out[4] = size >> 0;
cd_finished = 1;
return 5;
}
i -= 2;
i /= 11;
for (j = 0; j < i; j++) {
- s = buf + 4 + j * 11;
+ s = buf + 4 + j * 11;
if (track == s[3]) {
uae_u32 msf = (s[8] << 16) | (s[9] << 8) | s[10];
uae_u32 lsn = msf2lsn (msf);
{
cdtv_sectorsize = (cmd[2] << 8) | cmd[3];
if (cdtv_sectorsize != 2048 && cdtv_sectorsize != 2336) {
- write_log("CDTV: tried to set unknown sector size %d\n", cdtv_sectorsize);
+ write_log ("CDTV: tried to set unknown sector size %d\n", cdtv_sectorsize);
cdtv_sectorsize = 2048;
}
return 0;
tmp[0] = 0;
for (i = 0; i < *cdrom_command_cnt_in; i++)
sprintf(tmp + i * 3, "%02.2X%c", cdrom_command_input[i], i < *cdrom_command_cnt_in - 1 ? '.' : ' ');
- write_log("CD<-: %s\n", tmp);
+ write_log ("CD<-: %s\n", tmp);
if (size > 0) {
tmp[0] = 0;
for (i = 0; i < size; i++)
sprintf(tmp + i * 3, "%02.2X%c", cdrom_command_output[i], i < size - 1 ? '.' : ' ');
- write_log("CD->: %s\n", tmp);
+ write_log ("CD->: %s\n", tmp);
}
#endif
*cdrom_command_cnt_in = 0;
cdrom_command_accepted(play_cdtrack(cdrom_command_input), s, &cdrom_command_cnt_in);
}
break;
- case 0x81:
- if (cdrom_command_cnt_in == 1) {
+ case 0x81:
+ if (cdrom_command_cnt_in == 1) {
uae_u8 flag = 0;
if (!cd_isready)
flag |= 1 << 0;
}
break;
default:
- write_log("unknown CDROM command %02.2X!\n", s[0]);
+ write_log ("unknown CDROM command %02.2X!\n", s[0]);
cd_error = 1;
cdrom_command_accepted(0, s, &cdrom_command_cnt_in);
break;
zfile_fclose(f);
f = zfile_fopen(fname, "rb");
if (!f)
- write_log("failed to open '%s'\n", fname);
+ write_log ("failed to open '%s'\n", fname);
else
- write_log("opened '%s'\n", fname);
+ write_log ("opened '%s'\n", fname);
track = trackcnt;
}
if (f) {
- write_log("%dx%d=%d\n", sector, size, sector * size);
+ write_log ("%dx%d=%d\n", sector, size, sector * size);
zfile_fseek (f, sector * size, SEEK_SET);
zfile_fread (buf, size, 1, f);
return buf;
static int readsector;
uae_u8 *p = NULL;
- write_log("DMAC DMA: sector=%d, addr=%08.8X, words=%d\n", cdrom_offset / cdtv_sectorsize, dmac_acr, dmac_wtc);
+ write_log ("DMAC DMA: sector=%d, addr=%08.8X, words=%d\n", cdrom_offset / cdtv_sectorsize, dmac_acr, dmac_wtc);
dma_wait += dmac_wtc * (uae_u64)312 * 50 / 75 + 1;
while (dmac_wtc > 0 && dmac_dma) {
if (!p || readsector != (cdrom_offset / cdtv_sectorsize)) {
}
}
- put_byte (dmac_acr, p[(cdrom_offset % cdtv_sectorsize) + 0]);
- put_byte (dmac_acr + 1, p[(cdrom_offset % cdtv_sectorsize) + 1]);
- dmac_wtc--;
- dmac_acr+=2;
- cdrom_length-=2;
+ put_byte (dmac_acr, p[(cdrom_offset % cdtv_sectorsize) + 0]);
+ put_byte (dmac_acr + 1, p[(cdrom_offset % cdtv_sectorsize) + 1]);
+ dmac_wtc--;
+ dmac_acr+=2;
+ cdrom_length-=2;
cdrom_offset+=2;
}
dmac_dma = 0;
dma_finished = 1;
cd_finished = 1;
}
-
+
static void *dev_thread (void *p)
{
- write_log("CDTV: CD thread started\n");
+ write_log ("CDTV: CD thread started\n");
thread_alive = 1;
for (;;) {
static void tp_bput (int addr, uae_u8 v)
{
#ifdef CDTV_DEBUG_6525
- write_log("6525 write %x=%02.2X PC=%x\n", addr, v, M68K_GETPC);
+ write_log ("6525 write %x=%02.2X PC=%x\n", addr, v, M68K_GETPC);
#endif
switch (addr)
{
{
case 0:
v = tp_a;
- write_log("TPA read!\n");
+ write_log ("TPA read!\n");
break;
case 1:
v = tp_b;
break;
case 2:
- v = (sbcp << 0) | ((scor ^ 1) << 1) | ((stch ^ 1) << 2) | (sten << 3);
+ v = (sbcp << 0) | ((scor ^ 1) << 1) | ((stch ^ 1) << 2) | (sten << 3);
if (tp_cr & 1) {
if (!v)
v |= 1 << 5; // /IRQ
#ifdef CDTV_DEBUG_6525
if (addr < 7)
- write_log("6525 read %x=%02.2X PC=%x\n", addr, v, M68K_GETPC);
+ write_log ("6525 read %x=%02.2X PC=%x\n", addr, v, M68K_GETPC);
#endif
return v;
}
if (sys_command_open(DF_IOCTL, i) > 0) {
unitnum = i;
cd_hunt = 0;
- write_log("CDTV: autodetected unit %d\n", unitnum);
+ write_log ("CDTV: autodetected unit %d\n", unitnum);
} else {
unitnum = -1;
}
{
int irq = 0;
if (currprefs.cs_cdtvscsi && (wdscsi_getauxstatus() & 0x80)) {
- dmac_istr |= ISTR_INTS;
- if ((dmac_cntr & CNTR_INTEN) && (dmac_istr & ISTR_INTS))
+ dmac_istr |= ISTR_INTS;
+ if ((dmac_cntr & CNTR_INTEN) && (dmac_istr & ISTR_INTS))
irq = 1;
}
if ((dmac_cntr & CNTR_INTEN) && (dmac_istr & ISTR_E_INT))
if (dma_wait >= 1024)
dma_wait -= 1024;
if (dma_wait >= 0 && dma_wait < 1024 && dma_finished) {
- if ((dmac_cntr & (CNTR_INTEN | CNTR_TCEN)) == (CNTR_INTEN | CNTR_TCEN)) {
+ if ((dmac_cntr & (CNTR_INTEN | CNTR_TCEN)) == (CNTR_INTEN | CNTR_TCEN)) {
dmac_istr |= ISTR_INT_P | ISTR_E_INT;
}
dma_finished = 0;
} else if (play_statewait > 0) {
play_statewait--;
} else if (play_state == 2) {
- write_comm_pipe_u32 (&requests, 0x0110, 1);
+ write_comm_pipe_u32 (&requests, 0x0110, 1);
play_state = 0;
}
subqcnt--;
if (subqcnt < 0) {
- write_comm_pipe_u32 (&requests, 0x0101, 1);
+ write_comm_pipe_u32 (&requests, 0x0101, 1);
subqcnt = 75;
if (cd_hunt)
do_hunt();
}
if (activate_stch)
- do_stch();
+ do_stch();
}
static void do_stch(void)
activate_stch = 0;
tp_air |= 1 << 2;
INT2();
- write_log("STCH %d\n", stch_cnt++);
+ write_log ("STCH %d\n", stch_cnt++);
}
}
static void cdtv_reset (void)
{
- write_log("CDTV: reset\n");
+ write_log ("CDTV: reset\n");
cdaudiostop();
cd_playing = cd_paused = 0;
cd_motor = 0;
dmac_dawr |= b << 0;
break;
case 0x91:
- if (currprefs.cs_cdtvscsi) {
+ if (currprefs.cs_cdtvscsi) {
wdscsi_sasr (b);
checkint();
}
break;
case 0x93:
- if (currprefs.cs_cdtvscsi) {
+ if (currprefs.cs_cdtvscsi) {
wdscsi_put (b);
checkint();
}
break;
- case 0xa1:
+ case 0xa1:
cdrom_command(b);
break;
case 0xe0:
case 0xe4:
case 0xe5:
dmac_istr = 0;
- checkint();
+ checkint();
break;
case 0xe8:
case 0xe9:
unitnum = -1;
cdtv_reset();
if (!device_func_init(DEVICE_TYPE_ANY)) {
- write_log ("no CDROM support\n");
- return;
+ write_log ("no CDROM support\n");
+ return;
}
for (unitnum = 0; unitnum < MAX_TOTAL_DEVICES; unitnum++) {
if (sys_command_open (DF_IOCTL, unitnum)) {
}
}
} else {
- write_log("Audio CD\n");
+ write_log ("Audio CD\n");
if (audiounit < 0)
audiounit = unitnum;
}
} else {
- write_log("TOC read failed\n");
+ write_log ("TOC read failed\n");
}
}
sys_command_close (DF_IOCTL, unitnum);
memset (cdtv_battram, 0, CDTV_NVRAM_SIZE);
f = zfile_fopen (currprefs.flashfile, "rb+");
if (!f) {
- f = zfile_fopen (currprefs.flashfile, "wb");
+ f = zfile_fopen (currprefs.flashfile, "wb");
if (f) {
zfile_fwrite (cdtv_battram, CDTV_NVRAM_SIZE, 1, f);
zfile_fclose (f);
void cdtv_free (void)
{
if (thread_alive > 0) {
- write_comm_pipe_u32 (&requests, 0x0104, 1);
+ write_comm_pipe_u32 (&requests, 0x0104, 1);
write_comm_pipe_u32 (&requests, 0xffff, 1);
while (thread_alive > 0)
sleep_millis(10);
void cdtv_init (void)
{
if (!thread_alive) {
- uae_thread_id tid;
+ uae_thread_id tid;
init_comm_pipe (&requests, 100, 1);
uae_start_thread ("cdtv", dev_thread, NULL, &tid);
while (!thread_alive)
sleep_millis(10);
}
write_comm_pipe_u32 (&requests, 0x0104, 1);
-
+
configured = 0;
tp_a = tp_b = tp_c = tp_ad = tp_bd = tp_cd = 0;
tp_imr = tp_cr = tp_air = 0;
const char *default_path, struct zfile *f)
{
int i;
- char tmp[MAX_DPATH];
+ char tmp[MAX_DPATH], tmp2[MAX_DPATH];
char *hdcontrollers[] = { "uae",
"ide0", "ide1", "ide2", "ide3",
"scsi0", "scsi1", "scsi2", "scsi3", "scsi4", "scsi5", "scsi6" };
str = cfgfile_subst_path (default_path, unexpanded, uci->rootdir);
if (!uci->ishdf) {
- sprintf (tmp, "filesystem2=%s,%s:%s:%s,%d\n", uci->readonly ? "ro" : "rw",
+ sprintf (tmp, "%s,%s:%s:%s,%d\n", uci->readonly ? "ro" : "rw",
uci->devname ? uci->devname : "", uci->volname, str, uci->bootpri);
- zfile_fputs (f, tmp);
- sprintf (tmp, "filesystem=%s,%s:%s\n", uci->readonly ? "ro" : "rw",
+ sprintf (tmp2, "filesystem2=%s", tmp);
+ zfile_fputs (f, tmp2);
+#if 0
+ sprintf (tmp2, "filesystem=%s,%s:%s\n", uci->readonly ? "ro" : "rw",
uci->volname, str);
- zfile_fputs (f, tmp);
+ zfile_fputs (f, tmp2);
+#endif
} else {
- sprintf (tmp, "hardfile2=%s,%s:%s,%d,%d,%d,%d,%d,%s,%s\n",
+ sprintf (tmp, "%s,%s:%s,%d,%d,%d,%d,%d,%s,%s\n",
uci->readonly ? "ro" : "rw",
uci->devname ? uci->devname : "", str,
uci->sectors, uci->surfaces, uci->reserved, uci->blocksize,
uci->bootpri, uci->filesys ? uci->filesys : "", hdcontrollers[uci->controller]);
- zfile_fputs (f, tmp);
- sprintf (tmp, "hardfile=%s,%d,%d,%d,%d,%s\n",
+ sprintf (tmp2, "hardfile2=%s", tmp);
+ zfile_fputs (f, tmp2);
+#if 0
+ sprintf (tmp2, "hardfile=%s,%d,%d,%d,%d,%s\n",
uci->readonly ? "ro" : "rw", uci->sectors,
uci->surfaces, uci->reserved, uci->blocksize, str);
- zfile_fputs (f, tmp);
+ zfile_fputs (f, tmp2);
+#endif
}
+ sprintf (tmp2, "uaehf%d=%s,%s", i, uci->ishdf ? "hdf" : "dir", tmp);
+ zfile_fputs (f, tmp2);
xfree (str);
}
}
strcpy (tmp, "68ec020");
else
sprintf(tmp, "%d", model);
- if (model == 68020 && (p->fpu_model == 68881 || p->fpu_model == 68882))
+ if (model == 68020 && (p->fpu_model == 68881 || p->fpu_model == 68882))
strcat(tmp,"/68881");
cfgfile_write (f, "cpu_type=%s\n", tmp);
}
cfgfile_write (f, "catweasel=%d\n", p->catweasel);
cfgfile_write (f, "kbd_lang=%s\n", (p->keyboard_lang == KBD_LANG_DE ? "de"
- : p->keyboard_lang == KBD_LANG_DK ? "dk"
- : p->keyboard_lang == KBD_LANG_ES ? "es"
- : p->keyboard_lang == KBD_LANG_US ? "us"
- : p->keyboard_lang == KBD_LANG_SE ? "se"
- : p->keyboard_lang == KBD_LANG_FR ? "fr"
- : p->keyboard_lang == KBD_LANG_IT ? "it"
- : "FOO"));
+ : p->keyboard_lang == KBD_LANG_DK ? "dk"
+ : p->keyboard_lang == KBD_LANG_ES ? "es"
+ : p->keyboard_lang == KBD_LANG_US ? "us"
+ : p->keyboard_lang == KBD_LANG_SE ? "se"
+ : p->keyboard_lang == KBD_LANG_FR ? "fr"
+ : p->keyboard_lang == KBD_LANG_IT ? "it"
+ : "FOO"));
cfgfile_write (f, "state_replay=%s\n", p->statecapture ? "yes" : "no");
cfgfile_write (f, "state_replay_rate=%d\n", p->statecapturerate);
static void set_chipset_mask (struct uae_prefs *p, int val)
{
p->chipset_mask = (val == 0 ? 0
- : val == 1 ? CSMASK_ECS_AGNUS
- : val == 2 ? CSMASK_ECS_DENISE
- : val == 3 ? CSMASK_ECS_DENISE | CSMASK_ECS_AGNUS
- : CSMASK_AGA | CSMASK_ECS_DENISE | CSMASK_ECS_AGNUS);
+ : val == 1 ? CSMASK_ECS_AGNUS
+ : val == 2 ? CSMASK_ECS_DENISE
+ : val == 3 ? CSMASK_ECS_DENISE | CSMASK_ECS_AGNUS
+ : CSMASK_AGA | CSMASK_ECS_DENISE | CSMASK_ECS_AGNUS);
}
static int cfgfile_parse_host (struct uae_prefs *p, char *option, char *value)
|| cfgfile_string (option, value, "config_description", p->description, sizeof p->description))
return 1;
- if (cfgfile_yesno (option, value, "use_debugger", &p->start_debugger)
+ if (cfgfile_yesno (option, value, "use_debugger", &p->start_debugger)
|| cfgfile_yesno (option, value, "sound_auto", &p->sound_auto)
|| cfgfile_yesno (option, value, "sound_stereo_swap_paula", &p->sound_stereo_swap_paula)
|| cfgfile_yesno (option, value, "sound_stereo_swap_ahi", &p->sound_stereo_swap_ahi)
int blocksize, int bootpri, char *filesysdir, int hdc, int flags) {
struct uaedev_config_info *uci;
int i;
+ char *s;
if (index < 0)
uci = getuci(p);
continue;
}
}
- strcpy (uci->devname, base2);
- }
- if (volname && !uci->volname[0] && rootdir) {
- for (i = strlen(rootdir) - 1; i >= 0; i--) {
- char c = rootdir[i];
- if (c == ':' || c == '/' || c == '\\') {
- if (i == strlen(rootdir) - 1)
- continue;
- i++;
- break;
- }
- }
- strcpy (uci->volname, rootdir + i);
+ strcpy (uci->devname, base2);
}
+ s = filesys_createvolname (volname, rootdir, "Harddrive");
+ strcpy (uci->volname, s);
+ xfree (s);
return 1;
}
return 1;
}
if (cfgfile_yesno (option, value, "immediate_blits", &p->immediate_blits)
-
|| cfgfile_yesno (option, value, "cd32cd", &p->cs_cd32cd)
|| cfgfile_yesno (option, value, "cd32c2p", &p->cs_cd32c2p)
|| cfgfile_yesno (option, value, "cd32nvram", &p->cs_cd32nvram)
/* Get rid of whitespace. */
i = strlen (line2);
while (i > 0 && (line2[i - 1] == '\t' || line2[i - 1] == ' '
- || line2[i - 1] == '\r' || line2[i - 1] == '\n'))
+ || line2[i - 1] == '\r' || line2[i - 1] == '\n'))
line2[--i] = '\0';
line2 += strspn (line2, "\t \r\n");
strcpy (line2b, line2);
i = strlen (line);
while (i > 0 && (line[i - 1] == '\t' || line[i - 1] == ' '
- || line[i - 1] == '\r' || line[i - 1] == '\n'))
+ || line[i - 1] == '\r' || line[i - 1] == '\n'))
line[--i] = '\0';
line += strspn (line, "\t \r\n");
strcpy (line1b, line);
if (x4)
p->sound_maxbsiz = atoi (x4);
free (x0);
- return;
}
xfree (parms_p);
return ret;
}
-
+
uae_u32 cfgfile_uaelib (int mode, uae_u32 name, uae_u32 dst, uae_u32 maxlen)
{
char tmp[CONFIG_BLEN];
uae_u8 *restore_configuration (uae_u8 *src)
{
- write_log(src);
+ write_log (src);
src += strlen(src) + 1;
return src;
}
p = dst;
for (;;) {
char tmpout[256];
- int ret;
- tmpout[0] = 0;
- ret = cfgfile_modify (index, "*", 1, tmpout, sizeof (tmpout));
+ int ret;
+ tmpout[0] = 0;
+ ret = cfgfile_modify (index, "*", 1, tmpout, sizeof (tmpout));
index++;
if (strlen(tmpout) > 0) {
if (!memcmp(tmpout, "input.", 6))
p->cpu_idle = 150;
p->cs_compatible = CP_A3000;
p->mbresmem_low_size = 8 * 1024 * 1024;
- build_in_chipset_prefs (p);
+ built_in_chipset_prefs (p);
p->cs_ciaatod = p->ntscmode ? 2 : 1;
return configure_rom (p, roms, romcheck);
}
p->floppy_speed = 0;
p->cpu_idle = 150;
p->cs_compatible = CP_A4000;
- build_in_chipset_prefs (p);
+ built_in_chipset_prefs (p);
p->cs_ciaatod = p->ntscmode ? 2 : 1;
return configure_rom (p, roms, romcheck);
}
p->floppy_speed = 0;
p->cpu_idle = 150;
p->cs_compatible = CP_A4000T;
- build_in_chipset_prefs (p);
+ built_in_chipset_prefs (p);
p->cs_ciaatod = p->ntscmode ? 2 : 1;
return configure_rom (p, roms, romcheck);
}
set_68000_compa (p, compa);
p->dfxtype[1] = DRV_NONE;
p->cs_compatible = CP_A1000;
- build_in_chipset_prefs (p);
+ built_in_chipset_prefs (p);
if (config > 0)
p->chipset_mask |= CSMASK_NO_EHB;
if (config > 1)
p->dfxtype[1] = DRV_NONE;
set_68000_compa (p, compa);
p->cs_compatible = CP_CDTV;
- build_in_chipset_prefs (p);
+ built_in_chipset_prefs (p);
fetch_datapath (p->flashfile, sizeof (p->flashfile));
strcat(p->flashfile, "cdtv.nvr");
return 1;
p->dfxtype[1] = DRV_NONE;
set_68020_compa (p, compa);
p->cs_compatible = CP_CD32;
- build_in_chipset_prefs (p);
+ built_in_chipset_prefs (p);
fetch_datapath (p->flashfile, sizeof (p->flashfile));
strcat(p->flashfile, "cd32.nvr");
return 1;
roms[3] = -1;
if (config == 1) {
p->fastmem_size = 0x400000;
- p->cs_rtc = 2;
+ p->cs_rtc = 2;
}
set_68020_compa (p, compa);
p->cs_compatible = CP_A1200;
- build_in_chipset_prefs (p);
+ built_in_chipset_prefs (p);
return configure_rom (p, roms, romcheck);
}
p->chipset_mask = CSMASK_ECS_AGNUS | CSMASK_ECS_DENISE;
set_68000_compa (p, compa);
p->cs_compatible = CP_A600;
- build_in_chipset_prefs (p);
+ built_in_chipset_prefs (p);
return configure_rom (p, roms, romcheck);
}
p->chipset_mask = CSMASK_ECS_AGNUS | CSMASK_ECS_DENISE;
set_68000_compa (p, compa);
p->cs_compatible = CP_A500P;
- build_in_chipset_prefs (p);
+ built_in_chipset_prefs (p);
return configure_rom (p, roms, romcheck);
}
static int bip_a500 (struct uae_prefs *p, int config, int compa, int romcheck)
roms[0] = roms[1] = roms[2] = roms[3] = -1;
switch (config)
{
- case 0: // KS 1.3, OCS Agnus, 0.5M Chip + 0.5M Slow
+ case 0: // KS 1.3, OCS Agnus, 0.5M Chip + 0.5M Slow
roms[0] = 6;
roms[1] = 32;
p->chipset_mask = 0;
break;
- case 1: // KS 1.3, ECS Agnus, 0.5M Chip + 0.5M Slow
+ case 1: // KS 1.3, ECS Agnus, 0.5M Chip + 0.5M Slow
roms[0] = 6;
roms[1] = 32;
break;
- case 2: // KS 1.3, ECS Agnus, 1.0M Chip
+ case 2: // KS 1.3, ECS Agnus, 1.0M Chip
roms[0] = 6;
roms[1] = 32;
p->bogomem_size = 0;
p->chipmem_size = 0x100000;
break;
- case 3: // KS 1.3, OCS Agnus, 0.5M Chip
+ case 3: // KS 1.3, OCS Agnus, 0.5M Chip
roms[0] = 6;
roms[1] = 32;
p->bogomem_size = 0;
p->cs_rtc = 0;
p->dfxtype[1] = DRV_NONE;
break;
- case 4: // KS 1.2, OCS Agnus, 0.5M Chip
+ case 4: // KS 1.2, OCS Agnus, 0.5M Chip
roms[0] = 5;
roms[1] = 4;
roms[2] = 3;
p->cs_rtc = 0;
p->dfxtype[1] = DRV_NONE;
break;
- case 5: // KS 1.2, OCS Agnus, 0.5M Chip + 0.5M Slow
+ case 5: // KS 1.2, OCS Agnus, 0.5M Chip + 0.5M Slow
roms[0] = 5;
roms[1] = 4;
roms[2] = 3;
}
set_68000_compa (p, compa);
p->cs_compatible = CP_A500;
- build_in_chipset_prefs (p);
+ built_in_chipset_prefs (p);
return configure_rom (p, roms, romcheck);
}
p->cart_internal = 0;
p->picasso96_nocustom = 1;
p->cs_compatible = 1;
- build_in_chipset_prefs (p);
+ built_in_chipset_prefs (p);
p->cs_ide = -1;
p->cs_ciaatod = p->ntscmode ? 2 : 1;
return configure_rom (p, roms, romcheck);
static int bip_arcadia (struct uae_prefs *p, int config, int compa, int romcheck)
{
int roms[4];
-
+
p->bogomem_size = 0;
p->chipset_mask = 0;
p->cs_rtc = 0;
p->dfxtype[1] = DRV_NONE;
set_68000_compa (p, compa);
p->cs_compatible = CP_A500;
- build_in_chipset_prefs (p);
+ built_in_chipset_prefs (p);
fetch_datapath (p->flashfile, sizeof (p->flashfile));
strcat(p->flashfile, "arcadia.nvr");
roms[0] = 5;
return 1;
}
-int build_in_prefs (struct uae_prefs *p, int model, int config, int compa, int romcheck)
+int built_in_prefs (struct uae_prefs *p, int model, int config, int compa, int romcheck)
{
int v = 0, i;
buildin_default_prefs (p);
switch (model)
{
- case 0:
+ case 0:
v = bip_a500 (p, config, compa, romcheck);
break;
- case 1:
+ case 1:
v = bip_a500p (p, config, compa, romcheck);
break;
- case 2:
+ case 2:
v = bip_a600 (p, config, compa, romcheck);
break;
- case 3:
+ case 3:
v = bip_a1000 (p, config, compa, romcheck);
break;
- case 4:
+ case 4:
v = bip_a1200 (p, config, compa, romcheck);
break;
- case 5:
+ case 5:
v = bip_a3000 (p, config, compa, romcheck);
break;
- case 6:
+ case 6:
v = bip_a4000 (p, config, compa, romcheck);
break;
- case 7:
+ case 7:
v = bip_a4000t (p, config, compa, romcheck);
break;
- case 8:
+ case 8:
v = bip_cd32 (p, config, compa, romcheck);
break;
- case 9:
+ case 9:
v = bip_cdtv (p, config, compa, romcheck);
break;
- case 10:
+ case 10:
v = bip_arcadia (p, config , compa, romcheck);
break;
- case 11:
+ case 11:
v = bip_super (p, config, compa, romcheck);
break;
}
return v;
}
-int build_in_chipset_prefs (struct uae_prefs *p)
+int built_in_chipset_prefs (struct uae_prefs *p)
{
if (!p->cs_compatible)
return 1;
switch (p->cs_compatible)
{
- case CP_GENERIC: // generic
- p->cs_rtc = 2;
- p->cs_fatgaryrev = 0;
- p->cs_ide = -1;
- p->cs_mbdmac = 1;
- p->cs_ramseyrev = 0x0f;
+ case CP_GENERIC: // generic
+ p->cs_rtc = 2;
+ p->cs_fatgaryrev = 0;
+ p->cs_ide = -1;
+ p->cs_mbdmac = 1;
+ p->cs_ramseyrev = 0x0f;
break;
- case CP_CDTV: // CDTV
- p->cs_rtc = 1;
- p->cs_cdtvcd = p->cs_cdtvram = 1;
- p->cs_df0idhw = 0;
- p->cs_ksmirror = 0;
+ case CP_CDTV: // CDTV
+ p->cs_rtc = 1;
+ p->cs_cdtvcd = p->cs_cdtvram = 1;
+ p->cs_df0idhw = 0;
+ p->cs_ksmirror = 0;
break;
- case CP_CD32: // CD32
- p->cs_cd32c2p = p->cs_cd32cd = p->cs_cd32nvram = 1;
- p->cs_ksmirror = 0;
+ case CP_CD32: // CD32
+ p->cs_cd32c2p = p->cs_cd32cd = p->cs_cd32nvram = 1;
+ p->cs_ksmirror = 0;
break;
- case CP_A500: // A500
- p->cs_df0idhw = 0;
+ case CP_A500: // A500
+ p->cs_df0idhw = 0;
break;
- case CP_A500P: // A500+
+ case CP_A500P: // A500+
break;
- case CP_A600: // A600
- p->cs_ide = 1;
- p->cs_pcmcia = 1;
+ case CP_A600: // A600
+ p->cs_ide = 1;
+ p->cs_pcmcia = 1;
break;
- case CP_A1000: // A1000
- p->cs_a1000ram = 1;
- p->cs_ciaatod = p->ntscmode ? 2 : 1;
- p->cs_ksmirror = 0;
- p->cs_rtc = 0;
- p->chipset_mask |= CSMASK_BLTBUSY_BUG;
+ case CP_A1000: // A1000
+ p->cs_a1000ram = 1;
+ p->cs_ciaatod = p->ntscmode ? 2 : 1;
+ p->cs_ksmirror = 0;
+ p->cs_rtc = 0;
+ p->chipset_mask |= CSMASK_BLTBUSY_BUG;
break;
- case CP_A1200: // A1200
- p->cs_ide = 1;
- p->cs_pcmcia = 1;
- p->cs_ksmirror = 2;
+ case CP_A1200: // A1200
+ p->cs_ide = 1;
+ p->cs_pcmcia = 1;
+ p->cs_ksmirror = 2;
break;
- case CP_A2000: // A2000
- p->cs_rtc = 1;
- p->cs_ciaatod = p->ntscmode ? 2 : 1;
- break;
+ case CP_A2000: // A2000
+ p->cs_rtc = 1;
+ p->cs_ciaatod = p->ntscmode ? 2 : 1;
break;
- case CP_A3000: // A3000
- p->cs_rtc = 2;
- p->cs_fatgaryrev = 0;
- p->cs_ramseyrev = 0x0d;
- p->cs_mbdmac = 1;
- p->cs_ciaatod = p->ntscmode ? 2 : 1;
break;
- case CP_A3000T: // A3000T
- p->cs_rtc = 2;
- p->cs_fatgaryrev = 0;
- p->cs_ramseyrev = 0x0d;
- p->cs_mbdmac = 1;
- p->cs_ciaatod = p->ntscmode ? 2 : 1;
+ case CP_A3000: // A3000
+ p->cs_rtc = 2;
+ p->cs_fatgaryrev = 0;
+ p->cs_ramseyrev = 0x0d;
+ p->cs_mbdmac = 1;
+ p->cs_ciaatod = p->ntscmode ? 2 : 1;
break;
- case CP_A4000: // A4000
- p->cs_rtc = 2;
- p->cs_fatgaryrev = 0;
- p->cs_ramseyrev = 0x0f;
- p->cs_ide = 2;
- p->cs_mbdmac = 0;
+ case CP_A3000T: // A3000T
+ p->cs_rtc = 2;
+ p->cs_fatgaryrev = 0;
+ p->cs_ramseyrev = 0x0d;
+ p->cs_mbdmac = 1;
+ p->cs_ciaatod = p->ntscmode ? 2 : 1;
break;
- case CP_A4000T: // A4000T
- p->cs_rtc = 2;
- p->cs_fatgaryrev = 0;
- p->cs_ramseyrev = 0x0f;
- p->cs_ide = 2;
- p->cs_mbdmac = 2;
+ case CP_A4000: // A4000
+ p->cs_rtc = 2;
+ p->cs_fatgaryrev = 0;
+ p->cs_ramseyrev = 0x0f;
+ p->cs_ide = 2;
+ p->cs_mbdmac = 0;
+ break;
+ case CP_A4000T: // A4000T
+ p->cs_rtc = 2;
+ p->cs_fatgaryrev = 0;
+ p->cs_ramseyrev = 0x0f;
+ p->cs_ide = 2;
+ p->cs_mbdmac = 2;
break;
}
return 1;
/* CIA A timers */
if ((ciaacra & 0x21) == 0x01) {
- assert ((ciaata+1) >= ciaclocks);
+ assert ((ciaata + 1) >= ciaclocks);
ciaata_passed = ciaclocks;
}
if ((ciaacrb & 0x61) == 0x01) {
- assert ((ciaatb+1) >= ciaclocks);
+ assert ((ciaatb + 1) >= ciaclocks);
ciaatb_passed = ciaclocks;
}
/* CIA B timers */
if ((ciabcra & 0x21) == 0x01) {
- assert ((ciabta+1) >= ciaclocks);
+ assert ((ciabta + 1) >= ciaclocks);
ciabta_passed = ciaclocks;
}
if ((ciabcrb & 0x61) == 0x01) {
- assert ((ciabtb+1) >= ciaclocks);
+ assert ((ciabtb + 1) >= ciaclocks);
ciabtb_passed = ciaclocks;
}
}
/* CIA A timers */
if ((ciaacra & 0x21) == 0x01) {
- assert ((ciaata+1) >= ciaclocks);
- if ((ciaata+1) == ciaclocks) {
+ assert ((ciaata + 1) >= ciaclocks);
+ if ((ciaata + 1) == ciaclocks) {
if ((ciaacra & 0x48) == 0x40 && ciaasdr_cnt > 0 && --ciaasdr_cnt == 0)
asp = 1;
aovfla = 1;
/* CIA B timers */
if ((ciabcra & 0x21) == 0x01) {
- assert ((ciabta+1) >= ciaclocks);
- if ((ciabta+1) == ciaclocks) {
+ assert ((ciabta + 1) >= ciaclocks);
+ if ((ciabta + 1) == ciaclocks) {
if ((ciabcra & 0x48) == 0x40 && ciabsdr_cnt > 0 && --ciabsdr_cnt == 0)
bsp = 1;
bovfla = 1;
}
if (aovfla) {
- ciaaicr |= 1; RethinkICRA();
+ ciaaicr |= 1; RethinkICRA ();
ciaata = ciaala;
if (ciaacra & 0x8) ciaacra &= ~1;
}
if (aovflb) {
- ciaaicr |= 2; RethinkICRA();
+ ciaaicr |= 2; RethinkICRA ();
ciaatb = ciaalb;
if (ciaacrb & 0x8) ciaacrb &= ~1;
}
if (asp) {
- ciaaicr |= 8; RethinkICRA();
+ ciaaicr |= 8; RethinkICRA ();
}
if (bovfla) {
- ciabicr |= 1; RethinkICRB();
+ ciabicr |= 1; RethinkICRB ();
ciabta = ciabla;
if (ciabcra & 0x8) ciabcra &= ~1;
}
if (bovflb) {
- ciabicr |= 2; RethinkICRB();
+ ciabicr |= 2; RethinkICRB ();
ciabtb = ciablb;
if (ciabcrb & 0x8) ciabcrb &= ~1;
}
if (bsp) {
- ciabicr |= 8; RethinkICRB();
+ ciabicr |= 8; RethinkICRB ();
}
}
void cia_diskindex (void)
{
ciabicr |= 0x10;
- RethinkICRB();
+ RethinkICRB ();
}
void cia_parallelack (void)
{
ciaaicr |= 0x10;
- RethinkICRA();
+ RethinkICRA ();
}
static int checkalarm (unsigned long tod, unsigned long alarm, int inc)
{
if (checkalarm (ciabtod, ciabalarm, inc)) {
ciabicr |= 4;
- RethinkICRB();
+ RethinkICRB ();
}
}
STATIC_INLINE void ciaa_checkalarm (int inc)
{
if (checkalarm (ciaatod, ciaaalarm, inc)) {
- ciaaicr |= 4;
- RethinkICRA();
+ ciaaicr |= 4;
+ RethinkICRA ();
}
}
break;
}
ciaaicr |= 8;
- RethinkICRA();
+ RethinkICRA ();
sleepyhead = 0;
} else if (!(++sleepyhead & 15)) {
ciaasdr_unread = 0; /* give up on this key event after unread for a long time */
int led = (v & 2) ? 0 : 1;
oldled = v & 2;
gui_data.powerled = led;
- led_filter_audio();
+ led_filter_audio ();
}
if ((v & 1) != oldovl) {
oldovl = v & 1;
compute_passed_time ();
#ifdef CIAA_DEBUG_R
- write_log("R_CIAA: bfe%x01 %08.8X\n", addr, M68K_GETPC);
+ write_log ("R_CIAA: bfe%x01 %08.8X\n", addr, M68K_GETPC);
#endif
switch (addr & 0xf) {
} else if (arcadia_bios) {
tmp = arcadia_parport (0, ciaaprb, ciaadrb);
#endif
- } else {
-#else
- {
+ } else
#endif
+ {
tmp = handle_parport_joystick (0, ciaaprb, ciaadrb);
#ifdef DONGLE_DEBUG
if (notinrom())
ciaasdr_unread = 2;
return ciaasdr;
case 13:
- tmp = ciaaicr; ciaaicr = 0; RethinkICRA();
+ tmp = ciaaicr; ciaaicr = 0; RethinkICRA ();
return tmp;
case 14:
return ciaacra;
#ifdef CIAB_DEBUG_R
if (addr >= 8 && addr <= 10)
- write_log("R_CIAB: bfd%x00 %08.8X\n", addr, M68K_GETPC);
+ write_log ("R_CIAB: bfd%x00 %08.8X\n", addr, M68K_GETPC);
#endif
compute_passed_time ();
case 12:
return ciabsdr;
case 13:
- tmp = ciabicr; ciabicr = 0; RethinkICRB();
+ tmp = ciabicr; ciabicr = 0; RethinkICRB ();
return tmp;
case 14:
return ciabcra;
static void WriteCIAA (uae_u16 addr,uae_u8 val)
{
#ifdef CIAA_DEBUG_W
- write_log("W_CIAA: bfe%x01 %02.2X %08.8X\n", addr, val, M68K_GETPC);
+ write_log ("W_CIAA: bfe%x01 %02.2X %08.8X\n", addr, val, M68K_GETPC);
#endif
#ifdef ACTION_REPLAY
ar_ciaa[addr & 0xf] = val;
{
#ifdef CIAB_DEBUG_W
if (addr >= 8 && addr <= 10)
- write_log("W_CIAB: bfd%x00 %02.2X %08.8X\n", addr, val, M68K_GETPC);
+ write_log ("W_CIAB: bfd%x00 %02.2X %08.8X\n", addr, val, M68K_GETPC);
#endif
#ifdef ACTION_REPLAY
ar_ciab[addr & 0xf] = val;
}
}
-void CIA_inprec_prepare(void)
+void CIA_inprec_prepare (void)
{
sleepyhead = 0;
}
#ifdef CD32
akiko_reset ();
if (!akiko_init ())
- currprefs.cs_cd32cd = changed_prefs.cs_cd32cd = 0;
+ currprefs.cs_cd32cd = changed_prefs.cs_cd32cd = 0;
#endif
}
void dumpcia (void)
{
console_out ("A: CRA %02x CRB %02x ICR %02x IM %02x TA %04x (%04x) TB %04x (%04x)\n",
- ciaacra, ciaacrb, ciaaicr, ciaaimask, ciaata, ciaala, ciaatb, ciaalb);
+ ciaacra, ciaacrb, ciaaicr, ciaaimask, ciaata, ciaala, ciaatb, ciaalb);
console_out ("TOD %06x (%06x) ALARM %06x %c%c\n",
- ciaatod, ciaatol, ciaaalarm, ciaatlatch ? 'L' : ' ', ciaatodon ? ' ' : 'S');
+ ciaatod, ciaatol, ciaaalarm, ciaatlatch ? 'L' : ' ', ciaatodon ? ' ' : 'S');
console_out ("B: CRA %02x CRB %02x ICR %02x IM %02x TA %04x (%04x) TB %04x (%04x)\n",
- ciabcra, ciabcrb, ciaaicr, ciabimask, ciabta, ciabla, ciabtb, ciablb);
+ ciabcra, ciabcrb, ciaaicr, ciabimask, ciabta, ciabla, ciabtb, ciablb);
console_out ("TOD %06x (%06x) ALARM %06x %c%c\n",
- ciabtod, ciabtol, ciabalarm, ciabtlatch ? 'L' : ' ', ciabtodon ? ' ' : 'S');
+ ciabtod, ciabtol, ciabalarm, ciabtlatch ? 'L' : ' ', ciabtodon ? ' ' : 'S');
}
/* CIA memory access */
#endif
cia_wait_pre ();
v = 0xff;
- switch ((addr >> 12) & 3)
- {
- case 0:
+ switch ((addr >> 12) & 3) {
+ case 0:
v = (addr & 1) ? ReadCIAA (r) : ReadCIAB (r);
break;
- case 1:
+ case 1:
v = (addr & 1) ? 0xff : ReadCIAB (r);
break;
- case 2:
+ case 2:
v = (addr & 1) ? ReadCIAA (r) : 0xff;
break;
- case 3:
+ case 3:
if (currprefs.cpu_model == 68000 && currprefs.cpu_compatible)
v = (addr & 1) ? regs.irc : regs.irc >> 8;
if (warned > 0) {
warned--;
}
break;
- }
+ }
cia_wait_post ();
return v;
}
v = 0xffff;
switch ((addr >> 12) & 3)
{
- case 0:
+ case 0:
v = (ReadCIAB (r) << 8) | ReadCIAA (r);
break;
- case 1:
+ case 1:
v = (ReadCIAB (r) << 8) | 0xff;
break;
- case 2:
+ case 2:
v = (0xff << 8) | ReadCIAA (r);
break;
- case 3:
+ case 3:
if (currprefs.cpu_model == 68000 && currprefs.cpu_compatible)
v = regs.irc;
if (warned > 0) {
}
} else if (currprefs.cs_rtc == 2) { /* RF5C01A */
int bank = clock_control_d & 3;
- /* memory access */
+ /* memory access */
if (bank >= 2 && addr < 0x0d)
return (rtc_memory[addr] >> ((bank == 2) ? 0 : 4)) & 0x0f;
/* alarm */
}
} else if (currprefs.cs_rtc == 2) { /* RF5C01A */
int bank = clock_control_d & 3;
- /* memory access */
+ /* memory access */
if (bank >= 2 && addr < 0x0d) {
rtc_memory[addr] &= ((bank == 2) ? 0xf0 : 0x0f);
rtc_memory[addr] |= value << ((bank == 2) ? 0 : 4);
return dstbak;
}
-#endif /* SAVESTATE */
\ No newline at end of file
+#endif /* SAVESTATE */
FAIL(1);
return;
case 6:
- case 7:
+ case 7:
{
uae_u32 list = 0;
int incr = 0;
case 2:
break;
case 1:
- case 3:
+ case 3:
default:
FAIL(1); return;
}
for (reg = 7; reg >= 0; reg--) {
if (list & 0x80) {
fmov_ext_mr((uintptr)temp_fp,reg);
- sub_l_ri(ad,4);
+ sub_l_ri(ad,4);
mov_l_rm(S2,(uintptr)temp_fp);
writelong_clobber(ad,S2,S3);
- sub_l_ri(ad,4);
+ sub_l_ri(ad,4);
mov_l_rm(S2,(uintptr)temp_fp+4);
writelong_clobber(ad,S2,S3);
- sub_l_ri(ad,4);
+ sub_l_ri(ad,4);
mov_w_rm(S2,(uintptr)temp_fp+8);
writeword_clobber(ad,S2,S3);
}
case 2:
break;
case 1:
- case 3:
+ case 3:
default:
FAIL(1); return;
}
case 0x44: /* FDMOVE */
if (prec || !currprefs.fpu_strict) {
if (sreg != dreg) /* no <EA> */
- fmov_rr(dreg,sreg);
+ fmov_rr(dreg,sreg);
} else {
fmov_mr((uae_u32)temp_fp,sreg);
fmov_rm(dreg,(uae_u32)temp_fp);
{
/* replacement using branch and mov */
int uncc=(cc^1);
- emit_byte(0x70+uncc);
+ emit_byte(0x70+uncc);
emit_byte(3); /* skip next 2 bytes if not cc=true */
emit_byte(0x88);
emit_byte(0xc0+8*s+d);
}
else { /* replacement using branch and mov */
int uncc=(cc^1);
- emit_byte(0x70+uncc);
+ emit_byte(0x70+uncc);
emit_byte(3); /* skip next 3 bytes if not cc=true */
emit_byte(0x66);
emit_byte(0x89);
{
#ifdef JIT_DEBUG
if (d!=MUL_NREG1 || s!=MUL_NREG2) {
- write_log("JIT: Bad register in IMUL: d=%d, s=%d\n",d,s);
+ write_log ("JIT: Bad register in IMUL: d=%d, s=%d\n",d,s);
abort();
}
#endif
{
#ifdef JIT_DEBUG
if (d!=MUL_NREG1 || s!=MUL_NREG2) {
- write_log("JIT: Bad register in MUL: d=%d, s=%d\n",d,s);
+ write_log ("JIT: Bad register in MUL: d=%d, s=%d\n",d,s);
abort();
}
#endif
addr = (uae_u32)(pExceptRecord->ExceptionInformation[1]);
}
#ifdef JIT_DEBUG
- write_log("JIT: fault address is 0x%x at 0x%x\n",addr,i);
+ write_log ("JIT: fault address is 0x%x at 0x%x\n",addr,i);
#endif
if (!canbang || !currprefs.cachesize)
{
#ifdef JIT_DEBUG
- write_log("JIT: Not happy! Canbang or cachesize is 0 in SIGSEGV handler!\n");
+ write_log ("JIT: Not happy! Canbang or cachesize is 0 in SIGSEGV handler!\n");
#endif
return EXCEPTION_CONTINUE_SEARCH;
}
if (in_handler)
- write_log("JIT: Argh --- Am already in a handler. Shouldn't happen!\n");
+ write_log ("JIT: Argh --- Am already in a handler. Shouldn't happen!\n");
if (canbang && i>=compiled_code && i<=current_compile_p) {
if (*i==0x66) {
if (r!=-1) {
void* pr=NULL;
#ifdef JIT_DEBUG
- write_log("JIT: register was %d, direction was %d, size was %d\n",r,dir,size);
+ write_log ("JIT: register was %d, direction was %d, size was %d\n",r,dir,size);
#endif
switch(r) {
#ifdef JIT_DEBUG
if ((addr>=0x10000000 && addr<0x40000000) ||
(addr>=0x50000000)) {
- write_log("JIT: Suspicious address 0x%x in SEGV handler.\n",addr);
+ write_log ("JIT: Suspicious address 0x%x in SEGV handler.\n",addr);
}
#endif
if (dir==SIG_READ) {
switch (size) {
- case 1: *((uae_u8*)pr)=get_byte(addr); break;
- case 2: *((uae_u16*)pr)=swap16(get_word(addr)); break;
- case 4: *((uae_u32*)pr)=swap32(get_long(addr)); break;
+ case 1: *((uae_u8*)pr)=get_byte (addr); break;
+ case 2: *((uae_u16*)pr)=swap16(get_word (addr)); break;
+ case 4: *((uae_u32*)pr)=swap32(get_long (addr)); break;
default: abort();
}
}
else { /* write */
switch (size) {
- case 1: put_byte(addr,*((uae_u8*)pr)); break;
- case 2: put_word(addr,swap16(*((uae_u16*)pr))); break;
- case 4: put_long(addr,swap32(*((uae_u32*)pr))); break;
+ case 1: put_byte (addr,*((uae_u8*)pr)); break;
+ case 2: put_word (addr,swap16(*((uae_u16*)pr))); break;
+ case 4: put_long (addr,swap32(*((uae_u32*)pr))); break;
default: abort();
}
}
#ifdef JIT_DEBUG
- write_log("JIT: Handled one access!\n");
+ write_log ("JIT: Handled one access!\n");
#endif
fflush(stdout);
segvcount++;
#ifdef JIT_DEBUG
if ((addr>=0x10000000 && addr<0x40000000) ||
(addr>=0x50000000)) {
- write_log("JIT: Suspicious address 0x%x in SEGV handler.\n",addr);
+ write_log ("JIT: Suspicious address 0x%x in SEGV handler.\n",addr);
}
#endif
emit_long((uae_u32)veccode-(uae_u32)target-4);
#ifdef JIT_DEBUG
- write_log("JIT: Create jump to %p\n",veccode);
- write_log("JIT: Handled one access!\n");
+ write_log ("JIT: Create jump to %p\n",veccode);
+ write_log ("JIT: Handled one access!\n");
#endif
segvcount++;
if (dir==SIG_READ) {
switch(size) {
- case 1: raw_mov_b_ri(r,get_byte(addr)); break;
- case 2: raw_mov_w_ri(r,swap16(get_word(addr))); break;
- case 4: raw_mov_l_ri(r,swap32(get_long(addr))); break;
+ case 1: raw_mov_b_ri(r,get_byte (addr)); break;
+ case 2: raw_mov_w_ri(r,swap16(get_word (addr))); break;
+ case 4: raw_mov_l_ri(r,swap32(get_long (addr))); break;
default: abort();
}
}
else { /* write */
switch(size) {
- case 1: put_byte(addr,*((uae_u8*)pr)); break;
- case 2: put_word(addr,swap16(*((uae_u16*)pr))); break;
- case 4: put_long(addr,swap32(*((uae_u32*)pr))); break;
+ case 1: put_byte (addr,*((uae_u8*)pr)); break;
+ case 2: put_word (addr,swap16(*((uae_u16*)pr))); break;
+ case 4: put_long (addr,swap32(*((uae_u32*)pr))); break;
default: abort();
}
}
(uae_u8*)bi->direct_handler<=i &&
(uae_u8*)bi->nexthandler>i) {
#ifdef JIT_DEBUG
- write_log("JIT: deleted trigger (%p<%p<%p) %p\n",
+ write_log ("JIT: deleted trigger (%p<%p<%p) %p\n",
bi->handler,
i,
bi->nexthandler,
(uae_u8*)bi->direct_handler<=i &&
(uae_u8*)bi->nexthandler>i) {
#ifdef JIT_DEBUG
- write_log("JIT: deleted trigger (%p<%p<%p) %p\n",
+ write_log ("JIT: deleted trigger (%p<%p<%p) %p\n",
bi->handler,
i,
bi->nexthandler,
bi=bi->next;
}
#ifdef JIT_DEBUG
- write_log("JIT: Huh? Could not find trigger!\n");
+ write_log ("JIT: Huh? Could not find trigger!\n");
#endif
return EXCEPTION_CONTINUE_EXECUTION;
}
}
- write_log("JIT: Can't handle access %08.8X!\n", i);
+ write_log ("JIT: Can't handle access %08.8X!\n", i);
#if 0
if (i)
{
int j;
for (j=0;j<10;j++) {
- write_log("JIT: instruction byte %2d is 0x%02x\n",j,i[j]);
+ write_log ("JIT: instruction byte %2d is 0x%02x\n",j,i[j]);
}
}
- write_log("Please send the above info (starting at \"fault address\") to\n"
+ write_log ("Please send the above info (starting at \"fault address\") to\n"
"bmeyer@csse.monash.edu.au\n"
"This shouldn't happen ;-)\n");
#endif
int len=0;
int j;
- write_log("JIT: fault address is %08x at %08x\n",sc.cr2,sc.eip);
+ write_log ("JIT: fault address is %08x at %08x\n",sc.cr2,sc.eip);
if (!canbang)
- write_log("JIT: Not happy! Canbang is 0 in SIGSEGV handler!\n");
+ write_log ("JIT: Not happy! Canbang is 0 in SIGSEGV handler!\n");
if (in_handler)
- write_log("JIT: Argh --- Am already in a handler. Shouldn't happen!\n");
+ write_log ("JIT: Argh --- Am already in a handler. Shouldn't happen!\n");
if (canbang && i>=compiled_code && i<=current_compile_p) {
if (*i==0x66) {
if (r!=-1) {
void* pr=NULL;
- write_log("JIT: register was %d, direction was %d, size was %d\n",r,dir,size);
+ write_log ("JIT: register was %d, direction was %d, size was %d\n",r,dir,size);
switch(r) {
case 0: pr=&(sc.eax); break;
if ((addr>=0x10000000 && addr<0x40000000) ||
(addr>=0x50000000)) {
- write_log("JIT: Suspicious address in %x SEGV handler.\n",addr);
+ write_log ("JIT: Suspicious address in %x SEGV handler.\n",addr);
}
if (dir==SIG_READ) {
switch(size) {
- case 1: *((uae_u8*)pr)=get_byte(addr); break;
- case 2: *((uae_u16*)pr)=get_word(addr); break;
- case 4: *((uae_u32*)pr)=get_long(addr); break;
+ case 1: *((uae_u8*)pr)=get_byte (addr); break;
+ case 2: *((uae_u16*)pr)=get_word (addr); break;
+ case 4: *((uae_u32*)pr)=get_long (addr); break;
default: abort();
}
}
else { /* write */
switch(size) {
- case 1: put_byte(addr,*((uae_u8*)pr)); break;
- case 2: put_word(addr,*((uae_u16*)pr)); break;
- case 4: put_long(addr,*((uae_u32*)pr)); break;
+ case 1: put_byte (addr,*((uae_u8*)pr)); break;
+ case 2: put_word (addr,*((uae_u16*)pr)); break;
+ case 4: put_long (addr,*((uae_u32*)pr)); break;
default: abort();
}
}
- write_log("JIT: Handled one access!\n");
+ write_log ("JIT: Handled one access!\n");
fflush(stdout);
segvcount++;
sc.eip+=len;
if ((addr>=0x10000000 && addr<0x40000000) ||
(addr>=0x50000000)) {
- write_log("JIT: Suspicious address 0x%x in SEGV handler.\n",addr);
+ write_log ("JIT: Suspicious address 0x%x in SEGV handler.\n",addr);
}
target=(uae_u8*)sc.eip;
vecbuf[i]=target[i];
emit_byte(0xe9);
emit_long((uae_u32)veccode-(uae_u32)target-4);
- write_log("JIT: Create jump to %p\n",veccode);
+ write_log ("JIT: Create jump to %p\n",veccode);
- write_log("JIT: Handled one access!\n");
+ write_log ("JIT: Handled one access!\n");
segvcount++;
target=veccode;
if (dir==SIG_READ) {
switch(size) {
- case 1: raw_mov_b_ri(r,get_byte(addr)); break;
- case 2: raw_mov_w_ri(r,get_word(addr)); break;
- case 4: raw_mov_l_ri(r,get_long(addr)); break;
+ case 1: raw_mov_b_ri(r,get_byte (addr)); break;
+ case 2: raw_mov_w_ri(r,get_word (addr)); break;
+ case 4: raw_mov_l_ri(r,get_long (addr)); break;
default: abort();
}
}
else { /* write */
switch(size) {
- case 1: put_byte(addr,*((uae_u8*)pr)); break;
- case 2: put_word(addr,*((uae_u16*)pr)); break;
- case 4: put_long(addr,*((uae_u32*)pr)); break;
+ case 1: put_byte (addr,*((uae_u8*)pr)); break;
+ case 2: put_word (addr,*((uae_u16*)pr)); break;
+ case 4: put_long (addr,*((uae_u32*)pr)); break;
default: abort();
}
}
if (bi->handler &&
(uae_u8*)bi->direct_handler<=i &&
(uae_u8*)bi->nexthandler>i) {
- write_log("JIT: deleted trigger (%p<%p<%p) %p\n",
+ write_log ("JIT: deleted trigger (%p<%p<%p) %p\n",
bi->handler,
i,
bi->nexthandler,
if (bi->handler &&
(uae_u8*)bi->direct_handler<=i &&
(uae_u8*)bi->nexthandler>i) {
- write_log("JIT: deleted trigger (%p<%p<%p) %p\n",
+ write_log ("JIT: deleted trigger (%p<%p<%p) %p\n",
bi->handler,
i,
bi->nexthandler,
}
bi=bi->next;
}
- write_log("JIT: Huh? Could not find trigger!\n");
+ write_log ("JIT: Huh? Could not find trigger!\n");
return;
}
}
- write_log("JIT: Can't handle access!\n");
+ write_log ("JIT: Can't handle access!\n");
for (j=0;j<10;j++) {
- write_log("JIT: instruction byte %2d is %02x\n",j,i[j]);
+ write_log ("JIT: instruction byte %2d is %02x\n",j,i[j]);
}
#if 0
- write_log("Please send the above info (starting at \"fault address\") to\n"
+ write_log ("Please send the above info (starting at \"fault address\") to\n"
"bmeyer@csse.monash.edu.au\n"
"This shouldn't happen ;-)\n");
fflush(stdout);
}
}}}}
if (mismatch)
- write_log("Target CPU defines all flags on BSF instruction\n");
+ write_log ("Target CPU defines all flags on BSF instruction\n");
return !mismatch;
}
#endif
x=cpuid(0);
maxlev=x.eax;
- write_log("Max CPUID level=%d Processor is %c%c%c%c%c%c%c%c%c%c%c%c\n",
+ write_log ("Max CPUID level=%d Processor is %c%c%c%c%c%c%c%c%c%c%c%c\n",
maxlev,
x.ebx,
x.ebx>>8,
write_log ("have_cmov=%d, avoid_cmov=%d, have_rat_stall=%d\n",
have_cmov,currprefs.avoid_cmov,have_rat_stall);
if (currprefs.avoid_cmov) {
- write_log("Disabling cmov use despite processor claiming to support it!\n");
+ write_log ("Disabling cmov use despite processor claiming to support it!\n");
have_cmov=0;
}
#else
if (live.spos[r]<0)
abort();
if (live.tos<live.spos[r]) {
- write_log("JIT: Looking for spos for fnreg %d\n",r);
+ write_log ("JIT: Looking for spos for fnreg %d\n",r);
abort();
}
return live.tos-live.spos[r];
STATIC_INLINE void set_dhtu(blockinfo* bi, void* dh)
{
- //write_log("JIT: bi is %p\n",bi);
+ //write_log ("JIT: bi is %p\n",bi);
if (dh!=bi->direct_handler_to_use) {
dependency* x=bi->deplist;
- //write_log("JIT: bi->deplist=%p\n",bi->deplist);
+ //write_log ("JIT: bi->deplist=%p\n",bi->deplist);
while (x) {
- //write_log("JIT: x is %p\n",x);
- //write_log("JIT: x->next is %p\n",x->next);
- //write_log("JIT: x->prev_p is %p\n",x->prev_p);
+ //write_log ("JIT: x is %p\n",x);
+ //write_log ("JIT: x->next is %p\n",x->next);
+ //write_log ("JIT: x->prev_p is %p\n",x->prev_p);
if (x->jmp_off) {
adjust_jmpdep(x,dh);
blockinfo* tbi=get_blockinfo_addr((void*)target);
Dif(!tbi) {
- write_log("JIT: Could not create jmpdep!\n");
+ write_log ("JIT: Could not create jmpdep!\n");
abort();
}
bi->dep[i].jmp_off=jmpaddr;
count++;
}
}
- write_log("JIT: count=%d\n",count);
+ write_log ("JIT: count=%d\n",count);
for (i=0;i<N_REGS;i++) { // FIXME --- don't do dirty yet
s->nat[i].dirtysize=0;
}
if(currprefs.cachesize)
{
- write_log( "JIT: Reverting to \"indirect\" access, because canbang is zero!\n" );
+ write_log ( "JIT: Reverting to \"indirect\" access, because canbang is zero!\n" );
}
}
if (!currprefs.compforcesettings && !have_done_picasso) {
int stop=0;
if (currprefs.comptrustbyte!=0 && currprefs.comptrustbyte!=3)
- stop = 1, write_log("JIT: comptrustbyte is not 'direct' or 'afterpic'\n");
+ stop = 1, write_log ("JIT: comptrustbyte is not 'direct' or 'afterpic'\n");
if (currprefs.comptrustword!=0 && currprefs.comptrustword!=3)
- stop = 1, write_log("JIT: comptrustword is not 'direct' or 'afterpic'\n");
+ stop = 1, write_log ("JIT: comptrustword is not 'direct' or 'afterpic'\n");
if (currprefs.comptrustlong!=0 && currprefs.comptrustlong!=3)
- stop = 1, write_log("JIT: comptrustlong is not 'direct' or 'afterpic'\n");
+ stop = 1, write_log ("JIT: comptrustlong is not 'direct' or 'afterpic'\n");
if (currprefs.comptrustnaddr!=0 && currprefs.comptrustnaddr!=3)
- stop = 1, write_log("JIT: comptrustnaddr is not 'direct' or 'afterpic'\n");
+ stop = 1, write_log ("JIT: comptrustnaddr is not 'direct' or 'afterpic'\n");
if (currprefs.compnf!=1)
- stop = 1, write_log("JIT: compnf is not 'yes'\n");
+ stop = 1, write_log ("JIT: compnf is not 'yes'\n");
if (currprefs.cachesize<1024)
- stop = 1, write_log("JIT: cachesize is less than 1024\n");
+ stop = 1, write_log ("JIT: cachesize is less than 1024\n");
if (currprefs.comp_hardflush)
- stop = 1, write_log("JIT: comp_flushmode is 'hard'\n");
+ stop = 1, write_log ("JIT: comp_flushmode is 'hard'\n");
if (!canbang)
- stop = 1, write_log("JIT: Cannot use most direct memory access,\n"
+ stop = 1, write_log ("JIT: Cannot use most direct memory access,\n"
" and unable to recover from failed guess!\n");
#if 0
if (stop) {
if (live.flags_in_flags==VALID)
return;
Dif (live.flags_on_stack==TRASH) {
- write_log("JIT: Want flags, got something on stack, but it is TRASH\n");
+ write_log ("JIT: Want flags, got something on stack, but it is TRASH\n");
abort();
}
if (live.flags_on_stack==VALID) {
live.flags_in_flags=VALID;
return;
}
- write_log("JIT: Huh? live.flags_in_flags=%d, live.flags_on_stack=%d, but need to make live\n",
+ write_log ("JIT: Huh? live.flags_in_flags=%d, live.flags_on_stack=%d, but need to make live\n",
live.flags_in_flags,live.flags_on_stack);
abort();
}
return;
- write_log("----------------------\n");
+ write_log ("----------------------\n");
for (i=0;i<N_REGS;i++) {
switch(nstate[i]) {
- case L_UNKNOWN: write_log("Nat %d : UNKNOWN\n",i); break;
- case L_UNAVAIL: write_log("Nat %d : UNAVAIL\n",i); break;
- default: write_log("Nat %d : %d\n",i,nstate[i]); break;
+ case L_UNKNOWN: write_log ("Nat %d : UNKNOWN\n",i); break;
+ case L_UNAVAIL: write_log ("Nat %d : UNAVAIL\n",i); break;
+ default: write_log ("Nat %d : %d\n",i,nstate[i]); break;
}
}
for (i=0;i<VREGS;i++) {
if (vstate[i]==L_UNNEEDED)
- write_log("Virt %d: UNNEEDED\n",i);
+ write_log ("Virt %d: UNNEEDED\n",i);
}
}
if (live.state[r].val &&
live.nat[rr].nholds==1 &&
!live.nat[rr].locked) {
- // write_log("JIT: RemovingA offset %x from reg %d (%d) at %p\n",
+ // write_log ("JIT: RemovingA offset %x from reg %d (%d) at %p\n",
// live.state[r].val,r,rr,target);
adjust_nreg(rr,live.state[r].val);
live.state[r].val=0;
evict(vr);
}
Dif (live.nat[r].nholds!=0) {
- write_log("JIT: Failed to free nreg %d, nholds is %d\n",r,live.nat[r].nholds);
+ write_log ("JIT: Failed to free nreg %d, nholds is %d\n",r,live.nat[r].nholds);
abort();
}
}
}
}
Dif (live.nat[rr].nholds!=1) {
- write_log("JIT: natreg %d holds %d vregs, %d not exclusive\n",
+ write_log ("JIT: natreg %d holds %d vregs, %d not exclusive\n",
rr,live.nat[rr].nholds,r);
abort();
}
alloc_reg_hinted(r,4,0,spec);
Dif (live.state[r].validsize!=4) {
- write_log("JIT: Validsize=%d in remove_offset\n",live.state[r].validsize);
+ write_log ("JIT: Validsize=%d in remove_offset\n",live.state[r].validsize);
abort();
}
make_exclusive(r,0,-1);
rr=live.state[r].realreg;
if (live.nat[rr].nholds==1) {
- //write_log("JIT: RemovingB offset %x from reg %d (%d) at %p\n",
+ //write_log ("JIT: RemovingB offset %x from reg %d (%d) at %p\n",
// live.state[r].val,r,rr,target);
adjust_nreg(rr,live.state[r].val);
live.state[r].dirtysize=4;
set_status(r,DIRTY);
return;
}
- write_log("JIT: Failed in remove_offset\n");
+ write_log ("JIT: Failed in remove_offset\n");
abort();
}
int answer=-1;
if (live.state[r].status==UNDEF) {
- write_log("JIT: WARNING: Unexpected read of undefined register %d\n",r);
+ write_log ("JIT: WARNING: Unexpected read of undefined register %d\n",r);
}
if (!can_offset)
remove_offset(r,spec);
}
else {
Dif (live.state[r].val) {
- write_log("JIT: Problem with val\n");
+ write_log ("JIT: Problem with val\n");
abort();
}
}
int answer=-1;
if (live.state[r].status==UNDEF) {
- write_log("JIT: WARNING: Unexpected read of undefined register %d\n",r);
+ write_log ("JIT: WARNING: Unexpected read of undefined register %d\n",r);
}
remove_offset(r,spec);
make_exclusive(r,0,spec);
Dif (wsize<rsize) {
- write_log("JIT: Cannot handle wsize<rsize in rmw_general()\n");
+ write_log ("JIT: Cannot handle wsize<rsize in rmw_general()\n");
abort();
}
if (isinreg(r) && live.state[r].validsize>=rsize) {
live.nat[answer].touched=touchcnt++;
Dif (live.state[r].val) {
- write_log("JIT: Problem with val(rmw)\n");
+ write_log ("JIT: Problem with val(rmw)\n");
abort();
}
return answer;
f_evict(vr);
}
Dif (live.fat[r].nholds!=0) {
- write_log("JIT: Failed to free nreg %d, nholds is %d\n",r,live.fat[r].nholds);
+ write_log ("JIT: Failed to free nreg %d, nholds is %d\n",r,live.fat[r].nholds);
abort();
}
}
}
}
Dif (live.fat[rr].nholds!=1) {
- write_log("JIT: realreg %d holds %d (",rr,live.fat[rr].nholds);
+ write_log ("JIT: realreg %d holds %d (",rr,live.fat[rr].nholds);
for (i=0;i<live.fat[rr].nholds;i++) {
- write_log("JIT: %d(%d,%d)",live.fat[rr].holds[i],
+ write_log ("JIT: %d(%d,%d)",live.fat[rr].holds[i],
live.fate[live.fat[rr].holds[i]].realreg,
live.fate[live.fat[rr].holds[i]].realind);
}
- write_log("\n");
+ write_log ("\n");
abort();
}
return;
}
else {
Dif (live.flags_in_flags!=VALID) {
- write_log("JIT: setzflg() wanted flags in native flags, they are %d\n",
+ write_log ("JIT: setzflg() wanted flags in native flags, they are %d\n",
live.flags_in_flags);
abort();
}
live.nat[s].nholds++;
log_clobberreg(d);
- /* write_log("JIT: Added %d to nreg %d(%d), now holds %d regs\n",
+ /* write_log ("JIT: Added %d to nreg %d(%d), now holds %d regs\n",
d,s,live.state[d].realind,live.nat[s].nholds); */
unlock(s);
#else
if (!reg_alloc_run)
#endif
Dif (!isconst(r)) {
- write_log("JIT: Register %d should be constant, but isn't\n",r);
+ write_log ("JIT: Register %d should be constant, but isn't\n",r);
abort();
}
return live.state[r].val;
int rr;
Dif (vton[i]==-1) {
- write_log("JIT: Asked to load register %d, but nowhere to go\n",i);
+ write_log ("JIT: Asked to load register %d, but nowhere to go\n",i);
abort();
}
n=vton[i];
case UNDEF:
break;
default:
- write_log("JIT: Weird status: %d\n",live.state[i].status);
+ write_log ("JIT: Weird status: %d\n",live.state[i].status);
abort();
}
}
int n=live.state[i].realreg;
if (live.nat[n].nholds!=1) {
- write_log("JIT: Register %d isn't alone in nreg %d\n",
+ write_log ("JIT: Register %d isn't alone in nreg %d\n",
i,n);
abort();
}
if (vton[i]==-1) {
- write_log("JIT: Register %d is still in register, shouldn't be\n",
+ write_log ("JIT: Register %d is still in register, shouldn't be\n",
i);
abort();
}
int n=vton[i];
if (n==-1) {
Dif (isinreg(i)) {
- write_log("JIT: Register %d unexpectedly in nreg %d\n",
+ write_log ("JIT: Register %d unexpectedly in nreg %d\n",
i,live.state[i].realreg);
abort();
}
break;
case INMEM:
Dif (live.nat[n].nholds) {
- write_log("JIT: natreg %d holds %d vregs, should be empty\n",
+ write_log ("JIT: natreg %d holds %d vregs, should be empty\n",
n,live.nat[n].nholds);
}
raw_mov_l_rm(n,(uae_u32)live.state[i].mem);
break;
case ISCONST:
if (i!=PC_P) {
- write_log("JIT: Got constant in matchstate for reg %d. Bad!\n",i);
+ write_log ("JIT: Got constant in matchstate for reg %d. Bad!\n",i);
abort();
}
break;
default: break;
}
Dif (live.state[i].val && i!=PC_P) {
- write_log("JIT: Register %d still has val %x\n",
+ write_log ("JIT: Register %d still has val %x\n",
i,live.state[i].val);
}
}
raw_fp_cleanup_drop();
}
if (needflags) {
- write_log("JIT: Warning! flush with needflags=1!\n");
+ write_log ("JIT: Warning! flush with needflags=1!\n");
}
lopt_emit_all();
int i;
for (i=0;i<N_REGS;i++)
if (live.nat[i].locked && i!=4)
- write_log("JIT: Warning! %d is locked\n",i);
+ write_log ("JIT: Warning! %d is locked\n",i);
for (i=0;i<VREGS;i++)
if (live.state[i].needflush==NF_SCRATCH) {
mov_l_rm_indexed(f,(uae_u32)(baseaddr),f);
if (address==source) { /* IBrowse does this! */
- if (size > 1) {
+ if (size > 1) {
add_l(f,address); /* f now holds the final address */
switch (size) {
case 2: gen_bswap_16(source); mov_w_Rr(f,source,0);
}
else {
while (len>0) {
- write_log("%08x ",*pos);
+ write_log ("%08x ",*pos);
pos++;
len-=4;
}
- write_log(" bla\n");
+ write_log (" bla\n");
}
}
bi->handler_to_use=bi->handler;
set_dhtu(bi,bi->direct_handler);
- /* write_log("JIT: reactivate %p/%p (%x %x/%x %x)\n",bi,bi->pc_p,
+ /* write_log ("JIT: reactivate %p/%p (%x %x/%x %x)\n",bi,bi->pc_p,
c1,c2,bi->c1,bi->c2);*/
remove_from_list(bi);
add_to_active(bi);
else {
/* This block actually changed. We need to invalidate it,
and set it up to be recompiled */
- /* write_log("JIT: discard %p/%p (%x %x/%x %x)\n",bi,bi->pc_p,
+ /* write_log ("JIT: discard %p/%p (%x %x/%x %x)\n",bi,bi->pc_p,
c1,c2,bi->c1,bi->c2); */
invalidate_block(bi);
raise_in_cl_list(bi);
#endif
int isjmp,isaddx,iscjmp;
int lvl;
-
+
lvl = 5 - (currprefs.cpu_model - 68000) / 10;
if (lvl < 0)
lvl = 0;
hard_flush_count++;
#if 0
- write_log("JIT: Flush Icache_hard(%d/%x/%p), %u instruction bytes\n",
+ write_log ("JIT: Flush Icache_hard(%d/%x/%p), %u instruction bytes\n",
n,regs.pc,regs.pc_p,current_compile_p-compiled_code);
#endif
bi=active;
Dif (bi!=bi2) {
/* I don't think it can happen anymore. Shouldn't, in
any case. So let's make sure... */
- write_log("JIT: WOOOWOO count=%d, ol=%d %p %p\n",
+ write_log ("JIT: WOOOWOO count=%d, ol=%d %p %p\n",
bi->count,bi->optlevel,bi->handler_to_use,
cache_tags[cl].handler);
abort();
* cpummu.cpp - MMU emulation
*
* Copyright (c) 2001-2004 Milan Jurik of ARAnyM dev team (see AUTHORS)
- *
+ *
* Inspired by UAE MMU patch
*
* This file is part of the ARAnyM project which builds a new and powerful
from_addr = ttr & MMU_TTR_LOGICAL_BASE;
to_addr = (ttr & MMU_TTR_LOGICAL_MASK) << 8;
- write_log("%s: [%08lx] %08lx - %08lx enabled=%d supervisor=%d wp=%d cm=%02d",
+ write_log ("%s: [%08lx] %08lx - %08lx enabled=%d supervisor=%d wp=%d cm=%02d",
label, ttr,
from_addr, to_addr,
ttr & MMU_TTR_BIT_ENABLED ? 1 : 0,
*ttr |= ((baseaddr + size - 1) & MMU_TTR_LOGICAL_BASE) >> 8;
*ttr |= MMU_TTR_BIT_ENABLED;
- write_log("MMU: map transparent mapping of %08x", *ttr);
+ write_log ("MMU: map transparent mapping of %08x", *ttr);
}
/* check if an address matches a ttr */
D(bug("%s: root=%lx", label, root_ptr));
for (root_idx = 0; root_idx < ROOT_TABLE_SIZE; root_idx++) {
- root_des = phys_get_long(root_ptr + root_idx);
+ root_des = phys_get_long (root_ptr + root_idx);
if ((root_des & 2) == 0)
continue; /* invalid */
} page_info[PAGE_TABLE_SIZE];
int n_pages_used;
- ptr_des = phys_get_long(ptr_des_addr + ptr_idx);
+ ptr_des = phys_get_long (ptr_des_addr + ptr_idx);
ptr_log = root_log | (ptr_idx << PTR_INDEX_SHIFT);
if ((ptr_des & 2) == 0)
n_pages_used = -1;
for (page_idx = 0; page_idx < PAGE_TABLE_SIZE; page_idx++) {
- page_des = phys_get_long(page_addr + page_idx);
+ page_des = phys_get_long (page_addr + page_idx);
page_log = ptr_log | (page_idx << 2); // ??? PAGE_INDEX_SHIFT
switch (page_des & 3) {
for (j = 0; j < ATC_L2_SIZE; j++) {
if (atc_l2[i][j].tag == 0x8000)
continue;
- write_log("ATC[%02d] G=%d TT=%d M=%d WP=%d VD=%d VI=%d tag=%08x --> phys=%08x",
+ write_log ("ATC[%02d] G=%d TT=%d M=%d WP=%d VD=%d VI=%d tag=%08x --> phys=%08x",
j, atc_l2[i][j].global, atc_l2[i][j].tt, atc_l2[i][j].modified,
atc_l2[i][j].write_protect, atc_l2[i][j].valid_data, atc_l2[i][j].valid_inst,
atc_l2[i][j].tag, atc_l2[i][j].phys);
/* {{{ mmu_dump_tables */
void mmu_dump_tables(void)
{
- write_log("URP: %08x SRP: %08x MMUSR: %x TC: %x", regs.urp, regs.srp, regs.mmusr, regs.tcr);
+ write_log ("URP: %08x SRP: %08x MMUSR: %x TC: %x", regs.urp, regs.srp, regs.mmusr, regs.tcr);
mmu_dump_ttr("DTT0", regs.dtt0);
mmu_dump_ttr("DTT1", regs.dtt1);
mmu_dump_ttr("ITT0", regs.itt0);
regs.mmu_fault_addr = addr;
regs.mmu_ssw = ssw | MMU_SSW_ATC;
- write_log("BUS ERROR: fc=%d w=%d log=%08x ssw=%04x", fc, write, addr, ssw);
+ write_log ("BUS ERROR: fc=%d w=%d log=%08x ssw=%04x", fc, write, addr, ssw);
THROW(2);
}
SAVE_EXCEPTION;
TRY(prb) {
desc = mmu_lookup_pagetable(addr, super, write);
- write_log("translate: %x,%u,%u,%u -> %x", addr, super, write, data, desc);
+ write_log ("translate: %x,%u,%u,%u -> %x", addr, super, write, data, desc);
RESTORE_EXCEPTION;
}
CATCH(prb) {
mmu_fill_atc_l2(addr, super, data, write, l);
}
if (!(data ? l->valid_data : l->valid_inst)) {
- write_log("MMU: non-resident page (%x,%x,%x)!", addr, regs.pc, regs.fault_pc);
+ write_log ("MMU: non-resident page (%x,%x,%x)!", addr, regs.pc, regs.fault_pc);
goto fail;
}
if (write) {
if (l->write_protect) {
- write_log("MMU: write protected (via %s) %lx", l->tt ? "ttr" : "atc", addr);
+ write_log ("MMU: write protected (via %s) %lx", l->tt ? "ttr" : "atc", addr);
goto fail;
}
if (!l->modified)
/* fetch root table descriptor */
i = (addr >> 23) & 0x1fc;
desc_addr = (desc & MMU_ROOT_PTR_ADDR_MASK) | i;
- desc = phys_get_long(desc_addr);
+ desc = phys_get_long (desc_addr);
if ((desc & 2) == 0) {
- write_log("MMU: invalid root descriptor for %lx", addr);
+ write_log ("MMU: invalid root descriptor for %lx", addr);
return 0;
}
wp |= desc;
if ((desc & MMU_DES_USED) == 0)
- phys_put_long(desc_addr, desc | MMU_DES_USED);
+ phys_put_long (desc_addr, desc | MMU_DES_USED);
/* fetch pointer table descriptor */
i = (addr >> 16) & 0x1fc;
desc_addr = (desc & MMU_ROOT_PTR_ADDR_MASK) | i;
- desc = phys_get_long(desc_addr);
+ desc = phys_get_long (desc_addr);
if ((desc & 2) == 0) {
- write_log("MMU: invalid ptr descriptor for %lx", addr);
+ write_log ("MMU: invalid ptr descriptor for %lx", addr);
return 0;
}
wp |= desc;
if ((desc & MMU_DES_USED) == 0)
- phys_put_long(desc_addr, desc | MMU_DES_USED);
+ phys_put_long (desc_addr, desc | MMU_DES_USED);
/* fetch page table descriptor */
if (regs.mmu_pagesize_8k) {
}
get_page_descriptor:
- desc = phys_get_long(desc_addr);
+ desc = phys_get_long (desc_addr);
if ((desc & 1) == 0) {
if ((desc & 2) == 0) {
- write_log("MMU: invalid page descriptor log=%08lx desc=%08lx @%08lx", addr, desc, desc_addr);
+ write_log ("MMU: invalid page descriptor log=%08lx desc=%08lx @%08lx", addr, desc, desc_addr);
return desc;
}
/* indirect */
if (indirect) {
- write_log("MMU: double indirect descriptor log=%lx descriptor @ %lx", addr, desc_addr);
+ write_log ("MMU: double indirect descriptor log=%lx descriptor @ %lx", addr, desc_addr);
return desc;
}
wp |= desc;
if ((desc & MMU_DES_USED) == 0)
- phys_put_long(desc_addr, desc | MMU_DES_USED);
+ phys_put_long (desc_addr, desc | MMU_DES_USED);
desc_addr = desc & MMU_PAGE_INDIRECT_MASK;
indirect = 1;
goto get_page_descriptor;
if (desc & MMU_DES_WP) {
if ((desc & MMU_DES_USED) == 0) {
desc |= MMU_DES_USED;
- phys_put_long(desc_addr, desc);
+ phys_put_long (desc_addr, desc);
}
} else if ((desc & (MMU_DES_USED|MMU_DES_MODIFIED)) !=
(MMU_DES_USED|MMU_DES_MODIFIED)) {
desc |= MMU_DES_USED|MMU_DES_MODIFIED;
- phys_put_long(desc_addr, desc);
+ phys_put_long (desc_addr, desc);
}
} else {
if ((desc & MMU_DES_USED) == 0) {
desc |= MMU_DES_USED;
- phys_put_long(desc_addr, desc);
+ phys_put_long (desc_addr, desc);
}
}
return desc;
{
uae_u16 res;
- res = (uae_u16)mmu_get_byte(addr, data, sz_word) << 8;
+ res = (uae_u16)mmu_get_byte (addr, data, sz_word) << 8;
SAVE_EXCEPTION;
TRY(prb) {
- res |= mmu_get_byte(addr + 1, data, sz_word);
+ res |= mmu_get_byte (addr + 1, data, sz_word);
RESTORE_EXCEPTION;
}
CATCH(prb) {
uae_u32 res;
if (likely(!(addr & 1))) {
- res = (uae_u32)mmu_get_word(addr, data, sz_long) << 16;
+ res = (uae_u32)mmu_get_word (addr, data, sz_long) << 16;
SAVE_EXCEPTION;
TRY(prb) {
- res |= mmu_get_word(addr + 2, data, sz_long);
+ res |= mmu_get_word (addr + 2, data, sz_long);
RESTORE_EXCEPTION;
}
CATCH(prb) {
THROW_AGAIN(prb);
}
} else {
- res = (uae_u32)mmu_get_byte(addr, data, sz_long) << 8;
+ res = (uae_u32)mmu_get_byte (addr, data, sz_long) << 8;
SAVE_EXCEPTION;
TRY(prb) {
- res = (res | mmu_get_byte(addr + 1, data, sz_long)) << 8;
- res = (res | mmu_get_byte(addr + 2, data, sz_long)) << 8;
- res |= mmu_get_byte(addr + 3, data, sz_long);
+ res = (res | mmu_get_byte (addr + 1, data, sz_long)) << 8;
+ res = (res | mmu_get_byte (addr + 2, data, sz_long)) << 8;
+ res |= mmu_get_byte (addr + 3, data, sz_long);
RESTORE_EXCEPTION;
}
CATCH(prb) {
if (!mmu_fill_atc_l1(addr, super, data, 0, cl))
goto redo;
- return do_get_mem_byte((uae_u8 *)mmu_get_real_address(addr, cl));
+ return do_get_mem_byte((uae_u8 *)mmu_get_real_address (addr, cl));
}
uae_u16 REGPARAM2 mmu_get_word_slow(uaecptr addr, int super, int data,
if (!mmu_fill_atc_l1(addr, super, data, 0, cl))
goto redo;
- return do_get_mem_word((uae_u16 *)mmu_get_real_address(addr, cl));
+ return do_get_mem_word((uae_u16 *)mmu_get_real_address (addr, cl));
}
uae_u32 REGPARAM2 mmu_get_long_slow(uaecptr addr, int super, int data,
if (!mmu_fill_atc_l1(addr, super, data, 0, cl))
goto redo;
- return do_get_mem_long((uae_u32 *)mmu_get_real_address(addr, cl));
+ return do_get_mem_long((uae_u32 *)mmu_get_real_address (addr, cl));
}
void REGPARAM2 mmu_put_long_unaligned(uaecptr addr, uae_u32 val, int data)
SAVE_EXCEPTION;
TRY(prb) {
if (likely(!(addr & 1))) {
- mmu_put_word(addr, val >> 16, data, sz_long);
- mmu_put_word(addr + 2, val, data, sz_long);
+ mmu_put_word (addr, val >> 16, data, sz_long);
+ mmu_put_word (addr + 2, val, data, sz_long);
} else {
- mmu_put_byte(addr, val >> 24, data, sz_long);
- mmu_put_byte(addr + 1, val >> 16, data, sz_long);
- mmu_put_byte(addr + 2, val >> 8, data, sz_long);
- mmu_put_byte(addr + 3, val, data, sz_long);
+ mmu_put_byte (addr, val >> 24, data, sz_long);
+ mmu_put_byte (addr + 1, val >> 16, data, sz_long);
+ mmu_put_byte (addr + 2, val >> 8, data, sz_long);
+ mmu_put_byte (addr + 3, val, data, sz_long);
}
RESTORE_EXCEPTION;
}
{
SAVE_EXCEPTION;
TRY(prb) {
- mmu_put_byte(addr, val >> 8, data, sz_word);
- mmu_put_byte(addr + 1, val, data, sz_word);
+ mmu_put_byte (addr, val >> 8, data, sz_word);
+ mmu_put_byte (addr + 1, val, data, sz_word);
RESTORE_EXCEPTION;
}
CATCH(prb) {
if (!mmu_fill_atc_l1(addr, super, data, 1, cl))
goto redo;
- do_put_mem_byte((uae_u8 *)mmu_get_real_address(addr, cl), val);
+ do_put_mem_byte((uae_u8 *)mmu_get_real_address (addr, cl), val);
}
void REGPARAM2 mmu_put_word_slow(uaecptr addr, uae_u16 val, int super, int data,
if (!mmu_fill_atc_l1(addr, super, data, 1, cl))
goto redo;
- do_put_mem_word((uae_u16 *)mmu_get_real_address(addr, cl), val);
+ do_put_mem_word((uae_u16 *)mmu_get_real_address (addr, cl), val);
}
void REGPARAM2 mmu_put_long_slow(uaecptr addr, uae_u32 val, int super, int data,
if (!mmu_fill_atc_l1(addr, super, data, 1, cl))
goto redo;
- do_put_mem_long((uae_u32 *)mmu_get_real_address(addr, cl), val);
+ do_put_mem_long((uae_u32 *)mmu_get_real_address (addr, cl), val);
}
-uae_u32 REGPARAM2 sfc_get_long(uaecptr addr)
+uae_u32 REGPARAM2 sfc_get_long (uaecptr addr)
{
int super = (regs.sfc & 4) != 0;
int data = (regs.sfc & 3) != 2;
return res;
}
-uae_u16 REGPARAM2 sfc_get_word(uaecptr addr)
+uae_u16 REGPARAM2 sfc_get_word (uaecptr addr)
{
int super = (regs.sfc & 4) != 0;
int data = (regs.sfc & 3) != 2;
return res;
}
-uae_u8 REGPARAM2 sfc_get_byte(uaecptr addr)
+uae_u8 REGPARAM2 sfc_get_byte (uaecptr addr)
{
int super = (regs.sfc & 4) != 0;
int data = (regs.sfc & 3) != 2;
return mmu_get_user_byte(addr, super, data, sz_byte);
}
-void REGPARAM2 dfc_put_long(uaecptr addr, uae_u32 val)
+void REGPARAM2 dfc_put_long (uaecptr addr, uae_u32 val)
{
int super = (regs.dfc & 4) != 0;
int data = (regs.dfc & 3) != 2;
}
}
-void REGPARAM2 dfc_put_word(uaecptr addr, uae_u16 val)
+void REGPARAM2 dfc_put_word (uaecptr addr, uae_u16 val)
{
int super = (regs.dfc & 4) != 0;
int data = (regs.dfc & 3) != 2;
}
}
-void REGPARAM2 dfc_put_byte(uaecptr addr, uae_u8 val)
+void REGPARAM2 dfc_put_byte (uaecptr addr, uae_u8 val)
{
int super = (regs.dfc & 4) != 0;
int data = (regs.dfc & 3) != 2;
glob = (opcode & 8) != 0;
if (opcode & 16) {
- write_log("pflusha(%u,%u)", glob, regs->dfc);
+ write_log ("pflusha(%u,%u)", glob, regs->dfc);
mmu_flush_atc_all(glob);
} else {
- addr = m68k_areg(regs, regno);
- write_log("pflush(%u,%u,%x)", glob, regs->dfc, addr);
+ addr = m68k_areg (regs, regno);
+ write_log ("pflush(%u,%u,%x)", glob, regs->dfc, addr);
mmu_flush_atc(addr, super, glob);
}
flush_internals();
regno = opcode & 7;
write = (opcode & 32) == 0;
- addr = m68k_areg(regs, regno);
- write_log("PTEST%c (A%d) %08x DFC=%d", write ? 'W' : 'R', regno, addr, regs->dfc);
+ addr = m68k_areg (regs, regno);
+ write_log ("PTEST%c (A%d) %08x DFC=%d", write ? 'W' : 'R', regno, addr, regs->dfc);
mmu_flush_atc(addr, super, 1);
SAVE_EXCEPTION;
TRY(prb) {
regs->mmusr = MMU_MMUSR_B;
}
RESTORE_EXCEPTION;
- write_log("PTEST result: mmusr %08x", regs->mmusr);
+ write_log ("PTEST result: mmusr %08x", regs->mmusr);
} else
op_illg (opcode, regs);
}
regs.mmu_pagesize_8k = tcr & 0x4000 ? 1 : 0;
mmu_flush_atc_all(1);
- write_log("MMU: enabled=%d page8k=%d\n", regs.mmu_enabled, regs.mmu_pagesize_8k);
+ write_log ("MMU: enabled=%d page8k=%d\n", regs.mmu_enabled, regs.mmu_pagesize_8k);
}
void REGPARAM2 mmu_set_super(int super)
#define GET_UINT32_BE(n,b,i) \
{ \
(n) = ( (unsigned long) (b)[(i) ] << 24 ) \
- | ( (unsigned long) (b)[(i) + 1] << 16 ) \
- | ( (unsigned long) (b)[(i) + 2] << 8 ) \
- | ( (unsigned long) (b)[(i) + 3] ); \
+ | ( (unsigned long) (b)[(i) + 1] << 16 ) \
+ | ( (unsigned long) (b)[(i) + 2] << 8 ) \
+ | ( (unsigned long) (b)[(i) + 3] ); \
}
#endif
#ifndef PUT_UINT32_BE
#define R(t) \
( \
temp = W[(t - 3) & 0x0F] ^ W[(t - 8) & 0x0F] ^ \
- W[(t - 14) & 0x0F] ^ W[ t & 0x0F], \
+ W[(t - 14) & 0x0F] ^ W[ t & 0x0F], \
( W[t & 0x0F] = S(temp,1) ) \
)
unsigned long left;
if( ilen <= 0 )
- return;
+ return;
left = ctx->total[0] & 0x3F;
fill = 64 - left;
ctx->total[0] &= 0xFFFFFFFF;
if( ctx->total[0] < (unsigned long) ilen )
- ctx->total[1]++;
+ ctx->total[1]++;
if( left && ilen >= fill )
{
- memcpy( (void *) (ctx->buffer + left),
- (void *) input, fill );
- sha1_process( ctx, ctx->buffer );
- input += fill;
- ilen -= fill;
- left = 0;
+ memcpy( (void *) (ctx->buffer + left),
+ (void *) input, fill );
+ sha1_process( ctx, ctx->buffer );
+ input += fill;
+ ilen -= fill;
+ left = 0;
}
while( ilen >= 64 )
{
- sha1_process( ctx, input );
- input += 64;
- ilen -= 64;
+ sha1_process( ctx, input );
+ input += 64;
+ ilen -= 64;
}
if( ilen > 0 )
{
- memcpy( (void *) (ctx->buffer + left),
- (void *) input, ilen );
+ memcpy( (void *) (ctx->buffer + left),
+ (void *) input, ilen );
}
}
unsigned char msglen[8];
high = ( ctx->total[0] >> 29 )
- | ( ctx->total[1] << 3 );
+ | ( ctx->total[1] << 3 );
low = ( ctx->total[0] << 3 );
PUT_UINT32_BE( high, msglen, 0 );
_vsnprintf(buffer, sizeof (buffer) - 1, format, parms );
va_end (parms);
if (nomore) {
- write_log(buffer);
+ write_log (buffer);
return;
}
gui_message (buffer);
#ifdef CPUEMU_12
#if 0
if (cycle_line[hpos])
- write_log("hpos=%d, old=%d, new=%d\n", hpos, cycle_line[hpos], type);
+ write_log ("hpos=%d, old=%d, new=%d\n", hpos, cycle_line[hpos], type);
if ((type == CYCLE_CPU || type == CYCLE_COPPER) && (hpos & 1))
- write_log("odd %d cycle %d\n", hpos);
+ write_log ("odd %d cycle %d\n", hpos);
if (!(hpos & 1) && (type == CYCLE_SPRITE || type == CYCLE_REFRESH || type == CYCLE_MISC))
- write_log("even %d cycle %d\n", type, hpos);
+ write_log ("even %d cycle %d\n", type, hpos);
#endif
cycle_line[hpos] = type;
#endif
static void hsyncdelay(void)
{
-#if 0
+#if 0
static int prevhpos;
while (current_hpos () == prevhpos)
- do_cycles(CYCLE_UNIT);
+ do_cycles(CYCLE_UNIT);
prevhpos = current_hpos();
#endif
}
write_log ("FMODE %d\n=======\n", fm);
for (res = 0; res <= 2; res++) {
for (planes = 0; planes <= 8; planes++) {
- write_log("%d: ",planes);
+ write_log ("%d: ",planes);
for (cycle = 0; cycle < 32; cycle++) {
v=cycle_diagram_table[fm][res][planes][cycle];
if (v==0) aa='-'; else if(v>0) aa='1'; else aa='X';
- write_log("%c",aa);
+ write_log ("%c",aa);
}
- write_log(" %d:%d\n",
+ write_log (" %d:%d\n",
cycle_diagram_free_cycles[fm][res][planes], cycle_diagram_total_cycles[fm][res][planes]);
}
- write_log("\n");
+ write_log ("\n");
}
}
fm=0;
delayoffset = 16;
else /* what about 40 and 56? */
delayoffset = 0;
- //write_log("%d:%d ", vpos, delayoffset);
+ //write_log ("%d:%d ", vpos, delayoffset);
#endif
}
if (thisline_decision.plfleft != -1 && thisline_decision.plflinelen == -1) {
if (fetch_state != fetch_not_started) {
- write_log("fetch_state=%d plfleft=%d,len=%d,vpos=%d,hpos=%d\n",
+ write_log ("fetch_state=%d plfleft=%d,len=%d,vpos=%d,hpos=%d\n",
fetch_state, thisline_decision.plfleft, thisline_decision.plflinelen,
vpos, hpos);
uae_abort ("fetch_state != fetch_not_started");
vblank_hz = VBLANK_HZ_NTSC;
sprite_vblank_endline = VBLANK_SPRITE_NTSC;
}
- maxvpos_max = maxvpos;
+ maxvpos_max = maxvpos;
}
if (beamcon0 & 0x80) {
if (vtotal >= MAXVPOS)
vp &= 1;
vp = vp | lof | csbit;
#if 0
- write_log ("vposr %x at %x\n", vp, m68k_getpc(®s));
+ write_log ("vposr %x at %x\n", vp, m68k_getpc (®s));
#endif
if (currprefs.cpu_model >= 68020)
hsyncdelay();
static void VPOSW (uae_u16 v)
{
#if 0
- write_log ("vposw %x at %x\n", v, m68k_getpc(®s));
+ write_log ("vposw %x at %x\n", v, m68k_getpc (®s));
#endif
if (lof != (v & 0x8000))
lof_changed = 1;
cop_state.vpos = vpos;
cop_state.hpos = current_hpos () & ~1;
cop_state.ip = num == 1 ? cop1lc : cop2lc;
-
+
while (pos < (maxvpos << 5)) {
if (oldpos > pos)
pos = oldpos;
if (!(cop_state.i1 & 1)) { // move
cop_state.i1 &= 0x1fe;
if (cop_state.i1 == 0x88) {
- cop_state.ip = cop1lc;
+ cop_state.ip = cop1lc;
continue;
}
if (cop_state.i1 == 0x8a) {
- cop_state.ip = cop2lc;
+ cop_state.ip = cop2lc;
continue;
}
if (test_copper_dangerous (cop_state.i1))
if (!(imask && (intena & 0x4000)))
return -1;
if (imask & (0x4000 | 0x2000)) // 13 14
- return 6;
+ return 6;
if (imask & (0x1000 | 0x0800)) // 11 12
- return 5;
+ return 5;
if (imask & (0x0400 | 0x0200 | 0x0100 | 0x0080)) // 7 8 9 10
- return 4;
+ return 4;
if (imask & (0x0040 | 0x0020 | 0x0010)) // 4 5 6
- return 3;
+ return 3;
if (imask & 0x0008) // 3
- return 2;
+ return 2;
if (imask & (0x0001 | 0x0002 | 0x0004)) // 0 1 2
- return 1;
+ return 1;
return -1;
}
setclr (&intena,v);
#if 0
if (v & 0x40)
- write_log("INTENA %04.4X (%04.4X) %p\n", intena, v, M68K_GETPC);
+ write_log ("INTENA %04.4X (%04.4X) %p\n", intena, v, M68K_GETPC);
#endif
if (v & 0x8000) {
if (!use_eventmode())
decide_line (hpos);
decide_fetch (hpos);
bplpt[num] = (bplpt[num] & 0xffff) | ((uae_u32)v << 16);
- //write_log("%d:%d:BPL%dPTH %08.8X\n", hpos, vpos, num, v);
+ //write_log ("%d:%d:BPL%dPTH %08.8X\n", hpos, vpos, num, v);
}
static void BPLxPTL (int hpos, uae_u16 v, int num)
{
if (is_bitplane_dma(hpos - 1) == num + 1 && num > 0)
delta = 2 << fetchmode;
bplpt[num] = (bplpt[num] & ~0xffff) | ((v + delta) & 0xfffe);
- //write_log("%d:%d:BPL%dPTL %08.8X\n", hpos, vpos, num, v);
+ //write_log ("%d:%d:BPL%dPTL %08.8X\n", hpos, vpos, num, v);
}
static void BPLCON0 (int hpos, uae_u16 v)
STATIC_INLINE void spr_arm (int num, int state)
{
- switch (state)
- {
- case 0:
+ switch (state) {
+ case 0:
nr_armed -= spr[num].armed;
spr[num].armed = 0;
break;
- default:
+ default:
nr_armed += 1 - spr[num].armed;
spr[num].armed = 1;
break;
#if SPRITE_DEBUG > 0
if (vpos >= SPRITE_DEBUG_MINY && vpos <= SPRITE_DEBUG_MAXY) {
write_log ("%d:%d:SPR%dCTL %04.4X P=%06.6X VSTRT=%d VSTOP=%d HSTRT=%d D=%d A=%d CP=%x PC=%x\n",
- vpos, hpos, num, v, s->pt, s->vstart, s->vstop, s->xpos, spr[num].dmastate, spr[num].armed, cop_state.ip, m68k_getpc());
+ vpos, hpos, num, v, s->pt, s->vstart, s->vstop, s->xpos, spr[num].dmastate, spr[num].armed, cop_state.ip, m68k_getpc ());
}
#endif
#if SPRITE_DEBUG > 0
if (vpos >= SPRITE_DEBUG_MINY && vpos <= SPRITE_DEBUG_MAXY) {
write_log ("%d:%d:SPR%dPOS %04.4X P=%06.6X VSTRT=%d VSTOP=%d HSTRT=%d D=%d A=%d CP=%x PC=%x\n",
- vpos, hpos, num, v, s->pt, s->vstart, s->vstop, s->xpos, spr[num].dmastate, spr[num].armed, cop_state.ip, m68k_getpc());
+ vpos, hpos, num, v, s->pt, s->vstart, s->vstop, s->xpos, spr[num].dmastate, spr[num].armed, cop_state.ip, m68k_getpc ());
}
#endif
}
#if SPRITE_DEBUG > 1
if (vpos >= SPRITE_DEBUG_MINY && vpos <= SPRITE_DEBUG_MAXY) {
write_log ("%d:%d:SPR%dDATA %04.4X P=%06.6X D=%d A=%d PC=%x\n",
- vpos, hpos, num, v, spr[num].pt, spr[num].dmastate, spr[num].armed, m68k_getpc());
+ vpos, hpos, num, v, spr[num].pt, spr[num].dmastate, spr[num].armed, m68k_getpc ());
}
#endif
}
#if SPRITE_DEBUG > 1
if (vpos >= SPRITE_DEBUG_MINY && vpos <= SPRITE_DEBUG_MAXY) {
write_log ("%d:%d:SPR%dDATB %04.4X P=%06.6X D=%d A=%d PC=%x\n",
- vpos, hpos, num, v, spr[num].pt, spr[num].dmastate, spr[num].armed, m68k_getpc());
+ vpos, hpos, num, v, spr[num].pt, spr[num].dmastate, spr[num].armed, m68k_getpc ());
}
#endif
}
static void dump_copper (char *error, int until_hpos)
{
- write_log("%s: vpos=%d until_hpos=%d\n",
+ write_log ("%s: vpos=%d until_hpos=%d\n",
error, vpos, until_hpos);
- write_log("cvcmp=%d chcmp=%d chpos=%d cvpos=%d ci1=%04.4X ci2=%04.4X\n",
+ write_log ("cvcmp=%d chcmp=%d chpos=%d cvpos=%d ci1=%04.4X ci2=%04.4X\n",
cop_state.vcmp,cop_state.hcmp,cop_state.hpos,cop_state.vpos,cop_state.saved_i1,cop_state.saved_i2);
- write_log("cstate=%d ip=%x SPCFLAGS=%x\n",
+ write_log ("cstate=%d ip=%x SPCFLAGS=%x\n",
cop_state.state, cop_state.ip, regs.spcflags);
}
if (nocustom())
return;
-
+
if (cop_state.state == COP_wait && vp < cop_state.vcmp) {
dump_copper ("error2", until_hpos);
copper_enabled_thisline = 0;
uae_u16 data = last_custom_value;
if (dma) {
data = last_custom_value = chipmem_agnus_wget (s->pt);
- alloc_cycle(hpos, CYCLE_SPRITE);
+ alloc_cycle(hpos, CYCLE_SPRITE);
}
s->pt += 2;
return data;
#if SPRITE_DEBUG > 3
if (vpos >= SPRITE_DEBUG_MINY && vpos <= SPRITE_DEBUG_MAXY)
- write_log("%d:%d:slot%d:%d\n", vpos, hpos, num, cycle);
+ write_log ("%d:%d:slot%d:%d\n", vpos, hpos, num, cycle);
#endif
if (vpos == s->vstart) {
#if SPRITE_DEBUG > 0
curr_time = start = read_processor_time();
if (!isvsync()) {
while (rpt_vsync () < 0);
- curr_time = read_processor_time ();
+ curr_time = read_processor_time ();
}
vsyncmintime = curr_time + vsynctime;
idletime += read_processor_time() - start;
CIA_vsync_handler ();
#if 0
if (input_recording > 0) {
- inprec_rstart(INPREC_CIAVSYNC);
- inprec_ru32(ciavsync_counter);
- inprec_rend();
+ inprec_rstart(INPREC_CIAVSYNC);
+ inprec_ru32(ciavsync_counter);
+ inprec_rend();
} else if (input_recording < 0) {
- uae_u32 v = -1;
- while (inprec_pstart(INPREC_CIAVSYNC)) {
+ uae_u32 v = -1;
+ while (inprec_pstart(INPREC_CIAVSYNC)) {
v = inprec_pu32();
inprec_pend();
}
if (v != ciavsync_counter)
- write_log("INPREC: ciavsync sync error %d <> %d\n", v, ciavsync_counter);
+ write_log ("INPREC: ciavsync sync error %d <> %d\n", v, ciavsync_counter);
}
#endif
ciavsync_counter++;
if (!nocustom()) {
sync_copper_with_cpu (maxhpos, 0);
- finish_decisions ();
+ finish_decisions ();
if (thisline_decision.plfleft != -1) {
if (currprefs.collision_level > 1)
do_sprite_collisions ();
/* reset light pen latch */
if (vpos == sprite_vblank_endline)
lightpen_triggered = 0;
- if (lightpen_cx > 0 && (bplcon0 & 8) && !lightpen_triggered && lightpen_cy == vpos) {
+ if (lightpen_cx > 0 && (bplcon0 & 8) && !lightpen_triggered && lightpen_cy == vpos) {
vpos_lpen = vpos;
hpos_lpen = lightpen_cx;
lightpen_triggered = 1;
#endif
#ifdef CPUEMU_12
if (currprefs.cpu_cycle_exact || currprefs.blitter_cycle_exact) {
- decide_blitter (hpos);
- memset (cycle_line, 0, sizeof cycle_line);
+ decide_blitter (hpos);
+ memset (cycle_line, 0, sizeof cycle_line);
alloc_cycle(1, CYCLE_REFRESH);
alloc_cycle(3, CYCLE_REFRESH);
alloc_cycle(5, CYCLE_REFRESH);
last_custom_value = 0xffff;
if (currprefs.produce_sound)
- audio_hsync (1);
+ audio_hsync (1);
if (!nocustom()) {
if (!currprefs.blitter_cycle_exact && bltstate != BLT_done && dmaen (DMA_BITPLANE) && diwstate == DIW_waiting_stop)
vsync_handler ();
#if 0
if (input_recording > 0) {
- inprec_rstart(INPREC_VSYNC);
- inprec_ru32(vsync_counter);
- inprec_rend();
+ inprec_rstart (INPREC_VSYNC);
+ inprec_ru32 (vsync_counter);
+ inprec_rend ();
} else if (input_recording < 0) {
uae_u32 v = -1;
while (inprec_pstart(INPREC_VSYNC)) {
inprec_pend();
}
if (v != vsync_counter)
- write_log("INPREC: vsync sync error %d <> %d\n", v, vsync_counter);
+ write_log ("INPREC: vsync sync error %d <> %d\n", v, vsync_counter);
}
#endif
vsync_counter++;
if (currprefs.cs_ciaatod == 0)
- CIA_vsync_prehandler();
+ CIA_vsync_prehandler ();
}
DISK_hsync (maxhpos);
if (currprefs.m68k_speed == -1) {
static int count = 0;
count++;
- if (trigger_frh(count)) {
- frh_handler();
+ if (trigger_frh (count)) {
+ frh_handler ();
}
- is_lastline = trigger_frh(count+1) && ! rpt_did_reset;
+ is_lastline = trigger_frh (count + 1) && ! rpt_did_reset;
} else {
is_lastline=0;
}
#endif
if (!nocustom()) {
- int lineno = vpos;
+ int lineno = vpos;
if (bplcon0 & 4)
notice_interlace_seen ();
- nextline_how = nln_normal;
- if (currprefs.gfx_linedbl) {
+ nextline_how = nln_normal;
+ if (currprefs.gfx_linedbl) {
lineno *= 2;
nextline_how = currprefs.gfx_linedbl == 1 ? nln_doubled : nln_nblack;
if (bplcon0 & 4) {
- if (!lof) {
+ if (!lof) {
lineno++;
nextline_how = nln_lower;
} else {
}
{
- extern void bsdsock_fake_int_handler(void);
+ extern void bsdsock_fake_int_handler(void);
extern int bsd_int_requested;
if (bsd_int_requested)
bsdsock_fake_int_handler();
do_sprites (0);
#endif
- while (input_recording < 0 && inprec_pstart(INPREC_KEY)) {
- record_key_direct (inprec_pu8());
- inprec_pend();
+ while (input_recording < 0 && inprec_pstart (INPREC_KEY)) {
+ record_key_direct (inprec_pu8 ());
+ inprec_pend ();
}
- while (input_recording < 0 && inprec_pstart(INPREC_DISKREMOVE)) {
- disk_eject (inprec_pu8());
- inprec_pend();
+ while (input_recording < 0 && inprec_pstart (INPREC_DISKREMOVE)) {
+ disk_eject (inprec_pu8 ());
+ inprec_pend ();
}
- while (input_recording < 0 && inprec_pstart(INPREC_DISKINSERT)) {
- int drv = inprec_pu8();
- inprec_pstr (currprefs.df[drv]);
- strcpy (changed_prefs.df[drv], currprefs.df[drv]);
- disk_insert_force (drv, currprefs.df[drv]);
- inprec_pend();
+ while (input_recording < 0 && inprec_pstart (INPREC_DISKINSERT)) {
+ int drv = inprec_pu8 ();
+ inprec_pstr (currprefs.df[drv]);
+ strcpy (changed_prefs.df[drv], currprefs.df[drv]);
+ disk_insert_force (drv, currprefs.df[drv]);
+ inprec_pend ();
}
inputdevice_hsync ();
- gayle_hsync();
- scsi_hsync();
+ gayle_hsync ();
+ scsi_hsync ();
hsync_counter++;
//copper_check (2);
{
int i, recheck;
evt mintime;
- evt ct = get_cycles();
+ evt ct = get_cycles ();
static int recursive;
if (recursive)
if (eventtab2[i].active) {
if (eventtab2[i].evtime == ct) {
eventtab2[i].active = 0;
- eventtab2[i].handler(eventtab2[i].data);
+ eventtab2[i].handler (eventtab2[i].data);
if (eventtab2[i].active)
recheck = 1;
} else {
recursive--;
}
-STATIC_INLINE void event2_newevent_x(int no, evt t, uae_u32 data, evfunc2 func)
+STATIC_INLINE void event2_newevent_x (int no, evt t, uae_u32 data, evfunc2 func)
{
- evt et = t * CYCLE_UNIT + get_cycles();
+ evt et = t * CYCLE_UNIT + get_cycles ();
if (no < 0) {
for (no = ev2_misc; no < ev2_max; no++) {
if (!eventtab2[no].active)
break;
if (eventtab2[no].evtime == et && eventtab2[no].handler == func) {
- eventtab2[no].handler(eventtab2[no].data);
+ eventtab2[no].handler (eventtab2[no].data);
break;
}
}
if (no == ev2_max) {
- write_log("out of event2's! PC=%x\n", M68K_GETPC);
+ write_log ("out of event2's! PC=%x\n", M68K_GETPC);
return;
}
}
eventtab2[no].evtime = et;
eventtab2[no].handler = func;
eventtab2[no].data = data;
- MISC_handler();
+ MISC_handler ();
}
-void event2_newevent(int no, evt t)
+void event2_newevent (int no, evt t)
{
- event2_newevent_x(no, t, 0, eventtab2[no].handler);
+ event2_newevent_x (no, t, 0, eventtab2[no].handler);
}
-void event2_newevent2(evt t, uae_u32 data, evfunc2 func)
+void event2_newevent2 (evt t, uae_u32 data, evfunc2 func)
{
- event2_newevent_x(-1, t, data, func);
+ event2_newevent_x (-1, t, data, func);
}
-void event2_remevent(int no)
+void event2_remevent (int no)
{
eventtab2[no].active = 0;
}
int i;
int zero = 0;
- write_log ("Reset at %08.8X\n", m68k_getpc(®s));
+ write_log ("Reset at %08.8X\n", m68k_getpc (®s));
memory_map_dump();
hsync_counter = 0;
delta_color_change = 0;
if (!sprite_entries[0]) {
- max_sprite_entry = DEFAULT_MAX_SPRITE_ENTRY;
- max_color_change = DEFAULT_MAX_COLOR_CHANGE;
+ max_sprite_entry = DEFAULT_MAX_SPRITE_ENTRY;
+ max_color_change = DEFAULT_MAX_COLOR_CHANGE;
for (num = 0; num < 2; num++) {
sprite_entries[num] = xmalloc (max_sprite_entry * sizeof (struct sprite_entry));
memset (sprite_entries[num], 0, max_sprite_entry * sizeof (struct sprite_entry));
memset (color_changes[num], 0, max_color_change * sizeof (struct color_change));
} else
- return 0;
+ return 0;
}
}
#endif
addr &= 0xfff;
#ifdef CUSTOM_DEBUG
- write_log ("%d:%d:wget: %04.4X=%04.4X pc=%p\n", current_hpos(), vpos, addr, addr & 0x1fe, m68k_getpc());
+ write_log ("%d:%d:wget: %04.4X=%04.4X pc=%p\n", current_hpos(), vpos, addr, addr & 0x1fe, m68k_getpc ());
#endif
switch (addr & 0x1fe) {
case 0x002: v = DMACONR (); break;
special_mem |= S_WRITE;
#endif
#ifdef CUSTOM_DEBUG
- write_log ("%d:%d:wput: %04.4X %04.4X pc=%p\n", hpos, vpos, addr & 0x01fe, value & 0xffff, m68k_getpc());
+ write_log ("%d:%d:wput: %04.4X %04.4X pc=%p\n", hpos, vpos, addr & 0x01fe, value & 0xffff, m68k_getpc ());
#endif
sync_copper_with_cpu (hpos, 1);
if (addr & 1) {
_vsnprintf( buffer, sizeof (buffer) -1, format, parms );
va_end (parms);
if (nomore) {
- write_log(buffer);
+ write_log (buffer);
return;
}
gui_message (buffer);
STATIC_INLINE void sync_copper (int hpos);
/* Events */
-
+
unsigned long int event_cycles, nextevent, is_lastline, currcycle;
long cycles_to_next_event;
long max_cycles_to_next_event;
uae_u16 adkcon; /* used by audio code */
static uae_u32 cop1lc,cop2lc,copcon;
-
+
int maxhpos = MAXHPOS_PAL;
int maxvpos = MAXVPOS_PAL;
int minfirstline = VBLANK_ENDLINE_PAL;
}
} else {
#endif
- for (i = 0; i < 32; i++) {
+ for (i = 0; i < 32; i++) {
int v = color_reg_get (colentry, i);
if (v < 0 || v > 4095)
continue;
/* The corresponding values, by fetchmode and display resolution. */
static int fetchunits[] = { 8,8,8,0, 16,8,8,0, 32,16,8,0 };
static int fetchstarts[] = { 3,2,1,0, 4,3,2,0, 5,4,3,0 };
-static int fm_maxplanes[] = { 3,2,1,0, 3,3,2,0, 3,3,3,0 };
+static int fm_maxplanes[] = { 3,2,1,0, 3,3,2,0, 3,3,3,0 };
static uae_u8 cycle_diagram_table[3][3][9][32];
static uae_u8 cycle_diagram_free_cycles[3][3][9];
write_log ("FMODE %d\n=======\n", fm);
for (res = 0; res <= 2; res++) {
for (planes = 0; planes <= 8; planes++) {
- write_log("%d: ",planes);
+ write_log ("%d: ",planes);
for (cycle = 0; cycle < 32; cycle++) {
v=cycle_diagram_table[fm][res][planes][cycle];
if (v==0) aa='-'; else if(v>0) aa='1'; else aa='X';
- write_log("%c",aa);
+ write_log ("%c",aa);
}
- write_log(" %d:%d\n",
+ write_log (" %d:%d\n",
cycle_diagram_free_cycles[fm][res][planes], cycle_diagram_total_cycles[fm][res][planes]);
}
- write_log("\n");
+ write_log ("\n");
}
}
fm=0;
cycle_sequence = &cycle_sequences[(max_planes - 1) * 8];
max_planes = 1 << max_planes;
for (planes = 0; planes <= 8; planes++) {
- freecycles = 0;
+ freecycles = 0;
for (cycle = 0; cycle < 32; cycle++)
cycle_diagram_table[fm][res][planes][cycle] = -1;
if (planes <= max_planes) {
static int toscr_res, toscr_res_first, toscr_nr_planes, fetchwidth;
static int toscr_delay1x, toscr_delay2x, toscr_delay1, toscr_delay2;
-/* The number of bits left from the last fetched words.
+/* The number of bits left from the last fetched words.
This is an optimization - conceptually, we have to make sure the result is
the same as if toscr is called in each clock cycle. However, to speed this
- up, we accumulate display data; this variable keeps track of how much.
+ up, we accumulate display data; this variable keeps track of how much.
Thus, once we do call toscr_nbits (which happens at least every 16 bits),
we can do more work at once. */
static int toscr_nbits;
#endif
}
if (passed_plfstop == 2 && fetch_cycle >= (fetch_cycle & ~fetchunit_mask) + fetchunit - fetchstart) {
- int mod;
- if (fmode & 0x4000) {
- if (((diwstrt >> 8) ^ vpos) & 1)
- mod = bpl2mod;
- else
- mod = bpl1mod;
- } else if (nr & 1)
- mod = bpl2mod;
- else
- mod = bpl1mod;
- bplpt[nr] += mod;
+ int mod;
+ if (fmode & 0x4000) {
+ if (((diwstrt >> 8) ^ vpos) & 1)
+ mod = bpl2mod;
+ else
+ mod = bpl1mod;
+ } else if (nr & 1)
+ mod = bpl2mod;
+ else
+ mod = bpl1mod;
+ bplpt[nr] += mod;
}
if (nr == 0)
fetch_state = fetch_was_plane0;
passed_plfstop = 1;
if (pos <= ddfstop_to_test && pos + count > ddf2)
passed_plfstop = 2;
- if (pos <= ddf2 && pos + count >= ddf2 + fm_maxplane)
- add_modulos ();
+ if (pos <= ddf2 && pos + count >= ddf2 + fm_maxplane)
+ add_modulos ();
pos += count;
fetch_cycle += count;
}
if (hpos > plfstop)
return;
if (ddfstate != DIW_waiting_start)
- passed_plfstop = 1;
+ passed_plfstop = 1;
start_bpl_dma (hpos, hpos);
}
if (dmaen (DMA_BITPLANE) && diwstate == DIW_waiting_stop) {
int ok = 0;
- /* Test if we passed the start of the DDF window. */
+ /* Test if we passed the start of the DDF window. */
if (last_decide_line_hpos < plfstrt && hpos >= plfstrt) {
ok = 1;
/* hack warning.. Writing to DDFSTRT when DMA should start must be ignored
if (hpos - 2 == ddfstrt_old_hpos && ddfstrt_old_vpos == vpos)
ok = 0;
if (ok) {
- start_bpl_dma (hpos, plfstrt);
+ start_bpl_dma (hpos, plfstrt);
estimate_last_fetch_cycle (plfstrt);
last_decide_line_hpos = hpos;
#ifndef CUSTOM_SIMPLE
if (bplcon0 & 0x400)
match = 1;
for (l = k; match && l < planes; l += 2) {
- int t = 0;
+ int t = 0;
if (l < thisline_decision.nr_planes) {
- uae_u32 *ldata = (uae_u32 *)(line_data[next_lineno] + 2 * l * MAX_WORDS_PER_LINE);
- uae_u32 word = ldata[offs >> 5];
- t = (word >> (31 - (offs & 31))) & 1;
+ uae_u32 *ldata = (uae_u32 *)(line_data[next_lineno] + 2 * l * MAX_WORDS_PER_LINE);
+ uae_u32 word = ldata[offs >> 5];
+ t = (word >> (31 - (offs & 31))) & 1;
#if 0 /* debug: draw collision mask */
if (1) {
int m;
for (m = 0; m < 5; m++) {
- ldata = (uae_u32 *)(line_data[next_lineno] + 2 * m * MAX_WORDS_PER_LINE);
+ ldata = (uae_u32 *)(line_data[next_lineno] + 2 * m * MAX_WORDS_PER_LINE);
ldata[(offs >> 5) + 1] |= 15 << (31 - (offs & 31));
}
}
#endif
}
if (clxcon_bpl_enable & (1 << l)) {
- if (t != ((clxcon_bpl_match >> l) & 1))
+ if (t != ((clxcon_bpl_match >> l) & 1))
match = 0;
}
}
// if (ctl & 0x80) {
uae_u32 state = 0x01010101 << (num & ~1);
uae_u32 *stbuf = spixstate.words + (word_offs >> 2);
- uae_u8 *stb1 = spixstate.bytes + word_offs;
+ uae_u8 *stb1 = spixstate.bytes + word_offs;
for (i = 0; i < width; i += 8) {
stb1[0] |= state;
stb1[1] |= state;
{
int nrs[MAX_SPRITES], posns[MAX_SPRITES];
int count, i;
- /* apparantly writes to custom registers happen in the 3/4th of cycle
+ /* apparantly writes to custom registers happen in the 3/4th of cycle
* and sprite xpos comparator sees it immediately */
int point = hpos * 2 - 4;
int width = sprite_width;
if (dip->nr_sprites != dip_old->nr_sprites)
return 1;
-
+
if (dip->nr_sprites == 0)
return 0;
{
if (dip->nr_color_changes != dip_old->nr_color_changes)
return 1;
-
+
if (dip->nr_color_changes == 0)
return 0;
if (memcmp (curr_color_changes + dip->first_color_change,
if (thisline_decision.plfleft != -1 && thisline_decision.plflinelen == -1) {
if (fetch_state != fetch_not_started) {
- write_log("fetch_state=%d plfleft=%d\n",fetch_state,thisline_decision.plfleft);
+ write_log ("fetch_state=%d plfleft=%d\n",fetch_state,thisline_decision.plfleft);
uae_abort ("fetch_state != fetch_not_started");
}
thisline_decision.plfright = thisline_decision.plfleft;
}
}
if (!fake_vblank_hz)
- fake_vblank_hz = vblank_hz;
+ fake_vblank_hz = vblank_hz;
if (turbo_emulation)
vsynctime = vsynctime_orig = 1;
else
int isntsc;
if ((currprefs.chipset_refreshrate == 50 && !currprefs.ntscmode) ||
- (currprefs.chipset_refreshrate == 60 && currprefs.ntscmode)) {
- currprefs.chipset_refreshrate = 0;
- changed_prefs.chipset_refreshrate = 0;
+ (currprefs.chipset_refreshrate == 60 && currprefs.ntscmode)) {
+ currprefs.chipset_refreshrate = 0;
+ changed_prefs.chipset_refreshrate = 0;
}
if (currprefs.gfx_vsync && currprefs.gfx_afullscreen) {
- currprefs.chipset_refreshrate = abs (currprefs.gfx_refreshrate);
- changed_prefs.chipset_refreshrate = abs (currprefs.gfx_refreshrate);
+ currprefs.chipset_refreshrate = abs (currprefs.gfx_refreshrate);
+ changed_prefs.chipset_refreshrate = abs (currprefs.gfx_refreshrate);
}
beamcon0 = new_beamcon0;
static void VPOSW (uae_u16 v)
{
#if 0
- write_log ("vposw %x at %x\n", v, m68k_getpc());
+ write_log ("vposw %x at %x\n", v, m68k_getpc ());
#endif
if (lof != (v & 0x8000))
lof_changed = 1;
if (changed & (DMA_MASTER | 0x0f))
audio_hsync (0);
if (changed & (DMA_MASTER | DMA_BITPLANE)) {
- ddf_change = vpos;
+ ddf_change = vpos;
if (dmaen (DMA_BITPLANE))
maybe_start_bpl_dma (hpos);
}
-
+
events_schedule();
}
int i;
if (!(imask && (intena & 0x4000))) {
- unset_special (SPCFLAG_INT);
+ unset_special (SPCFLAG_INT);
return -1;
}
for (i = 14; i >= 0; i--) {
setclr (&intena,v);
#if 0
if (v & 0x40)
- write_log("INTENA %04.4X (%04.4X) %p\n", intena, v, m68k_getpc());
+ write_log ("INTENA %04.4X (%04.4X) %p\n", intena, v, m68k_getpc ());
#endif
if (v & 0x8000)
doint ();
rethink_cias ();
#if 0
if (0 || (v & (0x8010)) == 0x8010)
- write_log("%d INTREQ %04.4X (%04.4X) %x %x %x\n",
- vpos, intreq, v, m68k_getpc(), cop1lc, cop2lc);
+ write_log ("%d INTREQ %04.4X (%04.4X) %x %x %x\n",
+ vpos, intreq, v, m68k_getpc (), cop1lc, cop2lc);
#endif
}
if (!(currprefs.chipset_mask & CSMASK_ECS_DENISE))
v &= 0x20;
if (v != new_beamcon0) {
- new_beamcon0 = v;
+ new_beamcon0 = v;
if (v & ~0x20)
- write_log ("warning: %04.4X written to BEAMCON0\n", v);
+ write_log ("warning: %04.4X written to BEAMCON0\n", v);
}
}
}
decide_line (hpos);
decide_fetch (hpos);
bplpt[num] = (bplpt[num] & 0xffff) | ((uae_u32)v << 16);
- //write_log("%d:%d:BPL%dPTH %08.8X\n", hpos, vpos, num, v);
+ //write_log ("%d:%d:BPL%dPTH %08.8X\n", hpos, vpos, num, v);
}
static void BPLxPTL (int hpos, uae_u16 v, int num)
{
if (is_bitplane_dma(hpos - 1) == num + 1)
delta = 2 << fetchmode;
bplpt[num] = (bplpt[num] & ~0xffff) | ((v + delta) & 0xfffe);
- //write_log("%d:%d:BPL%dPTL %08.8X\n", hpos, vpos, num, v);
+ //write_log ("%d:%d:BPL%dPTL %08.8X\n", hpos, vpos, num, v);
}
static void BPLCON0 (int hpos, uae_u16 v)
switch (state)
{
case 0:
- nr_armed -= spr[num].armed;
+ nr_armed -= spr[num].armed;
spr[num].armed = 0;
break;
default:
- nr_armed += 1 - spr[num].armed;
+ nr_armed += 1 - spr[num].armed;
spr[num].armed = 1;
break;
}
STATIC_INLINE void sprstartstop (struct sprite *s)
{
if (vpos == s->vstart)
- s->dmastate = 1;
+ s->dmastate = 1;
if (vpos == s->vstop)
- s->dmastate = 0;
+ s->dmastate = 0;
}
STATIC_INLINE void SPRxCTLPOS (int num)
#if SPRITE_DEBUG > 0
if (vpos >= SPRITE_DEBUG_MINY && vpos <= SPRITE_DEBUG_MAXY) {
write_log ("%d:%d:SPR%dCTL %04.4X P=%06.6X VSTRT=%d VSTOP=%d HSTRT=%d D=%d A=%d CP=%x PC=%x\n",
- vpos, hpos, num, v, s->pt, s->vstart, s->vstop, s->xpos, spr[num].dmastate, spr[num].armed, cop_state.ip, m68k_getpc());
+ vpos, hpos, num, v, s->pt, s->vstart, s->vstop, s->xpos, spr[num].dmastate, spr[num].armed, cop_state.ip, m68k_getpc ());
}
#endif
SPRxCTLPOS (num);
#if SPRITE_DEBUG > 0
if (vpos >= SPRITE_DEBUG_MINY && vpos <= SPRITE_DEBUG_MAXY) {
- write_log ("%d:%d:SPR%dPOS %04.4X P=%06.6X VSTRT=%d VSTOP=%d HSTRT=%d D=%d A=%d CP=%x PC=%x\n",
+ write_log ("%d:%d:SPR%dPOS %04.4X P=%06.6X VSTRT=%d VSTOP=%d HSTRT=%d D=%d A=%d CP=%x PC=%x\n",
vpos, hpos, num, v, s->pt, s->vstart, s->vstop, s->xpos, spr[num].dmastate, spr[num].armed, cop_state.ip, m68k_getpc());
}
#endif
spr_arm (num, 1);
#if SPRITE_DEBUG > 1
if (vpos >= SPRITE_DEBUG_MINY && vpos <= SPRITE_DEBUG_MAXY) {
- write_log ("%d:%d:SPR%dDATA %04.4X P=%06.6X D=%d A=%d PC=%x\n",
+ write_log ("%d:%d:SPR%dDATA %04.4X P=%06.6X D=%d A=%d PC=%x\n",
vpos, hpos, num, v, spr[num].pt, spr[num].dmastate, spr[num].armed, m68k_getpc());
}
#endif
#endif
#if SPRITE_DEBUG > 1
if (vpos >= SPRITE_DEBUG_MINY && vpos <= SPRITE_DEBUG_MAXY) {
- write_log ("%d:%d:SPR%dDATB %04.4X P=%06.6X D=%d A=%d PC=%x\n",
+ write_log ("%d:%d:SPR%dDATB %04.4X P=%06.6X D=%d A=%d PC=%x\n",
vpos, hpos, num, v, spr[num].pt, spr[num].dmastate, spr[num].armed, m68k_getpc());
}
#endif
spr[num].pt |= (uae_u32)v << 16;
#if SPRITE_DEBUG > 0
if (vpos >= SPRITE_DEBUG_MINY && vpos <= SPRITE_DEBUG_MAXY) {
- write_log ("%d:%d:SPR%dPTH %06.6X\n", vpos, hpos, num, spr[num].pt);
+ write_log ("%d:%d:SPR%dPTH %06.6X\n", vpos, hpos, num, spr[num].pt);
}
#endif
}
clxcon = v;
clxcon_bpl_enable = (v >> 6) & 63;
clxcon_bpl_match = v & 63;
- //write_log("CLXCON: %04.4X PC=%x\n", v, m68k_getpc());
+ //write_log ("CLXCON: %04.4X PC=%x\n", v, m68k_getpc ());
}
static void CLXCON2 (uae_u16 v)
clxcon2 = v;
clxcon_bpl_enable |= v & (0x40|0x80);
clxcon_bpl_match |= (v & (0x01|0x02)) << 6;
- //write_log("CLXCON2: %04.4X\n", v);
+ //write_log ("CLXCON2: %04.4X\n", v);
}
static uae_u16 CLXDAT (void)
{
uae_u16 v = clxdat | 0x8000;
- //write_log("%d:CLXDAT %04.4X PC=%x\n", vpos, v, m68k_getpc());
+ //write_log ("%d:CLXDAT %04.4X PC=%x\n", vpos, v, m68k_getpc ());
clxdat = 0;
return v;
}
state = COP_read1;
c_hpos += 2;
}
- ip += 2;
+ ip += 2;
}
while (c_hpos + 1 < maxhpos) {
static int test_copper_dangerous (unsigned int address)
{
if ((address & 0x1fe) < (copcon & 2 ? ((currprefs.chipset_mask & CSMASK_AGA) ? 0 : 0x40u) : 0x80u)) {
- cop_state.state = COP_stop;
+ cop_state.state = COP_stop;
copper_enabled_thisline = 0;
unset_special (SPCFLAG_COPPER);
return 1;
static void dump_copper (char *error, int until_hpos)
{
write_log("%s: vpos=%d until_hpos=%d\n",
- error, vpos, until_hpos);
+ error, vpos, until_hpos);
write_log("cvcmp=%d chcmp=%d chpos=%d cvpos=%d ci1=%04.4X ci2=%04.4X\n",
cop_state.vcmp,cop_state.hcmp,cop_state.hpos,cop_state.vpos,cop_state.saved_i1,cop_state.saved_i2);
write_log("cstate=%d ip=%08.8X ev_copper=%d\n",
static void update_copper (int until_hpos)
{
- int vp = vpos & (((cop_state.saved_i2 >> 8) & 0x7F) | 0x80);
+ int vp = vpos & (((cop_state.saved_i2 >> 8) & 0x7F) | 0x80);
int c_hpos = cop_state.hpos;
if (eventtab[ev_copper].active) {
return;
uae_abort ("update_copper2");
}
-
+
until_hpos &= ~1;
if (until_hpos > (maxhpos & ~1))
/* So we know about the fetch state. */
decide_line (c_hpos);
-
+
switch (cop_state.state) {
case COP_read1_in2:
cop_state.state = COP_read1;
case COP_skip_in4:
cop_state.state = COP_skip_in2;
break;
- case COP_strobe_delay:
+ case COP_strobe_delay:
cop_state.state = COP_read1_in2;
break;
c_hpos += 2;
#if 0
- if (copper_cant_read (old_hpos))
+ if (copper_cant_read (old_hpos))
continue;
#endif
- if (cop_state.strobe) {
+ if (cop_state.strobe) {
if (cop_state.strobe > 0)
cop_state.ip = cop_state.strobe == 1 ? cop1lc : cop2lc;
cop_state.strobe = 0;
cop_state.state = COP_wait_in4;
} else {
unsigned int reg = cop_state.i1 & 0x1FE;
- cop_state.state = isagnus[reg >> 1] ? COP_read1_wr_in2 : COP_read1_wr_in4;
+ cop_state.state = isagnus[reg >> 1] ? COP_read1_wr_in2 : COP_read1_wr_in4;
}
break;
cop_state.hcmp = (cop_state.saved_i1 & cop_state.saved_i2 & 0xFE);
vp = vpos & (((cop_state.saved_i2 >> 8) & 0x7F) | 0x80);
-
+
if (cop_state.saved_i1 == 0xFFFF && cop_state.saved_i2 == 0xFFFE) {
cop_state.state = COP_stop;
copper_enabled_thisline = 0;
c_hpos = wait_finish;
} else
c_hpos = until_hpos;
- }
+ }
break;
}
{
uae_u16 data = last_custom_value;
if (dma) {
- data = last_custom_value = chipmem_agnus_wget (s->pt);
+ data = last_custom_value = chipmem_agnus_wget (s->pt);
#ifdef CPUEMU_6
cycle_line[hpos] |= CYCLE_SPRITE;
#endif
#if SPRITE_DEBUG > 3
if (vpos >= SPRITE_DEBUG_MINY && vpos <= SPRITE_DEBUG_MAXY)
- write_log("%d:%d:slot%d:%d\n", vpos, hpos, num, cycle);
+ write_log ("%d:%d:slot%d:%d\n", vpos, hpos, num, cycle);
#endif
if (vpos == s->vstart) {
#if SPRITE_DEBUG > 0
- if (!s->dmastate && vpos >= SPRITE_DEBUG_MINY && vpos <= SPRITE_DEBUG_MAXY)
+ if (!s->dmastate && vpos >= SPRITE_DEBUG_MINY && vpos <= SPRITE_DEBUG_MAXY)
write_log ("%d:%d:SPR%d START\n", vpos, hpos, num);
#endif
- s->dmastate = 1;
+ s->dmastate = 1;
}
if (vpos == s->vstop || vpos == sprite_vblank_endline) {
#if SPRITE_DEBUG > 0
- if (s->dmastate && vpos >= SPRITE_DEBUG_MINY && vpos <= SPRITE_DEBUG_MAXY)
+ if (s->dmastate && vpos >= SPRITE_DEBUG_MINY && vpos <= SPRITE_DEBUG_MAXY)
write_log ("%d:%d:SPR%d STOP\n", vpos, hpos, num);
#endif
- s->dmastate = 0;
+ s->dmastate = 0;
}
if (!dmaen (DMA_SPRITE))
return;
if (cycle && !s->dmacycle)
- return; /* Superfrog intro flashing bee fix */
+ return; /* Superfrog intro flashing bee fix */
dma = hpos < plfstrt || diwstate != DIW_waiting_stop || !dmaen (DMA_BITPLANE);
if (vpos == s->vstop || vpos == sprite_vblank_endline) {
s->dmastate = 0;
posctl = 1;
- if (dma) {
+ if (dma) {
data = sprite_fetch (s, dma, hpos, cycle, 0);
switch (sprite_width)
{
break;
}
} else {
- data = cycle == 0 ? sprpos[num] : sprctl[num];
+ data = cycle == 0 ? sprpos[num] : sprctl[num];
}
#if SPRITE_DEBUG > 1
- if (vpos >= SPRITE_DEBUG_MINY && vpos <= SPRITE_DEBUG_MAXY) {
+ if (vpos >= SPRITE_DEBUG_MINY && vpos <= SPRITE_DEBUG_MAXY) {
write_log ("%d:%d:dma:P=%06.6X ", vpos, hpos, s->pt);
}
#endif
//write_log ("%d:%d: %04.4X=%04.4X\n", vpos, hpos, 0x140 + cycle * 2 + num * 8, data);
- if (cycle == 0) {
+ if (cycle == 0) {
SPRxPOS_1 (data, num, hpos);
s->dmacycle = 1;
} else {
}
}
if (s->dmastate && !posctl) {
- uae_u16 data;
-
- data = sprite_fetch (s, dma, hpos, cycle, 1);
- /* Hack for X mouse auto-calibration */
- if (num == 0 && cycle == 0)
- mousehack_handle (sprctl[0], sprpos[0]);
+ uae_u16 data;
+
+ data = sprite_fetch (s, dma, hpos, cycle, 1);
+ /* Hack for X mouse auto-calibration */
+ if (num == 0 && cycle == 0)
+ mousehack_handle (sprctl[0], sprpos[0]);
#if SPRITE_DEBUG > 1
- if (vpos >= SPRITE_DEBUG_MINY && vpos <= SPRITE_DEBUG_MAXY) {
+ if (vpos >= SPRITE_DEBUG_MINY && vpos <= SPRITE_DEBUG_MAXY) {
write_log ("%d:%d:dma:P=%06.6X ", vpos, hpos, s->pt);
}
#endif
- if (cycle == 0) {
- SPRxDATA_1 (dma ? data : sprdata[num][0], num, hpos);
- s->dmacycle = 1;
- } else {
- SPRxDATB_1 (dma ? data : sprdatb[num][0], num, hpos);
- spr_arm (num, 1);
- }
+ if (cycle == 0) {
+ SPRxDATA_1 (dma ? data : sprdata[num][0], num, hpos);
+ s->dmacycle = 1;
+ } else {
+ SPRxDATB_1 (dma ? data : sprdatb[num][0], num, hpos);
+ spr_arm (num, 1);
+ }
#ifdef AGA
- switch (sprite_width)
- {
- case 64:
- {
+ switch (sprite_width)
+ {
+ case 64:
+ {
uae_u16 data32 = sprite_fetch (s, dma, hpos, cycle, 1);
- uae_u16 data641 = sprite_fetch (s, dma, hpos, cycle, 1);
- uae_u16 data642 = sprite_fetch (s, dma, hpos, cycle, 1);
+ uae_u16 data641 = sprite_fetch (s, dma, hpos, cycle, 1);
+ uae_u16 data642 = sprite_fetch (s, dma, hpos, cycle, 1);
if (dma) {
- if (cycle == 0) {
+ if (cycle == 0) {
sprdata[num][3] = data642;
sprdata[num][2] = data641;
sprdata[num][1] = data32;
- } else {
+ } else {
sprdatb[num][3] = data642;
sprdatb[num][2] = data641;
sprdatb[num][1] = data32;
}
}
}
- break;
- case 32:
- {
+ break;
+ case 32:
+ {
uae_u16 data32 = sprite_fetch (s, dma, hpos, cycle, 1);
if (dma) {
if (cycle == 0)
if (maxspr > SPR0_HPOS + MAX_SPRITES * 4)
maxspr = SPR0_HPOS + MAX_SPRITES * 4;
if (minspr < SPR0_HPOS)
- minspr = SPR0_HPOS;
+ minspr = SPR0_HPOS;
for (i = minspr; i < maxspr; i++) {
int cycle = -1;
int num = (i - SPR0_HPOS) / 4;
- switch ((i - SPR0_HPOS) & 3)
+ switch ((i - SPR0_HPOS) & 3)
{
case 0:
cycle = 0;
}
return v;
}
-
+
static void framewait (void)
{
frame_time_t curr_time;
int start;
for (;;) {
- double v = rpt_vsync () / (syncbase / 1000.0);
+ double v = rpt_vsync () / (syncbase / 1000.0);
if (v >= -4)
break;
- sleep_millis_busy (2);
+ sleep_millis_busy (2);
}
curr_time = start = read_processor_time();
if (!isvsync()) {
static void fpscounter (void)
{
int now, last;
-
+
now = read_processor_time ();
last = now - lastframetime;
lastframetime = now;
if (picasso_on)
picasso_handle_vsync ();
#endif
-
+
vsync_handle_redraw (lof, lof_changed);
if (quit_program > 0) {
/* prevent possible infinite loop at wait_cycles().. */
framecnt = 0;
- reset_decisions ();
+ reset_decisions ();
return;
}
ciahsync++;
if (ciahsync >= (currprefs.ntscmode ? MAXVPOS_NTSC : MAXVPOS_PAL) * MAXHPOS_PAL / maxhpos) { /* not so perfect.. */
- CIA_vsync_handler ();
+ CIA_vsync_handler ();
ciahsync = 0;
}
#ifdef CPUEMU_6
if (currprefs.cpu_cycle_exact || currprefs.blitter_cycle_exact) {
- decide_blitter (hpos);
+ decide_blitter (hpos);
memset (cycle_line, 0, MAXHPOS);
#if 1
{
next_lineno = lineno;
reset_decisions ();
}
-#ifdef FILESYS
+#ifdef FILESYS
if (uae_int_requested) {
set_uae_int_flag ();
INTREQ (0x8000 | 0x0008);
int i;
int zero = 0;
- write_log ("reset at %x\n", m68k_getpc());
+ write_log ("reset at %x\n", m68k_getpc ());
if (! savestate_state) {
currprefs.chipset_mask = changed_prefs.chipset_mask;
if ((currprefs.chipset_mask & CSMASK_AGA) == 0) {
}
#ifdef AGA
} else {
- for (i = 0; i < 256; i++) {
+ for (i = 0; i < 256; i++) {
current_colors.color_regs_aga[i] = 0;
current_colors.acolors[i] = CONVERT_RGB (zero);
}
#ifdef AGA
} else {
for(i = 0 ; i < 256 ; i++) {
- vv = current_colors.color_regs_aga[i];
+ vv = current_colors.color_regs_aga[i];
current_colors.color_regs_aga[i] = -1;
record_color_change (0, i, vv);
remembered_color_entry = -1;
#endif
addr &= 0xfff;
#ifdef CUSTOM_DEBUG
- write_log ("%d:%d:wget: %04.4X=%04.4X pc=%p\n", current_hpos(), vpos, addr, addr & 0x1fe, m68k_getpc());
+ write_log ("%d:%d:wget: %04.4X=%04.4X pc=%p\n", current_hpos(), vpos, addr, addr & 0x1fe, m68k_getpc ());
#endif
switch (addr & 0x1fe) {
case 0x002: v = DMACONR (); break;
default:
/* reading write-only register causes write with last value in bus */
- v = last_custom_value;
+ v = last_custom_value;
if (!noput) {
int r;
int hpos = current_hpos ();
- decide_line (hpos);
+ decide_line (hpos);
decide_fetch (hpos);
decide_blitter (hpos);
- v = last_custom_value;
+ v = last_custom_value;
r = custom_wput_1 (hpos, addr, v, 1);
}
return v;
if (addr & 1) {
/* think about move.w $dff005,d0.. (68020+ only) */
- addr &= ~1;
- v = custom_wget2 (addr) << 8;
+ addr &= ~1;
+ v = custom_wget2 (addr) << 8;
v |= custom_wget2 (addr + 2) >> 8;
return v;
}
return custom_wget2 (addr);
}
-
+
uae_u32 REGPARAM2 custom_bget (uaecptr addr)
{
#ifdef JIT
default:
if (!noget)
custom_wget_1 (addr, 1);
- if (!(currprefs.chipset_mask & CSMASK_AGA) && (currprefs.chipset_mask & CSMASK_ECS_AGNUS))
+ if (!(currprefs.chipset_mask & CSMASK_AGA) && (currprefs.chipset_mask & CSMASK_ECS_AGNUS))
last_custom_value = 0xffff;
return 1;
}
special_mem |= S_WRITE;
#endif
#ifdef CUSTOM_DEBUG
- write_log ("%d:%d:wput: %04.4X %04.4X pc=%p\n", hpos, vpos, addr & 0x01fe, value & 0xffff, m68k_getpc());
+ write_log ("%d:%d:wput: %04.4X %04.4X pc=%p\n", hpos, vpos, addr & 0x01fe, value & 0xffff, m68k_getpc ());
#endif
sync_copper_with_cpu (hpos, 1, addr);
custom_wput_1 (hpos, addr, value, 0);
#endif
custom_wput (addr & ~1, rval);
if (warned < 10) {
- write_log ("Byte put to custom register %04.4X PC=%08.8X\n", addr, m68k_getpc());
+ write_log ("Byte put to custom register %04.4X PC=%08.8X\n", addr, m68k_getpc ());
warned++;
}
}
if (dstptr)
dstbak = dst = dstptr;
else
- dstbak = dst = malloc (8+256*2);
+ dstbak = dst = malloc (8+256*2);
SL (currprefs.chipset_mask);
SW (0); /* 000 ? */
if (dstptr)
dstbak = dst = dstptr;
else
- dstbak = dst = malloc (256*4);
+ dstbak = dst = malloc (256*4);
for (i = 0; i < 256; i++)
-#ifdef AGA
+#ifdef AGA
SL (current_colors.color_regs_aga[i]);
#else
SL (0);
for (;;) {
int bpldma;
int blitpri = dmaen (DMA_BLITPRI);
- do_cycles (1 * CYCLE_UNIT);
+ do_cycles (1 * CYCLE_UNIT);
cycles += CYCLE_UNIT;
- hpos = current_hpos ();
+ hpos = current_hpos ();
sync_copper (hpos);
decide_line (hpos);
- decide_fetch_ce (hpos);
+ decide_fetch_ce (hpos);
bpldma = is_bitplane_dma (hpos);
if (cycle_line[hpos] == 0 && !bpldma) {
if (bltstate == BLT_done || bnasty >= 3)
- break;
+ break;
decide_blitter (hpos);
if (cycle_line[hpos] == 0)
- break;
+ break;
if (!blitpri || blit_singlechannel)
bnasty++;
} else if (bpldma && (blit_singlechannel || !blitpri)) {
{
int hpos, bpldma;
while (cycles > 0) {
- do_cycles (1 * CYCLE_UNIT);
+ do_cycles (1 * CYCLE_UNIT);
cycles -= CYCLE_UNIT;
- hpos = current_hpos ();
+ hpos = current_hpos ();
sync_copper (hpos);
decide_line (hpos);
- decide_fetch_ce (hpos);
+ decide_fetch_ce (hpos);
bpldma = is_bitplane_dma (hpos);
if (cycle_line[hpos] == 0 && !bpldma)
decide_blitter (hpos);
static uae_u32 lastaddr (void)
{
if (currprefs.z3fastmem_size)
- return z3fastmem_start + currprefs.z3fastmem_size;
+ return z3fastmem_start + currprefs.z3fastmem_size;
if (currprefs.mbresmem_high_size)
return a3000hmem_start + currprefs.mbresmem_high_size;
if (currprefs.mbresmem_low_size)
return a3000lmem_start + currprefs.mbresmem_low_size;
if (currprefs.bogomem_size)
- return bogomem_start + currprefs.bogomem_size;
+ return bogomem_start + currprefs.bogomem_size;
if (currprefs.fastmem_size)
- return fastmem_start + currprefs.fastmem_size;
+ return fastmem_start + currprefs.fastmem_size;
return currprefs.chipmem_size;
}
int nonsafe = 0;
if (osize <= (9 + cols * 5 + 1 + 2 * cols))
- return addr;
+ return addr;
sprintf (out, "%08lX ", addr);
for (i = 0; i < cols; i++) {
uae_u8 b1, b2;
out[9 + cols * 5 + 1 + i * 2 + 0] = '*';
out[9 + cols * 5 + 1 + i * 2 + 1] = '*';
}
- addr += 2;
+ addr += 2;
}
out[9 + cols * 5] = ' ';
out[9 + cols * 5 + 1 + 2 * cols] = 0;
{
char line[MAX_LINEWIDTH + 1];
for (;lines--;) {
- addr = dumpmem2 (addr, line, sizeof(line));
- console_out ("%s", line);
+ addr = dumpmem2 (addr, line, sizeof(line));
+ console_out ("%s", line);
console_out ("\n");
}
*nxmem = addr;
static void dump_vectors (uaecptr addr)
{
int i = 0, j = 0;
-
+
if (addr == 0xffffffff)
addr = regs.vbr;
if (find_copper_record (addr, &hpos, &vpos)) {
sprintf (record, " [%03x %03x]", vpos, hpos);
}
-
+
if (get_copper_address(-1) >= addr && get_copper_address(-1) <= addr + 3)
here = '*';
static void clearcheater(void)
{
if (!trainerdata)
- trainerdata = (struct trainerstruct*)xmalloc(MAX_CHEAT_VIEW * sizeof (struct trainerstruct));
+ trainerdata = (struct trainerstruct*)xmalloc(MAX_CHEAT_VIEW * sizeof (struct trainerstruct));
memset(trainerdata, 0, sizeof (struct trainerstruct) * MAX_CHEAT_VIEW);
totaltrainers = 0;
}
for(i = 0; i < totaltrainers; i++) {
struct trainerstruct *ts = &trainerdata[i];
uae_u16 b;
-
+
if (size) {
- b = get_byte(ts->addr);
+ b = get_byte (ts->addr);
} else {
- b = get_word(ts->addr);
+ b = get_word (ts->addr);
}
if (mode)
console_out("%08.8X=%4.4X ", ts->addr, b);
static int inconly, deconly, maxdiff;
int addrcnt, cnt;
char v;
-
+
v = toupper(**c);
if(!memtmp || v == 'S') {
first = 1;
xfree(memtmp);
memsize = 0;
- addr = 0xffffffff;
+ addr = 0xffffffff;
while ((addr = nextaddr(addr, &end)) != 0xffffffff) {
memsize += end - addr;
addr = end - 1;
ignore_ws (c);
if (!more_params(c)) {
first = 1;
- console_out("search reset\n");
+ console_out("search reset\n");
xfree (vlist);
listsize = memsize;
vlist = (uae_u8*)xcalloc (listsize >> 3, 1);
while ((addr = nextaddr(addr, &end)) != 0xffffffff) {
if (addr + size < end) {
for (i = 0; i < size; i++) {
- if (get_byte(addr + i) != val >> ((size - i - 1) << 8))
+ if (get_byte (addr + i) != val >> ((size - i - 1) << 8))
break;
}
if (i == size) {
uae_u32 e = end >> 16;
memset (illghdebug + s, c, e - s);
}
- addr = end - 1;
+ addr = end - 1;
}
if (currprefs.gfxmem_size)
memset (illghdebug + (p96ram_start >> 16), 3, currprefs.gfxmem_size >> 16);
if (rwi == 2) {
for (i = 0; i < size; i++) {
if (smc_table[addr + i].cnt < SMC_MAXHITS) {
- smc_table[addr + i].addr = m68k_getpc(®s);
+ smc_table[addr + i].addr = m68k_getpc (®s);
}
}
return;
return; /* BRA.B */
}
if (hitcnt < 100) {
- smc_table[hitaddr].cnt++;
+ smc_table[hitaddr].cnt++;
console_out("SMC at %08.8X - %08.8X (%d) from %08.8X\n",
hitaddr, hitaddr + hitcnt, hitcnt, hitpc);
if (smc_table[hitaddr].cnt >= SMC_MAXHITS)
int off = debug_mem_off (addr);
uae_u32 v = 0;
if (!mmu_hit(addr, 4, 0, &v))
- v = debug_mem_banks[off]->lget(addr);
+ v = debug_mem_banks[off]->lget(addr);
return v;
}
static uae_u32 REGPARAM2 mmu_wget (uaecptr addr)
int off = debug_mem_off (addr);
uae_u32 v = 0;
if (!mmu_hit(addr, 2, 0, &v))
- v = debug_mem_banks[off]->wget(addr);
+ v = debug_mem_banks[off]->wget(addr);
return v;
}
static uae_u32 REGPARAM2 mmu_bget (uaecptr addr)
int off = debug_mem_off (addr);
uae_u32 v = 0;
if (!mmu_hit(addr, 1, 0, &v))
- v = debug_mem_banks[off]->bget(addr);
+ v = debug_mem_banks[off]->bget(addr);
return v;
}
static void REGPARAM2 mmu_lput (uaecptr addr, uae_u32 v)
int off = debug_mem_off (addr);
uae_u32 v = 0;
if (!mmu_hit(addr, 4, 4, &v))
- v = debug_mem_banks[off]->lgeti(addr);
+ v = debug_mem_banks[off]->lgeti(addr);
return v;
}
static uae_u32 REGPARAM2 mmu_wgeti (uaecptr addr)
int off = debug_mem_off (addr);
uae_u32 v = 0;
if (!mmu_hit(addr, 2, 4, &v))
- v = debug_mem_banks[off]->wgeti(addr);
+ v = debug_mem_banks[off]->wgeti(addr);
return v;
}
struct memwatch_node *mwn;
if (buf)
- memset(buf, 0, bufsize);
+ memset(buf, 0, bufsize);
for (i = 0; i < MEMWATCH_TOTAL; i++) {
if ((num >= 0 && num == i) || (num < 0)) {
mwn = &mwnodes[i];
buf = (char*)malloc(50 * multiplier);
if (!buf)
- return;
+ return;
memwatch_dump2 (buf, 50 * multiplier, num);
f_out(stdout, "%s", buf);
free(buf);
uae_u8 *caddr;
char *name;
char tmp[MAX_DPATH];
-
+
name = a1->name;
if (name == NULL)
name = "<none>";
-
+
k = j;
caddr = dump_xlate(k << 16);
mirrored = caddr ? 1 : 0;
{
char *cstr = (char*)xmalloc(bstr[0] + 1);
if (cstr) {
- memcpy(cstr, bstr + 1, bstr[0]);
- cstr[bstr[0]] = 0;
+ memcpy(cstr, bstr + 1, bstr[0]);
+ cstr[bstr[0]] = 0;
}
return cstr;
}
static void print_task_info(uaecptr node)
{
- int process = get_byte(node + 8) == 13 ? 1 : 0;
+ int process = get_byte (node + 8) == 13 ? 1 : 0;
console_out ("%08X: %08X", node, 0);
console_out (process ? " PROCESS '%s'" : " TASK '%s'\n", get_real_address (get_long (node + 10)));
if (process) {
- uaecptr cli = BPTR2APTR(get_long(node + 172));
- int tasknum = get_long(node + 140);
- if (cli && tasknum) {
- uae_u8 *command_bstr = get_real_address(BPTR2APTR(get_long(cli + 16)));
- char * command = BSTR2CSTR(command_bstr);;
- console_out(" [%d, '%s']\n", tasknum, command);
- xfree(command);
+ uaecptr cli = BPTR2APTR (get_long (node + 172));
+ int tasknum = get_long (node + 140);
+ if (cli && tasknum) {
+ uae_u8 *command_bstr = get_real_address (BPTR2APTR (get_long (cli + 16)));
+ char * command = BSTR2CSTR (command_bstr);
+ console_out (" [%d, '%s']\n", tasknum, command);
+ xfree (command);
} else {
- console_out ("\n");
+ console_out ("\n");
}
}
}
regs.sr = (regs.sr & ~31) | (v & 31);
MakeFromSR (®s);
} else if (!strcmp (parm, "PC")) {
- m68k_setpc(®s, v);
+ m68k_setpc (®s, v);
fill_prefetch_slow(®s);
} else {
for (i = 0; m2cregs[i].regname; i++) {
inputdevice_logging = 1 | 2;
if (more_params(&inptr))
inputdevice_logging = readint(&inptr);
- console_out("input logging level %d\n", inputdevice_logging);
+ console_out("input logging level %d\n", inputdevice_logging);
} else if(*inptr == 'm') {
memory_map_dump_2(0);
} else {
case 'H':
{
int count, temp, badly;
- uae_u32 oldpc = m68k_getpc(®s);
+ uae_u32 oldpc = m68k_getpc (®s);
struct regstruct save_regs = regs;
badly = 0;
}
while (temp != lasthist) {
regs = history[temp];
- m68k_setpc(®s, history[temp].pc);
+ m68k_setpc (®s, history[temp].pc);
if (badly) {
m68k_dumpstate(stdout, NULL);
} else {
temp = 0;
}
regs = save_regs;
- m68k_setpc(®s, oldpc);
+ m68k_setpc (®s, oldpc);
}
break;
case 'm':
case 'o':
{
if (copper_debugger(&inptr)) {
- debugger_active = 0;
- debugging = 0;
+ debugger_active = 0;
+ debugging = 0;
return;
}
break;
static void addhistory(void)
{
- uae_u32 pc = m68k_getpc(®s);
+ uae_u32 pc = m68k_getpc (®s);
if (!notinrom())
return;
history[lasthist] = regs;
- history[lasthist].pc = m68k_getpc(®s);
+ history[lasthist].pc = m68k_getpc (®s);
if (++lasthist == MAX_HIST)
lasthist = 0;
if (lasthist == firsthist) {
if (!memwatch_triggered) {
if (do_skip) {
- uae_u32 pc = munge24 (m68k_getpc(®s));
+ uae_u32 pc = munge24 (m68k_getpc (®s));
uae_u16 opcode = (currprefs.cpu_compatible || currprefs.cpu_cycle_exact) ? regs.ir : get_word (pc);
int bp = 0;
if ((processptr || processname) && notinrom()) {
uaecptr execbase = get_long (4);
uaecptr activetask = get_long (execbase + 276);
- int process = get_byte(activetask + 8) == 13 ? 1 : 0;
- char *name = (char*)get_real_address(get_long(activetask + 10));
+ int process = get_byte (activetask + 8) == 13 ? 1 : 0;
+ char *name = (char*)get_real_address (get_long (activetask + 10));
if (process) {
- uaecptr cli = BPTR2APTR(get_long(activetask + 172));
+ uaecptr cli = BPTR2APTR(get_long (activetask + 172));
uaecptr seglist = 0;
char *command = NULL;
if (cli) {
if (processname) {
- uae_u8 *command_bstr = get_real_address(BPTR2APTR(get_long(cli + 16)));
+ uae_u8 *command_bstr = get_real_address (BPTR2APTR(get_long (cli + 16)));
command = BSTR2CSTR(command_bstr);
}
- seglist = BPTR2APTR(get_long(cli + 60));
+ seglist = BPTR2APTR(get_long (cli + 60));
} else {
- seglist = BPTR2APTR(get_long(activetask + 128));
- seglist = BPTR2APTR(get_long(seglist + 12));
+ seglist = BPTR2APTR(get_long (activetask + 128));
+ seglist = BPTR2APTR(get_long (seglist + 12));
}
if (activetask == processptr || (processname && (!stricmp(name, processname) || (command && !stricmp(command, processname))))) {
while (seglist) {
- uae_u32 size = get_long(seglist - 4) - 4;
+ uae_u32 size = get_long (seglist - 4) - 4;
if (pc >= (seglist + 4) && pc < (seglist + size)) {
bp = 1;
break;
}
- seglist = BPTR2APTR(get_long(seglist));
+ seglist = BPTR2APTR(get_long (seglist));
}
}
xfree(command);
int notinrom (void)
{
- uaecptr pc = munge24(m68k_getpc(®s));
+ uaecptr pc = munge24(m68k_getpc (®s));
if (pc < 0x00e00000 || pc > 0x00ffffff)
return 1;
return 0;
static char txt[100];
uae_u32 pc = M68K_GETPC;
sprintf (txt, "PC=%08.8X INS=%04.4X %04.4X %04.4X",
- pc, get_word(pc), get_word(pc+2), get_word(pc+4));
+ pc, get_word (pc), get_word (pc+2), get_word (pc+4));
return txt;
}
uae_u32 pc;
mmu_triggered = 0;
- pc = m68k_getpc(®s);
+ pc = m68k_getpc (®s);
p = mmu_regs + 18 * 4;
put_long (p, pc);
regs = mmu_backup_regs;
regs.intmask = 7;
regs.t0 = regs.t1 = 0;
if (!regs.s) {
- regs.usp = m68k_areg(®s, 7);
+ regs.usp = m68k_areg (®s, 7);
if (currprefs.cpu_model >= 68020)
- m68k_areg(®s, 7) = regs.m ? regs.msp : regs.isp;
+ m68k_areg (®s, 7) = regs.m ? regs.msp : regs.isp;
else
- m68k_areg(®s, 7) = regs.isp;
+ m68k_areg (®s, 7) = regs.isp;
regs.s = 1;
}
MakeSR (®s);
if (currprefs.cpu_model > 68000) {
for (i = 0 ; i < 9; i++) {
- m68k_areg(®s, 7) -= 4;
- put_long (m68k_areg(®s, 7), 0);
+ m68k_areg (®s, 7) -= 4;
+ put_long (m68k_areg (®s, 7), 0);
}
- m68k_areg(®s, 7) -= 4;
- put_long (m68k_areg(®s, 7), mmu_fault_addr);
- m68k_areg(®s, 7) -= 2;
- put_word (m68k_areg(®s, 7), 0); /* WB1S */
- m68k_areg(®s, 7) -= 2;
- put_word (m68k_areg(®s, 7), 0); /* WB2S */
- m68k_areg(®s, 7) -= 2;
- put_word (m68k_areg(®s, 7), 0); /* WB3S */
- m68k_areg(®s, 7) -= 2;
- put_word (m68k_areg(®s, 7),
+ m68k_areg (®s, 7) -= 4;
+ put_long (m68k_areg (®s, 7), mmu_fault_addr);
+ m68k_areg (®s, 7) -= 2;
+ put_word (m68k_areg (®s, 7), 0); /* WB1S */
+ m68k_areg (®s, 7) -= 2;
+ put_word (m68k_areg (®s, 7), 0); /* WB2S */
+ m68k_areg (®s, 7) -= 2;
+ put_word (m68k_areg (®s, 7), 0); /* WB3S */
+ m68k_areg (®s, 7) -= 2;
+ put_word (m68k_areg (®s, 7),
(mmu_fault_rw ? 0 : 0x100) | (mmu_fault_size << 5)); /* SSW */
- m68k_areg(®s, 7) -= 4;
- put_long (m68k_areg(®s, 7), mmu_fault_bank_addr);
- m68k_areg(®s, 7) -= 2;
- put_word (m68k_areg(®s, 7), 0x7002);
+ m68k_areg (®s, 7) -= 4;
+ put_long (m68k_areg (®s, 7), mmu_fault_bank_addr);
+ m68k_areg (®s, 7) -= 2;
+ put_word (m68k_areg (®s, 7), 0x7002);
}
- m68k_areg(®s, 7) -= 4;
- put_long (m68k_areg(®s, 7), get_long (p - 4));
- m68k_areg(®s, 7) -= 2;
- put_word (m68k_areg(®s, 7), mmur.sr);
+ m68k_areg (®s, 7) -= 4;
+ put_long (m68k_areg (®s, 7), get_long (p - 4));
+ m68k_areg (®s, 7) -= 2;
+ put_word (m68k_areg (®s, 7), mmur.sr);
set_special(®s, SPCFLAG_END_COMPILE);
}
int i;
mmur = regs;
- pc = m68k_getpc(®s);
+ pc = m68k_getpc (®s);
if (mmu_logging)
console_out ("MMU: hit %08.8X SZ=%d RW=%d V=%08.8X PC=%08.8X\n", addr, size, rwi, v, pc);
mn = mmunl[addr >> MMU_PAGE_SHIFT];
if (mn == NULL)
return 0;
-
+
s = regs.s;
while (mn) {
md = mn->mmubank;
switch (size)
{
case 4:
- put_long(maddr, *v);
+ put_long (maddr, *v);
break;
case 2:
- put_word(maddr, *v);
+ put_word (maddr, *v);
break;
case 1:
- put_byte(maddr, *v);
+ put_byte (maddr, *v);
break;
}
} else {
switch (size)
{
case 4:
- *v = get_long(maddr);
+ *v = get_long (maddr);
break;
case 2:
- *v = get_word(maddr);
+ *v = get_word (maddr);
break;
case 1:
- *v = get_byte(maddr);
+ *v = get_byte (maddr);
break;
}
}
{
snptr->flags = get_long (p);
if (snptr->flags == 0xffffffff)
- return 1;
+ return 1;
snptr->addr = get_long (p + 4);
snptr->len = get_long (p + 8);
snptr->remap = get_long (p + 12);
p += 16;
off = snptr->addr >> MMU_PAGE_SHIFT;
if (mmunl[off] == NULL) {
- mn = mmunl[off] = (struct mmunode*)xcalloc (sizeof (struct mmunode), 1);
+ mn = mmunl[off] = (struct mmunode*)xcalloc (sizeof (struct mmunode), 1);
} else {
mn = mmunl[off];
while (mn->next)
char tmp[10];
time (&t);
today = localtime( &t );
- strftime (tmp, sizeof(tmp), "%Y", today);
+ strftime (tmp, sizeof (tmp), "%Y", today);
year = atol (tmp);
- strftime (tmp, sizeof(tmp), "%j", today);
+ strftime (tmp, sizeof (tmp), "%j", today);
days = atol (tmp) - 1;
- strftime (tmp, sizeof(tmp), "%H", today);
+ strftime (tmp, sizeof (tmp), "%H", today);
minutes = atol (tmp) * 60;
- strftime (tmp, sizeof(tmp), "%M", today);
+ strftime (tmp, sizeof (tmp), "%M", today);
minutes += atol (tmp);
- strftime (tmp, sizeof(tmp), "%S", today);
+ strftime (tmp, sizeof (tmp), "%S", today);
ticks = atol (tmp) * 50;
while (year > 1978) {
if ( !(year % 100) ? !(year % 400) : !(year % 4) ) days++;
memset (sector, 0, FS_FLOPPY_BLOCKSIZE);
memcpy (sector, "DOS", 3);
if (bootable)
- memcpy (sector, bootblock, sizeof(bootblock));
+ memcpy (sector, bootblock, sizeof (bootblock));
}
static void createrootblock (uae_u8 *sector, uae_u8 *disk_name)
return m;
}
+static int get_floppy_speed2 (drive *drv)
+{
+ int m = get_floppy_speed () * drv->tracklen / (2 * 8 * FLOPPY_WRITE_LEN * drv->ddhd);
+ if (m <= 0)
+ m = 1;
+ return m;
+}
+
static char *drive_id_name(drive *drv)
{
switch(drv->drive_id)
* disk or a 3.5 DD disk is inserted. Only 3.5 HD drive id is reported
* when a real 3.5 HD disk is inserted. -Adil
*/
-static void drive_settype_id(drive *drv)
+static void drive_settype_id (drive *drv)
{
int t = currprefs.dfxtype[drv - &floppy[0]];
break;
}
#ifdef DEBUG_DRIVE_ID
- write_log("drive_settype_id: DF%d: set to %s\n", drv-floppy, drive_id_name(drv));
+ write_log ("drive_settype_id: DF%d: set to %s\n", drv-floppy, drive_id_name(drv));
#endif
}
*needwritefile = 1;
return wrprot2;
}
- if (memcmp (exeheader, buffer, sizeof(exeheader)) == 0)
+ if (memcmp (exeheader, buffer, sizeof (exeheader)) == 0)
return 0;
if (wrprot1)
return wrprot2;
track_reset (drv);
return 0;
}
-
+
if (input_recording > 0) {
inprec_rstart (INPREC_DISKINSERT);
inprec_ru8 (dnum);
offs += tid->len;
}
- } else if (memcmp (exeheader, buffer, sizeof(exeheader)) == 0) {
-
+ } else if (memcmp (exeheader, buffer, sizeof (exeheader)) == 0) {
int i;
struct zfile *z = zfile_fopen_empty ("", 512 * 1760);
createimagefromexe (drv->diskfile, z);
}
}
openwritefile (drv, 0);
- drive_settype_id(drv); /* Set DD or HD drive */
+ drive_settype_id (drv); /* Set DD or HD drive */
drive_fill_bigbuf (drv, 1);
drv->mfmpos = uaerand ();
drv->mfmpos |= (uaerand () << 16);
#endif
if (drv->steplimit && get_cycles() - drv->steplimitcycle < MIN_STEPLIMIT_CYCLE) {
if (disk_debug_logging > 1)
- write_log (" step ignored %d", (get_cycles() - drv->steplimitcycle) / CYCLE_UNIT);
+ write_log (" step ignored %d", (get_cycles() - drv->steplimitcycle) / CYCLE_UNIT);
return;
}
/* A1200's floppy drive needs at least 30 raster lines between steps
#endif
}
/* else
- write_log("program tried to step beyond track zero\n");
+ write_log ("program tried to step beyond track zero\n");
"no-click" programs does that
*/
} else {
}
rand_shifter (drv);
if (disk_debug_logging > 1)
- write_log (" ->step %d", drv->cyl);
+ write_log (" ->step %d", drv->cyl);
}
static int drive_track0 (drive * drv)
driveclick_motor (drv - floppy, 0);
#endif
#ifdef DEBUG_DRIVE_ID
- write_log("drive_motor: Selected DF%d: reset id shift reg.\n",drv-floppy);
+ write_log ("drive_motor: Selected DF%d: reset id shift reg.\n",drv-floppy);
#endif
if (disk_debug_logging > 1)
write_log (" ->motor off");
};
-static uae_u16 dos_encode_byte(uae_u8 byte)
-{
- uae_u8 b2, b1;
+static uae_u16 dos_encode_byte (uae_u8 byte)
+{
+ uae_u8 b2, b1;
uae_u16 word;
b1 = byte;
return (word | ((word & (256 | 64)) ? 0 : 128));
}
-static uae_u16 *mfmcoder(uae_u8 *src, uae_u16 *dest, int len)
+static uae_u16 *mfmcoder (uae_u8 *src, uae_u16 *dest, int len)
{
int i;
for (i = 0; i < len; i++) {
- *dest = dos_encode_byte(*src++);
- *dest |= ((dest[-1] & 1)||(*dest & 0x4000)) ? 0: 0x8000;
+ *dest = dos_encode_byte (*src++);
+ *dest |= ((dest[-1] & 1)||(*dest & 0x4000)) ? 0: 0x8000;
dest++;
}
return dest;
secbuf[54] = 0xc2;
secbuf[55] = 0xfc;
memset (secbuf + 56, 0x4e, 40);
- dstmfmbuf = mfmcoder(secbuf, mfm2, 96);
+ dstmfmbuf = mfmcoder (secbuf, mfm2, 96);
mfm2[52] = 0x5224;
mfm2[53] = 0x5224;
mfm2[54] = 0x5224;
for (i = 0; i < drv->num_secs; i++) {
- mfm2 = dstmfmbuf;
+ mfm2 = dstmfmbuf;
memset (secbuf, 0x00, 12);
secbuf[12] = 0xa1;
secbuf[13] = 0xa1;
secbuf[58] = 0xa1;
secbuf[59] = 0xfb;
read_floppy_data (drv->diskfile, ti, i * 512, &secbuf[60], 512);
- crc16 = get_crc16(secbuf + 56, 3 + 1 + 512);
+ crc16 = get_crc16 (secbuf + 56, 3 + 1 + 512);
secbuf[60 + 512] = crc16 >> 8;
secbuf[61 + 512] = crc16 & 0xff;
memset(secbuf + 512 + 62, 0x4e, (tracklen / 2 - 96) / drv->num_secs - 574);
- dstmfmbuf = mfmcoder(secbuf, mfm2, 60 + 512 + 2 + 76 / drv->ddhd);
+ dstmfmbuf = mfmcoder (secbuf, mfm2, 60 + 512 + 2 + 76 / drv->ddhd);
mfm2[12] = 0x4489;
mfm2[13] = 0x4489;
mfm2[14] = 0x4489;
mfm2[58] = 0x4489;
}
while (dstmfmbuf - drv->bigmfmbuf < tracklen / 2)
- *dstmfmbuf++ = 0x9254;
+ *dstmfmbuf++ = 0x9254;
drv->skipoffset = 0;
drv->tracklen = (dstmfmbuf - drv->bigmfmbuf) * 16;
if (disk_debug_logging > 0)
- write_log ("pcdos read track %d\n", tr);
+ write_log ("pcdos read track %d\n", tr);
}
static void decode_amigados (drive *drv)
drv->tracklen = len * 2 * 8;
for (sec = 0; sec < drv->num_secs; sec++) {
- uae_u8 secbuf[544];
- uae_u16 mfmbuf[544];
- int i;
- uae_u32 deven, dodd;
- uae_u32 hck = 0, dck = 0;
-
- secbuf[0] = secbuf[1] = 0x00;
- secbuf[2] = secbuf[3] = 0xa1;
- secbuf[4] = 0xff;
- secbuf[5] = tr;
- secbuf[6] = sec;
- secbuf[7] = drv->num_secs - sec;
-
- for (i = 8; i < 24; i++)
+ uae_u8 secbuf[544];
+ uae_u16 mfmbuf[544];
+ int i;
+ uae_u32 deven, dodd;
+ uae_u32 hck = 0, dck = 0;
+
+ secbuf[0] = secbuf[1] = 0x00;
+ secbuf[2] = secbuf[3] = 0xa1;
+ secbuf[4] = 0xff;
+ secbuf[5] = tr;
+ secbuf[6] = sec;
+ secbuf[7] = drv->num_secs - sec;
+
+ for (i = 8; i < 24; i++)
secbuf[i] = 0;
read_floppy_data (drv->diskfile, ti, sec * 512, &secbuf[32], 512);
- mfmbuf[0] = mfmbuf[1] = 0xaaaa;
- mfmbuf[2] = mfmbuf[3] = 0x4489;
+ mfmbuf[0] = mfmbuf[1] = 0xaaaa;
+ mfmbuf[2] = mfmbuf[3] = 0x4489;
- deven = ((secbuf[4] << 24) | (secbuf[5] << 16)
+ deven = ((secbuf[4] << 24) | (secbuf[5] << 16)
| (secbuf[6] << 8) | (secbuf[7]));
- dodd = deven >> 1;
- deven &= 0x55555555;
- dodd &= 0x55555555;
+ dodd = deven >> 1;
+ deven &= 0x55555555;
+ dodd &= 0x55555555;
- mfmbuf[4] = dodd >> 16;
- mfmbuf[5] = dodd;
- mfmbuf[6] = deven >> 16;
- mfmbuf[7] = deven;
+ mfmbuf[4] = dodd >> 16;
+ mfmbuf[5] = dodd;
+ mfmbuf[6] = deven >> 16;
+ mfmbuf[7] = deven;
- for (i = 8; i < 48; i++)
+ for (i = 8; i < 48; i++)
mfmbuf[i] = 0xaaaa;
for (i = 0; i < 512; i += 4) {
deven = ((secbuf[i + 32] << 24) | (secbuf[i + 33] << 16)
for (i = 4; i < 24; i += 2)
hck ^= (mfmbuf[i] << 16) | mfmbuf[i + 1];
- deven = dodd = hck;
- dodd >>= 1;
- mfmbuf[24] = dodd >> 16;
- mfmbuf[25] = dodd;
- mfmbuf[26] = deven >> 16;
- mfmbuf[27] = deven;
+ deven = dodd = hck;
+ dodd >>= 1;
+ mfmbuf[24] = dodd >> 16;
+ mfmbuf[25] = dodd;
+ mfmbuf[26] = deven >> 16;
+ mfmbuf[27] = deven;
- for (i = 32; i < 544; i += 2)
+ for (i = 32; i < 544; i += 2)
dck ^= (mfmbuf[i] << 16) | mfmbuf[i + 1];
- deven = dodd = dck;
- dodd >>= 1;
- mfmbuf[28] = dodd >> 16;
- mfmbuf[29] = dodd;
- mfmbuf[30] = deven >> 16;
- mfmbuf[31] = deven;
- mfmcode (mfmbuf + 4, 544 - 4);
+ deven = dodd = dck;
+ dodd >>= 1;
+ mfmbuf[28] = dodd >> 16;
+ mfmbuf[29] = dodd;
+ mfmbuf[30] = deven >> 16;
+ mfmbuf[31] = deven;
+ mfmcode (mfmbuf + 4, 544 - 4);
- for (i = 0; i < 544; i++) {
+ for (i = 0; i < 544; i++) {
dstmfmbuf[dstmfmoffset % len] = mfmbuf[i];
dstmfmoffset++;
}
}
if (disk_debug_logging > 0)
- write_log ("amigados read track %d\n", tr);
+ write_log ("amigados read track %d\n", tr);
}
static void drive_fill_bigbuf (drive * drv, int force)
drv->tracklen = FLOPPY_WRITE_LEN * drv->ddhd * 2 * 8;
memset (drv->bigmfmbuf, 0, FLOPPY_WRITE_LEN * 2 * drv->ddhd);
}
- drv->trackspeed = get_floppy_speed () * drv->tracklen / (2 * 8 * FLOPPY_WRITE_LEN * drv->ddhd);
+
+ drv->trackspeed = get_floppy_speed2 (drv);
updatemfmpos (drv);
}
if (!longwritemode)
ret = drive_write_adf_amigados (drv);
if (ret) {
- write_log("not an amigados track %d (error %d), writing as raw track\n", drv->cyl * 2 + side, ret);
+ write_log ("not an amigados track %d (error %d), writing as raw track\n", drv->cyl * 2 + side, ret);
drive_write_ext2 (drv->bigmfmbuf, drv->diskfile, &drv->trackdata[drv->cyl * 2 + side],
longwritemode ? dsklength2 * 8 : drv->tracklen);
}
case ADF_PCDOS:
ret = drive_write_pcdos (drv);
if (ret)
- write_log("not a PC formatted track %d (error %d)\n", drv->cyl * 2 + side, ret);
+ write_log ("not a PC formatted track %d (error %d)\n", drv->cyl * 2 + side, ret);
break;
}
drv->tracktiming[0] = 0;
drv->dskready_time = 0;
drv->dskready_down_time = 0;
drv->crc32 = 0;
- drive_settype_id(drv); /* Back to 35 DD */
+ drive_settype_id (drv); /* Back to 35 DD */
if (disk_debug_logging > 0)
- write_log ("eject drive %d\n", drv - &floppy[0]);
+ write_log ("eject drive %d\n", drv - &floppy[0]);
if (input_recording > 0) {
inprec_rstart (INPREC_DISKREMOVE);
inprec_ru8 (drv - floppy);
}
drv->dskchange_time = dsktime;
if (disk_debug_logging > 0)
- write_log("delayed insert enable %d\n", dsktime);
+ write_log ("delayed insert enable %d\n", dsktime);
}
void DISK_reinsert (int num)
if (!currprefs.cs_df0idhw && dr == 0)
drv->idbit = 0;
#ifdef DEBUG_DRIVE_ID
- write_log("DISK_status: sel %d id %s (%08.8X) [0x%08lx, bit #%02d: %d]\n",
+ write_log ("DISK_status: sel %d id %s (%08.8X) [0x%08lx, bit #%02d: %d]\n",
dr, drive_id_name(drv), drv->drive_id, drv->drive_id << drv->drive_id_scnt, 31 - drv->drive_id_scnt, drv->idbit);
#endif
}
}
prevdata = data;
if (disk_debug_logging > 1)
- write_log ("\n");
+ write_log ("\n");
}
uae_u8 DISK_status (void)
dskdmaen = 0;
if (disk_debug_logging > 0) {
int dr, mfmpos = -1;
- write_log("disk dma finished %08.8X MFMpos=", dskpt);
+ write_log ("disk dma finished %08.8X MFMpos=", dskpt);
for (dr = 0; dr < MAX_FLOPPY_DRIVES; dr++)
write_log ("%d%s", floppy[dr].mfmpos, dr < MAX_FLOPPY_DRIVES - 1 ? "," : "");
write_log ("\n");
static void fetchnextrevolution (drive *drv)
{
- drv->trackspeed = get_floppy_speed () * drv->tracklen / (2 * 8 * FLOPPY_WRITE_LEN * drv->ddhd);
+ drv->trackspeed = get_floppy_speed2 (drv);
if (!drv->multi_revolution)
return;
switch (drv->filetype)
if (flag & DISK_INDEXSYNC)
cia_diskindex ();
#if 0
- {
+ {
int i;
for (i = 0; i < MAX_FLOPPY_DRIVES; i++) {
drive *drv = &floppy[i];
if (dskdmaen < 3) {
uae_u16 *p = drv->tracktiming;
p += mfmpos / 8;
- drv->trackspeed = get_floppy_speed () * drv->tracklen / (2 * 8 * FLOPPY_WRITE_LEN * drv->ddhd);
+ drv->trackspeed = get_floppy_speed2 (drv);
drv->trackspeed = drv->trackspeed * p[0] / 1000;
if (drv->trackspeed < 700 || drv->trackspeed > 3000) {
static int warned;
warned++;
if (warned < 50)
write_log ("corrupted trackspeed value %d\n", drv->trackspeed);
- assert (0);
+ drv->trackspeed = 1000;
}
}
}
updatetrackspeed (drv, drv->mfmpos);
if (diskevent_flag) {
disk_sync_cycle = startcycle >> 8;
- event2_newevent(ev2_disk, (startcycle - firstcycle) / CYCLE_UNIT);
+ event2_newevent(ev2_disk, (startcycle - firstcycle) / CYCLE_UNIT);
}
}
if (drv->tracktiming[0])
updatetrackspeed (drv, drv->mfmpos);
word <<= 1;
- if (!drive_empty (drv)) {
+ if (!drive_empty (drv)) {
if (unformatted (drv))
word |= (uaerand() & 0x1000) ? 1 : 0;
else
#endif
}
-static void disk_dma_debugmsg(void)
+static void disk_dma_debugmsg (void)
{
write_log ("LEN=%04.4X (%d) SYNC=%04.4X PT=%08.8X ADKCON=%04.4X PC=%08.8X\n",
dsklength, dsklength, (adkcon & 0x400) ? dsksync : 0xffff, dskpt, adkcon, M68K_GETPC);
if (dsklen & 0x4000)
v |= 0x2000;
if (disk_debug_logging > 1)
- write_log ("DSKBYTR=%04.4X hpos=%d\n", v, hpos);
+ write_log ("DSKBYTR=%04.4X hpos=%d\n", v, hpos);
if (disk_debug_mode & DISK_DEBUG_PIO) {
int dr;
for (dr = 0; dr < MAX_FLOPPY_DRIVES; dr++) {
continue;
if (!(selected & (1 << dr))) {
if (disk_debug_track < 0 || disk_debug_track == 2 * drv->cyl + side) {
- disk_dma_debugmsg();
+ disk_dma_debugmsg ();
write_log ("DSKBYTR=%04.4X\n", v);
- activate_debugger();
+ activate_debugger ();
break;
}
}
if (dsklength == 0)
return;
if (dsklength == 1) {
- disk_dmafinished();
+ disk_dmafinished ();
return;
}
dskdmaen = 3;
continue;
if (!(selected & (1 << dr))) {
if (disk_debug_track < 0 || disk_debug_track == 2 * drv->cyl + side) {
- disk_dma_debugmsg();
- activate_debugger();
+ disk_dma_debugmsg ();
+ activate_debugger ();
break;
}
}
motormask = 0;
for (dr = 0; dr < MAX_FLOPPY_DRIVES; dr++) {
- drive *drv = &floppy[dr];
- if (drv->motoroff)
+ drive *drv = &floppy[dr];
+ if (drv->motoroff)
continue;
motormask |= 1 << dr;
if ((selected & (1 << dr)) == 0)
break;
}
if (dr == 4) {
- write_log ("disk %s DMA started, drvmask=%x motormask=%x\n",
- dskdmaen == 3 ? "write" : "read", selected ^ 15, motormask);
+ write_log ("disk %s DMA started, drvmask=%x motormask=%x\n",
+ dskdmaen == 3 ? "write" : "read", selected ^ 15, motormask);
noselected = 1;
} else {
if (disk_debug_logging > 0) {
write_log ("disk %s DMA started, drvmask=%x track %d mfmpos %d\n",
- dskdmaen == 3 ? "write" : "read", selected ^ 15,
+ dskdmaen == 3 ? "write" : "read", selected ^ 15,
floppy[dr].cyl * 2 + side, floppy[dr].mfmpos);
- disk_dma_debugmsg();
+ disk_dma_debugmsg ();
}
}
}
if (!done && noselected) {
while (dsklength-- > 0) {
- put_word (dskpt, 0);
- dskpt += 2;
+ put_word (dskpt, 0);
+ dskpt += 2;
}
INTREQ_f (0x8000 | 0x1000);
done = 1;
strcpy (changed_prefs.df[num], old);
drive_insert (floppy + num, &currprefs, num, changed_prefs.df[num]);
if (drive_empty (floppy + num))
- drv->dskchange = 1;
- }
+ drv->dskchange = 1;
+ }
}
}
}
int lores_factor, lores_shift;
int aga_mode; /* mirror of chipset_mask & CSMASK_AGA */
-int direct_rgb;
+int direct_rgb;
/* The shift factor to apply when converting between Amiga coordinates and window
coordinates. Zero if the resolution is the same, positive if window coordinates
if (framecnt >= currprefs.gfx_framerate)
framecnt = 0;
if (inhibit_frame)
- framecnt = 1;
+ framecnt = 1;
}
int coord_native_to_amiga_x (int x)
free (amiga2aspect_line_map);
/* At least for this array the +1 is necessary. */
- amiga2aspect_line_map = (int*)malloc (sizeof (int) * (MAXVPOS + 1) * 2 + 1);
- native2amiga_line_map = (int*)malloc (sizeof (int) * gfxvidinfo.height);
+ amiga2aspect_line_map = (int *)malloc (sizeof (int) * (MAXVPOS + 1) * 2 + 1);
+ native2amiga_line_map = (int *)malloc (sizeof (int) * gfxvidinfo.height);
if (currprefs.gfx_correct_aspect)
native_lines_per_amiga_line = ((double)gfxvidinfo.height
flush_screen (0, 0); /* vsync mode */
}
-static int drawing_color_matches;
-static enum { color_match_acolors, color_match_full } color_match_type;
-
-/* Set up colors_for_drawing to the state at the beginning of the currently drawn
- line. Try to avoid copying color tables around whenever possible. */
-static void adjust_drawing_colors (int ctable, int need_full)
-{
- if (drawing_color_matches != ctable) {
- if (need_full) {
- color_reg_cpy (&colors_for_drawing, curr_color_tables + ctable);
- color_match_type = color_match_full;
- } else {
- memcpy (colors_for_drawing.acolors, curr_color_tables[ctable].acolors,
- sizeof colors_for_drawing.acolors);
- color_match_type = color_match_acolors;
- }
- drawing_color_matches = ctable;
- } else if (need_full && color_match_type != color_match_full) {
- color_reg_cpy (&colors_for_drawing, &curr_color_tables[ctable]);
- color_match_type = color_match_full;
- }
-}
-
/* We only save hardware registers during the hardware frame. Now, when
* drawing the frame, we expand the data into a slightly more useful
* form. */
brdsprt = !brdblank && (currprefs.chipset_mask & CSMASK_AGA) && (dp_for_drawing->bplcon0 & 1) && (dp_for_drawing->bplcon3 & 0x02);
#endif
}
-static void pfield_expand_dp_bplcon2(int regno, int v)
+static void pfield_expand_dp_bplcon2 (int regno, int v)
{
regno -= 0x1000;
switch (regno)
{
- case 0x100:
- dp_for_drawing->bplcon0 = v;
- dp_for_drawing->bplres = GET_RES(v);
- dp_for_drawing->nr_planes = GET_PLANES(v);
+ case 0x100:
+ dp_for_drawing->bplcon0 = v;
+ dp_for_drawing->bplres = GET_RES(v);
+ dp_for_drawing->nr_planes = GET_PLANES(v);
dp_for_drawing->ham_seen = !! (v & 0x800);
- break;
- case 0x104:
- dp_for_drawing->bplcon2 = v;
- break;
+ break;
+ case 0x104:
+ dp_for_drawing->bplcon2 = v;
+ break;
#ifdef AGA
case 0x106:
- dp_for_drawing->bplcon3 = v;
- break;
- case 0x108:
- dp_for_drawing->bplcon4 = v;
- break;
+ dp_for_drawing->bplcon3 = v;
+ break;
+ case 0x108:
+ dp_for_drawing->bplcon4 = v;
+ break;
#endif
}
- pfield_expand_dp_bplcon();
+ pfield_expand_dp_bplcon ();
res_shift = lores_shift - bplres;
}
+static int drawing_color_matches;
+static enum { color_match_acolors, color_match_full } color_match_type;
+
+/* Set up colors_for_drawing to the state at the beginning of the currently drawn
+ line. Try to avoid copying color tables around whenever possible. */
+static void adjust_drawing_colors (int ctable, int need_full)
+{
+ if (drawing_color_matches != ctable) {
+ if (need_full) {
+ color_reg_cpy (&colors_for_drawing, curr_color_tables + ctable);
+ color_match_type = color_match_full;
+ } else {
+ memcpy (colors_for_drawing.acolors, curr_color_tables[ctable].acolors,
+ sizeof colors_for_drawing.acolors);
+ color_match_type = color_match_acolors;
+ }
+ drawing_color_matches = ctable;
+ } else if (need_full && color_match_type != color_match_full) {
+ color_reg_cpy (&colors_for_drawing, &curr_color_tables[ctable]);
+ color_match_type = color_match_full;
+ }
+}
+
STATIC_INLINE void do_color_changes (line_draw_func worker_border, line_draw_func worker_pfield)
{
int i;
}
if (i != dip_for_drawing->last_color_change) {
if (regno >= 0x1000) {
- pfield_expand_dp_bplcon2(regno, value);
+ pfield_expand_dp_bplcon2 (regno, value);
} else {
color_reg_set (&colors_for_drawing, regno, value);
colors_for_drawing.acolors[regno] = getxcolor (value);
/* Move color changes in horizontal cycles 0 to HBLANK_OFFSET - 1 to previous line.
* Cycles 0 to HBLANK_OFFSET are visible in right border on real Amigas.
*/
-static void mungedip(int lineno, int next)
+static void mungedip (int lineno, int next)
{
int i = dip_for_drawing->last_color_change;
struct draw_info *dip_for_drawing_next = curr_drawinfo + (lineno + next);
dp_for_drawing = line_decisions + lineno;
dip_for_drawing = curr_drawinfo + lineno;
- mungedip(lineno, (dp_for_drawing->bplcon0 & 4) ? 2 : 1);
+ mungedip (lineno, (dp_for_drawing->bplcon0 & 4) ? 2 : 1);
switch (linestate[lineno]) {
case LINE_REMEMBERED_AS_PREVIOUS:
if (!warned)
if (plf2pri > 5 && bplplanecnt == 5 && !(currprefs.chipset_mask & CSMASK_AGA))
weird_bitplane_fix ();
- {
- if (dip_for_drawing->nr_sprites) {
- int i;
+ if (dip_for_drawing->nr_sprites) {
+ int i;
#ifdef AGA
- if (brdsprt)
- clear_bitplane_border_aga ();
+ if (brdsprt)
+ clear_bitplane_border_aga ();
#endif
- for (i = 0; i < dip_for_drawing->nr_sprites; i++) {
+ for (i = 0; i < dip_for_drawing->nr_sprites; i++) {
#ifdef AGA
- if (currprefs.chipset_mask & CSMASK_AGA)
- draw_sprites_aga (curr_sprite_entries + dip_for_drawing->first_sprite_entry + i);
- else
+ if (currprefs.chipset_mask & CSMASK_AGA)
+ draw_sprites_aga (curr_sprite_entries + dip_for_drawing->first_sprite_entry + i);
+ else
#endif
- draw_sprites_ecs (curr_sprite_entries + dip_for_drawing->first_sprite_entry + i);
- }
+ draw_sprites_ecs (curr_sprite_entries + dip_for_drawing->first_sprite_entry + i);
}
}
changed_prefs.gfx_filter_horiz_zoom_mult = 1000 / (changed_prefs.gfx_lores + 1);
changed_prefs.gfx_filter_vert_zoom_mult = (changed_prefs.gfx_linedbl + 1) * 500;
} else {
- *dst = *src;
+ *dst = *src;
}
break;
}
if (x <= 0)
return;
- switch(gfxvidinfo.pixbytes)
- {
+ switch (gfxvidinfo.pixbytes) {
case 1:
xlinebuffer[x] = (uae_u8)c8;
break;
xlinebuffer = gfxvidinfo.linemem;
if (xlinebuffer == 0)
xlinebuffer = row_map[line];
-
+
p = lightpen_cursor + y * LIGHTPEN_WIDTH;
for (i = 0; i < LIGHTPEN_WIDTH; i++) {
int xx = x + i - LIGHTPEN_WIDTH / 2;
lightpen_cy = maxvpos_max - 1;
for (i = 0; i < LIGHTPEN_HEIGHT; i++) {
- int line = lightpen_y + i - LIGHTPEN_HEIGHT / 2;
- if (line >= 0 || line < max_ypos_thisframe) {
+ int line = lightpen_y + i - LIGHTPEN_HEIGHT / 2;
+ if (line >= 0 || line < max_ypos_thisframe) {
draw_lightpen_cursor(lightpen_x, i, line, lightpen_cx > 0);
flush_line (line);
}
void drawing_init (void)
{
- gen_pfield_tables();
+ gen_pfield_tables ();
uae_sem_init (&gui_sem, 0, 1);
#ifdef PICASSO96
break;
}
} else if (currprefs.dfxclick[i] == -1) {
- wave_initialized = 1;
+ wave_initialized = 1;
for (j = 0; j < CLICK_TRACKS; j++)
drvs[i][DS_CLICK].lengths[j] = drvs[i][DS_CLICK].len;
sprintf (tmp, "%suae_data%cdrive_click_%s",
Returns the first node entry of an exec list or 0 if
empty
*************************************************************/
-static uae_u32 amiga_list_first(uae_u32 list)
+static uae_u32 amiga_list_first (uae_u32 list)
{
- uae_u32 node = get_long(list); /* lh_Head */
- if (!node) return 0;
- if (!get_long(node)) return 0; /* ln_Succ */
- return node;
+ uae_u32 node = get_long (list); /* lh_Head */
+ if (!node)
+ return 0;
+ if (!get_long (node))
+ return 0; /* ln_Succ */
+ return node;
}
/*************************************************************
Returns the next node of an exec node or 0 if it was the
last element
*************************************************************/
-static uae_u32 amiga_node_next(uae_u32 node)
+static uae_u32 amiga_node_next (uae_u32 node)
{
- uae_u32 next = get_long(node); /* ln_Succ */
- if (!next) return 0;
- if (!get_long(next)) return 0; /* ln_Succ */
- return next;
+ uae_u32 next = get_long (node); /* ln_Succ */
+ if (!next)
+ return 0;
+ if (!get_long (next))
+ return 0; /* ln_Succ */
+ return next;
}
/*************************************************************
is not possible, Size specified the number of bytes you
want to access
*************************************************************/
-static uae_u8 *amiga2native(uae_u32 aptr, int size)
+static uae_u8 *amiga2native (uae_u32 aptr, int size)
{
- addrbank bank = get_mem_bank(aptr);
+ addrbank bank = get_mem_bank (aptr);
- /* Check if the address can be translated to native */
- if (bank.check(aptr,size))
- {
- return bank.xlateaddr(aptr);
- }
- return NULL;
+ /* Check if the address can be translated to native */
+ if (bank.check (aptr, size)) {
+ return bank.xlateaddr (aptr);
+ }
+ return NULL;
}
/*************************************************************
Writes the Hunk and Offset of the given Address into buf
*************************************************************/
-static int enforcer_decode_hunk_and_offset(char *buf, uae_u32 pc)
+static int enforcer_decode_hunk_and_offset (char *buf, uae_u32 pc)
{
- uae_u32 sysbase = get_long(4);
- uae_u32 semaphore_list = sysbase + 532;
-
- /* First step is searching for the SegTracker semaphore */
- uae_u32 node = amiga_list_first(semaphore_list);
- while (node)
- {
- uae_u32 string = get_long(node+10); /* ln_Name */
- uae_u8 *native_string = amiga2native(string,100);
-
- if (native_string)
- {
- if (!strcmp(native_string,"SegTracker"))
- break;
- }
- node = amiga_node_next(node);
+ uae_u32 sysbase = get_long (4);
+ uae_u32 semaphore_list = sysbase + 532;
+
+ /* First step is searching for the SegTracker semaphore */
+ uae_u32 node = amiga_list_first (semaphore_list);
+ while (node) {
+ uae_u32 string = get_long (node + 10); /* ln_Name */
+ uae_u8 *native_string = amiga2native (string, 100);
+
+ if (native_string) {
+ if (!strcmp (native_string, "SegTracker"))
+ break;
}
-
- if (node)
- {
- /* We have found the segtracker semaphore. Soon after the
- * public documented semaphore structure Segtracker holds
- * an own list of all segements. We will use this list to
- * find out the hunk and offset (simliar to segtracker).
- *
- * Source of segtracker can be found at:
- * http://www.sinz.org/Michael.Sinz/Enforcer/SegTracker.c.html
- */
-
- uae_u32 seg_list = node + 46 + 4; /* sizeof(struct SignalSemaphore) + seg find */
-
- node = amiga_list_first(seg_list);
- while (node)
- {
- uae_u32 seg_entry = node + 12;
- uae_u32 address, size;
- int hunk = 0;
-
- /* Go through all entries until an address is 0
- * or the segment has been found */
- while ((address = get_long(seg_entry)))
- {
- size = get_long(seg_entry+4);
-
- if (pc >= address && pc < address + size)
- {
- uae_u32 name,offset;
- uae_u8 *native_name;
-
- offset = pc - address - 4;
- name = get_long(node + 8); /* ln_Name */
- if (name)
- {
- native_name = amiga2native(name,100);
- if (!native_name) native_name = "Unknown";
- } else native_name = "Unknown";
-
- sprintf(buf,"----> %08lx - \"%s\" Hunk %04lx Offset %08lx\n",pc,native_name,hunk,offset);
- return 1;
- }
-
- seg_entry += 8;
- hunk++;
- }
- node = amiga_node_next(node);
+ node = amiga_node_next (node);
+ }
+
+ if (node) {
+ /* We have found the segtracker semaphore. Soon after the
+ * public documented semaphore structure Segtracker holds
+ * an own list of all segements. We will use this list to
+ * find out the hunk and offset (simliar to segtracker).
+ *
+ * Source of segtracker can be found at:
+ * http://www.sinz.org/Michael.Sinz/Enforcer/SegTracker.c.html
+ */
+
+ uae_u32 seg_list = node + 46 + 4; /* sizeof(struct SignalSemaphore) + seg find */
+
+ node = amiga_list_first (seg_list);
+ while (node) {
+ uae_u32 seg_entry = node + 12;
+ uae_u32 address, size;
+ int hunk = 0;
+
+ /* Go through all entries until an address is 0
+ * or the segment has been found */
+ while ((address = get_long (seg_entry))) {
+ size = get_long (seg_entry + 4);
+
+ if (pc >= address && pc < address + size) {
+ uae_u32 name, offset;
+ uae_u8 *native_name;
+
+ offset = pc - address - 4;
+ name = get_long (node + 8); /* ln_Name */
+ if (name) {
+ native_name = amiga2native(name,100);
+ if (!native_name) native_name = "Unknown";
+ } else native_name = "Unknown";
+
+ sprintf (buf, "----> %08lx - \"%s\" Hunk %04lx Offset %08lx\n", pc, native_name, hunk, offset);
+ return 1;
}
+
+ seg_entry += 8;
+ hunk++;
+ }
+ node = amiga_node_next (node);
}
- return 0;
+ }
+ return 0;
}
/*************************************************************
Display the enforcer hit
*************************************************************/
-static void enforcer_display_hit(const char *addressmode, uae_u32 pc, uaecptr addr)
+static void enforcer_display_hit (const char *addressmode, uae_u32 pc, uaecptr addr)
{
- uae_u32 a7;
- uae_u32 sysbase;
- uae_u32 this_task;
- uae_u32 task_name;
- uae_u8 *native_task_name;
- int i,j;
- static char buf[256],instrcode[256];
- static char lines[INSTRUCTIONLINES/2][256];
- static uaecptr bestpc_array[INSTRUCTIONLINES/2][5];
- static int bestpc_idxs[INSTRUCTIONLINES/2];
- char *enforcer_buf_ptr = enforcer_buf;
- uaecptr bestpc,pospc,nextpc,temppc;
-
- if (enforcer_hit)
- return; /* our function itself generated a hit ;), avoid endless loop */
- if (regs.vbr < 0x100 && addr >= 0x0c && addr < 0x78)
- return;
-
- enforcer_hit = 1;
-
- if (!(sysbase = get_long(4)))
- goto end;
- if (!(this_task = get_long(sysbase + 276)))
- goto end;
-
- task_name = get_long(this_task + 10); /* ln_Name */
- native_task_name = amiga2native(task_name,100);
- /*if (strcmp(native_task_name,"c:MCP")!=0)
- {
- Exception (0x2d,0);
- }*/
- strcpy(enforcer_buf_ptr,"Enforcer Hit! Bad program\n");
- enforcer_buf_ptr += strlen(enforcer_buf_ptr);
-
- sprintf(buf,"Illegal %s: %08lx",addressmode, addr);
- sprintf(enforcer_buf_ptr,"%-48sPC: %0lx\n",buf, pc);
- enforcer_buf_ptr += strlen(enforcer_buf_ptr);
-
- /* Data registers */
- sprintf(enforcer_buf_ptr,"Data: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- m68k_dreg (®s, 0), m68k_dreg (®s, 1), m68k_dreg (®s, 2), m68k_dreg (®s, 3),
- m68k_dreg (®s, 4), m68k_dreg (®s, 5), m68k_dreg (®s, 6), m68k_dreg (®s, 7));
- enforcer_buf_ptr += strlen(enforcer_buf_ptr);
-
- /* Address registers */
- sprintf(enforcer_buf_ptr,"Addr: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- m68k_areg (®s, 0), m68k_areg (®s, 1), m68k_areg (®s, 2), m68k_areg (®s, 3),
- m68k_areg (®s, 4), m68k_areg (®s, 5), m68k_areg (®s, 6), m68k_areg (®s, 7));
- enforcer_buf_ptr += strlen(enforcer_buf_ptr);
-
- /* Stack */
- a7 = m68k_areg(®s,7);
- for (i = 0; i < 8 * STACKLINES; i++)
- {
- a7 -= 4;
- if (!(i % 8))
- {
- strcpy(enforcer_buf_ptr,"Stck:");
- enforcer_buf_ptr += strlen(enforcer_buf_ptr);
- }
- sprintf(enforcer_buf_ptr," %08lx",get_long(a7));
- enforcer_buf_ptr += strlen(enforcer_buf_ptr);
-
- if (i%8 == 7)
- *enforcer_buf_ptr++ = '\n';
+ uae_u32 a7;
+ uae_u32 sysbase;
+ uae_u32 this_task;
+ uae_u32 task_name;
+ uae_u8 *native_task_name;
+ int i, j;
+ static char buf[256],instrcode[256];
+ static char lines[INSTRUCTIONLINES/2][256];
+ static uaecptr bestpc_array[INSTRUCTIONLINES/2][5];
+ static int bestpc_idxs[INSTRUCTIONLINES/2];
+ char *enforcer_buf_ptr = enforcer_buf;
+ uaecptr bestpc, pospc, nextpc, temppc;
+
+ if (enforcer_hit)
+ return; /* our function itself generated a hit ;), avoid endless loop */
+ if (regs.vbr < 0x100 && addr >= 0x0c && addr < 0x78)
+ return;
+
+ enforcer_hit = 1;
+
+ if (!(sysbase = get_long (4)))
+ goto end;
+ if (!(this_task = get_long (sysbase + 276)))
+ goto end;
+
+ task_name = get_long (this_task + 10); /* ln_Name */
+ native_task_name = amiga2native (task_name, 100);
+ /*if (strcmp(native_task_name,"c:MCP")!=0)
+ {
+ Exception (0x2d,0);
+ }*/
+ strcpy (enforcer_buf_ptr, "Enforcer Hit! Bad program\n");
+ enforcer_buf_ptr += strlen (enforcer_buf_ptr);
+
+ sprintf (buf, "Illegal %s: %08lx", addressmode, addr);
+ sprintf (enforcer_buf_ptr, "%-48sPC: %0lx\n", buf, pc);
+ enforcer_buf_ptr += strlen (enforcer_buf_ptr);
+
+ /* Data registers */
+ sprintf (enforcer_buf_ptr, "Data: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ m68k_dreg (®s, 0), m68k_dreg (®s, 1), m68k_dreg (®s, 2), m68k_dreg (®s, 3),
+ m68k_dreg (®s, 4), m68k_dreg (®s, 5), m68k_dreg (®s, 6), m68k_dreg (®s, 7));
+ enforcer_buf_ptr += strlen (enforcer_buf_ptr);
+
+ /* Address registers */
+ sprintf(enforcer_buf_ptr, "Addr: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ m68k_areg (®s, 0), m68k_areg (®s, 1), m68k_areg (®s, 2), m68k_areg (®s, 3),
+ m68k_areg (®s, 4), m68k_areg (®s, 5), m68k_areg (®s, 6), m68k_areg (®s, 7));
+ enforcer_buf_ptr += strlen (enforcer_buf_ptr);
+
+ /* Stack */
+ a7 = m68k_areg (®s, 7);
+ for (i = 0; i < 8 * STACKLINES; i++) {
+ a7 -= 4;
+ if (!(i % 8)) {
+ strcpy (enforcer_buf_ptr, "Stck:");
+ enforcer_buf_ptr += strlen (enforcer_buf_ptr);
}
-
- /* Segtracker output */
- a7 = m68k_areg(®s,7);
- if (get_long(a7-4) != pc)
- {
- if (enforcer_decode_hunk_and_offset(buf,pc))
- {
- strcpy(enforcer_buf_ptr, buf);
- enforcer_buf_ptr += strlen(enforcer_buf_ptr);
- }
+ sprintf (enforcer_buf_ptr, " %08lx",get_long (a7));
+ enforcer_buf_ptr += strlen (enforcer_buf_ptr);
+
+ if (i%8 == 7)
+ *enforcer_buf_ptr++ = '\n';
+ }
+
+ /* Segtracker output */
+ a7 = m68k_areg (®s, 7);
+ if (get_long (a7 - 4) != pc) {
+ if (enforcer_decode_hunk_and_offset (buf, pc)) {
+ strcpy (enforcer_buf_ptr, buf);
+ enforcer_buf_ptr += strlen (enforcer_buf_ptr);
}
+ }
- for (i = 0; i < 8 * STACKLINES; i++)
- {
- a7 -= 4;
- if (enforcer_decode_hunk_and_offset(buf,get_long(a7)))
- {
- int l= strlen(buf);
-
- if (ENFORCER_BUF_SIZE - (enforcer_buf_ptr - enforcer_buf) > l + 256)
- {
- strcpy(enforcer_buf_ptr, buf);
- enforcer_buf_ptr += l;
- }
+ for (i = 0; i < 8 * STACKLINES; i++) {
+ a7 -= 4;
+ if (enforcer_decode_hunk_and_offset (buf, get_long (a7))) {
+ int l = strlen (buf);
+
+ if (ENFORCER_BUF_SIZE - (enforcer_buf_ptr - enforcer_buf) > l + 256) {
+ strcpy (enforcer_buf_ptr, buf);
+ enforcer_buf_ptr += l;
+ }
+ }
+ }
+
+ /* Decode the instructions around the pc where the enforcer hit was caused.
+ *
+ * At first, the area before the pc, this not always done correctly because
+ * it's done backwards */
+ temppc = pc;
+
+ memset (bestpc_array, 0, sizeof (bestpc_array));
+ for (i = 0; i < INSTRUCTIONLINES / 2; i++)
+ bestpc_idxs[i] = -1;
+
+ for (i = 0; i < INSTRUCTIONLINES / 2; i++) {
+ pospc = temppc;
+ bestpc = 0;
+
+ if (bestpc_idxs[i] == -1) {
+ for (j = 0; j < 5; j++) {
+ pospc -= 2;
+ sm68k_disasm (buf, NULL, pospc, &nextpc);
+ if (nextpc == temppc) {
+ bestpc_idxs[i] = j;
+ bestpc_array[i][j] = bestpc = pospc;
}
+ }
+ } else {
+ bestpc = bestpc_array[i][bestpc_idxs[i]];
}
- /* Decode the instructions around the pc where the enforcer hit was caused.
- *
- * At first, the area before the pc, this not always done correctly because
- * it's done backwards */
- temppc = pc;
+ if (!bestpc) {
+ /* there was no best pc found, so it is high probable that
+ * a former used best pc was wrong.
+ *
+ * We trace back and use the former best pc instead
+ */
- memset(bestpc_array,0,sizeof(bestpc_array));
- for (i=0;i<INSTRUCTIONLINES/2;i++)
- bestpc_idxs[i] = -1;
+ int former_idx;
+ int leave = 0;
- for (i=0;i<INSTRUCTIONLINES/2;i++)
- {
- pospc = temppc;
- bestpc = 0;
-
- if (bestpc_idxs[i] == -1)
- {
- for (j=0;j<5;j++)
- {
- pospc -= 2;
- sm68k_disasm(buf, NULL, pospc, &nextpc);
- if (nextpc == temppc)
- {
- bestpc_idxs[i] = j;
- bestpc_array[i][j] = bestpc = pospc;
- }
- }
- } else
- {
- bestpc = bestpc_array[i][bestpc_idxs[i]];
+ do {
+ if (!i) {
+ leave = 1;
+ break;
}
+ i--;
+ former_idx = bestpc_idxs[i];
+ bestpc_idxs[i] = -1;
+ bestpc_array[i][former_idx] = 0;
- if (!bestpc)
- {
- /* there was no best pc found, so it is high probable that
- * a former used best pc was wrong.
- *
- * We trace back and use the former best pc instead
- */
-
- int former_idx;
- int leave = 0;
-
- do
- {
- if (!i)
- {
- leave = 1;
- break;
- }
- i--;
- former_idx = bestpc_idxs[i];
- bestpc_idxs[i] = -1;
- bestpc_array[i][former_idx]=0;
-
- for (j=former_idx-1;j>=0;j--)
- {
- if (bestpc_array[i][j])
- {
- bestpc_idxs[i] = j;
- break;
- }
- }
- } while (bestpc_idxs[i] == -1);
- if (leave) break;
- if (i) temppc = bestpc_array[i-1][bestpc_idxs[i-1]];
- else temppc = pc;
- i--; /* will be increased in after continue */
- continue;
+ for (j = former_idx - 1; j >= 0; j--) {
+ if (bestpc_array[i][j]) {
+ bestpc_idxs[i] = j;
+ break;
+ }
}
-
- sm68k_disasm(buf, instrcode, bestpc, NULL);
- sprintf(lines[i],"%08lx : %-20s %s\n",bestpc,instrcode,buf);
- temppc = bestpc;
+ } while (bestpc_idxs[i] == -1);
+ if (leave)
+ break;
+ if (i)
+ temppc = bestpc_array[i-1][bestpc_idxs[i-1]];
+ else
+ temppc = pc;
+ i--; /* will be increased in after continue */
+ continue;
}
- i--;
- for (;i>=0;i--)
- {
- strcpy(enforcer_buf_ptr,lines[i]);
- enforcer_buf_ptr += strlen(enforcer_buf_ptr);
- }
-
- /* Now the instruction after the pc including the pc */
- temppc = pc;
- for (i=0;i<(INSTRUCTIONLINES+1)/2;i++)
- {
- sm68k_disasm(buf, instrcode, temppc, &nextpc);
- sprintf(enforcer_buf_ptr,"%08lx : %s %-20s %s\n",temppc,(i==0?"*":" "),instrcode,buf);
- enforcer_buf_ptr += strlen(enforcer_buf_ptr);
- temppc = nextpc;
- }
-
- if (!native_task_name) native_task_name = "Unknown";
- sprintf(enforcer_buf_ptr,"Name: \"%s\"\n\n",native_task_name);
- enforcer_buf_ptr += strlen(enforcer_buf_ptr);
-
- console_out(enforcer_buf);
- write_log(enforcer_buf);
- sleep_millis (5);
- flashscreen = 30;
-
-end:
- enforcer_hit = 0;
+ sm68k_disasm (buf, instrcode, bestpc, NULL);
+ sprintf (lines[i], "%08lx : %-20s %s\n", bestpc, instrcode, buf);
+ temppc = bestpc;
+ }
+
+ i--;
+ for (; i >= 0; i--) {
+ strcpy (enforcer_buf_ptr, lines[i]);
+ enforcer_buf_ptr += strlen (enforcer_buf_ptr);
+ }
+
+ /* Now the instruction after the pc including the pc */
+ temppc = pc;
+ for (i = 0; i < (INSTRUCTIONLINES + 1) / 2; i++) {
+ sm68k_disasm (buf, instrcode, temppc, &nextpc);
+ sprintf (enforcer_buf_ptr, "%08lx : %s %-20s %s\n", temppc,
+ (i == 0 ? "*" : " "), instrcode, buf);
+ enforcer_buf_ptr += strlen (enforcer_buf_ptr);
+ temppc = nextpc;
+ }
+
+ if (!native_task_name)
+ native_task_name = "Unknown";
+ sprintf (enforcer_buf_ptr, "Name: \"%s\"\n\n", native_task_name);
+ enforcer_buf_ptr += strlen (enforcer_buf_ptr);
+
+ console_out (enforcer_buf);
+ write_log (enforcer_buf);
+ sleep_millis (5);
+ flashscreen = 30;
+
+ end:
+ enforcer_hit = 0;
}
uae_u32 REGPARAM2 chipmem_lget2 (uaecptr addr)
{
- uae_u32 *m;
+ uae_u32 *m;
addr -= chipmem_start & chipmem_mask;
addr &= chipmem_mask;
m = (uae_u32 *)(chipmemory + addr);
- if (ISILLEGAL(addr))
- {
- enforcer_display_hit("LONG READ from",(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
+ if (ISILLEGAL (addr))
+ {
+ enforcer_display_hit ("LONG READ from",(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
if (enforcermode & 1)
- {
- set_special (®s, SPCFLAG_TRAP);
- }
- }
+ set_special (®s, SPCFLAG_TRAP);
+ }
return do_get_mem_long (m);
}
addr &= chipmem_mask;
m = (uae_u16 *)(chipmemory + addr);
- if (ISILLEGAL(addr))
- {
- enforcer_display_hit("WORD READ from",(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
+ if (ISILLEGAL (addr))
+ {
+ enforcer_display_hit ("WORD READ from",(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
if (enforcermode & 1)
- {
- set_special (®s, SPCFLAG_TRAP);
- }
- }
+ set_special (®s, SPCFLAG_TRAP);
+ }
return do_get_mem_word (m);
}
addr -= chipmem_start & chipmem_mask;
addr &= chipmem_mask;
- if (ISILLEGAL(addr))
- {
- enforcer_display_hit("BYTE READ from",(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
- if (enforcermode & 1)
- {
- set_special (®s, SPCFLAG_TRAP);
- }
- }
+ if (ISILLEGAL (addr))
+ {
+ enforcer_display_hit ("BYTE READ from",(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
+ if (enforcermode & 1)
+ set_special (®s, SPCFLAG_TRAP);
+ }
return chipmemory[addr];
}
addr &= chipmem_mask;
m = (uae_u32 *)(chipmemory + addr);
- if (ISILLEGAL(addr))
- {
- enforcer_display_hit("LONG WRITE to",(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
- if (enforcermode & 1)
- {
- if ( addr!=0x100 ) set_special (®s, SPCFLAG_TRAP);
- }
- }
+ if (ISILLEGAL (addr))
+ {
+ enforcer_display_hit ("LONG WRITE to",(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
+ if (enforcermode & 1)
+ if (addr != 0x100)
+ set_special (®s, SPCFLAG_TRAP);
+ }
do_put_mem_long (m, l);
}
addr &= chipmem_mask;
m = (uae_u16 *)(chipmemory + addr);
- if (ISILLEGAL(addr))
- {
- enforcer_display_hit("WORD WRITE to",(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
+ if (ISILLEGAL (addr))
+ {
+ enforcer_display_hit ("WORD WRITE to",(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
if (enforcermode & 1)
- {
- set_special (®s, SPCFLAG_TRAP);
- }
- }
+ set_special (®s, SPCFLAG_TRAP);
+ }
do_put_mem_word (m, w);
}
addr -= chipmem_start & chipmem_mask;
addr &= chipmem_mask;
- if (ISILLEGAL(addr))
- {
- enforcer_display_hit("BYTE WRITE to",(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
- if (enforcermode & 1)
- {
- set_special (®s, SPCFLAG_TRAP);
- }
- }
+ if (ISILLEGAL (addr))
+ {
+ enforcer_display_hit ("BYTE WRITE to",(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
+ if (enforcermode & 1)
+ set_special (®s, SPCFLAG_TRAP);
+ }
chipmemory[addr] = b;
}
uae_u32 REGPARAM2 dummy_lget2 (uaecptr addr)
{
special_mem_r;
- enforcer_display_hit("LONG READ from",(uae_u32)(regs.pc_p - NMEM_OFFSET), addr);
- if (enforcermode & 1)
- {
- set_special (®s, SPCFLAG_TRAP);
- return 0;
- }
- return 0xbadedeef;
+ enforcer_display_hit ("LONG READ from",(uae_u32)(regs.pc_p - NMEM_OFFSET), addr);
+ if (enforcermode & 1) {
+ set_special (®s, SPCFLAG_TRAP);
+ return 0;
+ }
+ return 0xbadedeef;
}
#ifdef JIT
uae_u32 REGPARAM2 dummy_wget2 (uaecptr addr)
{
-
special_mem_r;
#ifdef JIT
- if( addr >= 0x00F10000 && addr <= 0x00F7FFFF )
- {
- if( !warned_JIT_0xF10000 )
- {
- warned_JIT_0xF10000 = 1;
- enforcer_display_hit("LONG READ from",(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
- }
- return 0;
+ if (addr >= 0x00F10000 && addr <= 0x00F7FFFF) {
+ if (!warned_JIT_0xF10000) {
+ warned_JIT_0xF10000 = 1;
+ enforcer_display_hit ("LONG READ from",(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
}
+ return 0;
+ }
#endif
- enforcer_display_hit("WORD READ from",(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
- if (enforcermode & 1)
- {
- set_special (®s, SPCFLAG_TRAP);
- return 0;
- }
- return 0xbadf;
+ enforcer_display_hit ("WORD READ from",(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
+ if (enforcermode & 1) {
+ set_special (®s, SPCFLAG_TRAP);
+ return 0;
+ }
+ return 0xbadf;
}
uae_u32 REGPARAM2 dummy_bget2 (uaecptr addr)
{
special_mem_r;
- enforcer_display_hit("BYTE READ from",(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
- if (enforcermode & 1)
- {
- set_special (®s, SPCFLAG_TRAP);
- return 0;
- }
- return 0xbadedeef;
+ enforcer_display_hit ("BYTE READ from",(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
+ if (enforcermode & 1) {
+ set_special (®s, SPCFLAG_TRAP);
+ return 0;
+ }
+ return 0xbadedeef;
}
void REGPARAM2 dummy_lput2 (uaecptr addr, uae_u32 l)
{
special_mem_w;
- enforcer_display_hit("LONG WRITE to",(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
- if (enforcermode & 1)
- {
- set_special (®s, SPCFLAG_TRAP);
- return;
- }
+ enforcer_display_hit ("LONG WRITE to",(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
+ if (enforcermode & 1) {
+ set_special (®s, SPCFLAG_TRAP);
+ return;
+ }
}
void REGPARAM2 dummy_wput2 (uaecptr addr, uae_u32 w)
{
special_mem_w;
- enforcer_display_hit("WORD WRITE to",(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
- if (enforcermode & 1)
- {
- set_special (®s, SPCFLAG_TRAP);
- return;
- }
+ enforcer_display_hit ("WORD WRITE to",(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
+ if (enforcermode & 1) {
+ set_special (®s, SPCFLAG_TRAP);
+ return;
+ }
}
void REGPARAM2 dummy_bput2 (uaecptr addr, uae_u32 b)
{
special_mem_w;
- enforcer_display_hit("BYTE WRITE to",(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
- if (enforcermode & 1)
- {
- set_special (®s, SPCFLAG_TRAP);
- return;
- }
+ enforcer_display_hit ("BYTE WRITE to",(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
+ if (enforcermode & 1) {
+ set_special (®s, SPCFLAG_TRAP);
+ return;
+ }
}
int REGPARAM2 dummy_check2 (uaecptr addr, uae_u32 size)
{
special_mem_r;
- enforcer_display_hit("CHECK from ",(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
+ enforcer_display_hit ("CHECK from ",(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
return 0;
}
exceptions so enforcer can use it. Returns 1 if enforcer
is enabled
*************************************************************/
-int enforcer_enable(int enfmode)
+int enforcer_enable (int enfmode)
{
- extern addrbank chipmem_bank,dummy_bank;
- enforcermode=enfmode;
- if (!enforcer_installed)
- {
- saved_dummy_lget = dummy_bank.lget;
- saved_dummy_wget = dummy_bank.wget;
- saved_dummy_bget = dummy_bank.bget;
- saved_dummy_lput = dummy_bank.lput;
- saved_dummy_wput = dummy_bank.wput;
- saved_dummy_bput = dummy_bank.bput;
- saved_chipmem_lget = chipmem_bank.lget;
- saved_chipmem_wget = chipmem_bank.wget;
- saved_chipmem_bget = chipmem_bank.bget;
- saved_chipmem_lput = chipmem_bank.lput;
- saved_chipmem_wput = chipmem_bank.wput;
- saved_chipmem_bput = chipmem_bank.bput;
- saved_chipmem_xlate = chipmem_bank.xlateaddr;
- saved_chipmem_check = chipmem_bank.check;
-
- dummy_bank.lget = dummy_lget2;
- dummy_bank.wget = dummy_wget2;
- dummy_bank.bget = dummy_bget2;
- dummy_bank.lput = dummy_lput2;
- dummy_bank.wput = dummy_wput2;
- dummy_bank.bput = dummy_bput2;
- chipmem_bank.lget = chipmem_lget2;
- chipmem_bank.wget = chipmem_wget2;
- chipmem_bank.bget = chipmem_bget2;
- chipmem_bank.lput = chipmem_lput2;
- chipmem_bank.wput = chipmem_wput2;
- chipmem_bank.bput = chipmem_bput2;
- chipmem_bank.xlateaddr = chipmem_xlate2;
- chipmem_bank.check = chipmem_check2;
-
- enforcer_installed = 1;
- }
- return 1;
+ extern addrbank chipmem_bank, dummy_bank;
+ enforcermode = enfmode;
+ if (!enforcer_installed) {
+ saved_dummy_lget = dummy_bank.lget;
+ saved_dummy_wget = dummy_bank.wget;
+ saved_dummy_bget = dummy_bank.bget;
+ saved_dummy_lput = dummy_bank.lput;
+ saved_dummy_wput = dummy_bank.wput;
+ saved_dummy_bput = dummy_bank.bput;
+ saved_chipmem_lget = chipmem_bank.lget;
+ saved_chipmem_wget = chipmem_bank.wget;
+ saved_chipmem_bget = chipmem_bank.bget;
+ saved_chipmem_lput = chipmem_bank.lput;
+ saved_chipmem_wput = chipmem_bank.wput;
+ saved_chipmem_bput = chipmem_bank.bput;
+ saved_chipmem_xlate = chipmem_bank.xlateaddr;
+ saved_chipmem_check = chipmem_bank.check;
+
+ dummy_bank.lget = dummy_lget2;
+ dummy_bank.wget = dummy_wget2;
+ dummy_bank.bget = dummy_bget2;
+ dummy_bank.lput = dummy_lput2;
+ dummy_bank.wput = dummy_wput2;
+ dummy_bank.bput = dummy_bput2;
+ chipmem_bank.lget = chipmem_lget2;
+ chipmem_bank.wget = chipmem_wget2;
+ chipmem_bank.bget = chipmem_bget2;
+ chipmem_bank.lput = chipmem_lput2;
+ chipmem_bank.wput = chipmem_wput2;
+ chipmem_bank.bput = chipmem_bput2;
+ chipmem_bank.xlateaddr = chipmem_xlate2;
+ chipmem_bank.check = chipmem_check2;
+
+ enforcer_installed = 1;
+ }
+ return 1;
}
/*************************************************************
Disable Enforcer like support
*************************************************************/
-int enforcer_disable(void)
+int enforcer_disable (void)
{
- if (enforcer_installed)
- {
- dummy_bank.lget = saved_dummy_lget;
- dummy_bank.wget = saved_dummy_wget;
- dummy_bank.bget = saved_dummy_bget;
- dummy_bank.lput = saved_dummy_lput;
- dummy_bank.wput = saved_dummy_wput;
- dummy_bank.bput = saved_dummy_bput;
- chipmem_bank.lget = saved_chipmem_lget;
- chipmem_bank.wget = saved_chipmem_wget;
- chipmem_bank.bget = saved_chipmem_bget;
- chipmem_bank.lput = saved_chipmem_lput;
- chipmem_bank.wput = saved_chipmem_wput;
- chipmem_bank.bput = saved_chipmem_bput;
- chipmem_bank.xlateaddr = saved_chipmem_xlate;
- chipmem_bank.check = saved_chipmem_check;
-
- enforcer_installed = 0;
- }
- return 1;
+ if (enforcer_installed) {
+ dummy_bank.lget = saved_dummy_lget;
+ dummy_bank.wget = saved_dummy_wget;
+ dummy_bank.bget = saved_dummy_bget;
+ dummy_bank.lput = saved_dummy_lput;
+ dummy_bank.wput = saved_dummy_wput;
+ dummy_bank.bput = saved_dummy_bput;
+ chipmem_bank.lget = saved_chipmem_lget;
+ chipmem_bank.wget = saved_chipmem_wget;
+ chipmem_bank.bget = saved_chipmem_bget;
+ chipmem_bank.lput = saved_chipmem_lput;
+ chipmem_bank.wput = saved_chipmem_wput;
+ chipmem_bank.bput = saved_chipmem_bput;
+ chipmem_bank.xlateaddr = saved_chipmem_xlate;
+ chipmem_bank.check = saved_chipmem_check;
+
+ enforcer_installed = 0;
+ }
+ return 1;
}
#endif
static void ersatz_doio (void)
{
- uaecptr request = m68k_areg(®s, 1);
+ uaecptr request = m68k_areg (®s, 1);
switch (get_word (request + 0x1C)) {
case 9: /* TD_MOTOR is harmless */
+ return;
case 2: case 0x8002: /* READ commands */
break;
put_long (a, 0xF8001A);
}
regs.isp = regs.msp = regs.usp = 0x800;
- m68k_areg(®s, 7) = 0x80000;
+ m68k_areg (®s, 7) = 0x80000;
regs.intmask = 0;
/* Build a dummy execbase */
- put_long (4, m68k_areg(®s, 6) = 0x676);
+ put_long (4, m68k_areg (®s, 6) = 0x676);
put_byte (0x676 + 0x129, 0);
for (f = 1; f < 105; f++) {
put_word (0x676 - 6*f, 0x4EF9);
put_long (request + 0x28, 0x4000);
put_long (request + 0x2C, 0);
put_long (request + 0x24, 0x200 * 4);
- m68k_areg(®s, 1) = request;
+ m68k_areg (®s, 1) = request;
ersatz_doio ();
/* kickstart disk loader */
- if (get_long(0x4000) == 0x4b49434b) {
+ if (get_long (0x4000) == 0x4b49434b) {
/* a kickstart disk was found in drive 0! */
write_log ("Loading Kickstart rom image from Kickstart disk\n");
/* print some notes... */
put_long (request + 0x28, 0xF80000);
put_long (request + 0x2C, 0x200);
put_long (request + 0x24, 0x200 * 512);
- m68k_areg(®s, 1) = request;
+ m68k_areg (®s, 1) = request;
ersatz_doio ();
/* read rom image once again to mirror address space.
put_long (request + 0x28, 0xFC0000);
put_long (request + 0x2C, 0x200);
put_long (request + 0x24, 0x200 * 512);
- m68k_areg(®s, 1) = request;
+ m68k_areg (®s, 1) = request;
ersatz_doio ();
disk_eject (0);
break;
case EOP_AVAILMEM:
- m68k_dreg(®s, 0) = m68k_dreg(®s, 1) & 4 ? 0 : 0x70000;
+ m68k_dreg (®s, 0) = m68k_dreg (®s, 1) & 4 ? 0 : 0x70000;
break;
case EOP_ALLOCMEM:
- m68k_dreg(®s, 0) = m68k_dreg(®s, 1) & 4 ? 0 : 0x0F000;
+ m68k_dreg (®s, 0) = m68k_dreg (®s, 1) & 4 ? 0 : 0x0F000;
break;
case EOP_ALLOCABS:
- m68k_dreg(®s, 0) = m68k_areg(®s, 1);
+ m68k_dreg (®s, 0) = m68k_areg (®s, 1);
break;
case EOP_NIMP:
write_log ("Unimplemented Kickstart function called\n");
ersatz_failed ();
-
+
/* fall through */
case EOP_LOOP:
m68k_setpc (®s, 0xF80010);
{
write_log ("expamem_map_clear() got called. Shouldn't happen.\n");
}
+
static void expamem_init_clear (void)
{
memset (expamem, 0xff, sizeof expamem);
}
+
static void expamem_init_clear2 (void)
{
- expamem_init_clear();
+ expamem_init_clear ();
ecard = MAX_EXPANSION_BOARDS - 1;
}
static void expamem_init_last (void)
{
- write_log("Memory map after autoconfig:\n");
+ write_log ("Memory map after autoconfig:\n");
memory_map_dump();
- expamem_init_clear();
+ expamem_init_clear ();
}
static uae_u32 REGPARAM3 expamem_lget (uaecptr) REGPARAM;
#endif
addr &= 0xFFFF;
b = expamem[addr];
- //write_log("%08x=%02.2X\n", addr, b);
+ //write_log ("%08x=%02.2X\n", addr, b);
return b;
}
#ifdef JIT
special_mem |= S_READ;
#endif
- write_log("catweasel_lget @%08.8X!\n",addr);
+ write_log ("catweasel_lget @%08.8X!\n",addr);
return 0;
}
#ifdef JIT
special_mem |= S_READ;
#endif
- write_log("catweasel_wget @%08.8X!\n",addr);
+ write_log ("catweasel_wget @%08.8X!\n",addr);
return 0;
}
#ifdef JIT
special_mem |= S_WRITE;
#endif
- write_log("catweasel_lput @%08.8X=%08.8X!\n",addr,l);
+ write_log ("catweasel_lput @%08.8X=%08.8X!\n",addr,l);
}
static void REGPARAM2 catweasel_wput (uaecptr addr, uae_u32 w)
#ifdef JIT
special_mem |= S_WRITE;
#endif
- write_log("catweasel_wput @%08.8X=%04.4X!\n",addr,w);
+ write_log ("catweasel_wput @%08.8X=%04.4X!\n",addr,w);
}
static void REGPARAM2 catweasel_bput (uaecptr addr, uae_u32 b)
catweasel_mask = (cwc.type >= CATWEASEL_TYPE_MK3) ? 0xffff : 0x1ffff;
- expamem_init_clear();
+ expamem_init_clear ();
expamem_write (0x00, (cwc.type >= CATWEASEL_TYPE_MK3 ? Z2_MEM_64KB : Z2_MEM_128KB) | zorroII);
uae_u16 mid = currprefs.cs_a2091 ? commodore : uae_id;
uae_u8 pid = currprefs.cs_a2091 ? commodore_a2091_ram : 1;
- expamem_init_clear();
+ expamem_init_clear ();
if (allocated_fastmem == 0x100000)
expamem_write (0x00, Z2_MEM_1MB + add_memory + zorroII);
else if (allocated_fastmem == 0x200000)
0x01, 0x06 /* da_BootPoint */
};
- expamem_init_clear();
+ expamem_init_clear ();
expamem_write (0x00, Z2_MEM_64KB | rom_card | zorroII);
expamem_write (0x08, no_shutup);
int z3fs = ((expamem_hi | (expamem_lo >> 4)) << 16);
if (z3fastmem_start != z3fs) {
- write_log("WARNING: Z3FAST mapping changed from $%lx to $%lx\n", z3fastmem_start, z3fs);
- map_banks(&dummy_bank, z3fastmem_start >> 16, currprefs.z3fastmem_size >> 16,
- allocated_z3fastmem);
+ write_log ("WARNING: Z3FAST mapping changed from $%lx to $%lx\n", z3fastmem_start, z3fs);
+ map_banks (&dummy_bank, z3fastmem_start >> 16, currprefs.z3fastmem_size >> 16,
+ allocated_z3fastmem);
z3fastmem_start = z3fs;
map_banks (&z3fastmem_bank, z3fastmem_start >> 16, currprefs.z3fastmem_size >> 16,
- allocated_z3fastmem);
+ allocated_z3fastmem);
}
write_log ("Fastmem (32bit): mapped @$%lx: %d MB Zorro III fast memory \n",
- z3fastmem_start, allocated_z3fastmem / 0x100000);
+ z3fastmem_start, allocated_z3fastmem / 0x100000);
}
static void expamem_init_z3fastmem (void)
: allocated_z3fastmem == 0x20000000 ? Z2_MEM_512MB
: Z2_MEM_1GB);
- expamem_init_clear();
+ expamem_init_clear ();
expamem_write (0x00, add_memory | zorroIII | code);
expamem_write (0x08, care_addr | no_shutup | force_z3 | (allocated_z3fastmem > 0x800000 ? ext_size : Z3_MEM_AUTO));
: allocated_gfxmem == 0x800000 ? Z3_MEM_8MB
: 0);
- expamem_init_clear();
+ expamem_init_clear ();
expamem_write (0x00, zorroIII | code);
expamem_write (0x08, care_addr | no_shutup | force_z3 | ext_size | subsize);
void expamem_next(void)
{
- expamem_init_clear();
+ expamem_init_clear ();
map_banks (&expamem_bank, 0xE8, 1, 0);
++ecard;
if (ecard < MAX_EXPANSION_BOARDS)
- (*card_init[ecard]) ();
+ (*card_init[ecard]) ();
else
- expamem_init_clear2 ();
+ expamem_init_clear2 ();
}
static void expamem_init_cdtv (void)
#include <assert.h>
#ifdef DEBUG
-static char *datalog(uae_u8 *src, int len)
+static char *datalog (uae_u8 *src, int len)
{
static char buf[1000];
static int offset;
offset2 = offset;
buf[offset++]='\'';
- while(len--) {
+ while (len--) {
sprintf (buf + offset, "%02.2X", src[i]);
offset += 2;
i++;
return buf + offset2;
}
#else
-static char *datalog(uae_u8 *src, int len) { return ""; }
+static char *datalog (uae_u8 *src, int len) { return ""; }
#endif
#ifdef DEBUG
//huffman tree architecture decode
temp = *stream++;
- temp2 = 0x80;
+ temp2 = 0x80;
stream = expand_tree (stream, &root);
if (temp2 == 0x80)
stream--;
stream = values_tree8 (stream, &root);
//sub-stream data decode
- temp2 = 0;
+ temp2 = 0;
for (i = 0; i < size; i++) {
uae_u32 v;
uae_u8 decode = 1;
static void bit_drop_next (FDI *fdi)
{
if (fdi->nextdrop > 0) {
- outlog("multiple bit_drop_next() called");
+ outlog ("multiple bit_drop_next() called");
} else if (fdi->nextdrop < 0) {
fdi->nextdrop = 0;
- debuglog(":DNN:");
+ debuglog (":DNN:");
return;
}
- debuglog(":DN:");
+ debuglog (":DN:");
fdi->nextdrop = 1;
}
static void bit_dedrop (FDI *fdi)
{
if (fdi->nextdrop) {
- outlog("bit_drop_next called before bit_dedrop");
+ outlog ("bit_drop_next called before bit_dedrop");
}
fdi->nextdrop = -1;
- debuglog(":BDD:");
+ debuglog (":BDD:");
}
/* add one byte */
int i, bits = (fdi->track_src[0] << 8) | fdi->track_src[1];
uae_u8 b;
fdi->track_src += 2;
- debuglog ("s0a:bits=%d,data=%s", bits, datalog(fdi->track_src, (bits + 7) / 8));
+ debuglog ("s0a:bits=%d,data=%s", bits, datalog (fdi->track_src, (bits + 7) / 8));
while (bits >= 8) {
byte_add (fdi, *fdi->track_src++);
bits -= 8;
int i, bits = ((fdi->track_src[0] << 8) | fdi->track_src[1]) + 65536;
uae_u8 b;
fdi->track_src += 2;
- debuglog ("s0b:bits=%d,data=%s", bits, datalog(fdi->track_src, (bits + 7) / 8));
+ debuglog ("s0b:bits=%d,data=%s", bits, datalog (fdi->track_src, (bits + 7) / 8));
while (bits >= 8) {
byte_add (fdi, *fdi->track_src++);
bits -= 8;
uae_u8 b;
fdi->track_src += 2;
bit_drop_next (fdi);
- debuglog ("s0c:bits=%d,data=%s", bits, datalog(fdi->track_src, (bits + 7) / 8));
+ debuglog ("s0c:bits=%d,data=%s", bits, datalog (fdi->track_src, (bits + 7) / 8));
while (bits >= 8) {
byte_mfm_add (fdi, *fdi->track_src++);
bits -= 8;
uae_u8 b;
fdi->track_src += 2;
bit_drop_next (fdi);
- debuglog ("s0d:bits=%d,data=%s", bits, datalog(fdi->track_src, (bits + 7) / 8));
+ debuglog ("s0d:bits=%d,data=%s", bits, datalog (fdi->track_src, (bits + 7) / 8));
while (bits >= 8) {
byte_mfm_add (fdi, *fdi->track_src++);
bits -= 8;
while (getmfmword (mbuf) == 0x4489)
mbuf+= 1 * 2;
- mbuf2 = mbuf + 8;
+ mbuf2 = mbuf + 8;
odd = getmfmlong (mbuf);
even = getmfmlong (mbuf + 2 * 2);
- mbuf += 4 * 2;
+ mbuf += 4 * 2;
id = (odd << 1) | even;
trackoffs = (id & 0xff00) >> 8;
if (trackoffs + 1 > drvsec) {
- outlog("illegal sector offset %d\n",trackoffs);
+ outlog ("illegal sector offset %d\n",trackoffs);
ok = 0;
mbuf = mbuf2;
continue;
even = getmfmlong (mbuf + 2 * 2);
mbuf += 4 * 2;
if (((odd << 1) | even) != chksum) {
- outlog("sector %d header crc error\n", trackoffs);
+ outlog ("sector %d header crc error\n", trackoffs);
ok = 0;
mbuf = mbuf2;
continue;
}
- outlog("sector %d header crc ok\n", trackoffs);
+ outlog ("sector %d header crc ok\n", trackoffs);
if (((id & 0x00ff0000) >> 16) != (uae_u32)fdi->current_track) {
- outlog("illegal track number %d <> %d\n",fdi->current_track,(id & 0x00ff0000) >> 16);
+ outlog ("illegal track number %d <> %d\n",fdi->current_track,(id & 0x00ff0000) >> 16);
ok++;
mbuf = mbuf2;
continue;
}
mbuf += 256 * 2;
if (chksum) {
- outlog("sector %d data checksum error\n",trackoffs);
+ outlog ("sector %d data checksum error\n",trackoffs);
ok = 0;
} else if (sectable[trackoffs]) {
- outlog("sector %d already found?\n", trackoffs);
+ outlog ("sector %d already found?\n", trackoffs);
mbuf = mbuf2;
} else {
- outlog("sector %d ok\n",trackoffs);
- if (slabel) outlog("(non-empty sector header)\n");
+ outlog ("sector %d ok\n",trackoffs);
+ if (slabel) outlog ("(non-empty sector header)\n");
sectable[trackoffs] = 1;
secwritten++;
if (trackoffs == 9)
word_post_mfm_add (fdi, mfmbuf[i]);
}
-static void amiga_sector_header (FDI *fdi, uae_u8 *header, uae_u8 *data, int sector, int untilgap)
+static void amiga_sector_header (FDI *fdi, uae_u8 *header, uae_u8 *data, int sector, int untilgap)
{
uae_u8 headerbuf[4], databuf[16];
uae_u32 deven, dodd, hck;
else
memset (databuf, 0, 16);
- deven = ((headerbuf[0] << 24) | (headerbuf[1] << 16)
+ deven = ((headerbuf[0] << 24) | (headerbuf[1] << 16)
| (headerbuf[2] << 8) | (headerbuf[3]));
dodd = deven >> 1;
deven &= 0x55555555;
}
/* standard super-extended Amiga sector header */
-static void s20(FDI *fdi)
+static void s20 (FDI *fdi)
{
bit_drop_next (fdi);
- debuglog ("s20:header=%s,data=%s", datalog(fdi->track_src, 4), datalog(fdi->track_src + 4, 16));
+ debuglog ("s20:header=%s,data=%s", datalog (fdi->track_src, 4), datalog (fdi->track_src + 4, 16));
amiga_sector_header (fdi, fdi->track_src, fdi->track_src + 4, 0, 0);
fdi->track_src += 4 + 16;
}
/* standard extended Amiga sector header */
-static void s21(FDI *fdi)
+static void s21 (FDI *fdi)
{
bit_drop_next (fdi);
- debuglog ("s21:header=%s", datalog(fdi->track_src, 4));
+ debuglog ("s21:header=%s", datalog (fdi->track_src, 4));
amiga_sector_header (fdi, fdi->track_src, 0, 0, 0);
fdi->track_src += 4;
}
/* standard Amiga sector header */
-static void s22(FDI *fdi)
+static void s22 (FDI *fdi)
{
bit_drop_next (fdi);
- debuglog("s22:sector=%d,untilgap=%d", fdi->track_src[0], fdi->track_src[1]);
+ debuglog ("s22:sector=%d,untilgap=%d", fdi->track_src[0], fdi->track_src[1]);
amiga_sector_header (fdi, 0, 0, fdi->track_src[0], fdi->track_src[1]);
fdi->track_src += 2;
}
/* standard 512-byte, CRC-correct Amiga data */
-static void s23(FDI *fdi)
+static void s23 (FDI *fdi)
{
- debuglog("s23:data=%s", datalog (fdi->track_src, 512));
+ debuglog ("s23:data=%s", datalog (fdi->track_src, 512));
amiga_data (fdi, fdi->track_src);
fdi->track_src += 512;
}
/* not-decoded, 128*2^x-byte, CRC-correct Amiga data */
-static void s24(FDI *fdi)
+static void s24 (FDI *fdi)
{
int shift = *fdi->track_src++;
- debuglog("s24:shift=%d,data=%s", shift, datalog (fdi->track_src, 128 << shift));
+ debuglog ("s24:shift=%d,data=%s", shift, datalog (fdi->track_src, 128 << shift));
amiga_data_raw (fdi, fdi->track_src, 0, 128 << shift);
fdi->track_src += 128 << shift;
}
/* not-decoded, 128*2^x-byte, CRC-incorrect Amiga data */
-static void s25(FDI *fdi)
+static void s25 (FDI *fdi)
{
int shift = *fdi->track_src++;
- debuglog("s25:shift=%d,crc=%s,data=%s", shift, datalog (fdi->track_src, 4), datalog (fdi->track_src + 4, 128 << shift));
+ debuglog ("s25:shift=%d,crc=%s,data=%s", shift, datalog (fdi->track_src, 4), datalog (fdi->track_src + 4, 128 << shift));
amiga_data_raw (fdi, fdi->track_src + 4, fdi->track_src, 128 << shift);
fdi->track_src += 4 + (128 << shift);
}
/* standard extended Amiga sector */
-static void s26(FDI *fdi)
+static void s26 (FDI *fdi)
{
s21 (fdi);
- debuglog("s26:data=%s", datalog (fdi->track_src, 512));
+ debuglog ("s26:data=%s", datalog (fdi->track_src, 512));
amiga_data (fdi, fdi->track_src);
fdi->track_src += 512;
}
/* standard short Amiga sector */
-static void s27(FDI *fdi)
+static void s27 (FDI *fdi)
{
s22 (fdi);
- debuglog("s27:data=%s", datalog (fdi->track_src, 512));
+ debuglog ("s27:data=%s", datalog (fdi->track_src, 512));
amiga_data (fdi, fdi->track_src);
fdi->track_src += 512;
}
int i, gap3;
uae_u8 *p = fdi->track_src;
- switch (max_sector)
- {
+ switch (max_sector) {
case 9:
gap3 = 40;
break;
int i, gap3;
uae_u8 *p = fdi->track_src;
- switch (max_sector)
- {
+ switch (max_sector) {
case 8:
gap3 = 116;
break;
outlog ("%06.6X %06.6X %02.2X:",fdi->track_src - start_src + 0x200, fdi->out/8, fdi->track_type);
oldout = fdi->out;
decode_sectors_described_track[fdi->track_type](fdi);
- outlog(" %d\n", fdi->out - oldout);
+ outlog (" %d\n", fdi->out - oldout);
oldout = fdi->out;
if (fdi->out < 0 || fdi->err) {
outlog ("\nin %d bytes, out %d bits\n", fdi->track_src - fdi->track_src_buffer, fdi->out);
return -1;
}
} while (fdi->track_type != 0xff);
- outlog("\n");
+ outlog ("\n");
fix_mfm_sync (fdi);
return fdi->out;
}
static int pulse_limitval = 15; /* tolerance of 15% */
static struct pulse_sample psarray[FDI_MAX_ARRAY];
static int array_index;
-static unsigned long total;
+static unsigned long total;
static int totaldiv;
static void init_array(unsigned long standard_MFM_2_bit_cell_size, int nb_of_bits)
for (j = real_size; j > 1; j--)
addbit (d, 0);
addbit (d, 1);
- for (j = 0; j < real_size; j++)
- *pt++ = (uae_u16)(pulse / real_size);
+ for (j = 0; j < real_size; j++)
+ *pt++ = (uae_u16)(pulse / real_size);
}
/* prepares for the next pulse */
int real_size, i, j, nexti, eodat, outstep, randval;
int indexoffset = *indexoffsetp;
uae_u8 *d = fdi->track_dst_buffer;
- uae_u16 *pt = fdi->track_dst_buffer_timing;
+ uae_u16 *pt = fdi->track_dst_buffer_timing;
uae_u32 ref_pulse, pulse;
long jitter;
idxp[i] = sum;
}
len = totalavg / 100000;
- debuglog("totalavg=%u index=%d (%d) maxidx=%d weakbits=%d len=%d\n",
+ debuglog ("totalavg=%u index=%d (%d) maxidx=%d weakbits=%d len=%d\n",
totalavg, indexoffset, maxidx, weakbits, len);
cache->avgp = avgp;
cache->idxp = idxp;
fdi_free (fdi->track_src_buffer);
fdi_free (fdi->track_dst_buffer);
fdi_free (fdi->track_dst_buffer_timing);
- for (i = 0; i < MAX_TRACKS; i++) {
+ for (i = 0; i < MAX_TRACKS; i++) {
struct fdi_cache *c = &fdi->cache[i];
if (c->idx_free)
fdi_free (c->idxp);
uae_u32 crc = get_crc32(fdi->header, 508);
uae_u32 crc2 = (fdi->header[508] << 24) | (fdi->header[509] << 16) | (fdi->header[510] << 8) | fdi->header[511];
if (crc != crc2) {
- outlog("FDI: header checksum error\n");
+ outlog ("FDI: header checksum error\n");
fdi_free(fdi);
return NULL;
}
cache->avgp, cache->minp, cache->maxp, cache->idxp,
cache->maxidx, &idx, cache->pulses, mfm);
//fdi2_gcr_decode (fdi, totalavg, avgp, minp, maxp, idxp, idx_off1, idx_off2, idx_off3, maxidx, pulses);
- debuglog("track %d: nbits=%d avg len=%.2f weakbits=%d idx=%d\n",
+ debuglog ("track %d: nbits=%d avg len=%.2f weakbits=%d idx=%d\n",
track, bitoffset, (double)cache->totalavg / bitoffset, cache->weakbits, cache->indexoffset);
len = fdi->out;
if (cache->weakbits >= 10 && multirev)
* (May - August 1989)
*
* Known limitations:
- * Does not support ACTION_INHIBIT (big deal).
- * Does not support several 2.0+ packet types.
- * Does not support removable volumes.
+ * Does not support several (useless) 2.0+ packet types.
* May not return the correct error code in some cases.
* Does not check for sane values passed by AmigaDOS. May crash the emulation
* if passed garbage values.
mi->ismounted = 1;
if (uci->rootdir && strlen(uci->rootdir) == 0)
return FILESYS_VIRTUAL;
+ if (my_existsfile (uci->rootdir))
+ return FILESYS_VIRTUAL;
if (my_getvolumeinfo (uci->rootdir) < 0)
return -1;
return FILESYS_VIRTUAL;
s[strlen(s) - 1] = 0;
}
+char *filesys_createvolname (const char *volname, const char *rootdir, const char *def)
+{
+ char *nvol = NULL;
+ int i, archivehd;
+
+ archivehd = -1;
+ if (my_existsfile(rootdir))
+ archivehd = 1;
+ else if (my_existsdir(rootdir))
+ archivehd = 0;
+
+ if ((!volname || strlen (volname) == 0) && rootdir && archivehd >= 0) {
+ for (i = strlen (rootdir) - 1; i >= 0; i--) {
+ char c = rootdir[i];
+ if (c == ':' || c == '/' || c == '\\') {
+ if (i == strlen (rootdir) - 1)
+ continue;
+ i++;
+ break;
+ }
+ }
+ if (i >= 0)
+ nvol = my_strdup (rootdir + i);
+ }
+ if (!nvol && archivehd >= 0) {
+ char *s = NULL;
+ if (volname && strlen(volname) > 0)
+ nvol = my_strdup (volname);
+ else
+ nvol = my_strdup (def);
+ }
+ if (!nvol)
+ nvol = my_strdup ("");
+ stripsemicolon(nvol);
+ return nvol;
+}
+
static int set_filesys_volume(const char *rootdir, int *flags, int *readonly, int *emptydrive, struct zvolume **zvp)
{
*emptydrive = 0;
if (my_existsfile(rootdir)) {
- struct zvolume *zv;
- zv = zfile_fopen_archive(rootdir);
- if (!zv) {
+ struct zvolume *zv;
+ zv = zfile_fopen_archive(rootdir);
+ if (!zv) {
write_log ("'%s' is not a supported archive file\n", rootdir);
return -1;
}
*flags = MYVOLUMEINFO_ARCHIVE;
*readonly = 1;
} else {
- *flags = my_getvolumeinfo (rootdir);
- if (*flags < 0) {
+ *flags = my_getvolumeinfo (rootdir);
+ if (*flags < 0) {
write_log ("directory '%s' not found, mounting as empty drive\n", rootdir);
*emptydrive = 1;
*flags = 0;
break;
}
if (nr == MAX_FILESYSTEM_UNITS) {
- write_log("No slot allocated for this unit\n");
+ write_log ("No slot allocated for this unit\n");
return -1;
}
}
for (i = 0; i < MAX_FILESYSTEM_UNITS; i++) {
- if (nr == i || !mountinfo.ui[i].open)
+ if (nr == i || !mountinfo.ui[i].open)
continue;
if (strlen(rootdir) > 0 && !strcmpi (mountinfo.ui[i].rootdir, rootdir)) {
write_log ("directory/hardfile '%s' already added\n", rootdir);
if (set_filesys_volume(rootdir, &flags, &readonly, &emptydrive, &ui->zarchive) < 0)
return -1;
if (!emptydrive) {
- ui->volname = my_strdup (volname);
- stripsemicolon(ui->volname);
+ ui->volname = filesys_createvolname (volname, rootdir, "harddrive");
}
ui->volflags = flags;
} else {
goto err;
}
if ((ui->hf.blocksize & (ui->hf.blocksize - 1)) != 0 || ui->hf.blocksize == 0) {
- write_log("Hardfile %s bad blocksize\n", ui->hf.device_name);
+ write_log ("Hardfile %s bad blocksize\n", ui->hf.device_name);
goto err;
}
if ((ui->hf.secspertrack || ui->hf.surfaces || ui->hf.reservedblocks) &&
(ui->hf.secspertrack < 1 || ui->hf.surfaces < 1 || ui->hf.surfaces > 1023 ||
ui->hf.reservedblocks < 0 || ui->hf.reservedblocks > 1023) != 0) {
- write_log("Hardfile %s bad hardfile geometry\n", ui->hf.device_name);
+ write_log ("Hardfile %s bad hardfile geometry\n", ui->hf.device_name);
goto err;
}
if (ui->hf.blocksize > ui->hf.size || ui->hf.size == 0) {
- write_log("Hardfile %s Hardfile too small\n", ui->hf.device_name);
+ write_log ("Hardfile %s Hardfile too small\n", ui->hf.device_name);
goto err;
}
ui->hf.nrcyls = (int)(ui->hf.secspertrack * ui->hf.surfaces ? (ui->hf.size / ui->hf.blocksize) / (ui->hf.secspertrack * ui->hf.surfaces) : 0);
return &uip[nr].hf;
}
-/* minimal AmigaDOS definitions */
+/* minimal AmigaDOS definitions */
/* field offsets in DosPacket */
#define dp_Type 8
char *partname;
} Notify;
+typedef struct exallkey {
+ uae_u32 id;
+ void *dirhandle;
+ char *fn;
+} ExAllKey;
+
/* Since ACTION_EXAMINE_NEXT is so braindamaged, we have to keep
* some of these around
*/
-#define EXKEYS 100
+#define EXKEYS 128
+#define EXALLKEYS 100
#define MAX_AINO_HASH 128
#define NOTIFY_HASH_SIZE 127
int next_exkey;
unsigned long total_locked_ainos;
+ /* ExAll */
+ ExAllKey exalls[EXALLKEYS];
+ int exallid;
+
/* Keys */
struct key *keys;
static char buf[1024];
unsigned int i = 0;
do {
- buf[i] = get_byte(addr);
+ buf[i] = get_byte (addr);
addr++;
} while (buf[i++] && i < sizeof(buf));
return buf;
{
static char buf[256];
int i;
- int n = get_byte(addr);
+ int n = get_byte (addr);
addr++;
for (i = 0; i < n; i++, addr++)
- buf[i] = get_byte(addr);
+ buf[i] = get_byte (addr);
buf[i] = 0;
return buf;
}
static char *bstr (Unit *unit, uaecptr addr)
{
int i;
- int n = get_byte(addr);
+ int n = get_byte (addr);
addr++;
for (i = 0; i < n; i++, addr++)
- unit->tmpbuf3[i] = get_byte(addr);
+ unit->tmpbuf3[i] = get_byte (addr);
unit->tmpbuf3[i] = 0;
return unit->tmpbuf3;
}
addr++;
for (i = 0; i < n; i++, addr++) {
- uae_u8 c = get_byte(addr);
+ uae_u8 c = get_byte (addr);
unit->tmpbuf3[i] = c;
if (c == '/' || (c == ':' && colon_seen++ == 0))
p = unit->tmpbuf3 + i + 1;
}
static Unit *units = 0;
-static int unit_num = 0;
static Unit*
find_unit (uaecptr port)
return u;
}
+
+static void *fs_opendir (Unit *u, const char *nname)
+{
+ if (u->volflags & MYVOLUMEINFO_ARCHIVE)
+ return zfile_opendir_archive (nname);
+ else
+ return my_opendir (nname);
+}
+static void fs_closedir (Unit *u, void *d)
+{
+ if (u->volflags & MYVOLUMEINFO_ARCHIVE)
+ zfile_closedir_archive (d);
+ else
+ my_closedir (d);
+}
+static void *fs_open (Unit *unit, const char *name, int flags)
+{
+ int isarch = unit->volflags & MYVOLUMEINFO_ARCHIVE;
+ if (isarch)
+ return zfile_open_archive(name, flags);
+ else
+ return my_open(name, flags);
+}
+static void fs_close(Unit *unit, void *fd)
+{
+ int isarch = unit->volflags & MYVOLUMEINFO_ARCHIVE;
+ if (isarch)
+ zfile_close_archive(fd);
+ else
+ my_close(fd);
+}
+static unsigned int fs_read (Unit *unit, void *d, void *b, unsigned int size)
+{
+ int isarch = unit->volflags & MYVOLUMEINFO_ARCHIVE;
+ if (isarch)
+ return zfile_read_archive(d, b, size);
+ else
+ return my_read (d, b, size);
+}
+static unsigned int fs_lseek (Unit *unit, void *d, unsigned int offset, int whence)
+{
+ int isarch = unit->volflags & MYVOLUMEINFO_ARCHIVE;
+ if (isarch)
+ return zfile_lseek_archive(d, offset, whence);
+ else
+ return my_lseek (d, offset, whence);
+}
+
static void set_volume_name(Unit *unit)
{
int namelen;
namelen = strlen (unit->ui.volname);
put_byte (unit->volume + 44, namelen);
for (i = 0; i < namelen; i++)
- put_byte (unit->volume + 45 + i, unit->ui.volname[i]);
+ put_byte (unit->volume + 45 + i, unit->ui.volname[i]);
put_byte (unit->volume + 45 + namelen, 0);
unit->rootnode.aname = unit->ui.volname;
unit->rootnode.nname = unit->ui.rootdir;
static int filesys_isvolume(Unit *unit)
{
- return get_byte(unit->volume + 44);
+ return get_byte (unit->volume + 44);
}
static void clear_exkeys(Unit *unit)
unit->examine_keys[i].curr_file = 0;
unit->examine_keys[i].uniq = 0;
}
+ for (i = 0; i < EXALLKEYS; i++) {
+ fs_closedir (unit, unit->exalls[i].dirhandle);
+ unit->exalls[i].dirhandle = NULL;
+ xfree (unit->exalls[i].fn);
+ unit->exalls[i].fn = NULL;
+ unit->exalls[i].id = 0;
+ }
+ unit->exallid = 0;
unit->next_exkey = 1;
a = &unit->rootnode;
while (a) {
}
}
-int filesys_eject(int nr)
+int filesys_eject (int nr)
{
UnitInfo *ui = &mountinfo.ui[nr];
Unit *u = ui->self;
return 0;
if (!filesys_isvolume(u))
return 0;
- zfile_fclose_archive(u->zarchive);
+ zfile_fclose_archive (u->zarchive);
u->zarchive = NULL;
u->mountcount++;
- write_log("FILESYS: removed volume '%s'\n", u->ui.volname);
+ write_log ("FILESYS: removed volume '%s'\n", u->ui.volname);
flush_cache(u, -1);
- put_byte(u->volume + 172 - 32, -1);
+ put_byte (u->volume + 172 - 32, -1);
uae_Signal(get_long(u->volume + 176 - 32), 1 << 17);
return 1;
}
-void filesys_vsync(void)
+void filesys_vsync (void)
{
Unit *u;
if (u->reinsertdelay > 0) {
u->reinsertdelay--;
if (u->reinsertdelay == 0) {
- filesys_insert(u->unit, u->newvolume, u->newrootdir, u->newreadonly, u->newflags);
- xfree(u->newvolume);
+ filesys_insert (u->unit, u->newvolume, u->newrootdir, u->newreadonly, u->newflags);
+ xfree (u->newvolume);
u->newvolume = NULL;
- xfree(u->newrootdir);
+ xfree (u->newrootdir);
u->newrootdir = NULL;
}
}
}
}
-int filesys_insert(int nr, char *volume, char *rootdir, int readonly, int flags)
+int filesys_insert (int nr, char *volume, char *rootdir, int readonly, int flags)
{
+ struct uaedev_config_info *uci;
int emptydrive = 0;
UnitInfo *ui;
Unit *u;
if (nr < 0) {
for (u = units; u; u = u->next) {
- if (is_hardfile(u->unit) == FILESYS_VIRTUAL) {
- if (!filesys_isvolume(u))
+ if (is_hardfile (u->unit) == FILESYS_VIRTUAL) {
+ if (!filesys_isvolume (u))
break;
}
}
if (!u) {
for (u = units; u; u = u->next) {
- if (is_hardfile(u->unit) == FILESYS_VIRTUAL) {
+ if (is_hardfile (u->unit) == FILESYS_VIRTUAL) {
if (mountinfo.ui[u->unit].wasisempty)
break;
}
ui = &mountinfo.ui[nr];
u = ui->self;
}
+ uci = &currprefs.mountconfig[nr];
- if (u->reinsertdelay)
- return -1;
if (!ui->open || u == NULL)
return 0;
+ if (u->reinsertdelay)
+ return -1;
if (is_hardfile(nr) != FILESYS_VIRTUAL)
return 0;
- if (filesys_isvolume(u)) {
+ if (filesys_isvolume (u)) {
u->reinsertdelay = 100;
u->newflags = flags;
u->newreadonly = readonly;
- u->newrootdir = my_strdup(rootdir);
- u->newvolume = my_strdup(volume);
+ u->newrootdir = my_strdup (rootdir);
+ u->newvolume = my_strdup (volume);
filesys_eject(nr);
- write_log("FILESYS: delayed insert %d '%s' ('%s')\n", nr, volume, rootdir);
+ if (!rootdir || strlen (rootdir) == 0)
+ u->reinsertdelay = 0;
+ if (u->reinsertdelay > 0)
+ write_log ("FILESYS: delayed insert %d '%s' ('%s')\n", nr, volume, rootdir);
return -1;
}
u->mountcount++;
- clear_exkeys(u);
+ clear_exkeys (u);
xfree (u->ui.rootdir);
- ui->rootdir = u->ui.rootdir = my_strdup(rootdir);
+ ui->rootdir = u->ui.rootdir = my_strdup (rootdir);
flush_cache(u, -1);
if (set_filesys_volume (rootdir, &flags, &readonly, &emptydrive, &u->zarchive) < 0)
return 0;
if (emptydrive)
return 0;
xfree (u->ui.volname);
- if (volume) {
- ui->volname = u->ui.volname = my_strdup(volume);
- } else {
- char *p = strrchr (rootdir, '\\');
- if (!p)
- p = strrchr (rootdir, '/');
- if (p)
- ui->volname = u->ui.volname = my_strdup(p + 1);
- else
- ui->volname = u->ui.volname = my_strdup("removable");
- }
- set_volume_name(u);
- write_log("FILESYS: inserted volume %d '%s' ('%s')\n", nr, volume, rootdir);
+ ui->volname = u->ui.volname = filesys_createvolname (volume, rootdir, "removable");
+ set_volume_name (u);
+ write_log ("FILESYS: inserted volume %d '%s' ('%s')\n", nr, volume, rootdir);
ui->readonly = readonly;
ui->volflags = u->volflags = u->ui.volflags = flags;
+ strcpy (uci->volname, ui->volname);
+ strcpy (uci->rootdir, rootdir);
+ uci->readonly = readonly;
put_byte (u->volume + 44, 0);
- put_byte(u->volume + 172 - 32, 1);
- uae_Signal(get_long(u->volume + 176 - 32), 1 << 17);
+ put_byte (u->volume + 172 - 32, 1);
+ uae_Signal (get_long(u->volume + 176 - 32), 1 << 17);
return 1;
}
return 0;
}
-static void *fs_open (Unit *unit, const char *name, int flags)
-{
- int isarch = unit->volflags & MYVOLUMEINFO_ARCHIVE;
- if (isarch)
- return zfile_open_archive(name, flags);
- else
- return my_open(name, flags);
-}
-static void fs_close(Unit *unit, void *fd)
-{
- int isarch = unit->volflags & MYVOLUMEINFO_ARCHIVE;
- if (isarch)
- zfile_close_archive(fd);
- else
- my_close(fd);
-}
-static unsigned int fs_read (Unit *unit, void *d, void *b, unsigned int size)
-{
- int isarch = unit->volflags & MYVOLUMEINFO_ARCHIVE;
- if (isarch)
- return zfile_read_archive(d, b, size);
- else
- return my_read (d, b, size);
-}
-static unsigned int fs_lseek (Unit *unit, void *d, unsigned int offset, int whence)
-{
- int isarch = unit->volflags & MYVOLUMEINFO_ARCHIVE;
- if (isarch)
- return zfile_lseek_archive(d, offset, whence);
- else
- return my_lseek (d, offset, whence);
-}
-
static void prepare_for_open (char *name)
{
#if 0
int i = 0;
int cnt = 100;
- write_log("FILESYS: flushing cache unit %d (max %d items)\n", unit->unit, num);
+ write_log ("FILESYS: flushing cache unit %d (max %d items)\n", unit->unit, num);
if (num == 0)
num = -1;
while (i < num || num < 0) {
aino_test (parent);
if (parent && !parent->locked_children) {
for (;;) {
- a_inode *aino = *aip;
- aino_test (aino);
- if (aino == 0)
+ a_inode *aino = *aip;
+ aino_test (aino);
+ if (aino == 0)
break;
/* Not recyclable if next == 0 (i.e., not chained into
recyclable list), or if parent directory is being
aip = &aino->sibling;
} else {
if (aino->shlock > 0 || aino->elock)
- write_log ("panic: freeing locked a_inode!\n");
+ write_log ("panic: freeing locked a_inode!\n");
de_recycle_aino (unit, aino);
dispose_aino (unit, aip, aino);
i++;
}
}
}
- if (unit->rootnode.next != unit->rootnode.prev) {
+ { //if (unit->rootnode.next != unit->rootnode.prev) {
/* In the previous loop, we went through all children of one
parent. Re-arrange the recycled list so that we'll find a
different parent the next time around.
static int fill_file_attrs(Unit *u, a_inode *base, a_inode *c)
{
if (u->volflags & MYVOLUMEINFO_ARCHIVE) {
- int isdir, flags;
- char *comment;
- zfile_fill_file_attrs_archive(c->nname, &isdir, &flags, &comment);
- c->dir = isdir;
- c->amigaos_mode = flags;
- c->comment = comment;
+ int isdir, flags;
+ char *comment;
+ zfile_fill_file_attrs_archive(c->nname, &isdir, &flags, &comment);
+ c->dir = isdir;
+ c->amigaos_mode = flags;
+ c->comment = comment;
return 1;
} else {
return fsdb_fill_file_attrs (base, c);
unit->ui.wasisempty = uinfo->wasisempty;
}
-static Unit *startup_create_unit (UnitInfo *uinfo)
+static Unit *startup_create_unit (UnitInfo *uinfo, int num)
{
int i;
Unit *unit, *u;
unit->volume = 0;
unit->port = m68k_areg (®s, 5);
- unit->unit = unit_num++;
+ unit->unit = num;
startup_update_unit (unit, uinfo);
}
uinfo = mountinfo.ui + i;
- unit = startup_create_unit (uinfo);
+ unit = startup_create_unit (uinfo, i);
unit->volflags = uinfo->volflags;
/* write_comm_pipe_int (unit->ui.unit_pipe, -1, 1);*/
current = next;
}
if (!current) {
- write_log("tried to unlock non-existing lock %x\n", lock);
+ write_log ("tried to unlock non-existing lock %x\n", lock);
return;
}
put_long (current << 2, get_long (lock));
}
static void
-action_lock(Unit *unit, dpacket packet)
+action_lock (Unit *unit, dpacket packet)
{
uaecptr lock = GET_PCK_ARG1 (packet) << 2;
uaecptr name = GET_PCK_ARG2 (packet) << 2;
PUT_PCK_RES1 (packet, 0);
return;
}
- action_dup_lock_2 (unit, packet, get_long(lock + 4));
+ action_dup_lock_2 (unit, packet, get_long (lock + 4));
}
return -1;
}
+static ExAllKey *getexall (Unit *unit, int id)
+{
+ int i;
+ if (id < 0) {
+ for (i = 0; i < EXALLKEYS; i++) {
+ if (unit->exalls[i].id == 0) {
+ unit->exallid++;
+ unit->exalls[i].id = unit->exallid;
+ return &unit->exalls[i];
+ }
+ }
+ } else {
+ for (i = 0; i < EXALLKEYS; i++) {
+ if (unit->exalls[i].id == id)
+ return &unit->exalls[i];
+ }
+ }
+ return NULL;
+}
+
+
+#if 1
+
+static int exalldo (uaecptr exalldata, uae_u32 exalldatasize, uae_u32 type, uaecptr control, Unit *unit, a_inode *aino)
+{
+ uaecptr exp = exalldata;
+ int i;
+ int size, size2;
+ int entrytype;
+ char *x = NULL, *comment = NULL;
+ uae_u32 flags = 15, days, mins, ticks;
+ struct stat statbuf;
+ int fsdb_can = fsdb_cando (unit);
+
+ memset(&statbuf, 0, sizeof statbuf);
+ if (unit->volflags & MYVOLUMEINFO_ARCHIVE)
+ zfile_stat_archive (aino->nname, &statbuf);
+ else
+ stat (aino->nname, &statbuf);
+
+ if (aino->parent == 0) {
+ entrytype = 2;
+ x = unit->ui.volname;
+ } else {
+ entrytype = aino->dir ? 2 : -3;
+ x = aino->aname;
+ }
+
+ size = 0;
+ size2 = 4;
+ if (control >= 1) {
+ size2 += 4;
+ size += strlen (x) + 1;
+ size = (size + 3) & ~3;
+ }
+ if (control >= 2)
+ size2 += 4;
+ if (control >= 3)
+ size2 += 4;
+ if (control >= 4) {
+ flags = fsdb_can ? aino->amigaos_mode : fsdb_mode_supported(aino);
+ size2 += 4;
+ }
+ if (control >= 5) {
+ get_time (statbuf.st_mtime, &days, &mins, &ticks);
+ size2 += 12;
+ }
+ if (control >= 6) {
+ size2 += 4;
+ if (aino->comment == 0 || !fsdb_can)
+ comment = "";
+ else
+ comment = aino->comment;
+ size += strlen (comment) + 1;
+ size = (size + 3) & ~3;
+ }
+
+ i = get_long (control + 0);
+ while (i > 0) {
+ exp = get_long (exp); /* ed_Next */
+ i--;
+ }
+
+ if (exalldata + exalldatasize - exp < size + size2)
+ return 0; /* not enough space */
+
+ write_log("%d, %08x: '%s'%s\n", get_long (control + 0), exp, x, aino->dir ? " [DIR]" : "");
+
+ put_long (exp, exp + size + size2); /* ed_Next */
+ if (control >= 1) {
+ put_long (exp + 4, exp + size2);
+ for (i = 0; i <= strlen (x); i++) {
+ put_byte (exp + size2, x[i]);
+ size2++;
+ }
+ }
+ if (control >= 2)
+ put_long (exp + 8, entrytype);
+ if (control >= 3)
+ put_long (exp + 12, statbuf.st_size);
+ if (control >= 4)
+ put_long (exp + 16, flags);
+ if (control >= 5) {
+ put_long (exp + 20, days);
+ put_long (exp + 24, mins);
+ put_long (exp + 28, ticks);
+ }
+ if (control >= 6) {
+ put_long (exp + 32, exp + size2);
+ put_byte (exp + size2, strlen (comment));
+ for (i = 0; i <= strlen (comment); i++) {
+ put_byte (exp + size2, comment[i]);
+ size2++;
+ }
+ }
+ put_long (control + 0, get_long (control + 0) + 1);
+ return 1;
+}
+
+static int action_examine_all_do (Unit *unit, uaecptr lock, ExAllKey *eak, uaecptr exalldata, uae_u32 exalldatasize, uae_u32 type, uaecptr control)
+{
+ a_inode *aino, *base;
+ int ok;
+ uae_u32 err;
+ int isarch = unit->volflags & MYVOLUMEINFO_ARCHIVE;
+ void *d;
+ char fn[MAX_DPATH];
+
+ if (lock != 0)
+ base = lookup_aino (unit, get_long (lock + 4));
+ if (base == 0)
+ base = &unit->rootnode;
+ for (;;) {
+ d = eak->dirhandle;
+ if (!eak->fn) {
+ do {
+ if (isarch)
+ ok = zfile_readdir_archive(d, fn);
+ else
+ ok = my_readdir (d, fn);
+ } while (ok && !isarch && fsdb_name_invalid (fn));
+ if (!ok)
+ return 0;
+ } else {
+ strcpy (fn, eak->fn);
+ xfree (eak->fn);
+ eak->fn = NULL;
+ }
+ aino = lookup_child_aino_for_exnext (unit, base, fn, &err);
+ if (!aino)
+ return 0;
+ eak->id = unit->exallid++;
+ put_long (control + 4, eak->id);
+ if (!exalldo (exalldata, exalldatasize, type, control, unit, aino)) {
+ eak->fn = my_strdup (fn); /* no space in exallstruct, save current entry */
+ break;
+ }
+ }
+ return 1;
+}
+
static int action_examine_all (Unit *unit, dpacket packet)
{
uaecptr lock = GET_PCK_ARG1 (packet) << 2;
uae_u32 type = GET_PCK_ARG4 (packet);
uaecptr control = GET_PCK_ARG5 (packet);
- return 0;
-}
+ ExAllKey *eak = NULL;
+ int isarch = unit->volflags & MYVOLUMEINFO_ARCHIVE;
+ a_inode *base;
+ void *d;
+ int id, ok, i;
+ uaecptr exp;
+
+ ok = 0;
+
+ write_log ("exall: %08x %08x-%08x %d %d %08x\n", lock, exalldata, exalldata + exalldatasize, exalldatasize, type, control);
+ write_log ("exall: MatchString %08x, MatchFunc %08x\n", get_long (control + 8), get_long (control + 12));
+
+ put_long (control + 0, 0); /* eac_Entries */
+
+ if (kickstart_version < 36)
+ return 0;
+
+ if (type == 0 || type > 6) {
+ PUT_PCK_RES1 (packet, DOS_FALSE);
+ PUT_PCK_RES2 (packet, ERROR_BAD_NUMBER);
+ return 1;
+ }
+
+ PUT_PCK_RES1 (packet, DOS_TRUE);
+ id = get_long (control + 4);
+ if (id) {
+ eak = getexall (unit, id);
+ if (!eak) {
+ write_log ("FILESYS: EXALL non-existing ID %d\n", id);
+ goto fail;
+ }
+ if (!action_examine_all_do (unit, lock, eak, exalldata, exalldatasize, type, control))
+ goto fail;
+ } else {
+ eak = getexall (unit, -1);
+ if (!eak)
+ goto fail;
+ if (lock != 0)
+ base = lookup_aino (unit, get_long (lock + 4));
+ if (base == 0)
+ base = &unit->rootnode;
+ write_log("exall: '%s'\n", base->nname);
+ d = fs_opendir (unit, base->nname);
+ if (!d)
+ goto fail;
+ eak->dirhandle = d;
+ put_long (control + 4, eak->id);
+ if (!action_examine_all_do (unit, lock, eak, exalldata, exalldatasize, type, control))
+ goto fail;
+ }
+ ok = 1;
+
+fail:
+ /* Clear last ed_Next. This "list" is quite non-Amiga like.. */
+ exp = exalldata;
+ i = get_long (control + 0);
+ for (;;) {
+ if (i <= 1) {
+ put_long (exp, 0);
+ break;
+ }
+ exp = get_long (exp); /* ed_Next */
+ i--;
+ }
+ write_log("ok=%d, eac_Entries = %d\n", ok, get_long (control + 0));
+
+ if (!ok) {
+ PUT_PCK_RES1 (packet, DOS_FALSE);
+ PUT_PCK_RES2 (packet, ERROR_NO_MORE_ENTRIES);
+ if (eak) {
+ eak->id = 0;
+ fs_closedir (unit, eak->dirhandle);
+ }
+ xfree (eak->fn);
+ eak->fn = NULL;
+ }
+ return 1;
+}
+#endif
static void action_examine_object (Unit *unit, dpacket packet)
{
a_inode *aino;
int isarch = unit->volflags & MYVOLUMEINFO_ARCHIVE;
- if (isarch)
- d = zfile_opendir_archive(base->nname);
- else
- d = my_opendir (base->nname);
+ d = fs_opendir (unit, base->nname);
if (!d)
return;
for (aino = base->child; aino; aino = aino->sibling) {
being ExNext()ed, and it will increment the locked counts. */
aino = lookup_child_aino_for_exnext (unit, base, fn, &err);
}
- if (isarch)
- zfile_closedir_archive(d);
- else
- my_closedir (d);
+ fs_closedir (unit, d);
}
static void do_examine (Unit *unit, dpacket packet, ExamineKey *ek, uaecptr info)
break;
name = ek->curr_file->nname;
get_fileinfo (unit, packet, info, ek->curr_file);
- ek->curr_file = ek->curr_file->sibling;
+ ek->curr_file = ek->curr_file->sibling;
if (!(unit->volflags & MYVOLUMEINFO_ARCHIVE) && !fsdb_exists(name)) {
TRACE (("%s orphaned", name));
continue;
k->notifyactive = create ? 1 : 0;
if (create && isarch)
- fsdb_set_file_attrs (aino);
+ fsdb_set_file_attrs (aino);
put_long (fh + 36, k->uniq);
if (create == 2)
int i;
PUT_PCK_RES1 (packet, actual);
for (i = 0; i < actual; i++)
- put_byte(addr + i, buf[i]);
+ put_byte (addr + i, buf[i]);
k->file_pos += actual;
}
xfree (buf);
}
for (i = 0; i < size; i++)
- buf[i] = get_byte(addr + i);
+ buf[i] = get_byte (addr + i);
actual = my_write (k->fd, buf, size);
xfree (buf);
}
if (fsdb_cando (unit)) {
- commented = bstr (unit, comment);
+ commented = bstr (unit, comment);
if (strlen (commented) > 0) {
char *p = commented;
commented = (char*)xmalloc (81);
int wehavekeys = 0;
for (k1 = unit->keys; k1; k1 = knext) {
- knext = k1->next;
- if (k1->aino == a1 && k1->fd) {
+ knext = k1->next;
+ if (k1->aino == a1 && k1->fd) {
wehavekeys++;
fs_close (unit, k1->fd);
write_log ("handle %p freed\n", k1->fd);
Key *k1, *knext;
for (k1 = unit->keys; k1; k1 = knext) {
- knext = k1->next;
- if (k1->aino == a1 && k1->fd) {
+ knext = k1->next;
+ if (k1->aino == a1 && k1->fd) {
int mode = (k1->dosmode & A_FIBF_READ) == 0 ? O_WRONLY : (k1->dosmode & A_FIBF_WRITE) == 0 ? O_RDONLY : O_RDWR;
mode |= O_BINARY;
if (failed) {
- /* rename still failed, restore fd */
- k1->fd = fs_open (unit, a1->nname, mode);
- write_log ("restoring old handle '%s' %d\n", a1->nname, k1->dosmode);
+ /* rename still failed, restore fd */
+ k1->fd = fs_open (unit, a1->nname, mode);
+ write_log ("restoring old handle '%s' %d\n", a1->nname, k1->dosmode);
} else {
- /* transfer fd to new name */
+ /* transfer fd to new name */
if (a2) {
k1->aino = a2;
k1->fd = fs_open (unit, a2->nname, mode);
write_log ("relocking failed '%s' -> '%s'\n", a1->nname, a2->nname);
free_key (unit, k1);
} else {
- fs_lseek (unit, k1->fd, k1->file_pos, SEEK_SET);
+ fs_lseek (unit, k1->fd, k1->file_pos, SEEK_SET);
}
}
}
PUT_PCK_RES1 (packet, DOS_TRUE);
flush_cache(unit, 0);
unit->inhibited = GET_PCK_ARG1 (packet);
+ write_log("ACTION_INHIBIT %d:%d\n", unit->unit, unit->inhibited);
}
static void
} else {
if (unit->ui.readonly & 2) {
if (unit->lockkey == GET_PCK_ARG2 (packet) || unit->lockkey == 0) {
- unit->ui.readonly &= ~2;
+ unit->ui.readonly &= ~2;
} else {
PUT_PCK_RES1 (packet, DOS_FALSE);
PUT_PCK_RES2 (packet, 0);
break;
case 4:
/* Exit the interrupt, and release the single-threading lock. */
- filesys_in_interrupt--;
+ filesys_in_interrupt--;
uae_sem_post (&singlethread_int_sem);
break;
case ACTION_PARENT_FH: action_parent_fh (unit, pck); break;
case ACTION_ADD_NOTIFY: action_add_notify (unit, pck); break;
case ACTION_REMOVE_NOTIFY: action_remove_notify (unit, pck); break;
-
- case ACTION_EXAMINE_ALL:
- if (!action_examine_all (unit, pck))
- return 0; /* not yet supported */
- break;
+ case ACTION_EXAMINE_ALL: return action_examine_all (unit, pck); break;
/* unsupported packets */
case ACTION_LOCK_RECORD:
u1 = u->next;
xfree (u);
}
- unit_num = 0;
units = 0;
key_uniq = 0;
a_uniq = 0;
ROM_uaeresource_resname = ds ("uae.resource");
ROM_uaeresource_resid = ds ("uae.resource 0.1");
- put_word(resaddr + 0x0, 0x4AFC);
- put_long(resaddr + 0x2, resaddr);
- put_long(resaddr + 0x6, resaddr + 0x1A); // Continue scan here
- put_word(resaddr + 0xA, 0x0001); // RTF_COLDSTART; Version 1
- put_word(resaddr + 0xC, 0x0801); // NT_RESOURCE; pri 01
- put_long(resaddr + 0xE, ROM_uaeresource_resname);
- put_long(resaddr + 0x12, ROM_uaeresource_resid);
- put_long(resaddr + 0x16, 0);
+ put_word (resaddr + 0x0, 0x4AFC);
+ put_long (resaddr + 0x2, resaddr);
+ put_long (resaddr + 0x6, resaddr + 0x1A); // Continue scan here
+ put_word (resaddr + 0xA, 0x0001); // RTF_COLDSTART; Version 1
+ put_word (resaddr + 0xC, 0x0801); // NT_RESOURCE; pri 01
+ put_long (resaddr + 0xE, ROM_uaeresource_resname);
+ put_long (resaddr + 0x12, ROM_uaeresource_resid);
+ put_long (resaddr + 0x16, 0);
resaddr += 0x1A;
return resaddr;
}
while (get_long (bnode)) {
dnode = get_long (bnode + 16); /* device node */
name = get_long (dnode + 40) << 2; /* device name BSTR */
- len = get_byte(name);
+ len = get_byte (name);
for (i = 0; i < len; i++)
dname[i] = get_byte (name + 1 + i);
dname[len] = 0;
uae_u32 dostype = get_long (pp + 80);
write_log ("RDB: '%s' dostype=%08.8X. PartBlock=%d\n", name, dostype, partblock);
write_log ("BlockSize: %d, Surfaces: %d, SectorsPerBlock %d\n",
- get_long (pp + 20) * 4, get_long (pp + 28), get_long (pp + 32));
+ get_long (pp + 20) * 4, get_long (pp + 28), get_long (pp + 32));
write_log ("SectorsPerTrack: %d, Reserved: %d, LowCyl %d, HighCyl %d\n",
- get_long (pp + 36), get_long (pp + 40), get_long (pp + 52), get_long (pp + 56));
+ get_long (pp + 36), get_long (pp + 40), get_long (pp + 52), get_long (pp + 56));
write_log ("Buffers: %d, BufMemType: %08.8x, MaxTransfer: %08.8x, BootPri: %d\n",
- get_long (pp + 60), get_long (pp + 64), get_long (pp + 68), get_long (pp + 76));
+ get_long (pp + 60), get_long (pp + 64), get_long (pp + 68), get_long (pp + 76));
}
-#define rdbmnt write_log("Mounting uaehf.device %d (%d) (size=%I64u):\n", unit_no, partnum, hfd->size);
+#define rdbmnt write_log ("Mounting uaehf.device %d (%d) (size=%I64u):\n", unit_no, partnum, hfd->size);
static int rdb_mount (UnitInfo *uip, int unit_no, int partnum, uaecptr parmpacket)
{
if (hfd->blocksize == 0) {
rdbmnt
- write_log("failed, blocksize == 0\n");
+ write_log ("failed, blocksize == 0\n");
return -1;
}
if (lastblock * hfd->blocksize > hfd->size) {
rdbmnt
- write_log("failed, too small (%d*%d > %I64u)\n", lastblock, hfd->blocksize, hfd->size);
+ write_log ("failed, too small (%d*%d > %I64u)\n", lastblock, hfd->blocksize, hfd->size);
return -2;
}
for (rdblock = 0; rdblock < lastblock; rdblock++) {
bufrdb[0xde] = 0;
bufrdb[0xdf] = 0;
if (rdb_checksum ("RDSK", bufrdb, rdblock)) {
- write_log ("Windows trashed RDB detected, fixing..\n");
+ write_log ("Windows 95/98/ME trashed RDB detected, fixing..\n");
hdf_write (hfd, bufrdb, rdblock * hfd->blocksize, hfd->blocksize);
break;
}
}
if (rdblock == lastblock) {
rdbmnt
- write_log("failed, no RDB detected\n");
+ write_log ("failed, no RDB detected\n");
return -2;
}
blocksize = rl (bufrdb + 16);
fileblock = rl (bufrdb + 32);
if (partnum == 0) {
- write_log("RDB: RDSK detected at %d, FSHD=%d, C=%d S=%d H=%d\n",
+ write_log ("RDB: RDSK detected at %d, FSHD=%d, C=%d S=%d H=%d\n",
rdblock, fileblock, hfd->cylinders, hfd->sectors, hfd->heads);
}
flags = rl (buf + 20);
if (flags & 2) { /* do not mount */
err = -1;
- write_log("RDB: Automount disabled, not mounting\n");
+ write_log ("RDB: Automount disabled, not mounting\n");
goto error;
}
dostype = get_long (parmpacket + 80);
if (dostype == 0) {
- write_log("RDB: mount failed, dostype=0\n");
+ write_log ("RDB: mount failed, dostype=0\n");
err = -1;
goto error;
}
if (hfd->cylinders * hfd->sectors * hfd->heads * blocksize > hfd->size)
- write_log("RDB: WARNING: end of partition > size of disk!\n");
+ write_log ("RDB: WARNING: end of partition > size of disk!\n");
err = 2;
goto error;
}
if (!legalrdbblock (uip, fileblock)) {
- write_log("RDB: corrupt FSHD pointer %d\n", fileblock);
+ write_log ("RDB: corrupt FSHD pointer %d\n", fileblock);
goto error;
}
memset (buf, 0, readblocksize);
hdf_read (hfd, buf, fileblock * hfd->blocksize, readblocksize);
if (!rdb_checksum ("FSHD", buf, fileblock)) {
- write_log("RDB: checksum error in FSHD block %d\n", fileblock);
+ write_log ("RDB: checksum error in FSHD block %d\n", fileblock);
goto error;
}
fileblock = rl (buf + 16);
}
if (sub_no)
return -2;
- write_log("Mounting uaehf.device %d (%d):\n", unit_no, sub_no);
+ write_log ("Mounting uaehf.device %d (%d):\n", unit_no, sub_no);
get_new_device (type, parmpacket, &uip[unit_no].devname, &uip[unit_no].devname_amiga, unit_no);
uip[unit_no].devno = unit_no;
put_long (parmpacket, uip[unit_no].devname_amiga);
err = 0;
get_aino (u, &u->rootnode, path, &err);
if (err) {
- write_log("*** FS: missing path '%s'!\n", path);
+ write_log ("*** FS: missing path '%s'!\n", path);
return NULL;
}
cnt++;
a = u->rootnode.child;
for (;;) {
if (*p == 0) {
- write_log("*** FS: base aino NOT found '%s' ('%s')\n", a->nname, npath);
+ write_log ("*** FS: base aino NOT found '%s' ('%s')\n", a->nname, npath);
xfree (path);
return NULL;
}
while(*p2 != '/' && *p2 != '\\' && *p2 != 0)
p2++;
*p2 = 0;
- while (a) {
+ while (a) {
if (!same_aname(p, a->aname)) {
a = a->sibling;
continue;
}
p = p2 + 1;
if (*p == 0) {
- write_log("FS: base aino found '%s' ('%s')\n", a->nname, npath);
+ write_log ("FS: base aino found '%s' ('%s')\n", a->nname, npath);
xfree (path);
return a;
}
break;
}
if (!a) {
- write_log("*** FS: path part '%s' not found ('%s')\n", p, npath);
+ write_log ("*** FS: path part '%s' not found ('%s')\n", p, npath);
xfree (path);
return NULL;
}
a->shlock = restore_u32 ();
flags = restore_u32 ();
if (flags & 1)
- a->elock = 1;
+ a->elock = 1;
/* full Amiga-side path without drive, eg. "C/SetPatch" */
p = restore_string ();
/* root (p = volume label) */
} else {
a->volflags = ui->volflags;
recycle_aino (u, a);
- write_log("FS: Lock (root) '%s' ('%s')\n", a->aname, a->nname);
+ write_log ("FS: Lock (root) '%s' ('%s')\n", a->aname, a->nname);
}
return src;
}
if (flags & 2) {
a->dir = 1;
if (!my_existsdir(a->nname))
- write_log("*** FS: Directory '%s' missing!\n", a->nname);
- else
+ write_log ("*** FS: Directory '%s' missing!\n", a->nname);
+ else
fsdb_clean_dir (a);
} else {
if (!my_existsfile(a->nname))
- write_log("*** FS: File '%s' missing!\n", a->nname);
+ write_log ("*** FS: File '%s' missing!\n", a->nname);
}
if (base) {
fill_file_attrs (u, base, a);
init_child_aino_tree (u, base, a);
} else {
- write_log("*** FS: parent directory missing '%s' ('%s')\n", a->aname, a->nname);
+ write_log ("*** FS: parent directory missing '%s' ('%s')\n", a->aname, a->nname);
missing = 1;
}
if (missing) {
- write_log("*** FS: Lock restore failed '%s' ('%s')\n", a->aname, a->nname);
- xfree (a->nname);
- xfree (a->aname);
- xfree (a);
+ write_log ("*** FS: Lock restore failed '%s' ('%s')\n", a->aname, a->nname);
+ xfree (a->nname);
+ xfree (a->aname);
+ xfree (a);
} else {
- write_log("FS: Lock '%s' ('%s')\n", a->aname, a->nname);
- recycle_aino (u, a);
+ write_log ("FS: Lock '%s' ('%s')\n", a->aname, a->nname);
+ recycle_aino (u, a);
}
return src;
}
openmode = ((k->dosmode & A_FIBF_READ) == 0 ? O_WRONLY
: (k->dosmode & A_FIBF_WRITE) == 0 ? O_RDONLY
: O_RDWR);
- write_log("FS: open file '%s' ('%s'), pos=%d\n", p, pn, k->file_pos);
+ write_log ("FS: open file '%s' ('%s'), pos=%d\n", p, pn, k->file_pos);
a = get_aino (u, &u->rootnode, p, &err);
if (!a)
- write_log ("*** FS: Open file aino creation failed '%s'\n", p);
+ write_log ("*** FS: Open file aino creation failed '%s'\n", p);
missing = 1;
if (a) {
missing = 0;
- k->aino = a;
- if (a->uniq != uniq)
- write_log("*** FS: Open file '%s' aino id %d != %d\n", p, uniq, a->uniq);
+ k->aino = a;
+ if (a->uniq != uniq)
+ write_log ("*** FS: Open file '%s' aino id %d != %d\n", p, uniq, a->uniq);
if (!my_existsfile(pn)) {
- write_log("*** FS: Open file '%s' is missing, creating dummy file!\n", p);
+ write_log ("*** FS: Open file '%s' is missing, creating dummy file!\n", p);
k->fd = fs_open (u, pn, openmode | O_CREAT |O_BINARY);
if (k->fd) {
uae_u8 *buf = (uae_u8*)xcalloc (10000, 1);
sp -= s;
}
xfree(buf);
- write_log("*** FS: dummy file created\n");
+ write_log ("*** FS: dummy file created\n");
} else {
- write_log("*** FS: Open file '%s', couldn't create dummy file!\n", p);
+ write_log ("*** FS: Open file '%s', couldn't create dummy file!\n", p);
}
} else {
k->fd = fs_open (u, pn, openmode | O_BINARY);
}
if (!k->fd) {
- write_log("*** FS: Open file '%s' failed to open!\n", p);
+ write_log ("*** FS: Open file '%s' failed to open!\n", p);
missing = 1;
} else {
size_t s;
s = fs_lseek (u, k->fd, 0, SEEK_END);
if (s != savedsize)
- write_log("FS: restored file '%s' size changed! orig=%d, now=%d!!\n", p, savedsize, s);
+ write_log ("FS: restored file '%s' size changed! orig=%d, now=%d!!\n", p, savedsize, s);
if (k->file_pos > s) {
- write_log("FS: restored filepos larger than size of file '%s'!! %d > %d\n", p, k->file_pos, s);
- k->file_pos = s;
+ write_log ("FS: restored filepos larger than size of file '%s'!! %d > %d\n", p, k->file_pos, s);
+ k->file_pos = s;
}
fs_lseek (u,k->fd, k->file_pos, SEEK_SET);
}
hash = notifyhash (n->fullname);
n->next = u->notifyhash[hash];
u->notifyhash[hash] = n;
- write_log("FS: notify %08.8X '%s' '%s'\n", n->notifyrequest, n->fullname, n->partname);
+ write_log ("FS: notify %08.8X '%s' '%s'\n", n->notifyrequest, n->fullname, n->partname);
return src;
}
return src;
}
-static uae_u8 *restore_filesys_virtual (UnitInfo *ui, uae_u8 *src)
+static uae_u8 *restore_filesys_virtual (UnitInfo *ui, uae_u8 *src, int num)
{
- Unit *u = startup_create_unit (ui);
+ Unit *u = startup_create_unit (ui, num);
int cnt;
u->dosbase = restore_u32 ();
u->volflags = ui->volflags;
cnt = restore_u32 ();
- write_log("FS: restoring %d locks\n", cnt);
+ write_log ("FS: restoring %d locks\n", cnt);
while (cnt-- > 0)
src = restore_aino(ui, u, src);
cnt = restore_u32 ();
- write_log("FS: restoring %d open files\n", cnt);
+ write_log ("FS: restoring %d open files\n", cnt);
while (cnt-- > 0)
src = restore_key(ui, u, src);
cnt = restore_u32 ();
- write_log("FS: restoring %d notifications\n", cnt);
+ write_log ("FS: restoring %d notifications\n", cnt);
while (cnt-- > 0)
src = restore_notify (ui, u, src);
cnt = restore_u32 ();
- write_log("FS: restoring %d exkeys\n", cnt);
+ write_log ("FS: restoring %d exkeys\n", cnt);
while (cnt-- > 0)
src = restore_exkey (ui, u, src);
if (a->elock || a->shlock || a->uniq == 0) {
if (dst) {
char *fn = getfullaname(a);
- write_log("%04x '%s' s=%d e=%d d=%d\n", a->uniq, fn, a->shlock, a->elock, a->dir);
+ write_log ("%04x '%s' s=%d e=%d d=%d\n", a->uniq, fn, a->shlock, a->elock, a->dir);
save_u64 (a->uniq);
save_u32 (a->locked_children);
save_u32 (a->exnext_count);
save_u64 (k->aino->uniq);
my_lseek(k->fd, k->file_pos, SEEK_SET);
save_string (fn);
- write_log("'%s' uniq=%d size=%d seekpos=%d mode=%d dosmode=%d\n",
- fn, k->uniq, size, k->file_pos, k->createmode, k->dosmode);
+ write_log ("'%s' uniq=%d size=%d seekpos=%d mode=%d dosmode=%d\n",
+ fn, k->uniq, size, k->file_pos, k->createmode, k->dosmode);
xfree(fn);
return dst;
}
if (strlen(s) >= strlen(ui->volname) && !memcmp(n->fullname, ui->volname, strlen(ui->volname)))
s = n->fullname + strlen(ui->volname) + 1;
save_string(s);
- write_log("FS: notify %08.8X '%s'\n", n->notifyrequest, n->fullname);
+ write_log ("FS: notify %08.8X '%s'\n", n->notifyrequest, n->fullname);
return dst;
}
Key *k;
int cnt, i, j;
- write_log("FSSAVE: '%s'\n", ui->devname);
+ write_log ("FSSAVE: '%s'\n", ui->devname);
save_u32 (u->dosbase);
save_u32 (u->volume);
save_u32 (u->port);
save_u32 (u->total_locked_ainos);
cnt = recurse_aino (ui, &u->rootnode, 0, NULL);
save_u32 (cnt);
- write_log("%d open locks\n", cnt);
+ write_log ("%d open locks\n", cnt);
cnt = recurse_aino (ui, &u->rootnode, 0, &dst);
cnt = 0;
for (k = u->keys; k; k = k->next)
cnt++;
save_u32 (cnt);
- write_log("%d open files\n", cnt);
+ write_log ("%d open files\n", cnt);
for (k = u->keys; k; k = k->next)
dst = save_key (dst, k);
for (j = 0; j < 2; j++) {
}
if (j == 0) {
save_u32 (cnt);
- write_log("%d notify requests\n", cnt);
+ write_log ("%d notify requests\n", cnt);
}
}
for (j = 0; j < 2; j++) {
}
if (j == 0) {
save_u32 (cnt);
- write_log("%d exkeys\n", cnt);
+ write_log ("%d exkeys\n", cnt);
}
}
- write_log("END\n");
+ write_log ("END\n");
return dst;
}
int type = is_hardfile (num);
ui = &mountinfo.ui[num];
- write_log("FS_FILESYS: '%s' '%s'\n", ui->devname, ui->volname);
+ write_log ("FS_FILESYS: '%s' '%s'\n", ui->devname, ui->volname);
dstbak = dst = (uae_u8*)malloc (10000);
save_u32 (2); /* version */
save_u32 (ui->devno);
goto end;
}
if (type == FILESYS_VIRTUAL)
- src = restore_filesys_virtual (ui, src);
+ src = restore_filesys_virtual (ui, src, devno);
end:
xfree (rootdir);
xfree (devname);
db(0x00); db(0x00); db(0x00); db(0x10); db(0x00); db(0x00); db(0x00); db(0x00);
- db(0x60); db(0x00); db(0x06); db(0xb2); db(0x00); db(0x00); db(0x05); db(0x6e);
+ db(0x60); db(0x00); db(0x07); db(0x3e); db(0x00); db(0x00); db(0x05); db(0xfa);
db(0x00); db(0x00); db(0x00); db(0x34); db(0x00); db(0x00); db(0x00); db(0xd4);
db(0x00); db(0x00); db(0x00); db(0x20); db(0x00); db(0x00); db(0x01); db(0x8e);
- db(0x00); db(0x00); db(0x08); db(0xc6); db(0x00); db(0x00); db(0x0a); db(0x54);
- db(0x43); db(0xfa); db(0x0b); db(0xfc); db(0x4e); db(0xae); db(0xff); db(0xa0);
+ db(0x00); db(0x00); db(0x09); db(0x5e); db(0x00); db(0x00); db(0x0a); db(0xec);
+ db(0x43); db(0xfa); db(0x0c); db(0x94); db(0x4e); db(0xae); db(0xff); db(0xa0);
db(0x20); db(0x40); db(0x20); db(0x28); db(0x00); db(0x16); db(0x20); db(0x40);
db(0x4e); db(0x90); db(0x4e); db(0x75); db(0x48); db(0xe7); db(0xff); db(0xfe);
db(0x2c); db(0x78); db(0x00); db(0x04); db(0x30); db(0x3c); db(0xff); db(0xfc);
- db(0x61); db(0x00); db(0x08); db(0x74); db(0x2a); db(0x50); db(0x43); db(0xfa);
- db(0x0b); db(0xf4); db(0x70); db(0x24); db(0x7a); db(0x00); db(0x4e); db(0xae);
+ db(0x61); db(0x00); db(0x09); db(0x0c); db(0x2a); db(0x50); db(0x43); db(0xfa);
+ db(0x0c); db(0x8c); db(0x70); db(0x24); db(0x7a); db(0x00); db(0x4e); db(0xae);
db(0xfd); db(0xd8); db(0x4a); db(0x80); db(0x66); db(0x0c); db(0x43); db(0xfa);
- db(0x0b); db(0xe4); db(0x70); db(0x00); db(0x7a); db(0x01); db(0x4e); db(0xae);
+ db(0x0c); db(0x7c); db(0x70); db(0x00); db(0x7a); db(0x01); db(0x4e); db(0xae);
db(0xfd); db(0xd8); db(0x28); db(0x40); db(0x20); db(0x3c); db(0x00); db(0x00);
db(0x02); db(0x2c); db(0x72); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a);
db(0x26); db(0x40); db(0x27); db(0x4c); db(0x01); db(0x9c); db(0x7c); db(0x00);
db(0xbc); db(0xad); db(0x01); db(0x0c); db(0x64); db(0x24); db(0x2f); db(0x06);
db(0x7e); db(0x01); db(0x2f); db(0x0b); db(0x20); db(0x4b); db(0x61); db(0x00);
- db(0x04); db(0xe6); db(0x26); db(0x5f); db(0x0c); db(0x80); db(0xff); db(0xff);
+ db(0x05); db(0x72); db(0x26); db(0x5f); db(0x0c); db(0x80); db(0xff); db(0xff);
db(0xff); db(0xfe); db(0x67); db(0x08); db(0x48); db(0x46); db(0x52); db(0x46);
db(0x48); db(0x46); db(0x60); db(0xe4); db(0x2c); db(0x1f); db(0x52); db(0x46);
db(0x60); db(0xd6); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x22); db(0x4c);
db(0x4e); db(0xae); db(0xfe); db(0x62); db(0x30); db(0x3c); db(0xff); db(0x80);
- db(0x61); db(0x00); db(0x08); db(0x04); db(0x4e); db(0x90); db(0x72); db(0x03);
+ db(0x61); db(0x00); db(0x08); db(0x9c); db(0x4e); db(0x90); db(0x72); db(0x03);
db(0x74); db(0xf6); db(0x20); db(0x7c); db(0x00); db(0x20); db(0x00); db(0x00);
db(0x90); db(0x88); db(0x65); db(0x0a); db(0x67); db(0x08); db(0x78); db(0x00);
db(0x22); db(0x44); db(0x4e); db(0xae); db(0xfd); db(0x96); db(0x4c); db(0xdf);
db(0x7f); db(0xff); db(0x4e); db(0x75); db(0x48); db(0xe7); db(0x00); db(0x20);
- db(0x30); db(0x3c); db(0xff); db(0x50); db(0x61); db(0x00); db(0x07); db(0xd8);
+ db(0x30); db(0x3c); db(0xff); db(0x50); db(0x61); db(0x00); db(0x08); db(0x70);
db(0x70); db(0x00); db(0x4e); db(0x90); db(0x4a); db(0x80); db(0x67); db(0x00);
db(0x00); db(0xa0); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x30); db(0x3c);
- db(0xff); db(0x50); db(0x61); db(0x00); db(0x07); db(0xc2); db(0x70); db(0x02);
+ db(0xff); db(0x50); db(0x61); db(0x00); db(0x08); db(0x5a); db(0x70); db(0x02);
db(0x4e); db(0x90); db(0x0c); db(0x40); db(0x00); db(0x01); db(0x6d); db(0x7a);
db(0x6e); db(0x06); db(0x4e); db(0xae); db(0xfe); db(0x92); db(0x60); db(0xe6);
db(0x0c); db(0x40); db(0x00); db(0x02); db(0x6e); db(0x08); db(0x20); db(0x01);
db(0x25); db(0x49); db(0x00); db(0x1a); db(0x20); db(0x69); db(0x00); db(0x10);
db(0x22); db(0x4a); db(0x4e); db(0xae); db(0xfe); db(0x92); db(0x60); db(0x00);
db(0xff); db(0x76); db(0x30); db(0x3c); db(0xff); db(0x50); db(0x61); db(0x00);
- db(0x07); db(0x36); db(0x70); db(0x04); db(0x4e); db(0x90); db(0x70); db(0x01);
+ db(0x07); db(0xce); db(0x70); db(0x04); db(0x4e); db(0x90); db(0x70); db(0x01);
db(0x4c); db(0xdf); db(0x04); db(0x00); db(0x4e); db(0x75); db(0x48); db(0xe7);
db(0xc0); db(0xc0); db(0x70); db(0x1a); db(0x22); db(0x3c); db(0x00); db(0x01);
db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x22); db(0x40);
- db(0x41); db(0xfa); db(0x0a); db(0x6d); db(0x23); db(0x48); db(0x00); db(0x0a);
+ db(0x41); db(0xfa); db(0x0b); db(0x05); db(0x23); db(0x48); db(0x00); db(0x0a);
db(0x41); db(0xfa); db(0xff); db(0x2a); db(0x23); db(0x48); db(0x00); db(0x0e);
db(0x41); db(0xfa); db(0xff); db(0x22); db(0x23); db(0x48); db(0x00); db(0x12);
db(0x33); db(0x7c); db(0x02); db(0x14); db(0x00); db(0x08); db(0x70); db(0x03);
db(0x00); db(0x00); db(0x00); db(0x0e); db(0x52); db(0x40); db(0x0c); db(0x40);
db(0x00); db(0x8c); db(0x66); db(0xf2); db(0x20); db(0x0a); db(0xe4); db(0x88);
db(0x21); db(0x40); db(0x00); db(0x36); db(0x22); db(0x48); db(0x41); db(0xfa);
- db(0x0a); db(0x07); db(0x23); db(0x48); db(0x00); db(0x0a); db(0x20); db(0x6b);
+ db(0x0a); db(0x9f); db(0x23); db(0x48); db(0x00); db(0x0a); db(0x20); db(0x6b);
db(0x01); db(0x98); db(0x41); db(0xe8); db(0x00); db(0x12); db(0x4e); db(0xae);
db(0xff); db(0x10); db(0x4c); db(0xdf); db(0x4f); db(0x03); db(0x4e); db(0x75);
db(0x48); db(0xe7); db(0x7f); db(0x7e); db(0x2c); db(0x78); db(0x00); db(0x04);
db(0x60); db(0xd4); db(0x48); db(0xe7); db(0x40); db(0xe2); db(0x2c); db(0x78);
db(0x00); db(0x04); db(0x41); db(0xee); db(0x01); db(0x50); db(0x20); db(0x50);
db(0x4a); db(0x90); db(0x67); db(0x1a); db(0x22); db(0x68); db(0x00); db(0x0a);
- db(0x45); db(0xfa); db(0x08); db(0xfc); db(0x10); db(0x19); db(0x12); db(0x1a);
+ db(0x45); db(0xfa); db(0x09); db(0x94); db(0x10); db(0x19); db(0x12); db(0x1a);
db(0xb0); db(0x01); db(0x66); db(0x06); db(0x4a); db(0x00); db(0x67); db(0x42);
db(0x60); db(0xf2); db(0x20); db(0x50); db(0x60); db(0xe2); db(0x70); db(0x20);
db(0x22); db(0x3c); db(0x00); db(0x01); db(0x00); db(0x01); db(0x4e); db(0xae);
db(0xff); db(0x3a); db(0x24); db(0x40); db(0x15); db(0x7c); db(0x00); db(0x08);
- db(0x00); db(0x08); db(0x41); db(0xfa); db(0x08); db(0xd2); db(0x25); db(0x48);
- db(0x00); db(0x0a); db(0x41); db(0xfa); db(0x08); db(0x8b); db(0x25); db(0x48);
+ db(0x00); db(0x08); db(0x41); db(0xfa); db(0x09); db(0x6a); db(0x25); db(0x48);
+ db(0x00); db(0x0a); db(0x41); db(0xfa); db(0x09); db(0x23); db(0x25); db(0x48);
db(0x00); db(0x0e); db(0x41); db(0xea); db(0x00); db(0x12); db(0x20); db(0x88);
db(0x58); db(0x90); db(0x21); db(0x48); db(0x00); db(0x08); db(0x41); db(0xee);
db(0x01); db(0x50); db(0x22); db(0x4a); db(0x4e); db(0xae); db(0xff); db(0x0a);
db(0xff); db(0x62); db(0x60); db(0x14); db(0x4a); db(0x2b); db(0x00); db(0x4c);
db(0x67); db(0x0e); db(0x42); db(0x2b); db(0x00); db(0x4c); db(0x61); db(0x00);
db(0xfe); db(0xda); db(0x70); db(0x00); db(0x61); db(0x00); db(0xff); db(0x4c);
- db(0x4e); db(0x75); db(0x4a); db(0xa8); db(0x00); db(0x14); db(0x67); db(0x08);
+ db(0x4e); db(0x75); db(0x4a); db(0xac); db(0x00); db(0x14); db(0x67); db(0x08);
db(0x70); db(0x00); db(0x61); db(0x00); db(0xff); db(0xb8); db(0x4e); db(0x75);
db(0x70); db(0x01); db(0x61); db(0x00); db(0xff); db(0xb0); db(0x4e); db(0x75);
db(0x4a); db(0x2b); db(0x00); db(0xac); db(0x6b); db(0x08); db(0x70); db(0x01);
db(0x61); db(0x00); db(0xff); db(0xa2); db(0x4e); db(0x75); db(0x70); db(0x00);
- db(0x61); db(0x00); db(0xff); db(0x9a); db(0x4e); db(0x75); db(0x61); db(0x00);
- db(0xfd); db(0xca); db(0x21); db(0x40); db(0x01); db(0x98); db(0x2f); db(0x08);
- db(0x30); db(0x3c); db(0xff); db(0xfc); db(0x61); db(0x00); db(0x03); db(0x38);
- db(0x2a); db(0x50); db(0x30); db(0x3c); db(0xff); db(0x28); db(0x61); db(0x00);
- db(0x03); db(0x2e); db(0x22); db(0x48); db(0x20); db(0x5f); db(0x42); db(0xa8);
- db(0x01); db(0x90); db(0x42); db(0xa8); db(0x01); db(0x94); db(0x4e); db(0x91);
- db(0x26); db(0x00); db(0x0c); db(0x83); db(0xff); db(0xff); db(0xff); db(0xfe);
- db(0x67); db(0x00); db(0xfb); db(0x30); db(0x0c); db(0x83); db(0x00); db(0x00);
- db(0x00); db(0x02); db(0x67); db(0x0c); db(0xc0); db(0x85); db(0x67); db(0x08);
- db(0x4a); db(0xa8); db(0x01); db(0x90); db(0x67); db(0x00); db(0xfb); db(0x1c);
- db(0x20); db(0x28); db(0x01); db(0x90); db(0x67); db(0x12); db(0x2f); db(0x08);
- db(0x72); db(0x01); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x4e); db(0xae);
- db(0xff); db(0x3a); db(0x20); db(0x5f); db(0x21); db(0x40); db(0x01); db(0x94);
- db(0x4a); db(0x83); db(0x6a); db(0x10); db(0x22); db(0x48); db(0x30); db(0x3c);
- db(0xff); db(0x20); db(0x61); db(0x00); db(0x02); db(0xda); db(0x4e); db(0x90);
- db(0x60); db(0x00); db(0x00); db(0x28); db(0x2c); db(0x4c); db(0x2f); db(0x08);
- db(0x4e); db(0xae); db(0xff); db(0x70); db(0x20); db(0x5f); db(0x22); db(0x48);
- db(0x26); db(0x40); db(0x30); db(0x3c); db(0xff); db(0x20); db(0x61); db(0x00);
- db(0x02); db(0xbe); db(0x4e); db(0x90); db(0x70); db(0x00); db(0x27); db(0x40);
- db(0x00); db(0x08); db(0x27); db(0x40); db(0x00); db(0x10); db(0x27); db(0x40);
- db(0x00); db(0x20); db(0x4a); db(0xa9); db(0x01); db(0x94); db(0x67); db(0x28);
- db(0x20); db(0x69); db(0x01); db(0x94); db(0x61); db(0x00); db(0xfc); db(0x0a);
- db(0x48); db(0xe7); db(0x80); db(0xc0); db(0x20); db(0x29); db(0x01); db(0x90);
- db(0x22); db(0x69); db(0x01); db(0x94); db(0x2c); db(0x78); db(0x00); db(0x04);
- db(0x4e); db(0xae); db(0xff); db(0x2e); db(0x4c); db(0xdf); db(0x03); db(0x01);
- db(0x4a); db(0x80); db(0x67); db(0x04); db(0x61); db(0x00); db(0xfb); db(0x94);
- db(0x4a); db(0x83); db(0x6b); db(0x00); db(0xfa); db(0x96); db(0x30); db(0x3c);
- db(0xff); db(0x18); db(0x61); db(0x00); db(0x02); db(0x72); db(0x4e); db(0x90);
- db(0x20); db(0x03); db(0x16); db(0x29); db(0x00); db(0x4f); db(0x4a); db(0x80);
- db(0x66); db(0x1a); db(0x27); db(0x7c); db(0x00); db(0x00); db(0x0f); db(0xa0);
- db(0x00); db(0x14); db(0x43); db(0xfa); db(0xf9); db(0xa0); db(0x20); db(0x09);
- db(0xe4); db(0x88); db(0x27); db(0x40); db(0x00); db(0x20); db(0x70); db(0xff);
- db(0x27); db(0x40); db(0x00); db(0x24); db(0x4a); db(0x87); db(0x67); db(0x36);
- db(0x2c); db(0x78); db(0x00); db(0x04); db(0x70); db(0x14); db(0x72); db(0x00);
- db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x22); db(0x40); db(0x70); db(0x00);
- db(0x22); db(0x80); db(0x23); db(0x40); db(0x00); db(0x04); db(0x33); db(0x40);
- db(0x00); db(0x0e); db(0x30); db(0x3c); db(0x10); db(0x00); db(0x80); db(0x03);
- db(0x33); db(0x40); db(0x00); db(0x08); db(0x23); db(0x6d); db(0x01); db(0x04);
- db(0x00); db(0x0a); db(0x23); db(0x4b); db(0x00); db(0x10); db(0x41); db(0xec);
- db(0x00); db(0x4a); db(0x4e); db(0xee); db(0xfe); db(0xf2); db(0x20); db(0x4b);
- db(0x72); db(0x00); db(0x22); db(0x41); db(0x70); db(0xff); db(0x2c); db(0x4c);
- db(0x4e); db(0xee); db(0xff); db(0x6a); db(0x2c); db(0x78); db(0x00); db(0x04);
- db(0x93); db(0xc9); db(0x4e); db(0xae); db(0xfe); db(0xda); db(0x20); db(0x40);
- db(0x4b); db(0xe8); db(0x00); db(0x5c); db(0x43); db(0xfa); db(0x05); db(0x58);
- db(0x70); db(0x00); db(0x4e); db(0xae); db(0xfd); db(0xd8); db(0x24); db(0x40);
- db(0x20); db(0x3c); db(0x00); db(0x00); db(0x00); db(0xb5); db(0x22); db(0x3c);
- db(0x00); db(0x01); db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a);
- db(0x26); db(0x40); db(0x7c); db(0x00); db(0x26); db(0x86); db(0x27); db(0x46);
- db(0x00); db(0x04); db(0x27); db(0x46); db(0x00); db(0x08); db(0x27); db(0x4a);
- db(0x00); db(0xa0); db(0x93); db(0xc9); db(0x4e); db(0xae); db(0xfe); db(0xda);
- db(0x27); db(0x40); db(0x00); db(0xb0); db(0x61); db(0x00); db(0x02); db(0x98);
- db(0x27); db(0x40); db(0x00); db(0xa4); db(0x61); db(0x00); db(0x02); db(0xc4);
- db(0x27); db(0x40); db(0x00); db(0xa8); db(0x7a); db(0x00); db(0x20); db(0x4d);
- db(0x4e); db(0xae); db(0xfe); db(0x80); db(0x20); db(0x4d); db(0x4e); db(0xae);
- db(0xfe); db(0x8c); db(0x28); db(0x40); db(0x26); db(0x2c); db(0x00); db(0x0a);
- db(0x30); db(0x3c); db(0xff); db(0x40); db(0x61); db(0x00); db(0x01); db(0x90);
- db(0x70); db(0x00); db(0x4e); db(0x90); db(0x61); db(0x00); db(0xfc); db(0x7c);
- db(0x61); db(0x00); db(0x03); db(0x26); db(0x60); db(0x00); db(0x01); db(0x0c);
- db(0x61); db(0x00); db(0x03); db(0x1e); db(0x20); db(0x4d); db(0x4e); db(0xae);
- db(0xfe); db(0x8c); db(0x28); db(0x40); db(0x4a); db(0x80); db(0x66); db(0x10);
- db(0x70); db(0x00); db(0x12); db(0x2d); db(0x00); db(0x0f); db(0x03); db(0xc0);
- db(0x08); db(0xc0); db(0x00); db(0x11); db(0x4e); db(0xae); db(0xfe); db(0xc2);
- db(0x4a); db(0x2b); db(0x00); db(0xac); db(0x67); db(0x08); db(0x61); db(0x00);
- db(0xfd); db(0xf8); db(0x42); db(0x2b); db(0x00); db(0xac); db(0x20); db(0x0c);
- db(0x67); db(0xce); db(0x0c); db(0x6c); db(0x00); db(0x26); db(0x00); db(0x12);
- db(0x66); db(0x4c); db(0x0c); db(0xac); db(0x40); db(0x00); db(0x00); db(0x00);
- db(0x00); db(0x14); db(0x66); db(0x42); db(0x0c); db(0x6c); db(0x12); db(0x34);
- db(0x00); db(0x18); db(0x66); db(0x3a); db(0x20); db(0x6c); db(0x00); db(0x1a);
- db(0x20); db(0x28); db(0x00); db(0x0c); db(0x02); db(0x80); db(0x80); db(0x00);
- db(0x00); db(0x08); db(0x0c); db(0x80); db(0x80); db(0x00); db(0x00); db(0x08);
- db(0x66); db(0x18); db(0x02); db(0xa8); db(0x7f); db(0xff); db(0xff); db(0xff);
- db(0x00); db(0x0c); db(0x20); db(0x68); db(0x00); db(0x10); db(0x22); db(0x4c);
- db(0x12); db(0xbc); db(0x00); db(0x08); db(0x4e); db(0xae); db(0xfe); db(0x92);
- db(0x60); db(0x86); db(0x22); db(0x4c); db(0x70); db(0x26); db(0x4e); db(0xae);
- db(0xff); db(0x2e); db(0x60); db(0x00); db(0xff); db(0x7c); db(0x26); db(0x2c);
- db(0x00); db(0x0a); db(0x66); db(0x3e); db(0x30); db(0x3c); db(0xff); db(0x50);
- db(0x61); db(0x00); db(0x00); db(0xec); db(0x70); db(0x01); db(0x4e); db(0x90);
- db(0x45); db(0xeb); db(0x00); db(0x04); db(0x20); db(0x52); db(0x20); db(0x08);
- db(0x67); db(0x00); db(0xff); db(0x5e); db(0x22); db(0x50); db(0x20); db(0x40);
- db(0x20); db(0x28); db(0x00); db(0x04); db(0x6a); db(0x16); db(0x48); db(0xe7);
- db(0x00); db(0xc0); db(0x28); db(0x68); db(0x00); db(0x0a); db(0x61); db(0x5a);
- db(0x53); db(0x85); db(0x4c); db(0xdf); db(0x03); db(0x00); db(0x24); db(0x89);
- db(0x20); db(0x49); db(0x60); db(0xda); db(0x24); db(0x48); db(0x20); db(0x49);
- db(0x60); db(0xd4); db(0x0c); db(0x85); db(0x00); db(0x00); db(0x00); db(0x14);
- db(0x65); db(0x00); db(0x00); db(0x0a); db(0x70); db(0x01); db(0x29); db(0x40);
- db(0x00); db(0x04); db(0x60); db(0x12); db(0x61); db(0x42); db(0x30); db(0x3c);
- db(0xff); db(0x30); db(0x61); db(0x00); db(0x00); db(0x9a); db(0x4e); db(0x90);
- db(0x4a); db(0x80); db(0x67); db(0x0e); db(0x52); db(0x85); db(0x28); db(0xab);
- db(0x00); db(0x04); db(0x27); db(0x4c); db(0x00); db(0x04); db(0x60); db(0x00);
- db(0xff); db(0x08); db(0x20); db(0x43); db(0x0c); db(0xa8); db(0x00); db(0x00);
- db(0x00); db(0x1f); db(0x00); db(0x08); db(0x66); db(0xf4); db(0x61); db(0x00);
- db(0xfd); db(0x02); db(0x28); db(0x43); db(0x61); db(0x04); db(0x60); db(0x00);
- db(0xfe); db(0xf0); db(0x22); db(0x54); db(0x20); db(0x6c); db(0x00); db(0x04);
+ db(0x61); db(0x00); db(0xff); db(0x9a); db(0x4e); db(0x75); db(0x20); db(0x6c);
+ db(0x00); db(0x24); db(0x4a); db(0xa8); db(0x00); db(0x08); db(0x66); db(0x08);
+ db(0x4a); db(0xa8); db(0x00); db(0x0c); db(0x66); db(0x02); db(0x4e); db(0x75);
+ db(0x48); db(0xe7); db(0x3f); db(0x3e); db(0x2a); db(0x48); db(0x24); db(0x6c);
+ db(0x00); db(0x18); db(0x2e); db(0x15); db(0x4a); db(0x87); db(0x67); db(0x64);
+ db(0x20); db(0x0a); db(0x67); db(0x60); db(0x7c); db(0x00); db(0x22); db(0x2d);
+ db(0x00); db(0x08); db(0x67); db(0x12); db(0x24); db(0x2a); db(0x00); db(0x04);
+ db(0x2c); db(0x6b); db(0x00); db(0xa0); db(0x4e); db(0xae); db(0xfc); db(0x34);
+ db(0x4a); db(0x80); db(0x66); db(0x02); db(0x50); db(0xc6); db(0x22); db(0x2d);
+ db(0x00); db(0x0c); db(0x67); db(0x1c); db(0x20); db(0x41); db(0x22); db(0x4a);
+ db(0x2f); db(0x0a); db(0x45); db(0xec); db(0x00); db(0x20); db(0x48); db(0x7a);
+ db(0x00); db(0x08); db(0x2f); db(0x28); db(0x00); db(0x08); db(0x4e); db(0x75);
+ db(0x24); db(0x5f); db(0x4a); db(0x80); db(0x66); db(0x02); db(0x50); db(0xc6);
+ db(0x4a); db(0x06); db(0x67); db(0x1a); db(0x20); db(0x2a); db(0x00); db(0x04);
+ db(0x90); db(0x8a); db(0x4a); db(0x92); db(0x67); db(0x0a); db(0x20); db(0x52);
+ db(0x22); db(0x4a); db(0x22); db(0xd8); db(0x59); db(0x81); db(0x6a); db(0xfa);
+ db(0x53); db(0x95); db(0x53); db(0x87); db(0x60); db(0x9e); db(0x24); db(0x52);
+ db(0x53); db(0x87); db(0x60); db(0x98); db(0x4c); db(0xdf); db(0x7c); db(0xfc);
+ db(0x4e); db(0x75); db(0x61); db(0x00); db(0xfd); db(0x3e); db(0x21); db(0x40);
+ db(0x01); db(0x98); db(0x2f); db(0x08); db(0x30); db(0x3c); db(0xff); db(0xfc);
+ db(0x61); db(0x00); db(0x03); db(0x44); db(0x2a); db(0x50); db(0x30); db(0x3c);
+ db(0xff); db(0x28); db(0x61); db(0x00); db(0x03); db(0x3a); db(0x22); db(0x48);
+ db(0x20); db(0x5f); db(0x42); db(0xa8); db(0x01); db(0x90); db(0x42); db(0xa8);
+ db(0x01); db(0x94); db(0x4e); db(0x91); db(0x26); db(0x00); db(0x0c); db(0x83);
+ db(0xff); db(0xff); db(0xff); db(0xfe); db(0x67); db(0x00); db(0xfa); db(0xa4);
+ db(0x0c); db(0x83); db(0x00); db(0x00); db(0x00); db(0x02); db(0x67); db(0x0c);
+ db(0xc0); db(0x85); db(0x67); db(0x08); db(0x4a); db(0xa8); db(0x01); db(0x90);
+ db(0x67); db(0x00); db(0xfa); db(0x90); db(0x20); db(0x28); db(0x01); db(0x90);
+ db(0x67); db(0x12); db(0x2f); db(0x08); db(0x72); db(0x01); db(0x2c); db(0x78);
+ db(0x00); db(0x04); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x20); db(0x5f);
+ db(0x21); db(0x40); db(0x01); db(0x94); db(0x4a); db(0x83); db(0x6a); db(0x10);
+ db(0x22); db(0x48); db(0x30); db(0x3c); db(0xff); db(0x20); db(0x61); db(0x00);
+ db(0x02); db(0xe6); db(0x4e); db(0x90); db(0x60); db(0x00); db(0x00); db(0x28);
+ db(0x2c); db(0x4c); db(0x2f); db(0x08); db(0x4e); db(0xae); db(0xff); db(0x70);
+ db(0x20); db(0x5f); db(0x22); db(0x48); db(0x26); db(0x40); db(0x30); db(0x3c);
+ db(0xff); db(0x20); db(0x61); db(0x00); db(0x02); db(0xca); db(0x4e); db(0x90);
+ db(0x70); db(0x00); db(0x27); db(0x40); db(0x00); db(0x08); db(0x27); db(0x40);
+ db(0x00); db(0x10); db(0x27); db(0x40); db(0x00); db(0x20); db(0x4a); db(0xa9);
+ db(0x01); db(0x94); db(0x67); db(0x28); db(0x20); db(0x69); db(0x01); db(0x94);
+ db(0x61); db(0x00); db(0xfb); db(0x7e); db(0x48); db(0xe7); db(0x80); db(0xc0);
+ db(0x20); db(0x29); db(0x01); db(0x90); db(0x22); db(0x69); db(0x01); db(0x94);
+ db(0x2c); db(0x78); db(0x00); db(0x04); db(0x4e); db(0xae); db(0xff); db(0x2e);
+ db(0x4c); db(0xdf); db(0x03); db(0x01); db(0x4a); db(0x80); db(0x67); db(0x04);
+ db(0x61); db(0x00); db(0xfb); db(0x08); db(0x4a); db(0x83); db(0x6b); db(0x00);
+ db(0xfa); db(0x0a); db(0x30); db(0x3c); db(0xff); db(0x18); db(0x61); db(0x00);
+ db(0x02); db(0x7e); db(0x4e); db(0x90); db(0x20); db(0x03); db(0x16); db(0x29);
+ db(0x00); db(0x4f); db(0x4a); db(0x80); db(0x66); db(0x1a); db(0x27); db(0x7c);
+ db(0x00); db(0x00); db(0x0f); db(0xa0); db(0x00); db(0x14); db(0x43); db(0xfa);
+ db(0xf9); db(0x14); db(0x20); db(0x09); db(0xe4); db(0x88); db(0x27); db(0x40);
+ db(0x00); db(0x20); db(0x70); db(0xff); db(0x27); db(0x40); db(0x00); db(0x24);
+ db(0x4a); db(0x87); db(0x67); db(0x36); db(0x2c); db(0x78); db(0x00); db(0x04);
+ db(0x70); db(0x14); db(0x72); db(0x00); db(0x4e); db(0xae); db(0xff); db(0x3a);
+ db(0x22); db(0x40); db(0x70); db(0x00); db(0x22); db(0x80); db(0x23); db(0x40);
+ db(0x00); db(0x04); db(0x33); db(0x40); db(0x00); db(0x0e); db(0x30); db(0x3c);
+ db(0x10); db(0x00); db(0x80); db(0x03); db(0x33); db(0x40); db(0x00); db(0x08);
+ db(0x23); db(0x6d); db(0x01); db(0x04); db(0x00); db(0x0a); db(0x23); db(0x4b);
+ db(0x00); db(0x10); db(0x41); db(0xec); db(0x00); db(0x4a); db(0x4e); db(0xee);
+ db(0xfe); db(0xf2); db(0x20); db(0x4b); db(0x72); db(0x00); db(0x22); db(0x41);
+ db(0x70); db(0xff); db(0x2c); db(0x4c); db(0x4e); db(0xee); db(0xff); db(0x6a);
+ db(0x2c); db(0x78); db(0x00); db(0x04); db(0x93); db(0xc9); db(0x4e); db(0xae);
+ db(0xfe); db(0xda); db(0x20); db(0x40); db(0x4b); db(0xe8); db(0x00); db(0x5c);
+ db(0x43); db(0xfa); db(0x05); db(0x64); db(0x70); db(0x00); db(0x4e); db(0xae);
+ db(0xfd); db(0xd8); db(0x24); db(0x40); db(0x20); db(0x3c); db(0x00); db(0x00);
+ db(0x00); db(0xb5); db(0x22); db(0x3c); db(0x00); db(0x01); db(0x00); db(0x01);
+ db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x26); db(0x40); db(0x7c); db(0x00);
+ db(0x26); db(0x86); db(0x27); db(0x46); db(0x00); db(0x04); db(0x27); db(0x46);
+ db(0x00); db(0x08); db(0x27); db(0x4a); db(0x00); db(0xa0); db(0x93); db(0xc9);
+ db(0x4e); db(0xae); db(0xfe); db(0xda); db(0x27); db(0x40); db(0x00); db(0xb0);
+ db(0x61); db(0x00); db(0x02); db(0xa4); db(0x27); db(0x40); db(0x00); db(0xa4);
+ db(0x61); db(0x00); db(0x02); db(0xd0); db(0x27); db(0x40); db(0x00); db(0xa8);
+ db(0x7a); db(0x00); db(0x20); db(0x4d); db(0x4e); db(0xae); db(0xfe); db(0x80);
+ db(0x20); db(0x4d); db(0x4e); db(0xae); db(0xfe); db(0x8c); db(0x28); db(0x40);
+ db(0x26); db(0x2c); db(0x00); db(0x0a); db(0x30); db(0x3c); db(0xff); db(0x40);
+ db(0x61); db(0x00); db(0x01); db(0x9c); db(0x70); db(0x00); db(0x4e); db(0x90);
+ db(0x61); db(0x00); db(0xfb); db(0xf0); db(0x61); db(0x00); db(0x03); db(0x32);
+ db(0x60); db(0x00); db(0x00); db(0xfc); db(0x61); db(0x00); db(0x03); db(0x2a);
+ db(0x20); db(0x4d); db(0x4e); db(0xae); db(0xfe); db(0x8c); db(0x28); db(0x40);
+ db(0x4a); db(0x80); db(0x66); db(0x10); db(0x70); db(0x00); db(0x12); db(0x2d);
+ db(0x00); db(0x0f); db(0x03); db(0xc0); db(0x08); db(0xc0); db(0x00); db(0x11);
+ db(0x4e); db(0xae); db(0xfe); db(0xc2); db(0x4a); db(0x2b); db(0x00); db(0xac);
+ db(0x67); db(0x08); db(0x61); db(0x00); db(0xfd); db(0x6c); db(0x42); db(0x2b);
+ db(0x00); db(0xac); db(0x20); db(0x0c); db(0x67); db(0xce); db(0x0c); db(0x6c);
+ db(0x00); db(0x26); db(0x00); db(0x12); db(0x66); db(0x4c); db(0x0c); db(0xac);
+ db(0x40); db(0x00); db(0x00); db(0x00); db(0x00); db(0x14); db(0x66); db(0x42);
+ db(0x0c); db(0x6c); db(0x12); db(0x34); db(0x00); db(0x18); db(0x66); db(0x3a);
+ db(0x20); db(0x6c); db(0x00); db(0x1a); db(0x20); db(0x28); db(0x00); db(0x0c);
+ db(0x02); db(0x80); db(0x80); db(0x00); db(0x00); db(0x08); db(0x0c); db(0x80);
+ db(0x80); db(0x00); db(0x00); db(0x08); db(0x66); db(0x18); db(0x02); db(0xa8);
+ db(0x7f); db(0xff); db(0xff); db(0xff); db(0x00); db(0x0c); db(0x20); db(0x68);
+ db(0x00); db(0x10); db(0x22); db(0x4c); db(0x12); db(0xbc); db(0x00); db(0x08);
+ db(0x4e); db(0xae); db(0xfe); db(0x92); db(0x60); db(0x86); db(0x22); db(0x4c);
+ db(0x70); db(0x26); db(0x4e); db(0xae); db(0xff); db(0x2e); db(0x60); db(0x00);
+ db(0xff); db(0x7c); db(0x26); db(0x2c); db(0x00); db(0x0a); db(0x66); db(0x3e);
+ db(0x30); db(0x3c); db(0xff); db(0x50); db(0x61); db(0x00); db(0x00); db(0xf8);
+ db(0x70); db(0x01); db(0x4e); db(0x90); db(0x45); db(0xeb); db(0x00); db(0x04);
+ db(0x20); db(0x52); db(0x20); db(0x08); db(0x67); db(0x00); db(0xff); db(0x5e);
+ db(0x22); db(0x50); db(0x20); db(0x40); db(0x20); db(0x28); db(0x00); db(0x04);
+ db(0x6a); db(0x16); db(0x48); db(0xe7); db(0x00); db(0xc0); db(0x28); db(0x68);
+ db(0x00); db(0x0a); db(0x61); db(0x4a); db(0x53); db(0x85); db(0x4c); db(0xdf);
+ db(0x03); db(0x00); db(0x24); db(0x89); db(0x20); db(0x49); db(0x60); db(0xda);
+ db(0x24); db(0x48); db(0x20); db(0x49); db(0x60); db(0xd4); db(0x0c); db(0x85);
+ db(0x00); db(0x00); db(0x00); db(0x14); db(0x65); db(0x00); db(0x00); db(0x0a);
+ db(0x70); db(0x01); db(0x29); db(0x40); db(0x00); db(0x04); db(0x60); db(0x12);
+ db(0x61); db(0x4e); db(0x30); db(0x3c); db(0xff); db(0x30); db(0x61); db(0x00);
+ db(0x00); db(0xa6); db(0x4e); db(0x90); db(0x4a); db(0x80); db(0x67); db(0x0e);
+ db(0x52); db(0x85); db(0x28); db(0xab); db(0x00); db(0x04); db(0x27); db(0x4c);
+ db(0x00); db(0x04); db(0x60); db(0x00); db(0xff); db(0x08); db(0x28); db(0x43);
+ db(0x61); db(0x04); db(0x60); db(0x00); db(0xff); db(0x00); db(0x0c); db(0xac);
+ db(0x00); db(0x00); db(0x00); db(0x1f); db(0x00); db(0x08); db(0x66); db(0x04);
+ db(0x61); db(0x00); db(0xfc); db(0x70); db(0x0c); db(0xac); db(0x00); db(0x00);
+ db(0x04); db(0x09); db(0x00); db(0x08); db(0x66); db(0x04); db(0x61); db(0x00);
+ db(0xfc); db(0x8e); db(0x22); db(0x54); db(0x20); db(0x6c); db(0x00); db(0x04);
db(0x29); db(0x4d); db(0x00); db(0x04); db(0x4e); db(0xee); db(0xfe); db(0x92);
db(0x2f); db(0x05); db(0x7a); db(0xfc); db(0x24); db(0x53); db(0x2e); db(0x0a);
db(0x22); db(0x0a); db(0x67); db(0x00); db(0x00); db(0x0c); db(0x52); db(0x85);
db(0x70); db(0x18); db(0x4e); db(0xae); db(0xff); db(0x2e); db(0x06); db(0x86);
db(0x00); db(0x01); db(0x00); db(0x00); db(0x20); db(0x0a); db(0x66); db(0xec);
db(0x26); db(0x87); db(0x2a); db(0x1f); db(0x4e); db(0x75); db(0x41); db(0xfa);
- db(0xf7); db(0x3c); db(0x02); db(0x80); db(0x00); db(0x00); db(0xff); db(0xff);
+ db(0xf6); db(0xa4); db(0x02); db(0x80); db(0x00); db(0x00); db(0xff); db(0xff);
db(0xd1); db(0xc0); db(0x4e); db(0x75); db(0x00); db(0x00); db(0x0c); db(0xaf);
db(0x00); db(0x00); db(0x00); db(0x22); db(0x00); db(0x08); db(0x66); db(0x30);
db(0x48); db(0xe7); db(0xc0); db(0xe2); db(0x2c); db(0x78); db(0x00); db(0x04);
*
* Copyright 1996 Herman ten Brugge
* Modified 2005 Peter Keunecke
- */
+ */
#define __USE_ISOC9X /* We might be able to pick up a NaN */
|| (currprefs.cpu_model == 68040 && currprefs.fpu_model == 0)) {
/* 68040 unimplemented/68060 FPU disabled exception.
* Line F exception with different stack frame.. */
- uaecptr newpc = m68k_getpc(regs);
+ uaecptr newpc = m68k_getpc (regs);
uaecptr oldpc = newpc - pcoffset;
MakeSR(regs);
- if (!regs->s) {
- regs->usp = m68k_areg(regs, 7);
- m68k_areg(regs, 7) = regs->isp;
+ if (!regs->s) {
+ regs->usp = m68k_areg (regs, 7);
+ m68k_areg (regs, 7) = regs->isp;
}
regs->s = 1;
- m68k_areg(regs, 7) -= 4;
- put_long (m68k_areg(regs, 7), oldpc);
- m68k_areg(regs, 7) -= 4;
- put_long (m68k_areg(regs, 7), oldpc);
- m68k_areg(regs, 7) -= 2;
- put_word (m68k_areg(regs, 7), 0x4000 + 11 * 4);
- m68k_areg(regs, 7) -= 4;
- put_long (m68k_areg(regs, 7), newpc);
- m68k_areg(regs, 7) -= 2;
- put_word (m68k_areg(regs, 7), regs->sr);
- write_log("68040/060 FPU disabled exception PC=%x\n", newpc);
+ m68k_areg (regs, 7) -= 4;
+ put_long (m68k_areg (regs, 7), oldpc);
+ m68k_areg (regs, 7) -= 4;
+ put_long (m68k_areg (regs, 7), oldpc);
+ m68k_areg (regs, 7) -= 2;
+ put_word (m68k_areg (regs, 7), 0x4000 + 11 * 4);
+ m68k_areg (regs, 7) -= 4;
+ put_long (m68k_areg (regs, 7), newpc);
+ m68k_areg (regs, 7) -= 2;
+ put_word (m68k_areg (regs, 7), regs->sr);
+ write_log("68040/060 FPU disabled exception PC=%x\n", newpc);
newpc = get_long (regs->vbr + 11 * 4);
- m68k_setpc(regs, newpc);
- set_special(regs, SPCFLAG_END_COMPILE);
- return;
+ m68k_setpc (regs, newpc);
+ set_special (regs, SPCFLAG_END_COMPILE);
+ return;
}
op_illg (opcode, regs);
}
#define fp_round_to_zero(x) ((int)(x))
#define fp_round_to_nearest(x) ((int)((x) + 0.5))
-STATIC_INLINE tointtype toint(fptype src, fptype minval, fptype maxval)
+STATIC_INLINE tointtype toint (fptype src, fptype minval, fptype maxval)
{
if (src < minval)
src = minval;
#else /* no X86_MSVC */
switch (get_fpcr() & 0x30) {
case FPCR_ROUND_ZERO:
- result = fp_round_to_zero(src);
+ result = fp_round_to_zero(src);
break;
case FPCR_ROUND_MINF:
result = fp_round_to_minus_infinity(src);
uae_u16 tmp;
int size, mode, reg;
uae_u32 ad = 0;
- static int sz1[8] = { 4, 4, 12, 12, 2, 8, 1, 0 };
- static int sz2[8] = { 4, 4, 12, 12, 2, 8, 2, 0 };
+ static const int sz1[8] = { 4, 4, 12, 12, 2, 8, 1, 0 };
+ static const int sz2[8] = { 4, 4, 12, 12, 2, 8, 2, 0 };
if (!(extra & 0x4000)) {
*src = regs.fp[(extra >> 10) & 7];
return 1;
}
- reg = opcode & 7;
mode = (opcode >> 3) & 7;
+ reg = opcode & 7;
size = (extra >> 10) & 7;
+
switch (mode) {
case 0:
switch (size) {
case 0:
switch (size) {
case 6:
- m68k_dreg (regs, reg) = (uae_u32)(((toint(value, -128.0, 127.0) & 0xff)
+ m68k_dreg (regs, reg) = (uae_u32)(((toint (value, -128.0, 127.0) & 0xff)
| (m68k_dreg (regs, reg) & ~0xff)));
break;
case 4:
- m68k_dreg (regs, reg) = (uae_u32)(((toint(value, -32768.0, 32767.0) & 0xffff)
+ m68k_dreg (regs, reg) = (uae_u32)(((toint (value, -32768.0, 32767.0) & 0xffff)
| (m68k_dreg (regs, reg) & ~0xffff)));
break;
case 0:
- m68k_dreg (regs, reg) = (uae_u32)toint(value, -2147483648.0, 2147483647.0);
+ m68k_dreg (regs, reg) = (uae_u32)toint (value, -2147483648.0, 2147483647.0);
break;
case 1:
m68k_dreg (regs, reg) = from_single (value);
}
switch (size) {
case 0:
- put_long (ad, (uae_u32)toint(value, -2147483648.0, 2147483647.0));
+ put_long (ad, (uae_u32)toint (value, -2147483648.0, 2147483647.0));
break;
case 1:
put_long (ad, from_single (value));
}
break;
case 4:
- put_word (ad, (uae_s16) toint(value, -32768.0, 32767.0));
+ put_word (ad, (uae_s16) toint (value, -32768.0, 32767.0));
break;
case 5:{
uae_u32 wrd1, wrd2;
}
break;
case 6:
- put_byte (ad, (uae_s8)toint(value, -128.0, 127.0));
+ put_byte (ad, (uae_s8)toint (value, -128.0, 127.0));
break;
default:
return 0;
return;
}
if((opcode & 0x38) == 0x20) {
- if (extra & 0x1000)
+ if (extra & 0x1000)
incr += 4;
if (extra & 0x0800)
incr += 4;
case 0x01: /* FINT */
/* need to take the current rounding mode into account */
#if defined(X86_MSVC_ASSEMBLY)
- {
+ {
fptype tmp_fp;
__asm {
restore_u32();
restore_u32();
}
- write_log("FPU=%d\n", currprefs.fpu_model);
+ write_log ("FPU=%d\n", currprefs.fpu_model);
return src;
}
ULARGE_INTEGER FreeBytesAvailable, TotalNumberOfBytes, TotalNumberOfFreeBytes;
if (!GetFullPathName (path, sizeof buf2, buf2, NULL)) {
- write_log("GetFullPathName() failed err=%d\n", GetLastError());
+ write_log ("GetFullPathName() failed err=%d\n", GetLastError());
return -1;
}
if (!GetDiskFreeSpaceEx (buf2, &FreeBytesAvailable, &TotalNumberOfBytes, &TotalNumberOfFreeBytes))
{
- write_log("GetDiskFreeSpaceEx() failed err=%d\n", GetLastError());
+ write_log ("GetDiskFreeSpaceEx() failed err=%d\n", GetLastError());
return -1;
}
DA0000 to DA3FFF 16 KB IDE drive
DA4000 to DA4FFF 16 KB IDE reserved
DA8000 to DAFFFF 32 KB Credit Card and IDE configregisters
-DB0000 to DBFFFF 64 KB Not used(reserved for external IDE)
-* DC0000 to DCFFFF 64 KB Real Time Clock(RTC)
+DB0000 to DBFFFF 64 KB Not used (reserved for external IDE)
+* DC0000 to DCFFFF 64 KB Real Time Clock (RTC)
DD0000 to DDFFFF 64 KB A3000 DMA controller
DD0000 to DD1FFF A4000 DMAC
DD2000 to DDFFFF A4000 IDE
#define GAYLE_ADDRESS (0xda8000) /* gayle main registers base address */
#define GAYLE_RESET (0xa40000) /* write 0x00 to start reset,
- read 1 byte to stop reset */
+ read 1 byte to stop reset */
/* GAYLE_CARDSTATUS bit def */
#define GAYLE_CS_CCDET 0x40 /* credit card detect */
#define GAYLE_CS_BVD1 0x20 /* battery voltage detect 1 */
#define GAYLE_CS_IRQ 0x04 /* interrupt request */
/* GAYLE_CONFIG bit def
- (bit 0-1 for program voltage, bit 2-3 for access speed */
+ (bit 0-1 for program voltage, bit 2-3 for access speed */
#define GAYLE_CFG_0V 0x00
#define GAYLE_CFG_5V 0x01
#define GAYLE_CFG_12V 0x02
#define GAYLE_CFG_100NS 0x08
#define GAYLE_CFG_150NS 0x04
-#define GAYLE_CFG_250NS 0x00
-#define GAYLE_CFG_720NS 0x0c
+#define GAYLE_CFG_250NS 0x00
+#define GAYLE_CFG_720NS 0x0c
/* IDE stuff */
static struct ide_hdf *ide;
-STATIC_INLINE void pw(int offset, uae_u16 w)
+STATIC_INLINE void pw (int offset, uae_u16 w)
{
ide->secbuf[offset * 2 + 0] = (uae_u8)w;
ide->secbuf[offset * 2 + 1] = w >> 8;
}
-static void ps(int offset, char *s, int max)
+static void ps (int offset, char *s, int max)
{
int i, len;
offset *= 2;
- len = strlen(s);
+ len = strlen (s);
for (i = 0; i < max; i++) {
char c = ' ';
if (i < len)
}
}
-static void ide_interrupt(void)
+static void ide_interrupt (void)
{
ide->status |= IDE_STATUS_BSY;
ide->irq_delay = 2;
}
-static void ide_interrupt_do(struct ide_hdf *ide)
+static void ide_interrupt_do (struct ide_hdf *ide)
{
ide->status &= ~IDE_STATUS_BSY;
if (gayle_intena & GAYLE_IRQ_IDE) {
}
}
-static void ide_fail(void)
+static void ide_fail (void)
{
ide_error |= IDE_ERR_ABRT;
if (ide_drv == 1 && idedrive[ide2 + 1].hdhfd.size == 0)
idedrive[ide2].status |= IDE_STATUS_ERR;
ide->status |= IDE_STATUS_ERR;
- ide_interrupt();
+ ide_interrupt ();
}
-static void ide_data_ready(int blocks)
+static void ide_data_ready (int blocks)
{
- memset(ide->secbuf, 0, 512 * 256);
+ memset (ide->secbuf, 0, 512 * 256);
ide->data_offset = 0;
ide->status |= IDE_STATUS_DRQ;
ide->data_size = blocks * 512;
ide->data_multi = 1;
- if (!(ide_devcon & 2))
- ide_interrupt();
+ if (! (ide_devcon & 2))
+ ide_interrupt ();
}
-static void ide_recalibrate(void)
+static void ide_recalibrate (void)
{
- write_log("IDE%d recalibrate\n", ide->num);
+ write_log ("IDE%d recalibrate\n", ide->num);
ide_sector = 0;
ide_lcyl = ide_hcyl = 0;
- ide_interrupt();
+ ide_interrupt ();
}
-static void ide_identify_drive(void)
+static void ide_identify_drive (void)
{
int totalsecs;
int v;
uae_u8 *buf = ide->secbuf;
if (ide->hdhfd.size == 0) {
- ide_fail();
+ ide_fail ();
return;
}
if (IDE_LOG > 0)
- write_log("IDE%d identify drive\n", ide->num);
- ide_data_ready(1);
- pw(0, (1 << 10) | (1 << 6) | (1 << 2) | (1 << 3));
- pw(1, ide->hdhfd.cyls_def);
- pw(3, ide->hdhfd.heads_def);
- pw(4, 512 * ide->hdhfd.secspertrack_def);
- pw(5, 512);
- pw(6, ide->hdhfd.secspertrack_def);
- ps(10, "68000", 20); /* serial */
- pw(20, 3);
- pw(21, 512);
- ps(23, "0.2", 8); /* firmware revision */
- ps(27, "UAE-IDE", 40); /* model */
- pw(47, 128); /* max 128 sectors multiple mode */
- pw(48, 1);
- pw(49, (1 << 9) | (1 << 8)); /* LBA and DMA supported */
- pw(51, 240 << 8); /* PIO0 to PIO2 supported */
- pw(53, 1 | 2);
- pw(54, ide->hdhfd.cyls);
- pw(55, ide->hdhfd.heads);
- pw(56, ide->hdhfd.secspertrack);
+ write_log ("IDE%d identify drive\n", ide->num);
+ ide_data_ready (1);
+ pw (0, (1 << 10) | (1 << 6) | (1 << 2) | (1 << 3));
+ pw (1, ide->hdhfd.cyls_def);
+ pw (3, ide->hdhfd.heads_def);
+ pw (4, 512 * ide->hdhfd.secspertrack_def);
+ pw (5, 512);
+ pw (6, ide->hdhfd.secspertrack_def);
+ ps (10, "68000", 20); /* serial */
+ pw (20, 3);
+ pw (21, 512);
+ ps (23, "0.2", 8); /* firmware revision */
+ ps (27, "UAE-IDE", 40); /* model */
+ pw (47, 128); /* max 128 sectors multiple mode */
+ pw (48, 1);
+ pw (49, (1 << 9) | (1 << 8)); /* LBA and DMA supported */
+ pw (51, 240 << 8); /* PIO0 to PIO2 supported */
+ pw (53, 1 | 2);
+ pw (54, ide->hdhfd.cyls);
+ pw (55, ide->hdhfd.heads);
+ pw (56, ide->hdhfd.secspertrack);
totalsecs = ide->hdhfd.cyls * ide->hdhfd.heads * ide->hdhfd.secspertrack;
- pw(57, totalsecs);
- pw(58, totalsecs >> 16);
+ pw (57, totalsecs);
+ pw (58, totalsecs >> 16);
v = idedrive[ide_drv].multiple_mode;
- pw(59, (v > 0 ? 0x100 : 0) | v);
+ pw (59, (v > 0 ? 0x100 : 0) | v);
totalsecs = ide->hdhfd.size / 512;
- pw(60, totalsecs);
- pw(61, totalsecs >> 16);
- pw(62, 0x0f);
- pw(63, 0x0f);
- pw(64, 0x03); /* PIO3 and PIO4 */
- pw(65, 120 << 8); /* MDMA2 supported */
- pw(66, 120 << 8);
- pw(67, 120 << 8);
- pw(68, 120 << 8);
- pw(80, (1 << 1) | (1 << 2) | (1 << 3)); /* ATA-1 to ATA-3 */
- pw(81, 0x000A); /* ATA revision */
-}
-static void ide_initialize_drive_parameters(void)
+ pw (60, totalsecs);
+ pw (61, totalsecs >> 16);
+ pw (62, 0x0f);
+ pw (63, 0x0f);
+ pw (64, 0x03); /* PIO3 and PIO4 */
+ pw (65, 120 << 8); /* MDMA2 supported */
+ pw (66, 120 << 8);
+ pw (67, 120 << 8);
+ pw (68, 120 << 8);
+ pw (80, (1 << 1) | (1 << 2) | (1 << 3)); /* ATA-1 to ATA-3 */
+ pw (81, 0x000A); /* ATA revision */
+}
+static void ide_initialize_drive_parameters (void)
{
if (ide->hdhfd.size) {
ide->hdhfd.secspertrack = ide_nsector == 0 ? 256 : ide_nsector;
ide_error |= IDE_ERR_ABRT;
ide->status |= IDE_STATUS_ERR;
}
- write_log("IDE%d initialize drive parameters, CYL=%d,SPT=%d,HEAD=%d\n",
+ write_log ("IDE%d initialize drive parameters, CYL=%d,SPT=%d,HEAD=%d\n",
ide->num, ide->hdhfd.cyls, ide->hdhfd.secspertrack, ide->hdhfd.heads);
- ide_interrupt();
+ ide_interrupt ();
}
-static void ide_set_multiple_mode(void)
+static void ide_set_multiple_mode (void)
{
- write_log("IDE%d drive multiple mode = %d\n", ide->num, ide_nsector);
+ write_log ("IDE%d drive multiple mode = %d\n", ide->num, ide_nsector);
ide->multiple_mode = ide_nsector;
- ide_interrupt();
+ ide_interrupt ();
}
-static void ide_set_features(void)
+static void ide_set_features (void)
{
- write_log("IDE%d set features %02.2X (%02.2X)\n", ide->num, ide_feat, ide_nsector);
- ide_fail();
+ write_log ("IDE%d set features %02.2X (%02.2X)\n", ide->num, ide_feat, ide_nsector);
+ ide_fail ();
}
-static void get_lbachs(struct ide_hdf *ide, int *lba, int *cyl, int *head, int *sec)
+static void get_lbachs (struct ide_hdf *ide, int *lba, int *cyl, int *head, int *sec)
{
if (ide_select & 0x40) {
*lba = ((ide_select & 15) << 24) | (ide_hcyl << 16) | (ide_lcyl << 8) | ide_sector;
*lba = (((*cyl) * ide->hdhfd.heads + (*head)) * ide->hdhfd.secspertrack) + (*sec) - 1;
}
}
-static void put_lbachs(struct ide_hdf *ide, int lba, int cyl, int head, int sec, int inc)
+static void put_lbachs (struct ide_hdf *ide, int lba, int cyl, int head, int sec, int inc)
{
if (ide_select & 0x40) {
lba += inc;
ide_nsector = 0;
}
-static void ide_read_sectors(int multi)
+static void ide_read_sectors (int multi)
{
int cyl, head, sec, nsec, lba;
if (multi && ide->multiple_mode == 0) {
- ide_fail();
+ ide_fail ();
return;
}
gui_hd_led (1);
nsec = ide_nsector == 0 ? 256 : ide_nsector;
- get_lbachs(ide, &lba, &cyl, &head, &sec);
+ get_lbachs (ide, &lba, &cyl, &head, &sec);
if (IDE_LOG > 0)
- write_log("IDE%d read offset=%d, sectors=%d (%d)\n", ide->num, lba, nsec, ide->multiple_mode);
+ write_log ("IDE%d read offset=%d, sectors=%d (%d)\n", ide->num, lba, nsec, ide->multiple_mode);
if (multi && ide->multiple_mode > nsec)
nsec = ide->multiple_mode;
if (lba * 512 >= ide->hdhfd.size) {
- ide_fail();
+ ide_fail ();
return;
}
if (nsec * 512 > ide->hdhfd.size - lba * 512)
nsec = (ide->hdhfd.size - lba * 512) / 512;
- ide_data_ready(nsec);
+ ide_data_ready (nsec);
#if 0
{
uae_u64 offset = lba * 512;
uae_u64 len = nsec * 512;
write_log ("cmd_read: %04.4x-%08.8x (%d) %08.8x (%d)\n",
- (uae_u32)(offset >> 32), (uae_u32)offset, (uae_u32)(offset / 512), (uae_u32)len, (uae_u32)(len / 512));
+ (uae_u32) (offset >> 32), (uae_u32)offset, (uae_u32) (offset / 512), (uae_u32)len, (uae_u32)(len / 512));
}
#endif
hdf_read (&ide->hdhfd.hfd, ide->secbuf, lba * 512, nsec * 512);
- put_lbachs(ide, lba, cyl, head, sec, nsec);
+ put_lbachs (ide, lba, cyl, head, sec, nsec);
ide->data_multi = multi ? ide->multiple_mode : 1;
}
-static void ide_write_sectors(int multi)
+static void ide_write_sectors (int multi)
{
int cyl, head, sec, nsec, lba;
if (multi && ide->multiple_mode == 0) {
- ide_fail();
+ ide_fail ();
return;
}
gui_hd_led (2);
nsec = ide_nsector == 0 ? 256 : ide_nsector;
- get_lbachs(ide, &lba, &cyl, &head, &sec);
+ get_lbachs (ide, &lba, &cyl, &head, &sec);
if (lba * 512 >= ide->hdhfd.size) {
- ide_fail();
+ ide_fail ();
return;
}
if (IDE_LOG > 0)
- write_log("IDE%d write offset=%d, sectors=%d (%d)\n", ide->num, lba, nsec, ide->multiple_mode);
+ write_log ("IDE%d write offset=%d, sectors=%d (%d)\n", ide->num, lba, nsec, ide->multiple_mode);
if (nsec * 512 > ide->hdhfd.size - lba * 512)
nsec = (ide->hdhfd.size - lba * 512) / 512;
- ide_data_ready(nsec);
+ ide_data_ready (nsec);
ide->data_multi = multi ? ide->multiple_mode : 1;
}
-static void ide_do_command(uae_u8 cmd)
+static void ide_do_command (uae_u8 cmd)
{
if (IDE_LOG > 1)
- write_log("**** IDE%d command %02.2X\n", ide->num, cmd);
- ide->status &= ~(IDE_STATUS_DRDY | IDE_STATUS_DRQ | IDE_STATUS_ERR);
+ write_log ("**** IDE%d command %02.2X\n", ide->num, cmd);
+ ide->status &= ~ (IDE_STATUS_DRDY | IDE_STATUS_DRQ | IDE_STATUS_ERR);
ide_error = 0;
if (cmd == 0x10) { /* recalibrate */
- ide_recalibrate();
+ ide_recalibrate ();
} else if (cmd == 0xec) { /* identify drive */
- ide_identify_drive();
+ ide_identify_drive ();
} else if (cmd == 0x91) { /* initialize drive parameters */
- ide_initialize_drive_parameters();
+ ide_initialize_drive_parameters ();
} else if (cmd == 0xc6) { /* set multiple mode */
- ide_set_multiple_mode();
+ ide_set_multiple_mode ();
} else if (cmd == 0x20 || cmd == 0x21) { /* read sectors */
- ide_read_sectors(0);
+ ide_read_sectors (0);
} else if (cmd == 0x30 || cmd == 0x31) { /* write sectors */
- ide_write_sectors(0);
+ ide_write_sectors (0);
} else if (cmd == 0xc4) { /* read multiple */
- ide_read_sectors(1);
+ ide_read_sectors (1);
} else if (cmd == 0xc5) { /* write multiple */
- ide_write_sectors(1);
+ ide_write_sectors (1);
} else if (cmd == 0x50) { /* format track (nop) */
- ide_interrupt();
+ ide_interrupt ();
} else if (cmd == 0xa1) { /* ATAPI identify (IDE HD is not ATAPI) */
- ide_fail();
+ ide_fail ();
} else if (cmd == 0xef) { /* set features */
- ide_set_features();
+ ide_set_features ();
} else {
- ide_fail();
- write_log("IDE: unknown command %x\n", cmd);
+ ide_fail ();
+ write_log ("IDE%d: unknown command %x\n", ide->num, cmd);
}
}
-static uae_u16 ide_get_data(void)
+static uae_u16 ide_get_data (void)
{
int irq = 0;
uae_u16 v;
if (ide->data_size == 0) {
if (IDE_LOG > 0)
- write_log("IDE%d DATA read without DRQ!?\n", ide->num);
+ write_log ("IDE%d DATA read without DRQ!?\n", ide->num);
if (ide->hdhfd.size == 0)
return 0xffff;
return 0;
ide->data_offset+=2;
ide->data_size-=2;
if (((ide->data_offset % 512) == 0) && ((ide->data_offset / 512) % ide->data_multi) == 0)
- irq = 1;
+ irq = 1;
if (ide->data_size == 0) {
irq = 1;
ide->status &= ~IDE_STATUS_DRQ;
}
if (irq)
- ide_interrupt();
+ ide_interrupt ();
return v;
}
-static void ide_put_data(uae_u16 v)
+static void ide_put_data (uae_u16 v)
{
int irq = 0;
if (ide->data_size == 0) {
if (IDE_LOG > 0)
- write_log("IDE%d DATA write without DRQ!?\n", ide->num);
+ write_log ("IDE%d DATA write without DRQ!?\n", ide->num);
return;
}
ide->secbuf[ide->data_offset + 1] = v & 0xff;
ide->data_size-=2;
if (((ide->data_offset % 512) == 0) && ((ide->data_offset / 512) % ide->data_multi) == 0) {
if (IDE_LOG > 0)
- write_log("IDE%d write interrupt, %d total bytes transferred so far\n", ide->num, ide->data_offset);
+ write_log ("IDE%d write interrupt, %d total bytes transferred so far\n", ide->num, ide->data_offset);
irq = 1;
}
if (ide->data_size == 0) {
int lba, cyl, head, sec, nsec;
ide->status &= ~IDE_STATUS_DRQ;
nsec = ide->data_offset / 512;
- get_lbachs(ide, &lba, &cyl, &head, &sec);
+ get_lbachs (ide, &lba, &cyl, &head, &sec);
if (IDE_LOG > 0)
- write_log("IDE%d write finished, %d bytes (%d) written\n", ide->num, ide->data_offset, ide->data_offset / 512);
- hdf_write(&ide->hdhfd.hfd, ide->secbuf, lba * 512, ide->data_offset);
- put_lbachs(ide, lba, cyl, head, sec, nsec);
+ write_log ("IDE%d write finished, %d bytes (%d) written\n", ide->num, ide->data_offset, ide->data_offset / 512);
+ hdf_write (&ide->hdhfd.hfd, ide->secbuf, lba * 512, ide->data_offset);
+ put_lbachs (ide, lba, cyl, head, sec, nsec);
irq = 1;
}
if (irq)
- ide_interrupt();
+ ide_interrupt ();
}
-static int get_ide_reg(uaecptr addr)
+static int get_ide_reg (uaecptr addr)
{
uaecptr a = addr;
addr &= 0xffff;
addr >>= 2;
ide2 = 0;
if (addr & 0x400) {
- if (ide_splitter ) {
+ if (ide_splitter) {
ide2 = 2;
addr &= ~0x400;
}
return 0xff;
}
if (addr >= GAYLE_IRQ_4000 && addr <= GAYLE_IRQ_4000 + 1 && currprefs.cs_ide == 2) {
- uae_u8 v = gayle_irq;
- gayle_irq = 0;
- return v;
+ uae_u8 v = gayle_irq;
+ gayle_irq = 0;
+ return v;
}
if (addr >= 0x4000) {
if (addr == GAYLE_IRQ_1200) {
}
return 0;
}
- ide_reg = get_ide_reg(addr);
+ ide_reg = get_ide_reg (addr);
/* Emulated "ide killer". Prevents long KS boot delay if no drives installed */
if (idedrive[0].hdhfd.size == 0 && idedrive[2].hdhfd.size == 0) {
if (ide_reg == IDE_STATUS)
case IDE_SELECT:
v = ide_select;
break;
- case IDE_DEVCON:
+ case IDE_DEVCON:
v = ide_devcon;
break;
case IDE_STATUS:
break;
}
if (IDE_LOG > 2 && ide_reg > 0)
- write_log("IDE%d register %d->%02.2X\n", ide->num, ide_reg, (uae_u32)v & 0xff);
+ write_log ("IDE%d register %d->%02.2X\n", ide->num, ide_reg, (uae_u32)v & 0xff);
return v;
}
}
if (addr >= 0x4000)
return;
- ide_reg = get_ide_reg(addr);
+ ide_reg = get_ide_reg (addr);
if (IDE_LOG > 2 && ide_reg > 0)
- write_log("IDE%d register %d=%02.2X\n", ide->num, ide_reg, (uae_u32)val & 0xff);
+ write_log ("IDE%d register %d=%02.2X\n", ide->num, ide_reg, (uae_u32)val & 0xff);
switch (ide_reg)
{
case IDE_DRVADDR:
#ifdef JIT
special_mem |= S_READ;
#endif
- v = ide_read(addr);
+ v = ide_read (addr);
if (GAYLE_LOG)
- write_log ("GAYLE_READ %08.8X=%02.2X PC=%08.8X\n", oaddr, (uae_u32)v & 0xff, M68K_GETPC);
+ write_log ("GAYLE_READ %08.8X=%02.2X PC=%08.8X\n", oaddr, (uae_u32)v & 0xff, M68K_GETPC);
return v;
}
static void gayle_write (uaecptr addr, int val)
#endif
if (GAYLE_LOG)
write_log ("GAYLE_WRITE %08.8X=%02.2X PC=%08.8X\n", addr, (uae_u32)val & 0xff, M68K_GETPC);
- ide_write(addr, val);
+ ide_write (addr, val);
}
static uae_u32 REGPARAM3 gayle_lget (uaecptr) REGPARAM;
dummy_lgeti, dummy_wgeti, ABFLAG_IO
};
-static int isa4000t(uaecptr addr)
+static int isa4000t (uaecptr addr)
{
if (currprefs.cs_mbdmac != 2)
return 0;
#ifdef JIT
special_mem |= S_READ;
#endif
- if (isa4000t(addr)) {
+ if (isa4000t (addr)) {
addr -= NCR_OFFSET;
- return (ncr_bget2(addr) << 8) | ncr_bget2(addr + 1);
+ return (ncr_bget2 (addr) << 8) | ncr_bget2 (addr + 1);
}
- ide_reg = get_ide_reg(addr);
+ ide_reg = get_ide_reg (addr);
if (ide_reg == IDE_DATA)
- return ide_get_data();
+ return ide_get_data ();
v = gayle_bget (addr) << 8;
v |= gayle_bget (addr + 1);
return v;
#ifdef JIT
special_mem |= S_READ;
#endif
- if (isa4000t(addr)) {
+ if (isa4000t (addr)) {
addr -= NCR_OFFSET;
- return ncr_bget2(addr);
+ return ncr_bget2 (addr);
}
return gayle_read (addr);
}
#ifdef JIT
special_mem |= S_WRITE;
#endif
- if (isa4000t(addr)) {
+ if (isa4000t (addr)) {
addr -= NCR_OFFSET;
- ncr_bput2(addr, value >> 8);
- ncr_bput2(addr + 1, value);
+ ncr_bput2 (addr, value >> 8);
+ ncr_bput2 (addr + 1, value);
return;
}
- ide_reg = get_ide_reg(addr);
+ ide_reg = get_ide_reg (addr);
if (ide_reg == IDE_DATA) {
- ide_put_data(value);
+ ide_put_data (value);
return;
}
gayle_bput (addr, value >> 8);
#ifdef JIT
special_mem |= S_WRITE;
#endif
- if (isa4000t(addr)) {
+ if (isa4000t (addr)) {
addr -= NCR_OFFSET;
- ncr_bput2(addr, value);
+ ncr_bput2 (addr, value);
return;
}
gayle_write (addr, value);
}
-static void gayle2_write(uaecptr addr, uae_u32 v)
+static void gayle2_write (uaecptr addr, uae_u32 v)
{
gayle_id_cnt = 0;
}
-static uae_u32 gayle2_read(uaecptr addr)
+static uae_u32 gayle2_read (uaecptr addr)
{
uae_u8 v = 0;
addr &= 0xffff;
/* Gayle ID */
if ((gayle_id_cnt & 3) == 2)
v = 0x7f;
- else
+ else
v = 0x80;
gayle_id_cnt++;
}
dummy_lgeti, dummy_wgeti, ABFLAG_IO
};
-void gayle_hsync(void)
+void gayle_hsync (void)
{
int i;
if (ide->irq_delay > 0) {
ide->irq_delay--;
if (ide->irq_delay == 0)
- ide_interrupt_do(ide);
+ ide_interrupt_do (ide);
}
}
}
-static uae_u32 gayle_attr_read(uaecptr addr)
+static uae_u32 gayle_attr_read (uaecptr addr)
{
uae_u8 v = 0;
- write_log("R: %x %x\n", addr, M68K_GETPC);
+ write_log ("R: %x %x\n", addr, M68K_GETPC);
addr &= 262144 - 1;
switch (addr)
{
v = 0x91;
break;
case 2:
- v = 0x05;
+ v = 0x05;
break;
case 4:
v = 0x23;
}
return v;
}
-static void gayle_attr_write(uaecptr addr, uae_u32 v)
+static void gayle_attr_write (uaecptr addr, uae_u32 v)
{
- write_log("W: %x=%x %x\n", addr, v, M68K_GETPC);
+ write_log ("W: %x=%x %x\n", addr, v, M68K_GETPC);
addr &= 262144 - 1;
if (addr == 0x40000) {
if (v)
- write_log("GAYLE: Reset active\n");
+ write_log ("GAYLE: Reset active\n");
else
- write_log("GAYLE: Reset non-active\n");
+ write_log ("GAYLE: Reset non-active\n");
}
}
return (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | (p[3]);
}
-void gayle_free_ide_units(void)
+void gayle_free_ide_units (void)
{
int i;
for (i = 0; i < 4; i++) {
struct ide_hdf *ide = &idedrive[i];
- hdf_hd_close(&ide->hdhfd);
- memset(ide, 0, sizeof (struct ide_hdf));
+ hdf_hd_close (&ide->hdhfd);
+ memset (ide, 0, sizeof (struct ide_hdf));
}
}
-int gayle_add_ide_unit(int ch, char *path, int blocksize, int readonly,
+int gayle_add_ide_unit (int ch, char *path, int blocksize, int readonly,
char *devname, int sectors, int surfaces, int reserved,
int bootpri, char *filesys)
{
if (ch >= 4)
return -1;
ide = &idedrive[ch];
- if (!hdf_hd_open(&ide->hdhfd, path, blocksize, readonly, devname, sectors, surfaces, reserved, bootpri, filesys))
+ if (!hdf_hd_open (&ide->hdhfd, path, blocksize, readonly, devname, sectors, surfaces, reserved, bootpri, filesys))
return -1;
- write_log("IDE%d ('%s'), CHS=%d,%d,%d\n", ch, path, ide->hdhfd.cyls, ide->hdhfd.heads, ide->hdhfd.secspertrack);
+ write_log ("IDE%d ('%s'), CHS=%d,%d,%d\n", ch, path, ide->hdhfd.cyls, ide->hdhfd.heads, ide->hdhfd.secspertrack);
ide->status = 0;
ide->data_offset = 0;
ide->data_size = 0;
return 1;
}
-static void initide(void)
+static void initide (void)
{
int i;
ide_splitter = 0;
if (idedrive[2].hdhfd.size) {
ide_splitter = 1;
- write_log("IDE splitter enabled\n");
+ write_log ("IDE splitter enabled\n");
}
for (i = 0; i < 4; i++)
idedrive[i].num = i;
gayle_intena = 0xff;
}
-
+
void gayle_reset (int hardreset)
{
static char bankname[100];
- initide();
+ initide ();
if (hardreset) {
ramsey_config = 0;
gary_coldboot = 1;
gary_timeout = 0;
gary_toenb = 0;
}
- strcpy(bankname, "Gayle (low)");
+ strcpy (bankname, "Gayle (low)");
if (currprefs.cs_ide == 2)
- strcpy(bankname, "A4000 IDE");
+ strcpy (bankname, "A4000 IDE");
if (currprefs.cs_mbdmac == 2) {
- strcat(bankname," + NCR53C710 SCSI");
- ncr_reset();
+ strcat (bankname," + NCR53C710 SCSI");
+ ncr_reset ();
}
gayle_bank.name = bankname;
}
-uae_u8 *restore_gayle(uae_u8 *src)
+uae_u8 *restore_gayle (uae_u8 *src)
{
- changed_prefs.cs_ide = restore_u8();
- gayle_intena = restore_u8();
- gayle_irq = restore_u8();
+ changed_prefs.cs_ide = restore_u8 ();
+ gayle_intena = restore_u8 ();
+ gayle_irq = restore_u8 ();
ide_error = 0;
return src;
}
if (ide->hdhfd.size == 0)
return NULL;
dstbak = dst = (uae_u8*)malloc (1000);
- save_u32(num);
- save_u64(ide->hdhfd.size);
- save_string(ide->hdhfd.path);
- save_u32(ide->hdhfd.hfd.blocksize);
- save_u32(ide->hdhfd.hfd.readonly);
- save_u8(ide->multiple_mode);
- save_u32(ide->hdhfd.cyls);
- save_u32(ide->hdhfd.heads);
- save_u32(ide->hdhfd.secspertrack);
- save_u8(ide_select);
- save_u8(ide_nsector);
- save_u8(ide_nsector2);
- save_u8(ide_sector);
- save_u8(ide_sector2);
- save_u8(ide_lcyl);
- save_u8(ide_lcyl2);
- save_u8(ide_hcyl);
- save_u8(ide_hcyl2);
- save_u8(ide_feat);
- save_u8(ide_feat2);
- save_u8(ide_error);
- save_u8(ide_devcon);
- save_u64(ide->hdhfd.hfd.virtual_size);
- save_u32(ide->hdhfd.hfd.secspertrack);
- save_u32(ide->hdhfd.hfd.heads);
- save_u32(ide->hdhfd.hfd.reservedblocks);
- save_u32(ide->hdhfd.bootpri);
+ save_u32 (num);
+ save_u64 (ide->hdhfd.size);
+ save_string (ide->hdhfd.path);
+ save_u32 (ide->hdhfd.hfd.blocksize);
+ save_u32 (ide->hdhfd.hfd.readonly);
+ save_u8 (ide->multiple_mode);
+ save_u32 (ide->hdhfd.cyls);
+ save_u32 (ide->hdhfd.heads);
+ save_u32 (ide->hdhfd.secspertrack);
+ save_u8 (ide_select);
+ save_u8 (ide_nsector);
+ save_u8 (ide_nsector2);
+ save_u8 (ide_sector);
+ save_u8 (ide_sector2);
+ save_u8 (ide_lcyl);
+ save_u8 (ide_lcyl2);
+ save_u8 (ide_hcyl);
+ save_u8 (ide_hcyl2);
+ save_u8 (ide_feat);
+ save_u8 (ide_feat2);
+ save_u8 (ide_error);
+ save_u8 (ide_devcon);
+ save_u64 (ide->hdhfd.hfd.virtual_size);
+ save_u32 (ide->hdhfd.hfd.secspertrack);
+ save_u32 (ide->hdhfd.hfd.heads);
+ save_u32 (ide->hdhfd.hfd.reservedblocks);
+ save_u32 (ide->hdhfd.bootpri);
*len = dst - dstbak;
return dstbak;
}
char *path;
struct ide_hdf *ide;
- num = restore_u32();
+ num = restore_u32 ();
ide = &idedrive[num];
- size = restore_u64();
- path = restore_string();
- blocksize = restore_u32();
- readonly = restore_u32();
- ide->multiple_mode = restore_u8();
- ide->hdhfd.cyls = restore_u32();
- ide->hdhfd.heads = restore_u32();
- ide->hdhfd.secspertrack = restore_u32();
- ide_select = restore_u8();
- ide_nsector = restore_u8();
- ide_sector = restore_u8();
- ide_lcyl = restore_u8();
- ide_hcyl = restore_u8();
- ide_feat = restore_u8();
- ide_nsector2 = restore_u8();
- ide_sector2 = restore_u8();
- ide_lcyl2 = restore_u8();
- ide_hcyl2 = restore_u8();
- ide_feat2 = restore_u8();
- ide_error = restore_u8();
- ide_devcon = restore_u8();
- ide->hdhfd.hfd.virtual_size = restore_u64();
- ide->hdhfd.hfd.secspertrack = restore_u32();
- ide->hdhfd.hfd.heads = restore_u32();
- ide->hdhfd.hfd.reservedblocks = restore_u32();
- ide->hdhfd.bootpri = restore_u32();
+ size = restore_u64 ();
+ path = restore_string ();
+ blocksize = restore_u32 ();
+ readonly = restore_u32 ();
+ ide->multiple_mode = restore_u8 ();
+ ide->hdhfd.cyls = restore_u32 ();
+ ide->hdhfd.heads = restore_u32 ();
+ ide->hdhfd.secspertrack = restore_u32 ();
+ ide_select = restore_u8 ();
+ ide_nsector = restore_u8 ();
+ ide_sector = restore_u8 ();
+ ide_lcyl = restore_u8 ();
+ ide_hcyl = restore_u8 ();
+ ide_feat = restore_u8 ();
+ ide_nsector2 = restore_u8 ();
+ ide_sector2 = restore_u8 ();
+ ide_lcyl2 = restore_u8 ();
+ ide_hcyl2 = restore_u8 ();
+ ide_feat2 = restore_u8 ();
+ ide_error = restore_u8 ();
+ ide_devcon = restore_u8 ();
+ ide->hdhfd.hfd.virtual_size = restore_u64 ();
+ ide->hdhfd.hfd.secspertrack = restore_u32 ();
+ ide->hdhfd.hfd.heads = restore_u32 ();
+ ide->hdhfd.hfd.reservedblocks = restore_u32 ();
+ ide->hdhfd.bootpri = restore_u32 ();
if (ide->hdhfd.hfd.virtual_size)
gayle_add_ide_unit (num, path, blocksize, readonly, ide->hdhfd.hfd.device_name,
ide->hdhfd.hfd.secspertrack, ide->hdhfd.hfd.heads, ide->hdhfd.hfd.reservedblocks, ide->hdhfd.bootpri, NULL);
else
- gayle_add_ide_unit (num, path, blocksize, readonly, 0, 0, 0, 0, 0, 0);
- xfree(path);
+ gayle_add_ide_unit (num, path, blocksize, readonly, 0, 0, 0, 0, 0, 0);
+ xfree (path);
return src;
}
*/
#include "sysconfig.h"
-#include "sysdeps.h"
+#include <stdio.h>
+#include <stdlib.h>
#include "genblitter.h"
return; /* Can anything clever be done here? */
}
-static void gen_writebyte(char* address, char* source)
+static void gen_writebyte (char* address, char* source)
{
comprintf("\twritebyte(%s,%s,scratchie);\n",address,source);
}
-static void gen_writeword(char* address, char* source)
+static void gen_writeword (char* address, char* source)
{
comprintf("\twriteword(%s,%s,scratchie);\n",address,source);
}
-static void gen_writelong(char* address, char* source)
+static void gen_writelong (char* address, char* source)
{
comprintf("\twritelong(%s,%s,scratchie);\n",address,source);
}
-static void gen_readbyte(char* address, char* dest)
+static void gen_readbyte (char* address, char* dest)
{
comprintf("\treadbyte(%s,%s,scratchie);\n",address,dest);
}
-static void gen_readword(char* address, char* dest)
+static void gen_readword (char* address, char* dest)
{
comprintf("\treadword(%s,%s,scratchie);\n",address,dest);
}
-static void gen_readlong(char* address, char* dest)
+static void gen_readlong (char* address, char* dest)
{
comprintf("\treadlong(%s,%s,scratchie);\n",address,dest);
}
static void returncycles (char *s, int cycles)
{
if (using_ce) return;
- printf ("%sreturn %d * %d;\n", s, cycles, CYCLE_UNIT / 2);
+ printf ("%sreturn %d * CYCLE_UNIT / 2;\n", s, cycles);
}
static void addcycles (int cycles)
{
if (!using_ce) return;
- printf ("\tdo_cycles_ce (%d * %d);\n", cycles, CYCLE_UNIT / 2);
+ printf ("\tdo_cycles_ce (%d * CYCLE_UNIT / 2);\n", cycles);
}
static void addcycles2 (char *s, int cycles)
{
if (!using_ce) return;
- printf ("%sdo_cycles_ce (%d * %d);\n", s, cycles, CYCLE_UNIT / 2);
+ printf ("%sdo_cycles_ce (%d * CYCLE_UNIT / 2);\n", s, cycles);
}
static void addcycles3 (char *s)
{
if (extracycles > 0) {
printf("\t{\n");
fill_prefetch_next ();
- printf("\tif (%d > 0) do_cycles(%d * %d);\n",
- extracycles, CYCLE_UNIT / 2, extracycles);
+ printf("\tif (%d > 0) do_cycles(%d * CYCLE_UNIT / 2);\n",
+ extracycles, extracycles);
printf("\t}\n");
} else {
fill_prefetch_next ();
break;
case sz_word:
#ifdef USE_DUBIOUS_BIGENDIAN_OPTIMIZATION
- printf ("\tuae_s16 %s = ((uae_s16*)&m68k_dreg(regs, %s))[1];\n", name, reg);
+ printf ("\tuae_s16 %s = ((uae_s16*)&m68k_dreg (regs, %s))[1];\n", name, reg);
#else
- printf ("\tuae_s16 %s = m68k_dreg(regs, %s);\n", name, reg);
+ printf ("\tuae_s16 %s = m68k_dreg (regs, %s);\n", name, reg);
#endif
break;
case sz_long:
- printf ("\tuae_s32 %s = m68k_dreg(regs, %s);\n", name, reg);
+ printf ("\tuae_s32 %s = m68k_dreg (regs, %s);\n", name, reg);
break;
default:
abort ();
if (getv == 1)
switch (size) {
case sz_word:
- printf ("\tuae_s16 %s = m68k_areg(regs, %s);\n", name, reg);
+ printf ("\tuae_s16 %s = m68k_areg (regs, %s);\n", name, reg);
break;
case sz_long:
- printf ("\tuae_s32 %s = m68k_areg(regs, %s);\n", name, reg);
+ printf ("\tuae_s32 %s = m68k_areg (regs, %s);\n", name, reg);
break;
default:
abort ();
}
return;
case Aind:
- printf ("\tuaecptr %sa = m68k_areg(regs, %s);\n", name, reg);
+ printf ("\tuaecptr %sa = m68k_areg (regs, %s);\n", name, reg);
break;
case Aipi:
- printf ("\tuaecptr %sa = m68k_areg(regs, %s);\n", name, reg);
+ printf ("\tuaecptr %sa = m68k_areg (regs, %s);\n", name, reg);
break;
case Apdi:
printf ("\tuaecptr %sa;\n", name);
switch (size) {
case sz_byte:
if (movem)
- printf ("\t%sa = m68k_areg(regs, %s);\n", name, reg);
+ printf ("\t%sa = m68k_areg (regs, %s);\n", name, reg);
else
- printf ("\t%sa = m68k_areg(regs, %s) - areg_byteinc[%s];\n", name, reg, reg);
+ printf ("\t%sa = m68k_areg (regs, %s) - areg_byteinc[%s];\n", name, reg, reg);
break;
case sz_word:
- printf ("\t%sa = m68k_areg(regs, %s) - %d;\n", name, reg, movem ? 0 : 2);
+ printf ("\t%sa = m68k_areg (regs, %s) - %d;\n", name, reg, movem ? 0 : 2);
break;
case sz_long:
- printf ("\t%sa = m68k_areg(regs, %s) - %d;\n", name, reg, movem ? 0 : 4);
+ printf ("\t%sa = m68k_areg (regs, %s) - %d;\n", name, reg, movem ? 0 : 4);
break;
default:
abort ();
}
break;
case Ad16:
- printf ("\tuaecptr %sa = m68k_areg(regs, %s) + (uae_s32)(uae_s16)%s;\n", name, reg, gen_nextiword (flags & GF_NOREFILL));
+ printf ("\tuaecptr %sa = m68k_areg (regs, %s) + (uae_s32)(uae_s16)%s;\n", name, reg, gen_nextiword (flags & GF_NOREFILL));
break;
case Ad8r:
printf ("\tuaecptr %sa;\n", name);
start_brace ();
/* This would ordinarily be done in gen_nextiword, which we bypass. */
insn_n_cycles += 4;
- printf ("\t%sa = get_disp_ea_020(regs, m68k_areg(regs, %s), next_iword(regs));\n", name, reg);
+ printf ("\t%sa = get_disp_ea_020 (regs, m68k_areg (regs, %s), next_iword (regs));\n", name, reg);
} else {
- printf ("\t%sa = get_disp_ea_000(regs, m68k_areg(regs, %s), %s);\n", name, reg, gen_nextiword (flags & GF_NOREFILL));
+ printf ("\t%sa = get_disp_ea_000 (regs, m68k_areg (regs, %s), %s);\n", name, reg, gen_nextiword (flags & GF_NOREFILL));
}
if (!(flags & GF_AD8R)) {
addcycles (2);
start_brace ();
/* This would ordinarily be done in gen_nextiword, which we bypass. */
insn_n_cycles += 4;
- printf ("\ttmppc = m68k_getpc(regs);\n");
- printf ("\t%sa = get_disp_ea_020(regs, tmppc, next_iword(regs));\n", name);
+ printf ("\ttmppc = m68k_getpc (regs);\n");
+ printf ("\t%sa = get_disp_ea_020 (regs, tmppc, next_iword (regs));\n", name);
} else {
- printf ("\ttmppc = m68k_getpc(regs) + %d;\n", m68k_pc_offset);
- printf ("\t%sa = get_disp_ea_000(regs, tmppc, %s);\n", name, gen_nextiword (flags & GF_NOREFILL));
+ printf ("\ttmppc = m68k_getpc (regs) + %d;\n", m68k_pc_offset);
+ printf ("\t%sa = get_disp_ea_000 (regs, tmppc, %s);\n", name, gen_nextiword (flags & GF_NOREFILL));
}
if (!(flags & GF_PC8R)) {
addcycles (2);
if ((using_prefetch || using_ce) && using_exception_3 && getv != 0 && size != sz_byte) {
printf ("\tif (%sa & 1) {\n", name);
- printf ("\t\texception3 (opcode, m68k_getpc(regs) + %d, %sa);\n",
+ printf ("\t\texception3 (opcode, m68k_getpc (regs) + %d, %sa);\n",
m68k_pc_offset_last + e3fudge, name);
printf ("\t\tgoto %s;\n", endlabelstr);
printf ("\t}\n");
case Aipi:
switch (size) {
case sz_byte:
- printf ("\tm68k_areg(regs, %s) += areg_byteinc[%s];\n", reg, reg);
+ printf ("\tm68k_areg (regs, %s) += areg_byteinc[%s];\n", reg, reg);
break;
case sz_word:
- printf ("\tm68k_areg(regs, %s) += 2;\n", reg);
+ printf ("\tm68k_areg (regs, %s) += 2;\n", reg);
break;
case sz_long:
- printf ("\tm68k_areg(regs, %s) += 4;\n", reg);
+ printf ("\tm68k_areg (regs, %s) += 4;\n", reg);
break;
default:
abort ();
case Dreg:
switch (size) {
case sz_byte:
- printf ("\tm68k_dreg(regs, %s) = (m68k_dreg(regs, %s) & ~0xff) | ((%s) & 0xff);\n", reg, reg, from);
+ printf ("\tm68k_dreg (regs, %s) = (m68k_dreg (regs, %s) & ~0xff) | ((%s) & 0xff);\n", reg, reg, from);
break;
case sz_word:
- printf ("\tm68k_dreg(regs, %s) = (m68k_dreg(regs, %s) & ~0xffff) | ((%s) & 0xffff);\n", reg, reg, from);
+ printf ("\tm68k_dreg (regs, %s) = (m68k_dreg (regs, %s) & ~0xffff) | ((%s) & 0xffff);\n", reg, reg, from);
break;
case sz_long:
- printf ("\tm68k_dreg(regs, %s) = (%s);\n", reg, from);
+ printf ("\tm68k_dreg (regs, %s) = (%s);\n", reg, from);
break;
default:
abort ();
case Areg:
switch (size) {
case sz_word:
- printf ("\tm68k_areg(regs, %s) = (uae_s32)(uae_s16)(%s);\n", reg, from);
+ printf ("\tm68k_areg (regs, %s) = (uae_s32)(uae_s16)(%s);\n", reg, from);
break;
case sz_long:
- printf ("\tm68k_areg(regs, %s) = (%s);\n", reg, from);
+ printf ("\tm68k_areg (regs, %s) = (%s);\n", reg, from);
break;
default:
abort ();
int size = table68k[opcode].size == sz_long ? 4 : 2;
if (table68k[opcode].size == sz_long) {
- strcpy (getcode, "get_long(srca)");
+ strcpy (getcode, "get_long (srca)");
} else {
- strcpy (getcode, "(uae_s32)(uae_s16)get_word(srca)");
+ strcpy (getcode, "(uae_s32)(uae_s16)get_word (srca)");
}
printf ("\tuae_u16 mask = %s;\n", gen_nextiword (0));
printf ("\tunsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff;\n");
genamode (table68k[opcode].dmode, "dstreg", table68k[opcode].size, "src", 2, 1, 0);
start_brace ();
- printf ("\twhile (dmask) { m68k_dreg(regs, movem_index1[dmask]) = %s; srca += %d; dmask = movem_next[dmask]; }\n",
+ printf ("\twhile (dmask) { m68k_dreg (regs, movem_index1[dmask]) = %s; srca += %d; dmask = movem_next[dmask]; }\n",
getcode, size);
- printf ("\twhile (amask) { m68k_areg(regs, movem_index1[amask]) = %s; srca += %d; amask = movem_next[amask]; }\n",
+ printf ("\twhile (amask) { m68k_areg (regs, movem_index1[amask]) = %s; srca += %d; amask = movem_next[amask]; }\n",
getcode, size);
if (table68k[opcode].dmode == Aipi)
- printf ("\tm68k_areg(regs, dstreg) = srca;\n");
+ printf ("\tm68k_areg (regs, dstreg) = srca;\n");
}
static void genmovemel_ce (uae_u16 opcode)
addcycles (2);
start_brace ();
if (table68k[opcode].size == sz_long) {
- printf ("\twhile (dmask) { v = get_word_ce(srca) << 16; v |= get_word_ce(srca + 2); m68k_dreg(regs, movem_index1[dmask]) = v; srca += %d; dmask = movem_next[dmask]; }\n",
+ printf ("\twhile (dmask) { v = get_word_ce(srca) << 16; v |= get_word_ce(srca + 2); m68k_dreg (regs, movem_index1[dmask]) = v; srca += %d; dmask = movem_next[dmask]; }\n",
size);
- printf ("\twhile (amask) { v = get_word_ce(srca) << 16; v |= get_word_ce(srca + 2); m68k_areg(regs, movem_index1[amask]) = v; srca += %d; amask = movem_next[amask]; }\n",
+ printf ("\twhile (amask) { v = get_word_ce(srca) << 16; v |= get_word_ce(srca + 2); m68k_areg (regs, movem_index1[amask]) = v; srca += %d; amask = movem_next[amask]; }\n",
size);
} else {
- printf ("\twhile (dmask) { m68k_dreg(regs, movem_index1[dmask]) = (uae_s32)(uae_s16)get_word_ce(srca); srca += %d; dmask = movem_next[dmask]; }\n",
+ printf ("\twhile (dmask) { m68k_dreg (regs, movem_index1[dmask]) = (uae_s32)(uae_s16)get_word_ce(srca); srca += %d; dmask = movem_next[dmask]; }\n",
size);
- printf ("\twhile (amask) { m68k_areg(regs, movem_index1[amask]) = (uae_s32)(uae_s16)get_word_ce(srca); srca += %d; amask = movem_next[amask]; }\n",
+ printf ("\twhile (amask) { m68k_areg (regs, movem_index1[amask]) = (uae_s32)(uae_s16)get_word_ce(srca); srca += %d; amask = movem_next[amask]; }\n",
size);
}
printf ("\tget_word_ce (srca);\n");
if (table68k[opcode].dmode == Aipi)
- printf ("\tm68k_areg(regs, dstreg) = srca;\n");
+ printf ("\tm68k_areg (regs, dstreg) = srca;\n");
}
static void genmovemle (uae_u16 opcode)
char putcode[100];
int size = table68k[opcode].size == sz_long ? 4 : 2;
if (table68k[opcode].size == sz_long) {
- strcpy (putcode, "put_long(srca");
+ strcpy (putcode, "put_long (srca");
} else {
- strcpy (putcode, "put_word(srca");
+ strcpy (putcode, "put_word (srca");
}
printf ("\tuae_u16 mask = %s;\n", gen_nextiword (0));
printf ("\tint type = get_cpu_model() >= 68020;\n");
printf ("\twhile (amask) {\n");
printf ("\t\tsrca -= %d;\n", size);
- printf ("\t\tif (type) m68k_areg(regs, dstreg) = srca;\n");
- printf ("\t\t%s, m68k_areg(regs, movem_index2[amask]));\n", putcode);
+ printf ("\t\tif (type) m68k_areg (regs, dstreg) = srca;\n");
+ printf ("\t\t%s, m68k_areg (regs, movem_index2[amask]));\n", putcode);
printf ("\t\tamask = movem_next[amask];\n");
printf ("\t}\n");
- printf ("\twhile (dmask) { srca -= %d; %s, m68k_dreg(regs, movem_index2[dmask])); dmask = movem_next[dmask]; }\n",
+ printf ("\twhile (dmask) { srca -= %d; %s, m68k_dreg (regs, movem_index2[dmask])); dmask = movem_next[dmask]; }\n",
size, putcode);
- printf ("\tm68k_areg(regs, dstreg) = srca;\n");
+ printf ("\tm68k_areg (regs, dstreg) = srca;\n");
} else {
printf ("\tuae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff;\n");
- printf ("\twhile (dmask) { %s, m68k_dreg(regs, movem_index1[dmask])); srca += %d; dmask = movem_next[dmask]; }\n",
+ printf ("\twhile (dmask) { %s, m68k_dreg (regs, movem_index1[dmask])); srca += %d; dmask = movem_next[dmask]; }\n",
putcode, size);
- printf ("\twhile (amask) { %s, m68k_areg(regs, movem_index1[amask])); srca += %d; amask = movem_next[amask]; }\n",
+ printf ("\twhile (amask) { %s, m68k_areg (regs, movem_index1[amask])); srca += %d; amask = movem_next[amask]; }\n",
putcode, size);
}
}
if (table68k[opcode].size == sz_long) {
if (table68k[opcode].dmode == Apdi) {
printf ("\tuae_u16 amask = mask & 0xff, dmask = (mask >> 8) & 0xff;\n");
- printf ("\twhile (amask) { srca -= %d; put_word_ce (srca, m68k_areg(regs, movem_index2[amask]) >> 16); put_word_ce (srca + 2, m68k_areg(regs, movem_index2[amask])); amask = movem_next[amask]; }\n",
+ printf ("\twhile (amask) { srca -= %d; put_word_ce (srca, m68k_areg (regs, movem_index2[amask]) >> 16); put_word_ce (srca + 2, m68k_areg (regs, movem_index2[amask])); amask = movem_next[amask]; }\n",
size);
- printf ("\twhile (dmask) { srca -= %d; put_word_ce (srca, m68k_dreg(regs, movem_index2[dmask]) >> 16); put_word_ce (srca + 2, m68k_dreg(regs, movem_index2[dmask])); dmask = movem_next[dmask]; }\n",
+ printf ("\twhile (dmask) { srca -= %d; put_word_ce (srca, m68k_dreg (regs, movem_index2[dmask]) >> 16); put_word_ce (srca + 2, m68k_dreg (regs, movem_index2[dmask])); dmask = movem_next[dmask]; }\n",
size);
- printf ("\tm68k_areg(regs, dstreg) = srca;\n");
+ printf ("\tm68k_areg (regs, dstreg) = srca;\n");
} else {
printf ("\tuae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff;\n");
- printf ("\twhile (dmask) { put_word_ce (srca, m68k_dreg(regs, movem_index1[dmask]) >> 16); put_word_ce (srca + 2, m68k_dreg(regs, movem_index1[dmask])); srca += %d; dmask = movem_next[dmask]; }\n",
+ printf ("\twhile (dmask) { put_word_ce (srca, m68k_dreg (regs, movem_index1[dmask]) >> 16); put_word_ce (srca + 2, m68k_dreg (regs, movem_index1[dmask])); srca += %d; dmask = movem_next[dmask]; }\n",
size);
- printf ("\twhile (amask) { put_word_ce (srca, m68k_areg(regs, movem_index1[amask]) >> 16); put_word_ce (srca + 2, m68k_areg(regs, movem_index1[amask])); srca += %d; amask = movem_next[amask]; }\n",
+ printf ("\twhile (amask) { put_word_ce (srca, m68k_areg (regs, movem_index1[amask]) >> 16); put_word_ce (srca + 2, m68k_areg (regs, movem_index1[amask])); srca += %d; amask = movem_next[amask]; }\n",
size);
}
} else {
if (table68k[opcode].dmode == Apdi) {
printf ("\tuae_u16 amask = mask & 0xff, dmask = (mask >> 8) & 0xff;\n");
- printf ("\twhile (amask) { srca -= %d; put_word_ce (srca, m68k_areg(regs, movem_index2[amask])); amask = movem_next[amask]; }\n",
+ printf ("\twhile (amask) { srca -= %d; put_word_ce (srca, m68k_areg (regs, movem_index2[amask])); amask = movem_next[amask]; }\n",
size);
- printf ("\twhile (dmask) { srca -= %d; put_word_ce (srca, m68k_dreg(regs, movem_index2[dmask])); dmask = movem_next[dmask]; }\n",
+ printf ("\twhile (dmask) { srca -= %d; put_word_ce (srca, m68k_dreg (regs, movem_index2[dmask])); dmask = movem_next[dmask]; }\n",
size);
- printf ("\tm68k_areg(regs, dstreg) = srca;\n");
+ printf ("\tm68k_areg (regs, dstreg) = srca;\n");
} else {
printf ("\tuae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff;\n");
- printf ("\twhile (dmask) { put_word_ce (srca, m68k_dreg(regs, movem_index1[dmask])); srca += %d; dmask = movem_next[dmask]; }\n",
+ printf ("\twhile (dmask) { put_word_ce (srca, m68k_dreg (regs, movem_index1[dmask])); srca += %d; dmask = movem_next[dmask]; }\n",
size);
- printf ("\twhile (amask) { put_word_ce (srca, m68k_areg(regs, movem_index1[amask])); srca += %d; amask = movem_next[amask]; }\n",
+ printf ("\twhile (amask) { put_word_ce (srca, m68k_areg (regs, movem_index1[amask])); srca += %d; amask = movem_next[amask]; }\n",
size);
}
}
{
if (using_ce && isreg (dmode)) {
printf ("\t{\n");
- printf ("\t\tint cycles = %d * %d;\n", size == sz_long ? 8 : 6, CYCLE_UNIT / 2);
- printf ("\t\tcycles += 2 * %d * ccnt;\n", CYCLE_UNIT / 2);
+ printf ("\t\tint cycles = %d * CYCLE_UNIT / 2;\n", size == sz_long ? 8 : 6);
+ printf ("\t\tcycles += 2 * CYCLE_UNIT / 2 * ccnt;\n");
addcycles3 ("\t\t");
printf ("\t}\n");
}
/* fall through */
case 2: /* priviledged */
- printf ("if (!regs->s) { Exception(8, regs, 0); goto %s; }\n", endlabelstr);
+ printf ("if (!regs->s) { Exception (8, regs, 0); goto %s; }\n", endlabelstr);
need_endlabel = 1;
start_brace ();
break;
case 3: /* privileged if size == word */
if (curi->size == sz_byte)
break;
- printf ("if (!regs->s) { Exception(8, regs, 0); goto %s; }\n", endlabelstr);
+ printf ("if (!regs->s) { Exception (8, regs, 0); goto %s; }\n", endlabelstr);
need_endlabel = 1;
start_brace ();
break;
break;
case i_ORSR:
case i_EORSR:
- printf ("\tMakeSR(regs);\n");
+ printf ("\tMakeSR (regs);\n");
genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
if (curi->size == sz_byte) {
printf ("\tsrc &= 0xFF;\n");
addcycles (4);
fill_prefetch_next ();
printf ("\tregs->sr %c= src;\n", curi->mnemo == i_EORSR ? '^' : '|');
- printf ("\tMakeFromSR(regs);\n");
+ printf ("\tMakeFromSR (regs);\n");
break;
case i_ANDSR:
- printf ("\tMakeSR(regs);\n");
+ printf ("\tMakeSR (regs);\n");
genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
if (curi->size == sz_byte) {
printf ("\tsrc |= 0xFF00;\n");
addcycles (4);
fill_prefetch_next ();
printf ("\tregs->sr &= src;\n");
- printf ("\tMakeFromSR(regs);\n");
+ printf ("\tMakeFromSR (regs);\n");
break;
case i_SUB:
genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
* weird things... */
case i_MVPRM:
genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
- printf ("\tuaecptr memp = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)%s;\n", gen_nextiword (0));
+ printf ("\tuaecptr memp = m68k_areg (regs, dstreg) + (uae_s32)(uae_s16)%s;\n", gen_nextiword (0));
if (using_ce) {
if (curi->size == sz_word) {
printf ("\tput_byte_ce (memp, src >> 8); put_byte_ce (memp + 2, src);\n");
fill_prefetch_next ();
break;
case i_MVPMR:
- printf ("\tuaecptr memp = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)%s;\n", gen_nextiword (0));
+ printf ("\tuaecptr memp = m68k_areg (regs, srcreg) + (uae_s32)(uae_s16)%s;\n", gen_nextiword (0));
genamode (curi->dmode, "dstreg", curi->size, "dst", 2, 0, 0);
if (using_ce) {
if (curi->size == sz_word) {
if (curi->mnemo == i_MOVEA && curi->size == sz_word)
printf ("\tsrc = (uae_s32)(uae_s16)src;\n");
if (curi->dmode == Apdi) {
- fill_prefetch_next ();
- prefetch_done = 1;
+ fill_prefetch_next ();
+ prefetch_done = 1;
}
genastore ("src", curi->dmode, "dstreg", curi->size, "dst");
if (curi->mnemo == i_MOVE)
if (isreg (curi->smode))
addcycles (2);
fill_prefetch_next ();
- printf ("\tMakeSR(regs);\n");
+ printf ("\tMakeSR (regs);\n");
if (curi->size == sz_byte)
genastore ("regs->sr & 0xff", curi->smode, "srcreg", sz_word, "src");
else
genamode (curi->smode, "srcreg", sz_word, "src", 1, 0, 0);
if (curi->size == sz_byte) {
addcycles (8);
- printf ("\tMakeSR(regs);\n\tregs->sr &= 0xFF00;\n\tregs->sr |= src & 0xFF;\n");
+ printf ("\tMakeSR (regs);\n\tregs->sr &= 0xFF00;\n\tregs->sr |= src & 0xFF;\n");
} else {
addcycles (4);
printf ("\tregs->sr = src;\n");
}
fill_prefetch_next ();
- printf ("\tMakeFromSR(regs);\n");
+ printf ("\tMakeFromSR (regs);\n");
break;
case i_SWAP:
genamode (curi->smode, "srcreg", sz_long, "src", 1, 0, 0);
fill_prefetch_next ();
printf ("\tcpureset();\n");
if (using_prefetch)
- printf ("\tregs->irc = get_iword(regs, 4);\n");
+ printf ("\tregs->irc = get_iword (regs, 4);\n");
break;
case i_NOP:
fill_prefetch_next ();
/* real stop do not prefetch anything, later... */
genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
printf ("\tregs->sr = src;\n");
- printf ("\tMakeFromSR(regs);\n");
+ printf ("\tMakeFromSR (regs);\n");
printf ("\tm68k_setstopped(regs, 1);\n");
sync_m68k_pc ();
fill_prefetch_full ();
if (cpu_level == 0) {
genamode (Aipi, "7", sz_word, "sr", 1, 0, GF_NOREFILL);
genamode (Aipi, "7", sz_long, "pc", 1, 0, GF_NOREFILL);
- printf ("\tregs->sr = sr; m68k_setpc(regs, pc);\n");
- printf ("\tMakeFromSR(regs);\n");
+ printf ("\tregs->sr = sr; m68k_setpc (regs, pc);\n");
+ printf ("\tMakeFromSR (regs);\n");
} else {
int old_brace_level = n_braces;
if (next_cpu_level < 0)
printf ("\tnewsr = sr; newpc = pc;\n");
printf ("\tif ((format & 0xF000) == 0x0000) { break; }\n");
printf ("\telse if ((format & 0xF000) == 0x1000) { ; }\n");
- printf ("\telse if ((format & 0xF000) == 0x2000) { m68k_areg(regs, 7) += 4; break; }\n");
- printf ("\telse if ((format & 0xF000) == 0x8000) { m68k_areg(regs, 7) += 50; break; }\n");
- printf ("\telse if ((format & 0xF000) == 0x7000) { m68k_areg(regs, 7) += 52; break; }\n");
- printf ("\telse if ((format & 0xF000) == 0x9000) { m68k_areg(regs, 7) += 12; break; }\n");
- printf ("\telse if ((format & 0xF000) == 0xa000) { m68k_areg(regs, 7) += 24; break; }\n");
- printf ("\telse if ((format & 0xF000) == 0xb000) { m68k_areg(regs, 7) += 84; break; }\n");
- printf ("\telse { Exception(14, regs, 0); goto %s; }\n", endlabelstr);
- printf ("\tregs->sr = newsr; MakeFromSR(regs);\n}\n");
+ printf ("\telse if ((format & 0xF000) == 0x2000) { m68k_areg (regs, 7) += 4; break; }\n");
+ printf ("\telse if ((format & 0xF000) == 0x8000) { m68k_areg (regs, 7) += 50; break; }\n");
+ printf ("\telse if ((format & 0xF000) == 0x7000) { m68k_areg (regs, 7) += 52; break; }\n");
+ printf ("\telse if ((format & 0xF000) == 0x9000) { m68k_areg (regs, 7) += 12; break; }\n");
+ printf ("\telse if ((format & 0xF000) == 0xa000) { m68k_areg (regs, 7) += 24; break; }\n");
+ printf ("\telse if ((format & 0xF000) == 0xb000) { m68k_areg (regs, 7) += 84; break; }\n");
+ printf ("\telse { Exception (14, regs, 0); goto %s; }\n", endlabelstr);
+ printf ("\tregs->sr = newsr; MakeFromSR (regs);\n}\n");
pop_braces (old_brace_level);
- printf ("\tregs->sr = newsr; MakeFromSR(regs);\n");
+ printf ("\tregs->sr = newsr; MakeFromSR (regs);\n");
printf ("\tif (newpc & 1)\n");
- printf ("\t\texception3 (0x%04.4X, m68k_getpc(regs), newpc);\n", opcode);
+ printf ("\t\texception3 (0x%04.4X, m68k_getpc (regs), newpc);\n", opcode);
printf ("\telse\n");
- printf ("\t\tm68k_setpc(regs, newpc);\n");
+ printf ("\t\tm68k_setpc (regs, newpc);\n");
need_endlabel = 1;
}
/* PC is set and prefetch filled. */
case i_RTD:
genamode (Aipi, "7", sz_long, "pc", 1, 0, 0);
genamode (curi->smode, "srcreg", curi->size, "offs", 1, 0, 0);
- printf ("\tm68k_areg(regs, 7) += offs;\n");
+ printf ("\tm68k_areg (regs, 7) += offs;\n");
printf ("\tif (pc & 1)\n");
- printf ("\t\texception3 (0x%04.4X, m68k_getpc(regs), pc);\n", opcode);
+ printf ("\t\texception3 (0x%04.4X, m68k_getpc (regs), pc);\n", opcode);
printf ("\telse\n");
- printf ("\t\tm68k_setpc(regs, pc);\n");
+ printf ("\t\tm68k_setpc (regs, pc);\n");
/* PC is set and prefetch filled. */
m68k_pc_offset = 0;
fill_prefetch_full ();
genamode (Apdi, "7", sz_long, "old", 2, 0, GF_AA);
genamode (curi->smode, "srcreg", sz_long, "src", 1, 0, GF_AA);
genastore ("src", Apdi, "7", sz_long, "old");
- genastore ("m68k_areg(regs, 7)", curi->smode, "srcreg", sz_long, "src");
+ genastore ("m68k_areg (regs, 7)", curi->smode, "srcreg", sz_long, "src");
genamode (curi->dmode, "dstreg", curi->size, "offs", 1, 0, 0);
- printf ("\tm68k_areg(regs, 7) += offs;\n");
+ printf ("\tm68k_areg (regs, 7) += offs;\n");
fill_prefetch_next ();
break;
case i_UNLK:
genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
- printf ("\tm68k_areg(regs, 7) = src;\n");
+ printf ("\tm68k_areg (regs, 7) = src;\n");
genamode (Aipi, "7", sz_long, "old", 1, 0, 0);
fill_prefetch_next ();
genastore ("old", curi->smode, "srcreg", curi->size, "src");
need_endlabel = 1;
break;
case i_RTR:
- printf ("\tMakeSR(regs);\n");
+ printf ("\tMakeSR (regs);\n");
genamode (Aipi, "7", sz_word, "sr", 1, 0, 0);
genamode (Aipi, "7", sz_long, "pc", 1, 0, 0);
printf ("\tregs->sr &= 0xFF00; sr &= 0xFF;\n");
- printf ("\tregs->sr |= sr; m68k_setpc(regs, pc);\n");
- printf ("\tMakeFromSR(regs);\n");
+ printf ("\tregs->sr |= sr; m68k_setpc (regs, pc);\n");
+ printf ("\tMakeFromSR (regs);\n");
m68k_pc_offset = 0;
fill_prefetch_full ();
break;
case i_JSR:
genamode (curi->smode, "srcreg", curi->size, "src", 0, 0, GF_AA|GF_NOREFILL);
start_brace ();
- printf ("\tuaecptr oldpc = m68k_getpc(regs) + %d;\n", m68k_pc_offset);
+ printf ("\tuaecptr oldpc = m68k_getpc (regs) + %d;\n", m68k_pc_offset);
if (using_exception_3) {
printf ("\tif (srca & 1) {\n");
printf ("\t\texception3i (opcode, oldpc, srca);\n");
genamode (curi->smode, "srcreg", curi->size, "src", 0, 0, GF_AA|GF_NOREFILL);
if (using_exception_3) {
printf ("\tif (srca & 1) {\n");
- printf ("\t\texception3i (opcode, m68k_getpc(regs) + 6, srca);\n");
+ printf ("\t\texception3i (opcode, m68k_getpc (regs) + 6, srca);\n");
printf ("\t\tgoto %s;\n", endlabelstr);
printf ("\t}\n");
need_endlabel = 1;
}
if (curi->smode == Ad16 || curi->smode == Ad8r || curi->smode == absw || curi->smode == PC16 || curi->smode == PC8r)
addcycles (2);
- printf ("\tm68k_setpc(regs, srca);\n");
+ printf ("\tm68k_setpc (regs, srca);\n");
m68k_pc_offset = 0;
fill_prefetch_full ();
break;
printf ("\ts = (uae_s32)src + 2;\n");
if (using_exception_3) {
printf ("\tif (src & 1) {\n");
- printf ("\t\texception3i (opcode, m68k_getpc(regs) + 2, m68k_getpc(regs) + s);\n");
+ printf ("\t\texception3i (opcode, m68k_getpc (regs) + 2, m68k_getpc (regs) + s);\n");
printf ("\t\tgoto %s;\n", endlabelstr);
printf ("\t}\n");
need_endlabel = 1;
}
addcycles (2);
if (using_ce)
- printf ("\tm68k_do_bsr_ce (regs, m68k_getpc(regs) + %d, s);\n", m68k_pc_offset);
+ printf ("\tm68k_do_bsr_ce (regs, m68k_getpc (regs) + %d, s);\n", m68k_pc_offset);
else if (using_indirect)
- printf ("\tm68k_do_bsri (regs, m68k_getpc(regs) + %d, s);\n", m68k_pc_offset);
+ printf ("\tm68k_do_bsri (regs, m68k_getpc (regs) + %d, s);\n", m68k_pc_offset);
else
- printf ("\tm68k_do_bsr (regs, m68k_getpc(regs) + %d, s);\n", m68k_pc_offset);
+ printf ("\tm68k_do_bsr (regs, m68k_getpc (regs) + %d, s);\n", m68k_pc_offset);
m68k_pc_offset = 0;
fill_prefetch_full ();
break;
if (cpu_level < 2) {
addcycles (2);
printf ("\tif (cctrue(®s->ccrflags, %d)) {\n", curi->cc, endlabelstr);
- printf ("\t\texception3i (opcode, m68k_getpc(regs) + 2, m68k_getpc(regs) + 1);\n");
+ printf ("\t\texception3i (opcode, m68k_getpc (regs) + 2, m68k_getpc (regs) + 1);\n");
printf ("\t\tgoto %s;\n", endlabelstr);
printf ("\t}\n");
sync_m68k_pc ();
printf ("\tif (!cctrue(®s->ccrflags, %d)) goto didnt_jump;\n", curi->cc);
if (using_exception_3) {
printf ("\tif (src & 1) {\n");
- printf ("\t\texception3i (opcode, m68k_getpc(regs) + 2, m68k_getpc(regs) + 2 + (uae_s32)src);\n");
+ printf ("\t\texception3i (opcode, m68k_getpc (regs) + 2, m68k_getpc (regs) + 2 + (uae_s32)src);\n");
printf ("\t\tgoto %s;\n", endlabelstr);
printf ("\t}\n");
need_endlabel = 1;
if (using_ce)
printf ("\treturn;\n");
else
- printf ("\treturn 10 * %d;\n", CYCLE_UNIT / 2);
+ printf ("\treturn 10 * CYCLE_UNIT / 2;\n");
} else {
printf ("\tm68k_incpc (regs, (uae_s32)src + 2);\n");
returncycles ("\t", 10);
genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, GF_AA | GF_NOREFILL);
genamode (curi->dmode, "dstreg", curi->size, "offs", 1, 0, GF_AA | GF_NOREFILL);
- printf ("\tuaecptr oldpc = m68k_getpc(regs);\n");
+ printf ("\tuaecptr oldpc = m68k_getpc (regs);\n");
addcycles (2);
printf ("\tif (!cctrue(®s->ccrflags, %d)) {\n", curi->cc);
- printf ("\t\tm68k_incpc(regs, (uae_s32)offs + 2);\n");
+ printf ("\t\tm68k_incpc (regs, (uae_s32)offs + 2);\n");
printf ("\t"); fill_prefetch_1 (0);
printf ("\t"); genastore ("(src-1)", curi->smode, "srcreg", curi->size, "src");
printf ("\t\tif (src) {\n");
if (using_exception_3) {
printf ("\t\t\tif (offs & 1) {\n");
- printf ("\t\t\t\texception3i (opcode, m68k_getpc(regs) + 2, m68k_getpc(regs) + 2 + (uae_s32)offs + 2);\n");
+ printf ("\t\t\t\texception3i (opcode, m68k_getpc (regs) + 2, m68k_getpc (regs) + 2 + (uae_s32)offs + 2);\n");
printf ("\t\t\t\tgoto %s;\n", endlabelstr);
printf ("\t\t\t}\n");
need_endlabel = 1;
if (using_ce) {
printf ("\tint cycles = 0;\n");
if (isreg (curi->smode))
- printf ("\tif (val) cycles += 2 * %d;\n", CYCLE_UNIT / 2);
+ printf ("\tif (val) cycles += 2 * CYCLE_UNIT / 2;\n");
addcycles3 ("\t");
}
genastore ("val", curi->smode, "srcreg", curi->size, "src");
break;
case i_DIVU:
- printf ("\tuaecptr oldpc = m68k_getpc(regs);\n");
+ printf ("\tuaecptr oldpc = m68k_getpc (regs);\n");
genamode (curi->smode, "srcreg", sz_word, "src", 1, 0, 0);
genamode (curi->dmode, "dstreg", sz_long, "dst", 1, 0, 0);
printf ("\tCLEAR_CZNV (®s->ccrflags);\n");
printf ("\t\tuae_u32 newv = (uae_u32)dst / (uae_u32)(uae_u16)src;\n");
printf ("\t\tuae_u32 rem = (uae_u32)dst %% (uae_u32)(uae_u16)src;\n");
if (using_ce) {
- printf ("\t\tint cycles = getDivu68kCycles((uae_u32)dst, (uae_u16)src) * %d;\n", CYCLE_UNIT / 2);
+ printf ("\t\tint cycles = getDivu68kCycles((uae_u32)dst, (uae_u16)src) * CYCLE_UNIT / 2;\n");
addcycles3 ("\t\t");
}
/* The N flag appears to be set each time there is an overflow.
need_endlabel = 1;
break;
case i_DIVS:
- printf ("\tuaecptr oldpc = m68k_getpc(regs);\n");
+ printf ("\tuaecptr oldpc = m68k_getpc (regs);\n");
genamode (curi->smode, "srcreg", sz_word, "src", 1, 0, 0);
genamode (curi->dmode, "dstreg", sz_long, "dst", 1, 0, 0);
printf ("\tCLEAR_CZNV (®s->ccrflags);\n");
printf ("\t\tuae_s32 newv = (uae_s32)dst / (uae_s32)(uae_s16)src;\n");
printf ("\t\tuae_u16 rem = (uae_s32)dst %% (uae_s32)(uae_s16)src;\n");
if (using_ce) {
- printf ("\t\tint cycles = getDivs68kCycles((uae_s32)dst, (uae_s16)src) * %d;\n", CYCLE_UNIT / 2);
+ printf ("\t\tint cycles = getDivs68kCycles((uae_s32)dst, (uae_s16)src) * CYCLE_UNIT / 2;\n");
addcycles3 ("\t\t");
}
printf ("\t\tif ((newv & 0xffff8000) != 0 && (newv & 0xffff8000) != 0xffff8000) {\n");
start_brace ();
printf ("\tuae_u32 newv = (uae_u32)(uae_u16)dst * (uae_u32)(uae_u16)src;\n");
if (using_ce)
- printf ("\tint cycles = 36 * %d, bits;\n", CYCLE_UNIT / 2);
+ printf ("\tint cycles = 36 * CYCLE_UNIT / 2, bits;\n");
genflags (flag_logical, sz_long, "newv", "", "");
if (using_ce) {
printf ("\tfor(bits = 0; bits < 16 && src; bits++, src >>= 1)\n");
- printf ("\t\tif (src & 1) cycles += 2 * %d;\n", CYCLE_UNIT / 2);
+ printf ("\t\tif (src & 1) cycles += 2 * CYCLE_UNIT / 2;\n");
addcycles3 ("\t");
}
genastore ("newv", curi->dmode, "dstreg", sz_long, "dst");
start_brace ();
printf ("\tuae_u32 newv = (uae_s32)(uae_s16)dst * (uae_s32)(uae_s16)src;\n");
if (using_ce) {
- printf ("\tint cycles = 36 * %d, bits;\n", CYCLE_UNIT / 2);
+ printf ("\tint cycles = 36 * CYCLE_UNIT / 2, bits;\n");
printf ("\tuae_u32 usrc;\n");
}
genflags (flag_logical, sz_long, "newv", "", "");
if (using_ce) {
printf ("\tusrc = ((uae_u32)src) << 1;\n");
printf ("\tfor(bits = 0; bits < 16 && usrc; bits++, usrc >>= 1)\n");
- printf ("\t\tif ((usrc & 3) == 1 || (usrc & 3) == 2) cycles += 2 * %d;\n", CYCLE_UNIT / 2);
+ printf ("\t\tif ((usrc & 3) == 1 || (usrc & 3) == 2) cycles += 2 * CYCLE_UNIT / 2;\n");
addcycles3 ("\t");
}
genastore ("newv", curi->dmode, "dstreg", sz_long, "dst");
insn_n_cycles += (70 - 38) / 2 + 38; /* average */
break;
case i_CHK:
- printf ("\tuaecptr oldpc = m68k_getpc(regs);\n");
+ printf ("\tuaecptr oldpc = m68k_getpc (regs);\n");
genamode (curi->smode, "srcreg", curi->size, "src", 1, 0, 0);
genamode (curi->dmode, "dstreg", curi->size, "dst", 1, 0, 0);
sync_m68k_pc ();
need_endlabel = 1;
break;
case i_CHK2:
- printf ("\tuaecptr oldpc = m68k_getpc(regs);\n");
+ printf ("\tuaecptr oldpc = m68k_getpc (regs);\n");
genamode (curi->smode, "srcreg", curi->size, "extra", 1, 0, 0);
genamode (curi->dmode, "dstreg", curi->size, "dst", 2, 0, 0);
fill_prefetch_0 ();
printf ("\t{uae_s32 upper,lower,reg = regs->regs[(extra >> 12) & 15];\n");
switch (curi->size) {
case sz_byte:
- printf ("\tlower = (uae_s32)(uae_s8)get_byte(dsta); upper = (uae_s32)(uae_s8)get_byte(dsta+1);\n");
+ printf ("\tlower = (uae_s32)(uae_s8)get_byte (dsta); upper = (uae_s32)(uae_s8)get_byte (dsta+1);\n");
printf ("\tif ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s8)reg;\n");
break;
case sz_word:
- printf ("\tlower = (uae_s32)(uae_s16)get_word(dsta); upper = (uae_s32)(uae_s16)get_word(dsta+2);\n");
+ printf ("\tlower = (uae_s32)(uae_s16)get_word (dsta); upper = (uae_s32)(uae_s16)get_word (dsta+2);\n");
printf ("\tif ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s16)reg;\n");
break;
case sz_long:
- printf ("\tlower = get_long(dsta); upper = get_long(dsta+4);\n");
+ printf ("\tlower = get_long (dsta); upper = get_long (dsta+4);\n");
break;
default:
abort ();
}
printf ("\tSET_ZFLG (®s->ccrflags, upper == reg || lower == reg);\n");
printf ("\tSET_CFLG_ALWAYS (®s->ccrflags, lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower);\n");
- printf ("\tif ((extra & 0x800) && GET_CFLG (®s->ccrflags)) { Exception(6, regs, oldpc); goto %s; }\n}\n", endlabelstr);
+ printf ("\tif ((extra & 0x800) && GET_CFLG (®s->ccrflags)) { Exception (6, regs, oldpc); goto %s; }\n}\n", endlabelstr);
need_endlabel = 1;
break;
start_brace ();
printf ("\tint ru = (src >> 6) & 7;\n");
printf ("\tint rc = src & 7;\n");
- genflags (flag_cmp, curi->size, "newv", "m68k_dreg(regs, rc)", "dst");
+ genflags (flag_cmp, curi->size, "newv", "m68k_dreg (regs, rc)", "dst");
printf ("\tif (GET_ZFLG (®s->ccrflags))");
old_brace_level = n_braces;
start_brace ();
- genastore ("(m68k_dreg(regs, ru))", curi->dmode, "dstreg", curi->size, "dst");
+ genastore ("(m68k_dreg (regs, ru))", curi->dmode, "dstreg", curi->size, "dst");
pop_braces (old_brace_level);
printf ("else");
start_brace ();
- printf ("m68k_dreg(regs, rc) = dst;\n");
+ printf ("m68k_dreg (regs, rc) = dst;\n");
pop_braces (old_brace_level);
}
break;
printf ("\tuae_u32 rn2 = regs->regs[(extra >> 12) & 15];\n");
if (curi->size == sz_word) {
int old_brace_level = n_braces;
- printf ("\tuae_u16 dst1 = get_word(rn1), dst2 = get_word(rn2);\n");
- genflags (flag_cmp, curi->size, "newv", "m68k_dreg(regs, (extra >> 16) & 7)", "dst1");
+ printf ("\tuae_u16 dst1 = get_word (rn1), dst2 = get_word (rn2);\n");
+ genflags (flag_cmp, curi->size, "newv", "m68k_dreg (regs, (extra >> 16) & 7)", "dst1");
printf ("\tif (GET_ZFLG (®s->ccrflags)) {\n");
- genflags (flag_cmp, curi->size, "newv", "m68k_dreg(regs, extra & 7)", "dst2");
+ genflags (flag_cmp, curi->size, "newv", "m68k_dreg (regs, extra & 7)", "dst2");
printf ("\tif (GET_ZFLG (®s->ccrflags)) {\n");
- printf ("\tput_word(rn1, m68k_dreg(regs, (extra >> 22) & 7));\n");
- printf ("\tput_word(rn1, m68k_dreg(regs, (extra >> 6) & 7));\n");
+ printf ("\tput_word (rn1, m68k_dreg (regs, (extra >> 22) & 7));\n");
+ printf ("\tput_word (rn1, m68k_dreg (regs, (extra >> 6) & 7));\n");
printf ("\t}}\n");
pop_braces (old_brace_level);
printf ("\tif (! GET_ZFLG (®s->ccrflags)) {\n");
- printf ("\tm68k_dreg(regs, (extra >> 22) & 7) = (m68k_dreg(regs, (extra >> 22) & 7) & ~0xffff) | (dst1 & 0xffff);\n");
- printf ("\tm68k_dreg(regs, (extra >> 6) & 7) = (m68k_dreg(regs, (extra >> 6) & 7) & ~0xffff) | (dst2 & 0xffff);\n");
+ printf ("\tm68k_dreg (regs, (extra >> 22) & 7) = (m68k_dreg (regs, (extra >> 22) & 7) & ~0xffff) | (dst1 & 0xffff);\n");
+ printf ("\tm68k_dreg (regs, (extra >> 6) & 7) = (m68k_dreg (regs, (extra >> 6) & 7) & ~0xffff) | (dst2 & 0xffff);\n");
printf ("\t}\n");
} else {
int old_brace_level = n_braces;
- printf ("\tuae_u32 dst1 = get_long(rn1), dst2 = get_long(rn2);\n");
- genflags (flag_cmp, curi->size, "newv", "m68k_dreg(regs, (extra >> 16) & 7)", "dst1");
+ printf ("\tuae_u32 dst1 = get_long (rn1), dst2 = get_long (rn2);\n");
+ genflags (flag_cmp, curi->size, "newv", "m68k_dreg (regs, (extra >> 16) & 7)", "dst1");
printf ("\tif (GET_ZFLG (®s->ccrflags)) {\n");
- genflags (flag_cmp, curi->size, "newv", "m68k_dreg(regs, extra & 7)", "dst2");
+ genflags (flag_cmp, curi->size, "newv", "m68k_dreg (regs, extra & 7)", "dst2");
printf ("\tif (GET_ZFLG (®s->ccrflags)) {\n");
- printf ("\tput_long(rn1, m68k_dreg(regs, (extra >> 22) & 7));\n");
- printf ("\tput_long(rn1, m68k_dreg(regs, (extra >> 6) & 7));\n");
+ printf ("\tput_long (rn1, m68k_dreg (regs, (extra >> 22) & 7));\n");
+ printf ("\tput_long (rn1, m68k_dreg (regs, (extra >> 6) & 7));\n");
printf ("\t}}\n");
pop_braces (old_brace_level);
printf ("\tif (! GET_ZFLG (®s->ccrflags)) {\n");
- printf ("\tm68k_dreg(regs, (extra >> 22) & 7) = dst1;\n");
- printf ("\tm68k_dreg(regs, (extra >> 6) & 7) = dst2;\n");
+ printf ("\tm68k_dreg (regs, (extra >> 22) & 7) = dst1;\n");
+ printf ("\tm68k_dreg (regs, (extra >> 6) & 7) = dst2;\n");
printf ("\t}\n");
}
break;
genamode (curi->dmode, "dstreg", curi->size, "src", 1, 0, 0);
printf ("\tif (extra & 0x8000) {\n");
switch (curi->size) {
- case sz_byte: printf ("\tm68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s8)src;\n"); break;
- case sz_word: printf ("\tm68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s16)src;\n"); break;
- case sz_long: printf ("\tm68k_areg(regs, (extra >> 12) & 7) = src;\n"); break;
+ case sz_byte: printf ("\tm68k_areg (regs, (extra >> 12) & 7) = (uae_s32)(uae_s8)src;\n"); break;
+ case sz_word: printf ("\tm68k_areg (regs, (extra >> 12) & 7) = (uae_s32)(uae_s16)src;\n"); break;
+ case sz_long: printf ("\tm68k_areg (regs, (extra >> 12) & 7) = src;\n"); break;
default: abort ();
}
printf ("\t} else {\n");
break;
case i_BKPT: /* only needed for hardware emulators */
sync_m68k_pc ();
- printf ("\top_illg(opcode, regs);\n");
+ printf ("\top_illg (opcode, regs);\n");
break;
case i_CALLM: /* not present in 68030 */
sync_m68k_pc ();
- printf ("\top_illg(opcode, regs);\n");
+ printf ("\top_illg (opcode, regs);\n");
break;
case i_RTM: /* not present in 68030 */
sync_m68k_pc ();
- printf ("\top_illg(opcode, regs);\n");
+ printf ("\top_illg (opcode, regs);\n");
break;
case i_TRAPcc:
if (curi->smode != am_unknown && curi->smode != am_illg)
genamode (curi->smode, "srcreg", curi->size, "dummy", 1, 0, 0);
fill_prefetch_0 ();
- printf ("\tif (cctrue(®s->ccrflags, %d)) { Exception(7, regs, m68k_getpc(regs)); goto %s; }\n", curi->cc, endlabelstr);
+ printf ("\tif (cctrue(®s->ccrflags, %d)) { Exception (7, regs, m68k_getpc (regs)); goto %s; }\n", curi->cc, endlabelstr);
need_endlabel = 1;
break;
case i_DIVL:
sync_m68k_pc ();
start_brace ();
- printf ("\tuaecptr oldpc = m68k_getpc(regs);\n");
+ printf ("\tuaecptr oldpc = m68k_getpc (regs);\n");
genamode (curi->smode, "srcreg", curi->size, "extra", 1, 0, 0);
genamode (curi->dmode, "dstreg", curi->size, "dst", 1, 0, 0);
sync_m68k_pc ();
genamode (curi->smode, "srcreg", curi->size, "extra", 1, 0, 0);
genamode (curi->dmode, "dstreg", sz_long, "dst", 2, 0, 0);
start_brace ();
- printf ("\tuae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f;\n");
- printf ("\tint width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1;\n");
+ printf ("\tuae_s32 offset = extra & 0x800 ? m68k_dreg (regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f;\n");
+ printf ("\tint width = (((extra & 0x20 ? m68k_dreg (regs, extra & 7) : extra) -1) & 0x1f) +1;\n");
if (curi->dmode == Dreg) {
- printf ("\tuae_u32 tmp = m68k_dreg(regs, dstreg) << (offset & 0x1f);\n");
+ printf ("\tuae_u32 tmp = m68k_dreg (regs, dstreg) << (offset & 0x1f);\n");
} else {
printf ("\tuae_u32 tmp,bf0,bf1;\n");
printf ("\tdsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0);\n");
- printf ("\tbf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff;\n");
+ printf ("\tbf0 = get_long (dsta);bf1 = get_byte (dsta+4) & 0xff;\n");
printf ("\ttmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7)));\n");
}
printf ("\ttmp >>= (32 - width);\n");
case i_BFTST:
break;
case i_BFEXTU:
- printf ("\tm68k_dreg(regs, (extra >> 12) & 7) = tmp;\n");
+ printf ("\tm68k_dreg (regs, (extra >> 12) & 7) = tmp;\n");
break;
case i_BFCHG:
printf ("\ttmp = ~tmp;\n");
break;
case i_BFEXTS:
printf ("\tif (GET_NFLG (®s->ccrflags)) tmp |= width == 32 ? 0 : (-1 << width);\n");
- printf ("\tm68k_dreg(regs, (extra >> 12) & 7) = tmp;\n");
+ printf ("\tm68k_dreg (regs, (extra >> 12) & 7) = tmp;\n");
break;
case i_BFCLR:
printf ("\ttmp = 0;\n");
case i_BFFFO:
printf ("\t{ uae_u32 mask = 1 << (width-1);\n");
printf ("\twhile (mask) { if (tmp & mask) break; mask >>= 1; offset++; }}\n");
- printf ("\tm68k_dreg(regs, (extra >> 12) & 7) = offset;\n");
+ printf ("\tm68k_dreg (regs, (extra >> 12) & 7) = offset;\n");
break;
case i_BFSET:
printf ("\ttmp = 0xffffffff;\n");
break;
case i_BFINS:
- printf ("\ttmp = m68k_dreg(regs, (extra >> 12) & 7);\n");
+ printf ("\ttmp = m68k_dreg (regs, (extra >> 12) & 7);\n");
printf ("\tSET_NFLG (®s->ccrflags, tmp & (1 << (width - 1)) ? 1 : 0);\n");
printf ("\tSET_ZFLG (®s->ccrflags, tmp == 0);\n");
break;
{
printf ("\ttmp <<= (32 - width);\n");
if (curi->dmode == Dreg) {
- printf ("\tm68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ((offset & 0x1f) == 0 ? 0 :\n");
+ printf ("\tm68k_dreg (regs, dstreg) = (m68k_dreg (regs, dstreg) & ((offset & 0x1f) == 0 ? 0 :\n");
printf ("\t\t(0xffffffff << (32 - (offset & 0x1f))))) |\n");
printf ("\t\t(tmp >> (offset & 0x1f)) |\n");
printf ("\t\t(((offset & 0x1f) + width) >= 32 ? 0 :\n");
- printf (" (m68k_dreg(regs, dstreg) & ((uae_u32)0xffffffff >> ((offset & 0x1f) + width))));\n");
+ printf (" (m68k_dreg (regs, dstreg) & ((uae_u32)0xffffffff >> ((offset & 0x1f) + width))));\n");
} else {
printf ("\tbf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) |\n");
printf ("\t\t(tmp >> (offset & 7)) |\n");
printf ("\t\t(((offset & 7) + width) >= 32 ? 0 :\n");
printf ("\t\t (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width))));\n");
- printf ("\tput_long(dsta,bf0 );\n");
+ printf ("\tput_long (dsta,bf0 );\n");
printf ("\tif (((offset & 7) + width) > 32) {\n");
printf ("\t\tbf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) |\n");
printf ("\t\t\t(tmp << (8 - (offset & 7)));\n");
- printf ("\t\tput_byte(dsta+4,bf1);\n");
+ printf ("\t\tput_byte (dsta+4,bf1);\n");
printf ("\t}\n");
}
}
break;
case i_PACK:
if (curi->smode == Dreg) {
- printf ("\tuae_u16 val = m68k_dreg(regs, srcreg) + %s;\n", gen_nextiword (0));
- printf ("\tm68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & 0xffffff00) | ((val >> 4) & 0xf0) | (val & 0xf);\n");
+ printf ("\tuae_u16 val = m68k_dreg (regs, srcreg) + %s;\n", gen_nextiword (0));
+ printf ("\tm68k_dreg (regs, dstreg) = (m68k_dreg (regs, dstreg) & 0xffffff00) | ((val >> 4) & 0xf0) | (val & 0xf);\n");
} else {
printf ("\tuae_u16 val;\n");
- printf ("\tm68k_areg(regs, srcreg) -= areg_byteinc[srcreg];\n");
- printf ("\tval = (uae_u16)get_byte(m68k_areg(regs, srcreg));\n");
- printf ("\tm68k_areg(regs, srcreg) -= areg_byteinc[srcreg];\n");
- printf ("\tval = (val | ((uae_u16)get_byte(m68k_areg(regs, srcreg)) << 8)) + %s;\n", gen_nextiword (0));
- printf ("\tm68k_areg(regs, dstreg) -= areg_byteinc[dstreg];\n");
- printf ("\tput_byte(m68k_areg(regs, dstreg),((val >> 4) & 0xf0) | (val & 0xf));\n");
+ printf ("\tm68k_areg (regs, srcreg) -= areg_byteinc[srcreg];\n");
+ printf ("\tval = (uae_u16)get_byte (m68k_areg (regs, srcreg));\n");
+ printf ("\tm68k_areg (regs, srcreg) -= areg_byteinc[srcreg];\n");
+ printf ("\tval = (val | ((uae_u16)get_byte (m68k_areg (regs, srcreg)) << 8)) + %s;\n", gen_nextiword (0));
+ printf ("\tm68k_areg (regs, dstreg) -= areg_byteinc[dstreg];\n");
+ printf ("\tput_byte (m68k_areg (regs, dstreg),((val >> 4) & 0xf0) | (val & 0xf));\n");
}
break;
case i_UNPK:
if (curi->smode == Dreg) {
- printf ("\tuae_u16 val = m68k_dreg(regs, srcreg);\n");
+ printf ("\tuae_u16 val = m68k_dreg (regs, srcreg);\n");
printf ("\tval = (((val << 4) & 0xf00) | (val & 0xf)) + %s;\n", gen_nextiword (0));
- printf ("\tm68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & 0xffff0000) | (val & 0xffff);\n");
+ printf ("\tm68k_dreg (regs, dstreg) = (m68k_dreg (regs, dstreg) & 0xffff0000) | (val & 0xffff);\n");
} else {
printf ("\tuae_u16 val;\n");
- printf ("\tm68k_areg(regs, srcreg) -= areg_byteinc[srcreg];\n");
- printf ("\tval = (uae_u16)get_byte(m68k_areg(regs, srcreg));\n");
+ printf ("\tm68k_areg (regs, srcreg) -= areg_byteinc[srcreg];\n");
+ printf ("\tval = (uae_u16)get_byte (m68k_areg (regs, srcreg));\n");
printf ("\tval = (((val << 4) & 0xf00) | (val & 0xf)) + %s;\n", gen_nextiword (0));
- printf ("\tm68k_areg(regs, dstreg) -= areg_byteinc[dstreg];\n");
- printf ("\tput_byte(m68k_areg(regs, dstreg),val);\n");
- printf ("\tm68k_areg(regs, dstreg) -= areg_byteinc[dstreg];\n");
- printf ("\tput_byte(m68k_areg(regs, dstreg),val >> 8);\n");
+ printf ("\tm68k_areg (regs, dstreg) -= areg_byteinc[dstreg];\n");
+ printf ("\tput_byte (m68k_areg (regs, dstreg),val);\n");
+ printf ("\tm68k_areg (regs, dstreg) -= areg_byteinc[dstreg];\n");
+ printf ("\tput_byte (m68k_areg (regs, dstreg),val >> 8);\n");
}
break;
case i_TAS:
fpulimit();
genamode (curi->smode, "srcreg", curi->size, "extra", 1, 0, 0);
sync_m68k_pc ();
- printf ("\tfpuop_dbcc(opcode, regs, extra);\n");
+ printf ("\tfpuop_dbcc (opcode, regs, extra);\n");
break;
case i_FScc:
fpulimit();
genamode (curi->smode, "srcreg", curi->size, "extra", 1, 0, 0);
sync_m68k_pc ();
- printf ("\tfpuop_scc(opcode, regs, extra);\n");
+ printf ("\tfpuop_scc (opcode, regs, extra);\n");
break;
case i_FTRAPcc:
fpulimit();
sync_m68k_pc ();
start_brace ();
- printf ("\tuaecptr oldpc = m68k_getpc(regs);\n");
+ printf ("\tuaecptr oldpc = m68k_getpc (regs);\n");
if (curi->smode != am_unknown && curi->smode != am_illg)
genamode (curi->smode, "srcreg", curi->size, "dummy", 1, 0, 0);
sync_m68k_pc ();
- printf ("\tfpuop_trapcc(opcode, regs, oldpc);\n");
+ printf ("\tfpuop_trapcc (opcode, regs, oldpc);\n");
break;
case i_FBcc:
fpulimit();
sync_m68k_pc ();
start_brace ();
- printf ("\tuaecptr pc = m68k_getpc(regs);\n");
+ printf ("\tuaecptr pc = m68k_getpc (regs);\n");
genamode (curi->dmode, "srcreg", curi->size, "extra", 1, 0, 0);
sync_m68k_pc ();
- printf ("\tfpuop_bcc(opcode,regs, pc,extra);\n");
+ printf ("\tfpuop_bcc (opcode,regs, pc,extra);\n");
break;
case i_FSAVE:
fpulimit();
sync_m68k_pc ();
- printf ("\tfpuop_save(opcode, regs);\n");
+ printf ("\tfpuop_save (opcode, regs);\n");
break;
case i_FRESTORE:
fpulimit();
sync_m68k_pc ();
- printf ("\tfpuop_restore(opcode, regs);\n");
+ printf ("\tfpuop_restore (opcode, regs);\n");
break;
case i_CINVL:
case i_MOVE16:
if ((opcode & 0xfff8) == 0xf620) {
/* MOVE16 (Ax)+,(Ay)+ */
- printf ("\tuaecptr mems = m68k_areg(regs, srcreg) & ~15, memd;\n");
- printf ("\tdstreg = (%s >> 12) & 7;\n", gen_nextiword(0));
- printf ("\tmemd = m68k_areg(regs, dstreg) & ~15;\n");
- printf ("\tput_long(memd, get_long(mems));\n");
- printf ("\tput_long(memd+4, get_long(mems+4));\n");
- printf ("\tput_long(memd+8, get_long(mems+8));\n");
- printf ("\tput_long(memd+12, get_long(mems+12));\n");
+ printf ("\tuaecptr mems = m68k_areg (regs, srcreg) & ~15, memd;\n");
+ printf ("\tdstreg = (%s >> 12) & 7;\n", gen_nextiword (0));
+ printf ("\tmemd = m68k_areg (regs, dstreg) & ~15;\n");
+ printf ("\tput_long (memd, get_long (mems));\n");
+ printf ("\tput_long (memd+4, get_long (mems+4));\n");
+ printf ("\tput_long (memd+8, get_long (mems+8));\n");
+ printf ("\tput_long (memd+12, get_long (mems+12));\n");
printf ("\tif (srcreg != dstreg)\n");
- printf ("\tm68k_areg(regs, srcreg) += 16;\n");
- printf ("\tm68k_areg(regs, dstreg) += 16;\n");
+ printf ("\tm68k_areg (regs, srcreg) += 16;\n");
+ printf ("\tm68k_areg (regs, dstreg) += 16;\n");
} else {
/* Other variants */
genamode (curi->smode, "srcreg", curi->size, "mems", 0, 2, 0);
genamode (curi->dmode, "dstreg", curi->size, "memd", 0, 2, 0);
printf ("\tmemsa &= ~15;\n");
printf ("\tmemda &= ~15;\n");
- printf ("\tput_long(memda, get_long(memsa));\n");
- printf ("\tput_long(memda+4, get_long(memsa+4));\n");
- printf ("\tput_long(memda+8, get_long(memsa+8));\n");
- printf ("\tput_long(memda+12, get_long(memsa+12));\n");
+ printf ("\tput_long (memda, get_long (memsa));\n");
+ printf ("\tput_long (memda+4, get_long (memsa+4));\n");
+ printf ("\tput_long (memda+8, get_long (memsa+8));\n");
+ printf ("\tput_long (memda+12, get_long (memsa+12));\n");
if ((opcode & 0xfff8) == 0xf600)
- printf ("\tm68k_areg(regs, srcreg) += 16;\n");
+ printf ("\tm68k_areg (regs, srcreg) += 16;\n");
else if ((opcode & 0xfff8) == 0xf608)
- printf ("\tm68k_areg(regs, dstreg) += 16;\n");
+ printf ("\tm68k_areg (regs, dstreg) += 16;\n");
}
break;
case i_MMUOP:
genamode (curi->smode, "srcreg", curi->size, "extra", 1, 0, 0);
sync_m68k_pc ();
- printf ("\tmmu_op(opcode, regs, extra);\n");
+ printf ("\tmmu_op (opcode, regs, extra);\n");
break;
case i_MMUOP30A:
printf ("\tuaecptr pc = m68k_getpc (regs);\n");
if (curi->smode == Areg || curi->smode == Dreg)
printf("\tuae_u16 extraa = 0;\n");
- else
+ else
genamode (curi->smode, "srcreg", curi->size, "extra", 0, 0, 0);
sync_m68k_pc ();
- printf ("\tmmu_op30(pc, opcode, regs, 1, extraa);\n");
+ printf ("\tmmu_op30 (pc, opcode, regs, 1, extraa);\n");
break;
case i_MMUOP30B:
printf ("\tuaecptr pc = m68k_getpc (regs);\n");
genamode (curi->smode, "srcreg", curi->size, "extra", 0, 0, 0);
sync_m68k_pc ();
- printf ("\tmmu_op30(pc, opcode, regs, 0, 0);\n");
+ printf ("\tmmu_op30 (pc, opcode, regs, 0, 0);\n");
break;
default:
abort ();
int r = m68k_pc_offset;
m68k_pc_offset += 4;
- sprintf (buffer, "xget_ilong(%d)", r);
+ sprintf (buffer, "xget_ilong (%d)", r);
return buffer;
}
int r = m68k_pc_offset;
m68k_pc_offset += 2;
- sprintf (buffer, "xget_iword(%d)", r);
+ sprintf (buffer, "xget_iword (%d)", r);
return buffer;
}
int r = m68k_pc_offset;
m68k_pc_offset += 2;
- sprintf (buffer, "xget_ibyte(%d)", r);
+ sprintf (buffer, "xget_ibyte (%d)", r);
return buffer;
}
#if defined(AMIGA) && !defined(WARPUP)
/* sam: I don't know why gcc.2.7.2.1 produces a code worse */
/* if it is not done like that: */
- printf ("\tuae_s8 %s = ((uae_u8*)&m68k_dreg(regs, %s))[3];\n", name, reg);
+ printf ("\tuae_s8 %s = ((uae_u8*)&m68k_dreg (regs, %s))[3];\n", name, reg);
#else
- printf ("\tuae_s8 %s = xm68k_dreg(%s);\n", name, reg);
+ printf ("\tuae_s8 %s = xm68k_dreg (%s);\n", name, reg);
#endif
break;
case sz_word:
#if defined(AMIGA) && !defined(WARPUP)
- printf ("\tuae_s16 %s = ((uae_s16*)&m68k_dreg(regs, %s))[1];\n", name, reg);
+ printf ("\tuae_s16 %s = ((uae_s16*)&m68k_dreg (regs, %s))[1];\n", name, reg);
#else
- printf ("\tuae_s16 %s = xm68k_dreg(%s);\n", name, reg);
+ printf ("\tuae_s16 %s = xm68k_dreg (%s);\n", name, reg);
#endif
break;
case sz_long:
- printf ("\tuae_s32 %s = xm68k_dreg(%s);\n", name, reg);
+ printf ("\tuae_s32 %s = xm68k_dreg (%s);\n", name, reg);
break;
default:
abort ();
if (getv == 1)
switch (size) {
case sz_word:
- printf ("\tuae_s16 %s = xm68k_areg(%s);\n", name, reg);
+ printf ("\tuae_s16 %s = xm68k_areg (%s);\n", name, reg);
break;
case sz_long:
- printf ("\tuae_s32 %s = xm68k_areg(%s);\n", name, reg);
+ printf ("\tuae_s32 %s = xm68k_areg (%s);\n", name, reg);
break;
default:
abort ();
}
return;
case Aind:
- printf ("\tuaecptr %sa = xm68k_areg(%s);\n", name, reg);
+ printf ("\tuaecptr %sa = xm68k_areg (%s);\n", name, reg);
break;
case Aipi:
- printf ("\tuaecptr %sa = xm68k_areg(%s);\n", name, reg);
+ printf ("\tuaecptr %sa = xm68k_areg (%s);\n", name, reg);
break;
case Apdi:
switch (size) {
case sz_byte:
if (movem)
- printf ("\tuaecptr %sa = xm68k_areg(%s);\n", name, reg);
+ printf ("\tuaecptr %sa = xm68k_areg (%s);\n", name, reg);
else
- printf ("\tuaecptr %sa = xm68k_areg(%s) - xareg_byteinc[%s];\n", name, reg, reg);
+ printf ("\tuaecptr %sa = xm68k_areg (%s) - xareg_byteinc[%s];\n", name, reg, reg);
break;
case sz_word:
- printf ("\tuaecptr %sa = xm68k_areg(%s) - %d;\n", name, reg, movem ? 0 : 2);
+ printf ("\tuaecptr %sa = xm68k_areg (%s) - %d;\n", name, reg, movem ? 0 : 2);
break;
case sz_long:
- printf ("\tuaecptr %sa = xm68k_areg(%s) - %d;\n", name, reg, movem ? 0 : 4);
+ printf ("\tuaecptr %sa = xm68k_areg (%s) - %d;\n", name, reg, movem ? 0 : 4);
break;
default:
abort ();
}
break;
case Ad16:
- printf ("\tuaecptr %sa = xm68k_areg(%s) + (uae_s32)(uae_s16)%s;\n", name, reg, gen_nextiword ());
+ printf ("\tuaecptr %sa = xm68k_areg (%s) + (uae_s32)(uae_s16)%s;\n", name, reg, gen_nextiword ());
break;
case Ad8r:
if (cpu_level > 1) {
sync_m68k_pc ();
start_brace ();
/* This would ordinarily be done in gen_nextiword, which we bypass. */
- printf ("\tuaecptr %sa = xget_disp_ea_020(xm68k_areg(%s), xnext_iword());\n", name, reg);
+ printf ("\tuaecptr %sa = xget_disp_ea_020 (xm68k_areg (%s), xnext_iword ());\n", name, reg);
} else
- printf ("\tuaecptr %sa = xget_disp_ea_000(xm68k_areg(%s), %s);\n", name, reg, gen_nextiword ());
+ printf ("\tuaecptr %sa = xget_disp_ea_000 (xm68k_areg (%s), %s);\n", name, reg, gen_nextiword ());
break;
case PC16:
sync_m68k_pc ();
start_brace ();
/* This would ordinarily be done in gen_nextiword, which we bypass. */
- printf ("\tuaecptr tmppc = xm68k_getpc();\n");
- printf ("\tuaecptr %sa = xget_disp_ea_020(tmppc, xnext_iword());\n", name);
+ printf ("\tuaecptr tmppc = xm68k_getpc ();\n");
+ printf ("\tuaecptr %sa = xget_disp_ea_020(tmppc, xnext_iword ());\n", name);
} else {
- printf ("\tuaecptr tmppc = xm68k_getpc() + %d;\n", m68k_pc_offset);
- printf ("\tuaecptr %sa = xget_disp_ea_000(tmppc, %s);\n", name, gen_nextiword ());
+ printf ("\tuaecptr tmppc = xm68k_getpc () + %d;\n", m68k_pc_offset);
+ printf ("\tuaecptr %sa = xget_disp_ea_000 (tmppc, %s);\n", name, gen_nextiword ());
}
break;
if (getv == 1) {
start_brace ();
switch (size) {
- case sz_byte: printf ("\tuae_s8 %s = xget_byte(%sa);\n", name, name); break;
- case sz_word: printf ("\tuae_s16 %s = xget_word(%sa);\n", name, name); break;
- case sz_long: printf ("\tuae_s32 %s = xget_long(%sa);\n", name, name); break;
+ case sz_byte: printf ("\tuae_s8 %s = xget_byte (%sa);\n", name, name); break;
+ case sz_word: printf ("\tuae_s16 %s = xget_word (%sa);\n", name, name); break;
+ case sz_long: printf ("\tuae_s32 %s = xget_long (%sa);\n", name, name); break;
default: abort ();
}
}
case Aipi:
switch (size) {
case sz_byte:
- printf ("\txm68k_areg(%s) += xareg_byteinc[%s];\n", reg, reg);
+ printf ("\txm68k_areg (%s) += xareg_byteinc[%s];\n", reg, reg);
break;
case sz_word:
- printf ("\txm68k_areg(%s) += 2;\n", reg);
+ printf ("\txm68k_areg (%s) += 2;\n", reg);
break;
case sz_long:
- printf ("\txm68k_areg(%s) += 4;\n", reg);
+ printf ("\txm68k_areg (%s) += 4;\n", reg);
break;
default:
abort ();
case Dreg:
switch (size) {
case sz_byte:
- printf ("\txm68k_dreg(%s) = (xm68k_dreg(%s) & ~0xff) | ((%s) & 0xff);\n", reg, reg, from);
+ printf ("\txm68k_dreg (%s) = (xm68k_dreg (%s) & ~0xff) | ((%s) & 0xff);\n", reg, reg, from);
break;
case sz_word:
- printf ("\txm68k_dreg(%s) = (xm68k_dreg(%s) & ~0xffff) | ((%s) & 0xffff);\n", reg, reg, from);
+ printf ("\txm68k_dreg (%s) = (xm68k_dreg (%s) & ~0xffff) | ((%s) & 0xffff);\n", reg, reg, from);
break;
case sz_long:
- printf ("\txm68k_dreg(%s) = (%s);\n", reg, from);
+ printf ("\txm68k_dreg (%s) = (%s);\n", reg, from);
break;
default:
abort ();
case Areg:
switch (size) {
case sz_word:
- printf ("\txm68k_areg(%s) = (uae_s32)(uae_s16)(%s);\n", reg, from);
+ printf ("\txm68k_areg (%s) = (uae_s32)(uae_s16)(%s);\n", reg, from);
break;
case sz_long:
- printf ("\txm68k_areg(%s) = (%s);\n", reg, from);
+ printf ("\txm68k_areg (%s) = (%s);\n", reg, from);
break;
default:
abort ();
sync_m68k_pc ();
switch (size) {
case sz_byte:
- printf ("\txput_byte(%sa,%s);\n", to, from);
+ printf ("\txput_byte (%sa,%s);\n", to, from);
break;
case sz_word:
if (cpu_level < 2 && (mode == PC16 || mode == PC8r))
abort ();
- printf ("\txput_word(%sa,%s);\n", to, from);
+ printf ("\txput_word (%sa,%s);\n", to, from);
break;
case sz_long:
if (cpu_level < 2 && (mode == PC16 || mode == PC8r))
abort ();
- printf ("\txput_long(%sa,%s);\n", to, from);
+ printf ("\txput_long (%sa,%s);\n", to, from);
break;
default:
abort ();
int size = table68k[opcode].size == sz_long ? 4 : 2;
if (table68k[opcode].size == sz_long) {
- strcpy (getcode, "xget_long(srca)");
+ strcpy (getcode, "xget_long (srca)");
} else {
- strcpy (getcode, "(uae_s32)(uae_s16)xget_word(srca)");
+ strcpy (getcode, "(uae_s32)(uae_s16)xget_word (srca)");
}
printf ("\tuae_u16 mask = %s;\n", gen_nextiword ());
printf ("\tunsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff;\n");
genamode (table68k[opcode].dmode, "dstreg", table68k[opcode].size, "src", 2, 1);
start_brace ();
- printf ("\twhile (dmask) { xm68k_dreg(xmovem_index1[dmask]) = %s; srca += %d; dmask = xmovem_next[dmask]; }\n",
+ printf ("\twhile (dmask) { xm68k_dreg (xmovem_index1[dmask]) = %s; srca += %d; dmask = xmovem_next[dmask]; }\n",
getcode, size);
- printf ("\twhile (amask) { xm68k_areg(xmovem_index1[amask]) = %s; srca += %d; amask = xmovem_next[amask]; }\n",
+ printf ("\twhile (amask) { xm68k_areg (xmovem_index1[amask]) = %s; srca += %d; amask = xmovem_next[amask]; }\n",
getcode, size);
if (table68k[opcode].dmode == Aipi)
- printf ("\txm68k_areg(dstreg) = srca;\n");
+ printf ("\txm68k_areg (dstreg) = srca;\n");
}
static void genmovemle (uae_u16 opcode)
char putcode[100];
int size = table68k[opcode].size == sz_long ? 4 : 2;
if (table68k[opcode].size == sz_long) {
- strcpy (putcode, "xput_long(srca,");
+ strcpy (putcode, "xput_long (srca,");
} else {
- strcpy (putcode, "xput_word(srca,");
+ strcpy (putcode, "xput_word (srca,");
}
printf ("\tuae_u16 mask = %s;\n", gen_nextiword ());
start_brace ();
if (table68k[opcode].dmode == Apdi) {
printf ("\tuae_u16 amask = mask & 0xff, dmask = (mask >> 8) & 0xff;\n");
- printf ("\twhile (amask) { srca -= %d; %s xm68k_areg(xmovem_index2[amask])); amask = xmovem_next[amask]; }\n",
+ printf ("\twhile (amask) { srca -= %d; %s xm68k_areg (xmovem_index2[amask])); amask = xmovem_next[amask]; }\n",
size, putcode);
- printf ("\twhile (dmask) { srca -= %d; %s xm68k_dreg(xmovem_index2[dmask])); dmask = xmovem_next[dmask]; }\n",
+ printf ("\twhile (dmask) { srca -= %d; %s xm68k_dreg (xmovem_index2[dmask])); dmask = xmovem_next[dmask]; }\n",
size, putcode);
- printf ("\txm68k_areg(dstreg) = srca;\n");
+ printf ("\txm68k_areg (dstreg) = srca;\n");
} else {
printf ("\tuae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff;\n");
- printf ("\twhile (dmask) { %s xm68k_dreg(xmovem_index1[dmask])); srca += %d; dmask = xmovem_next[dmask]; }\n",
+ printf ("\twhile (dmask) { %s xm68k_dreg (xmovem_index1[dmask])); srca += %d; dmask = xmovem_next[dmask]; }\n",
putcode, size);
- printf ("\twhile (amask) { %s xm68k_areg(xmovem_index1[amask])); srca += %d; amask = xmovem_next[amask]; }\n",
+ printf ("\twhile (amask) { %s xm68k_areg (xmovem_index1[amask])); srca += %d; amask = xmovem_next[amask]; }\n",
putcode, size);
}
}
case sz_long: printf ("\toptflag_cmpl ((uae_s32)(%s), (uae_s32)(%s));\n", src, dst); break;
}
return;
-
+
default:
break;
}
case i_MVPRM:
genamode (curi->smode, "srcreg", curi->size, "src", 1, 0);
- printf ("\tuaecptr memp = xm68k_areg(dstreg) + (uae_s32)(uae_s16)%s;\n", gen_nextiword ());
+ printf ("\tuaecptr memp = xm68k_areg (dstreg) + (uae_s32)(uae_s16)%s;\n", gen_nextiword ());
if (curi->size == sz_word) {
- printf ("\txput_byte(memp, src >> 8); xput_byte(memp + 2, src);\n");
+ printf ("\txput_byte (memp, src >> 8); xput_byte (memp + 2, src);\n");
} else {
- printf ("\txput_byte(memp, src >> 24); xput_byte(memp + 2, src >> 16);\n");
- printf ("\txput_byte(memp + 4, src >> 8); xput_byte(memp + 6, src);\n");
+ printf ("\txput_byte (memp, src >> 24); xput_byte (memp + 2, src >> 16);\n");
+ printf ("\txput_byte (memp + 4, src >> 8); xput_byte (memp + 6, src);\n");
}
break;
case i_MVPMR:
- printf ("\tuaecptr memp = xm68k_areg(srcreg) + (uae_s32)(uae_s16)%s;\n", gen_nextiword ());
+ printf ("\tuaecptr memp = xm68k_areg (srcreg) + (uae_s32)(uae_s16)%s;\n", gen_nextiword ());
genamode (curi->dmode, "dstreg", curi->size, "dst", 2, 0);
if (curi->size == sz_word) {
- printf ("\tuae_u16 val = (xget_byte(memp) << 8) + xget_byte(memp + 2);\n");
+ printf ("\tuae_u16 val = (xget_byte (memp) << 8) + xget_byte (memp + 2);\n");
} else {
- printf ("\tuae_u32 val = (xget_byte(memp) << 24) + (xget_byte(memp + 2) << 16)\n");
- printf (" + (xget_byte(memp + 4) << 8) + xget_byte(memp + 6);\n");
+ printf ("\tuae_u32 val = (xget_byte (memp) << 24) + (xget_byte (memp + 2) << 16)\n");
+ printf (" + (xget_byte (memp + 4) << 8) + xget_byte (memp + 6);\n");
}
genastore ("val", curi->dmode, "dstreg", curi->size, "dst");
break;
genamode (Apdi, "7", sz_long, "old", 2, 0);
genamode (curi->smode, "srcreg", sz_long, "src", 1, 0);
genastore ("src", Apdi, "7", sz_long, "old");
- genastore ("xm68k_areg(7)", curi->smode, "srcreg", sz_long, "src");
+ genastore ("xm68k_areg (7)", curi->smode, "srcreg", sz_long, "src");
genamode (curi->dmode, "dstreg", curi->size, "offs", 1, 0);
- printf ("\txm68k_areg(7) += offs;\n");
+ printf ("\txm68k_areg (7) += offs;\n");
break;
case i_UNLK:
genamode (curi->smode, "srcreg", curi->size, "src", 1, 0);
- printf ("\txm68k_areg(7) = src;\n");
+ printf ("\txm68k_areg (7) = src;\n");
genamode (Aipi, "7", sz_long, "old", 1, 0);
genastore ("old", curi->smode, "srcreg", curi->size, "src");
break;
case i_RTS:
- printf ("\txm68k_setpc(xget_long(xm68k_areg(7)));\n");
- printf ("\txm68k_areg(7) += 4;\n");
+ printf ("\txm68k_setpc (xget_long (xm68k_areg (7)));\n");
+ printf ("\txm68k_areg (7) += 4;\n");
m68k_pc_offset = 0;
break;
case i_JSR:
genamode (curi->smode, "srcreg", curi->size, "src", 0, 0);
- printf ("\txm68k_areg(7) -= 4;\n");
- printf ("\txput_long(xm68k_areg(7), xm68k_getpc() + %d);\n", m68k_pc_offset);
- printf ("\txm68k_setpc(srca);\n");
+ printf ("\txm68k_areg (7) -= 4;\n");
+ printf ("\txput_long (xm68k_areg (7), xm68k_getpc () + %d);\n", m68k_pc_offset);
+ printf ("\txm68k_setpc (srca);\n");
m68k_pc_offset = 0;
break;
case i_JMP:
genamode (curi->smode, "srcreg", curi->size, "src", 0, 0);
- printf ("\txm68k_setpc(srca);\n");
+ printf ("\txm68k_setpc (srca);\n");
m68k_pc_offset = 0;
break;
case i_BSR:
genamode (curi->smode, "srcreg", curi->size, "src", 1, 0);
printf ("\tuae_s32 s = (uae_s32)src + 2;\n");
- printf ("\txm68k_areg(7) -= 4;\n");
- printf ("\txput_long(xm68k_areg(7), xm68k_getpc() + %d);\n", m68k_pc_offset);
+ printf ("\txm68k_areg (7) -= 4;\n");
+ printf ("\txput_long (xm68k_areg (7), xm68k_getpc () + %d);\n", m68k_pc_offset);
printf ("\txm68k_incpc(s);\n");
m68k_pc_offset = 0;
break;
case i_Bcc:
if (curi->size == sz_long) {
if (next_cpu_level < 1)
- next_cpu_level = 1;
+ next_cpu_level = 1;
}
genamode (curi->smode, "srcreg", curi->size, "src", 1, 0);
printf ("\tif (!xcctrue(%d)) goto didnt_jump;\n", curi->cc);
genastore ("val", curi->smode, "srcreg", curi->size, "src");
break;
case i_DIVU:
- printf ("\tuaecptr oldpc = xm68k_getpc();\n");
+ printf ("\tuaecptr oldpc = xm68k_getpc ();\n");
genamode (curi->smode, "srcreg", sz_word, "src", 1, 0);
genamode (curi->dmode, "dstreg", sz_long, "dst", 1, 0);
sync_m68k_pc ();
need_endlabel = 1;
break;
case i_DIVS:
- printf ("\tuaecptr oldpc = xm68k_getpc();\n");
+ printf ("\tuaecptr oldpc = xm68k_getpc ();\n");
genamode (curi->smode, "srcreg", sz_word, "src", 1, 0);
genamode (curi->dmode, "dstreg", sz_long, "dst", 1, 0);
sync_m68k_pc ();
/* Check that we can do the little endian optimization safely. */
if (pos < 8 && (dmsk >> (8 - pos)) != 0)
abort ();
-#endif
+#endif
if (pos)
printf ("\tuae_u32 dstreg = (opcode >> %d) & %d;\n",
pos, dmsk);
while (b && b->uniq != uniq)
b = b->next;
if (!b)
- write_log("Couldn't find structure. Bad\n");
+ write_log ("Couldn't find structure. Bad\n");
return b;
}
b = &(*b)->next;
c = *b;
if (!c)
- write_log("Couldn't find structure. Bad\n");
+ write_log ("Couldn't find structure. Bad\n");
else
*b = c->next;
return c;
static void add_uniq (uniq_list *a, struct uniq_head *item, uaecptr amem)
{
item->uniq = a->uniq++;
- put_long(amem, item->uniq);
+ put_long (amem, item->uniq);
if (a->uniq == 0)
a->uniq++;
item->next = a->head;
{
#if 0 /* Later.. */
uaecptr sigsem = layer + 72;
- m68k_areg(regs, 0) = sigsem;
- CallLib(get_long(4), -564);
+ m68k_areg (regs, 0) = sigsem;
+ CallLib (get_long (4), -564);
#else
- m68k_areg(regs, 1) = layer;
- CallLib(layersbase, -96);
+ m68k_areg (regs, 1) = layer;
+ CallLib (layersbase, -96);
#endif
}
static void do_UnlockLayer(uaecptr layer)
{
- m68k_areg(regs, 0) = layer;
- CallLib(layersbase, -102);
+ m68k_areg (regs, 0) = layer;
+ CallLib (layersbase, -102);
}
static uae_u32 gfxlibname, layerslibname;
static int GFX_PointInRectangle(uaecptr rect, int x, int y)
{
- uae_s16 minx = get_word(rect);
- uae_s16 miny = get_word(rect+2);
- uae_s16 maxx = get_word(rect+4);
- uae_s16 maxy = get_word(rect+6);
+ uae_s16 minx = get_word (rect);
+ uae_s16 miny = get_word (rect+2);
+ uae_s16 maxx = get_word (rect+4);
+ uae_s16 maxy = get_word (rect+6);
if (x < minx || x > maxx || y < miny || y > maxy)
return 0;
static struct Rectangle *GFX_RectFA(struct Rectangle *rp, uaecptr rect)
{
- rp->MinX = (uae_s16)get_word(rect);
- rp->MinY = (uae_s16)get_word(rect+2);
- rp->MaxX = (uae_s16)get_word(rect+4);
- rp->MaxY = (uae_s16)get_word(rect+6);
+ rp->MinX = (uae_s16)get_word (rect);
+ rp->MinY = (uae_s16)get_word (rect+2);
+ rp->MaxX = (uae_s16)get_word (rect+4);
+ rp->MaxY = (uae_s16)get_word (rect+6);
return rp;
}
unsigned int rows = get_word (bitmap + 2);
uae_u16 mask;
- uae_u8 planemask = get_byte(rp + 24);
- uae_u8 fgpen = get_byte(rp + 25);
- uae_u8 bgpen = get_byte(rp + 26);
- uae_u8 drmd = get_byte(rp + 28);
+ uae_u8 planemask = get_byte (rp + 24);
+ uae_u8 fgpen = get_byte (rp + 25);
+ uae_u8 bgpen = get_byte (rp + 26);
+ uae_u8 drmd = get_byte (rp + 28);
uae_u8 pen = drmd & 4 ? bgpen : fgpen;
if (x < 0 || y < 0 || x >= 8*bpr || y >= rows)
if ((planemask & (1 << i)) == 0)
continue;
- planeptr = get_long(bitmap + 8 + i*4);
- data = get_word(planeptr + offs);
+ planeptr = get_long (bitmap + 8 + i*4);
+ data = get_word (planeptr + offs);
mask = 0x8000 >> (x & 15);
if ((pen & (1 << i)) != 0)
data |= mask;
}
- put_word(planeptr + offs, data);
+ put_word (planeptr + offs, data);
}
return 0;
}
int GFX_WritePixel(uaecptr rp, int x, int y)
{
int v;
- uaecptr layer = get_long(rp);
- uaecptr bitmap = get_long(rp + 4);
+ uaecptr layer = get_long (rp);
+ uaecptr bitmap = get_long (rp + 4);
uaecptr cliprect;
int x2, y2;
* Not good.
*/
- x2 = x + (uae_s16)get_word(layer + 16);
- y2 = y + (uae_s16)get_word(layer + 18);
+ x2 = x + (uae_s16)get_word (layer + 16);
+ y2 = y + (uae_s16)get_word (layer + 18);
if (!GFX_PointInRectangle (layer + 16, x2, y2)) {
do_UnlockLayer(layer);
return -1;
}
/* Find the right ClipRect */
- cliprect = get_long(layer + 8);
+ cliprect = get_long (layer + 8);
while (cliprect != 0 && !GFX_PointInRectangle (cliprect + 16, x2, y2))
- cliprect = get_long(cliprect);
+ cliprect = get_long (cliprect);
if (cliprect == 0) {
/* Don't complain: The "Dots" demo does this all the time. I
* suppose if we can't find a ClipRect, we aren't supposed to draw
*/
/*write_log ("Weirdness in WritePixel\n");*/
v = -1;
- } else if (get_long(cliprect + 8) == 0) {
+ } else if (get_long (cliprect + 8) == 0) {
v = GFX_Bitmap_WritePixel(bitmap, x2, y2, rp);
- } else if (get_long(cliprect + 12) == 0) {
+ } else if (get_long (cliprect + 12) == 0) {
/* I don't really know what to do here... */
v = 0;
} else {
/* This appears to be normal for smart refresh layers which are obscured */
- v = GFX_Bitmap_WritePixel (get_long(cliprect + 12), x2 - (uae_s16)get_word(cliprect + 16),
- y2 - (uae_s16)get_word(cliprect + 18), rp);
+ v = GFX_Bitmap_WritePixel (get_long (cliprect + 12), x2 - (uae_s16)get_word (cliprect + 16),
+ y2 - (uae_s16)get_word (cliprect + 18), rp);
}
do_UnlockLayer(layer);
return v;
}
-static uae_u32 gfxl_WritePixel(void) { return GFX_WritePixel(m68k_areg(regs, 1), (uae_s16)m68k_dreg(regs, 0), (uae_s16)m68k_dreg(regs, 1)); }
+static uae_u32 gfxl_WritePixel(void) { return GFX_WritePixel(m68k_areg (regs, 1), (uae_s16)m68k_dreg (regs, 0), (uae_s16)m68k_dreg (regs, 1)); }
static uae_u32 gfxl_BltClear(void)
{
- uaecptr mem=m68k_areg(regs, 1);
- uae_u8 *mptr = chipmem_bank.xlateaddr(m68k_areg(regs, 1));
- uae_u32 count=m68k_dreg(regs, 0);
- uae_u32 flags=m68k_dreg(regs, 1);
+ uaecptr mem=m68k_areg (regs, 1);
+ uae_u8 *mptr = chipmem_bank.xlateaddr(m68k_areg (regs, 1));
+ uae_u32 count=m68k_dreg (regs, 0);
+ uae_u32 flags=m68k_dreg (regs, 1);
unsigned int i;
uae_u32 pattern;
static uae_u32 gfxl_BltBitmap(void)
{
- uaecptr srcbitmap = m68k_areg(regs, 0), dstbitmap = m68k_areg(regs, 1);
- int srcx = (uae_s16)m68k_dreg(regs, 0), srcy = (uae_s16)m68k_dreg(regs, 1);
- int dstx = (uae_s16)m68k_dreg(regs, 2), dsty = (uae_s16)m68k_dreg(regs, 3);
- int sizex = (uae_s16)m68k_dreg(regs, 4), sizey = (uae_s16)m68k_dreg(regs, 5);
- uae_u8 minterm = (uae_u8)m68k_dreg(regs, 6), mask = m68k_dreg(regs, 7);
+ uaecptr srcbitmap = m68k_areg (regs, 0), dstbitmap = m68k_areg (regs, 1);
+ int srcx = (uae_s16)m68k_dreg (regs, 0), srcy = (uae_s16)m68k_dreg (regs, 1);
+ int dstx = (uae_s16)m68k_dreg (regs, 2), dsty = (uae_s16)m68k_dreg (regs, 3);
+ int sizex = (uae_s16)m68k_dreg (regs, 4), sizey = (uae_s16)m68k_dreg (regs, 5);
+ uae_u8 minterm = (uae_u8)m68k_dreg (regs, 6), mask = m68k_dreg (regs, 7);
return 0; /* sam: a return was missing here ! */
}
static uaecptr amiga_malloc(int len)
{
- m68k_dreg(regs, 0) = len;
- m68k_dreg(regs, 1) = 1; /* MEMF_PUBLIC */
- return CallLib(get_long(4), -198); /* AllocMem */
+ m68k_dreg (regs, 0) = len;
+ m68k_dreg (regs, 1) = 1; /* MEMF_PUBLIC */
+ return CallLib (get_long (4), -198); /* AllocMem */
}
static void amiga_free(uaecptr addr, int len)
{
- m68k_areg(regs, 1) = addr;
- m68k_dreg(regs, 0) = len;
- CallLib(get_long(4), -210); /* FreeMem */
+ m68k_areg (regs, 1) = addr;
+ m68k_dreg (regs, 0) = len;
+ CallLib (get_long (4), -210); /* FreeMem */
}
/*
uaecptr regionrect;
int numrects = 0;
struct Rectangle b;
- regionrect = get_long(region+8);
- b.MinX = get_word(region);
- b.MinY = get_word(region+2);
- b.MaxX = get_word(region+4);
- b.MaxY = get_word(region+6);
+ regionrect = get_long (region+8);
+ b.MinX = get_word (region);
+ b.MinY = get_word (region+2);
+ b.MaxX = get_word (region+4);
+ b.MaxY = get_word (region+6);
while (regionrect != 0) {
struct Rectangle tmpr;
- tmpr.MinX = (uae_s16)get_word(regionrect+8) + b.MinX;
- tmpr.MinY = (uae_s16)get_word(regionrect+10) + b.MinY;
- tmpr.MaxX = (uae_s16)get_word(regionrect+12) + b.MinX;
- tmpr.MaxY = (uae_s16)get_word(regionrect+14) + b.MinY;
+ tmpr.MinX = (uae_s16)get_word (regionrect+8) + b.MinX;
+ tmpr.MinY = (uae_s16)get_word (regionrect+10) + b.MinY;
+ tmpr.MaxX = (uae_s16)get_word (regionrect+12) + b.MinX;
+ tmpr.MaxY = (uae_s16)get_word (regionrect+14) + b.MinY;
add_rect(rl, tmpr);
- regionrect = get_long(regionrect);
+ regionrect = get_long (regionrect);
numrects++;
}
return numrects;
if (with_rect) {
struct Rectangle tmpr;
- reg2 = m68k_areg(regs, 0);
+ reg2 = m68k_areg (regs, 0);
numrects2 = copy_rects(reg2, &rl2);
- tmpr.MinX = get_word(m68k_areg(regs, 1));
- tmpr.MinY = get_word(m68k_areg(regs, 1) + 2);
- tmpr.MaxX = get_word(m68k_areg(regs, 1) + 4);
- tmpr.MaxY = get_word(m68k_areg(regs, 1) + 6);
+ tmpr.MinX = get_word (m68k_areg (regs, 1));
+ tmpr.MinY = get_word (m68k_areg (regs, 1) + 2);
+ tmpr.MaxX = get_word (m68k_areg (regs, 1) + 4);
+ tmpr.MaxY = get_word (m68k_areg (regs, 1) + 6);
add_rect(&rl1, tmpr);
} else {
- reg1 = m68k_areg(regs, 0);
- reg2 = m68k_areg(regs, 1);
+ reg1 = m68k_areg (regs, 0);
+ reg2 = m68k_areg (regs, 1);
copy_rects(reg1, &rl1);
numrects2 = copy_rects(reg2, &rl2);
rpp = reg2 + 8;
if (rl3.count < numrects2) {
while (numrects2-- != rl3.count) {
- tmp = get_long(rpp);
- put_long(rpp, get_long(tmp));
+ tmp = get_long (rpp);
+ put_long (rpp, get_long (tmp));
amiga_free(tmp, 16);
}
if (rl3.count > 0)
- put_long(get_long(rpp) + 4, rpp);
+ put_long (get_long (rpp) + 4, rpp);
} else if (rl3.count > numrects2) {
while(numrects2++ != rl3.count) {
- uaecptr prev = get_long(rpp);
+ uaecptr prev = get_long (rpp);
tmp = amiga_malloc(16);
if (tmp == 0)
goto done;
- put_long(tmp, prev);
- put_long(tmp + 4, rpp);
+ put_long (tmp, prev);
+ put_long (tmp + 4, rpp);
if (prev != 0)
- put_long(prev + 4, tmp);
- put_long(rpp, tmp);
+ put_long (prev + 4, tmp);
+ put_long (rpp, tmp);
}
}
if (rl3.count > 0) {
rpp = reg2 + 8;
for (i = 0; i < rl3.count; i++) {
- uaecptr rr = get_long(rpp);
- put_word(rr+8, rl3.rects[i].MinX - rl3.bounds.MinX);
- put_word(rr+10, rl3.rects[i].MinY - rl3.bounds.MinY);
- put_word(rr+12, rl3.rects[i].MaxX - rl3.bounds.MinX);
- put_word(rr+14, rl3.rects[i].MaxY - rl3.bounds.MinY);
+ uaecptr rr = get_long (rpp);
+ put_word (rr+8, rl3.rects[i].MinX - rl3.bounds.MinX);
+ put_word (rr+10, rl3.rects[i].MinY - rl3.bounds.MinY);
+ put_word (rr+12, rl3.rects[i].MaxX - rl3.bounds.MinX);
+ put_word (rr+14, rl3.rects[i].MaxY - rl3.bounds.MinY);
rpp = rr;
}
- if (get_long(rpp) != 0)
+ if (get_long (rpp) != 0)
write_log ("BUG\n");
}
- put_word(reg2+0, rl3.bounds.MinX);
- put_word(reg2+2, rl3.bounds.MinY);
- put_word(reg2+4, rl3.bounds.MaxX);
- put_word(reg2+6, rl3.bounds.MaxY);
+ put_word (reg2+0, rl3.bounds.MinX);
+ put_word (reg2+2, rl3.bounds.MinY);
+ put_word (reg2+4, rl3.bounds.MaxX);
+ put_word (reg2+6, rl3.bounds.MaxY);
retval = 1;
done:
{
uaecptr sigsem = layer + 72;
- m68k_areg(regs, 0) = sigsem;
- return CallLib(get_long(4), -576);
+ m68k_areg (regs, 0) = sigsem;
+ return CallLib (get_long (4), -576);
}
static void LY_LockLayer(uaecptr layer)
{
uaecptr sigsem = layer + 72;
- m68k_areg(regs, 0) = sigsem;
- CallLib(get_long(4), -564);
+ m68k_areg (regs, 0) = sigsem;
+ CallLib (get_long (4), -564);
}
static void LY_UnlockLayer(uaecptr layer)
{
uaecptr sigsem = layer + 72;
- m68k_areg(regs, 0) = sigsem;
- CallLib(get_long(4), -570);
+ m68k_areg (regs, 0) = sigsem;
+ CallLib (get_long (4), -570);
}
static void LY_LockLayerInfo(uaecptr li)
{
uaecptr sigsem = li + 24;
- m68k_areg(regs, 0) = sigsem;
- CallLib(get_long(4), -564);
- put_byte(li+91, get_byte(li+91)+1);
+ m68k_areg (regs, 0) = sigsem;
+ CallLib (get_long (4), -564);
+ put_byte (li+91, get_byte (li+91)+1);
}
static void LY_UnlockLayerInfo(uaecptr li)
{
uaecptr sigsem = li + 24;
- put_byte(li+91, get_byte(li+91)-1);
- m68k_areg(regs, 0) = sigsem;
- CallLib(get_long(4), -570);
+ put_byte (li+91, get_byte (li+91)-1);
+ m68k_areg (regs, 0) = sigsem;
+ CallLib (get_long (4), -570);
}
static void LY_LockLayers(uaecptr li)
LY_LockLayerInfo(li);
while (l != 0) {
LY_LockLayer(l);
- l = get_long(l);
+ l = get_long (l);
}
LY_UnlockLayerInfo(li);
}
LY_LockLayerInfo(li);
while (l != 0) {
LY_UnlockLayer(l);
- l = get_long(l);
+ l = get_long (l);
}
LY_UnlockLayerInfo(li);
}
static void LY_InitLayers(uaecptr li)
{
- memset (get_real_address(li), 0, 92);
- put_long(li + 0, 0); /* top layer */
- put_long(li+84, 0); /* uniq: */
- m68k_areg(regs, 0) = li + 24; CallLib(get_long(4), -558); /* InitSemaphore() */
- put_word(li+88, 0); /* flags (???) */
- put_byte(li+89, 0); /* fatten_count */
+ memset (get_real_address (li), 0, 92);
+ put_long (li + 0, 0); /* top layer */
+ put_long (li+84, 0); /* uniq: */
+ m68k_areg (regs, 0) = li + 24; CallLib (get_long (4), -558); /* InitSemaphore() */
+ put_word (li+88, 0); /* flags (???) */
+ put_byte (li+89, 0); /* fatten_count */
/* @@@ How big can I assume the structure? What's all this 1.0/1.1 cruft? */
}
int fatten_count = get_byte (li + 89)-1;
put_byte (li + 89, fatten_count);
if (fatten_count == 0) {
- struct MyLayerInfo *mli = (struct MyLayerInfo *)find_and_rem_uniq(&MyLayerInfo_list, get_long(li+84));
+ struct MyLayerInfo *mli = (struct MyLayerInfo *)find_and_rem_uniq(&MyLayerInfo_list, get_long (li+84));
if (mli)
free(mli);
}
uaecptr layer = l->amigaos_layer;
uaecptr cr = layer + 8;
uaecptr prev = 0;
- uae_u16 flags = get_word(layer + 30);
+ uae_u16 flags = get_word (layer + 30);
int i;
if ((flags & LAYER_CR_CHANGED) == 0)
{
/* For all CLUELESS layers, set the REDO bit for all layers below it that overlap it
* and delete the data associated with them. */
- uaecptr current_l = get_long(mli->amigaos_linfo);
+ uaecptr current_l = get_long (mli->amigaos_linfo);
while (current_l) {
- struct MyLayer *l = (struct MyLayer *)find_uniq(&mli->layer_list, get_long(current_l + 24));
- if ((get_word(l->amigaos_layer + 32) & LAYER_CLUELESS) != 0) {
- uaecptr next_l = get_long(current_l);
- put_word(l->amigaos_layer + 32, get_word(l->amigaos_layer + 32) | LAYER_REDO);
+ struct MyLayer *l = (struct MyLayer *)find_uniq(&mli->layer_list, get_long (current_l + 24));
+ if ((get_word (l->amigaos_layer + 32) & LAYER_CLUELESS) != 0) {
+ uaecptr next_l = get_long (current_l);
+ put_word (l->amigaos_layer + 32, get_word (l->amigaos_layer + 32) | LAYER_REDO);
while (next_l) {
- struct MyLayer *l2 = (struct MyLayer *)find_uniq(&mli->layer_list, get_long(next_l + 24));
- uae_u16 flags = get_word(l2->amigaos_layer + 32);
+ struct MyLayer *l2 = (struct MyLayer *)find_uniq(&mli->layer_list, get_long (next_l + 24));
+ uae_u16 flags = get_word (l2->amigaos_layer + 32);
if (l2->bounds.MinX <= l->bounds.MaxX && l->bounds.MinX <= l2->bounds.MaxX
&& l2->bounds.MinY <= l->bounds.MaxY && l->bounds.MinY <= l2->bounds.MaxY)
- put_word(l2->amigaos_layer + 32, flags | LAYER_REDO);
+ put_word (l2->amigaos_layer + 32, flags | LAYER_REDO);
if ((flags & (LAYER_REDO|LAYER_CLUELESS)) == 0) {
free_rectlist(&l->obscured);
free_rectlist(&l->visible);
free_bandlist(&l->big_bands);
free_bandlist(&l->small_bands);
}
- next_l = get_long(next_l);
+ next_l = get_long (next_l);
}
}
- current_l = get_long(current_l);
+ current_l = get_long (current_l);
}
}
struct RectList tmp_rl;
propagate_clueless_redo(mli);
- current_l = get_long(mli->amigaos_linfo);
+ current_l = get_long (mli->amigaos_linfo);
while (current_l) {
- struct MyLayer *l = (struct MyLayer *)find_uniq(&mli->layer_list, get_long(current_l + 24));
- uae_u16 flags = get_word(l->amigaos_layer + 32);
+ struct MyLayer *l = (struct MyLayer *)find_uniq(&mli->layer_list, get_long (current_l + 24));
+ uae_u16 flags = get_word (l->amigaos_layer + 32);
if ((flags & LAYER_REDO) != 0) {
- uaecptr next_l = get_long(current_l+4);
+ uaecptr next_l = get_long (current_l+4);
int have_rects = 0;
init_rectlist(&l->obscured);
add_rect_to_bands(&l->big_bands, &l->bounds);
while (next_l) {
- struct MyLayer *l2 = (struct MyLayer *)find_uniq(&mli->layer_list, get_long(next_l + 24));
+ struct MyLayer *l2 = (struct MyLayer *)find_uniq(&mli->layer_list, get_long (next_l + 24));
if (l2->visible.bounds.MinX <= l->bounds.MaxX && l->bounds.MinX <= l2->visible.bounds.MaxX
&& l2->visible.bounds.MinY <= l->bounds.MaxY && l->bounds.MinY <= l2->visible.bounds.MaxY
&& !rect_in_region (&l->obscured, &l2->visible.bounds))
add_rect(&l->obscured, l2->visible.bounds);
have_rects++;
}
- next_l = get_long(next_l+4);
+ next_l = get_long (next_l+4);
}
init_rectlist(&l->visible);
init_rectlist(&tmp_rl);
flags |= LAYER_CR_CHANGED;
}
put_word (l->amigaos_layer + 32, flags & ~(LAYER_CLUELESS|LAYER_REDO));
- current_l = get_long(current_l);
+ current_l = get_long (current_l);
}
}
{
struct MyLayer *l = (struct MyLayer *)malloc(sizeof (struct MyLayer));
uaecptr layer = amiga_malloc(LAYER_SIZE);
- memset (get_real_address(layer), 0, LAYER_SIZE);
+ memset (get_real_address (layer), 0, LAYER_SIZE);
l->amigaos_layer = layer;
- put_word(layer + 16, x0); /* bounds */
- put_word(layer + 18, y0);
- put_word(layer + 20, x1);
- put_word(layer + 22, y1);
- put_word(layer + 30, flags | LAYER_CLUELESS);
- put_long(layer + 32, flags & 4 ? sbm : 0); /* ClipRect */
- put_long(layer + 68, mli->amigaos_linfo);
- m68k_areg(regs, 0) = layer + 72; CallLib(get_long(4), -558); /* InitSemaphore() */
+ put_word (layer + 16, x0); /* bounds */
+ put_word (layer + 18, y0);
+ put_word (layer + 20, x1);
+ put_word (layer + 22, y1);
+ put_word (layer + 30, flags | LAYER_CLUELESS);
+ put_long (layer + 32, flags & 4 ? sbm : 0); /* ClipRect */
+ put_long (layer + 68, mli->amigaos_linfo);
+ m68k_areg (regs, 0) = layer + 72; CallLib (get_long (4), -558); /* InitSemaphore() */
add_uniq(&mli->layer_list, &l->head, layer + 24);
l->mli = mli;
struct MyLayer *l = (struct MyLayer *)find_and_rem_uniq(&l->mli->layer_list, get_long (layer + 24));
/* Free ClipRects */
while ((cr = get_long (l->amigaos_layer + 8))) {
- put_long (l->amigaos_layer + 8, get_long(cr));
+ put_long (l->amigaos_layer + 8, get_long (cr));
amiga_free(cr, CLIPRECT_SIZE);
}
amiga_free (l->amigaos_layer, LAYER_SIZE);
if (other == 0)
break;
/* Backdrop? */
- if ((get_word(other + 30) & 0x40) > (flags & 0x40))
+ if ((get_word (other + 30) & 0x40) > (flags & 0x40))
break;
where = other;
}
l = LY_NewLayer(mli, x0, x1, y0, y1, flags, bm, sbm);
/* Chain into list */
- put_long(l->amigaos_layer, get_long (where));
- put_long(l->amigaos_layer + 4, where == li ? 0 : where);
+ put_long (l->amigaos_layer, get_long (where));
+ put_long (l->amigaos_layer + 4, where == li ? 0 : where);
if (get_long (where) != 0)
- put_long(get_long (where) + 4, l->amigaos_layer);
- put_long(where, l->amigaos_layer);
+ put_long (get_long (where) + 4, l->amigaos_layer);
+ put_long (where, l->amigaos_layer);
redo_layers(mli, bm);
build_cliprects(l);
LY_UnlockLayerInfo(li);
static uae_u32 layers_InitLayers(void) { LY_InitLayers (m68k_areg (regs, 0)); return 0; }
static uae_u32 layers_DisposeLayerInfo(void) { LY_DisposeLayerInfo (m68k_areg (regs, 0)); return 0; }
-static uae_u32 layers_FattenLayerInfo(void) { LY_FattenLayerInfo(m68k_areg(regs, 0)); return 0; }
-static uae_u32 layers_ThinLayerInfo(void) { LY_ThinLayerInfo(m68k_areg(regs, 0)); return 0; }
+static uae_u32 layers_FattenLayerInfo(void) { LY_FattenLayerInfo(m68k_areg (regs, 0)); return 0; }
+static uae_u32 layers_ThinLayerInfo(void) { LY_ThinLayerInfo(m68k_areg (regs, 0)); return 0; }
static uae_u32 layers_CreateUpfrontLayer(void)
{
- return LY_CreateLayer(m68k_areg(regs, 0), (uae_s32)m68k_dreg(regs, 0),
- (uae_s32)m68k_dreg(regs, 1), (uae_s32)m68k_dreg(regs, 2),
- (uae_s32)m68k_dreg(regs, 3),
- m68k_dreg(regs, 4),
- m68k_areg(regs, 1), m68k_areg(regs, 2), m68k_areg(regs, 0));
+ return LY_CreateLayer(m68k_areg (regs, 0), (uae_s32)m68k_dreg (regs, 0),
+ (uae_s32)m68k_dreg (regs, 1), (uae_s32)m68k_dreg (regs, 2),
+ (uae_s32)m68k_dreg (regs, 3),
+ m68k_dreg (regs, 4),
+ m68k_areg (regs, 1), m68k_areg (regs, 2), m68k_areg (regs, 0));
}
static uae_u32 layers_CreateBehindLayer(void)
{
- return LY_CreateLayer(m68k_areg(regs, 0), (uae_s32)m68k_dreg(regs, 0),
- (uae_s32)m68k_dreg(regs, 1), (uae_s32)m68k_dreg(regs, 2),
- (uae_s32)m68k_dreg(regs, 3),
- m68k_dreg(regs, 4),
- m68k_areg(regs, 1), m68k_areg(regs, 2),
- find_behindlayer_position (m68k_areg(regs, 0), m68k_dreg(regs, 4)));
+ return LY_CreateLayer(m68k_areg (regs, 0), (uae_s32)m68k_dreg (regs, 0),
+ (uae_s32)m68k_dreg (regs, 1), (uae_s32)m68k_dreg (regs, 2),
+ (uae_s32)m68k_dreg (regs, 3),
+ m68k_dreg (regs, 4),
+ m68k_areg (regs, 1), m68k_areg (regs, 2),
+ find_behindlayer_position (m68k_areg (regs, 0), m68k_dreg (regs, 4)));
}
static uae_u32 layers_DeleteLayer(void) { LY_DeleteLayer (m68k_areg (regs, 1)); return 0; }
build_cliprects (l);
return 1;
}
-static uae_u32 gfx_TryLockLayer(void) { return LY_TryLockLayer1 (m68k_areg(regs, 5)); }
-static uae_u32 gfx_LockLayer(void) { LY_LockLayer1 (m68k_areg(regs, 5)); return 0; }
-static uae_u32 gfx_UnlockLayer(void) { LY_UnlockLayer(m68k_areg(regs, 5)); return 0; }
-static uae_u32 layers_LockLayer(void) { LY_LockLayer1 (m68k_areg(regs, 1)); return 0; }
-static uae_u32 layers_LockLayers(void) { LY_LockLayers(m68k_areg(regs, 0)); return 0; }
-static uae_u32 layers_LockLayerInfo(void) { LY_LockLayerInfo(m68k_areg(regs, 0)); return 0; }
-static uae_u32 layers_UnlockLayer(void) { LY_UnlockLayer(m68k_areg(regs, 0)); return 0; }
-static uae_u32 layers_UnlockLayers(void) { LY_UnlockLayers(m68k_areg(regs, 0)); return 0; }
-static uae_u32 layers_UnlockLayerInfo(void) { LY_UnlockLayerInfo(m68k_areg(regs, 0)); return 0; }
+static uae_u32 gfx_TryLockLayer(void) { return LY_TryLockLayer1 (m68k_areg (regs, 5)); }
+static uae_u32 gfx_LockLayer(void) { LY_LockLayer1 (m68k_areg (regs, 5)); return 0; }
+static uae_u32 gfx_UnlockLayer(void) { LY_UnlockLayer(m68k_areg (regs, 5)); return 0; }
+static uae_u32 layers_LockLayer(void) { LY_LockLayer1 (m68k_areg (regs, 1)); return 0; }
+static uae_u32 layers_LockLayers(void) { LY_LockLayers(m68k_areg (regs, 0)); return 0; }
+static uae_u32 layers_LockLayerInfo(void) { LY_LockLayerInfo(m68k_areg (regs, 0)); return 0; }
+static uae_u32 layers_UnlockLayer(void) { LY_UnlockLayer(m68k_areg (regs, 0)); return 0; }
+static uae_u32 layers_UnlockLayers(void) { LY_UnlockLayers(m68k_areg (regs, 0)); return 0; }
+static uae_u32 layers_UnlockLayerInfo(void) { LY_UnlockLayerInfo(m68k_areg (regs, 0)); return 0; }
static uae_u32 layers_ScrollLayer(void)
{
static uae_u32 gfxlib_init(void)
{
uae_u32 old_arr;
- uaecptr sysbase=m68k_areg(regs, 6);
+ uaecptr sysbase=m68k_areg (regs, 6);
int i=0;
/* Install new routines */
- m68k_dreg(regs, 0)=0;
- m68k_areg(regs, 1)=gfxlibname;
- gfxbase=CallLib(sysbase, -408); /* OpenLibrary */
- m68k_dreg(regs, 0)=0;
- m68k_areg(regs, 1)=layerslibname;
- layersbase=CallLib(sysbase, -408); /* OpenLibrary */
+ m68k_dreg (regs, 0)=0;
+ m68k_areg (regs, 1)=gfxlibname;
+ gfxbase=CallLib (sysbase, -408); /* OpenLibrary */
+ m68k_dreg (regs, 0)=0;
+ m68k_areg (regs, 1)=layerslibname;
+ layersbase=CallLib (sysbase, -408); /* OpenLibrary */
libemu_InstallFunctionFlags(gfxl_WritePixel, gfxbase, -324, TRAPFLAG_EXTRA_STACK, "");
libemu_InstallFunctionFlags(gfxl_BltClear, gfxbase, -300, 0, "");
value *= con;
if (value <= 0.0f)
- return 0.0f;
+ return 0.0f;
factor = pow(255.0f, 1.0f - gamma);
ret = (float)(factor * pow(value, gamma));
if (ret < 0.0f)
- ret = 0.0f;
+ ret = 0.0f;
return ret;
}
uae_u32 vi;
bri = ((float)(currprefs.gfx_luminance))
- * (128.0f / 1000.0f);
+ * (128.0f / 1000.0f);
con = ((float)(currprefs.gfx_contrast + 1000)) / 1000.0f;
gam = ((float)(1000 - currprefs.gfx_gamma)) / 1000.0f;
hf = 256 - lf * 2;
for (i = 0; i < (256 * 3); i++) {
- v = video_gamma((float)(i - 256), gam, bri, con);
+ v = video_gamma((float)(i - 256), gam, bri, con);
+
+ vi = (uae_u32)v;
+ if (vi > 255)
+ vi = 255;
- vi = (uae_u32)v;
- if (vi > 255)
- vi = 255;
-
if (currprefs.gfx_luminance == 0 && currprefs.gfx_contrast == 0 && currprefs.gfx_gamma == 0)
vi = i & 0xff;
- gamma[i] = vi;
+ gamma[i] = vi;
}
}
int r = ((i >> 8) << 4) | (i >> 8);
int g = (((i >> 4) & 0xf) << 4) | ((i >> 4) & 0x0f);
int b = ((i & 0xf) << 4) | (i & 0x0f);
- r = gamma[r + j];
- g = gamma[g + j];
- b = gamma[b + j];
- xcolors[i] = doMask(r, rw, rs) | doMask(g, gw, gs) | doMask(b, bw, bs) | doAlpha (alpha, aw, as);
- if (byte_swap) {
+ r = gamma[r + j];
+ g = gamma[g + j];
+ b = gamma[b + j];
+ xcolors[i] = doMask(r, rw, rs) | doMask(g, gw, gs) | doMask(b, bw, bs) | doAlpha (alpha, aw, as);
+ if (byte_swap) {
if (bpp <= 16)
- xcolors[i] = bswap_16 (xcolors[i]);
+ xcolors[i] = bswap_16 (xcolors[i]);
else
- xcolors[i] = bswap_32 (xcolors[i]);
+ xcolors[i] = bswap_32 (xcolors[i]);
}
if (bpp <= 16) {
/* Fill upper 16 bits of each colour value
}
/* copy original color table */
for (i = 0; i < 256; i++) {
- redc[0 * 256 + i] = xredcolors[0];
- grec[0 * 256 + i] = xgreencolors[0];
- bluc[0 * 256 + i] = xbluecolors[0];
- redc[1 * 256 + i] = xredcolors[i];
- grec[1 * 256 + i] = xgreencolors[i];
- bluc[1 * 256 + i] = xbluecolors[i];
- redc[2 * 256 + i] = xredcolors[255];
- grec[2 * 256 + i] = xgreencolors[255];
- bluc[2 * 256 + i] = xbluecolors[255];
+ redc[0 * 256 + i] = xredcolors[0];
+ grec[0 * 256 + i] = xgreencolors[0];
+ bluc[0 * 256 + i] = xbluecolors[0];
+ redc[1 * 256 + i] = xredcolors[i];
+ grec[1 * 256 + i] = xgreencolors[i];
+ bluc[1 * 256 + i] = xbluecolors[i];
+ redc[2 * 256 + i] = xredcolors[255];
+ grec[2 * 256 + i] = xgreencolors[255];
+ bluc[2 * 256 + i] = xbluecolors[255];
}
if (usedfilter && usedfilter->yuv) {
/* create internal 5:6:5 color tables */
- for (i = 0; i < 256; i++) {
+ for (i = 0; i < 256; i++) {
j = i + 256;
xredcolors[i] = doColor (gamma[j], 5, 11);
xgreencolors[i] = doColor (gamma[j], 6, 5);
/* create RGB 5:6:5 -> YUV tables */
for (i = 0; i < 65536; i++) {
- uae_u32 r, g, b;
+ uae_u32 r, g, b;
r = (((i >> 11) & 31) << 3) | lowbits (i, 11, 3);
r = gamma[r + 256];
g = (((i >> 5) & 63) << 2) | lowbits (i, 5, 2);
{
uae_u32 sum;
int i, blocksize;
-
+
sum =0;
blocksize = rl (p + 1 * 4);
for (i = 0; i < blocksize; i++)
hfd->heads_def = hfd->heads;
if (hfd->hfd.heads && hfd->hfd.secspertrack) {
uae_u8 buf[512] = { 0 };
- hdf_read(&hfd->hfd, buf, 0, 512);
+ hdf_read(&hfd->hfd, buf, 0, 512);
if (buf[0] != 0 && memcmp(buf, "RDSK", 4)) {
hfd->hfd.nrcyls = (hfd->hfd.size / blocksize) / (sectors * surfaces);
create_virtual_rdb(&hfd->hfd, rl (buf), hfd->bootpri, filesys);
} else {
getchs (hfd, &cyl, &cylsec, &head, &tracksec);
}
- //write_log("MODE SENSE PC=%d CODE=%d DBD=%d\n", pc, pcode, dbd);
+ //write_log ("MODE SENSE PC=%d CODE=%d DBD=%d\n", pc, pcode, dbd);
p = r;
p[0] = 4 - 1;
p[1] = 0;
p += 8;
}
if (pcode == 0) {
- p[0] = 0;
+ p[0] = 0;
p[1] = 0;
p[2] = 0x20;
p[3] = 0;
lba = blocks;
blocks = lba;
}
- wl (r, blocks);
+ wl (r, blocks);
wl (r + 4, hfd->blocksize);
scsi_len = lr = 8;
}
break;
default:
err:
- lr = -1;
+ lr = -1;
write_log ("UAEHF: unsupported scsi command 0x%02.2X\n", cmdbuf[0]);
status = 2; /* CHECK CONDITION */
s[0] = 0x70;
if (hfpd->thread_running)
return 1;
memset (hfpd, 0, sizeof (struct hardfileprivdata));
- hfpd->base = m68k_areg(&context->regs, 6);
+ hfpd->base = m68k_areg (&context->regs, 6);
init_comm_pipe (&hfpd->requests, 100, 1);
uae_sem_init (&hfpd->sync_sem, 0, 0);
uae_start_thread ("hardfile", hardfile_thread, hfpd, &hfpd->tid);
static uae_u32 REGPARAM2 hardfile_open (TrapContext *context)
{
- uaecptr tmp1 = m68k_areg(&context->regs, 1); /* IOReq */
+ uaecptr tmp1 = m68k_areg (&context->regs, 1); /* IOReq */
int unit = mangleunit (m68k_dreg (&context->regs, 0));
struct hardfileprivdata *hfpd = &hardfpd[unit];
int err = -1;
static uae_u32 REGPARAM2 hardfile_close (TrapContext *context)
{
- uaecptr request = m68k_areg(&context->regs, 1); /* IOReq */
+ uaecptr request = m68k_areg (&context->regs, 1); /* IOReq */
int unit = mangleunit (get_long (request + 24));
struct hardfileprivdata *hfpd = &hardfpd[unit];
if (!hfpd)
return 0;
put_word (hfpd->base + 32, get_word (hfpd->base + 32) - 1);
- if (get_word(hfpd->base + 32) == 0)
+ if (get_word (hfpd->base + 32) == 0)
write_comm_pipe_u32 (&hfpd->requests, 0, 1);
return 0;
}
put_byte (request + 31, error);
hf_log2 ("hf: unit=%d, request=%p, cmd=%d offset=%u len=%d, actual=%d error%=%d\n", unit, request,
- get_word(request + 28), get_long (request + 44), get_long (request + 36), actual, error);
+ get_word (request + 28), get_long (request + 44), get_long (request + 36), actual, error);
return async;
}
static uae_u32 REGPARAM2 hardfile_abortio (TrapContext *context)
{
- uae_u32 request = m68k_areg(&context->regs, 1);
+ uae_u32 request = m68k_areg (&context->regs, 1);
int unit = mangleunit (get_long (request + 24));
struct hardfiledata *hfd = get_hardfile_data (unit);
struct hardfileprivdata *hfpd = &hardfpd[unit];
static uae_u32 REGPARAM2 hardfile_beginio (TrapContext *context)
{
- uae_u32 request = m68k_areg(&context->regs, 1);
+ uae_u32 request = m68k_areg (&context->regs, 1);
uae_u8 flags = get_byte (request + 30);
int cmd = get_word (request + 28);
int unit = mangleunit (get_long (request + 24));
for (i = 0; i < MAX_FILESYSTEM_UNITS; i++) {
hfpd = &hardfpd[i];
- if (hfpd->base && valid_address(hfpd->base, 36) && get_word(hfpd->base + 32) > 0) {
+ if (hfpd->base && valid_address(hfpd->base, 36) && get_word (hfpd->base + 32) > 0) {
for (j = 0; j < MAX_ASYNC_REQUESTS; j++) {
uaecptr request;
if ((request = hfpd->d_request[i]))
int filesys_insert(int nr, char *volume, char *rootdir, int readonly, int flags);
int filesys_eject(int nr);
+extern char *filesys_createvolname (const char *volname, const char *rootdir, const char *def);
+
extern int sprintf_filesys_unit (char *buffer, int num);
extern void filesys_reset (void);
scsiinfo_func scsiinfo;
ismedia_func ismedia;
-
+
};
extern struct device_functions *device_func[2];
STATIC_INLINE uae_u32 get_word_prefetch (struct regstruct *regs, int o)
{
uae_u32 v = regs->irc;
- regs->irc = get_wordi (m68k_getpc(regs) + o);
+ regs->irc = get_wordi (m68k_getpc (regs) + o);
return v;
}
STATIC_INLINE uae_u32 get_long_prefetch (struct regstruct *regs, int o)
STATIC_INLINE uae_u32 get_word_ce_prefetch (struct regstruct *regs, int o)
{
uae_u32 v = regs->irc;
- regs->irc = get_wordi_ce (m68k_getpc(regs) + o);
+ regs->irc = get_wordi_ce (m68k_getpc (regs) + o);
return v;
}
pc |= get_word_ce (m68k_areg (regs, 7) + 2);
m68k_areg (regs, 7) += 4;
if (pc & 1)
- exception3 (0x4e75, m68k_getpc(regs), pc);
+ exception3 (0x4e75, m68k_getpc (regs), pc);
else
m68k_setpc (regs, pc);
}
* cpummu.h - MMU emulation
*
* Copyright (c) 2001-2004 Milan Jurik of ARAnyM dev team (see AUTHORS)
- *
+ *
* Inspired by UAE MMU patch
*
* This file is part of the ARAnyM project which builds a new and powerful
extern uaecptr REGPARAM3 mmu_translate(uaecptr addr, int super, int data, int write);
-extern uae_u32 REGPARAM3 sfc_get_long(uaecptr addr) REGPARAM;
-extern uae_u16 REGPARAM3 sfc_get_word(uaecptr addr) REGPARAM;
-extern uae_u8 REGPARAM3 sfc_get_byte(uaecptr addr) REGPARAM;
-extern void REGPARAM3 dfc_put_long(uaecptr addr, uae_u32 val) REGPARAM;
-extern void REGPARAM3 dfc_put_word(uaecptr addr, uae_u16 val) REGPARAM;
-extern void REGPARAM3 dfc_put_byte(uaecptr addr, uae_u8 val) REGPARAM;
+extern uae_u32 REGPARAM3 sfc_get_long (uaecptr addr) REGPARAM;
+extern uae_u16 REGPARAM3 sfc_get_word (uaecptr addr) REGPARAM;
+extern uae_u8 REGPARAM3 sfc_get_byte (uaecptr addr) REGPARAM;
+extern void REGPARAM3 dfc_put_long (uaecptr addr, uae_u32 val) REGPARAM;
+extern void REGPARAM3 dfc_put_word (uaecptr addr, uae_u16 val) REGPARAM;
+extern void REGPARAM3 dfc_put_byte (uaecptr addr, uae_u8 val) REGPARAM;
extern void REGPARAM3 mmu_flush_atc(uaecptr addr, int super, int global) REGPARAM;
extern void REGPARAM3 mmu_flush_atc_all(int global) REGPARAM;
-STATIC_INLINE uae_u32 phys_get_long(uaecptr addr)
+STATIC_INLINE uae_u32 phys_get_long (uaecptr addr)
{
#if ARAM_PAGE_CHECK
if (((addr ^ read_page) <= ARAM_PAGE_MASK))
- return do_get_mem_long((uae_u32*)(addr + read_offset));
+ return do_get_mem_long((uae_u32*)(addr + read_offset));
#endif
#ifndef HW_SIGSEGV
addr = addr < 0xff000000 ? addr : addr & 0x00ffffff;
if ((addr & 0xfff00000) == 0x00f00000) return HWget_l(addr);
#endif
check_ram_boundary(addr, 4, false);
- uae_u32 * const m = (uae_u32 *)phys_get_real_address(addr);
+ uae_u32 * const m = (uae_u32 *)phys_get_real_address (addr);
#if ARAM_PAGE_CHECK
read_page = addr;
read_offset = (uintptr)m - (uintptr)addr;
return do_get_mem_long(m);
}
-STATIC_INLINE uae_u32 phys_get_word(uaecptr addr)
+STATIC_INLINE uae_u32 phys_get_word (uaecptr addr)
{
#if ARAM_PAGE_CHECK
if (((addr ^ read_page) <= ARAM_PAGE_MASK))
- return do_get_mem_word((uae_u16*)(addr + read_offset));
+ return do_get_mem_word((uae_u16*)(addr + read_offset));
#endif
#ifndef HW_SIGSEGV
addr = addr < 0xff000000 ? addr : addr & 0x00ffffff;
if ((addr & 0xfff00000) == 0x00f00000) return HWget_w(addr);
#endif
check_ram_boundary(addr, 2, false);
- uae_u16 * const m = (uae_u16 *)phys_get_real_address(addr);
+ uae_u16 * const m = (uae_u16 *)phys_get_real_address (addr);
#if ARAM_PAGE_CHECK
read_page = addr;
read_offset = (uintptr)m - (uintptr)addr;
return do_get_mem_word(m);
}
-STATIC_INLINE uae_u32 phys_get_byte(uaecptr addr)
+STATIC_INLINE uae_u32 phys_get_byte (uaecptr addr)
{
#if ARAM_PAGE_CHECK
if (((addr ^ read_page) <= ARAM_PAGE_MASK))
- return do_get_mem_byte((uae_u8*)(addr + read_offset));
+ return do_get_mem_byte((uae_u8*)(addr + read_offset));
#endif
#ifndef HW_SIGSEGV
addr = addr < 0xff000000 ? addr : addr & 0x00ffffff;
if ((addr & 0xfff00000) == 0x00f00000) return HWget_b(addr);
#endif
check_ram_boundary(addr, 1, false);
- uae_u8 * const m = (uae_u8 *)phys_get_real_address(addr);
+ uae_u8 * const m = (uae_u8 *)phys_get_real_address (addr);
#if ARAM_PAGE_CHECK
read_page = addr;
read_offset = (uintptr)m - (uintptr)addr;
return do_get_mem_byte(m);
}
-STATIC_INLINE void phys_put_long(uaecptr addr, uae_u32 l)
+STATIC_INLINE void phys_put_long (uaecptr addr, uae_u32 l)
{
#if ARAM_PAGE_CHECK
if (((addr ^ write_page) <= ARAM_PAGE_MASK)) {
- do_put_mem_long((uae_u32*)(addr + write_offset), l);
- return;
+ do_put_mem_long((uae_u32*)(addr + write_offset), l);
+ return;
}
#endif
#ifndef HW_SIGSEGV
addr = addr < 0xff000000 ? addr : addr & 0x00ffffff;
if ((addr & 0xfff00000) == 0x00f00000) {
- HWput_l(addr, l);
- return;
- }
+ HWput_l(addr, l);
+ return;
+ }
#endif
check_ram_boundary(addr, 4, true);
- uae_u32 * const m = (uae_u32 *)phys_get_real_address(addr);
+ uae_u32 * const m = (uae_u32 *)phys_get_real_address (addr);
#if ARAM_PAGE_CHECK
write_page = addr;
write_offset = (uintptr)m - (uintptr)addr;
do_put_mem_long(m, l);
}
-STATIC_INLINE void phys_put_word(uaecptr addr, uae_u32 w)
+STATIC_INLINE void phys_put_word (uaecptr addr, uae_u32 w)
{
#if ARAM_PAGE_CHECK
if (((addr ^ write_page) <= ARAM_PAGE_MASK)) {
- do_put_mem_word((uae_u16*)(addr + write_offset), w);
- return;
+ do_put_mem_word((uae_u16*)(addr + write_offset), w);
+ return;
}
#endif
#ifndef HW_SIGSEGV
addr = addr < 0xff000000 ? addr : addr & 0x00ffffff;
if ((addr & 0xfff00000) == 0x00f00000) {
- HWput_w(addr, w);
- return;
+ HWput_w(addr, w);
+ return;
}
#endif
check_ram_boundary(addr, 2, true);
- uae_u16 * const m = (uae_u16 *)phys_get_real_address(addr);
+ uae_u16 * const m = (uae_u16 *)phys_get_real_address (addr);
#if ARAM_PAGE_CHECK
write_page = addr;
write_offset = (uintptr)m - (uintptr)addr;
do_put_mem_word(m, w);
}
-STATIC_INLINE void phys_put_byte(uaecptr addr, uae_u32 b)
+STATIC_INLINE void phys_put_byte (uaecptr addr, uae_u32 b)
{
#if ARAM_PAGE_CHECK
if (((addr ^ write_page) <= ARAM_PAGE_MASK)) {
- do_put_mem_byte((uae_u8*)(addr + write_offset), b);
- return;
+ do_put_mem_byte((uae_u8*)(addr + write_offset), b);
+ return;
}
#endif
#ifndef HW_SIGSEGV
addr = addr < 0xff000000 ? addr : addr & 0x00ffffff;
if ((addr & 0xfff00000) == 0x00f00000) {
- HWput_b(addr, b);
- return;
+ HWput_b(addr, b);
+ return;
}
#endif
check_ram_boundary(addr, 1, true);
- uae_u8 * const m = (uae_u8 *)phys_get_real_address(addr);
+ uae_u8 * const m = (uae_u8 *)phys_get_real_address (addr);
#if ARAM_PAGE_CHECK
write_page = addr;
write_offset = (uintptr)m - (uintptr)addr;
return unlikely((addr & (size - 1)) && (addr ^ (addr + size - 1)) & 0x1000);
}
-STATIC_INLINE uae_u8 *mmu_get_real_address(uaecptr addr, struct mmu_atc_line *cl)
+STATIC_INLINE uae_u8 *mmu_get_real_address (uaecptr addr, struct mmu_atc_line *cl)
{
- return do_get_real_address(cl->phys + addr);
+ return do_get_real_address (cl->phys + addr);
}
-STATIC_INLINE uae_u32 mmu_get_long(uaecptr addr, int data, int size)
+STATIC_INLINE uae_u32 mmu_get_long (uaecptr addr, int data, int size)
{
struct mmu_atc_line *cl;
if (likely(mmu_lookup(addr, data, 0, &cl)))
- return do_get_mem_long((uae_u32 *)mmu_get_real_address(addr, cl));
+ return do_get_mem_long((uae_u32 *)mmu_get_real_address (addr, cl));
return mmu_get_long_slow(addr, regs.s, data, size, cl);
}
-STATIC_INLINE uae_u32 get_long(uaecptr addr)
+STATIC_INLINE uae_u32 get_long (uaecptr addr)
{
if (unlikely(is_unaligned(addr, 4)))
return mmu_get_long_unaligned(addr, 1);
- return mmu_get_long(addr, 1, sz_long);
+ return mmu_get_long (addr, 1, sz_long);
}
-STATIC_INLINE uae_u16 mmu_get_word(uaecptr addr, int data, int size)
+STATIC_INLINE uae_u16 mmu_get_word (uaecptr addr, int data, int size)
{
struct mmu_atc_line *cl;
if (likely(mmu_lookup(addr, data, 0, &cl)))
- return do_get_mem_word((uae_u16 *)mmu_get_real_address(addr, cl));
+ return do_get_mem_word((uae_u16 *)mmu_get_real_address (addr, cl));
return mmu_get_word_slow(addr, regs.s, data, size, cl);
}
-STATIC_INLINE uae_u16 get_word(uaecptr addr)
+STATIC_INLINE uae_u16 get_word (uaecptr addr)
{
if (unlikely(is_unaligned(addr, 2)))
return mmu_get_word_unaligned(addr, 1);
- return mmu_get_word(addr, 1, sz_word);
+ return mmu_get_word (addr, 1, sz_word);
}
-STATIC_INLINE uae_u8 mmu_get_byte(uaecptr addr, int data, int size)
+STATIC_INLINE uae_u8 mmu_get_byte (uaecptr addr, int data, int size)
{
struct mmu_atc_line *cl;
if (likely(mmu_lookup(addr, data, 0, &cl)))
- return do_get_mem_byte((uae_u8 *)mmu_get_real_address(addr, cl));
+ return do_get_mem_byte((uae_u8 *)mmu_get_real_address (addr, cl));
return mmu_get_byte_slow(addr, regs.s, data, size, cl);
}
-STATIC_INLINE uae_u8 get_byte(uaecptr addr)
+STATIC_INLINE uae_u8 get_byte (uaecptr addr)
{
- return mmu_get_byte(addr, 1, sz_byte);
+ return mmu_get_byte (addr, 1, sz_byte);
}
-STATIC_INLINE void mmu_put_long(uaecptr addr, uae_u32 val, int data, int size)
+STATIC_INLINE void mmu_put_long (uaecptr addr, uae_u32 val, int data, int size)
{
struct mmu_atc_line *cl;
if (likely(mmu_lookup(addr, data, 1, &cl)))
- do_put_mem_long((uae_u32 *)mmu_get_real_address(addr, cl), val);
+ do_put_mem_long((uae_u32 *)mmu_get_real_address (addr, cl), val);
else
mmu_put_long_slow(addr, val, regs.s, data, size, cl);
}
-STATIC_INLINE void put_long(uaecptr addr, uae_u32 val)
+STATIC_INLINE void put_long (uaecptr addr, uae_u32 val)
{
if (unlikely(is_unaligned(addr, 4)))
mmu_put_long_unaligned(addr, val, 1);
else
- mmu_put_long(addr, val, 1, sz_long);
+ mmu_put_long (addr, val, 1, sz_long);
}
-STATIC_INLINE void mmu_put_word(uaecptr addr, uae_u16 val, int data, int size)
+STATIC_INLINE void mmu_put_word (uaecptr addr, uae_u16 val, int data, int size)
{
struct mmu_atc_line *cl;
if (likely(mmu_lookup(addr, data, 1, &cl)))
- do_put_mem_word((uae_u16 *)mmu_get_real_address(addr, cl), val);
+ do_put_mem_word((uae_u16 *)mmu_get_real_address (addr, cl), val);
else
mmu_put_word_slow(addr, val, regs.s, data, size, cl);
}
-STATIC_INLINE void put_word(uaecptr addr, uae_u16 val)
+STATIC_INLINE void put_word (uaecptr addr, uae_u16 val)
{
if (unlikely(is_unaligned(addr, 2)))
mmu_put_word_unaligned(addr, val, 1);
else
- mmu_put_word(addr, val, 1, sz_word);
+ mmu_put_word (addr, val, 1, sz_word);
}
-STATIC_INLINE void mmu_put_byte(uaecptr addr, uae_u8 val, int data, int size)
+STATIC_INLINE void mmu_put_byte (uaecptr addr, uae_u8 val, int data, int size)
{
struct mmu_atc_line *cl;
if (likely(mmu_lookup(addr, data, 1, &cl)))
- do_put_mem_byte((uae_u8 *)mmu_get_real_address(addr, cl), val);
+ do_put_mem_byte((uae_u8 *)mmu_get_real_address (addr, cl), val);
else
mmu_put_byte_slow(addr, val, regs.s, data, size, cl);
}
-STATIC_INLINE void put_byte(uaecptr addr, uae_u8 val)
+STATIC_INLINE void put_byte (uaecptr addr, uae_u8 val)
{
- mmu_put_byte(addr, val, 1, sz_byte);
+ mmu_put_byte (addr, val, 1, sz_byte);
}
-STATIC_INLINE uae_u8 *get_real_address(uaecptr addr, int write, int sz)
+STATIC_INLINE uae_u8 *get_real_address (uaecptr addr, int write, int sz)
{
(void)sz;
- return phys_get_real_address(mmu_translate(addr, regs.s, 1, write));
+ return phys_get_real_address (mmu_translate(addr, regs.s, 1, write));
}
STATIC_INLINE uae_u32 mmu_get_user_long(uaecptr addr, int super, int data, int size)
struct mmu_atc_line *cl;
if (likely(mmu_user_lookup(addr, super, data, 0, &cl)))
- return do_get_mem_long((uae_u32 *)mmu_get_real_address(addr, cl));
+ return do_get_mem_long((uae_u32 *)mmu_get_real_address (addr, cl));
return mmu_get_long_slow(addr, super, data, size, cl);
}
struct mmu_atc_line *cl;
if (likely(mmu_user_lookup(addr, super, data, 0, &cl)))
- return do_get_mem_word((uae_u16 *)mmu_get_real_address(addr, cl));
+ return do_get_mem_word((uae_u16 *)mmu_get_real_address (addr, cl));
return mmu_get_word_slow(addr, super, data, size, cl);
}
struct mmu_atc_line *cl;
if (likely(mmu_user_lookup(addr, super, data, 0, &cl)))
- return do_get_mem_byte((uae_u8 *)mmu_get_real_address(addr, cl));
+ return do_get_mem_byte((uae_u8 *)mmu_get_real_address (addr, cl));
return mmu_get_byte_slow(addr, super, data, size, cl);
}
struct mmu_atc_line *cl;
if (likely(mmu_user_lookup(addr, super, data, 1, &cl)))
- do_put_mem_long((uae_u32 *)mmu_get_real_address(addr, cl), val);
+ do_put_mem_long((uae_u32 *)mmu_get_real_address (addr, cl), val);
else
mmu_put_long_slow(addr, val, super, data, size, cl);
}
struct mmu_atc_line *cl;
if (likely(mmu_user_lookup(addr, super, data, 1, &cl)))
- do_put_mem_word((uae_u16 *)mmu_get_real_address(addr, cl), val);
+ do_put_mem_word((uae_u16 *)mmu_get_real_address (addr, cl), val);
else
mmu_put_word_slow(addr, val, super, data, size, cl);
}
struct mmu_atc_line *cl;
if (likely(mmu_user_lookup(addr, super, data, 1, &cl)))
- do_put_mem_byte((uae_u8 *)mmu_get_real_address(addr, cl), val);
+ do_put_mem_byte((uae_u8 *)mmu_get_real_address (addr, cl), val);
else
mmu_put_byte_slow(addr, val, super, data, size, cl);
}
CATCH(prb) {
RESTORE_EXCEPTION;
return false;
- }
+ }
}
#else
-#define get_long(a) phys_get_long(a)
-#define get_word(a) phys_get_word(a)
-#define get_byte(a) phys_get_byte(a)
-#define put_long(a,b) phys_put_long(a,b)
-#define put_word(a,b) phys_put_word(a,b)
-#define put_byte(a,b) phys_put_byte(a,b)
-#define get_real_address(a,w,s) phys_get_real_address(a)
+#define get_long (a) phys_get_long (a)
+#define get_word (a) phys_get_word (a)
+#define get_byte (a) phys_get_byte (a)
+#define put_long (a,b) phys_put_long (a,b)
+#define put_word (a,b) phys_put_word (a,b)
+#define put_byte (a,b) phys_put_byte (a,b)
+#define get_real_address (a,w,s) phys_get_real_address (a)
#define valid_address(a,w,s) phys_valid_address(a,w,s)
#endif
unsigned long int eventtime = eventtab[i].evtime - currcycle;
#ifdef EVENT_DEBUG
if (eventtime == 0) {
- write_log("event %d bug\n",i);
+ write_log ("event %d bug\n",i);
}
#endif
if (eventtime < mintime)
extern struct hardfiledata *get_hardfile_data (int nr);
#define FILESYS_MAX_BLOCKSIZE 2048
-extern int hdf_open (struct hardfiledata *hfd, char *name);
-extern int hdf_dup (struct hardfiledata *dhfd, struct hardfiledata *shfd);
+extern int hdf_open (struct hardfiledata *hfd, const char *name);
+extern int hdf_dup (struct hardfiledata *dhfd, const struct hardfiledata *shfd);
extern void hdf_close (struct hardfiledata *hfd);
extern int hdf_read (struct hardfiledata *hfd, void *buffer, uae_u64 offset, int len);
extern int hdf_write (struct hardfiledata *hfd, void *buffer, uae_u64 offset, int len);
extern void SuperEagle(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height);
extern void _2xSaI(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height);
extern void AdMame2x(u8 *srcPtr, u32 srcPitch, /* u8 deltaPtr, */
- u8 *dstPtr, u32 dstPitch, int width, int height);
+ u8 *dstPtr, u32 dstPitch, int width, int height);
extern void AdMame2x32(u8 *srcPtr, u32 srcPitch, /* u8 deltaPtr, */
- u8 *dstPtr, u32 dstPitch, int width, int height);
+ u8 *dstPtr, u32 dstPitch, int width, int height);
extern void hq_init(int rb, int gb, int bb, int rs, int gs, int bs);
extern void hq2x_32(unsigned char*, unsigned char*, int, int, int, int, int);
* Gwenole Beauchesne
*
* Basilisk II (C) 1997-2005 Christian Bauer
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
extern int inputdevice_iterate (int devnum, int num, char *name, int *af);
extern int inputdevice_set_mapping (int devnum, int num, char *name, char *custom, int af, int sub);
extern int inputdevice_get_mapped_name (int devnum, int num, int *pflags, char *name, char *custom, int sub);
-extern void inputdevice_copyconfig (struct uae_prefs *src, struct uae_prefs *dst);
+extern void inputdevice_copyconfig (const struct uae_prefs *src, struct uae_prefs *dst);
extern void inputdevice_copy_single_config (struct uae_prefs *p, int src, int dst, int devnum);
extern void inputdevice_swap_ports (struct uae_prefs *p, int devnum);
extern void inputdevice_config_change (void);
#define JSEM_LASTKBD 5
#define JSEM_ISANYKBD(port,p) (jsem_iskbdjoy(port,p) >= JSEM_KBDLAYOUT && jsem_iskbdjoy(port,p) < JSEM_KBDLAYOUT + JSEM_LASTKBD)
-extern int jsem_isjoy (int port, struct uae_prefs *p);
-extern int jsem_ismouse (int port, struct uae_prefs *p);
-extern int jsem_iskbdjoy (int port, struct uae_prefs *p);
-extern void do_fake_joystick(int nr, int *fake);
+extern int jsem_isjoy (int port, const struct uae_prefs *p);
+extern int jsem_ismouse (int port, const struct uae_prefs *p);
+extern int jsem_iskbdjoy (int port, const struct uae_prefs *p);
+extern void do_fake_joystick (int nr, int *fake);
-extern int inputdevice_uaelib (char*, char*);
+extern int inputdevice_uaelib (char *, char *);
#define INPREC_JOYPORT 1
#define INPREC_JOYBUTTON 2
AKS_INPUT_CONFIG_1,AKS_INPUT_CONFIG_2,AKS_INPUT_CONFIG_3,AKS_INPUT_CONFIG_4,
AKS_DISKSWAPPER_NEXT,AKS_DISKSWAPPER_PREV,
AKS_DISKSWAPPER_INSERT0,AKS_DISKSWAPPER_INSERT1,AKS_DISKSWAPPER_INSERT2,AKS_DISKSWAPPER_INSERT3,
-};
+};
extern void keybuf_init (void);
extern void joystick_setting_changed (void);
extern int getcapslockstate (void);
-extern void setcapslockstate (int);
\ No newline at end of file
+extern void setcapslockstate (int);
#define wordput(addr,w) (call_mem_put_func(get_mem_bank(addr).wput, addr, w))
#define byteput(addr,b) (call_mem_put_func(get_mem_bank(addr).bput, addr, b))
-STATIC_INLINE uae_u32 get_long(uaecptr addr)
+STATIC_INLINE uae_u32 get_long (uaecptr addr)
{
return longget(addr);
}
-STATIC_INLINE uae_u32 get_word(uaecptr addr)
+STATIC_INLINE uae_u32 get_word (uaecptr addr)
{
return wordget(addr);
}
-STATIC_INLINE uae_u32 get_byte(uaecptr addr)
+STATIC_INLINE uae_u32 get_byte (uaecptr addr)
{
return byteget(addr);
}
* Read a host pointer from addr
*/
#if SIZEOF_VOID_P == 4
-# define get_pointer(addr) ((void *)get_long(addr))
+# define get_pointer(addr) ((void *)get_long (addr))
#else
# if SIZEOF_VOID_P == 8
STATIC_INLINE void *get_pointer (uaecptr addr)
# endif
#endif
-STATIC_INLINE void put_long(uaecptr addr, uae_u32 l)
+STATIC_INLINE void put_long (uaecptr addr, uae_u32 l)
{
longput(addr, l);
}
-STATIC_INLINE void put_word(uaecptr addr, uae_u32 w)
+STATIC_INLINE void put_word (uaecptr addr, uae_u32 w)
{
wordput(addr, w);
}
-STATIC_INLINE void put_byte(uaecptr addr, uae_u32 b)
+STATIC_INLINE void put_byte (uaecptr addr, uae_u32 b)
{
byteput(addr, b);
}
* Store host pointer v at addr
*/
#if SIZEOF_VOID_P == 4
-# define put_pointer(addr, p) (put_long((addr), (uae_u32)(p)))
+# define put_pointer(addr, p) (put_long ((addr), (uae_u32)(p)))
#else
# if SIZEOF_VOID_P == 8
STATIC_INLINE void put_pointer (uaecptr addr, void *v)
# endif
#endif
-STATIC_INLINE uae_u8 *get_real_address(uaecptr addr)
+STATIC_INLINE uae_u8 *get_real_address (uaecptr addr)
{
return get_mem_bank(addr).xlateaddr(addr);
}
extern int prowizard_search (unsigned char *in_data, int in_size);
extern void moduleripper (void);
extern FILE *moduleripper_fopen(const char *, const char *);
-extern FILE *moduleripper2_fopen(const char *, const char *, const char *);
+extern FILE *moduleripper2_fopen(const char *, const char *, const char *, int, int);
* and without stack magic.
*
* Copyright 1999 Patrick Ohly
- *
+ *
* Uses the EXTER interrupt that is setup in filesys.c
* and some of it needs thread support.
*/
/*
* The following functions are shortcuts for calling
- * the exec.library function with CallLib(), so they
+ * the exec.library function with CallLib (), so they
* are only available in a trap function. This trap
* function has to be setup with deftrap2() and
* TRAPFLAG_EXTRA_STACK and stack magic is required.
uae_u8 *pc_p;
uae_u8 *pc_oldp;
+ uae_u16 irc, ir;
+ uae_u32 spcflags;
+
uaecptr usp, isp, msp;
uae_u16 sr;
flagtype t1;
fptype fp[8];
fptype fp_result;
- uae_u32 fpcr,fpsr, fpiar;
+ uae_u32 fpcr, fpsr, fpiar;
uae_u32 fpsr_highbyte;
#endif
#ifndef CPUEMU_68000_ONLY
#endif
uae_u32 pcr;
- uae_u32 spcflags;
uae_u32 kick_mask;
uae_u32 address_space_mask;
- uae_u16 irc, ir;
-
uae_u8 panic;
uae_u32 panic_pc, panic_addr;
extern signed long pissoff;
-STATIC_INLINE uae_u32 munge24(uae_u32 x)
+STATIC_INLINE uae_u32 munge24 (uae_u32 x)
{
return x & regs.address_space_mask;
}
STATIC_INLINE void set_special (struct regstruct *regs, uae_u32 x)
{
regs->spcflags |= x;
- cycles_do_special();
+ cycles_do_special ();
}
STATIC_INLINE void unset_special (struct regstruct *regs, uae_u32 x)
return (uaecptr)(regs->pc + ((char *)p - (char *)regs->pc_oldp));
}
+#define m68k_incpc(regs, o) ((regs)->pc_p += (o))
+
STATIC_INLINE void m68k_setpci(struct regstruct *regs, uaecptr newpc)
{
regs->pc = newpc;
regs->pc += o;
}
+STATIC_INLINE void m68k_do_rts(struct regstruct *regs)
+{
+ m68k_setpc(regs, get_long(m68k_areg (regs, 7)));
+ m68k_areg (regs, 7) += 4;
+}
+STATIC_INLINE void m68k_do_rtsi(struct regstruct *regs)
+{
+ m68k_setpci(regs, get_long(m68k_areg (regs, 7)));
+ m68k_areg (regs, 7) += 4;
+}
+
+STATIC_INLINE void m68k_do_bsr(struct regstruct *regs, uaecptr oldpc, uae_s32 offset)
+{
+ m68k_areg (regs, 7) -= 4;
+ put_long(m68k_areg (regs, 7), oldpc);
+ m68k_incpc(regs, offset);
+}
+STATIC_INLINE void m68k_do_bsri(struct regstruct *regs, uaecptr oldpc, uae_s32 offset)
+{
+ m68k_areg (regs, 7) -= 4;
+ put_long(m68k_areg (regs, 7), oldpc);
+ m68k_incpci(regs, offset);
+}
+
+STATIC_INLINE void m68k_do_jsr(struct regstruct *regs, uaecptr oldpc, uaecptr dest)
+{
+ m68k_areg (regs, 7) -= 4;
+ put_long(m68k_areg (regs, 7), oldpc);
+ m68k_setpc(regs, dest);
+}
+
#define get_ibyte(regs, o) do_get_mem_byte((uae_u8 *)((regs)->pc_p + (o) + 1))
#define get_iword(regs, o) do_get_mem_word((uae_u16 *)((regs)->pc_p + (o)))
#define get_ilong(regs, o) do_get_mem_long((uae_u32 *)((regs)->pc_p + (o)))
#define get_iwordi(o) get_wordi(o)
#define get_ilongi(o) get_longi(o)
-#define m68k_incpc(regs, o) ((regs)->pc_p += (o))
-
/* These are only used by the 68020/68881 code, and therefore don't
* need to handle prefetch. */
STATIC_INLINE uae_u32 next_ibyte (struct regstruct *regs)
return r;
}
-STATIC_INLINE void m68k_do_rts(struct regstruct *regs)
-{
- m68k_setpc(regs, get_long(m68k_areg(regs, 7)));
- m68k_areg(regs, 7) += 4;
-}
-STATIC_INLINE void m68k_do_rtsi(struct regstruct *regs)
-{
- m68k_setpci(regs, get_long(m68k_areg(regs, 7)));
- m68k_areg(regs, 7) += 4;
-}
-
-STATIC_INLINE void m68k_do_bsr(struct regstruct *regs, uaecptr oldpc, uae_s32 offset)
-{
- m68k_areg(regs, 7) -= 4;
- put_long(m68k_areg(regs, 7), oldpc);
- m68k_incpc(regs, offset);
-}
-STATIC_INLINE void m68k_do_bsri(struct regstruct *regs, uaecptr oldpc, uae_s32 offset)
-{
- m68k_areg(regs, 7) -= 4;
- put_long(m68k_areg(regs, 7), oldpc);
- m68k_incpci(regs, offset);
-}
-
-STATIC_INLINE void m68k_do_jsr(struct regstruct *regs, uaecptr oldpc, uaecptr dest)
-{
- m68k_areg(regs, 7) -= 4;
- put_long(m68k_areg(regs, 7), oldpc);
- m68k_setpc(regs, dest);
-}
-
STATIC_INLINE void m68k_setstopped (struct regstruct *regs, int stop)
{
regs->stopped = stop;
int regno;
char *regname;
};
-extern struct cpum2c m2cregs[];
\ No newline at end of file
+extern struct cpum2c m2cregs[];
int controller;
};
-typedef enum { CP_GENERIC = 1, CP_CDTV, CP_CD32, CP_A500, CP_A500P, CP_A600, CP_A1000,
- CP_A1200, CP_A2000, CP_A3000, CP_A3000T, CP_A4000, CP_A4000T };
+enum { CP_GENERIC = 1, CP_CDTV, CP_CD32, CP_A500, CP_A500P, CP_A600, CP_A1000,
+ CP_A1200, CP_A2000, CP_A3000, CP_A3000T, CP_A4000, CP_A4000T };
struct uae_prefs {
extern void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type);
extern int cfgfile_load (struct uae_prefs *p, const char *filename, int *type, int ignorelink);
-extern int cfgfile_save (struct uae_prefs *, const char *filename, int);
+extern int cfgfile_save (struct uae_prefs *p, const char *filename, int);
extern void cfgfile_parse_line (struct uae_prefs *p, char *, int);
extern int cfgfile_parse_option (struct uae_prefs *p, char *option, char *value, int);
extern int cfgfile_get_description (const char *filename, char *description, char *hostlink, char *hardwarelink, int *type);
extern uae_u32 cfgfile_uaelib_modify (uae_u32 mode, uae_u32 parms, uae_u32 size, uae_u32 out, uae_u32 outsize);
extern uae_u32 cfgfile_modify (uae_u32 index, char *parms, uae_u32 size, char *out, uae_u32 outsize);
extern void cfgfile_addcfgparam (char *);
-extern int build_in_prefs (struct uae_prefs *p, int model, int config, int compa, int romcheck);
-extern int build_in_chipset_prefs (struct uae_prefs *p);
+extern int built_in_prefs (struct uae_prefs *p, int model, int config, int compa, int romcheck);
+extern int built_in_chipset_prefs (struct uae_prefs *p);
extern int cmdlineparser (char *s, char *outp[], int max);
extern int cfgfile_configuration_change(int);
extern void fixup_prefs_dimensions (struct uae_prefs *prefs);
STATIC_INLINE char *raddr(uaecptr p)
{
- return p == 0 ? NULL : (char *)get_real_address(p);
+ return p == 0 ? NULL : (char *)get_real_address (p);
}
extern void gfxlib_install(void);
extern uae_u16 restore_u16_func (uae_u8 **);
extern uae_u8 restore_u8_func (uae_u8 **);
-extern void save_string_func (uae_u8 **, char*);
+extern void save_string_func (uae_u8 **, const char*);
extern char *restore_string_func (uae_u8 **);
#define save_u64(x) save_u64_func (&dst, (x))
* Copyright 1997 Christian Schmitt <schmitt@freiburg.linux.de>
*/
-extern void serial_init(void);
-extern void serial_exit(void);
-extern void serial_dtr_off(void);
+extern void serial_init (void);
+extern void serial_exit (void);
+extern void serial_dtr_off (void);
extern void serial_dtr_on (void);
-extern uae_u16 SERDATR(void);
-extern int SERDATS(void);
-extern void SERPER(uae_u16 w);
-extern void SERDAT(uae_u16 w);
+extern uae_u16 SERDATR (void);
+extern int SERDATS (void);
+extern void SERPER (uae_u16 w);
+extern void SERDAT (uae_u16 w);
-extern uae_u8 serial_writestatus(uae_u8, uae_u8);
+extern uae_u8 serial_writestatus (uae_u8, uae_u8);
extern uae_u8 serial_readstatus (uae_u8);
extern void serial_uartbreak (int);
extern uae_u16 serdat;
extern int doreadser, serstat;
-extern void serial_flush_buffer(void);
+extern void serial_flush_buffer (void);
extern void serial_hsynchandler (void);
extern void serial_check_irq (void);
*/
struct uae_xcmd {
- struct uae_xcmd *prev,*next;
+ struct uae_xcmd *prev, *next;
char *cmd;
};
#define UAEEXE_NOTRUNNING 1
#define UAEEXE_NOMEM 2
-extern void uaeexe_install(void);
-extern int uaeexe(const char *cmd);
+extern void uaeexe_install (void);
+extern int uaeexe (const char *cmd);
zfile_fseek (inprec_zf, 0, SEEK_END);
inprec_size = zfile_ftell (inprec_zf);
zfile_fseek (inprec_zf, 0, SEEK_SET);
- inprec_buffer = inprec_p = (uae_u8*)xmalloc (inprec_size);
+ inprec_buffer = inprec_p = (uae_u8*)xmalloc (inprec_size);
zfile_fread (inprec_buffer, inprec_size, 1, inprec_zf);
inprec_plastptr = inprec_buffer;
id = inprec_pu32();
xfree (inprec_buffer);
inprec_buffer = NULL;
input_recording = 0;
- write_log("inprec finished\n");
+ write_log ("inprec finished\n");
}
-
+
void inprec_ru8(uae_u8 v)
{
*inprec_p++= v;
}
void inprec_rstart(uae_u8 type)
{
- write_log("INPREC: %08.8X: %d\n", hsync_counter, type);
+ write_log ("INPREC: %08.8X: %d\n", hsync_counter, type);
inprec_ru32(hsync_counter);
inprec_ru8(0);
inprec_plast = inprec_p;
for (;;) {
uae_u32 hc2 = (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3];
if (p > lastp) {
- write_log("INPREC: Next %08.8x (%08.8x=%d): %d (%d)\n", hc2, hc, hc2 - hc, p[5 + 1], p[5]);
+ write_log ("INPREC: Next %08.8x (%08.8x=%d): %d (%d)\n", hc2, hc, hc2 - hc, p[5 + 1], p[5]);
lastp = p;
}
hc2_orig = hc2;
hc2 /= inprec_div;
hc2 *= inprec_div;
if (hc > hc2) {
- write_log("INPREC: %08.8x > %08.8x: %d (%d) missed!\n", hc, hc2, p[5 + 1], p[5]);
+ write_log ("INPREC: %08.8x > %08.8x: %d (%d) missed!\n", hc, hc2, p[5 + 1], p[5]);
inprec_close();
return 0;
}
if (hc2 != hc) {
- lastp = p;
+ lastp = p;
break;
}
if (p[5 + 1] == type) {
- write_log("INPREC: %08.8x: %d (%d) (%+d)\n", hc, type, p[5], hc_orig - hc2_orig);
+ write_log ("INPREC: %08.8x: %d (%d) (%+d)\n", hc, type, p[5], hc_orig - hc2_orig);
inprec_plast = p;
inprec_plastptr = p + 5 + 2;
return 1;
}
}
-static int getnum (char **pp)
+static int getnum (const char **pp)
{
- char *p = *pp;
+ const char *p = *pp;
int v = atol (p);
while (*p != 0 && *p !='.' && *p != ',') p++;
*pp = p;
return v;
}
-static char *getstring (char **pp)
+static char *getstring (const char **pp)
{
int i;
static char str[1000];
- char *p = *pp;
+ const char *p = *pp;
if (*p == 0)
return 0;
i = 0;
- while (*p != 0 && *p !='.' && *p != ',') str[i++] = *p++;
- if (*p == '.' || *p == ',') p++;
+ while (*p != 0 && *p !='.' && *p != ',')
+ str[i++] = *p++;
+ if (*p == '.' || *p == ',')
+ p++;
str[i] = 0;
*pp = p;
return str;
static uaecptr get_intuitionbase(void)
{
- uaecptr v = get_long(4);
+ uaecptr v = get_long (4);
addrbank *b = &get_mem_bank(v);
if (!b || !b->check(v, 400) || b->flags != ABFLAG_RAM)
return 0;
v += 378; // liblist
- while (v = get_long(v)) {
+ while (v = get_long (v)) {
uae_u32 v2;
uae_u8 *p;
b = &get_mem_bank(v);
magicmouse_ibase = 0xffffffff;
return 0;
}
- v2 = get_long(v + 10); // name
+ v2 = get_long (v + 10); // name
b = &get_mem_bank(v2);
if (!b || !b->check (v2, 20)) {
magicmouse_ibase = 0xffffffff;
p[1] = mousexpos;
p[2] = mouseypos >> 8;
p[3] = mouseypos;
- //write_log("%dx%d\n", mousexpos, mouseypos);
+ //write_log ("%dx%d\n", mousexpos, mouseypos);
}
static int mouseedge_x, mouseedge_y, mouseedge_time;
ib = magicmouse_ibase;
if (!ib)
return;
- x = get_word(ib + 70);
- y = get_word(ib + 68);
+ x = get_word (ib + 70);
+ y = get_word (ib + 68);
if (x || y)
isnonzero = 1;
- //write_log("%x x %d\n", x, y);
+ //write_log ("%x x %d\n", x, y);
if (!isnonzero)
return;
if (melast_x == x) {
}
} else {
mouseedge_x = 0;
- melast_x = x;
+ melast_x = x;
}
if (melast_y == y) {
if (mouseedge_y < -MOUSEEDGE_RANGE) {
}
} else {
mouseedge_y = 0;
- melast_y = y;
+ melast_y = y;
}
return;
if (!picasso_on) {
drawing_adjust_mousepos(&x, &y);
}
- //write_log("%d\n", dir);
+ //write_log ("%d\n", dir);
if (!dmaen(DMA_SPRITE))
setmouseactivexy(x, y, 0);
else
uae_u16 v = 0;
if (inputdevice_logging & 2)
- write_log("JOY%dDAT %x\n", joy, m68k_getpc(®s));
+ write_log ("JOY%dDAT %x\n", joy, m68k_getpc (®s));
readinput ();
if (joydir[joy] & DIR_LEFT)
left = 1;
}
}
if (inputdevice_logging & 4)
- write_log("BFE001: %02.2X:%02.2X %x\n", dra, but, M68K_GETPC);
+ write_log ("BFE001: %02.2X:%02.2X %x\n", dra, but, M68K_GETPC);
return but;
}
write_log ("POTGOR %04.4X %s\n", v, debuginfo(0));
#endif
if (inputdevice_logging & 16)
- write_log("POTGO_R: %04.4X %d %p\n", v, cd32_shifter[1], M68K_GETPC);
+ write_log ("POTGO_R: %04.4X %d %p\n", v, cd32_shifter[1], M68K_GETPC);
return v;
}
static uae_u8 keybuf[256];
static int inputcode_pending, inputcode_pending_state;
- void inputdevice_release_all_keys (void)
- {
- int i;
-
- for (i = 0; i < 0x80; i++) {
- if (keybuf[i] != 0) {
- keybuf[i] = 0;
- record_key (i << 1|1);
- }
- }
- }
-
+void inputdevice_release_all_keys (void)
+{
+ int i;
+
+ for (i = 0; i < 0x80; i++) {
+ if (keybuf[i] != 0) {
+ keybuf[i] = 0;
+ record_key (i << 1|1);
+ }
+ }
+}
+
void inputdevice_add_inputcode (int code, int state)
{
}
record_key ((uae_u8)((key << 1) | (key >> 7)));
if (inputdevice_logging & 1)
- write_log("Amiga key %02.2X %d\n", key & 0x7f, key >> 7);
+ write_log ("Amiga key %02.2X %d\n", key & 0x7f, key >> 7);
return;
}
inputdevice_add_inputcode (code, state);
case AKS_DECREASEREFRESHRATE:
case AKS_INCREASEREFRESHRATE:
{
- int dir = code == AKS_INCREASEREFRESHRATE ? 5 : -5;
- if (currprefs.chipset_refreshrate == 0)
+ int dir = code == AKS_INCREASEREFRESHRATE ? 5 : -5;
+ if (currprefs.chipset_refreshrate == 0)
currprefs.chipset_refreshrate = currprefs.ntscmode ? 60 : 50;
changed_prefs.chipset_refreshrate = currprefs.chipset_refreshrate + dir;
if (changed_prefs.chipset_refreshrate < 10)
case AKS_DISKSWAPPER_INSERT1:
case AKS_DISKSWAPPER_INSERT2:
case AKS_DISKSWAPPER_INSERT3:
- strcpy (changed_prefs.df[code - AKS_DISKSWAPPER_INSERT0], currprefs.dfxlist[swapperslot]);
+ strcpy (changed_prefs.df[code - AKS_DISKSWAPPER_INSERT0], currprefs.dfxlist[swapperslot]);
break;
break;
return 0;
p = buf = my_strdup (custom);
while (p && *p) {
- char *p2;
+ char *p2;
if (*p != '\"')
break;
p++;
*p2++ = 0;
nextp = p2 + 1;
while (*nextp == ' ')
- nextp++;
+ nextp++;
}
- write_log("'%s'\n", p);
+ write_log ("'%s'\n", p);
cfgfile_parse_line (&changed_prefs, p, 0);
p = nextp;
}
return 0;
ie = &events[nr];
if (inputdevice_logging & 1)
- write_log("'%s' %d %d\n", ie->name, state, max);
+ write_log ("'%s' %d %d\n", ie->name, state, max);
if (autofire) {
if (state)
queue_input_event (nr, state, max, currprefs.input_autofire_framecnt, 1);
char *custom;
if (state < 0) {
- idx = 0;
- custompos = 0;
+ idx = 0;
+ custompos = 0;
} else {
- idx = state > 0 ? 0 : 1;
- if (custompos)
+ idx = state > 0 ? 0 : 1;
+ if (custompos)
idx += 2;
if (state == 0)
custompos ^= 1;
}
custom = id->custom[offset][idx];
if (custom == NULL) {
- if (idx >= 2)
+ if (idx >= 2)
custom = id->custom[offset][idx - 2];
}
handle_custom_event (custom);
static void scanevents(struct uae_prefs *p)
{
int i, j, k, ei;
- struct inputevent *e;
+ const struct inputevent *e;
int n_joy = idev[IDTYPE_JOYSTICK].get_num();
int n_mouse = idev[IDTYPE_MOUSE].get_num();
#endif
int compatibility_device[2];
+
static void compatibility_mode (struct uae_prefs *prefs)
{
int joy, i;
#endif
if (mousehack_allowed())
- mousehack_enable();
+ mousehack_enable();
}
static void set_kbr_default (struct uae_prefs *p, int index, int num)
inprec_close ();
}
-static struct uae_input_device *get_uid (struct inputdevice_functions *id, int devnum)
+static struct uae_input_device *get_uid (const struct inputdevice_functions *id, int devnum)
{
struct uae_input_device *uid = 0;
if (id == &idev[IDTYPE_JOYSTICK]) {
return uid;
}
-static int get_event_data (struct inputdevice_functions *id, int devnum, int num, int *eventid, char **custom, int *flags, int sub)
+static int get_event_data (const struct inputdevice_functions *id, int devnum, int num, int *eventid, char **custom, int *flags, int sub)
{
- struct uae_input_device *uid = get_uid (id, devnum);
+ const struct uae_input_device *uid = get_uid (id, devnum);
int type = id->get_widget_type (devnum, num, 0, 0);
int i;
if (type == IDEV_WIDGET_BUTTON) {
return -1;
}
-static int put_event_data (struct inputdevice_functions *id, int devnum, int num, int eventid, char *custom, int flags, int sub)
+static int put_event_data (const struct inputdevice_functions *id, int devnum, int num, int eventid, char *custom, int flags, int sub)
{
struct uae_input_device *uid = get_uid (id, devnum);
int type = id->get_widget_type (devnum, num, 0, 0);
return -1;
}
-static int is_event_used (struct inputdevice_functions *id, int devnum, int isnum, int isevent)
+static int is_event_used (const struct inputdevice_functions *id, int devnum, int isnum, int isevent)
{
struct uae_input_device *uid = get_uid (id, devnum);
int num, evt, flag, sub;
/* returns state (enabled/disabled) */
int inputdevice_get_device_status (int devnum)
{
- struct inputdevice_functions *idf = getidf (devnum);
+ const struct inputdevice_functions *idf = getidf (devnum);
struct uae_input_device *uid = get_uid (idf, inputdevice_get_device_index (devnum));
return uid->enabled;
}
/* set state (enabled/disabled) */
void inputdevice_set_device_status (int devnum, int enabled)
{
- struct inputdevice_functions *idf = getidf (devnum);
+ const struct inputdevice_functions *idf = getidf (devnum);
struct uae_input_device *uid = get_uid (idf, inputdevice_get_device_index (devnum));
uid->enabled = enabled;
}
/* returns number of axis/buttons and keys from selected device */
int inputdevice_get_widget_num (int devnum)
{
- struct inputdevice_functions *idf = getidf (devnum);
+ const struct inputdevice_functions *idf = getidf (devnum);
return idf->get_widget_num (inputdevice_get_device_index (devnum));
}
-static void get_ename (struct inputevent *ie, char *out)
+static void get_ename (const struct inputevent *ie, char *out)
{
if (!out)
return;
int inputdevice_iterate (int devnum, int num, char *name, int *af)
{
- struct inputdevice_functions *idf = getidf (devnum);
+ const struct inputdevice_functions *idf = getidf (devnum);
static int id_iterator;
struct inputevent *ie;
int mask, data, flags, type;
int inputdevice_get_mapped_name (int devnum, int num, int *pflags, char *name, char *custom, int sub)
{
- struct inputdevice_functions *idf = getidf (devnum);
- struct uae_input_device *uid = get_uid (idf, inputdevice_get_device_index (devnum));
+ const struct inputdevice_functions *idf = getidf (devnum);
+ const struct uae_input_device *uid = get_uid (idf, inputdevice_get_device_index (devnum));
int flags = 0, flag, data;
int devindex = inputdevice_get_device_index (devnum);
char *customp = NULL;
int inputdevice_set_mapping (int devnum, int num, char *name, char *custom, int af, int sub)
{
- struct inputdevice_functions *idf = getidf (devnum);
- struct uae_input_device *uid = get_uid (idf, inputdevice_get_device_index (devnum));
+ const struct inputdevice_functions *idf = getidf (devnum);
+ const struct uae_input_device *uid = get_uid (idf, inputdevice_get_device_index (devnum));
int eid, data, flag, amask;
char ename[256];
int devindex = inputdevice_get_device_index (devnum);
int inputdevice_get_widget_type (int devnum, int num, char *name)
{
- struct inputdevice_functions *idf = getidf (devnum);
+ const struct inputdevice_functions *idf = getidf (devnum);
return idf->get_widget_type (inputdevice_get_device_index (devnum), num, name, 0);
}
return v;
}
-void inputdevice_copyconfig (struct uae_prefs *src, struct uae_prefs *dst)
+void inputdevice_copyconfig (const struct uae_prefs *src, struct uae_prefs *dst)
{
int i, j;
void inputdevice_swap_ports (struct uae_prefs *p, int devnum)
{
- struct inputdevice_functions *idf = getidf (devnum);
+ const struct inputdevice_functions *idf = getidf (devnum);
struct uae_input_device *uid = get_uid (idf, inputdevice_get_device_index (devnum));
int i, j, k, event, unit;
- struct inputevent *ie, *ie2;
+ const struct inputevent *ie, *ie2;
for (i = 0; i < MAX_INPUT_DEVICE_EVENTS; i++) {
for (j = 0; j < MAX_INPUT_SUB_EVENT; j++) {
static int ignoreoldinput(int joy)
{
if (currprefs.input_selected_setting == 0) {
- if (jsem_isjoy (0, &currprefs) != joy && jsem_isjoy (1, &currprefs) != joy)
+ if (jsem_isjoy (0, &currprefs) != joy && jsem_isjoy (1, &currprefs) != joy)
return 1;
}
return 0;
pause_emulation = mode;
}
-int jsem_isjoy (int port, struct uae_prefs *p)
+int jsem_isjoy (int port, const struct uae_prefs *p)
{
int v = JSEM_DECODEVAL (port, p);
if (v < JSEM_JOYS)
return -1;
return v;
}
-int jsem_ismouse (int port, struct uae_prefs *p)
+
+int jsem_ismouse (int port, const struct uae_prefs *p)
{
int v = JSEM_DECODEVAL (port, p);
if (v < JSEM_MICE)
return -1;
return v;
}
-int jsem_iskbdjoy (int port, struct uae_prefs *p)
+
+int jsem_iskbdjoy (int port, const struct uae_prefs *p)
{
int v = JSEM_DECODEVAL (port, p);
if (v < JSEM_KBDLAYOUT)
return -1;
return v;
}
-
-extern int jsem_ismouse (int v, struct uae_prefs*);
-extern int jsem_iskbd (int v, struct uae_prefs*);
void joystick_setting_changed (void)
{
fs_np = fs_ck = fs_se = 0;
-#ifdef ARCADIA
+#ifdef ARCADIA
fs_xa1 = fs_xa2 = 0;
#endif
else if (JSEM_ISSOMEWHEREELSE (1, &currprefs))
fs_se = fakestate[1];
-#ifdef ARCADIA
+#ifdef ARCADIA
if (JSEM_ISXARCADE1 (0, &currprefs))
fs_xa1 = fakestate[0];
else if (JSEM_ISXARCADE1 (1, &currprefs))
else if (JSEM_ISXARCADE2 (1, &currprefs))
fs_xa2 = fakestate[1];
#endif
- }
+}
void keybuf_init (void)
{
char optionsfile[256];
-int uaerand(void)
+int uaerand (void)
{
- return rand();
+ return rand ();
}
/* If you want to pipe printer output to a file, put something like
* "cat >>printerfile.tmp" above.
void fixup_prefs_dimensions (struct uae_prefs *prefs)
{
- fixup_prefs_dim2(&prefs->gfx_size_fs);
- fixup_prefs_dim2(&prefs->gfx_size_win);
+ fixup_prefs_dim2 (&prefs->gfx_size_fs);
+ fixup_prefs_dim2 (&prefs->gfx_size_win);
}
-void fixup_cpu(struct uae_prefs *p)
+void fixup_cpu (struct uae_prefs *p)
{
- switch(p->cpu_model)
+ switch (p->cpu_model)
{
- case 68000:
+ case 68000:
p->address_space_24 = 1;
p->fpu_model = 0;
- break;
- case 68010:
+ break;
+ case 68010:
p->address_space_24 = 1;
p->fpu_model = 0;
break;
- case 68020:
+ case 68020:
break;
- case 68030:
+ case 68030:
p->address_space_24 = 0;
break;
- case 68040:
+ case 68040:
p->address_space_24 = 0;
if (p->fpu_model)
p->fpu_model = 68040;
break;
- case 68060:
+ case 68060:
p->address_space_24 = 0;
if (p->fpu_model)
p->fpu_model = 68060;
{
int err = 0;
- build_in_chipset_prefs (p);
- fixup_cpu(p);
+ built_in_chipset_prefs (p);
+ fixup_cpu (p);
if ((p->chipmem_size & (p->chipmem_size - 1)) != 0
|| p->chipmem_size < 0x40000
p->gfxmem_size = 0;
err = 1;
}
-#if !defined(BSDSOCKET)
+#if !defined (BSDSOCKET)
if (p->socket_emu) {
write_log ("Compile-time option of BSDSOCKET_SUPPORTED was not enabled. You can't use bsd-socket emulation.\n");
p->socket_emu = 0;
p->cpu_compatible = 1;
p->address_space_24 = 1;
#endif
-#if !defined(CPUEMU_11) && !defined (CPUEMU_12)
+#if !defined (CPUEMU_11) && !defined (CPUEMU_12)
p->cpu_compatible = 0;
p->address_space_24 = 0;
#endif
#if !defined (UAESERIAL)
p->uaeserial = 0;
#endif
-#if defined(CPUEMU_12)
+#if defined (CPUEMU_12)
if (p->cpu_cycle_exact)
p->gfx_framerate = 1;
#endif
void uae_quit (void)
{
- deactivate_debugger();
+ deactivate_debugger ();
if (quit_program != -1)
quit_program = -1;
}
int num = 0;
p1 = tmp;
- for(;;) {
+ for (;;) {
p2 = strtok (p1, delim);
if (!p2)
break;
if (i + 1 == argc) {
write_log ("Missing argument for '-f' option.\n");
} else {
- currprefs.mountitems = 0;
+ currprefs.mountitems = 0;
target_cfgfile_load (&currprefs, argv[++i], -1, 1);
}
} else if (strcmp (argv[i], "-s") == 0) {
filesys_reset ();
#endif
memory_reset ();
-#if defined(BSDSOCKET)
+#if defined (BSDSOCKET)
bsdlib_reset ();
#endif
#ifdef FILESYS
/* Okay, this stuff looks strange, but it is here to encourage people who
* port UAE to re-use as much of this code as possible. Functions that you
- * should be using are do_start_program() and do_leave_program(), as well
- * as real_main(). Some OSes don't call main() (which is braindamaged IMHO,
- * but unfortunately very common), so you need to call real_main() from
+ * should be using are do_start_program () and do_leave_program (), as well
+ * as real_main (). Some OSes don't call main () (which is braindamaged IMHO,
+ * but unfortunately very common), so you need to call real_main () from
* whatever entry point you have. You may want to write your own versions
- * of start_program() and leave_program() if you need to do anything special.
+ * of start_program () and leave_program () if you need to do anything special.
* Add #ifdefs around these as appropriate.
*/
#ifdef FILESYS
filesys_cleanup ();
#endif
- device_func_reset();
+ device_func_reset ();
savestate_free ();
memory_cleanup ();
cfgfile_addcfgparam (0);
static void real_main2 (int argc, char **argv)
{
-#if defined (JIT) && (defined( _WIN32 ) || defined(_WIN64)) && !defined( NO_WIN32_EXCEPTION_HANDLER )
+#if defined (JIT) && (defined ( _WIN32 ) || defined (_WIN64)) && !defined ( NO_WIN32_EXCEPTION_HANDLER )
extern int EvalException ( LPEXCEPTION_POINTERS blah, int n_except );
__try
#endif
}
#ifdef NATMEM_OFFSET
- init_shm();
+ init_shm ();
#endif
#ifdef FILESYS
write_log ("Sound driver unavailable: Sound output disabled\n");
currprefs.produce_sound = 0;
}
- inputdevice_init();
+ inputdevice_init ();
changed_prefs = currprefs;
no_gui = ! currprefs.start_gui;
canbang = 0;
#endif
- logging_init(); /* Yes, we call this twice - the first case handles when the user has loaded
+ logging_init (); /* Yes, we call this twice - the first case handles when the user has loaded
a config using the cmd-line. This case handles loads through the GUI. */
fixup_prefs (&currprefs);
changed_prefs = currprefs;
#ifdef AUTOCONFIG
gfxlib_install ();
-#if defined(BSDSOCKET)
+#if defined (BSDSOCKET)
bsdlib_install ();
#endif
emulib_install ();
DISK_init ();
reset_frame_rate_hack ();
- init_m68k(); /* must come after reset_frame_rate_hack (); */
+ init_m68k (); /* must come after reset_frame_rate_hack (); */
gui_update ();
}
}
-#if defined (JIT) && (defined( _WIN32 ) || defined(_WIN64)) && !defined(NO_WIN32_EXCEPTION_HANDLER)
- __except(EvalException(GetExceptionInformation(), GetExceptionCode()))
+#if defined (JIT) && (defined ( _WIN32 ) || defined (_WIN64)) && !defined (NO_WIN32_EXCEPTION_HANDLER)
+ __except (EvalException (GetExceptionInformation (), GetExceptionCode ()))
{
// EvalException does the good stuff...
}
static size_t bootrom_filepos, chip_filepos, bogo_filepos, rom_filepos, a3000lmem_filepos, a3000hmem_filepos;
+/* Set if we notice during initialization that settings changed,
+ and we must clear all memory to prevent bogus contents from confusing
+ the Kickstart. */
+static int need_hardreset;
+
+/* The address space setting used during the last reset. */
+static int last_address_space_24;
+
static struct romlist *rl;
static int romlist_cnt;
struct romlist **rdout, *rltmp;
void *buf;
static struct romlist rlstatic;
-
+
for (i = 0; roms[i].name; i++);
if (all)
max = i;
rltmp = (struct romlist*)((uae_u8*)buf + (i + 1) * sizeof (struct romlist*));
out = 0;
for (i = 0; i < max; i++) {
- ok = 0;
+ ok = 0;
if (!all)
rd = rl[i].rd;
else
uae_u8 *key;
for (i = ROM_KEY_NUM - 1; i >= 0; i--) {
- keysize = keyring[i].size;
+ keysize = keyring[i].size;
key = keyring[i].key;
if (!key)
continue;
keybuf = target_load_keyfile(p, path, &keysize, tmp);
addkey(&keyid, keybuf, keysize, tmp);
for (i = 0; keyids[i] >= 0 && keyid < ROM_KEY_NUM; i++) {
- struct romdata *rd = getromdatabyid (keyids[i]);
+ struct romdata *rd = getromdatabyid (keyids[i]);
char *s;
if (rd) {
s = romlist_get (rd);
}
}
}
-
+
cnt = 0;
for (;;) {
- keybuf = NULL;
+ keybuf = NULL;
keysize = 0;
tmp[0] = 0;
switch (cnt)
struct romlist *getromlistbyromdata(struct romdata *rd)
{
int ids[2];
-
+
ids[0] = rd->id;
ids[1] = 0;
return getromlistbyids(ids);
struct romdata *rd = getromdatabyid (ids[i]);
getromname (rd, tmp1);
strcat (tmp2, "- ");
- strcat (tmp2, tmp1);
- strcat (tmp2, "\n");
+ strcat (tmp2, tmp1);
+ strcat (tmp2, "\n");
if (rd->type & (ROMTYPE_A2091BOOT | ROMTYPE_A4091BOOT))
exp++;
- i++;
+ i++;
}
translate_message (exp ? NUMSG_EXPROMNEED : NUMSG_ROMNEED, tmp3);
gui_message (tmp3, tmp2);
{
addrbank *ab = &get_mem_bank(addr);
if (ab == 0 || !(ab->flags & ABFLAG_RAM) || addr < 0x100 || len < 0 || len > 16777215 || !valid_address(addr, len)) {
- write_log("corrupt %s pointer %x (%d) detected!\n", txt, addr, len);
+ write_log ("corrupt %s pointer %x (%d) detected!\n", txt, addr, len);
return 0;
}
return 1;
if (be_cnt < 3) {
int i, j;
uaecptr a2 = a - 32;
- uaecptr a3 = m68k_getpc(®s) - 32;
+ uaecptr a3 = m68k_getpc (®s) - 32;
write_log ("Your Amiga program just did something terribly stupid %08.8X PC=%08.8X\n", a, M68K_GETPC);
m68k_dumpstate (0, 0);
for (i = 0; i < 10; i++) {
map_banks(&extendedkickmem_bank, 0xf0, 1, 1);
f0 = 1;
} else {
- write_log("A3000 Bonus hack: can't map bonus when uae boot rom is enabled\n");
+ write_log ("A3000 Bonus hack: can't map bonus when uae boot rom is enabled\n");
}
}
} else {
{
int patched = 0;
if (kickmem_size >= 524288 && currprefs.kickshifter)
- patched += patch_shapeshifter (kickmemory);
+ patched += patch_shapeshifter (kickmemory);
patched += patch_residents (kickmemory, kickmem_size);
if (extendedkickmemory) {
patched += patch_residents (extendedkickmemory, extendedkickmem_size);
kickstart_fix_checksum (extendedkickmemory, extendedkickmem_size);
}
if (patched)
- kickstart_fix_checksum (kickmemory, kickmem_size);
+ kickstart_fix_checksum (kickmemory, kickmem_size);
}
static int load_kickstart (void)
size = read_kickstart (f, kickmemory, maxsize, 1, &cloanto_rom);
if (size == 0)
goto err;
- kickmem_mask = size - 1;
+ kickmem_mask = size - 1;
kickmem_size = size;
if (filesize >= 524288 * 2 && !extendedkickmem_type) {
extendedkickmem_size = 0x80000;
write_log ("Fatal error: out of memory for chipmem.\n");
allocated_chipmem = 0;
} else {
- memory_hardreset();
+ need_hardreset = 1;
if (memsize != allocated_chipmem)
memset (chipmemory + allocated_chipmem, 0xff, memsize - allocated_chipmem);
}
currprefs.chipset_mask = changed_prefs.chipset_mask;
chipmem_full_mask = allocated_chipmem - 1;
if ((currprefs.chipset_mask & CSMASK_ECS_AGNUS) && allocated_chipmem < 0x100000)
- chipmem_full_mask = 0x100000 - 1;
+ chipmem_full_mask = 0x100000 - 1;
if (allocated_bogomem != currprefs.bogomem_size) {
if (bogomemory)
allocated_bogomem = 0;
}
}
- memory_hardreset();
+ need_hardreset = 1;
}
if (allocated_a3000lmem != currprefs.mbresmem_low_size) {
if (a3000lmemory)
allocated_a3000lmem = 0;
}
}
- memory_hardreset();
+ need_hardreset = 1;
}
if (allocated_a3000hmem != currprefs.mbresmem_high_size) {
if (a3000hmemory)
allocated_a3000hmem = 0;
}
}
- memory_hardreset();
+ need_hardreset = 1;
}
if (allocated_cardmem != currprefs.cs_cdtvcard * 1024) {
if (cardmemory)
else
map_banks (&kickmem_bank, 0, i, 0x80000);
if (savestate_state != STATE_RESTORE && savestate_state != STATE_REWIND)
- m68k_setpc(®s, m68k_getpc(®s));
+ m68k_setpc (®s, m68k_getpc (®s));
}
void memory_reset (void)
{
- int bnk;
+ int bnk, bnk_end;
be_cnt = 0;
currprefs.chipmem_size = changed_prefs.chipmem_size;
currprefs.cs_cdtvram = changed_prefs.cs_cdtvram;
currprefs.cs_cdtvcard = changed_prefs.cs_cdtvcard;
currprefs.cs_a1000ram = changed_prefs.cs_a1000ram;
+ currprefs.cs_ide = changed_prefs.cs_ide;
+ currprefs.cs_fatgaryrev = changed_prefs.cs_fatgaryrev;
+ currprefs.cs_ramseyrev = changed_prefs.cs_ramseyrev;
+
+ need_hardreset = 0;
+ /* Use changed_prefs, as m68k_reset is called later. */
+ if (last_address_space_24 != changed_prefs.address_space_24)
+ need_hardreset = 1;
+
+ last_address_space_24 = changed_prefs.address_space_24;
init_mem_banks ();
allocate_memory ();
xfree (a1000_bootrom);
a1000_bootrom = 0;
a1000_kickstart_mode = 0;
+
memcpy (currprefs.romfile, changed_prefs.romfile, sizeof currprefs.romfile);
memcpy (currprefs.romextfile, changed_prefs.romextfile, sizeof currprefs.romextfile);
- if (savestate_state != STATE_RESTORE)
- memory_hardreset();
+ need_hardreset = 1;
mapped_free (extendedkickmemory);
extendedkickmemory = 0;
extendedkickmem_size = 0;
}
if (rd->cloanto)
cloanto_rom = 1;
- if ((rd->cpu & 4) && currprefs.cs_compatible) { /* A4000 ROM = need ramsey, gary and ide */
- if (currprefs.cs_ramseyrev < 0)
+ if ((rd->cpu & 4) && currprefs.cs_compatible) {
+ /* A4000 ROM = need ramsey, gary and ide */
+ if (currprefs.cs_ramseyrev < 0)
changed_prefs.cs_ramseyrev = currprefs.cs_ramseyrev = 0x0f;
changed_prefs.cs_fatgaryrev = currprefs.cs_fatgaryrev = 0;
if (currprefs.cs_ide != 2)
map_banks (&custom_bank, 0xC0, 0xE0 - 0xC0, 0);
map_banks (&cia_bank, 0xA0, 32, 0);
if (!currprefs.cs_a1000ram)
- map_banks (&dummy_bank, 0xD8, 6, 0); /* D80000 - DDFFFF not mapped (A1000 = custom chips) */
+ /* D80000 - DDFFFF not mapped (A1000 = custom chips) */
+ map_banks (&dummy_bank, 0xD8, 6, 0);
/* map "nothing" to 0x200000 - 0x9FFFFF (0xBEFFFF if PCMCIA or AGA) */
bnk = allocated_chipmem >> 16;
if (bnk < 0x20 + (currprefs.fastmem_size >> 16))
bnk = 0x20 + (currprefs.fastmem_size >> 16);
- map_banks (&dummy_bank, bnk, (((currprefs.chipset_mask & CSMASK_AGA) || currprefs.cs_pcmcia) ? 0xBF : 0xA0) - bnk, 0);
+ bnk_end = (((currprefs.chipset_mask & CSMASK_AGA) || currprefs.cs_pcmcia) ? 0xBF : 0xA0);
+ map_banks (&dummy_bank, bnk, bnk_end - bnk, 0);
if (currprefs.chipset_mask & CSMASK_AGA)
map_banks (&dummy_bank, 0xc0, 0xd8 - 0xc0, 0);
map_banks (&bogomem_bank, 0xC0, t, 0);
}
if (currprefs.cs_ide) {
- if(currprefs.cs_ide == 1) {
+ if (currprefs.cs_ide == 1) {
map_banks (&gayle_bank, 0xD8, 6, 0);
map_banks (&gayle2_bank, 0xDD, 2, 0);
// map_banks (&gayle_attr_bank, 0xA0, 8, 0); only if PCMCIA card inserted */
}
if (currprefs.cs_rtc)
map_banks (&clock_bank, 0xDC, 1, 0);
- if (currprefs.cs_fatgaryrev >= 0|| currprefs.cs_ramseyrev >= 0)
+ if (currprefs.cs_fatgaryrev >= 0 || currprefs.cs_ramseyrev >= 0)
map_banks (&mbres_bank, 0xDE, 1, 0);
if (currprefs.cs_cd32c2p || currprefs.cs_cd32cd || currprefs.cs_cd32nvram)
map_banks (&akiko_bank, AKIKO_BASE >> 16, 1, 0);
if (currprefs.cs_mbdmac == 1)
- a3000scsi_reset();
+ a3000scsi_reset ();
if (a3000lmemory != 0)
- map_banks (&a3000lmem_bank, a3000lmem_start >> 16, allocated_a3000lmem >> 16, 0);
+ map_banks (&a3000lmem_bank, a3000lmem_start >> 16, allocated_a3000lmem >> 16, 0);
if (a3000hmemory != 0)
- map_banks (&a3000hmem_bank, a3000hmem_start >> 16, allocated_a3000hmem >> 16, 0);
+ map_banks (&a3000hmem_bank, a3000hmem_start >> 16, allocated_a3000hmem >> 16, 0);
if (cardmemory != 0)
map_banks (&cardmem_bank, cardmem_start >> 16, allocated_cardmem >> 16, 0);
/* Map the chipmem into all of the lower 8MB */
map_overlay (1);
- switch (extendedkickmem_type)
- {
-
+ switch (extendedkickmem_type) {
case EXTENDED_ROM_KS:
map_banks (&extendedkickmem_bank, 0xE0, 8, 0);
break;
break;
#endif
}
-
+
if ((cloanto_rom || currprefs.cs_ksmirror) && !currprefs.maprom && !extendedkickmem_type)
- map_banks (&kickmem_bank, 0xE0, 8, 0);
+ map_banks (&kickmem_bank, 0xE0, 8, 0);
if (currprefs.cs_ksmirror == 2) { /* unexpanded A1200 also maps ROM here.. */
struct romdata *rd = getromdatabypath(currprefs.cartfile);
if (!rd || rd->id != 63) {
memcpy (currprefs.romextfile, changed_prefs.romextfile, sizeof currprefs.romextfile);
if (strcmp (currprefs.cartfile, changed_prefs.cartfile) != 0)
memcpy (currprefs.cartfile, changed_prefs.cartfile, sizeof currprefs.cartfile);
- arcadia_unmap ();
+ arcadia_unmap ();
is_arcadia_rom (currprefs.romextfile);
is_arcadia_rom (currprefs.cartfile);
arcadia_map_banks ();
return;
}
#endif
- if (currprefs.address_space_24)
+ if (last_address_space_24)
endhioffs = 0x10000;
#ifdef ADDRESS_SPACE_24BIT
endhioffs = 0x100;
if (!addr_valid("memcpyah", src, size))
return;
while (size--)
- *dst++ = get_byte(src++);
+ *dst++ = get_byte (src++);
}
void memcpyah (uae_u8 *dst, uaecptr src, int size)
{
while (size--)
- *dst++ = get_byte(src++);
+ *dst++ = get_byte (src++);
}
char *strcpyah_safe (char *dst, uaecptr src)
{
do {
if (!addr_valid("strcpyah", src, 1))
return res;
- b = get_byte(src++);
+ b = get_byte (src++);
*dst++ = b;
} while (b);
return res;
prowizard_search (buf, size);
#ifdef _WIN32
} __except(ExceptionFilter(GetExceptionInformation(), GetExceptionCode())) {
- write_log("prowizard scan crashed\n");
+ write_log ("prowizard scan crashed\n");
}
#endif
if (!got)
return fopen (name, mode);
}
-FILE *moduleripper2_fopen (const char *name, const char *mode, const char *id)
+FILE *moduleripper2_fopen (const char *name, const char *mode, const char *id, int addr, int size)
{
char msg[MAX_DPATH], msg2[MAX_DPATH];
int ret;
return NULL;
got++;
translate_message (NUMSG_MODRIP_SAVE, msg);
- sprintf (msg2, msg, id);
+ sprintf (msg2, msg, id, addr, size);
ret = gui_message_multibutton (2, msg2);
if (ret < 0)
canceled = 1;
uae_sem_wait (&n2asem);
write_comm_pipe_int (&native2amiga_pending, 3, 0);
write_comm_pipe_u32 (&native2amiga_pending, interrupt, 1);
- do_uae_int_requested();
+ do_uae_int_requested ();
uae_sem_post (&n2asem);
}
uae_sem_wait (&n2asem);
write_comm_pipe_int (&native2amiga_pending, 2, 0);
write_comm_pipe_u32 (&native2amiga_pending, msg, 1);
- do_uae_int_requested();
+ do_uae_int_requested ();
uae_sem_post (&n2asem);
}
write_comm_pipe_int (&native2amiga_pending, 1, 0);
write_comm_pipe_u32 (&native2amiga_pending, port, 0);
write_comm_pipe_u32 (&native2amiga_pending, msg, 1);
- do_uae_int_requested();
+ do_uae_int_requested ();
uae_sem_post (&n2asem);
}
write_comm_pipe_int (&native2amiga_pending, 0, 0);
write_comm_pipe_u32 (&native2amiga_pending, task, 0);
write_comm_pipe_int (&native2amiga_pending, mask, 1);
- do_uae_int_requested();
+ do_uae_int_requested ();
uae_sem_post (&n2asem);
}
write_comm_pipe_int (&native2amiga_pending, 4, 0);
write_comm_pipe_int (&native2amiga_pending, port, 0);
write_comm_pipe_int (&native2amiga_pending, nr, 1);
- do_uae_int_requested();
+ do_uae_int_requested ();
uae_sem_post (&n2asem);
}
#define AUTO_ATN 0x02
#define SCNTL1_REG 0x02
#define SLOW_BUS 0x80
-#define ENABLE_SELECT 0x20
+#define ENABLE_SELECT 0x20
#define ASSERT_RST 0x08
#define ASSERT_EVEN_PARITY 0x04
#define SDID_REG 0x01
#define FUNC_COMP_INT 0x40
#define SEL_TIMEOUT_INT 0x20
#define SELECT_INT 0x10
-#define GROSS_ERR_INT 0x08
-#define UX_DISC_INT 0x04
-#define RST_INT 0x02
+#define GROSS_ERR_INT 0x08
+#define UX_DISC_INT 0x04
+#define RST_INT 0x02
#define PAR_ERR_INT 0x01
#define SCID_REG 0x07
#define SXFER_REG 0x06
-#define ASYNC_OPERATION 0x00
-#define SODL_REG 0x05
+#define ASYNC_OPERATION 0x00
+#define SODL_REG 0x05
#define SOCL_REG 0x04
#define SFBR_REG 0x0b
#define SIDL_REG 0x0a
#define SBDL_REG 0x0a
#define SBCL_REG 0x08
-#define SBCL_IO 0x01
+#define SBCL_IO 0x01
#define SYNC_DIV_AS_ASYNC 0x00
#define SYNC_DIV_1_0 0x01
#define SYNC_DIV_1_5 0x02
#define SELECTED 0x10
#define SELECTION_TIMEOUT 0x20
#define FUNCTION_COMPLETE 0x40
-#define PHASE_MISMATCH 0x80
-#define SSTAT1_REG 0x0d
+#define PHASE_MISMATCH 0x80
+#define SSTAT1_REG 0x0d
#define SIDL_REG_FULL 0x80
#define SODR_REG_FULL 0x40
#define SODL_REG_FULL 0x20
-#define SSTAT2_REG 0x0c
+#define SSTAT2_REG 0x0c
#define CTEST0_REG 0x17
#define BTB_TIMER_DISABLE 0x40
#define CTEST1_REG 0x16
#define CTEST2_REG 0x15
#define CTEST3_REG 0x14
#define CTEST4_REG 0x1b
-#define DISABLE_FIFO 0x00
+#define DISABLE_FIFO 0x00
#define SLBE 0x10
#define SFWR 0x08
#define BYTE_LANE0 0x04
#define BYTE_LANE3 0x07
#define SCSI_ZMODE 0x20
#define ZMODE 0x40
-#define CTEST5_REG 0x1a
-#define MASTER_CONTROL 0x10
-#define DMA_DIRECTION 0x08
+#define CTEST5_REG 0x1a
+#define MASTER_CONTROL 0x10
+#define DMA_DIRECTION 0x08
#define CTEST7_REG 0x18
#define BURST_DISABLE 0x80 /* 710 only */
#define SEL_TIMEOUT_DISABLE 0x10 /* 710 only */
-#define DFP 0x08
-#define EVP 0x04
+#define DFP 0x08
+#define EVP 0x04
#define DIFF 0x01
#define CTEST6_REG 0x19
#define TEMP_REG 0x1C
#define DFIFO_REG 0x20
#define FLUSH_DMA_FIFO 0x80
#define CLR_FIFO 0x40
-#define ISTAT_REG 0x22
+#define ISTAT_REG 0x22
#define ABORT_OPERATION 0x80
#define SOFTWARE_RESET_710 0x40
#define DMA_INT_PENDING 0x01
#define DNAD_REG 0x28
#define DIEN_REG 0x3a
#define BUS_FAULT 0x20
-#define ABORT_INT 0x10
-#define INT_INST_INT 0x04
+#define ABORT_INT 0x10
+#define INT_INST_INT 0x04
#define WD_INT 0x02
#define ILGL_INST_INT 0x01
#define DCNTL_REG 0x38
-#define SOFTWARE_RESET 0x01
+#define SOFTWARE_RESET 0x01
#define COMPAT_700_MODE 0x01
#define SCRPTS_16BITS 0x20
#define ASYNC_DIV_2_0 0x00
#define BURST_LENGTH_8 0xC0
#define DMODE_FC1 0x10
#define DMODE_FC2 0x20
-#define BW16 32
-#define MODE_286 16
-#define IO_XFER 8
-#define FIXED_ADDR 4
+#define BW16 32
+#define MODE_286 16
+#define IO_XFER 8
+#define FIXED_ADDR 4
static void INT2(void)
{
if (ncrregs[SIEN_REG] == 0)
return;
INTREQ_f(0x8000 | 0x0008);
- write_log("IRQ\n");
+ write_log ("IRQ\n");
}
static uae_u8 read_rom(uaecptr addr)
{
uae_u8 v = rom[addr];
- //write_log("%08.8X = %02.2X PC=%08X\n", addr, v, M68K_GETPC);
+ //write_log ("%08.8X = %02.2X PC=%08X\n", addr, v, M68K_GETPC);
return v;
}
return;
switch (addr)
{
- case ISTAT_REG:
+ case ISTAT_REG:
if (val & 0x80)
val |= 1;
val &= ~0x80;
INT2();
break;
}
- write_log("%s write %04.4X (%s) = %02.2X PC=%08.8X\n", NCRNAME, addr, regname(addr), v & 0xff, M68K_GETPC);
+ write_log ("%s write %04.4X (%s) = %02.2X PC=%08.8X\n", NCRNAME, addr, regname(addr), v & 0xff, M68K_GETPC);
ncrregs[addr] = val;
}
v &= 0x0f; // revision 0
break;
}
- write_log("%s read %04.4X (%s) = %02.2X PC=%08.8X\n", NCRNAME, addr, regname(addr), v, M68K_GETPC);
+ write_log ("%s read %04.4X (%s) = %02.2X PC=%08.8X\n", NCRNAME, addr, regname(addr), v, M68K_GETPC);
if (v2 != v)
ncrregs[addr] = v2;
return v;
void ncr_reset (void)
{
board_mask = 131072 - 1;
- configured = 0;
+ configured = 0;
if (currprefs.cs_mbdmac == 2) {
board_mask = 65535 - 1;
configured = -1;
rl = getromlistbyids(roms);
if (rl) {
- write_log("A4091 BOOT ROM '%s' %d.%d ", rl->path, rl->rd->ver, rl->rd->rev);
+ write_log ("A4091 BOOT ROM '%s' %d.%d ", rl->path, rl->rd->ver, rl->rd->rev);
z = zfile_fopen(rl->path, "rb");
if (z) {
- write_log("loaded\n");
+ write_log ("loaded\n");
rom = (uae_u8*)xmalloc (ROM_SIZE * 4);
for (i = 0; i < ROM_SIZE; i++) {
uae_u8 b;
- zfile_fread(&b, 1, 1, z);
+ zfile_fread(&b, 1, 1, z);
rom[i * 4 + 0] = b;
rom[i * 4 + 2] = b << 4;
}
zfile_fclose(z);
} else {
- write_log("failed to load\n");
+ write_log ("failed to load\n");
}
} else {
romwarning(roms);
-/*
+ /*
* UAE - The Un*x Amiga Emulator
*
* MC68000 emulation
int gonebad = 0;
#else
/* Need to have these somewhere */
-static void build_comp(void) {}
+static void build_comp (void) {}
void check_prefs_changed_comp (void) {}
#endif
int mmu_enabled, mmu_triggered;
int cpu_cycles;
-const int areg_byteinc[] = { 1,1,1,1,1,1,1,2 };
-const int imm8_table[] = { 8,1,2,3,4,5,6,7 };
+const int areg_byteinc[] = { 1, 1, 1, 1, 1, 1, 1, 2 };
+const int imm8_table[] = { 8, 1, 2, 3, 4, 5, 6, 7 };
int movem_index1[256];
int movem_index2[256];
cpuop_func *cpufunctbl[65536];
-extern uae_u32 get_fpsr(void);
+extern uae_u32 get_fpsr (void);
#define COUNT_INSTRS 0
#define MC68060_PCR 0x04300000
opcodenums[i] = i;
total += instrcount[i];
}
- qsort (opcodenums, 65536, sizeof(uae_u16), compfn);
+ qsort (opcodenums, 65536, sizeof (uae_u16), compfn);
fprintf (f, "Total: %lu\n", total);
for (i=0; i < 65536; i++) {
}
#endif
-static void set_cpu_caches(void)
+static void set_cpu_caches (void)
{
#ifdef JIT
if (currprefs.cpu_model < 68040) {
- set_cache_state(regs.cacr & 1);
+ set_cache_state (regs.cacr & 1);
if (regs.cacr & 0x08) {
regs.cacr &= ~0x08;
- flush_icache(1);
+ flush_icache (1);
}
} else {
- set_cache_state((regs.cacr & 0x8000) ? 1 : 0);
+ set_cache_state ((regs.cacr & 0x8000) ? 1 : 0);
}
#endif
}
STATIC_INLINE void count_instr (unsigned int opcode)
{
}
-
+
static unsigned long REGPARAM3 op_illg_1 (uae_u32 opcode, struct regstruct *regs) REGPARAM;
static unsigned long REGPARAM2 op_illg_1 (uae_u32 opcode, struct regstruct *regs)
case 68010:
lvl = 1;
tbl = op_smalltbl_4_ff;
- break;
+ break;
#endif
#endif
case 68000:
if (table68k[opcode].handler != -1) {
f = cpufunctbl[table68k[opcode].handler];
if (f == op_illg_1)
- abort();
+ abort ();
cpufunctbl[opcode] = f;
opcnt++;
}
while (fscanf (f, "%lx: %lu %s\n", &opcode, &count, name) == 3) {
instrcount[opcode] = count;
}
- fclose(f);
+ fclose (f);
}
}
#endif
currprefs.address_space_24 = 0;
}
if (currprefs.fpu_model > 0)
- write_log("/%d", currprefs.fpu_model);
+ write_log ("/%d", currprefs.fpu_model);
if (currprefs.cpu_cycle_exact) {
if (currprefs.cpu_model == 68000)
write_log (" prefetch and cycle-exact");
static int backup_pointer = 0;
static long int m68kpc_offset;
-#define get_ibyte_1(o) get_byte(regs.pc + (regs.pc_p - regs.pc_oldp) + (o) + 1)
-#define get_iword_1(o) get_word(regs.pc + (regs.pc_p - regs.pc_oldp) + (o))
-#define get_ilong_1(o) get_long(regs.pc + (regs.pc_p - regs.pc_oldp) + (o))
+#define get_ibyte_1(o) get_byte (regs.pc + (regs.pc_p - regs.pc_oldp) + (o) + 1)
+#define get_iword_1(o) get_word (regs.pc + (regs.pc_p - regs.pc_oldp) + (o))
+#define get_ilong_1(o) get_long (regs.pc + (regs.pc_p - regs.pc_oldp) + (o))
static uae_s32 ShowEA (void *f, uae_u16 opcode, int reg, amodes mode, wordsizes size, char *buf, uae_u32 *eaddr, int safemode)
{
switch (mode){
case Dreg:
- sprintf (buffer,"D%d", reg);
+ sprintf (buffer, "D%d", reg);
break;
case Areg:
- sprintf (buffer,"A%d", reg);
+ sprintf (buffer, "A%d", reg);
break;
case Aind:
- sprintf (buffer,"(A%d)", reg);
+ sprintf (buffer, "(A%d)", reg);
addr = regs.regs[reg + 8];
break;
case Aipi:
- sprintf (buffer,"(A%d)+", reg);
+ sprintf (buffer, "(A%d)+", reg);
addr = regs.regs[reg + 8];
break;
case Apdi:
- sprintf (buffer,"-(A%d)", reg);
+ sprintf (buffer, "-(A%d)", reg);
addr = regs.regs[reg + 8];
break;
case Ad16:
sprintf (offtxt, "-$%04x", -disp16);
else
sprintf (offtxt, "$%04x", disp16);
- addr = m68k_areg(®s,reg) + disp16;
- sprintf (buffer,"(A%d,%s) == $%08lx", reg, offtxt, (unsigned long)addr);
+ addr = m68k_areg (®s, reg) + disp16;
+ sprintf (buffer, "(A%d, %s) == $%08lx", reg, offtxt, (unsigned long)addr);
}
break;
case Ad8r:
dp = get_iword_1 (m68kpc_offset); m68kpc_offset += 2;
disp8 = dp & 0xFF;
r = (dp & 0x7000) >> 12;
- dispreg = dp & 0x8000 ? m68k_areg(®s,r) : m68k_dreg(®s,r);
+ dispreg = dp & 0x8000 ? m68k_areg (®s, r) : m68k_dreg (®s, r);
if (!(dp & 0x800)) dispreg = (uae_s32)(uae_s16)(dispreg);
dispreg <<= (dp >> 9) & 3;
if (dp & 0x100) {
uae_s32 outer = 0, disp = 0;
- uae_s32 base = m68k_areg(®s,reg);
+ uae_s32 base = m68k_areg (®s, reg);
char name[10];
- sprintf (name,"A%d, ",reg);
+ sprintf (name, "A%d, ", reg);
if (dp & 0x80) { base = 0; name[0] = 0; }
if (dp & 0x40) dispreg = 0;
if ((dp & 0x30) == 0x20) { disp = (uae_s32)(uae_s16)get_iword_1 (m68kpc_offset); m68kpc_offset += 2; }
if (dp & 4) base += dispreg;
addr = base + outer;
- sprintf (buffer,"(%s%c%d.%c*%d+%ld)+%ld == $%08lx", name,
+ sprintf (buffer, "(%s%c%d.%c*%d+%ld)+%ld == $%08lx", name,
dp & 0x8000 ? 'A' : 'D', (int)r, dp & 0x800 ? 'L' : 'W',
1 << ((dp >> 9) & 3),
- disp,outer,
+ disp, outer,
(unsigned long)addr);
} else {
- addr = m68k_areg(®s,reg) + (uae_s32)((uae_s8)disp8) + dispreg;
- sprintf (buffer,"(A%d, %c%d.%c*%d, $%02x) == $%08lx", reg,
+ addr = m68k_areg (®s, reg) + (uae_s32)((uae_s8)disp8) + dispreg;
+ sprintf (buffer, "(A%d, %c%d.%c*%d, $%02x) == $%08lx", reg,
dp & 0x8000 ? 'A' : 'D', (int)r, dp & 0x800 ? 'L' : 'W',
1 << ((dp >> 9) & 3), disp8,
(unsigned long)addr);
addr = m68k_getpc (®s) + m68kpc_offset;
disp16 = get_iword_1 (m68kpc_offset); m68kpc_offset += 2;
addr += (uae_s16)disp16;
- sprintf (buffer,"(PC,$%04x) == $%08lx", disp16 & 0xffff,(unsigned long)addr);
+ sprintf (buffer, "(PC,$%04x) == $%08lx", disp16 & 0xffff, (unsigned long)addr);
break;
case PC8r:
addr = m68k_getpc (®s) + m68kpc_offset;
dp = get_iword_1 (m68kpc_offset); m68kpc_offset += 2;
disp8 = dp & 0xFF;
r = (dp & 0x7000) >> 12;
- dispreg = dp & 0x8000 ? m68k_areg(®s,r) : m68k_dreg(®s,r);
+ dispreg = dp & 0x8000 ? m68k_areg (®s, r) : m68k_dreg (®s, r);
if (!(dp & 0x800)) dispreg = (uae_s32)(uae_s16)(dispreg);
dispreg <<= (dp >> 9) & 3;
if (dp & 0x100) {
- uae_s32 outer = 0,disp = 0;
+ uae_s32 outer = 0, disp = 0;
uae_s32 base = addr;
char name[10];
- sprintf (name,"PC, ");
+ sprintf (name, "PC, ");
if (dp & 0x80) { base = 0; name[0] = 0; }
if (dp & 0x40) dispreg = 0;
if ((dp & 0x30) == 0x20) { disp = (uae_s32)(uae_s16)get_iword_1 (m68kpc_offset); m68kpc_offset += 2; }
if (dp & 4) base += dispreg;
addr = base + outer;
- sprintf (buffer,"(%s%c%d.%c*%d+%ld)+%ld == $%08lx", name,
+ sprintf (buffer, "(%s%c%d.%c*%d+%ld)+%ld == $%08lx", name,
dp & 0x8000 ? 'A' : 'D', (int)r, dp & 0x800 ? 'L' : 'W',
1 << ((dp >> 9) & 3),
- disp,outer,
+ disp, outer,
(unsigned long)addr);
} else {
addr += (uae_s32)((uae_s8)disp8) + dispreg;
- sprintf (buffer,"(PC, %c%d.%c*%d, $%02x) == $%08lx", dp & 0x8000 ? 'A' : 'D',
+ sprintf (buffer, "(PC, %c%d.%c*%d, $%02x) == $%08lx", dp & 0x8000 ? 'A' : 'D',
(int)r, dp & 0x800 ? 'L' : 'W', 1 << ((dp >> 9) & 3),
disp8, (unsigned long)addr);
}
break;
case absw:
addr = (uae_s32)(uae_s16)get_iword_1 (m68kpc_offset);
- sprintf (buffer,"$%08lx", (unsigned long)addr);
+ sprintf (buffer, "$%08lx", (unsigned long)addr);
m68kpc_offset += 2;
break;
case absl:
addr = get_ilong_1 (m68kpc_offset);
- sprintf (buffer,"$%08lx", (unsigned long)addr);
+ sprintf (buffer, "$%08lx", (unsigned long)addr);
m68kpc_offset += 4;
break;
case imm:
switch (size){
case sz_byte:
- sprintf (buffer,"#$%02x", (unsigned int)(get_iword_1 (m68kpc_offset) & 0xff));
+ sprintf (buffer, "#$%02x", (unsigned int)(get_iword_1 (m68kpc_offset) & 0xff));
m68kpc_offset += 2;
break;
case sz_word:
- sprintf (buffer,"#$%04x", (unsigned int)(get_iword_1 (m68kpc_offset) & 0xffff));
+ sprintf (buffer, "#$%04x", (unsigned int)(get_iword_1 (m68kpc_offset) & 0xffff));
m68kpc_offset += 2;
break;
case sz_long:
- sprintf (buffer,"#$%08lx", (unsigned long)(get_ilong_1 (m68kpc_offset)));
+ sprintf (buffer, "#$%08lx", (unsigned long)(get_ilong_1 (m68kpc_offset)));
m68kpc_offset += 4;
break;
default:
case imm0:
offset = (uae_s32)(uae_s8)get_iword_1 (m68kpc_offset);
m68kpc_offset += 2;
- sprintf (buffer,"#$%02x", (unsigned int)(offset & 0xff));
+ sprintf (buffer, "#$%02x", (unsigned int)(offset & 0xff));
break;
case imm1:
offset = (uae_s32)(uae_s16)get_iword_1 (m68kpc_offset);
m68kpc_offset += 2;
buffer[0] = 0;
- sprintf (buffer,"#$%04x", (unsigned int)(offset & 0xffff));
+ sprintf (buffer, "#$%04x", (unsigned int)(offset & 0xffff));
break;
case imm2:
offset = (uae_s32)get_ilong_1 (m68kpc_offset);
m68kpc_offset += 4;
- sprintf (buffer,"#$%08lx", (unsigned long)offset);
+ sprintf (buffer, "#$%08lx", (unsigned long)offset);
break;
case immi:
offset = (uae_s32)(uae_s8)(reg & 0xff);
- sprintf (buffer,"#$%08lx", (unsigned long)offset);
+ sprintf (buffer, "#$%08lx", (unsigned long)offset);
break;
default:
break;
break;
case Ad16:
disp16 = get_iword_1 (m68kpc_offset); m68kpc_offset += 2;
- addr = m68k_areg(®s,reg) + (uae_s16)disp16;
+ addr = m68k_areg (®s, reg) + (uae_s16)disp16;
break;
case Ad8r:
addr = m68k_areg (®s, reg);
dp = get_iword_1 (m68kpc_offset); m68kpc_offset += 2;
disp8 = dp & 0xFF;
r = (dp & 0x7000) >> 12;
- dispreg = dp & 0x8000 ? m68k_areg(®s,r) : m68k_dreg(®s,r);
+ dispreg = dp & 0x8000 ? m68k_areg (®s, r) : m68k_dreg (®s, r);
if (!(dp & 0x800)) dispreg = (uae_s32)(uae_s16)(dispreg);
dispreg <<= (dp >> 9) & 3;
}
#endif
-int get_cpu_model(void)
+int get_cpu_model (void)
{
return currprefs.cpu_model;
}
if (dp & 0x80) base = 0;
if (dp & 0x40) regd = 0;
- if ((dp & 0x30) == 0x20) base += (uae_s32)(uae_s16)next_iword(regs);
- if ((dp & 0x30) == 0x30) base += next_ilong(regs);
+ if ((dp & 0x30) == 0x20) base += (uae_s32)(uae_s16) next_iword (regs);
+ if ((dp & 0x30) == 0x30) base += next_ilong (regs);
- if ((dp & 0x3) == 0x2) outer = (uae_s32)(uae_s16)next_iword(regs);
- if ((dp & 0x3) == 0x3) outer = next_ilong(regs);
+ if ((dp & 0x3) == 0x2) outer = (uae_s32)(uae_s16) next_iword (regs);
+ if ((dp & 0x3) == 0x3) outer = next_ilong (regs);
if ((dp & 0x4) == 0) base += regd;
if (dp & 0x3) base = get_long (base);
void REGPARAM2 MakeSR (struct regstruct *regs)
{
#if 0
- assert((regs.t1 & 1) == regs->t1);
- assert((regs.t0 & 1) == regs->t0);
- assert((regs.s & 1) == regs->s);
- assert((regs.m & 1) == regs->m);
- assert((XFLG & 1) == XFLG);
- assert((NFLG & 1) == NFLG);
- assert((ZFLG & 1) == ZFLG);
- assert((VFLG & 1) == VFLG);
- assert((CFLG & 1) == CFLG);
+ assert ((regs.t1 & 1) == regs->t1);
+ assert ((regs.t0 & 1) == regs->t0);
+ assert ((regs.s & 1) == regs->s);
+ assert ((regs.m & 1) == regs->m);
+ assert ((XFLG & 1) == XFLG);
+ assert ((NFLG & 1) == NFLG);
+ assert ((ZFLG & 1) == ZFLG);
+ assert ((VFLG & 1) == VFLG);
+ assert ((CFLG & 1) == CFLG);
#endif
regs->sr = ((regs->t1 << 15) | (regs->t0 << 14)
| (regs->s << 13) | (regs->m << 12) | (regs->intmask << 8)
- | (GET_XFLG(®s->ccrflags) << 4) | (GET_NFLG(®s->ccrflags) << 3)
- | (GET_ZFLG(®s->ccrflags) << 2) | (GET_VFLG(®s->ccrflags) << 1)
- | GET_CFLG(®s->ccrflags));
+ | (GET_XFLG (®s->ccrflags) << 4) | (GET_NFLG (®s->ccrflags) << 3)
+ | (GET_ZFLG (®s->ccrflags) << 2) | (GET_VFLG (®s->ccrflags) << 1)
+ | GET_CFLG (®s->ccrflags));
}
void REGPARAM2 MakeFromSR (struct regstruct *regs)
if (olds != regs->s) {
if (olds) {
if (oldm)
- regs->msp = m68k_areg(regs, 7);
+ regs->msp = m68k_areg (regs, 7);
else
- regs->isp = m68k_areg(regs, 7);
- m68k_areg(regs, 7) = regs->usp;
+ regs->isp = m68k_areg (regs, 7);
+ m68k_areg (regs, 7) = regs->usp;
} else {
- regs->usp = m68k_areg(regs, 7);
- m68k_areg(regs, 7) = regs->m ? regs->msp : regs->isp;
+ regs->usp = m68k_areg (regs, 7);
+ m68k_areg (regs, 7) = regs->m ? regs->msp : regs->isp;
}
} else if (olds && oldm != regs->m) {
if (oldm) {
}
}
- doint();
+ doint ();
if (regs->t1 || regs->t0)
set_special (regs, SPCFLAG_TRACE);
else
/* trace stays pending if exception is div by zero, chk,
* trapv or trap #x
*/
- if (nr == 5 || nr == 6 || nr == 7 || (nr >= 32 && nr <= 47))
+ if (nr == 5 || nr == 6 || nr == 7 || (nr >= 32 && nr <= 47))
set_special (®s, SPCFLAG_DOTRACE);
}
regs.t1 = regs.t0 = regs.m = 0;
#ifdef DEBUGGER
if (!exception_debugging)
return;
- console_out ("Exception %d, PC=%08.8X\n", nr, m68k_getpc(®s));
+ console_out ("Exception %d, PC=%08.8X\n", nr, m68k_getpc (®s));
#endif
}
int sv = regs->s;
exception_debug (nr);
- MakeSR(regs);
+ MakeSR (regs);
c = 0;
switch (nr)
if (c)
do_cycles_ce (c * CYCLE_UNIT / 2);
if (!regs->s) {
- regs->usp = m68k_areg(regs, 7);
- m68k_areg(regs, 7) = regs->isp;
+ regs->usp = m68k_areg (regs, 7);
+ m68k_areg (regs, 7) = regs->isp;
regs->s = 1;
}
- if (nr == 2 || nr == 3) { /* 2=bus error,3=address error */
+ if (nr == 2 || nr == 3) { /* 2=bus error, 3=address error */
uae_u16 mode = (sv ? 4 : 0) | (last_instructionaccess_for_exception_3 ? 2 : 1);
mode |= last_writeaccess_for_exception_3 ? 0 : 16;
- m68k_areg(regs, 7) -= 14;
+ m68k_areg (regs, 7) -= 14;
/* fixme: bit3=I/N */
- put_word_ce (m68k_areg(regs, 7) + 12, last_addr_for_exception_3);
- put_word_ce (m68k_areg(regs, 7) + 8, regs->sr);
- put_word_ce (m68k_areg(regs, 7) + 10, last_addr_for_exception_3 >> 16);
- put_word_ce (m68k_areg(regs, 7) + 6, last_op_for_exception_3);
- put_word_ce (m68k_areg(regs, 7) + 4, last_fault_for_exception_3);
- put_word_ce (m68k_areg(regs, 7) + 0, mode);
- put_word_ce (m68k_areg(regs, 7) + 2, last_fault_for_exception_3 >> 16);
+ put_word_ce (m68k_areg (regs, 7) + 12, last_addr_for_exception_3);
+ put_word_ce (m68k_areg (regs, 7) + 8, regs->sr);
+ put_word_ce (m68k_areg (regs, 7) + 10, last_addr_for_exception_3 >> 16);
+ put_word_ce (m68k_areg (regs, 7) + 6, last_op_for_exception_3);
+ put_word_ce (m68k_areg (regs, 7) + 4, last_fault_for_exception_3);
+ put_word_ce (m68k_areg (regs, 7) + 0, mode);
+ put_word_ce (m68k_areg (regs, 7) + 2, last_fault_for_exception_3 >> 16);
write_log ("Exception %d (%x) at %x -> %x!\n", nr, oldpc, currpc, get_long (4 * nr));
goto kludge_me_do;
}
m68k_areg (regs, 7) -= 6;
- put_word_ce (m68k_areg(regs, 7) + 4, currpc);
- put_word_ce (m68k_areg(regs, 7) + 0, regs->sr);
- put_word_ce (m68k_areg(regs, 7) + 2, currpc >> 16);
+ put_word_ce (m68k_areg (regs, 7) + 4, currpc);
+ put_word_ce (m68k_areg (regs, 7) + 0, regs->sr);
+ put_word_ce (m68k_areg (regs, 7) + 2, currpc >> 16);
kludge_me_do:
newpc = get_word_ce (4 * nr) << 16;
newpc |= get_word_ce (4 * nr + 2);
if (nr == 2 || nr == 3)
uae_reset (1); /* there is nothing else we can do.. */
else
- exception3 (regs->ir, m68k_getpc(regs), newpc);
+ exception3 (regs->ir, m68k_getpc (regs), newpc);
return;
}
m68k_setpc (regs, newpc);
fill_prefetch_slow (regs);
- set_special(regs, SPCFLAG_END_COMPILE);
+ set_special (regs, SPCFLAG_END_COMPILE);
exception_trace (nr);
}
#endif
int sv = regs->s;
exception_debug (nr);
- MakeSR(regs);
+ MakeSR (regs);
if (!regs->s) {
- regs->usp = m68k_areg(regs, 7);
+ regs->usp = m68k_areg (regs, 7);
if (currprefs.cpu_model >= 68020)
- m68k_areg(regs, 7) = regs->m ? regs->msp : regs->isp;
+ m68k_areg (regs, 7) = regs->m ? regs->msp : regs->isp;
else
- m68k_areg(regs, 7) = regs->isp;
+ m68k_areg (regs, 7) = regs->isp;
regs->s = 1;
}
if (currprefs.cpu_model > 68000) {
if (currprefs.cpu_model >= 68040) {
if (nr == 2) {
for (i = 0 ; i < 18 ; i++) {
- m68k_areg(regs, 7) -= 2;
- put_word (m68k_areg(regs, 7), 0);
+ m68k_areg (regs, 7) -= 2;
+ put_word (m68k_areg (regs, 7), 0);
}
- m68k_areg(regs, 7) -= 4;
- put_long (m68k_areg(regs, 7), last_fault_for_exception_3);
- m68k_areg(regs, 7) -= 2;
- put_word (m68k_areg(regs, 7), 0);
- m68k_areg(regs, 7) -= 2;
- put_word (m68k_areg(regs, 7), 0);
- m68k_areg(regs, 7) -= 2;
- put_word (m68k_areg(regs, 7), 0);
- m68k_areg(regs, 7) -= 2;
- put_word (m68k_areg(regs, 7), 0x0140 | (sv ? 6 : 2)); /* SSW */
- m68k_areg(regs, 7) -= 4;
- put_long (m68k_areg(regs, 7), last_addr_for_exception_3);
- m68k_areg(regs, 7) -= 2;
- put_word (m68k_areg(regs, 7), 0x7000 + nr * 4);
+ m68k_areg (regs, 7) -= 4;
+ put_long (m68k_areg (regs, 7), last_fault_for_exception_3);
+ m68k_areg (regs, 7) -= 2;
+ put_word (m68k_areg (regs, 7), 0);
+ m68k_areg (regs, 7) -= 2;
+ put_word (m68k_areg (regs, 7), 0);
+ m68k_areg (regs, 7) -= 2;
+ put_word (m68k_areg (regs, 7), 0);
+ m68k_areg (regs, 7) -= 2;
+ put_word (m68k_areg (regs, 7), 0x0140 | (sv ? 6 : 2)); /* SSW */
+ m68k_areg (regs, 7) -= 4;
+ put_long (m68k_areg (regs, 7), last_addr_for_exception_3);
+ m68k_areg (regs, 7) -= 2;
+ put_word (m68k_areg (regs, 7), 0x7000 + nr * 4);
} else {
- m68k_areg(regs, 7) -= 4;
- put_long (m68k_areg(regs, 7), last_fault_for_exception_3);
- m68k_areg(regs, 7) -= 2;
- put_word (m68k_areg(regs, 7), 0x2000 + nr * 4);
+ m68k_areg (regs, 7) -= 4;
+ put_long (m68k_areg (regs, 7), last_fault_for_exception_3);
+ m68k_areg (regs, 7) -= 2;
+ put_word (m68k_areg (regs, 7), 0x2000 + nr * 4);
}
} else {
uae_u16 ssw = (sv ? 4 : 0) | (last_instructionaccess_for_exception_3 ? 2 : 1);
ssw |= last_writeaccess_for_exception_3 ? 0 : 0x40;
ssw |= 0x20;
for (i = 0 ; i < 36; i++) {
- m68k_areg(regs, 7) -= 2;
- put_word (m68k_areg(regs, 7), 0);
+ m68k_areg (regs, 7) -= 2;
+ put_word (m68k_areg (regs, 7), 0);
}
- m68k_areg(regs, 7) -= 4;
- put_long (m68k_areg(regs, 7), last_fault_for_exception_3);
- m68k_areg(regs, 7) -= 2;
- put_word (m68k_areg(regs, 7), 0);
- m68k_areg(regs, 7) -= 2;
- put_word (m68k_areg(regs, 7), 0);
- m68k_areg(regs, 7) -= 2;
- put_word (m68k_areg(regs, 7), 0);
- m68k_areg(regs, 7) -= 2;
- put_word (m68k_areg(regs, 7), ssw);
- m68k_areg(regs, 7) -= 2;
- put_word (m68k_areg(regs, 7), 0xb000 + nr * 4);
+ m68k_areg (regs, 7) -= 4;
+ put_long (m68k_areg (regs, 7), last_fault_for_exception_3);
+ m68k_areg (regs, 7) -= 2;
+ put_word (m68k_areg (regs, 7), 0);
+ m68k_areg (regs, 7) -= 2;
+ put_word (m68k_areg (regs, 7), 0);
+ m68k_areg (regs, 7) -= 2;
+ put_word (m68k_areg (regs, 7), 0);
+ m68k_areg (regs, 7) -= 2;
+ put_word (m68k_areg (regs, 7), ssw);
+ m68k_areg (regs, 7) -= 2;
+ put_word (m68k_areg (regs, 7), 0xb000 + nr * 4);
}
write_log ("Exception %d (%x) at %x -> %x!\n", nr, oldpc, currpc, get_long (regs->vbr + 4*nr));
} else if (nr ==5 || nr == 6 || nr == 7 || nr == 9) {
- m68k_areg(regs, 7) -= 4;
- put_long (m68k_areg(regs, 7), oldpc);
- m68k_areg(regs, 7) -= 2;
- put_word (m68k_areg(regs, 7), 0x2000 + nr * 4);
+ m68k_areg (regs, 7) -= 4;
+ put_long (m68k_areg (regs, 7), oldpc);
+ m68k_areg (regs, 7) -= 2;
+ put_word (m68k_areg (regs, 7), 0x2000 + nr * 4);
} else if (regs->m && nr >= 24 && nr < 32) { /* M + Interrupt */
- m68k_areg(regs, 7) -= 2;
- put_word (m68k_areg(regs, 7), nr * 4);
- m68k_areg(regs, 7) -= 4;
- put_long (m68k_areg(regs, 7), currpc);
- m68k_areg(regs, 7) -= 2;
- put_word (m68k_areg(regs, 7), regs->sr);
+ m68k_areg (regs, 7) -= 2;
+ put_word (m68k_areg (regs, 7), nr * 4);
+ m68k_areg (regs, 7) -= 4;
+ put_long (m68k_areg (regs, 7), currpc);
+ m68k_areg (regs, 7) -= 2;
+ put_word (m68k_areg (regs, 7), regs->sr);
regs->sr |= (1 << 13);
- regs->msp = m68k_areg(regs, 7);
- m68k_areg(regs, 7) = regs->isp;
- m68k_areg(regs, 7) -= 2;
- put_word (m68k_areg(regs, 7), 0x1000 + nr * 4);
+ regs->msp = m68k_areg (regs, 7);
+ m68k_areg (regs, 7) = regs->isp;
+ m68k_areg (regs, 7) -= 2;
+ put_word (m68k_areg (regs, 7), 0x1000 + nr * 4);
} else {
- m68k_areg(regs, 7) -= 2;
- put_word (m68k_areg(regs, 7), nr * 4);
+ m68k_areg (regs, 7) -= 2;
+ put_word (m68k_areg (regs, 7), nr * 4);
}
} else if (nr == 2 || nr == 3) {
uae_u16 mode = (sv ? 4 : 0) | (last_instructionaccess_for_exception_3 ? 2 : 1);
mode |= last_writeaccess_for_exception_3 ? 0 : 16;
- m68k_areg(regs, 7) -= 14;
+ m68k_areg (regs, 7) -= 14;
/* fixme: bit3=I/N */
- put_word (m68k_areg(regs, 7) + 0, mode);
- put_long (m68k_areg(regs, 7) + 2, last_fault_for_exception_3);
- put_word (m68k_areg(regs, 7) + 6, last_op_for_exception_3);
- put_word (m68k_areg(regs, 7) + 8, regs->sr);
- put_long (m68k_areg(regs, 7) + 10, last_addr_for_exception_3);
+ put_word (m68k_areg (regs, 7) + 0, mode);
+ put_long (m68k_areg (regs, 7) + 2, last_fault_for_exception_3);
+ put_word (m68k_areg (regs, 7) + 6, last_op_for_exception_3);
+ put_word (m68k_areg (regs, 7) + 8, regs->sr);
+ put_long (m68k_areg (regs, 7) + 10, last_addr_for_exception_3);
write_log ("Exception %d (%x) at %x -> %x!\n", nr, oldpc, currpc, get_long (regs->vbr + 4*nr));
goto kludge_me_do;
}
- m68k_areg(regs, 7) -= 4;
- put_long (m68k_areg(regs, 7), currpc);
- m68k_areg(regs, 7) -= 2;
- put_word (m68k_areg(regs, 7), regs->sr);
+ m68k_areg (regs, 7) -= 4;
+ put_long (m68k_areg (regs, 7), currpc);
+ m68k_areg (regs, 7) -= 2;
+ put_word (m68k_areg (regs, 7), regs->sr);
kludge_me_do:
newpc = get_long (regs->vbr + 4 * nr);
if (newpc & 1) {
if (nr == 2 || nr == 3)
uae_reset (1); /* there is nothing else we can do.. */
else
- exception3 (regs->ir, m68k_getpc(regs), newpc);
+ exception3 (regs->ir, m68k_getpc (regs), newpc);
return;
}
m68k_setpc (regs, newpc);
- set_special(regs, SPCFLAG_END_COMPILE);
+ set_special (regs, SPCFLAG_END_COMPILE);
fill_prefetch_slow (regs);
exception_trace (nr);
}
#if 0
if (1 || nr < 24)
write_log ("exception %d %08.8X %08.8X (%04.4X %04.4X)\n",
- nr, oldpc, m68k_getpc(regs), intena, intreq);
+ nr, oldpc, m68k_getpc (regs), intena, intreq);
#endif
#ifdef CPUEMU_12
if (currprefs.cpu_cycle_exact && currprefs.cpu_model == 68000)
Exception_normal (nr, regs, oldpc);
}
-STATIC_INLINE void do_interrupt(int nr, struct regstruct *regs)
+STATIC_INLINE void do_interrupt (int nr, struct regstruct *regs)
{
#if 0
if (nr == 2)
- write_log(".");
- //write_log("irq %d at %x (%04.4X) ", nr, m68k_getpc(regs), intena & intreq);
+ write_log (".");
+ //write_log ("irq %d at %x (%04.4X) ", nr, m68k_getpc (regs), intena & intreq);
#endif
regs->stopped = 0;
unset_special (regs, SPCFLAG_STOP);
- assert(nr < 8 && nr >= 0);
+ assert (nr < 8 && nr >= 0);
Exception (nr + 24, regs, 0);
regs->intmask = nr;
- doint();
+ doint ();
}
-void NMI(void)
+void NMI (void)
{
do_interrupt (7, ®s);
}
int m68k_move2c (int regno, uae_u32 *regp)
{
#if MOVEC_DEBUG > 0
- write_log("move2c %04.4X <- %08.8X PC=%x\n", regno, *regp, M68K_GETPC);
+ write_log ("move2c %04.4X <- %08.8X PC=%x\n", regno, *regp, M68K_GETPC);
#endif
if (movec_illg (regno)) {
op_illg (0x4E7B, ®s);
else if (currprefs.cpu_model == 68060)
cacr_mask = 0xf8e0e000;
regs.cacr = *regp & cacr_mask;
- set_cpu_caches();
+ set_cpu_caches ();
}
break;
/* 68040/060 only */
case 0x800: regs.usp = *regp; break;
case 0x801: regs.vbr = *regp; break;
case 0x802: regs.caar = *regp & 0xfc; break;
- case 0x803: regs.msp = *regp; if (regs.m == 1) m68k_areg(®s, 7) = regs.msp; break;
- case 0x804: regs.isp = *regp; if (regs.m == 0) m68k_areg(®s, 7) = regs.isp; break;
+ case 0x803: regs.msp = *regp; if (regs.m == 1) m68k_areg (®s, 7) = regs.msp; break;
+ case 0x804: regs.isp = *regp; if (regs.m == 0) m68k_areg (®s, 7) = regs.isp; break;
/* 68040 only */
case 0x805: regs.mmusr = *regp; break;
/* 68040/060 */
regs.pcr &= ~(0x40 | 2 | 1);
regs.pcr |= (*regp) & (0x40 | 2 | 1);
if (((opcr ^ regs.pcr) & 2) == 2) {
- write_log("68060 FPU state: %s\n", regs.pcr & 2 ? "disabled" : "enabled");
+ write_log ("68060 FPU state: %s\n", regs.pcr & 2 ? "disabled" : "enabled");
/* flush possible already translated FPU instructions */
- flush_icache(2);
+ flush_icache (2);
}
}
break;
int m68k_movec2 (int regno, uae_u32 *regp)
{
#if MOVEC_DEBUG > 0
- write_log("movec2 %04.4X PC=%x\n", regno, M68K_GETPC);
+ write_log ("movec2 %04.4X PC=%x\n", regno, M68K_GETPC);
#endif
if (movec_illg (regno)) {
op_illg (0x4E7A, ®s);
switch (regno) {
case 0: *regp = regs.sfc; break;
case 1: *regp = regs.dfc; break;
- case 2:
+ case 2:
{
uae_u32 v = regs.cacr;
uae_u32 cacr_mask = 0;
case 0x800: *regp = regs.usp; break;
case 0x801: *regp = regs.vbr; break;
case 0x802: *regp = regs.caar; break;
- case 0x803: *regp = regs.m == 1 ? m68k_areg(®s, 7) : regs.msp; break;
- case 0x804: *regp = regs.m == 0 ? m68k_areg(®s, 7) : regs.isp; break;
+ case 0x803: *regp = regs.m == 1 ? m68k_areg (®s, 7) : regs.msp; break;
+ case 0x804: *regp = regs.m == 0 ? m68k_areg (®s, 7) : regs.isp; break;
case 0x805: *regp = regs.mmusr; break;
case 0x806: *regp = regs.urp; break;
case 0x807: *regp = regs.srp; break;
}
}
#if MOVEC_DEBUG > 0
- write_log("-> %08.8X\n", *regp);
+ write_log ("-> %08.8X\n", *regp);
#endif
return 1;
}
STATIC_INLINE int
-div_unsigned(uae_u32 src_hi, uae_u32 src_lo, uae_u32 div, uae_u32 *quot, uae_u32 *rem)
+div_unsigned (uae_u32 src_hi, uae_u32 src_lo, uae_u32 div, uae_u32 *quot, uae_u32 *rem)
{
uae_u32 q = 0, cbit = 0;
int i;
void m68k_divl (uae_u32 opcode, uae_u32 src, uae_u16 extra, uaecptr oldpc)
{
-#if defined(uae_s64)
+#if defined (uae_s64)
if (src == 0) {
Exception (5, ®s, oldpc);
return;
}
if (extra & 0x800) {
/* signed variant */
- uae_s64 a = (uae_s64)(uae_s32)m68k_dreg(®s, (extra >> 12) & 7);
+ uae_s64 a = (uae_s64)(uae_s32)m68k_dreg (®s, (extra >> 12) & 7);
uae_s64 quot, rem;
if (extra & 0x400) {
a &= 0xffffffffu;
- a |= (uae_s64)m68k_dreg(®s, extra & 7) << 32;
+ a |= (uae_s64)m68k_dreg (®s, extra & 7) << 32;
}
rem = a % (uae_s64)(uae_s32)src;
quot = a / (uae_s64)(uae_s32)src;
- if ((quot & UVAL64(0xffffffff80000000)) != 0
- && (quot & UVAL64(0xffffffff80000000)) != UVAL64(0xffffffff80000000))
+ if ((quot & UVAL64 (0xffffffff80000000)) != 0
+ && (quot & UVAL64 (0xffffffff80000000)) != UVAL64 (0xffffffff80000000))
{
SET_VFLG (®s.ccrflags, 1);
SET_NFLG (®s.ccrflags, 1);
SET_CFLG (®s.ccrflags, 0);
SET_ZFLG (®s.ccrflags, ((uae_s32)quot) == 0);
SET_NFLG (®s.ccrflags, ((uae_s32)quot) < 0);
- m68k_dreg(®s, extra & 7) = (uae_u32)rem;
- m68k_dreg(®s, (extra >> 12) & 7) = (uae_u32)quot;
+ m68k_dreg (®s, extra & 7) = (uae_u32)rem;
+ m68k_dreg (®s, (extra >> 12) & 7) = (uae_u32)quot;
}
} else {
/* unsigned */
- uae_u64 a = (uae_u64)(uae_u32)m68k_dreg(®s, (extra >> 12) & 7);
+ uae_u64 a = (uae_u64)(uae_u32)m68k_dreg (®s, (extra >> 12) & 7);
uae_u64 quot, rem;
if (extra & 0x400) {
a &= 0xffffffffu;
- a |= (uae_u64)m68k_dreg(®s, extra & 7) << 32;
+ a |= (uae_u64)m68k_dreg (®s, extra & 7) << 32;
}
rem = a % (uae_u64)src;
quot = a / (uae_u64)src;
SET_CFLG (®s.ccrflags, 0);
SET_ZFLG (®s.ccrflags, ((uae_s32)quot) == 0);
SET_NFLG (®s.ccrflags, ((uae_s32)quot) < 0);
- m68k_dreg(®s, extra & 7) = (uae_u32)rem;
- m68k_dreg(®s, (extra >> 12) & 7) = (uae_u32)quot;
+ m68k_dreg (®s, extra & 7) = (uae_u32)rem;
+ m68k_dreg (®s, (extra >> 12) & 7) = (uae_u32)quot;
}
}
#else
}
if (extra & 0x800) {
/* signed variant */
- uae_s32 lo = (uae_s32)m68k_dreg(®s, (extra >> 12) & 7);
+ uae_s32 lo = (uae_s32)m68k_dreg (®s, (extra >> 12) & 7);
uae_s32 hi = lo < 0 ? -1 : 0;
uae_s32 save_high;
uae_u32 quot, rem;
uae_u32 sign;
if (extra & 0x400) {
- hi = (uae_s32)m68k_dreg(®s, extra & 7);
+ hi = (uae_s32)m68k_dreg (®s, extra & 7);
}
save_high = hi;
sign = (hi ^ src);
if (lo == 0) hi++;
}
if ((uae_s32)src < 0) src = -src;
- if (div_unsigned(hi, lo, src, ", &rem) ||
+ if (div_unsigned (hi, lo, src, ", &rem) ||
(sign & 0x80000000) ? quot > 0x80000000 : quot > 0x7fffffff) {
SET_VFLG (1);
SET_NFLG (1);
SET_CFLG (0);
SET_ZFLG (((uae_s32)quot) == 0);
SET_NFLG (((uae_s32)quot) < 0);
- m68k_dreg(regs, extra & 7) = rem;
- m68k_dreg(regs, (extra >> 12) & 7) = quot;
+ m68k_dreg (regs, extra & 7) = rem;
+ m68k_dreg (regs, (extra >> 12) & 7) = quot;
}
} else {
/* unsigned */
- uae_u32 lo = (uae_u32)m68k_dreg(®s, (extra >> 12) & 7);
+ uae_u32 lo = (uae_u32)m68k_dreg (®s, (extra >> 12) & 7);
uae_u32 hi = 0;
uae_u32 quot, rem;
if (extra & 0x400) {
- hi = (uae_u32)m68k_dreg(®s, extra & 7);
+ hi = (uae_u32)m68k_dreg (®s, extra & 7);
}
- if (div_unsigned(hi, lo, src, ", &rem)) {
+ if (div_unsigned (hi, lo, src, ", &rem)) {
SET_VFLG (1);
SET_NFLG (1);
SET_CFLG (0);
SET_CFLG (0);
SET_ZFLG (((uae_s32)quot) == 0);
SET_NFLG (((uae_s32)quot) < 0);
- m68k_dreg(regs, extra & 7) = rem;
- m68k_dreg(regs, (extra >> 12) & 7) = quot;
+ m68k_dreg (regs, extra & 7) = rem;
+ m68k_dreg (regs, (extra >> 12) & 7) = quot;
}
}
#endif
}
STATIC_INLINE void
-mul_unsigned(uae_u32 src1, uae_u32 src2, uae_u32 *dst_hi, uae_u32 *dst_lo)
+mul_unsigned (uae_u32 src1, uae_u32 src2, uae_u32 *dst_hi, uae_u32 *dst_lo)
{
uae_u32 r0 = (src1 & 0xffff) * (src2 & 0xffff);
uae_u32 r1 = ((src1 >> 16) & 0xffff) * (src2 & 0xffff);
void m68k_mull (uae_u32 opcode, uae_u32 src, uae_u16 extra)
{
-#if defined(uae_s64)
+#if defined (uae_s64)
if (extra & 0x800) {
/* signed variant */
- uae_s64 a = (uae_s64)(uae_s32)m68k_dreg(®s, (extra >> 12) & 7);
+ uae_s64 a = (uae_s64)(uae_s32)m68k_dreg (®s, (extra >> 12) & 7);
a *= (uae_s64)(uae_s32)src;
SET_VFLG (®s.ccrflags, 0);
SET_ZFLG (®s.ccrflags, a == 0);
SET_NFLG (®s.ccrflags, a < 0);
if (extra & 0x400)
- m68k_dreg(®s, extra & 7) = (uae_u32)(a >> 32);
- else if ((a & UVAL64(0xffffffff80000000)) != 0
- && (a & UVAL64(0xffffffff80000000)) != UVAL64(0xffffffff80000000))
+ m68k_dreg (®s, extra & 7) = (uae_u32)(a >> 32);
+ else if ((a & UVAL64 (0xffffffff80000000)) != 0
+ && (a & UVAL64 (0xffffffff80000000)) != UVAL64 (0xffffffff80000000))
{
SET_VFLG (®s.ccrflags, 1);
}
- m68k_dreg(®s, (extra >> 12) & 7) = (uae_u32)a;
+ m68k_dreg (®s, (extra >> 12) & 7) = (uae_u32)a;
} else {
/* unsigned */
- uae_u64 a = (uae_u64)(uae_u32)m68k_dreg(®s, (extra >> 12) & 7);
+ uae_u64 a = (uae_u64)(uae_u32)m68k_dreg (®s, (extra >> 12) & 7);
a *= (uae_u64)src;
SET_VFLG (®s.ccrflags, 0);
SET_ZFLG (®s.ccrflags, a == 0);
SET_NFLG (®s.ccrflags, ((uae_s64)a) < 0);
if (extra & 0x400)
- m68k_dreg(®s, extra & 7) = (uae_u32)(a >> 32);
- else if ((a & UVAL64(0xffffffff00000000)) != 0) {
+ m68k_dreg (®s, extra & 7) = (uae_u32)(a >> 32);
+ else if ((a & UVAL64 (0xffffffff00000000)) != 0) {
SET_VFLG (®s.ccrflags, 1);
}
- m68k_dreg(®s, (extra >> 12) & 7) = (uae_u32)a;
+ m68k_dreg (®s, (extra >> 12) & 7) = (uae_u32)a;
}
#else
if (extra & 0x800) {
/* signed variant */
- uae_s32 src1,src2;
- uae_u32 dst_lo,dst_hi;
+ uae_s32 src1, src2;
+ uae_u32 dst_lo, dst_hi;
uae_u32 sign;
src1 = (uae_s32)src;
- src2 = (uae_s32)m68k_dreg(®s, (extra >> 12) & 7);
+ src2 = (uae_s32)m68k_dreg (®s, (extra >> 12) & 7);
sign = (src1 ^ src2);
if (src1 < 0) src1 = -src1;
if (src2 < 0) src2 = -src2;
- mul_unsigned((uae_u32)src1,(uae_u32)src2,&dst_hi,&dst_lo);
+ mul_unsigned ((uae_u32)src1, (uae_u32)src2, &dst_hi, &dst_lo);
if (sign & 0x80000000) {
dst_hi = ~dst_hi;
dst_lo = -dst_lo;
SET_ZFLG (dst_hi == 0 && dst_lo == 0);
SET_NFLG (((uae_s32)dst_hi) < 0);
if (extra & 0x400)
- m68k_dreg(®s, extra & 7) = dst_hi;
+ m68k_dreg (®s, extra & 7) = dst_hi;
else if ((dst_hi != 0 || (dst_lo & 0x80000000) != 0)
&& ((dst_hi & 0xffffffff) != 0xffffffff
|| (dst_lo & 0x80000000) != 0x80000000))
{
SET_VFLG (1);
}
- m68k_dreg(®s, (extra >> 12) & 7) = dst_lo;
+ m68k_dreg (®s, (extra >> 12) & 7) = dst_lo;
} else {
/* unsigned */
- uae_u32 dst_lo,dst_hi;
+ uae_u32 dst_lo, dst_hi;
- mul_unsigned(src,(uae_u32)m68k_dreg(®s, (extra >> 12) & 7),&dst_hi,&dst_lo);
+ mul_unsigned (src, (uae_u32)m68k_dreg (®s, (extra >> 12) & 7), &dst_hi, &dst_lo);
SET_VFLG (0);
SET_CFLG (0);
SET_ZFLG (dst_hi == 0 && dst_lo == 0);
SET_NFLG (((uae_s32)dst_hi) < 0);
if (extra & 0x400)
- m68k_dreg(®s, extra & 7) = dst_hi;
+ m68k_dreg (®s, extra & 7) = dst_hi;
else if (dst_hi != 0) {
SET_VFLG (1);
}
- m68k_dreg(regs, (extra >> 12) & 7) = dst_lo;
+ m68k_dreg (regs, (extra >> 12) & 7) = dst_lo;
}
#endif
}
#ifdef SAVESTATE
if (savestate_state == STATE_RESTORE || savestate_state == STATE_REWIND) {
m68k_setpc (®s, regs.pc);
- /* MakeFromSR() must not swap stack pointer */
+ /* MakeFromSR () must not swap stack pointer */
regs.s = (regs.sr >> 13) & 1;
- MakeFromSR(®s);
+ MakeFromSR (®s);
/* set stack pointer */
if (regs.s)
- m68k_areg(®s, 7) = regs.isp;
+ m68k_areg (®s, 7) = regs.isp;
else
- m68k_areg(®s, 7) = regs.usp;
+ m68k_areg (®s, 7) = regs.usp;
return;
}
#endif
regs.itt0 = regs.itt1 = regs.dtt0 = regs.dtt1 = 0;
regs.tcr = regs.mmusr = regs.urp = regs.srp = regs.buscr = 0;
- a3000_fakekick(0);
+ a3000_fakekick (0);
/* only (E)nable bit is zeroed when CPU is reset, A3000 SuperKickstart expects this */
tc_030 &= ~0x80000000;
tt0_030 &= ~0x80000000;
*/
regs.pcr = 0;
if (currprefs.cpu_model == 68060) {
- regs.pcr = currprefs.fpu_model ? MC68060_PCR : MC68EC060_PCR;
+ regs.pcr = currprefs.fpu_model ? MC68060_PCR : MC68EC060_PCR;
regs.pcr |= (currprefs.cpu060_revision & 0xff) << 8;
regs.pcr |= 2;
}
{
uaecptr pc = m68k_getpc (regs);
static int warned;
- int inrom = in_rom(pc);
- int inrt = in_rtarea(pc);
+ int inrom = in_rom (pc);
+ int inrt = in_rtarea (pc);
if (cloanto_rom && (opcode & 0xF100) == 0x7100) {
m68k_dreg (regs, (opcode >> 9) & 7) = (uae_s8)(opcode & 0xFF);
if ((opcode & 0xF000) == 0xA000 && inrt) {
/* Calltrap. */
- m68k_incpc(regs, 2);
+ m68k_incpc (regs, 2);
m68k_handle_trap (opcode & 0xFFF, regs);
fill_prefetch_slow (regs);
return 4;
write_log ("B-Trap %x at %x (%p)\n", opcode, pc, regs->pc_p);
warned++;
}
- Exception(0xB, regs, 0);
+ Exception (0xB, regs, 0);
return 4;
}
if ((opcode & 0xF000) == 0xA000) {
write_log ("A-Trap %x at %x (%p)\n", opcode, pc, regs->pc_p);
warned++;
}
- Exception(0xA, regs, 0);
+ Exception (0xA, regs, 0);
return 4;
}
if (warned < 20) {
static char *mmu30regs[] = { "TCR", "", "SRP", "CRP", "", "", "", "" };
-static void mmu_op30_pmove(uaecptr pc, uae_u32 opcode, uae_u16 next, uaecptr extra)
+static void mmu_op30_pmove (uaecptr pc, uae_u32 opcode, uae_u16 next, uaecptr extra)
{
int preg = (next >> 10) & 31;
int rw = (next >> 9) & 1;
reg = "TC";
siz = 4;
if (rw)
- put_long(extra, tc_030);
+ put_long (extra, tc_030);
else
- tc_030 = get_long(extra);
+ tc_030 = get_long (extra);
break;
case 0x12: // SRP
reg = "SRP";
siz = 8;
if (rw) {
- put_long(extra, srp_030 >> 32);
- put_long(extra + 4, srp_030);
+ put_long (extra, srp_030 >> 32);
+ put_long (extra + 4, srp_030);
} else {
- srp_030 = (uae_u64)get_long(extra) << 32;
- srp_030 |= get_long(extra + 4);
+ srp_030 = (uae_u64)get_long (extra) << 32;
+ srp_030 |= get_long (extra + 4);
}
break;
case 0x13: // CRP
reg = "CRP";
siz = 8;
if (rw) {
- put_long(extra, crp_030 >> 32);
- put_long(extra + 4, crp_030);
+ put_long (extra, crp_030 >> 32);
+ put_long (extra + 4, crp_030);
} else {
- crp_030 = (uae_u64)get_long(extra) << 32;
- crp_030 |= get_long(extra + 4);
+ crp_030 = (uae_u64)get_long (extra) << 32;
+ crp_030 |= get_long (extra + 4);
}
break;
case 0x18: // MMUSR
reg = "MMUSR";
siz = 2;
if (rw)
- put_word(extra, mmusr_030);
+ put_word (extra, mmusr_030);
else
- mmusr_030 = get_word(extra);
+ mmusr_030 = get_word (extra);
break;
case 0x02: // TT0
reg = "TT0";
siz = 4;
if (rw)
- put_long(extra, tt0_030);
+ put_long (extra, tt0_030);
else
- tt0_030 = get_long(extra);
+ tt0_030 = get_long (extra);
break;
case 0x03: // TT1
reg = "TT1";
siz = 4;
if (rw)
- put_long(extra, tt1_030);
+ put_long (extra, tt1_030);
else
- tt1_030 = get_long(extra);
+ tt1_030 = get_long (extra);
break;
}
if (!reg) {
- op_illg(opcode, ®s);
+ op_illg (opcode, ®s);
return;
}
#if MMUOP_DEBUG > 0
{
uae_u32 val;
if (siz == 8) {
- uae_u32 val2 = get_long(extra);
- val = get_long(extra + 4);
+ uae_u32 val2 = get_long (extra);
+ val = get_long (extra + 4);
if (rw)
- write_log("PMOVE %s,%08X%08X", reg, val2, val);
+ write_log ("PMOVE %s,%08X%08X", reg, val2, val);
else
- write_log("PMOVE %08X%08X,%s", val2, val, reg);
+ write_log ("PMOVE %08X%08X,%s", val2, val, reg);
} else {
if (siz == 4)
- val = get_long(extra);
+ val = get_long (extra);
else
- val = get_word(extra);
+ val = get_word (extra);
if (rw)
- write_log("PMOVE %s,%08X", reg, val);
+ write_log ("PMOVE %s,%08X", reg, val);
else
- write_log("PMOVE %08X,%s", val, reg);
+ write_log ("PMOVE %08X,%s", val, reg);
}
write_log (" PC=%08X\n", pc);
}
#endif
if (currprefs.cs_mbdmac == 1 && currprefs.mbresmem_low_size > 0) {
if (otc != tc_030) {
- a3000_fakekick(tc_030 & 0x80000000);
+ a3000_fakekick (tc_030 & 0x80000000);
}
}
}
-static void mmu_op30_ptest(uaecptr pc, uae_u32 opcode, uae_u16 next, uaecptr extra)
+static void mmu_op30_ptest (uaecptr pc, uae_u32 opcode, uae_u16 next, uaecptr extra)
{
#if MMUOP_DEBUG > 0
char tmp[10];
tmp[0] = 0;
if ((next >> 8) & 1)
- sprintf(tmp,",A%d", (next >> 4) & 15);
- write_log("PTEST%c %02X,%08X,#%X%s PC=%08X\n",
- ((next >> 9) & 1) ? 'W' : 'R', (next & 15), extra, (next >> 10) & 7, tmp, pc);
+ sprintf (tmp, ",A%d", (next >> 4) & 15);
+ write_log ("PTEST%c %02X,%08X,#%X%s PC=%08X\n",
+ ((next >> 9) & 1) ? 'W' : 'R', (next & 15), extra, (next >> 10) & 7, tmp, pc);
#endif
mmusr_030 = 0;
}
-static void mmu_op30_pflush(uaecptr pc, uae_u32 opcode, uae_u16 next, uaecptr extra)
+static void mmu_op30_pflush (uaecptr pc, uae_u32 opcode, uae_u16 next, uaecptr extra)
{
#if MMUOP_DEBUG > 0
- write_log("PFLUSH PC=%08X\n", pc);
+ write_log ("PFLUSH PC=%08X\n", pc);
#endif
}
-void mmu_op30(uaecptr pc, uae_u32 opcode, struct regstruct *regs, int isnext, uaecptr extra)
+void mmu_op30 (uaecptr pc, uae_u32 opcode, struct regstruct *regs, int isnext, uaecptr extra)
{
if (currprefs.cpu_model != 68030) {
m68k_setpc (regs, pc);
return;
}
if (isnext) {
- uae_u16 next = get_word(pc + 2);
+ uae_u16 next = get_word (pc + 2);
if (next & 0x8000)
- mmu_op30_ptest(pc, opcode, next, extra);
+ mmu_op30_ptest (pc, opcode, next, extra);
else if (next & 0x2000)
mmu_op30_pflush (pc, opcode, next, extra);
else
- mmu_op30_pmove(pc, opcode, next, extra);
+ mmu_op30_pmove (pc, opcode, next, extra);
m68k_setpc (regs, m68k_getpc (regs) + 2);
} else {
#if MMUOP_DEBUG > 0
- write_log("MMU030: %04x PC=%08x\n", opcode, m68k_getpc(regs));
+ write_log ("MMU030: %04x PC=%08x\n", opcode, m68k_getpc (regs));
#endif
}
return;
}
-void mmu_op(uae_u32 opcode, struct regstruct *regs, uae_u32 extra)
+void mmu_op (uae_u32 opcode, struct regstruct *regs, uae_u32 extra)
{
#if MMUOP_DEBUG > 1
- write_log("mmu_op %04X PC=%08X\n", opcode, m68k_getpc(regs));
+ write_log ("mmu_op %04X PC=%08X\n", opcode, m68k_getpc (regs));
#endif
if ((opcode & 0xFE0) == 0x0500) {
/* PFLUSH */
/* PLPA */
if (currprefs.cpu_model == 68060) {
#if MMUOP_DEBUG > 0
- write_log("PLPA\n");
+ write_log ("PLPA\n");
#endif
return;
}
/* LPSTOP */
if (currprefs.cpu_model == 68060) {
#if MMUOP_DEBUG > 0
- write_log("LPSTOP\n");
+ write_log ("LPSTOP\n");
#endif
return;
}
}
#if MMUOP_DEBUG > 0
- write_log("Unknown MMU OP %04X\n", opcode);
+ write_log ("Unknown MMU OP %04X\n", opcode);
#endif
m68k_setpc (regs, m68k_getpc (regs) - 2);
op_illg (opcode, regs);
|| (opcode & 0xffc0) == 0x4ec0 /* JMP */
|| (opcode & 0xff00) == 0x6100 /* BSR */
|| ((opcode & 0xf000) == 0x6000 /* Bcc */
- && cctrue(®s.ccrflags, (opcode >> 8) & 0xf))
+ && cctrue (®s.ccrflags, (opcode >> 8) & 0xf))
|| ((opcode & 0xf0f0) == 0x5050 /* DBcc */
- && !cctrue(®s.ccrflags, (opcode >> 8) & 0xf)
- && (uae_s16)m68k_dreg(®s, opcode & 7) != 0))
+ && !cctrue (®s.ccrflags, (opcode >> 8) & 0xf)
+ && (uae_s16)m68k_dreg (®s, opcode & 7) != 0))
{
last_trace_ad = m68k_getpc (®s);
unset_special (®s, SPCFLAG_TRACE);
#ifdef ACTION_REPLAY
#ifdef ACTION_REPLAY_HRTMON
if ((regs->spcflags & SPCFLAG_ACTION_REPLAY) && hrtmon_flag != ACTION_REPLAY_INACTIVE) {
- int isinhrt = (m68k_getpc(regs) >= hrtmem_start && m68k_getpc(regs) < hrtmem_start + hrtmem_size);
+ int isinhrt = (m68k_getpc (regs) >= hrtmem_start && m68k_getpc (regs) < hrtmem_start + hrtmem_size);
/* exit from HRTMon? */
- if(hrtmon_flag == ACTION_REPLAY_ACTIVE && !isinhrt)
- hrtmon_hide();
+ if (hrtmon_flag == ACTION_REPLAY_ACTIVE && !isinhrt)
+ hrtmon_hide ();
/* HRTMon breakpoint? (not via IRQ7) */
- if(hrtmon_flag == ACTION_REPLAY_IDLE && isinhrt)
- hrtmon_breakenter();
- if(hrtmon_flag == ACTION_REPLAY_ACTIVATE)
- hrtmon_enter();
- if(!(regs->spcflags & ~SPCFLAG_ACTION_REPLAY))
+ if (hrtmon_flag == ACTION_REPLAY_IDLE && isinhrt)
+ hrtmon_breakenter ();
+ if (hrtmon_flag == ACTION_REPLAY_ACTIVATE)
+ hrtmon_enter ();
+ if (!(regs->spcflags & ~SPCFLAG_ACTION_REPLAY))
return 0;
}
#endif
- if ((regs->spcflags & SPCFLAG_ACTION_REPLAY) && action_replay_flag != ACTION_REPLAY_INACTIVE ) {
- /*if(action_replay_flag == ACTION_REPLAY_ACTIVE && !is_ar_pc_in_rom())*/
- /* write_log("PC:%p\n",m68k_getpc());*/
-
- if(action_replay_flag == ACTION_REPLAY_ACTIVATE || action_replay_flag == ACTION_REPLAY_DORESET)
- action_replay_enter();
- if(action_replay_flag == ACTION_REPLAY_HIDE && !is_ar_pc_in_rom())
- {
- action_replay_hide();
- unset_special(regs, SPCFLAG_ACTION_REPLAY);
- }
- if (action_replay_flag == ACTION_REPLAY_WAIT_PC )
- {
- /*write_log("Waiting for PC: %p, current PC= %p\n",wait_for_pc, m68k_getpc());*/
- if (m68k_getpc(regs) == wait_for_pc)
- {
+ if ((regs->spcflags & SPCFLAG_ACTION_REPLAY) && action_replay_flag != ACTION_REPLAY_INACTIVE) {
+ /*if (action_replay_flag == ACTION_REPLAY_ACTIVE && !is_ar_pc_in_rom ())*/
+ /* write_log ("PC:%p\n", m68k_getpc ());*/
+
+ if (action_replay_flag == ACTION_REPLAY_ACTIVATE || action_replay_flag == ACTION_REPLAY_DORESET)
+ action_replay_enter ();
+ if (action_replay_flag == ACTION_REPLAY_HIDE && !is_ar_pc_in_rom ()) {
+ action_replay_hide ();
+ unset_special (regs, SPCFLAG_ACTION_REPLAY);
+ }
+ if (action_replay_flag == ACTION_REPLAY_WAIT_PC) {
+ /*write_log ("Waiting for PC: %p, current PC= %p\n", wait_for_pc, m68k_getpc ());*/
+ if (m68k_getpc (regs) == wait_for_pc) {
action_replay_flag = ACTION_REPLAY_ACTIVATE; /* Activate after next instruction. */
}
}
/*n_spcinsns++;*/
#ifdef JIT
- unset_special(regs, SPCFLAG_END_COMPILE); /* has done its job */
+ unset_special (regs, SPCFLAG_END_COMPILE); /* has done its job */
#endif
while ((regs->spcflags & SPCFLAG_BLTNASTY) && dmaen (DMA_BLITTER) && cycles > 0 && !currprefs.blitter_cycle_exact) {
- int c = blitnasty();
+ int c = blitnasty ();
if (c > 0) {
cycles -= c * CYCLE_UNIT * 2;
if (cycles < CYCLE_UNIT)
if (regs->spcflags & SPCFLAG_DOTRACE)
Exception (9, regs, last_trace_ad);
-
+
if (regs->spcflags & SPCFLAG_TRAP) {
unset_special (regs, SPCFLAG_TRAP);
Exception (3, regs, 0);
if (regs->spcflags & SPCFLAG_INT) {
int intr = intlev ();
- unset_special (regs, SPCFLAG_INT | SPCFLAG_DOINT);
+ unset_special (regs, SPCFLAG_INT | SPCFLAG_DOINT);
if (intr != -1 && intr > regs->intmask)
do_interrupt (intr, regs);
}
if (regs->spcflags & SPCFLAG_DOINT) {
- unset_special (regs, SPCFLAG_DOINT);
- set_special (regs, SPCFLAG_INT);
+ unset_special (regs, SPCFLAG_DOINT);
+ set_special (regs, SPCFLAG_INT);
}
if ((regs->spcflags & (SPCFLAG_BRK | SPCFLAG_MODE_CHANGE))) {
static uae_u32 cd32nextpc, cd32request;
-static void out_cd32io2(void)
+static void out_cd32io2 (void)
{
uae_u32 request = cd32request;
//write_log ("ACTUAL=%d ERROR=%d\n", get_long (request + 32), get_byte (request + 31));
uae_u32 request = m68k_areg (®s, 1);
if (pc == cd32nextpc) {
- out_cd32io2();
+ out_cd32io2 ();
return;
}
out[0] = 0;
if (cd32request)
write_log ("old request still not returned!\n");
cd32request = request;
- cd32nextpc = get_long(m68k_areg (®s, 7));
- write_log("%s A1=%08.8X\n", out, request);
+ cd32nextpc = get_long (m68k_areg (®s, 7));
+ write_log ("%s A1=%08.8X\n", out, request);
if (ioreq) {
static int cnt = 26;
int cmd = get_word (request + 28);
if (cmd == 2) {
cnt--;
if (cnt == 0)
- activate_debugger(1);
+ activate_debugger (1);
}
#endif
write_log ("CMD=%d DATA=%08.8X LEN=%d %OFF=%d\n",
- cmd, get_long(request + 40),
- get_long(request + 36), get_long(request + 44));
+ cmd, get_long (request + 40),
+ get_long (request + 36), get_long (request + 44));
}
if (ioreq < 0)
- ;//activate_debugger();
+ ;//activate_debugger ();
}
#endif
count_instr (opcode);
#ifdef DEBUG_CD32IO
- out_cd32io(m68k_getpc(®s));
+ out_cd32io (m68k_getpc (®s));
#endif
#if 0
- int pc = m68k_getpc();
+ int pc = m68k_getpc ();
if (pc == 0xdff002)
- write_log("hip\n");
+ write_log ("hip\n");
if (pc != pcs[0] && (pc < 0xd00000 || pc > 0x1000000)) {
memmove (pcs + 1, pcs, 998 * 4);
pcs[0] = pc;
- //write_log("%08.8X-%04.4X ",pc, opcode);
+ //write_log ("%08.8X-%04.4X ", pc, opcode);
}
#endif
do_cycles (cpu_cycles);
#else
-/* cycle-exact m68k_run() */
+/* cycle-exact m68k_run () */
static void m68k_run_1_ce (void)
{
#ifdef JIT /* Completely different run_2 replacement */
-void do_nothing(void)
+void do_nothing (void)
{
/* What did you expect this to do? */
- do_cycles(0);
+ do_cycles (0);
/* I bet you didn't expect *that* ;-) */
}
-void exec_nostats(void)
+void exec_nostats (void)
{
struct regstruct *r = ®s;
for (;;)
{
- uae_u16 opcode = get_iword(r, 0);
+ uae_u16 opcode = get_iword (r, 0);
cpu_cycles = (*cpufunctbl[opcode])(opcode, r);
do_cycles (cpu_cycles);
- if (end_block(opcode) || r->spcflags)
+ if (end_block (opcode) || r->spcflags)
return; /* We will deal with the spcflags in the caller */
}
}
extern volatile int bsd_int_requested;
-void execute_normal(void)
+void execute_normal (void)
{
struct regstruct *r = ®s;
int blocklen;
cpu_history pc_hist[MAXRUN];
int total_cycles;
- if (check_for_cache_miss())
+ if (check_for_cache_miss ())
return;
total_cycles = 0;
total_cycles += cpu_cycles;
pc_hist[blocklen].specmem = special_mem;
blocklen++;
- if (end_block(opcode) || blocklen >= MAXRUN || r->spcflags || uae_int_requested) {
- compile_block(pc_hist,blocklen,total_cycles);
+ if (end_block (opcode) || blocklen >= MAXRUN || r->spcflags || uae_int_requested) {
+ compile_block (pc_hist, blocklen, total_cycles);
return; /* We will deal with the spcflags in the caller */
}
/* No need to check regs.spcflags, because if they were set,
}
}
-typedef void compiled_handler(void);
+typedef void compiled_handler (void);
static void m68k_run_2a (void)
{
uae_u32 pc = m68k_getpc (r);
#ifdef DEBUG_CD32IO
- out_cd32io(m68k_getpc(®s));
+ out_cd32io (m68k_getpc (®s));
#endif
do_cycles (cpu_cycles);
cpu_cycles &= cycles_mask;
cpu_cycles |= cycles_val;
if (mmu_triggered)
- mmu_do_hit();
+ mmu_do_hit ();
if (regs.spcflags) {
if (do_specialties (cpu_cycles, ®s))
return;
customreset (hardreset);
m68k_reset (hardreset);
if (hardreset) {
- memory_hardreset();
+ memory_hardreset ();
write_log ("hardreset, memory cleared\n");
}
#ifdef SAVESTATE
if (savestate_state == STATE_RESTORE || savestate_state == STATE_REWIND) {
map_overlay (1);
fill_prefetch_slow (®s); /* compatibility with old state saves */
- memory_map_dump();
+ memory_map_dump ();
}
savestate_restore_finish ();
#endif
uae_u32 opcode, val;
struct instr *dp;
- opcode = get_iword_1(0);
+ opcode = get_iword_1 (0);
last_op_for_exception_3 = opcode;
m68kpc_offset = 2;
m68kpc_offset = addr - m68k_getpc (®s);
if (buf)
- memset(buf, 0, bufsize);
+ memset (buf, 0, bufsize);
while (cnt-- > 0) {
char instrname[100], *ccpt;
int i;
for (lookup = lookuptab;lookup->mnemo != dp->mnemo; lookup++)
;
- buf = buf_out(buf, &bufsize, "%08lX ", m68k_getpc (®s) + m68kpc_offset);
+ buf = buf_out (buf, &bufsize, "%08lX ", m68k_getpc (®s) + m68kpc_offset);
m68kpc_offset += 2;
}
while (i++ < 5)
buf = buf_out (buf, &bufsize, " ");
- if (strlen(instrname) > 79) {
- int i = 0;
+ if (strlen (instrname) > 79) {
+ int i = 0;
}
buf = buf_out (buf, &bufsize, instrname);
if (ccpt != 0) {
if (deaddr)
*deaddr = newpc;
- if (cctrue(®s.ccrflags, dp->cc))
+ if (cctrue (®s.ccrflags, dp->cc))
buf = buf_out (buf, &bufsize, " == %08lX (TRUE)", newpc);
else
buf = buf_out (buf, &bufsize, " == %08lX (FALSE)", newpc);
{
char *buf;
- buf = (char*)malloc((MAX_LINEWIDTH + 1) * cnt);
+ buf = (char*)malloc ((MAX_LINEWIDTH + 1) * cnt);
if (!buf)
- return;
+ return;
m68k_disasm_2 (buf, (MAX_LINEWIDTH + 1) * cnt, addr, nextpc, cnt, seaddr, deaddr, 1);
- f_out(f, "%s", buf);
- free(buf);
+ f_out (f, "%s", buf);
+ free (buf);
}
void m68k_disasm (void *f, uaecptr addr, uaecptr *nextpc, int cnt)
{
char *buf;
- buf = (char*)malloc((MAX_LINEWIDTH + 1) * cnt);
+ buf = (char*)malloc ((MAX_LINEWIDTH + 1) * cnt);
if (!buf)
- return;
+ return;
m68k_disasm_2 (buf, (MAX_LINEWIDTH + 1) * cnt, addr, nextpc, cnt, NULL, NULL, 0);
- f_out(f, "%s", buf);
- free(buf);
+ f_out (f, "%s", buf);
+ free (buf);
}
/*************************************************************
Disasm the m68kcode at the given address into instrname
and instrcode
*************************************************************/
-void sm68k_disasm(char *instrname, char *instrcode, uaecptr addr, uaecptr *nextpc)
+void sm68k_disasm (char *instrname, char *instrcode, uaecptr addr, uaecptr *nextpc)
{
char *ccpt;
uae_u32 opcode;
int i;
for (i = 0; i < (m68kpc_offset - oldpc) / 2; i++)
{
- sprintf(instrcode,"%04x ",get_iword_1 (oldpc + i * 2));
- instrcode += strlen(instrcode);
+ sprintf (instrcode, "%04x ", get_iword_1 (oldpc + i * 2));
+ instrcode += strlen (instrcode);
}
}
case 0x807: regs.srp = val; break;
case 0x808: regs.pcr = val; break;
}
-}
+}
uae_u32 val_move2c (int regno)
{
case 0x808: return regs.pcr;
default: return 0;
}
-}
+}
void m68k_dumpstate (void *f, uaecptr *nextpc)
{
int i, j;
for (i = 0; i < 8; i++){
- f_out (f, " D%d %08lX ", i, m68k_dreg(®s, i));
+ f_out (f, " D%d %08lX ", i, m68k_dreg (®s, i));
if ((i & 3) == 3) f_out (f, "\n");
}
for (i = 0; i < 8; i++){
- f_out (f, " A%d %08lX ", i, m68k_areg(®s, i));
+ f_out (f, " A%d %08lX ", i, m68k_areg (®s, i));
if ((i & 3) == 3) f_out (f, "\n");
}
- if (regs.s == 0) regs.usp = m68k_areg(®s, 7);
- if (regs.s && regs.m) regs.msp = m68k_areg(®s, 7);
- if (regs.s && regs.m == 0) regs.isp = m68k_areg(®s, 7);
+ if (regs.s == 0) regs.usp = m68k_areg (®s, 7);
+ if (regs.s && regs.m) regs.msp = m68k_areg (®s, 7);
+ if (regs.s && regs.m == 0) regs.isp = m68k_areg (®s, 7);
j = 2;
- f_out(f, "USP %08.8X ISP %08.8X ", regs.usp, regs.isp);
+ f_out (f, "USP %08.8X ISP %08.8X ", regs.usp, regs.isp);
for (i = 0; m2cregs[i].regno>= 0; i++) {
- if (!movec_illg(m2cregs[i].regno)) {
+ if (!movec_illg (m2cregs[i].regno)) {
if (j > 0 && (j % 4) == 0)
- f_out(f, "\n");
- f_out (f, "%-4s %08.8X ", m2cregs[i].regname, val_move2c(m2cregs[i].regno));
+ f_out (f, "\n");
+ f_out (f, "%-4s %08.8X ", m2cregs[i].regname, val_move2c (m2cregs[i].regno));
j++;
}
}
f_out (f, "\n");
f_out (f, "T=%d%d S=%d M=%d X=%d N=%d Z=%d V=%d C=%d IMASK=%d STP=%d\n",
regs.t1, regs.t0, regs.s, regs.m,
- GET_XFLG(®s.ccrflags), GET_NFLG(®s.ccrflags), GET_ZFLG(®s.ccrflags),
- GET_VFLG(®s.ccrflags), GET_CFLG(®s.ccrflags),
+ GET_XFLG (®s.ccrflags), GET_NFLG (®s.ccrflags), GET_ZFLG (®s.ccrflags),
+ GET_VFLG (®s.ccrflags), GET_CFLG (®s.ccrflags),
regs.intmask, regs.stopped);
#ifdef FPUEMU
if (currprefs.fpu_model) {
f_out (f, "FP%d: %g ", i, regs.fp[i]);
if ((i & 3) == 3) f_out (f, "\n");
}
- fpsr = get_fpsr();
+ fpsr = get_fpsr ();
f_out (f, "N=%d Z=%d I=%d NAN=%d\n",
(fpsr & 0x8000000) != 0,
(fpsr & 0x4000000) != 0,
int i, flags, model;
uae_u32 l;
- changed_prefs.cpu_model = model = restore_u32();
- flags = restore_u32();
+ changed_prefs.cpu_model = model = restore_u32 ();
+ flags = restore_u32 ();
changed_prefs.address_space_24 = 0;
if (flags & CPUTYPE_EC)
changed_prefs.address_space_24 = 1;
regs.usp = restore_u32 ();
regs.isp = restore_u32 ();
regs.sr = restore_u16 ();
- l = restore_u32();
+ l = restore_u32 ();
if (l & CPUMODE_HALT) {
regs.stopped = 1;
set_special (®s, SPCFLAG_STOP);
currprefs.m68k_speed = changed_prefs.m68k_speed = -1;
}
if (model >= 68030) {
- crp_030 = restore_u64();
- srp_030 = restore_u64();
- tt0_030 =restore_u32();
- tt1_030 = restore_u32();
- tc_030 = restore_u32();
- mmusr_030 = restore_u16();
+ crp_030 = restore_u64 ();
+ srp_030 = restore_u64 ();
+ tt0_030 =restore_u32 ();
+ tt1_030 = restore_u32 ();
+ tc_030 = restore_u32 ();
+ mmusr_030 = restore_u16 ();
}
if (model >= 68040) {
- regs.itt0 = restore_u32();
- regs.itt1 = restore_u32();
- regs.dtt0 = restore_u32();
- regs.dtt1 = restore_u32();
- regs.tcr = restore_u32();
- regs.urp = restore_u32();
- regs.srp = restore_u32();
+ regs.itt0 = restore_u32 ();
+ regs.itt1 = restore_u32 ();
+ regs.dtt0 = restore_u32 ();
+ regs.dtt1 = restore_u32 ();
+ regs.tcr = restore_u32 ();
+ regs.urp = restore_u32 ();
+ regs.srp = restore_u32 ();
}
if (model >= 68060) {
- regs.buscr = restore_u32();
- regs.pcr = restore_u32();
+ regs.buscr = restore_u32 ();
+ regs.pcr = restore_u32 ();
}
if (flags & 0x80000000) {
- int khz = restore_u32();
- restore_u32();
+ int khz = restore_u32 ();
+ restore_u32 ();
if (khz > 0 && khz < 800000)
currprefs.m68k_speed = changed_prefs.m68k_speed = 0;
}
return src;
}
-void restore_cpu_finish(void)
+void restore_cpu_finish (void)
{
init_m68k ();
m68k_setpc (®s, regs.pc);
- set_cpu_caches();
+ set_cpu_caches ();
}
uae_u8 *save_cpu (int *len, uae_u8 *dstptr)
{
- uae_u8 *dstbak,*dst;
+ uae_u8 *dstbak, *dst;
int model, i, khz;
if (dstptr)
dstbak = dst = dstptr;
else
- dstbak = dst = (uae_u8*)malloc(1000);
+ dstbak = dst = (uae_u8*)malloc (1000);
model = currprefs.cpu_model;
save_u32 (model); /* MODEL */
save_u32 (0x80000000 | (currprefs.address_space_24 ? 1 : 0)); /* FLAGS */
- for(i = 0;i < 15; i++)
+ for (i = 0;i < 15; i++)
save_u32 (regs.regs[i]); /* D0-D7 A0-A6 */
save_u32 (m68k_getpc (®s)); /* PC */
save_u16 (regs.irc); /* prefetch */
save_u32 (regs.s ? regs.regs[15] : regs.isp); /* ISP */
save_u16 (regs.sr); /* SR/CCR */
save_u32 (regs.stopped ? CPUMODE_HALT : 0); /* flags */
- if(model >= 68010) {
+ if (model >= 68010) {
save_u32 (regs.dfc); /* DFC */
save_u32 (regs.sfc); /* SFC */
save_u32 (regs.vbr); /* VBR */
}
- if(model >= 68020) {
+ if (model >= 68020) {
save_u32 (regs.caar); /* CAAR */
save_u32 (regs.cacr); /* CACR */
save_u32 (regs.msp); /* MSP */
}
- if(model >= 68030) {
+ if (model >= 68030) {
save_u64 (crp_030); /* CRP */
save_u64 (srp_030); /* SRP */
save_u32 (tt0_030); /* TT0/AC0 */
save_u32 (tc_030); /* TCR */
save_u16 (mmusr_030); /* MMUSR/ACUSR */
}
- if(model >= 68040) {
+ if (model >= 68040) {
save_u32 (regs.itt0); /* ITT0 */
save_u32 (regs.itt1); /* ITT1 */
save_u32 (regs.dtt0); /* DTT0 */
save_u32 (regs.urp); /* URP */
save_u32 (regs.srp); /* SRP */
}
- if(model >= 68060) {
+ if (model >= 68060) {
save_u32 (regs.buscr); /* BUSCR */
save_u32 (regs.pcr); /* PCR */
}
if (currprefs.cpu_model >= 68020)
khz *= 2;
}
- save_u32 (khz); // clock rate in KHz: -1 = fastest possible
+ save_u32 (khz); // clock rate in KHz: -1 = fastest possible
save_u32 (0); // spare
*len = dst - dstbak;
return dstbak;
set_special (®s, SPCFLAG_BRK);
m68k_setpc (®s, 0xf80000);
#ifdef JIT
- set_special(®s, SPCFLAG_END_COMPILE);
+ set_special (®s, SPCFLAG_END_COMPILE);
#endif
fill_prefetch_slow (®s);
}
uae_u16 ins;
if (currprefs.cpu_compatible || currprefs.cpu_cycle_exact) {
- customreset (0);
+ customreset (0);
return;
}
- pc = m68k_getpc(®s);
+ pc = m68k_getpc (®s);
if (pc >= currprefs.chipmem_size) {
- addrbank *b = &get_mem_bank(pc);
- if (b->check(pc, 2 + 2)) {
+ addrbank *b = &get_mem_bank (pc);
+ if (b->check (pc, 2 + 2)) {
/* We have memory, hope for the best.. */
customreset (0);
return;
}
- write_log("M68K RESET PC=%x, rebooting..\n", pc);
+ write_log ("M68K RESET PC=%x, rebooting..\n", pc);
customreset (0);
m68k_setpc (®s, ksboot);
return;
m68k_setpc (®s, addr - 2);
return;
}
- write_log("M68K RESET PC=%x, rebooting..\n", pc);
+ write_log ("M68K RESET PC=%x, rebooting..\n", pc);
customreset (0);
m68k_setpc (®s, ksboot);
}
// Unsigned division
//
-STATIC_INLINE int getDivu68kCycles_2(uae_u32 dividend, uae_u16 divisor)
+STATIC_INLINE int getDivu68kCycles_2 (uae_u32 dividend, uae_u16 divisor)
{
- int mcycles;
- uae_u32 hdivisor;
- int i;
+ int mcycles;
+ uae_u32 hdivisor;
+ int i;
- if(divisor == 0)
- return 0;
+ if (divisor == 0)
+ return 0;
- // Overflow
- if((dividend >> 16) >= divisor)
- return (mcycles = 5) * 2;
+ // Overflow
+ if ((dividend >> 16) >= divisor)
+ return (mcycles = 5) * 2;
- mcycles = 38;
- hdivisor = divisor << 16;
+ mcycles = 38;
+ hdivisor = divisor << 16;
- for( i = 0; i < 15; i++)
- {
- uae_u32 temp;
- temp = dividend;
+ for (i = 0; i < 15; i++) {
+ uae_u32 temp;
+ temp = dividend;
- dividend <<= 1;
+ dividend <<= 1;
- // If carry from shift
- if((uae_s32)temp < 0)
- {
- dividend -= hdivisor;
- }
- else
- {
- mcycles += 2;
- if(dividend >= hdivisor)
- {
- dividend -= hdivisor;
- mcycles--;
- }
- }
+ // If carry from shift
+ if ((uae_s32)temp < 0)
+ dividend -= hdivisor;
+ else {
+ mcycles += 2;
+ if (dividend >= hdivisor) {
+ dividend -= hdivisor;
+ mcycles--;
+ }
}
- return mcycles * 2;
+ }
+ return mcycles * 2;
}
-int getDivu68kCycles(uae_u32 dividend, uae_u16 divisor)
+int getDivu68kCycles (uae_u32 dividend, uae_u16 divisor)
{
- int v = getDivu68kCycles_2(dividend, divisor) - 4;
-// write_log("U%d ", v);
+ int v = getDivu68kCycles_2 (dividend, divisor) - 4;
+// write_log ("U%d ", v);
return v;
}
// Signed division
//
-STATIC_INLINE int getDivs68kCycles_2(uae_s32 dividend, uae_s16 divisor)
+STATIC_INLINE int getDivs68kCycles_2 (uae_s32 dividend, uae_s16 divisor)
{
- int mcycles;
- uae_u32 aquot;
- int i;
+ int mcycles;
+ uae_u32 aquot;
+ int i;
- if(divisor == 0)
- return 0;
+ if (divisor == 0)
+ return 0;
- mcycles = 6;
+ mcycles = 6;
- if( dividend < 0)
- mcycles++;
+ if (dividend < 0)
+ mcycles++;
- // Check for absolute overflow
- if(((uae_u32)abs(dividend) >> 16) >= (uae_u16)abs(divisor))
- {
- return (mcycles + 2) * 2;
- }
+ // Check for absolute overflow
+ if (((uae_u32)abs (dividend) >> 16) >= (uae_u16)abs (divisor))
+ return (mcycles + 2) * 2;
- // Absolute quotient
- aquot = (uae_u32) abs(dividend) / (uae_u16)abs(divisor);
+ // Absolute quotient
+ aquot = (uae_u32) abs (dividend) / (uae_u16)abs (divisor);
- mcycles += 55;
+ mcycles += 55;
- if(divisor >= 0)
- {
- if(dividend >= 0)
- mcycles--;
- else
- mcycles++;
- }
+ if (divisor >= 0) {
+ if (dividend >= 0)
+ mcycles--;
+ else
+ mcycles++;
+ }
- // Count 15 msbits in absolute of quotient
+ // Count 15 msbits in absolute of quotient
- for( i = 0; i < 15; i++)
- {
- if((uae_s16)aquot >= 0)
- mcycles++;
- aquot <<= 1;
- }
+ for (i = 0; i < 15; i++) {
+ if ((uae_s16)aquot >= 0)
+ mcycles++;
+ aquot <<= 1;
+ }
- return mcycles * 2;
+ return mcycles * 2;
}
-int getDivs68kCycles(uae_s32 dividend, uae_s16 divisor)
+int getDivs68kCycles (uae_s32 dividend, uae_s16 divisor)
{
- int v = getDivs68kCycles_2(dividend, divisor) - 4;
-// write_log("S%d ", v);
+ int v = getDivs68kCycles_2 (dividend, divisor) - 4;
+// write_log ("S%d ", v);
return v;
}
{
if (arcacc_mod)
return 1;
- arcacc_mod = LoadLibrary ("archiveaccess-debug.dll");
+ arcacc_mod = LoadLibrary ("archiveaccess-debug.dll");
if (!arcacc_mod)
return 0;
- openArchive = (pOpenArchive) GetProcAddress (arcacc_mode, "openArchive");
+ openArchive = (pOpenArchive) GetProcAddress (arcacc_mode, "openArchive");
getFileCount = (pGetFileCount) GetProcAddress (arcacc_mode, "getFileCount");
- getFileInfo = (pGetFileInfo) GetProcAddress (arcacc_mode, "getFileInfo");
+ getFileInfo = (pGetFileInfo) GetProcAddress (arcacc_mode, "getFileInfo");
extract = (pExtract) GetProcAddress (arcacc_mode, "extract");
closeArchive = (pCloseArchive) GetProcAddress (arcacc_mode, "closeArchive");
if (!OpenArchive || !getFileCount || !getFileInfo || !extract || !closeArchive) {
/*
* UAE - The Un*x Amiga Emulator
- *
+ *
* Win32 interface
*
* Copyright 1997 Mathias Ortmann
* Copyright 1997-2001 Brian King
* Copyright 2000-2002 Bernd Roesch
*/
-
+
#define NATIVBUFFNUM 4
#define RECORDBUFFER 50 //survive 9 sec of blocking at 44100
static LPSTR lpData,sndptrout;
extern uae_u32 chipmem_mask;
unsigned int *sndbufrecpt;
-static char *ahisndbuffer,*sndrecbuffer;
+static char *ahisndbuffer,*sndrecbuffer;
static int ahisndbufsize,*ahisndbufpt,ahitweak;;
int ahi_pollrate = 40;
static LPDIRECTSOUNDCAPTUREBUFFER lpDSBprimary2r = NULL;
static LPDIRECTSOUNDCAPTUREBUFFER lpDSB2r = NULL;
-struct winuae //this struct is put in a6 if you call
+struct winuae //this struct is put in a6 if you call
//execute native function
{
HWND amigawnd; //adress of amiga Window Windows Handle
- unsigned int changenum; //number to detect screen close/open
+ unsigned int changenum; //number to detect screen close/open
unsigned int z3offset; //the offset to add to acsess Z3 mem from Dll side
};
static struct winuae uaevar;
#define CALL_NATIVE_FUNC2( d1,d2,d3,d4,d5,d6,d7,a1,a2,a3,a4,a5,a6,a7) if(native_func) return native_func( d1,d2,d3,d4,d5,d6,d7,a1,a2,a3,a4,a5,a6,a7,regs_ )
static uae_u32 REGPARAM2 emulib_ExecuteNativeCode2 (TrapContext *context)
-{
+{
unsigned int espstore;
- uae_u8* object_UAM = (uae_u8*) m68k_areg(&context->regs, 0);
- uae_u32 d1 = m68k_dreg(&context->regs, 1);
- uae_u32 d2 = m68k_dreg(&context->regs, 2);
- uae_u32 d3 = m68k_dreg(&context->regs, 3);
- uae_u32 d4 = m68k_dreg(&context->regs, 4);
- uae_u32 d5 = m68k_dreg(&context->regs, 5);
- uae_u32 d6 = m68k_dreg(&context->regs, 6);
- uae_u32 d7 = m68k_dreg(&context->regs, 7);
- uae_u32 a1 = m68k_areg(&context->regs, 1);
- uae_u32 a2 = m68k_areg(&context->regs, 2);
- uae_u32 a3 = m68k_areg(&context->regs, 3);
- uae_u32 a4 = m68k_areg(&context->regs, 4);
- uae_u32 a5 = m68k_areg(&context->regs, 5);
- uae_u32 a7 = m68k_areg(&context->regs, 7);
+ uae_u8* object_UAM = (uae_u8*) m68k_areg (&context->regs, 0);
+ uae_u32 d1 = m68k_dreg (&context->regs, 1);
+ uae_u32 d2 = m68k_dreg (&context->regs, 2);
+ uae_u32 d3 = m68k_dreg (&context->regs, 3);
+ uae_u32 d4 = m68k_dreg (&context->regs, 4);
+ uae_u32 d5 = m68k_dreg (&context->regs, 5);
+ uae_u32 d6 = m68k_dreg (&context->regs, 6);
+ uae_u32 d7 = m68k_dreg (&context->regs, 7);
+ uae_u32 a1 = m68k_areg (&context->regs, 1);
+ uae_u32 a2 = m68k_areg (&context->regs, 2);
+ uae_u32 a3 = m68k_areg (&context->regs, 3);
+ uae_u32 a4 = m68k_areg (&context->regs, 4);
+ uae_u32 a5 = m68k_areg (&context->regs, 5);
+ uae_u32 a7 = m68k_areg (&context->regs, 7);
uae_u32 regs_ = (uae_u32)&context->regs;
CREATE_NATIVE_FUNC_PTR2;
uaevar.z3offset = (uae_u32)(get_real_address (0x10000000) - 0x10000000);
uaevar.amigawnd = hAmigaWnd;
- a6 = &uaevar;
+ a6 = &uaevar;
if(object_UAM) {
SET_NATIVE_FUNC2(object_UAM);
__asm
}
//CALL_NATIVE_FUNC2( d1, d2,d3, d4, d5, d6, d7, a1, a2, a3, a4 , a5 , a6 , a7);
} else {
- return 0;
+ return 0;
}
}
void ahi_close_sound (void)
{
HRESULT hr = DS_OK;
-
+
if (!ahi_on)
return;
ahi_on = 0;
if (lpDSB2) {
hr = IDirectSoundBuffer_Stop (lpDSB2);
if(FAILED(hr))
- write_log( "AHI: SoundStop() failure: %s\n", DXError(hr));
+ write_log ( "AHI: SoundStop() failure: %s\n", DXError(hr));
} else {
- write_log( "AHI: Sound Stopped...\n" );
+ write_log ( "AHI: Sound Stopped...\n" );
}
if (lpDSB2)
if (lpDS2)
IDirectSound_Release (lpDS2);
lpDS2 = NULL;
-
+
if (lpDSB2r)
IDirectSoundCaptureBuffer_Release (lpDSB2r);
lpDSB2r = NULL;
if(hr != DSERR_BUFFERLOST) {
pos -= ahitweak;
if (pos < 0)
- pos += ahisndbufsize;
+ pos += ahisndbufsize;
if (pos >= ahisndbufsize)
pos -= ahisndbufsize;
pos = (pos / (amigablksize * 4)) * (amigablksize * 4);
hr = IDirectSoundBuffer_Lock(lpDSB2, oldpos, amigablksize * 4, &dwData1, &dwBytes1, &dwData2, &dwBytes2, 0);
if(hr == DSERR_BUFFERLOST) {
- write_log("AHI: lostbuf %d %x\n", pos, amigablksize);
+ write_log ("AHI: lostbuf %d %x\n", pos, amigablksize);
IDirectSoundBuffer_Restore(lpDSB2);
hr = IDirectSoundBuffer_Lock(lpDSB2, oldpos, amigablksize * 4, &dwData1, &dwBytes1, &dwData2, &dwBytes2, 0);
}
sndptrmax = ahisndbuffer + ahisndbufsize;
ahisndbufpt = (int*)ahisndbuffer;
-
- IDirectSoundBuffer_Unlock(lpDSB2, dwData1, dwBytes1, dwData2, dwBytes2);
+
+ IDirectSoundBuffer_Unlock(lpDSB2, dwData1, dwBytes1, dwData2, dwBytes2);
oldpos += amigablksize * 4;
if (oldpos >= ahisndbufsize)
// Record begin
hr = DirectSoundCaptureCreate(NULL, &lpDS2r, NULL);
if (FAILED(hr)) {
- write_log( "AHI: DirectSoundCaptureCreate() failure: %s\n", DXError(hr));
+ write_log ( "AHI: DirectSoundCaptureCreate() failure: %s\n", DXError(hr));
record_enabled = -1;
return 0;
}
sound_buffer_rec.dwBufferBytes = amigablksize * 4 * RECORDBUFFER;
sound_buffer_rec.lpwfxFormat = &wavfmt;
sound_buffer_rec.dwFlags = 0 ;
-
+
hr = IDirectSoundCapture_CreateCaptureBuffer(lpDS2r, &sound_buffer_rec, &lpDSB2r, NULL);
if (FAILED(hr)) {
- write_log ("AHI: CreateCaptureSoundBuffer() failure: %s\n", DXError(hr));
- record_enabled = -1;
+ write_log ("AHI: CreateCaptureSoundBuffer() failure: %s\n", DXError(hr));
+ record_enabled = -1;
return 0;
}
hr = IDirectSoundCaptureBuffer_Start(lpDSB2r, DSCBSTART_LOOPING);
if (FAILED(hr)) {
- write_log("AHI: DirectSoundCaptureBuffer_Start failed: %s\n", DXError(hr));
+ write_log ("AHI: DirectSoundCaptureBuffer_Start failed: %s\n", DXError(hr));
record_enabled = -1;
return 0;
}
record_enabled = 1;
- write_log("AHI: Init AHI Audio Recording \n");
+ write_log ("AHI: Init AHI Audio Recording \n");
return 1;
}
return;
hr = IDirectSoundBuffer_SetVolume (lpDSB2, vol);
if (FAILED(hr))
- write_log ("AHI: SetVolume(%d) failed: %s\n", vol, DXError (hr));
+ write_log ("AHI: SetVolume(%d) failed: %s\n", vol, DXError (hr));
}
static int ahi_init_sound_win32 (void)
HRESULT hr;
DSBUFFERDESC sound_buffer;
DSCAPS DSCaps;
-
+
if (lpDS2)
return 0;
return 0;
hr = DirectSoundCreate(&sound_device_guid[currprefs.win32_soundcard], &lpDS2, NULL);
if (FAILED(hr)) {
- write_log( "AHI: DirectSoundCreate() failure: %s\n", DXError(hr));
+ write_log ( "AHI: DirectSoundCreate() failure: %s\n", DXError(hr));
return 0;
}
memset (&sound_buffer, 0, sizeof(DSBUFFERDESC));
hr = IDirectSound_GetCaps(lpDS2, &DSCaps);
if(SUCCEEDED(hr)) {
if(DSCaps.dwFlags & DSCAPS_EMULDRIVER)
- write_log( "AHI: Your DirectSound Driver is emulated via WaveOut - yuck!\n" );
+ write_log ( "AHI: Your DirectSound Driver is emulated via WaveOut - yuck!\n" );
}
if FAILED(IDirectSound_SetCooperativeLevel(lpDS2, hMainWnd, DSSCL_PRIORITY))
return 0;
hr = IDirectSound_CreateSoundBuffer(lpDS2, &sound_buffer, &lpDSBprimary2, NULL);
if(FAILED(hr)) {
- write_log("AHI: CreateSoundBuffer() failure: %s\n", DXError(hr));
+ write_log ("AHI: CreateSoundBuffer() failure: %s\n", DXError(hr));
return 0;
}
hr = IDirectSoundBuffer_SetFormat(lpDSBprimary2, &wavfmt);
if(FAILED(hr)) {
- write_log( "AHI: SetFormat() failure: %s\n", DXError(hr));
+ write_log ( "AHI: SetFormat() failure: %s\n", DXError(hr));
return 0;
}
sound_buffer.dwBufferBytes = ahisndbufsize;
sound_buffer.guid3DAlgorithm = GUID_NULL;
hr = IDirectSound_CreateSoundBuffer(lpDS2, &sound_buffer, &lpDSB2, NULL);
if (FAILED(hr)) {
- write_log("AHI: CreateSoundBuffer() failure: %s\n", DXError(hr));
+ write_log ("AHI: CreateSoundBuffer() failure: %s\n", DXError(hr));
return 0;
}
hr = IDirectSoundBuffer_GetFormat(lpDSBprimary2,&wavfmt,500,0);
if(FAILED(hr)) {
- write_log("AHI: GetFormat() failure: %s\n", DXError(hr));
+ write_log ("AHI: GetFormat() failure: %s\n", DXError(hr));
return 0;
}
ahisndbufpt =(int*)ahisndbuffer;
sndptrmax = ahisndbuffer + ahisndbufsize;
memset(ahisndbuffer, soundneutral, amigablksize * 8);
- write_log("AHI: Init AHI Sound Rate %d, Channels %d, Bits %d, Buffsize %d\n",
- sound_freq_ahi, sound_channels_ahi, sound_bits_ahi, amigablksize);
+ write_log ("AHI: Init AHI Sound Rate %d, Channels %d, Bits %d, Buffsize %d\n",
+ sound_freq_ahi, sound_channels_ahi, sound_bits_ahi, amigablksize);
ahi_on = 1;
return sound_freq_ahi;
}
int ahi_open_sound (void)
-{
+{
int rate;
uaevar.changenum++;
if ((rate = ahi_init_sound_win32 ()))
return rate;
return 0;
-}
+}
static void *bswap_buffer = NULL;
uae_u32 REGPARAM2 ahi_demux (TrapContext *context)
{
-//use the extern int (6 #13)
+//use the extern int (6 #13)
// d0 0=opensound d1=unit d2=samplerate d3=blksize ret: sound frequency
// d0 6=opensound_new d1=unit d2=samplerate d3=blksize ret d4=channels d5=bits d6=zero: sound frequency
// d0 1=closesound d1=unit
-// d0 2=writesamples d1=unit a0=addr write blksize samples to card
+// d0 2=writesamples d1=unit a0=addr write blksize samples to card
// d0 3=readsamples d1=unit a0=addr read samples from card ret: d0=samples read
- // make sure you have from amigaside blksize*4 mem alloced
+ // make sure you have from amigaside blksize*4 mem alloced
// d0=-1 no data available d0=-2 no recording open
// d0 > 0 there are more blksize Data in the que
// do the loop until d0 get 0
// d0=12 write clipboard data a0=clipboarddata
// d0=13 setp96mouserate d1=hz value
// d0=100 open dll d1=dll name in windows name conventions
-// d0=101 get dll function addr d1=dllhandle a0 function/var name
+// d0=101 get dll function addr d1=dllhandle a0 function/var name
// d0=102 exec dllcode a0=addr of function (see 101)
// d0=103 close dll
// d0=104 screenlost
int i;
uaecptr addr = m68k_areg (&context->regs, 0);
for (i = 0; i < amigablksize * 4; i += 4)
- *ahisndbufpt++ = get_long(addr + i);
+ *ahisndbufpt++ = get_long (addr + i);
ahi_finish_sound_buffer();
}
return amigablksize;
if ((cap_pos + t) < (t * RECORDBUFFER))
cap_pos = cap_pos + t;
else
- cap_pos = 0;
+ cap_pos = 0;
addr = m68k_areg (&context->regs, 0);
sndbufrecpt = (unsigned int*)pos1;
t /= 4;
for (i = 0; i < t; i++) {
- put_long(addr, *sndbufrecpt++);
+ put_long (addr, *sndbufrecpt++);
addr += 4;
}
t *= 4;
{
int i;
for (i = 0; i < clipsize; i++)
- put_byte(m68k_areg (&context->regs, 0) + i, clipdat[i]);
+ put_byte (m68k_areg (&context->regs, 0) + i, clipdat[i]);
CloseClipboard();
}
return 0;
GlobalUnlock (p);
SetClipboardData (CF_TEXT,p2);
}
- }
+ }
CloseClipboard ();
}
}
dllname = (char *) m68k_areg (&context->regs, 0);
dllname = (char *)get_real_address ((uae_u32)dllname);
result=(uae_u32) LoadLibrary(dllname);
- write_log("%s windows dll/alib loaded at %d (0 mean failure)\n",dllname,result);
+ write_log ("%s windows dll/alib loaded at %d (0 mean failure)\n",dllname,result);
syncdivisor = (3580000.0 * CYCLE_UNIT) / (double)syncbase;
return result;
}
uae_u32 ret;
unsigned long rate1;
double v;
- rate1 = read_processor_time();
+ rate1 = read_processor_time();
ret = emulib_ExecuteNativeCode2 (context);
rate1 = read_processor_time() - rate1;
v = syncdivisor * rate1;
#if defined(X86_MSVC_ASSEMBLY)
case 105: //returns memory offset
- return (uae_u32) get_real_address(0);
+ return (uae_u32) get_real_address (0);
case 106: //byteswap 16bit vars
//a0 = start address
//d1 = number of 16bit vars
//returns address of new array
- src = m68k_areg(&context->regs, 0);
- num_vars = m68k_dreg(&context->regs, 1);
+ src = m68k_areg (&context->regs, 0);
+ num_vars = m68k_dreg (&context->regs, 1);
if (bswap_buffer_size < num_vars * 2) {
bswap_buffer_size = (num_vars + 1024) * 2;
//a0 = start address
//d1 = number of 32bit vars
//returns address of new array
- src = m68k_areg(&context->regs, 0);
- num_vars = m68k_dreg(&context->regs, 1);
+ src = m68k_areg (&context->regs, 0);
+ num_vars = m68k_dreg (&context->regs, 1);
if (bswap_buffer_size < num_vars * 4) {
bswap_buffer_size = (num_vars + 16384) * 4;
free(bswap_buffer);
mov esi, dword ptr [src]
mov edi, dword ptr [bswap_buffer]
mov ecx, num_vars
-
+
mov ebx, ecx
and ecx, 3
je BSWAP_DWORD_4X
/*
UAE - The Ultimate Amiga Emulator
-
+
avioutput.c
-
+
Copyright(c) 2001 - 2002; §ane
2005-2006; Toni Wilen
{
case FORMATCHOOSE_FORMATTAG_VERIFY:
switch(lParam) // remove known error prone codecs
- {
+ {
case WAVE_FORMAT_ADPCM: // 0x0002 Microsoft Corporation
case WAVE_FORMAT_IMA_ADPCM: // 0x0011 Intel Corporation
case WAVE_FORMAT_GSM610: // 0x0031 Microsoft Corporation
wfxSrc.cbSize = 0;
if(!(pwfxDst = (LPWAVEFORMATEX) malloc(wfxMaxFmtSize)))
- return 0;
+ return 0;
// set the initial destination format to match source
memset(pwfxDst, 0, wfxMaxFmtSize);
if (!AVIOutput_AllocateAudio())
return 0;
if (AVIOutput_GetAudioFromRegistry(pwfxDst)) {
- AVIOutput_GetAudioCodecName(pwfxDst, name, len);
- return 1;
+ AVIOutput_GetAudioCodecName(pwfxDst, name, len);
+ return 1;
}
AVIOutput_ReleaseAudio();
return 0;
{
AVIOutput_End();
if (!AVIOutput_AllocateAudio())
- return 0;
+ return 0;
acmopt.hwndOwner = hwnd;
acmopt.pfnHook = acmFilterChooseHookProc;
}
return 1;
}
-
+
case ACMERR_CANCELED:
AVIOutput_GetAudioFromRegistry(NULL);
AVIOutput_ReleaseAudio();
break;
-
+
case ACMERR_NOTPOSSIBLE:
MessageBox(hwnd, "The buffer identified by the pwfx member of the ACMFORMATCHOOSE structure is too small to contain the selected format.", VersionStr, MB_OK | MB_ICONERROR | MB_APPLMODAL | MB_SETFOREGROUND);
break;
-
+
case MMSYSERR_INVALFLAG:
MessageBox(hwnd, "At least one flag is invalid.", VersionStr, MB_OK | MB_ICONERROR | MB_APPLMODAL | MB_SETFOREGROUND);
break;
-
+
case MMSYSERR_INVALHANDLE:
MessageBox(hwnd, "The specified handle is invalid.", VersionStr, MB_OK | MB_ICONERROR | MB_APPLMODAL | MB_SETFOREGROUND);
break;
-
+
case MMSYSERR_INVALPARAM:
MessageBox(hwnd, "At least one parameter is invalid.", VersionStr, MB_OK | MB_ICONERROR | MB_APPLMODAL | MB_SETFOREGROUND);
break;
-
+
case MMSYSERR_NODRIVER:
MessageBox(hwnd, "A suitable driver is not available to provide valid format selections.", VersionStr, MB_OK | MB_ICONERROR | MB_APPLMODAL | MB_SETFOREGROUND);
break;
-
+
default:
MessageBox(hwnd, "acmFormatChoose() FAILED", VersionStr, MB_OK | MB_ICONERROR | MB_APPLMODAL | MB_SETFOREGROUND);
break;
if (!avioutput_width || !avioutput_height || !avioutput_bits) {
avioutput_width = workprefs.gfx_size.width;
avioutput_height = workprefs.gfx_size.height;
- avioutput_bits = 24;
+ avioutput_bits = 24;
}
if(!(lpbi = (LPBITMAPINFOHEADER) malloc(sizeof(BITMAPINFOHEADER) + (((avioutput_bits <= 8) ? 1 << avioutput_bits : 0) * sizeof(RGBQUAD)))))
- return 0;
+ return 0;
lpbi->biSize = sizeof(BITMAPINFOHEADER);
lpbi->biWidth = avioutput_width;
pcv->cbState = 0;
if (RegQueryValueEx(avikey, "VideoConfigurationState", 0, NULL, NULL, &ss) == ERROR_SUCCESS) {
if (ss > 0) {
- LPBYTE state = xmalloc (ss);
+ LPBYTE state = xmalloc (ss);
if (RegQueryValueEx(avikey, "VideoConfigurationState", 0, NULL, state, &ss) == ERROR_SUCCESS) {
pcv->hic = ICOpen(pcv->fccType, pcv->fccHandler, ICMODE_COMPRESS);
if (pcv->hic) {
ICSetState(pcv->hic, state, ss);
}
}
- xfree (state);
+ xfree (state);
} else {
ok = 1;
}
return 1;
}
if(ICGetInfo(pcv->hic, &icinfo, sizeof(ICINFO)) != 0) {
- if(WideCharToMultiByte(CP_ACP, 0, icinfo.szDescription, -1, name, len, NULL, NULL) != 0)
+ if(WideCharToMultiByte(CP_ACP, 0, icinfo.szDescription, -1, name, len, NULL, NULL) != 0)
return 1;
}
return 0;
return 0;
AVIOutput_FreeCOMPVARS(pcompvars);
if (AVIOutput_GetCOMPVARSFromRegistry(pcompvars)) {
- AVIOutput_GetVideoCodecName(pcompvars, name, len);
- return 1;
+ AVIOutput_GetVideoCodecName(pcompvars, name, len);
+ return 1;
}
AVIOutput_ReleaseVideo();
return 0;
{
AVIOutput_End();
if (!AVIOutput_AllocateVideo())
- return 0;
+ return 0;
AVIOutput_FreeCOMPVARS(pcompvars);
// we really should check first to see if the user has a particular compressor installed before we set one
return AVIOutput_GetVideoCodecName(pcompvars, s, len);
} else {
AVIOutput_GetCOMPVARSFromRegistry(NULL);
- AVIOutput_ReleaseVideo();
+ AVIOutput_ReleaseVideo();
return 0;
}
}
return;
strcpy (fn, avioutput_filename_tmp);
sprintf (avioutput_filename, "%s_%d.avi", fn, tmp_partcnt);
- write_log("AVI split %d at %d bytes, %d frames\n",
+ write_log ("AVI split %d at %d bytes, %d frames\n",
tmp_partcnt, total_avi_size, frame_count);
AVIOutput_End ();
first_frame = 0;
total_avi_size += written;
acmStreamUnprepareHeader(has, &ash, 0);
-
+
if(lpAudio) {
free(lpAudio);
lpAudio = NULL;
goto error;
}
}
-
+
if((err = AVIStreamWrite(AVIVideoStream, frame_count, 1, lpVideo, lpbi->biSizeImage, 0, NULL, &written)) != 0)
{
gui_message("AVIStreamWrite() FAILED (%X)\n", err);
partcnt = 0;
if (wavfile) {
- writewavheader (ftell (wavfile));
- fclose (wavfile);
- wavfile = 0;
+ writewavheader (ftell (wavfile));
+ fclose (wavfile);
+ wavfile = 0;
}
LeaveCriticalSection(&AVIOutput_CriticalSection);
char *ext1, *ext2;
if (avioutput_enabled) {
- if (!avioutput_requested)
+ if (!avioutput_requested)
AVIOutput_End ();
return;
}
if (!avioutput_requested)
- return;
+ return;
changed_prefs.sound_auto = currprefs.sound_auto = 0;
reset_sound ();
if (avioutput_audio == AVIAUDIO_WAV) {
- ext1 = ".wav"; ext2 = ".avi";
+ ext1 = ".wav"; ext2 = ".avi";
} else {
- ext1 = ".avi"; ext2 = ".wav";
+ ext1 = ".avi"; ext2 = ".wav";
}
if (strlen (avioutput_filename) >= 4 && !strcmpi (avioutput_filename + strlen (avioutput_filename) - 4, ext2))
- avioutput_filename[strlen (avioutput_filename) - 4] = 0;
+ avioutput_filename[strlen (avioutput_filename) - 4] = 0;
if (strlen (avioutput_filename) >= 4 && strcmpi (avioutput_filename + strlen (avioutput_filename) - 4, ext1))
- strcat (avioutput_filename, ext1);
+ strcat (avioutput_filename, ext1);
strcpy (avioutput_filename_tmp, avioutput_filename);
i = strlen (avioutput_filename_tmp) - 1;
while (i > 0 && avioutput_filename_tmp[i] != '.') i--;
if (i > 0)
- avioutput_filename_tmp[i] = 0;
+ avioutput_filename_tmp[i] = 0;
avioutput_needs_restart = 0;
avioutput_enabled = avioutput_audio || avioutput_video;
DeleteFile(avioutput_filename);
if (avioutput_audio == AVIAUDIO_WAV) {
- wavfile = fopen (avioutput_filename, "wb");
- if (!wavfile) {
+ wavfile = fopen (avioutput_filename, "wb");
+ if (!wavfile) {
gui_message("Failed to open wave-file\n\nThis can happen if the path and or file name was entered incorrectly.\n");
goto error;
}
write_log ("wave-output to '%s' started\n", avioutput_filename);
return;
}
-
+
if(((err = AVIFileOpen(&pfile, avioutput_filename, OF_CREATE | OF_WRITE, NULL)) != 0)) {
gui_message("AVIFileOpen() FAILED (Error %X)\n\nThis can happen if the path and or file name was entered incorrectly.\nRequired *.avi extension.\n", err);
goto error;
}
-
+
if(avioutput_audio) {
if (!AVIOutput_AllocateAudio())
goto error;
void AVIOutput_Release(void)
{
AVIOutput_End();
-
+
AVIOutput_ReleaseAudio();
AVIOutput_ReleaseVideo();
pcompvars = (PCOMPVARS) malloc(sizeof(COMPVARS));
if (!pcompvars)
- return;
+ return;
memset(pcompvars, 0, sizeof(COMPVARS));
pcompvars->cbSize = sizeof(COMPVARS);
skipsample += idiff / 10;
if (skipsample > 4)
skipsample = 4;
- write_log("%d ", skipsample);
+ write_log ("%d ", skipsample);
}
sound_setadjust (0.0);
#if 0
- write_log("%d ", idiff);
+ write_log ("%d ", idiff);
diff = idiff / 20.0;
skipmode = pow (diff < 0 ? -diff : diff, EXP);
if (idiff < 0)
skipmode = -ADJUST_SIZE;
if (skipmode > ADJUST_SIZE)
skipmode = ADJUST_SIZE;
- write_log("%d/%.2f\n", idiff, skipmode);
+ write_log ("%d/%.2f\n", idiff, skipmode);
sound_setadjust (skipmode);
if (0 && !(frame_count % avioutput_fps))
- write_log("AVIOutput: diff=%.2f skip=%.2f (%d-%d=%d)\n", diff, skipmode,
+ write_log ("AVIOutput: diff=%.2f skip=%.2f (%d-%d=%d)\n", diff, skipmode,
StreamSizeAudio, StreamSizeAudioExpected, idiff);
#endif
}
/*
UAE - The Ultimate Amiga Emulator
-
+
avioutput.h
-
+
Copyright(c) 2001 - 2002 §ane
*/
if(vsFileInfo) {
memcpy (ver, vsFileInfo, sizeof (*ver));
ok = TRUE;
- write_log("%s version %d.%d.%d.%d\n", name,
+ write_log ("%s version %d.%d.%d.%d\n", name,
vsFileInfo->dwFileVersionMS >> 16,
vsFileInfo->dwFileVersionMS & 0xffff,
vsFileInfo->dwFileVersionLS >> 16,
if (frog < 0)
return NULL;
frog = -1;
- if (getversion(path_frog, &ver))
+ if (getversion(path_frog, &ver))
frog = 1;
return path_frog;
case 1: // Nero
{
- HKEY key;
+ HKEY key;
DWORD type = REG_SZ;
DWORD size = sizeof (path_nero);
if (nero > 0)
}
return NULL;
}
- RegCloseKey (key);
+ RegCloseKey (key);
}
}
return NULL;
struct scg_local {
int dummy;
};
-#define scglocal(p) ((struct scg_local *)((p)->local))
+#define scglocal(p) ((struct scg_local *)((p)->local))
static SCSI *openscsi (int busno, int tgt, int tlun)
{
case SS_MISMATCHED_COMPONENTS: /* 0xE7 The DLLs/EXEs of ASPI don't */
/* version check */
case SS_NO_ADAPTERS: /* 0xE8 No host adapters to manager */
-
+
case SS_ASPI_IS_SHUTDOWN: /* 0xEA Call came to ASPI after */
/* PROCESS_DETACH */
case SS_BAD_INSTALL: /* 0xEB The DLL or other components */
s.SRB_CDBLen = sp->cdb_len; /* SCSI command length */
s.SRB_PostProc = Event; /* Post proc event */
s.SRB_SenseLen = SENSE_LEN; /* Lenght of sense buffer */
-
+
/*
* Do we receive data from this ASPI command?
*/
cis->isatapi = 1;
} else
write_log (",SCSI");
- write_log("]");
+ write_log ("]");
if (use) {
unitcnt++;
cis->buf = malloc (DEVICE_SCSI_BUFSIZE);
return 0;
ok = execscsicmd_in(unitnum, cmd1, sizeof cmd1, &outlen) ? 1 : 0;
if (ok) {
- di->bytespersector = (p[4] << 24) | (p[5] << 16) | (p[6] << 8) | p[7];
+ di->bytespersector = (p[4] << 24) | (p[5] << 16) | (p[6] << 8) | p[7];
di->cylinders = (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3];
}
if (di->type == INQ_DASD) {
- uae_u8 cmd2[10] = { 0x5a,0x08,0,0,0,0,0,0,0x10,0 }; /* MODE SENSE */
- ok = execscsicmd_in(unitnum, cmd2, sizeof cmd2, &outlen) ? 1 : 0;
+ uae_u8 cmd2[10] = { 0x5a,0x08,0,0,0,0,0,0,0x10,0 }; /* MODE SENSE */
+ ok = execscsicmd_in(unitnum, cmd2, sizeof cmd2, &outlen) ? 1 : 0;
if (ok) {
di->write_protected = (p[3]& 0x80) ? 1 : 0;
}
if (err == MMSYSERR_NOERROR)
return;
if (mciGetErrorString(err, es, sizeof es))
- write_log("MCIErr: %s: %d = '%s'\n", str, err, es);
+ write_log ("MCIErr: %s: %d = '%s'\n", str, err, es);
}
static int win32_error (int unitnum, const char *format,...)
if (ciw->h != INVALID_HANDLE_VALUE) {
if (log_scsi)
- write_log("IOCTL: IOCTL close\n");
+ write_log ("IOCTL: IOCTL close\n");
CloseHandle(ciw->h);
if (log_scsi)
- write_log("IOCTL: IOCTL close completed\n");
+ write_log ("IOCTL: IOCTL close completed\n");
ciw->h = INVALID_HANDLE_VALUE;
return 1;
}
ciw->playend = -1;
if (ciw->mciid > 0) {
if (log_scsi)
- write_log("IOCTL: MCI close\n");
+ write_log ("IOCTL: MCI close\n");
mcierr("MCI_STOP", mciSendCommand(ciw->mciid, MCI_STOP, MCI_WAIT, (DWORD_PTR)&gp));
mcierr("MCI_CLOSE", mciSendCommand(ciw->mciid, MCI_CLOSE, MCI_WAIT, (DWORD_PTR)&gp));
if (log_scsi)
- write_log("IOCTL: MCI close completed\n");
- ciw->mciid = 0;
+ write_log ("IOCTL: MCI close completed\n");
+ ciw->mciid = 0;
return 1;
}
return 0;
return 1;
closed = close_mci(unitnum);
if (log_scsi)
- write_log("IOCTL: opening IOCTL %s\n", ciw->devname);
+ write_log ("IOCTL: opening IOCTL %s\n", ciw->devname);
for (;;) {
flags = GENERIC_READ;
ciw->h = CreateFile(ciw->devname, flags, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
}
}
if (closed)
- write_log("IOCTL: failed to re-open '%s', err=%d\n", ciw->devname, GetLastError());
+ write_log ("IOCTL: failed to re-open '%s', err=%d\n", ciw->devname, GetLastError());
return 0;
}
}
break;
}
if (log_scsi)
- write_log("IOCTL: IOCTL open completed\n");
+ write_log ("IOCTL: IOCTL open completed\n");
return 1;
}
ciw->playend = -1;
closed = close_createfile(unitnum);
if (log_scsi)
- write_log("IOCTL: MCI opening %c:\n", ciw->drvletter);
+ write_log ("IOCTL: MCI opening %c:\n", ciw->drvletter);
memset (&mciOpen, 0, sizeof(mciOpen));
mciOpen.lpstrDeviceType = (LPSTR)MCI_DEVTYPE_CD_AUDIO;
sprintf(elname,"%c:", ciw->drvletter);
return 0;
}
if (log_scsi)
- write_log("IOCTL: MCI open completed\n");
+ write_log ("IOCTL: MCI open completed\n");
return 1;
}
if (ciw->mciid > 0) {
- MCI_GENERIC_PARMS gp = { 0 };
+ MCI_GENERIC_PARMS gp = { 0 };
if (paused)
mcierr("MCI_PAUSE", mciSendCommand(ciw->mciid, MCI_PAUSE, MCI_WAIT, (DWORD_PTR)&gp));
else
if (ciw->mciid > 0) {
- MCI_GENERIC_PARMS gp = { 0 };
+ MCI_GENERIC_PARMS gp = { 0 };
mcierr("MCI_STOP", mciSendCommand(ciw->mciid, MCI_STOP, MCI_WAIT, (DWORD_PTR)&gp));
ciw->playend = -1;
{
VOLUME_CONTROL vc;
if (!DeviceIoControl(ciw32[unitnum].h, IOCTL_CDROM_GET_VOLUME, NULL, 0, &vc, sizeof(vc), &len, NULL))
- write_log("IOCTL_CDROM_GET_VOLUME %d\n", GetLastError());
+ write_log ("IOCTL_CDROM_GET_VOLUME %d\n", GetLastError());
vc.PortVolume[0] = 0xff;
vc.PortVolume[1] = 0xff;
vc.PortVolume[2] = 0xff;
vc.PortVolume[3] = 0xff;
if (!DeviceIoControl(ciw32[unitnum].h, IOCTL_CDROM_SET_VOLUME, &vc, sizeof(vc), NULL, 0, &len, NULL))
- write_log("IOCTL_CDROM_SET_VOLUME %d\n", GetLastError());
+ write_log ("IOCTL_CDROM_SET_VOLUME %d\n", GetLastError());
}
-#endif
+#endif
while (cnt-- > 0) {
pa.StartingM = start >> 16;
if (ciw->mciid > 0) {
- static uae_u8 buf[4 + 12];
- MCI_STATUS_PARMS mciStatusParms;
+ static uae_u8 buf[4 + 12];
+ MCI_STATUS_PARMS mciStatusParms;
DWORD err, mode;
uae_u8 *p;
uae_u32 pos, pos2;
memset(buf, 0, sizeof buf);
memset(&mciStatusParms, 0, sizeof mciStatusParms);
mciStatusParms.dwItem = MCI_STATUS_MODE;
- err = mciSendCommand(ciw->mciid, MCI_STATUS, MCI_STATUS_ITEM | MCI_WAIT, (DWORD)(LPVOID)&mciStatusParms);
+ err = mciSendCommand(ciw->mciid, MCI_STATUS, MCI_STATUS_ITEM | MCI_WAIT, (DWORD)(LPVOID)&mciStatusParms);
if (err != MMSYSERR_NOERROR)
return 0;
mode = mciStatusParms.dwReturn;
mciStatusParms.dwItem = MCI_STATUS_CURRENT_TRACK;
- err = mciSendCommand(ciw->mciid, MCI_STATUS, MCI_STATUS_ITEM | MCI_WAIT, (DWORD)(LPVOID)&mciStatusParms);
+ err = mciSendCommand(ciw->mciid, MCI_STATUS, MCI_STATUS_ITEM | MCI_WAIT, (DWORD)(LPVOID)&mciStatusParms);
if (err != MMSYSERR_NOERROR)
return 0;
trk = mciStatusParms.dwReturn - 1;
if (trk < 0)
trk = 0;
mciStatusParms.dwItem = MCI_STATUS_POSITION;
- err = mciSendCommand(ciw->mciid, MCI_STATUS, MCI_STATUS_ITEM | MCI_WAIT, (DWORD)(LPVOID)&mciStatusParms);
+ err = mciSendCommand(ciw->mciid, MCI_STATUS, MCI_STATUS_ITEM | MCI_WAIT, (DWORD)(LPVOID)&mciStatusParms);
if (err != MMSYSERR_NOERROR)
return 0;
pos = (((mciStatusParms.dwReturn >> 16) & 0xff) << 0) | (((mciStatusParms.dwReturn >> 8) & 0xff) << 8) | (((mciStatusParms.dwReturn >> 0) & 0xff) << 16);
uae_u8 *p = ciw32[unitnum].tempbuffer;
if (log_scsi)
- write_log("rawread unit=%d sector=%d blocksize=%d tm=%d\n", unitnum, sector, size, tm[track_mode]);
+ write_log ("rawread unit=%d sector=%d blocksize=%d tm=%d\n", unitnum, sector, size, tm[track_mode]);
if (!open_createfile(unitnum))
return 0;
if (size != 2336 && size != 2352 && size != 2048)
p, IOCTL_DATA_BUFFER, &len, NULL)) {
reseterrormode (unitnum);
if (win32_error (unitnum, "IOCTL_CDROM_RAW_READ") < 0)
- continue;
+ continue;
return 0;
}
reseterrormode (unitnum);
if (!unitcheck (unitnum))
return 0;
if (quick) {
- struct dev_info_ioctl *ciw = &ciw32[unitnum];
+ struct dev_info_ioctl *ciw = &ciw32[unitnum];
return ciw->mediainserted;
- }
+ }
return ismedia(unitnum);
}
#include <stddef.h>
-#include <devioctl.h>
+#include <devioctl.h>
#include <ntddstor.h>
#include <winioctl.h>
#include <initguid.h> // Guid definition
if (!status) {
int lasterror = GetLastError();
*err = lasterror;
- write_log("SCSI ERROR, H=%X:%d:%d:%d:%d: ", di->handle, di->bus, di->path, di->target, di->lun);
- write_log("Status = %d, Error code = %d, LastError=%d\n", status, swb->spt.ScsiStatus, lasterror);
+ write_log ("SCSI ERROR, H=%X:%d:%d:%d:%d: ", di->handle, di->bus, di->path, di->target, di->lun);
+ write_log ("Status = %d, Error code = %d, LastError=%d\n", status, swb->spt.ScsiStatus, lasterror);
scsi_log_before (swb->spt.Cdb, swb->spt.CdbLength,
swb->spt.DataIn == SCSI_IOCTL_DATA_OUT ? swb->spt.DataBuffer : 0,swb->spt.DataTransferLength);
}
*type = 0x1f;
if (!p) {
if (log_scsi)
- write_log("SPTI: INQUIRY failed\n");
+ write_log ("SPTI: INQUIRY failed\n");
return 0;
}
*inqlen = outlen > INQUIRY_SIZE ? INQUIRY_SIZE : outlen;
v = 1;
memcpy (inquirydata, p, *inqlen);
if (log_scsi) {
- if (outlen >= INQUIRY_SIZE)
- write_log("SPTI: INQUIRY: %02.2X%02.2X%02.2X %d '%-8.8s' '%-16.16s'\n",
+ if (outlen >= INQUIRY_SIZE)
+ write_log ("SPTI: INQUIRY: %02.2X%02.2X%02.2X %d '%-8.8s' '%-16.16s'\n",
p[0], p[1], p[2], v, p + 8, p + 16);
}
return v;
dev = xmalloc (100);
sprintf (dev, "\\\\.\\Scsi%d:", di->bus);
} else {
- dev = my_strdup(di->drvpath);
+ dev = my_strdup(di->drvpath);
}
if (!di->scsibuf)
di->scsibuf = VirtualAlloc (NULL, DEVICE_SCSI_BUFSIZE, MEM_COMMIT, PAGE_READWRITE);
} else {
uae_u8 inqdata[INQUIRY_SIZE + 1] = { 0 };
int inqlen;
- dev_info[unitnum].isatapi = inquiry (unitnum, &dev_info[unitnum].type, inqdata, &inqlen);
+ dev_info[unitnum].isatapi = inquiry (unitnum, &dev_info[unitnum].type, inqdata, &inqlen);
if (inqlen == 0) {
write_log ("SPTI: inquiry failed unit %d ('%s':%d:%d:%d:%d)\n", unitnum, dev,
di->bus, di->path, di->target, di->lun);
dev_info[unitnum].name = my_strdup (inqdata + 8);
dev_info[unitnum].inquirydata = xmalloc (INQUIRY_SIZE);
memcpy (dev_info[unitnum].inquirydata, inqdata, INQUIRY_SIZE);
- xfree (dev);
+ xfree (dev);
return 1;
}
xfree (dev);
if (!strcmp(drvpath, di->drvpath))
return 0;
}
- write_log("SPTI: unit %d '%s' added\n", total_devices, drvpath);
+ write_log ("SPTI: unit %d '%s' added\n", total_devices, drvpath);
di = &dev_info[total_devices];
di->drvpath = my_strdup(drvpath);
di->type = 0;
if (open_scsi_device(cnt)) {
for (i = 0; i < cnt; i++) {
if (!memcmp(di->inquirydata, dev_info[i].inquirydata, INQUIRY_SIZE) && di->scanmode != dev_info[i].scanmode) {
- write_log("duplicate device, skipped..\n");
+ write_log ("duplicate device, skipped..\n");
break;
}
}
DWORD status, errorCode;
interfaceData.cbSize = sizeof (SP_INTERFACE_DEVICE_DATA);
- status = SetupDiEnumDeviceInterfaces (
+ status = SetupDiEnumDeviceInterfaces (
DevInfo, // Interface Device Info handle
0, // Device Info data
guid, // Interface registered by driver
idx = 0;
for (;;) {
- sprintf(DeviceName, "\\\\.\\Scsi%d:", idx++);
- h = CreateFile (DeviceName,
+ sprintf(DeviceName, "\\\\.\\Scsi%d:", idx++);
+ h = CreateFile (DeviceName,
GENERIC_READ | GENERIC_WRITE,
0,
NULL, // no SECURITY_ATTRIBUTES structure
0,
&bytesTransferred,
NULL)) {
- write_log( "Rescan SCSI port %d failed [Error %d]\n", idx - 1, GetLastError());
+ write_log ( "Rescan SCSI port %d failed [Error %d]\n", idx - 1, GetLastError());
CloseHandle(h);
- continue;
- }
+ continue;
+ }
// Get the SCSI inquiry data for all devices for the given SCSI bus
- status = DeviceIoControl(
+ status = DeviceIoControl(
h,
IOCTL_SCSI_GET_INQUIRY_DATA,
NULL,
Claimed = InquiryData->DeviceClaimed;
write_log ("SCSI=%d Initiator=%d Path=%d Target=%d LUN=%d Claimed=%s Type=%d\n",
idx - 1,
- BusData->InitiatorBusId, InquiryData->PathId, InquiryData->TargetId,
+ BusData->InitiatorBusId, InquiryData->PathId, InquiryData->TargetId,
InquiryData->Lun, Claimed ? "Yes" : "No ", type);
if (Claimed == 0 && !luncheck) {
luncheck = 1;
}
}
if (currprefs.win32_uaescsimode == UAESCSI_SPTISCAN) {
- write_log("SCSI adapter enumeration..\n");
+ write_log ("SCSI adapter enumeration..\n");
scanscsi();
- write_log("SCSI adapter enumeration ends\n");
+ write_log ("SCSI adapter enumeration ends\n");
}
return 1;
}
#include "memory.h"
#include "custom.h"
#include "events.h"
-#include "newcpu.h"
+#include "newcpu.h"
#include "autoconf.h"
#include "traps.h"
#include "bsdsocket.h"
WIN32GUI_LoadUIString(IDS_WSOCK2NEEDED, szMessage, MAX_DPATH);
gui_message(szMessage);
} else
- write_log("BSDSOCK: ERROR - Unable to initialize Windows socket layer! Error code: %d\n", lasterror);
+ write_log ("BSDSOCK: ERROR - Unable to initialize Windows socket layer! Error code: %d\n", lasterror);
return 0;
}
return 0;
} else {
- write_log("BSDSOCK: using %s\n", bsd->wsbData.szDescription);
+ write_log ("BSDSOCK: using %s\n", bsd->wsbData.szDescription);
// make sure WSP/NSPStartup gets called from within the regular stack
// (Windows 95/98 need this)
if((dummy = socket(AF_INET,SOCK_STREAM,IPPROTO_TCP)) != INVALID_SOCKET) {
closesocket(dummy);
result = 1;
} else {
- write_log("BSDSOCK: ERROR - WSPStartup/NSPStartup failed! Error code: %d\n",
+ write_log ("BSDSOCK: ERROR - WSPStartup/NSPStartup failed! Error code: %d\n",
WSAGetLastError());
result = 0;
}
if(bsd->hSockThread == NULL) {
WNDCLASS wc; // Set up an invisible window and dummy wndproc
-
+
InitializeCriticalSection(&bsd->SockThreadCS);
bsd->hSockReq = CreateEvent(NULL, FALSE, FALSE, NULL);
bsd->hSockReqHandled = CreateEvent(NULL, FALSE, FALSE, NULL);
"SocketFun", "WinUAE Socket Window",
WS_POPUP,
0, 0,
- 1, 1,
+ 1, 1,
NULL, NULL, 0, NULL);
bsd->hSockThread = THREAD(sock_thread, NULL);
}
int host_sbinit(TrapContext *context, SB)
{
sb->sockAbort = socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
-
+
if (sb->sockAbort == INVALID_SOCKET)
return 0;
if ((sb->hEvent = CreateEvent(NULL,FALSE,FALSE,NULL)) == NULL)
return 0;
sb->mtable = calloc(sb->dtablesize, sizeof(*sb->mtable));
-
+
return 1;
}
if (sb->hEvent != NULL)
CloseHandle(sb->hEvent);
-
+
for (i = sb->dtablesize; i--; ) {
if (sb->dtable[i] != INVALID_SOCKET)
host_closesocketquick(sb->dtable[i]);
-
+
if (sb->mtable[i])
bsd->asyncsb[(sb->mtable[i] - 0xb000) / 2] = NULL;
}
index = (msg - 0xb000) / 2;
sb = bsd->asyncsb[index];
-
+
if (!(msg & 1))
{
// is this one really for us?
if (sb->sb_errno >= 1001 && sb->sb_errno <= 1005) {
bsdsocklib_setherrno(sb, sb->sb_errno - 1000);
} else if (sb->sb_errno == 55) { // ENOBUFS
- write_log("BSDSOCK: ERROR - Buffer overflow - %d bytes requested\n",
+ write_log ("BSDSOCK: ERROR - Buffer overflow - %d bytes requested\n",
WSAGETASYNCBUFLEN(lParam));
}
} else {
SETSIGNAL;
}
-
+
unlocksigqueue();
}
unlocksigqueue();
bsdsocklib_seterrno(sb, 12); // ENOMEM
- write_log("BSDSOCK: ERROR - Async operation completion table overflow\n");
-
+ write_log ("BSDSOCK: ERROR - Async operation completion table overflow\n");
+
return 0;
}
static void cancelasyncmsg(TrapContext *context, unsigned int wMsg)
{
SB;
-
+
wMsg = (wMsg-0xb000) / 2;
sb = bsd->asyncsb[wMsg];
long eventflags;
int i;
locksigqueue();
-
+
eventflags = sb->ftable[sd - 1] & REP_ALL;
{
// little endian address family value to the byte sin_family member
((char *)realpt)[1] = *((char *)realpt);
-
+
// set size of address
*((char *)realpt) = len;
}
if (namelen <= sizeof buf) {
if (!addr_valid("host_bind", name, namelen))
return 0;
- memcpy(buf, get_real_address(name), namelen);
-
+ memcpy(buf, get_real_address (name), namelen);
+
// some Amiga programs set this field to bogus values
prephostaddr((SOCKADDR_IN *)buf);
} else
TRACE(("OK\n"));
} else
- write_log("BSDSOCK: ERROR - Excessive namelen (%d) in bind()!\n", namelen);
+ write_log ("BSDSOCK: ERROR - Excessive namelen (%d) in bind()!\n", namelen);
}
return success;
if ((success = listen(s,backlog)) != 0) {
SETERRNO;
TRACE(("failed (%d)\n",sb->sb_errno));
- } else
+ } else
TRACE(("OK\n"));
}
return success;
SOCKET s, s2;
int success = 0;
unsigned int wMsg;
-
+
sd++;
if (name != 0) {
if (!addr_valid("host_accept1", name, sizeof(struct sockaddr)) || !addr_valid("host_accept2", namelen, 4))
return;
- rp_nameuae = rp_name = (struct sockaddr *)get_real_address(name);
- hlenuae = hlen = get_long(namelen);
+ rp_nameuae = rp_name = (struct sockaddr *)get_real_address (name);
+ hlenuae = hlen = get_long (namelen);
if (hlenuae < sizeof(sockaddr))
{ // Fix for CNET BBS Windows must have 16 Bytes (sizeof(sockaddr)) otherwise Error WSAEFAULT
- rp_name = &sockaddr;
+ rp_name = &sockaddr;
hlen = sizeof(sockaddr);
}
} else {
- rp_name = &sockaddr;
+ rp_name = &sockaddr;
hlen = sizeof(sockaddr);
}
TRACE(("accept(%d,%d,%d) -> ",sd,name,hlenuae));
s = (SOCKET)getsock(sb, (int)sd);
-
+
if (s != INVALID_SOCKET) {
BEGINBLOCKING;
-
+
s2 = accept(s,rp_name,&hlen);
if (s2 == INVALID_SOCKET) {
} else {
setWSAAsyncSelect(sb,sd,s,0);
}
-
+
if (sb->eintr) {
TRACE(("[interrupted]\n"));
ENDBLOCKING;
SETERRNO;
if (sb->sb_errno == WSAEWOULDBLOCK - WSABASEERR)
- write_log("BSDSOCK: ERRRO - accept() would block despite FD_ACCEPT message\n");
+ write_log ("BSDSOCK: ERRRO - accept() would block despite FD_ACCEPT message\n");
}
}
}
}
-
+
if (s2 == INVALID_SOCKET) {
sb->resultval = -1;
TRACE(("failed (%d)\n",sb->sb_errno));
if (hlen <= hlenuae) { // Fix for CNET BBS Part 2
prepamigaaddr(rp_name,hlen);
if (namelen != 0) {
- put_long(namelen,hlen);
+ put_long (namelen,hlen);
}
} else { // Copy only the number of bytes requested
- if (hlenuae != 0) {
+ if (hlenuae != 0) {
prepamigaaddr(rp_name,hlenuae);
memcpy(rp_nameuae,rp_name,hlenuae);
- put_long(namelen,hlenuae);
+ put_long (namelen,hlenuae);
}
}
}
break;
case last_req:
default:
- write_log( "BSDSOCK: Invalid sock-thread request!\n" );
+ write_log ( "BSDSOCK: Invalid sock-thread request!\n" );
handled = FALSE;
break;
}
{
if(message >= 0xB000 && message < 0xB000 + MAXPENDINGASYNC * 2) {
#if DEBUG_SOCKETS
- write_log( "sockmsg(0x%x, 0x%x, 0x%x)\n", message, wParam, lParam );
+ write_log ( "sockmsg(0x%x, 0x%x, 0x%x)\n", message, wParam, lParam );
#endif
sockmsg(message, wParam, lParam);
return 0;
pri++;
}
SetThreadPriority(GetCurrentThread(), pri);
-
+
while(TRUE) {
if(bsd->hSockReq) {
DWORD wait;
}
}
}
- write_log( "BSDSOCK: We have exited our sock_thread()\n" );
+ write_log ( "BSDSOCK: We have exited our sock_thread()\n" );
THREADEND(result);
return result;
}
return;
s = (SOCKET)getsock(sb,(int)sd);
-
+
if (s != INVALID_SOCKET) {
if (namelen <= MAXADDRLEN) {
if (sb->mtable[sd-1] || (wMsg = allocasyncmsg(sb,sd,s)) != 0) {
BEGINBLOCKING;
PREPARE_THREAD;
- memcpy(buf, get_real_address(name), namelen);
+ memcpy(buf, get_real_address (name), namelen);
prephostaddr((SOCKADDR_IN *)buf);
-
+
sockreq.packet_type = connect_req;
sockreq.s = s;
sockreq.sb = sb;
if (sb->sb_errno == WSAEWOULDBLOCK - WSABASEERR) {
if (sb->ftable[sd-1] & SF_BLOCKING) {
bsdsocklib_seterrno(sb, 0);
-
+
WAITSIGNAL;
if (sb->eintr) {
}
}
} else
- write_log("BSDSOCK: WARNING - Excessive namelen (%d) in connect()!\n", namelen);
+ write_log ("BSDSOCK: WARNING - Excessive namelen (%d) in connect()!\n", namelen);
}
TRACE(("%d\n",sb->sb_errno));
}
if (s != INVALID_SOCKET) {
if (!addr_valid("host_sendto1", msg, 4))
return;
- realpt = get_real_address(msg);
-
+ realpt = get_real_address (msg);
+
if (to) {
if (tolen > sizeof buf) {
- write_log("BSDSOCK: WARNING - Target address in sendto() too large (%d)!\n", tolen);
+ write_log ("BSDSOCK: WARNING - Target address in sendto() too large (%d)!\n", tolen);
} else {
if (!addr_valid("host_sendto2", to, tolen))
return;
- memcpy(buf, get_real_address(to), tolen);
+ memcpy(buf, get_real_address (to), tolen);
// some Amiga software sets this field to bogus values
prephostaddr((SOCKADDR_IN *)buf);
}
sb->ftable[sd-1]|= SF_RAW_RUDP;
}
}
-
+
BEGINBLOCKING;
for (;;) {
} else {
setWSAAsyncSelect(sb, sd, s, FD_WRITE);
}
-
+
WAITSIGNAL;
-
+
if (sb->mtable[sd-1] == 0) {
cancelasyncmsg(context, wMsg);
} else {
setWSAAsyncSelect(sb, sd, s, 0);
}
-
+
if (sb->eintr) {
TRACE(("[interrupted]\n"));
return;
#ifdef TRACING_ENABLED
if (addr)
- TRACE(("recvfrom(%d,0x%lx,%d,0x%lx,0x%lx,%d) -> ",sd,msg,len,flags,addr,get_long(addrlen)));
+ TRACE(("recvfrom(%d,0x%lx,%d,0x%lx,0x%lx,%d) -> ",sd,msg,len,flags,addr,get_long (addrlen)));
else
TRACE(("recv(%d,0x%lx,%d,0x%lx) -> ",sd,msg,len,flags));
#endif
if (s != INVALID_SOCKET) {
if (!addr_valid("host_recvfrom1", msg, 4))
return;
- realpt = get_real_address(msg);
+ realpt = get_real_address (msg);
if (addr) {
if (!addr_valid("host_recvfrom1", addrlen, 4))
return;
- hlen = get_long(addrlen);
+ hlen = get_long (addrlen);
if (!addr_valid("host_recvfrom2", addr, hlen))
return;
- rp_addr = (struct sockaddr *)get_real_address(addr);
+ rp_addr = (struct sockaddr *)get_real_address (addr);
}
BEGINBLOCKING;
}
WAITSIGNAL;
-
+
if (sb->mtable[sd-1] == 0) {
cancelasyncmsg(context, wMsg);
} else {
} else
break;
}
-
+
ENDBLOCKING;
if (addr) {
prepamigaaddr(rp_addr,hlen);
- put_long(addrlen,hlen);
+ put_long (addrlen,hlen);
}
} else
sb->resultval = -1;
uae_u32 host_shutdown(SB, uae_u32 sd, uae_u32 how)
{
SOCKET s;
-
+
TRACE(("shutdown(%d,%d) -> ",sd,how));
sd++;
s = getsock(sb,sd);
if (s != INVALID_SOCKET) {
if (len > sizeof buf) {
- write_log("BSDSOCK: WARNING - Excessive optlen in setsockopt() (%d)\n", len);
+ write_log ("BSDSOCK: WARNING - Excessive optlen in setsockopt() (%d)\n", len);
len = sizeof buf;
- }
+ }
if (level == IPPROTO_IP && optname == 2) { // IP_HDRINCL emulated by icmp.dll
sb->resultval = 0;
return;
}
if (level == SOL_SOCKET && optname == SO_LINGER) {
- ((LINGER *)buf)->l_onoff = get_long(optval);
- ((LINGER *)buf)->l_linger = get_long(optval + 4);
+ ((LINGER *)buf)->l_onoff = get_long (optval);
+ ((LINGER *)buf)->l_linger = get_long (optval + 4);
} else {
if (len == 4)
- *(long *)buf = get_long(optval);
+ *(long *)buf = get_long (optval);
else if (len == 2)
- *(short *)buf = get_word(optval);
+ *(short *)buf = get_word (optval);
else
- write_log("BSDSOCK: ERROR - Unknown optlen (%d) in setsockopt(%d,%d)\n", len, level, optname);
+ write_log ("BSDSOCK: ERROR - Unknown optlen (%d) in setsockopt(%d,%d)\n", len, level, optname);
}
// handle SO_EVENTMASK
if (level == 0xffff && optname == 0x2001) {
long wsbevents = 0;
- uae_u32 eventflags = get_long(optval);
+ uae_u32 eventflags = get_long (optval);
sb->ftable[sd-1] = (sb->ftable[sd-1] & ~REP_ALL) | (eventflags & REP_ALL);
wsbevents |= FD_WRITE;
if (eventflags & REP_CLOSE)
wsbevents |= FD_CLOSE;
-
+
if (sb->mtable[sd-1] || (sb->mtable[sd-1] = allocasyncmsg(sb,sd,s))) {
WSAAsyncSelect(s,hWndSelector ? hAmigaWnd : bsd->hSockWnd,sb->mtable[sd-1],wsbevents);
sb->resultval = 0;
sb->resultval = -1;
} else
sb->resultval = setsockopt(s,level,optname,buf,len);
-
+
if (!sb->resultval) {
TRACE(("OK\n"));
return;
} else
SETERRNO;
-
+
TRACE(("failed (%d)\n",sb->sb_errno));
}
}
TRACE(("getsockopt(%d,%d,0x%lx,0x%lx,0x%lx) -> ",sd,(short)level,optname,optval,optlen));
sd++;
s = getsock(sb,sd);
-
+
if (s != INVALID_SOCKET) {
if (!getsockopt(s,level,optname,buf,&len)) {
if (level == SOL_SOCKET && optname == SO_LINGER) {
- put_long(optval,((LINGER *)buf)->l_onoff);
- put_long(optval+4,((LINGER *)buf)->l_linger);
+ put_long (optval,((LINGER *)buf)->l_onoff);
+ put_long (optval+4,((LINGER *)buf)->l_linger);
} else {
if (len == 4)
- put_long(optval,*(long *)buf);
+ put_long (optval,*(long *)buf);
else if (len == 2)
- put_word(optval,*(short *)buf);
+ put_word (optval,*(short *)buf);
else
- write_log("BSDSOCK: ERROR - Unknown optlen (%d) in setsockopt(%d,%d)\n", len, level, optname);
+ write_log ("BSDSOCK: ERROR - Unknown optlen (%d) in setsockopt(%d,%d)\n", len, level, optname);
}
-// put_long(optlen,len); // some programs pass the actual length instead of a pointer to the length, so...
+// put_long (optlen,len); // some programs pass the actual length instead of a pointer to the length, so...
TRACE(("OK (%d,%d)\n",len,*(long *)buf));
return 0;
} else {
sd++;
if (!addr_valid("host_getsockname1", namelen, 4))
return -1;
- len = get_long(namelen);
-
+ len = get_long (namelen);
+
TRACE(("getsockname(%d,0x%lx,%d) -> ",sd,name,len));
-
+
s = getsock(sb,sd);
-
+
if (s != INVALID_SOCKET) {
if (!addr_valid("host_getsockname2", name, len))
return -1;
- rp_name = (struct sockaddr *)get_real_address(name);
-
+ rp_name = (struct sockaddr *)get_real_address (name);
+
if (getsockname(s,rp_name,&len)) {
SETERRNO;
TRACE(("failed (%d)\n",sb->sb_errno));
} else {
TRACE(("%d\n",len));
prepamigaaddr(rp_name,len);
- put_long(namelen,len);
+ put_long (namelen,len);
return 0;
}
- }
+ }
return -1;
}
SOCKET s;
int len;
struct sockaddr *rp_name;
-
+
sd++;
if (!addr_valid("host_getpeername1", namelen, 4))
return -1;
- len = get_long(namelen);
-
+ len = get_long (namelen);
+
TRACE(("getpeername(%d,0x%lx,%d) -> ",sd,name,len));
-
+
s = getsock(sb,sd);
-
+
if (s != INVALID_SOCKET) {
if (!addr_valid("host_getpeername2", name, len))
return -1;
- rp_name = (struct sockaddr *)get_real_address(name);
-
+ rp_name = (struct sockaddr *)get_real_address (name);
+
if (getpeername(s,rp_name,&len)) {
SETERRNO;
TRACE(("failed (%d)\n",sb->sb_errno));
} else {
TRACE(("%d\n",len));
prepamigaaddr(rp_name,len);
- put_long(namelen,len);
+ put_long (namelen,len);
return 0;
}
- }
+ }
return -1;
}
switch (request)
{
case FIOSETOWN:
- sb->ownertask = get_long(arg);
+ sb->ownertask = get_long (arg);
success = 0;
break;
case FIOGETOWN:
- put_long(arg,sb->ownertask);
+ put_long (arg,sb->ownertask);
success = 0;
break;
case FIONBIO:
TRACE(("[FIONBIO] -> "));
- if (get_long(arg)) {
+ if (get_long (arg)) {
TRACE(("nonblocking\n"));
sb->ftable[sd-1] &= ~SF_BLOCKING;
} else {
case FIONREAD:
ioctlsocket(s,request,(u_long *)&data);
TRACE(("[FIONREAD] -> %d\n",data));
- put_long(arg,data);
+ put_long (arg,data);
success = 0;
break;
case FIOASYNC:
- if (get_long(arg)) {
+ if (get_long (arg)) {
sb->ftable[sd-1] |= REP_ALL;
TRACE(("[FIOASYNC] -> enabled\n"));
}
}
else
- write_log(("BSDSOCK: WARNING - FIOASYNC disabling unsupported.\n"));
+ write_log (("BSDSOCK: WARNING - FIOASYNC disabling unsupported.\n"));
success = -1;
break;
default:
- write_log("BSDSOCK: WARNING - Unknown IoctlSocket request: 0x%08lx\n", request);
+ write_log ("BSDSOCK: WARNING - Unknown IoctlSocket request: 0x%08lx\n", request);
bsdsocklib_seterrno(sb, 22); // EINVAL
break;
}
}
-
+
return success;
}
WSAAsyncSelect(s,hWndSelector ? hAmigaWnd : bsd->hSockWnd,wMsg,FD_CLOSE);
WAITSIGNAL;
-
+
cancelasyncmsg(context, wMsg);
-
+
if (sb->eintr) {
TRACE(("[interrupted]\n"));
break;
}
TRACE(("failed (%d)\n",sb->sb_errno));
-
+
return -1;
}
}
if (nfds > sb->dtablesize) {
- write_log("BSDSOCK: ERROR - select()ing more sockets (%d) than socket descriptors available (%d)!\n", nfds, sb->dtablesize);
+ write_log ("BSDSOCK: ERROR - select()ing more sockets (%d) than socket descriptors available (%d)!\n", nfds, sb->dtablesize);
nfds = sb->dtablesize;
}
for (j = 0; ; j += 32, fd_set_amiga += 4) {
- currlong = get_long(fd_set_amiga);
+ currlong = get_long (fd_set_amiga);
mask = 1;
-
+
for (i = 0; i < 32; i++, mask <<= 1) {
if (i+j > nfds) {
fd_set_win->fd_array[fd_set_win->fd_count] = INVALID_SOCKET;
return;
}
-
+
if (currlong & mask) {
s = getsock(sb,j+i+1);
-
+
if (s != INVALID_SOCKET) {
fd_set_win->fd_array[fd_set_win->fd_count++] = s;
if (fd_set_win->fd_count >= FD_SETSIZE) {
- write_log("BSDSOCK: ERROR - select()ing more sockets (%d) than the hard-coded fd_set limit (%d) - please report\n", nfds, FD_SETSIZE);
+ write_log ("BSDSOCK: ERROR - select()ing more sockets (%d) than the hard-coded fd_set limit (%d) - please report\n", nfds, FD_SETSIZE);
return;
}
}
for (n = 0; n < nfds; n += 32) {
val = 0;
mask = 1;
-
+
for (i = 0; i < 32; i++, mask <<= 1) {
if ((currsock = getsock(sb, n+i+1)) != INVALID_SOCKET) {
// Do not use sb->dtable directly because of Newsrog
}
}
}
- put_long(fd_set_amiga, val);
+ put_long (fd_set_amiga, val);
fd_set_amiga += 4;
}
}
{
unsigned int i;
for (i = 0; i < nfds; i += 32, fdset += 4)
- put_long(fdset,0);
+ put_long (fdset,0);
}
// This seems to be the only way of implementing a cancelable WinSock2 select() call... sigh.
writefds = args->writefds;
exceptfds = args->exceptfds;
timeout = args->timeout;
-
+
// construct descriptor tables
makesocktable(sb, readfds, &readsocks, nfds, sb->sockAbort);
if (writefds)
makesocktable(sb, writefds, &writesocks, nfds, INVALID_SOCKET);
if (exceptfds)
makesocktable(sb, exceptfds, &exceptsocks, nfds, INVALID_SOCKET);
-
+
if (timeout) {
- tv.tv_sec = get_long(timeout);
- tv.tv_usec = get_long(timeout+4);
+ tv.tv_sec = get_long (timeout);
+ tv.tv_usec = get_long (timeout+4);
TRACE(("(timeout: %d.%06d) ",tv.tv_sec,tv.tv_usec));
}
-
+
TRACE(("-> "));
-
+
sb->resultval = select(nfds+1, &readsocks, writefds ? &writesocks : NULL,
exceptfds ? &exceptsocks : NULL, timeout ? &tv : 0);
- if (sb->resultval == SOCKET_ERROR) {
+ if (sb->resultval == SOCKET_ERROR) {
// select was stopped by sb->sockAbort
if (readsocks.fd_count > 1) {
makesocktable(sb, readfds, &readsocks, nfds, INVALID_SOCKET);
sb->resultval = SOCKET_ERROR;
// Set old resultval
}
- }
+ }
}
}
if (FD_ISSET(sb->sockAbort,&readsocks)) {
if (exceptfds)
makesockbitfield(sb,exceptfds,&exceptsocks,nfds);
}
-
+
SETSIGNAL;
bsd->threadargsw[index] = NULL;
int i;
struct threadargsw taw;
- wssigs = sigmp ? get_long(sigmp) : 0;
+ wssigs = sigmp ? get_long (sigmp) : 0;
TRACE(("WaitSelect(%d,0x%lx,0x%lx,0x%lx,0x%lx,0x%lx) ",
nfds, readfds, writefds, exceptfds, timeout, wssigs));
return;
}
if (wssigs) {
- m68k_dreg(&context->regs,0) = 0;
- m68k_dreg(&context->regs,1) = wssigs;
- sigs = CallLib(context, get_long(4),-0x132) & wssigs; // SetSignal()
-
+ m68k_dreg (&context->regs,0) = 0;
+ m68k_dreg (&context->regs,1) = wssigs;
+ sigs = CallLib (context, get_long (4),-0x132) & wssigs; // SetSignal()
+
if (sigs) {
TRACE(("-> [preempted by signals 0x%08lx]\n",sigs & wssigs));
- put_long(sigmp,sigs & wssigs);
+ put_long (sigmp,sigs & wssigs);
// Check for zero address -> otherwise WinUAE crashes
if (readfds)
fd_zero(readfds,nfds);
if (nfds == 0) {
// No sockets to check, only wait for signals
if (wssigs != 0) {
- m68k_dreg(&context->regs, 0) = wssigs;
- sigs = CallLib(context, get_long(4),-0x13e); // Wait()
- put_long(sigmp, sigs & wssigs);
+ m68k_dreg (&context->regs, 0) = wssigs;
+ sigs = CallLib (context, get_long (4),-0x13e); // Wait()
+ put_long (sigmp, sigs & wssigs);
}
-
+
if (readfds)
fd_zero(readfds,nfds);
if (writefds)
bsd->hThreads[i] = THREAD(thread_WaitSelect, &threadindextable[i]);
if (bsd->hEvents[i] == NULL || bsd->hThreads[i] == NULL) {
bsd->hThreads[i] = 0;
- write_log("BSDSOCK: ERROR - Thread/Event creation failed - error code: %d\n",
+ write_log ("BSDSOCK: ERROR - Thread/Event creation failed - error code: %d\n",
GetLastError());
bsdsocklib_seterrno(sb,12); // ENOMEM
sb->resultval = -1;
}
}
}
-
+
if (i >= MAX_SELECT_THREADS)
- write_log("BSDSOCK: ERROR - Too many select()s\n");
+ write_log ("BSDSOCK: ERROR - Too many select()s\n");
else {
SOCKET newsock = INVALID_SOCKET;
SetEvent(bsd->hEvents[i]);
- m68k_dreg(&context->regs, 0) = (((uae_u32)1) << sb->signal) | sb->eintrsigs | wssigs;
- sigs = CallLib(context, get_long(4), -0x13e); // Wait()
+ m68k_dreg (&context->regs, 0) = (((uae_u32)1) << sb->signal) | sb->eintrsigs | wssigs;
+ sigs = CallLib (context, get_long (4), -0x13e); // Wait()
/*
if ((1<<sb->signal) & sigs)
{ // 2.3.2002/SR Fix for AmiFTP -> Thread is ready, no need to Abort
*/
if (sb->needAbort) {
if ((newsock = socket(AF_INET,SOCK_STREAM,IPPROTO_TCP)) == INVALID_SOCKET)
- write_log("BSDSOCK: ERROR - Cannot create socket: %d\n", WSAGetLastError());
+ write_log ("BSDSOCK: ERROR - Cannot create socket: %d\n", WSAGetLastError());
shutdown(sb->sockAbort,1);
if (newsock != sb->sockAbort) {
shutdown(sb->sockAbort, 1);
sb->sockAbort = newsock;
if(sigmp) {
- put_long(sigmp,sigs & wssigs);
+ put_long (sigmp,sigs & wssigs);
if (sigs & sb->eintrsigs) {
TRACE(("[interrupted]\n"));
TRACE(("Inet_NtoA(%lx) -> ",in));
if ((addr = inet_ntoa(ina)) != NULL) {
- scratchbuf = m68k_areg(&context->regs,6) + offsetof(struct UAEBSDBase,scratchbuf);
+ scratchbuf = m68k_areg (&context->regs,6) + offsetof(struct UAEBSDBase,scratchbuf);
strncpyha(scratchbuf,addr,SCRATCHBUFSIZE);
TRACE(("%s\n",addr));
return scratchbuf;
if (!addr_valid("host_inet_addr", cp, 4))
return 0;
- cp_rp = get_real_address(cp);
+ cp_rp = get_real_address (cp);
addr = htonl(inet_addr(cp_rp));
addrtype = args->args4;
name_rp = "";
if (addr_valid("thread_get1", name, 1))
- name_rp = get_real_address(name);
+ name_rp = get_real_address (name);
if (strchr(name_rp, '.') == 0 || CheckOnline(sb) == TRUE) {
// Local Address or Internet Online ?
if (bsd->threadGetargs_inuse[index] != -1) {
// No CTRL-C Signal
if (host == 0) {
- // Error occured
+ // Error occured
SETERRNO;
TRACE(("failed (%d) - ", sb->sb_errno));
} else {
name = args->args2;
name_rp = "";
if (addr_valid("thread_get2", name, 1))
- name_rp = get_real_address(name);
+ name_rp = get_real_address (name);
proto = getprotobyname (name_rp);
if (bsd->threadGetargs_inuse[index] != -1) { // No CTRL-C Signal
if (proto == 0) {
- // Error occured
+ // Error occured
SETERRNO;
TRACE(("failed (%d) - ", sb->sb_errno));
} else {
nameport = args->args2;
proto = args->args3;
type = args->args4;
-
+
if (proto) {
if (addr_valid("thread_get3", proto, 1))
- proto_rp = get_real_address(proto);
+ proto_rp = get_real_address (proto);
}
if (type) {
serv = getservbyport(nameport, proto_rp);
} else {
if (addr_valid("thread_get4", nameport, 1))
- name_rp = get_real_address(nameport);
+ name_rp = get_real_address (nameport);
serv = getservbyname(name_rp, proto_rp);
}
if (bsd->threadGetargs_inuse[index] != -1) {
// No CTRL-C Signal
if (serv == 0) {
- // Error occured
+ // Error occured
SETERRNO;
TRACE(("failed (%d) - ", sb->sb_errno));
} else {
}
TRACE(("-> "));
-
+
if (bsd->threadGetargs_inuse[index] != -1)
SETSIGNAL;
bsd->hGetThreads[i] = THREAD(thread_get, &threadindextable[i]);
if (bsd->hGetEvents[i] == NULL || bsd->hGetThreads[i] == NULL) {
bsd->hGetThreads[i] = NULL;
- write_log("BSDSOCK: ERROR - Thread/Event creation failed - error code: %d\n",
+ write_log ("BSDSOCK: ERROR - Thread/Event creation failed - error code: %d\n",
GetLastError());
bsdsocklib_seterrno(sb, 12); // ENOMEM
sb->resultval = -1;
}
}
}
-
+
if (i >= MAX_GET_THREADS) {
- write_log("BSDSOCK: ERROR - Too many gethostbyname()s\n");
+ write_log ("BSDSOCK: ERROR - Too many gethostbyname()s\n");
bsdsocklib_seterrno(sb, 12); // ENOMEM
sb->resultval = -1;
return 0;
}
sb->eintr = 0;
- while (bsd->threadGetargs_inuse[i] != 0 && sb->eintr == 0) {
+ while (bsd->threadGetargs_inuse[i] != 0 && sb->eintr == 0) {
WAITSIGNAL;
if (sb->eintr == 1)
bsd->threadGetargs_inuse[i] = -1;
name_rp = "";
if (addr_valid("host_gethostbynameaddr", name, 1))
- name_rp = get_real_address(name);
+ name_rp = get_real_address (name);
if (addrtype == -1) {
TRACE(("gethostbyname(%s) -> ",name_rp));
-
+
// workaround for numeric host "names"
if ((addr = inet_addr(name_rp)) != INADDR_NONE) {
bsdsocklib_seterrno(sb,0);
((HOSTENT *)buf)->h_addr_list = (char **)&addr_list;
addr_list[0] = &addr;
addr_list[1] = NULL;
-
+
goto kludge;
}
} else {
if (!sb->sb_errno) {
kludge:
h = (HOSTENT *)buf;
-
+
// compute total size of hostent
size = 28;
if (h->h_name != NULL)
sb->hostent = uae_AllocMem(context, size, 0);
if (!sb->hostent) {
- write_log("BSDSOCK: WARNING - gethostby%s() ran out of Amiga memory "
+ write_log ("BSDSOCK: WARNING - gethostby%s() ran out of Amiga memory "
"(couldn't allocate %ld bytes) while returning result of lookup for '%s'\n",
addrtype == -1 ? "name" : "addr", size, name_rp);
bsdsocklib_seterrno(sb, 12); // ENOMEM
return;
}
-
+
sb->hostentsize = size;
-
+
aptr = sb->hostent + 28 + numaliases * 4 + numaddr * 4;
-
+
// transfer hostent to Amiga memory
- put_long(sb->hostent + 4, sb->hostent + 20);
- put_long(sb->hostent + 8, h->h_addrtype);
- put_long(sb->hostent + 12, h->h_length);
- put_long(sb->hostent + 16, sb->hostent + 24 + numaliases * 4);
-
+ put_long (sb->hostent + 4, sb->hostent + 20);
+ put_long (sb->hostent + 8, h->h_addrtype);
+ put_long (sb->hostent + 12, h->h_length);
+ put_long (sb->hostent + 16, sb->hostent + 24 + numaliases * 4);
+
for (i = 0; i < numaliases; i++)
- put_long(sb->hostent + 20 + i * 4, addstr(&aptr, h->h_aliases[i]));
- put_long(sb->hostent + 20 + numaliases * 4, 0);
+ put_long (sb->hostent + 20 + i * 4, addstr(&aptr, h->h_aliases[i]));
+ put_long (sb->hostent + 20 + numaliases * 4, 0);
for (i = 0; i < numaddr; i++)
- put_long(sb->hostent + 24 + (numaliases + i) * 4, addmem(&aptr, h->h_addr_list[i], h->h_length));
- put_long(sb->hostent + 24 + numaliases * 4 + numaddr * 4, 0);
- put_long(sb->hostent, aptr);
+ put_long (sb->hostent + 24 + (numaliases + i) * 4, addmem(&aptr, h->h_addr_list[i], h->h_length));
+ put_long (sb->hostent + 24 + numaliases * 4 + numaddr * 4, 0);
+ put_long (sb->hostent, aptr);
addstr(&aptr, h->h_name);
TRACE(("OK (%s)\n", h->h_name));
name_rp = "";
if (addr_valid("host_gethostbynameaddr", name, 1))
- name_rp = get_real_address(name);
+ name_rp = get_real_address (name);
TRACE(("getprotobyname(%s) -> ",name_rp));
sb->protoent = uae_AllocMem(context, size, 0);
if (!sb->protoent) {
- write_log("BSDSOCK: WARNING - getprotobyname() ran out of Amiga memory "
+ write_log ("BSDSOCK: WARNING - getprotobyname() ran out of Amiga memory "
"(couldn't allocate %ld bytes) while returning result of lookup for '%s'\n",
size, name_rp);
bsdsocklib_seterrno(sb,12); // ENOMEM
}
sb->protoentsize = size;
-
+
aptr = sb->protoent+16+numaliases*4;
-
+
// transfer protoent to Amiga memory
- put_long(sb->protoent+4,sb->protoent+12);
- put_long(sb->protoent+8,p->p_proto);
-
+ put_long (sb->protoent+4,sb->protoent+12);
+ put_long (sb->protoent+8,p->p_proto);
+
for (i = 0; i < numaliases; i++)
- put_long(sb->protoent + 12 + i * 4, addstr(&aptr, p->p_aliases[i]));
- put_long(sb->protoent + 12 + numaliases * 4,0);
- put_long(sb->protoent, aptr);
+ put_long (sb->protoent + 12 + i * 4, addstr(&aptr, p->p_aliases[i]));
+ put_long (sb->protoent + 12 + numaliases * 4,0);
+ put_long (sb->protoent, aptr);
addstr(&aptr, p->p_name);
TRACE(("OK (%s, %d)\n", p->p_name, p->p_proto));
bsdsocklib_seterrno(sb,0);
if (proto) {
if (addr_valid("host_getservbynameport1", proto, 1))
- proto_rp = get_real_address(proto);
+ proto_rp = get_real_address (proto);
}
if (type) {
TRACE(("getservbyport(%d,%s) -> ",nameport,proto_rp ? proto_rp : "NULL"));
} else {
if (addr_valid("host_getservbynameport2", nameport, 1))
- name_rp = get_real_address(nameport);
+ name_rp = get_real_address (nameport);
TRACE(("getservbyname(%s,%s) -> ",name_rp,proto_rp ? proto_rp : "NULL"));
}
sb->servent = uae_AllocMem(context, size, 0);
if (!sb->servent) {
- write_log("BSDSOCK: WARNING - getservby%s() ran out of Amiga memory (couldn't allocate %ld bytes)\n", type ? "port" : "name", size);
+ write_log ("BSDSOCK: WARNING - getservby%s() ran out of Amiga memory (couldn't allocate %ld bytes)\n", type ? "port" : "name", size);
bsdsocklib_seterrno(sb, 12); // ENOMEM
return;
}
sb->serventsize = size;
-
+
aptr = sb->servent + 20 + numaliases * 4;
-
+
// transfer servent to Amiga memory
- put_long(sb->servent + 4, sb->servent + 16);
- put_long(sb->servent + 8, (unsigned short)htons(s->s_port));
-
+ put_long (sb->servent + 4, sb->servent + 16);
+ put_long (sb->servent + 8, (unsigned short)htons(s->s_port));
+
for (i = 0; i < numaliases; i++)
- put_long(sb->servent + 16 + i * 4,addstr(&aptr,s->s_aliases[i]));
- put_long(sb->servent + 16 + numaliases * 4,0);
- put_long(sb->servent, aptr);
+ put_long (sb->servent + 16 + i * 4,addstr(&aptr,s->s_aliases[i]));
+ put_long (sb->servent + 16 + numaliases * 4,0);
+ put_long (sb->servent, aptr);
addstr(&aptr, s->s_name);
- put_long(sb->servent + 12, aptr);
+ put_long (sb->servent + 12, aptr);
addstr(&aptr, s->s_proto);
TRACE(("OK (%s, %d)\n", s->s_name, (unsigned short)htons(s->s_port)));
{
if (!addr_valid("host_gethostname", name, namelen))
return -1;
- return gethostname(get_real_address(name),namelen);
+ return gethostname(get_real_address (name),namelen);
}
#endif
UDWORD sectorcnt; // available sectors
UDWORD sectorsize; // sector size
UDWORD trackcnt; // track variant count
- PUBYTE trackbuf; // track buffer memory
+ PUBYTE trackbuf; // track buffer memory
UDWORD tracklen; // track buffer memory length
PUBYTE trackdata[CAPS_MTRS]; // track data pointer if available
UDWORD tracksize[CAPS_MTRS]; // track data size
UDWORD head; // head#
UDWORD sectorcnt; // available sectors
UDWORD sectorsize; // sector size
- PUBYTE trackbuf; // track buffer memory
+ PUBYTE trackbuf; // track buffer memory
UDWORD tracklen; // track buffer memory length
UDWORD timelen; // timing buffer length
PUDWORD timebuf; // timing buffer
int tr;
FILE *f;
static int done;
-
+
if (done)
return;
done = 1;
*tracklength = len * 8;
mfm = mfmbuf;
for (i = 0; i < (len + 1) / 2; i++) {
- uae_u8 *data = ci.trackbuf + i * 2;
- *mfm++ = 256 * *data + *(data + 1);
+ uae_u8 *data = ci.trackbuf + i * 2;
+ *mfm++ = 256 * *data + *(data + 1);
}
return 1;
}
*tracklength = len * 8;
*gapoffset = ci.overlap >= 0 ? ci.overlap * 8 : -1;
for (i = 0; i < (len + 1) / 2; i++) {
- uae_u8 *data = ci.trackbuf + i * 2;
- *mfm++ = 256 * *data + *(data + 1);
+ uae_u8 *data = ci.trackbuf + i * 2;
+ *mfm++ = 256 * *data + *(data + 1);
}
#if 0
{
char *buf;
if (currhist->command) {
- txtlen = GetWindowTextLength(hWnd);
- buf = malloc(txtlen + 1);
- GetWindowText(hWnd, buf, txtlen + 1);
- if (strcmp(buf, currhist->command)) {
- SetWindowText(hWnd, currhist->command);
- txtlen = strlen(currhist->command);
- SendMessage(hWnd, EM_SETSEL, (WPARAM)txtlen, (LPARAM)txtlen);
- SendMessage(hWnd, EM_SETSEL, -1, -1);
- }
+ txtlen = GetWindowTextLength(hWnd);
+ buf = malloc(txtlen + 1);
+ GetWindowText(hWnd, buf, txtlen + 1);
+ if (strcmp(buf, currhist->command)) {
+ SetWindowText(hWnd, currhist->command);
+ txtlen = strlen(currhist->command);
+ SendMessage(hWnd, EM_SETSEL, (WPARAM)txtlen, (LPARAM)txtlen);
+ SendMessage(hWnd, EM_SETSEL, -1, -1);
+ }
}
}
static void SetPrevHistNode(HWND hWnd)
{
if (currhist) {
- if (currhist->prev)
- currhist = currhist->prev;
- OutputCurrHistNode(hWnd);
+ if (currhist->prev)
+ currhist = currhist->prev;
+ OutputCurrHistNode(hWnd);
}
else if (lasthist) {
- currhist = lasthist;
- OutputCurrHistNode(hWnd);
+ currhist = lasthist;
+ OutputCurrHistNode(hWnd);
}
}
static void SetNextHistNode(HWND hWnd)
{
if (currhist) {
- if (currhist->next)
- currhist = currhist->next;
- OutputCurrHistNode(hWnd);
+ if (currhist->next)
+ currhist = currhist->next;
+ OutputCurrHistNode(hWnd);
}
}
struct histnode *tmp;
for (i = 0; i < count && histcount; i++) {
- tmp = firsthist;
- firsthist = firsthist->next;
- if (currhist == tmp)
- currhist = NULL;
- if (lasthist == tmp)
- lasthist = NULL;
- if (firsthist)
- firsthist->prev = NULL;
- free(tmp->command);
- free(tmp);
- histcount--;
+ tmp = firsthist;
+ firsthist = firsthist->next;
+ if (currhist == tmp)
+ currhist = NULL;
+ if (lasthist == tmp)
+ lasthist = NULL;
+ if (firsthist)
+ firsthist->prev = NULL;
+ free(tmp->command);
+ free(tmp);
+ histcount--;
}
}
currhist = NULL;
if (histcount > 0 && !strcmp(command, lasthist->command))
- return;
+ return;
else if (histcount == MAXINPUTHIST)
- DeleteFromHistory(1);
+ DeleteFromHistory(1);
tmp = lasthist;
lasthist = malloc(sizeof(struct histnode));
if (histcount == 0)
- firsthist = lasthist;
+ firsthist = lasthist;
lasthist->command = strdup(command);
lasthist->next = NULL;
lasthist->prev = tmp;
if (tmp)
- tmp->next = lasthist;
+ tmp->next = lasthist;
histcount++;
}
int chars;
if (!hDbgWnd)
- return 0;
+ return 0;
inputfinished = 0;
hInput = GetDlgItem(hDbgWnd, IDC_DBG_INPUT);
chars = GetWindowText(hInput, out, maxlen);
if (chars == 0)
- return 0;
+ return 0;
WriteOutput(linebreak + 1, 2);
WriteOutput(out, strlen(out));
WriteOutput(linebreak + 1, 2);
tmp = (char *)out;
lines_have = SendMessage(hWnd, EM_GETLINECOUNT, 0, 0);
while (strlen(tmp) > 0 && (p = strchr(tmp, '\n')) > 0) {
- lines_new++;
- tmp = p + 1;
+ lines_new++;
+ tmp = p + 1;
}
lines_new++;
if (lines_new > MAXLINES)
- return 0;
+ return 0;
if (lines_have + lines_new > MAXLINES) {
- visible = IsWindowVisible(hWnd);
- if (visible)
- SendMessage(hWnd, WM_SETREDRAW, FALSE, 0);
- lastchr = SendMessage(hWnd, EM_LINEINDEX, lines_have + lines_new - MAXLINES, 0);
- SendMessage(hWnd, EM_SETSEL, 0, lastchr);
- SendMessage(hWnd, EM_REPLACESEL, FALSE, (LPARAM)"");
- txtlen = GetWindowTextLength(hWnd);
- SendMessage(hWnd, EM_SETSEL, (WPARAM)txtlen, (LPARAM)txtlen);
- SendMessage(hWnd, EM_SETSEL, -1, -1);
- if (visible)
- SendMessage(hWnd, WM_SETREDRAW, TRUE, 0);
+ visible = IsWindowVisible(hWnd);
+ if (visible)
+ SendMessage(hWnd, WM_SETREDRAW, FALSE, 0);
+ lastchr = SendMessage(hWnd, EM_LINEINDEX, lines_have + lines_new - MAXLINES, 0);
+ SendMessage(hWnd, EM_SETSEL, 0, lastchr);
+ SendMessage(hWnd, EM_REPLACESEL, FALSE, (LPARAM)"");
+ txtlen = GetWindowTextLength(hWnd);
+ SendMessage(hWnd, EM_SETSEL, (WPARAM)txtlen, (LPARAM)txtlen);
+ SendMessage(hWnd, EM_SETSEL, -1, -1);
+ if (visible)
+ SendMessage(hWnd, WM_SETREDRAW, TRUE, 0);
}
return 1;
}
char *buf = 0, *p, *tmp;
if (!hOutput || !strcmp(out, ">") || len == 0)
- return;
+ return;
if (!CheckLineLimit(hOutput, out))
- return;
+ return;
tmp = (char *)out;
for(;;) {
- p = strchr(tmp, '\n');
- if (p) {
- pos = p - tmp + 1;
- if (pos > (MAX_LINEWIDTH + 1))
- pos = MAX_LINEWIDTH + 1;
- buf = xmalloc(pos + 2);
- memset(buf, 0, pos + 2);
- strncpy(buf, tmp, pos - 1);
- strcat(buf, linebreak);
- } else if (strlen(tmp) == 0) {
- leave = 1;
+ p = strchr(tmp, '\n');
+ if (p) {
+ pos = p - tmp + 1;
+ if (pos > (MAX_LINEWIDTH + 1))
+ pos = MAX_LINEWIDTH + 1;
+ buf = xmalloc(pos + 2);
+ memset(buf, 0, pos + 2);
+ strncpy(buf, tmp, pos - 1);
+ strcat(buf, linebreak);
+ } else if (strlen(tmp) == 0) {
+ leave = 1;
} else {
- count = SendMessage(hOutput, EM_GETLINECOUNT, 0, 0);
- index = SendMessage(hOutput, EM_LINEINDEX, count - 1, 0);
- txtlen = SendMessage(hOutput, EM_LINELENGTH, index, 0);
- if (strlen(tmp) + txtlen > MAX_LINEWIDTH) {
- buf = xmalloc(MAX_LINEWIDTH + 3 - txtlen);
- memset(buf, 0, MAX_LINEWIDTH + 3 - txtlen);
- strncpy(buf, tmp, MAX_LINEWIDTH - txtlen);
- strcat(buf, linebreak);
- }
- leave = 1;
- }
- txtlen = GetWindowTextLength(hOutput);
- SendMessage(hOutput, EM_SETSEL, (WPARAM)txtlen, (LPARAM)txtlen);
- SendMessage(hOutput, EM_REPLACESEL, FALSE, (LPARAM)(buf ? buf : tmp));
- if (buf) {
- xfree(buf);
- buf = 0;
- tmp += pos;
- }
- if (leave)
- return;
+ count = SendMessage(hOutput, EM_GETLINECOUNT, 0, 0);
+ index = SendMessage(hOutput, EM_LINEINDEX, count - 1, 0);
+ txtlen = SendMessage(hOutput, EM_LINELENGTH, index, 0);
+ if (strlen(tmp) + txtlen > MAX_LINEWIDTH) {
+ buf = xmalloc(MAX_LINEWIDTH + 3 - txtlen);
+ memset(buf, 0, MAX_LINEWIDTH + 3 - txtlen);
+ strncpy(buf, tmp, MAX_LINEWIDTH - txtlen);
+ strcat(buf, linebreak);
+ }
+ leave = 1;
+ }
+ txtlen = GetWindowTextLength(hOutput);
+ SendMessage(hOutput, EM_SETSEL, (WPARAM)txtlen, (LPARAM)txtlen);
+ SendMessage(hOutput, EM_REPLACESEL, FALSE, (LPARAM)(buf ? buf : tmp));
+ if (buf) {
+ xfree(buf);
+ buf = 0;
+ tmp += pos;
+ }
+ if (leave)
+ return;
}
}
COLORREF cr;
if (!IsWindowEnabled(hWnd)) {
- p = strchr(out, ':');
- if (p)
- *(p + 1) = '\0';
+ p = strchr(out, ':');
+ if (p)
+ *(p + 1) = '\0';
}
if (strlen(out) > MAX_LINEWIDTH)
- out[MAX_LINEWIDTH] = '\0';
+ out[MAX_LINEWIDTH] = '\0';
p = strchr(out, '\n');
if (p)
- *p = '\0';
+ *p = '\0';
cr = GetSysColor(COLOR_WINDOWTEXT);
count = SendMessage(hWnd, (UINT) LB_GETCOUNT, 0, 0);
if (pos < count) {
- memset(text, 0, MAX_LINEWIDTH + 1);
- SendMessage(hWnd, LB_GETTEXT, pos, (LPARAM)((LPTSTR)text));
- if (strcmp(out, text) != 0 && mark)
- cr = GetSysColor(COLOR_HIGHLIGHT);
- SendMessage(hWnd, LB_DELETESTRING, pos, 0);
+ memset(text, 0, MAX_LINEWIDTH + 1);
+ SendMessage(hWnd, LB_GETTEXT, pos, (LPARAM)((LPTSTR)text));
+ if (strcmp(out, text) != 0 && mark)
+ cr = GetSysColor(COLOR_HIGHLIGHT);
+ SendMessage(hWnd, LB_DELETESTRING, pos, 0);
}
SendMessage(hWnd, LB_INSERTSTRING, pos, (LPARAM)out);
SendMessage(hWnd, LB_SETITEMDATA, pos, cr);
GetClientRect(hWnd, &rc);
clientsize = rc.bottom - rc.top;
- itemsize = SendMessage(hWnd, LB_GETITEMHEIGHT, 0, 0);
+ itemsize = SendMessage(hWnd, LB_GETITEMHEIGHT, 0, 0);
while (clientsize > itemsize) {
- lines ++;
- clientsize -= itemsize;
+ lines ++;
+ clientsize -= itemsize;
}
return lines;
}
(p[23] << 16) | (p[22] << 8) | p[21],
(p[26] << 16) | (p[25] << 8) | p[24],
(p[27] & 1) ? 'L' : ' ', (p[27] & 2) ? ' ' : 'S');
- free(p2);
+ free(p2);
}
for (i = 0; i < 4; i++) {
p = p2 = save_disk (i, &len, NULL);
ULBS("");
got = 0;
for (i = 0; i < BREAKPOINT_TOTAL; i++) {
- if (!bpnodes[i].enabled)
- continue;
+ if (!bpnodes[i].enabled)
+ continue;
m68k_disasm_2(outbp, sizeof(outbp), bpnodes[i].addr, NULL, 1, NULL, NULL, 0);
- ULBS(outbp);
- got = 1;
+ ULBS(outbp);
+ got = 1;
}
if (!got)
- ULBS("none");
+ ULBS("none");
ULBS("");
ULBS("Memwatch breakpoints:");
ULBS("");
got = 0;
for (i = 0; i < MEMWATCH_TOTAL; i++) {
- if (mwnodes[i].size == 0)
- continue;
+ if (mwnodes[i].size == 0)
+ continue;
memwatch_dump2(outw, sizeof(outw), i);
- ULBS(outw);
- got = 1;
+ ULBS(outw);
+ got = 1;
}
if (!got)
- ULBS("none");
+ ULBS("none");
for (i = ulbs_pos; i < lines_old; i++)
- SendMessage(hBrkpts, LB_DELETESTRING, line, 0);
+ SendMessage(hBrkpts, LB_DELETESTRING, line, 0);
}
static void ShowMem(int offset)
lines_old = SendMessage(hMemory, LB_GETCOUNT, 0, 0);
lines_new = GetLBOutputLines(hMemory);
for (i = 0; i < lines_new; i++) {
- addr = dumpmem2(addr, out, sizeof(out));
- UpdateListboxString(hMemory, i, out, FALSE);
+ addr = dumpmem2(addr, out, sizeof(out));
+ UpdateListboxString(hMemory, i, out, FALSE);
}
for (i = lines_new; i < lines_old; i++) {
- SendMessage(hMemory, LB_DELETESTRING, lines_new, 0);
+ SendMessage(hMemory, LB_DELETESTRING, lines_new, 0);
}
SendMessage(hMemory, LB_SETTOPINDEX, 0, 0);
}
dasmaddr = addr - 20;
while (dasmaddr < addr) {
next = dasmaddr + 2;
- m68k_disasm_2(NULL, 0, dasmaddr, &next, 1, NULL, NULL, 0);
- if (next == addr) {
- *prevaddr = dasmaddr;
- return 1;
- }
- dasmaddr = next;
+ m68k_disasm_2(NULL, 0, dasmaddr, &next, 1, NULL, NULL, 0);
+ if (next == addr) {
+ *prevaddr = dasmaddr;
+ return 1;
+ }
+ dasmaddr = next;
}
return 0;
}
hDasm = GetDlgItem(hDbgWnd, IDC_DBG_DASM);
if (!dbgpage[currpage].init) {
- addr = m68k_getpc(®s);
- dbgpage[currpage].init = 1;
+ addr = m68k_getpc (®s);
+ dbgpage[currpage].init = 1;
}
else
- addr = dbgpage[currpage].addr;
+ addr = dbgpage[currpage].addr;
if (direction > 0) {
- m68k_disasm_2(NULL, 0, addr, &addr, 1, NULL, NULL, 0);
- if (!addr || addr < dbgpage[currpage].addr)
- addr = dbgpage[currpage].addr;
+ m68k_disasm_2(NULL, 0, addr, &addr, 1, NULL, NULL, 0);
+ if (!addr || addr < dbgpage[currpage].addr)
+ addr = dbgpage[currpage].addr;
}
else if (direction < 0 && addr > 0) {
- if (GetPrevAddr(addr, &prev))
- addr = prev;
- else
- addr -= 2;
+ if (GetPrevAddr(addr, &prev))
+ addr = prev;
+ else
+ addr -= 2;
}
if (addr % 2)
- return;
+ return;
dbgpage[currpage].addr = addr;
lines_old = SendMessage(hDasm, LB_GETCOUNT, 0, 0);
lines_new = GetLBOutputLines(hDasm);
for (i = 0; i < lines_new; i++) {
- m68k_disasm_2(out, sizeof(out), addr, &addr, 1, NULL, NULL, 0);
- if (addr > dbgpage[currpage].addr)
- UpdateListboxString(hDasm, i, out, FALSE);
- else
- UpdateListboxString(hDasm, i, "", FALSE);
+ m68k_disasm_2(out, sizeof(out), addr, &addr, 1, NULL, NULL, 0);
+ if (addr > dbgpage[currpage].addr)
+ UpdateListboxString(hDasm, i, out, FALSE);
+ else
+ UpdateListboxString(hDasm, i, "", FALSE);
}
for (i = lines_new; i < lines_old; i++) {
- SendMessage(hDasm, LB_DELETESTRING, lines_new, 0);
+ SendMessage(hDasm, LB_DELETESTRING, lines_new, 0);
}
SendMessage(hDasm, LB_SETTOPINDEX, 0, 0);
}
{
int i, id;
- dbgpage[currpage].addr = m68k_getpc(®s);
+ dbgpage[currpage].addr = m68k_getpc (®s);
sprintf(dbgpage[currpage].addrinput, "%08lX", dbgpage[currpage].addr);
for (i = 0; i < MAXPAGECONTROLS; i++) {
- id = GetDlgCtrlID(dbgpage[currpage].ctrl[i]);
- if (id == IDC_DBG_MEMINPUT)
- SetWindowText(dbgpage[currpage].ctrl[i], dbgpage[currpage].addrinput);
+ id = GetDlgCtrlID(dbgpage[currpage].ctrl[i]);
+ if (id == IDC_DBG_MEMINPUT)
+ SetWindowText(dbgpage[currpage].ctrl[i], dbgpage[currpage].addrinput);
}
ShowDasm(0);
}
HWND hwnd;
if (index >= pages || ((index == currpage) && !force))
- return;
+ return;
if (currpage >= 0) {
- pstatuscolor[currpage] = (currpage < 2 && index > 1) ? COLOR_WINDOWTEXT : COLOR_GRAYTEXT;
- if (index < 2)
- pstatuscolor[index == 0 ? 1 : 0] = COLOR_GRAYTEXT;
- for (i = 0; i < MAXPAGECONTROLS; i++) {
- if (dbgpage[currpage].ctrl[i]) {
- id = GetDlgCtrlID(dbgpage[currpage].ctrl[i]);
- if (id == IDC_DBG_MEMINPUT)
- GetWindowText(dbgpage[currpage].ctrl[i], dbgpage[currpage].addrinput, 9);
- ShowWindow(dbgpage[currpage].ctrl[i], SW_HIDE);
- }
- }
+ pstatuscolor[currpage] = (currpage < 2 && index > 1) ? COLOR_WINDOWTEXT : COLOR_GRAYTEXT;
+ if (index < 2)
+ pstatuscolor[index == 0 ? 1 : 0] = COLOR_GRAYTEXT;
+ for (i = 0; i < MAXPAGECONTROLS; i++) {
+ if (dbgpage[currpage].ctrl[i]) {
+ id = GetDlgCtrlID(dbgpage[currpage].ctrl[i]);
+ if (id == IDC_DBG_MEMINPUT)
+ GetWindowText(dbgpage[currpage].ctrl[i], dbgpage[currpage].addrinput, 9);
+ ShowWindow(dbgpage[currpage].ctrl[i], SW_HIDE);
+ }
+ }
}
pagetype = 0;
for (i = 0; i < MAXPAGECONTROLS; i++) {
- if (dbgpage[index].ctrl[i]) {
- id = GetDlgCtrlID(dbgpage[index].ctrl[i]);
+ if (dbgpage[index].ctrl[i]) {
+ id = GetDlgCtrlID(dbgpage[index].ctrl[i]);
if (id == IDC_DBG_OUTPUT1 || id == IDC_DBG_OUTPUT2) {
- hOutput = dbgpage[index].ctrl[i];
- } else if (id == IDC_DBG_MEM) {
- ShowMem(0);
+ hOutput = dbgpage[index].ctrl[i];
+ } else if (id == IDC_DBG_MEM) {
+ ShowMem(0);
pagetype = id;
} else if (id == IDC_DBG_DASM) {
- ShowDasm(0);
+ ShowDasm(0);
pagetype = id;
} else if (id == IDC_DBG_MEMINPUT) {
- SetWindowText(dbgpage[index].ctrl[i], dbgpage[index].addrinput);
- } else if (id == IDC_DBG_BRKPTS) {
- ShowBreakpoints();
- } else if (id == IDC_DBG_MISC) {
- ShowMisc();
- } else if (id == IDC_DBG_CUSTOM) {
- ShowCustom();
- }
+ SetWindowText(dbgpage[index].ctrl[i], dbgpage[index].addrinput);
+ } else if (id == IDC_DBG_BRKPTS) {
+ ShowBreakpoints();
+ } else if (id == IDC_DBG_MISC) {
+ ShowMisc();
+ } else if (id == IDC_DBG_CUSTOM) {
+ ShowCustom();
+ }
ShowWindow(dbgpage[index].ctrl[i], SW_SHOW);
- }
+ }
}
currpage = index;
pstatuscolor[currpage] = COLOR_HIGHLIGHT;
int i;
if (pages >= MAXPAGES)
- return;
+ return;
memset(&dbgpage[pages], 0, sizeof(struct debuggerpage));
for (i = 0; iddata[i] > 0; i++) {
- dbgpage[pages].ctrl[i] = GetDlgItem(hDbgWnd, iddata[i]);
- ShowWindow(dbgpage[pages].ctrl[i], SW_HIDE);
+ dbgpage[pages].ctrl[i] = GetDlgItem(hDbgWnd, iddata[i]);
+ ShowWindow(dbgpage[pages].ctrl[i], SW_HIDE);
}
pages++;
}
SelectObject(hdc, hfontold);
ReleaseDC(hWnd, hdc);
if (!width)
- return tm.tmHeight + tm.tmExternalLeading;
+ return tm.tmHeight + tm.tmExternalLeading;
else if (text)
- return tm.tmMaxCharWidth * strlen(text);
+ return tm.tmMaxCharWidth * strlen(text);
return 0;
}
HWND hwnd;
int dpage[][MAXPAGECONTROLS + 1] = {
- { IDC_DBG_OUTPUT1, -1 },
- { IDC_DBG_OUTPUT2, -1 },
- { IDC_DBG_MEM, IDC_DBG_MEMINPUT, -1 },
- { IDC_DBG_MEM, IDC_DBG_MEMINPUT, -1 },
- { IDC_DBG_DASM, IDC_DBG_MEMINPUT, IDC_DBG_MEMTOPC, -1 },
- { IDC_DBG_DASM, IDC_DBG_MEMINPUT, IDC_DBG_MEMTOPC, -1 },
- { IDC_DBG_BRKPTS, -1 },
- { IDC_DBG_MISC, -1 },
- { IDC_DBG_CUSTOM, -1 }
+ { IDC_DBG_OUTPUT1, -1 },
+ { IDC_DBG_OUTPUT2, -1 },
+ { IDC_DBG_MEM, IDC_DBG_MEMINPUT, -1 },
+ { IDC_DBG_MEM, IDC_DBG_MEMINPUT, -1 },
+ { IDC_DBG_DASM, IDC_DBG_MEMINPUT, IDC_DBG_MEMTOPC, -1 },
+ { IDC_DBG_DASM, IDC_DBG_MEMINPUT, IDC_DBG_MEMTOPC, -1 },
+ { IDC_DBG_BRKPTS, -1 },
+ { IDC_DBG_MISC, -1 },
+ { IDC_DBG_CUSTOM, -1 }
};
pages = 0;
for (i = 0; i < (sizeof(dpage) / sizeof(dpage[0])); i++)
- AddPage(dpage[i]);
+ AddPage(dpage[i]);
memset(parts, 0, MAXPAGES * sizeof(int));
width = GetTextSize(hDbgWnd, "12345678", TRUE); // longest pagename + 2
for (i = 0; i < pages; i++) {
- pwidth += width;
- parts[i] = pwidth;
+ pwidth += width;
+ parts[i] = pwidth;
}
hwnd = GetDlgItem(hDbgWnd, IDC_DBG_STATUS);
SendMessage(hwnd, SB_SETPARTS, (WPARAM)pages, (LPARAM)parts);
for (i = 0; i < pages; i++) {
- SendMessage(hwnd, SB_SETTEXT, i | SBT_OWNERDRAW, 0);
- pstatuscolor[i] = COLOR_GRAYTEXT;
+ SendMessage(hwnd, SB_SETTEXT, i | SBT_OWNERDRAW, 0);
+ pstatuscolor[i] = COLOR_GRAYTEXT;
}
}
WNDPROC oldproc;
switch (message) {
- case WM_KEYUP:
- switch (wParam) {
- case VK_RETURN:
- inputfinished = 1;
- break;
- case VK_UP:
- SetPrevHistNode(hWnd);
- return TRUE;
- case VK_DOWN:
- SetNextHistNode(hWnd);
- return TRUE;
- }
- break;
+ case WM_KEYUP:
+ switch (wParam) {
+ case VK_RETURN:
+ inputfinished = 1;
+ break;
+ case VK_UP:
+ SetPrevHistNode(hWnd);
+ return TRUE;
+ case VK_DOWN:
+ SetNextHistNode(hWnd);
+ return TRUE;
+ }
+ break;
}
- oldproc = (WNDPROC)GetWindowLongPtr(hWnd, GWL_USERDATA);
+ oldproc = (WNDPROC)GetWindowLongPtr(hWnd, GWL_USERDATA);
return CallWindowProc(oldproc, hWnd, message, wParam, lParam);
}
WNDPROC oldproc;
switch (message) {
- case WM_CHAR:
- if (wParam == VK_BACK)
- break;
- if (!strchr(allowed, wParam))
- return TRUE;
- break;
- case WM_PASTE:
- if (!OpenClipboard(NULL))
- return TRUE;
- hdata = GetClipboardData(CF_TEXT);
- if (hdata) {
- lptstr = GlobalLock(hdata);
- if (lptstr) {
- if (strspn(lptstr, allowed) != strlen(lptstr))
- ok = 0;
- GlobalUnlock(hdata);
- }
- }
- CloseClipboard();
- if (!ok)
- return TRUE;
- break;
- case WM_KEYUP:
- switch (wParam) {
- case VK_RETURN:
- sprintf(addrstr, "0x");
- GetWindowText(hWnd, addrstr + 2, 9);
- addr = strtoul(addrstr, NULL, 0);
- dbgpage[currpage].addr = addr;
- ShowPage(currpage, TRUE);
- break;
- }
- break;
+ case WM_CHAR:
+ if (wParam == VK_BACK)
+ break;
+ if (!strchr(allowed, wParam))
+ return TRUE;
+ break;
+ case WM_PASTE:
+ if (!OpenClipboard(NULL))
+ return TRUE;
+ hdata = GetClipboardData(CF_TEXT);
+ if (hdata) {
+ lptstr = GlobalLock(hdata);
+ if (lptstr) {
+ if (strspn(lptstr, allowed) != strlen(lptstr))
+ ok = 0;
+ GlobalUnlock(hdata);
+ }
+ }
+ CloseClipboard();
+ if (!ok)
+ return TRUE;
+ break;
+ case WM_KEYUP:
+ switch (wParam) {
+ case VK_RETURN:
+ sprintf(addrstr, "0x");
+ GetWindowText(hWnd, addrstr + 2, 9);
+ addr = strtoul(addrstr, NULL, 0);
+ dbgpage[currpage].addr = addr;
+ ShowPage(currpage, TRUE);
+ break;
+ }
+ break;
}
- oldproc = (WNDPROC)GetWindowLongPtr(hWnd, GWL_USERDATA);
+ oldproc = (WNDPROC)GetWindowLongPtr(hWnd, GWL_USERDATA);
return CallWindowProc(oldproc, hWnd, message, wParam, lParam);
}
HFONT oldfont, font;
HDC hdc, compdc;
HBITMAP compbmp, oldbmp;
-
+
switch (message) {
- case WM_CHAR:
- hinput = GetDlgItem(hDbgWnd, IDC_DBG_INPUT);
- SetFocus(hinput);
- SendMessage(hinput, WM_CHAR, wParam, lParam);
- return TRUE;
- case WM_ERASEBKGND:
- return TRUE;
- case WM_SETFOCUS:
- return TRUE;
- case WM_PAINT:
- hdc = BeginPaint(hWnd, &ps);
- GetClientRect(hWnd, &rc);
- height = rc.bottom - rc.top;
- width = rc.right - rc.left;
- bottom = rc.bottom;
- itemheight = SendMessage(hWnd, LB_GETITEMHEIGHT, 0, 0);
- rc.bottom = itemheight;
- count = SendMessage(hWnd, LB_GETCOUNT, 0, 0);
- compdc = CreateCompatibleDC(hdc);
- compbmp = CreateCompatibleBitmap(hdc, width, height);
- oldbmp = SelectObject(compdc, compbmp);
- font = (HFONT)SendMessage(hWnd, WM_GETFONT, 0, 0);
- oldfont = SelectObject(compdc, font);
- id = GetDlgCtrlID(hWnd);
- dis.CtlType = ODT_LISTBOX;
- dis.CtlID = id;
- dis.itemAction = 0;
- dis.itemState = 0;
- dis.hwndItem = hWnd;
- dis.hDC = compdc;
+ case WM_CHAR:
+ hinput = GetDlgItem(hDbgWnd, IDC_DBG_INPUT);
+ SetFocus(hinput);
+ SendMessage(hinput, WM_CHAR, wParam, lParam);
+ return TRUE;
+ case WM_ERASEBKGND:
+ return TRUE;
+ case WM_SETFOCUS:
+ return TRUE;
+ case WM_PAINT:
+ hdc = BeginPaint(hWnd, &ps);
+ GetClientRect(hWnd, &rc);
+ height = rc.bottom - rc.top;
+ width = rc.right - rc.left;
+ bottom = rc.bottom;
+ itemheight = SendMessage(hWnd, LB_GETITEMHEIGHT, 0, 0);
+ rc.bottom = itemheight;
+ count = SendMessage(hWnd, LB_GETCOUNT, 0, 0);
+ compdc = CreateCompatibleDC(hdc);
+ compbmp = CreateCompatibleBitmap(hdc, width, height);
+ oldbmp = SelectObject(compdc, compbmp);
+ font = (HFONT)SendMessage(hWnd, WM_GETFONT, 0, 0);
+ oldfont = SelectObject(compdc, font);
+ id = GetDlgCtrlID(hWnd);
+ dis.CtlType = ODT_LISTBOX;
+ dis.CtlID = id;
+ dis.itemAction = 0;
+ dis.itemState = 0;
+ dis.hwndItem = hWnd;
+ dis.hDC = compdc;
top = SendMessage(hWnd, LB_GETTOPINDEX, 0, 0);
for (i = top; i < count && rc.top < height; i++) {
dis.itemID = i;
- dis.rcItem = rc;
- dis.itemData = SendMessage(hWnd, LB_GETITEMDATA, i, 0);
- SendMessage(hDbgWnd, WM_DRAWITEM, id, (LPARAM)&dis);
- rc.top += itemheight;
- rc.bottom += itemheight;
- }
- rc.bottom = bottom;
- if (!IsWindowEnabled(hWnd))
- FillRect(compdc, &rc, GetSysColorBrush(COLOR_3DFACE));
- else
- FillRect(compdc, &rc, GetSysColorBrush(COLOR_WINDOW));
- GetWindowRect(hWnd, &rc);
- hsbar = GetDlgItem(hDbgWnd, IDC_DBG_STATUS);
- GetWindowRect(hsbar, &r);
- if (rc.top < r.top) { // not below status bar
- if (rc.bottom > r.top) // partly visible
- height -= rc.bottom - r.top;
- BitBlt(hdc, 0, 0, width, height, compdc, 0, 0, SRCCOPY);
- }
- SelectObject(compdc, oldfont);
- SelectObject(compdc, oldbmp);
- DeleteObject(compbmp);
- DeleteDC(compdc);
- EndPaint(hWnd, &ps);
- return TRUE;
+ dis.rcItem = rc;
+ dis.itemData = SendMessage(hWnd, LB_GETITEMDATA, i, 0);
+ SendMessage(hDbgWnd, WM_DRAWITEM, id, (LPARAM)&dis);
+ rc.top += itemheight;
+ rc.bottom += itemheight;
+ }
+ rc.bottom = bottom;
+ if (!IsWindowEnabled(hWnd))
+ FillRect(compdc, &rc, GetSysColorBrush(COLOR_3DFACE));
+ else
+ FillRect(compdc, &rc, GetSysColorBrush(COLOR_WINDOW));
+ GetWindowRect(hWnd, &rc);
+ hsbar = GetDlgItem(hDbgWnd, IDC_DBG_STATUS);
+ GetWindowRect(hsbar, &r);
+ if (rc.top < r.top) { // not below status bar
+ if (rc.bottom > r.top) // partly visible
+ height -= rc.bottom - r.top;
+ BitBlt(hdc, 0, 0, width, height, compdc, 0, 0, SRCCOPY);
+ }
+ SelectObject(compdc, oldfont);
+ SelectObject(compdc, oldbmp);
+ DeleteObject(compbmp);
+ DeleteDC(compdc);
+ EndPaint(hWnd, &ps);
+ return TRUE;
}
- oldproc = (WNDPROC)GetWindowLongPtr(hWnd, GWL_USERDATA);
+ oldproc = (WNDPROC)GetWindowLongPtr(hWnd, GWL_USERDATA);
return CallWindowProc(oldproc, hWnd, message, wParam, lParam);
}
HWND hinput;
switch (message) {
- case WM_CHAR:
- if (wParam != VK_CANCEL) { // not for Ctrl-C for copying
- hinput = GetDlgItem(hDbgWnd, IDC_DBG_INPUT);
- SetFocus(hinput);
- SendMessage(hinput, WM_CHAR, wParam, lParam);
- return TRUE;
- }
- break;
+ case WM_CHAR:
+ if (wParam != VK_CANCEL) { // not for Ctrl-C for copying
+ hinput = GetDlgItem(hDbgWnd, IDC_DBG_INPUT);
+ SetFocus(hinput);
+ SendMessage(hinput, WM_CHAR, wParam, lParam);
+ return TRUE;
+ }
+ break;
}
- oldproc = (WNDPROC)GetWindowLongPtr(hWnd, GWL_USERDATA);
+ oldproc = (WNDPROC)GetWindowLongPtr(hWnd, GWL_USERDATA);
return CallWindowProc(oldproc, hWnd, message, wParam, lParam);
}
id = GetDlgCtrlID(hWnd);
switch (id) {
- case IDC_DBG_INPUT:
- newproc = InputProc;
- SendMessage(hWnd, EM_LIMITTEXT, MAX_LINEWIDTH, 0);
- break;
- case IDC_DBG_MEMINPUT:
- newproc = MemInputProc;
- SendMessage(hWnd, EM_LIMITTEXT, 8, 0);
- break;
- case IDC_DBG_PREFETCH:
- newproc = ListboxProc;
- enable = currprefs.cpu_compatible ? TRUE : FALSE;
- break;
- case IDC_DBG_FPREG:
- case IDC_DBG_FPSR:
- newproc = ListboxProc;
- enable = currprefs.cpu_model < 68020 ? FALSE : TRUE;
- break;
- case IDC_DBG_MISCCPU:
- if (currprefs.cpu_model == 68000) {
- items = 4;
- enable = FALSE;
- }
- else {
- for (i = 0; m2cregs[i].regno>= 0; i++) {
- if (!movec_illg(m2cregs[i].regno))
- items++;
- }
- }
- pwi.cbSize = sizeof pwi;
- GetWindowInfo(hWnd, &pwi);
- r = &pwi.rcClient;
- r->bottom = r->top + items * GetTextSize(hWnd, NULL, FALSE);
- AdjustWindowRectEx(r, pwi.dwStyle, FALSE, pwi.dwExStyle);
- SetWindowPos(hWnd, 0, 0, 0, r->right - r->left, r->bottom - r->top, SWP_NOMOVE | SWP_NOZORDER);
- newproc = ListboxProc;
- break;
- default:
- if (GetClassName(hWnd, classname, CLASSNAMELENGTH)) {
- if (!strcmp(classname, "ListBox"))
- newproc = ListboxProc;
- else if (!strcmp(classname, "Edit"))
- newproc = EditProc;
- }
- break;
+ case IDC_DBG_INPUT:
+ newproc = InputProc;
+ SendMessage(hWnd, EM_LIMITTEXT, MAX_LINEWIDTH, 0);
+ break;
+ case IDC_DBG_MEMINPUT:
+ newproc = MemInputProc;
+ SendMessage(hWnd, EM_LIMITTEXT, 8, 0);
+ break;
+ case IDC_DBG_PREFETCH:
+ newproc = ListboxProc;
+ enable = currprefs.cpu_compatible ? TRUE : FALSE;
+ break;
+ case IDC_DBG_FPREG:
+ case IDC_DBG_FPSR:
+ newproc = ListboxProc;
+ enable = currprefs.cpu_model < 68020 ? FALSE : TRUE;
+ break;
+ case IDC_DBG_MISCCPU:
+ if (currprefs.cpu_model == 68000) {
+ items = 4;
+ enable = FALSE;
+ }
+ else {
+ for (i = 0; m2cregs[i].regno>= 0; i++) {
+ if (!movec_illg(m2cregs[i].regno))
+ items++;
+ }
+ }
+ pwi.cbSize = sizeof pwi;
+ GetWindowInfo(hWnd, &pwi);
+ r = &pwi.rcClient;
+ r->bottom = r->top + items * GetTextSize(hWnd, NULL, FALSE);
+ AdjustWindowRectEx(r, pwi.dwStyle, FALSE, pwi.dwExStyle);
+ SetWindowPos(hWnd, 0, 0, 0, r->right - r->left, r->bottom - r->top, SWP_NOMOVE | SWP_NOZORDER);
+ newproc = ListboxProc;
+ break;
+ default:
+ if (GetClassName(hWnd, classname, CLASSNAMELENGTH)) {
+ if (!strcmp(classname, "ListBox"))
+ newproc = ListboxProc;
+ else if (!strcmp(classname, "Edit"))
+ newproc = EditProc;
+ }
+ break;
}
if (newproc) {
- oldproc = (WNDPROC)SetWindowLongPtr(hWnd, GWL_WNDPROC, (LONG_PTR)newproc);
- SetWindowLongPtr(hWnd, GWL_USERDATA, (LONG_PTR)oldproc);
+ oldproc = (WNDPROC)SetWindowLongPtr(hWnd, GWL_WNDPROC, (LONG_PTR)newproc);
+ SetWindowLongPtr(hWnd, GWL_USERDATA, (LONG_PTR)oldproc);
}
EnableWindow(hWnd, enable);
return TRUE;
char text[MAX_LINEWIDTH + 1];
switch (message) {
- case WM_INITDIALOG:
+ case WM_INITDIALOG:
{
int newpos = 0;
LONG x, y, w, h;
DWORD regkeytype;
DWORD regkeysize = sizeof(LONG);
- RECT rw;
- GetWindowRect(hDlg, &rw);
- dbgwnd_minx = rw.right - rw.left;
- dbgwnd_miny = rw.bottom - rw.top;
+ RECT rw;
+ GetWindowRect(hDlg, &rw);
+ dbgwnd_minx = rw.right - rw.left;
+ dbgwnd_miny = rw.bottom - rw.top;
GetClientRect(hDlg, &dlgRect);
if (hWinUAEKey) {
newpos = 1;
histcount = 0;
inputfinished = 0;
AdjustDialog(hDlg);
- return TRUE;
+ return TRUE;
}
- case WM_CLOSE:
- DestroyWindow(hDlg);
+ case WM_CLOSE:
+ DestroyWindow(hDlg);
uae_quit();
- return TRUE;
- case WM_DESTROY:
+ return TRUE;
+ case WM_DESTROY:
{
RECT r;
if (GetWindowRect (hDlg, &r) && hWinUAEKey) {
r.right -= r.left;
r.bottom -= r.top;
- RegSetValueEx (hWinUAEKey, "DebuggerPosX", 0, REG_DWORD, (LPBYTE)&r.left, sizeof(LONG));
- RegSetValueEx (hWinUAEKey, "DebuggerPosY", 0, REG_DWORD, (LPBYTE)&r.top, sizeof(LONG));
- RegSetValueEx (hWinUAEKey, "DebuggerPosW", 0, REG_DWORD, (LPBYTE)&r.right, sizeof(LONG));
- RegSetValueEx (hWinUAEKey, "DebuggerPosH", 0, REG_DWORD, (LPBYTE)&r.bottom, sizeof(LONG));
+ RegSetValueEx (hWinUAEKey, "DebuggerPosX", 0, REG_DWORD, (LPBYTE)&r.left, sizeof(LONG));
+ RegSetValueEx (hWinUAEKey, "DebuggerPosY", 0, REG_DWORD, (LPBYTE)&r.top, sizeof(LONG));
+ RegSetValueEx (hWinUAEKey, "DebuggerPosW", 0, REG_DWORD, (LPBYTE)&r.right, sizeof(LONG));
+ RegSetValueEx (hWinUAEKey, "DebuggerPosH", 0, REG_DWORD, (LPBYTE)&r.bottom, sizeof(LONG));
}
- hDbgWnd = 0;
- PostQuitMessage(0);
+ hDbgWnd = 0;
+ PostQuitMessage(0);
DeleteFromHistory(histcount);
consoleopen = 0;
- return TRUE;
+ return TRUE;
}
case WM_GETMINMAXINFO:
{
case WM_EXITSIZEMOVE:
{
AdjustDialog(hDlg);
- ShowPage(currpage, TRUE);
+ ShowPage(currpage, TRUE);
return TRUE;
}
- case WM_CTLCOLORSTATIC:
- SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
- return (LRESULT)GetSysColorBrush(COLOR_WINDOW);
- case WM_CTLCOLORLISTBOX:
- hwnd = (HWND)lParam;
- if (!IsWindowEnabled(hwnd)) {
- SetBkColor((HDC)wParam, GetSysColor(COLOR_3DFACE));
- return (LRESULT)GetSysColorBrush(COLOR_3DFACE);
- }
- SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
- return (LRESULT)GetSysColorBrush(COLOR_WINDOW);
- case WM_COMMAND:
- switch (LOWORD(wParam)) {
- case IDC_DBG_HELP:
- {
- HWND hinput;
- WriteOutput(linebreak + 1, 2);
- debug_help();
- hinput = GetDlgItem(hDbgWnd, IDC_DBG_INPUT);
- SetFocus(hinput);
- return TRUE;
- }
- case ID_DBG_PAGE1:
- case ID_DBG_PAGE2:
- case ID_DBG_PAGE3:
- case ID_DBG_PAGE4:
- case ID_DBG_PAGE5:
- case ID_DBG_PAGE6:
- case ID_DBG_PAGE7:
- case ID_DBG_PAGE8:
- case ID_DBG_PAGE9:
- // IDs have to be consecutive and in order of page order for this to work
- ShowPage(LOWORD(wParam) - ID_DBG_PAGE1, FALSE);
- return TRUE;
- case IDC_DBG_MEMUP:
+ case WM_CTLCOLORSTATIC:
+ SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
+ return (LRESULT)GetSysColorBrush(COLOR_WINDOW);
+ case WM_CTLCOLORLISTBOX:
+ hwnd = (HWND)lParam;
+ if (!IsWindowEnabled(hwnd)) {
+ SetBkColor((HDC)wParam, GetSysColor(COLOR_3DFACE));
+ return (LRESULT)GetSysColorBrush(COLOR_3DFACE);
+ }
+ SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
+ return (LRESULT)GetSysColorBrush(COLOR_WINDOW);
+ case WM_COMMAND:
+ switch (LOWORD(wParam)) {
+ case IDC_DBG_HELP:
+ {
+ HWND hinput;
+ WriteOutput(linebreak + 1, 2);
+ debug_help();
+ hinput = GetDlgItem(hDbgWnd, IDC_DBG_INPUT);
+ SetFocus(hinput);
+ return TRUE;
+ }
+ case ID_DBG_PAGE1:
+ case ID_DBG_PAGE2:
+ case ID_DBG_PAGE3:
+ case ID_DBG_PAGE4:
+ case ID_DBG_PAGE5:
+ case ID_DBG_PAGE6:
+ case ID_DBG_PAGE7:
+ case ID_DBG_PAGE8:
+ case ID_DBG_PAGE9:
+ // IDs have to be consecutive and in order of page order for this to work
+ ShowPage(LOWORD(wParam) - ID_DBG_PAGE1, FALSE);
+ return TRUE;
+ case IDC_DBG_MEMUP:
moveupdown(-1);
return TRUE;
- case IDC_DBG_MEMDOWN:
- moveupdown(1);
- return TRUE;
- case IDC_DBG_MEMUPFAST:
+ case IDC_DBG_MEMDOWN:
+ moveupdown(1);
+ return TRUE;
+ case IDC_DBG_MEMUPFAST:
moveupdown(-2);
return TRUE;
- case IDC_DBG_MEMDOWNFAST:
- moveupdown(2);
- return TRUE;
- case IDC_DBG_MEMTOPC:
- {
- HWND hmeminput;
- SetMemToPC();
- hmeminput = GetDlgItem(hDbgWnd, IDC_DBG_MEMINPUT);
- SetFocus(hmeminput);
- return TRUE;
- }
- }
- break;
- case WM_MEASUREITEM:
- ((MEASUREITEMSTRUCT*)(lParam))->itemHeight = GetTextSize(hDlg, NULL, FALSE);
- return TRUE;
- case WM_DRAWITEM:
- pdis = (DRAWITEMSTRUCT *)lParam;
- hdc = pdis->hDC;
- rc = pdis->rcItem;
- SetBkMode(hdc, TRANSPARENT);
- if (wParam == IDC_DBG_STATUS) {
- SetTextColor(hdc, GetSysColor(pstatuscolor[pdis->itemID]));
- DrawText(hdc, pname[pdis->itemID], lstrlen(pname[pdis->itemID]), &rc, DT_SINGLELINE | DT_CENTER | DT_VCENTER);
- }
- else {
- if (pdis->itemID < 0) {
- return TRUE;
- }
- memset(text, 0, MAX_LINEWIDTH + 1);
- SendMessage(pdis->hwndItem, LB_GETTEXT, pdis->itemID, (LPARAM)(LPSTR)text);
- if (!IsWindowEnabled(pdis->hwndItem)) {
- FillRect(hdc, &rc, GetSysColorBrush(COLOR_3DFACE));
- SetBkColor(hdc, GetSysColor(COLOR_3DFACE));
- }
- else {
- FillRect(hdc, &rc, GetSysColorBrush(COLOR_WINDOW));
- SetBkColor(hdc, GetSysColor(COLOR_WINDOW));
- }
- SetTextColor(hdc, pdis->itemData);
- TextOut(hdc, rc.left, rc.top, text, strlen(text));
- return TRUE;
- }
- break;
+ case IDC_DBG_MEMDOWNFAST:
+ moveupdown(2);
+ return TRUE;
+ case IDC_DBG_MEMTOPC:
+ {
+ HWND hmeminput;
+ SetMemToPC();
+ hmeminput = GetDlgItem(hDbgWnd, IDC_DBG_MEMINPUT);
+ SetFocus(hmeminput);
+ return TRUE;
+ }
+ }
+ break;
+ case WM_MEASUREITEM:
+ ((MEASUREITEMSTRUCT*)(lParam))->itemHeight = GetTextSize(hDlg, NULL, FALSE);
+ return TRUE;
+ case WM_DRAWITEM:
+ pdis = (DRAWITEMSTRUCT *)lParam;
+ hdc = pdis->hDC;
+ rc = pdis->rcItem;
+ SetBkMode(hdc, TRANSPARENT);
+ if (wParam == IDC_DBG_STATUS) {
+ SetTextColor(hdc, GetSysColor(pstatuscolor[pdis->itemID]));
+ DrawText(hdc, pname[pdis->itemID], lstrlen(pname[pdis->itemID]), &rc, DT_SINGLELINE | DT_CENTER | DT_VCENTER);
+ }
+ else {
+ if (pdis->itemID < 0) {
+ return TRUE;
+ }
+ memset(text, 0, MAX_LINEWIDTH + 1);
+ SendMessage(pdis->hwndItem, LB_GETTEXT, pdis->itemID, (LPARAM)(LPSTR)text);
+ if (!IsWindowEnabled(pdis->hwndItem)) {
+ FillRect(hdc, &rc, GetSysColorBrush(COLOR_3DFACE));
+ SetBkColor(hdc, GetSysColor(COLOR_3DFACE));
+ }
+ else {
+ FillRect(hdc, &rc, GetSysColorBrush(COLOR_WINDOW));
+ SetBkColor(hdc, GetSysColor(COLOR_WINDOW));
+ }
+ SetTextColor(hdc, pdis->itemData);
+ TextOut(hdc, rc.left, rc.top, text, strlen(text));
+ return TRUE;
+ }
+ break;
}
return FALSE;
}
struct newresource *nr;
if (hDbgWnd)
- return 0;
+ return 0;
reopen = 0;
dbgaccel = LoadAccelerators(hUIDLL ? hUIDLL : hInst, MAKEINTRESOURCE (IDR_DBGACCEL));
nr = getresource(IDD_DEBUGGER);
if (nr) {
- hDbgWnd = CreateDialogIndirect (nr->inst, nr->resource, NULL, DebuggerProc);
- freescaleresource(nr);
+ hDbgWnd = CreateDialogIndirect (nr->inst, nr->resource, NULL, DebuggerProc);
+ freescaleresource(nr);
}
if (!hDbgWnd)
- return 0;
+ return 0;
InitPages();
ShowPage(0, TRUE);
ShowWindow(hDbgWnd, SW_SHOWNORMAL);
char *fpsrflag[] = { "N: ", "Z: ", "I: ", "NAN: " };
if (!hDbgWnd)
- return;
+ return;
hwnd = GetDlgItem(hDbgWnd, IDC_DBG_DREG);
for (i = 0; i < 8; i++) {
- sprintf(out, "D%d: %08lX", i, m68k_dreg(®s, i));
- UpdateListboxString(hwnd, i, out, TRUE);
+ sprintf(out, "D%d: %08lX", i, m68k_dreg (®s, i));
+ UpdateListboxString(hwnd, i, out, TRUE);
}
hwnd = GetDlgItem(hDbgWnd, IDC_DBG_AREG);
for (i = 0; i < 8; i++) {
- hwnd = GetDlgItem(hDbgWnd, IDC_DBG_AREG);
- sprintf(out, "A%d: %08lX", i, m68k_areg(®s, i));
- UpdateListboxString(hwnd, i, out, TRUE);
- hwnd = GetDlgItem(hDbgWnd, IDC_DBG_AMEM);
- dumpmem2(m68k_areg(®s, i), out, sizeof(out));
- UpdateListboxString(hwnd, i, out + 9, TRUE);
+ hwnd = GetDlgItem(hDbgWnd, IDC_DBG_AREG);
+ sprintf(out, "A%d: %08lX", i, m68k_areg (®s, i));
+ UpdateListboxString(hwnd, i, out, TRUE);
+ hwnd = GetDlgItem(hDbgWnd, IDC_DBG_AMEM);
+ dumpmem2(m68k_areg (®s, i), out, sizeof(out));
+ UpdateListboxString(hwnd, i, out + 9, TRUE);
}
hwnd = GetDlgItem(hDbgWnd, IDC_DBG_CCR);
UpdateListboxString(hwnd, 4, out, TRUE);
hwnd = GetDlgItem(hDbgWnd, IDC_DBG_PC);
- sprintf(out, "PC: %08lX", m68k_getpc(®s));
+ sprintf(out, "PC: %08lX", m68k_getpc (®s));
UpdateListboxString(hwnd, 0, out, TRUE);
hwnd = GetDlgItem(hDbgWnd, IDC_DBG_PREFETCH);
hwnd = GetDlgItem(hDbgWnd, IDC_DBG_FPREG);
for (i = 0; i < 8; i++) {
- sprintf(out, "FP%d: %g", i, regs.fp[i]);
- UpdateListboxString(hwnd, i, out, TRUE);
+ sprintf(out, "FP%d: %g", i, regs.fp[i]);
+ UpdateListboxString(hwnd, i, out, TRUE);
}
hwnd = GetDlgItem(hDbgWnd, IDC_DBG_FPSR);
fpsr = get_fpsr();
for (i = 0; i < 4; i++) {
- sprintf(out, "%s%d", fpsrflag[i], (fpsr & (0x8000000 >> i)) != 0 ? 1 : 0);
- UpdateListboxString(hwnd, i, out, TRUE);
+ sprintf(out, "%s%d", fpsrflag[i], (fpsr & (0x8000000 >> i)) != 0 ? 1 : 0);
+ UpdateListboxString(hwnd, i, out, TRUE);
}
ShowPage(currpage, TRUE);
}
static int rdpmouse(char *buf)
{
if (!memcmp (RDP_MOUSE1, buf, strlen (RDP_MOUSE1)))
- return 1;
+ return 1;
if (!memcmp (RDP_MOUSE2, buf, strlen (RDP_MOUSE2)))
- return 1;
+ return 1;
return 0;
}
continue;
if (type == RIM_TYPEMOUSE) {
PRID_DEVICE_INFO_MOUSE rdim = &rdi->mouse;
- write_log ("id=%d buttons=%d hw=%d rate=%d\n",
+ write_log ("id=%d buttons=%d hw=%d rate=%d\n",
rdim->dwId, rdim->dwNumberOfButtons, rdim->fHasHorizontalWheel, rdim->dwSampleRate);
did->buttons = rdim->dwNumberOfButtons;
did->axles = 3;
if (raw->header.dwType == RIM_TYPEMOUSE) {
PRAWMOUSE rm = &raw->data.mouse;
-
+
for (num = 0; num < num_mouse; num++) {
did = &di_mouse[num];
if (!did->disabled && did->rawinput == raw->header.hDevice)
#ifdef DI_DEBUG2
write_log ("HANDLE=%08.8x %04.4x %04.4x %04.4x %08.8x %3d %3d %08.8x M=%d\n",
raw->header.hDevice,
- rm->usFlags,
- rm->usButtonFlags,
- rm->usButtonData,
- rm->ulRawButtons,
- rm->lLastX,
- rm->lLastY,
+ rm->usFlags,
+ rm->usButtonFlags,
+ rm->usButtonData,
+ rm->ulRawButtons,
+ rm->lLastX,
+ rm->lLastY,
rm->ulExtraInformation, num < num_mouse ? num + 1 : -1);
#endif
if (num == num_mouse) {
{
if (did->buttons > 0)
return;
- write_log("'%s' has no buttons, adding single default button\n", did->name);
+ write_log ("'%s' has no buttons, adding single default button\n", did->name);
did->buttonmappings[0] = DIJOFS_BUTTON(0);
did->buttonsort[0] = 0;
did->buttonname[0] = my_strdup("Button");
static int di_do_init (void)
{
- HRESULT hr;
+ HRESULT hr;
num_mouse = num_joystick = num_keyboard = 0;
memset (&di_mouse, 0, sizeof (di_mouse));
memset (&di_joystick, 0, sizeof (di_joystick));
memset (&di_keyboard, 0, sizeof (di_keyboard));
- hr = DirectInput8Create (hInst, DIRECTINPUT_VERSION, &IID_IDirectInput8A, (LPVOID *)&g_lpdi, NULL);
+ hr = DirectInput8Create (hInst, DIRECTINPUT_VERSION, &IID_IDirectInput8A, (LPVOID *)&g_lpdi, NULL);
if (FAILED(hr)) {
write_log ("DirectInput8Create failed, %s\n", DXError (hr));
gui_message ("Failed to initialize DirectInput!");
return 0;
}
if (dinput_enum_all) {
- write_log("DirectInput enumeration..\n");
+ write_log ("DirectInput enumeration..\n");
IDirectInput8_EnumDevices (g_lpdi, DI8DEVCLASS_ALL, di_enumcallback, 0, DIEDFL_ATTACHEDONLY);
} else {
- write_log("DirectInput enumeration.. Keyboards..\n");
+ write_log ("DirectInput enumeration.. Keyboards..\n");
IDirectInput8_EnumDevices (g_lpdi, DI8DEVCLASS_KEYBOARD, di_enumcallback, 0, DIEDFL_ATTACHEDONLY);
- write_log("DirectInput enumeration.. Pointing devices..\n");
+ write_log ("DirectInput enumeration.. Pointing devices..\n");
IDirectInput8_EnumDevices (g_lpdi, DI8DEVCLASS_POINTER, di_enumcallback, 0, DIEDFL_ATTACHEDONLY);
- write_log("DirectInput enumeration.. Game controllers..\n");
+ write_log ("DirectInput enumeration.. Game controllers..\n");
IDirectInput8_EnumDevices (g_lpdi, DI8DEVCLASS_GAMECTRL, di_enumcallback, 0, DIEDFL_ATTACHEDONLY);
}
- write_log("RawInput enumeration..\n");
+ write_log ("RawInput enumeration..\n");
initialize_rawinput();
- write_log("Windowsmouse initialization..\n");
+ write_log ("Windowsmouse initialization..\n");
initialize_windowsmouse();
- write_log("Catweasel joymouse initialization..\n");
+ write_log ("Catweasel joymouse initialization..\n");
initialize_catweasel();
- write_log("end\n");
+ write_log ("end\n");
sortdd (di_joystick, num_joystick, DID_JOYSTICK);
sortdd (di_mouse, num_mouse, DID_MOUSE);
{
int i;
LPDIRECTINPUTDEVICE8 lpdi;
- HRESULT hr;
+ HRESULT hr;
struct didata *did;
if (mouse_inited)
if (!did->disabled && did->connection == DIDC_DX) {
hr = IDirectInput8_CreateDevice (g_lpdi, &did->guid, &lpdi, NULL);
if (hr == DI_OK) {
- hr = IDirectInputDevice8_SetDataFormat(lpdi, &c_dfDIMouse);
+ hr = IDirectInputDevice8_SetDataFormat(lpdi, &c_dfDIMouse);
IDirectInputDevice8_EnumObjects (lpdi, EnumObjectsCallback, (void*)did, DIDFT_ALL);
fixbuttons (did);
sortobjects (did, did->axismappings, did->axissort, did->axisname, did->axistype, did->axles);
if (!did->disabled && did->connection == DIDC_DX) {
hr = IDirectInput8_CreateDevice (g_lpdi, &did->guid, &lpdi, NULL);
if (hr == DI_OK) {
- hr = IDirectInputDevice8_SetDataFormat(lpdi, &c_dfDIKeyboard);
+ hr = IDirectInputDevice8_SetDataFormat(lpdi, &c_dfDIKeyboard);
if (hr != DI_OK)
write_log ("keyboard setdataformat failed, %s\n", DXError (hr));
memset (&dipdw, 0, sizeof (dipdw));
static int keyhack (int scancode,int pressed, int num)
{
static byte backslashstate,apostrophstate;
-
- //check ALT-F4
+
+ //check ALT-F4
if (pressed && !di_keycodes[num][DIK_F4] && scancode == DIK_F4 && di_keycodes[num][DIK_LALT] && !currprefs.win32_ctrl_F11_is_quit) {
uae_quit ();
return -1;
}
#endif
- // release mouse if TAB and ALT is pressed
+ // release mouse if TAB and ALT is pressed
if (pressed && di_keycodes[num][DIK_LALT] && scancode == DIK_TAB) {
disablecapture ();
return -1;
if (!keyboard_german || currprefs.input_selected_setting > 0)
return scancode;
-
+
//This code look so ugly because there is no Directinput
//key for # (called numbersign on win standard message)
//available
if (scancode == DIK_BACKSLASH) // The # key
{
if (di_keycodes[num][DIK_LSHIFT] || di_keycodes[num][DIK_RSHIFT] || apostrophstate)
- {
+ {
if (pressed)
{ apostrophstate=1;
inputdevice_translatekeycode (num, DIK_RSHIFT, 0);
inputdevice_translatekeycode (num, DIK_LSHIFT, 0);
// Here is the same not nice but do the job
return 4; // the german # key
-
- }
+
+ }
}
if ((di_keycodes[num][DIK_RALT]) || (backslashstate)) {
switch (scancode)
{
case 12:
if (pressed)
- {
+ {
backslashstate=1;
inputdevice_translatekeycode (num, DIK_RALT, 0);
return DIK_BACKSLASH;
currprefs.kbledmode = 1;
#endif
oldleds = get_leds ();
- if (oldusedleds < 0)
+ if (oldusedleds < 0)
oldusedleds = newleds = oldleds;
set_leds (oldusedleds);
}
int data2 = data;
int state = (data & 0x80) ? 1 : 0;
data -= 32768;
-
+
for (k = 0; k < did->buttons; k++) {
if (did->buttonmappings[k] == dimofs) {
#ifdef DI_DEBUG2
int input_get_default_mouse (struct uae_input_device *uid, int i, int port)
{
if (di_mouse[i].wininput)
- port = 0;
+ port = 0;
uid[i].eventid[ID_AXIS_OFFSET + 0][0] = port ? INPUTEVENT_MOUSE2_HORIZ : INPUTEVENT_MOUSE1_HORIZ;
uid[i].eventid[ID_AXIS_OFFSET + 1][0] = port ? INPUTEVENT_MOUSE2_VERT : INPUTEVENT_MOUSE1_VERT;
uid[i].eventid[ID_AXIS_OFFSET + 2][0] = port ? 0 : INPUTEVENT_MOUSE1_WHEEL;
uid[i].eventid[ID_BUTTON_OFFSET + 1][0] = port ? INPUTEVENT_JOY2_2ND_BUTTON : INPUTEVENT_JOY1_2ND_BUTTON;
uid[i].eventid[ID_BUTTON_OFFSET + 2][0] = port ? INPUTEVENT_JOY2_3RD_BUTTON : INPUTEVENT_JOY1_3RD_BUTTON;
if (port == 0) { /* map back and forward to ALT+LCUR and ALT+RCUR */
- uid[i].eventid[ID_BUTTON_OFFSET + 3][0] = INPUTEVENT_KEY_ALT_LEFT;
- uid[i].eventid[ID_BUTTON_OFFSET + 3][1] = INPUTEVENT_KEY_CURSOR_LEFT;
- uid[i].eventid[ID_BUTTON_OFFSET + 4][0] = INPUTEVENT_KEY_ALT_LEFT;
- uid[i].eventid[ID_BUTTON_OFFSET + 4][1] = INPUTEVENT_KEY_CURSOR_RIGHT;
+ uid[i].eventid[ID_BUTTON_OFFSET + 3][0] = INPUTEVENT_KEY_ALT_LEFT;
+ uid[i].eventid[ID_BUTTON_OFFSET + 3][1] = INPUTEVENT_KEY_CURSOR_LEFT;
+ uid[i].eventid[ID_BUTTON_OFFSET + 4][0] = INPUTEVENT_KEY_ALT_LEFT;
+ uid[i].eventid[ID_BUTTON_OFFSET + 4][1] = INPUTEVENT_KEY_CURSOR_RIGHT;
}
if (i == 0)
return 1;
uid[i].eventid[ID_BUTTON_OFFSET + 1][0] = port ? INPUTEVENT_JOY2_2ND_BUTTON : INPUTEVENT_JOY1_2ND_BUTTON;
uid[i].eventid[ID_BUTTON_OFFSET + 2][0] = port ? INPUTEVENT_JOY2_3RD_BUTTON : INPUTEVENT_JOY1_3RD_BUTTON;
for (j = 2; j < MAX_MAPPINGS - 1; j++) {
- int am = did->axismappings[j];
+ int am = did->axismappings[j];
if (am == DIJOFS_POV(0) || am == DIJOFS_POV(1) || am == DIJOFS_POV(2) || am == DIJOFS_POV(3)) {
uid[i].eventid[ID_AXIS_OFFSET + j + 0][0] = port ? INPUTEVENT_JOY2_HORIZ : INPUTEVENT_JOY1_HORIZ;
uid[i].eventid[ID_AXIS_OFFSET + j + 1][0] = port ? INPUTEVENT_JOY2_VERT : INPUTEVENT_JOY1_VERT;
}
}
if (currprefs.cs_cd32cd) {
- uid[i].eventid[ID_BUTTON_OFFSET + 0][0] = port ? INPUTEVENT_JOY2_CD32_RED : INPUTEVENT_JOY1_CD32_RED;
- uid[i].eventid[ID_BUTTON_OFFSET + 1][0] = port ? INPUTEVENT_JOY2_CD32_BLUE : INPUTEVENT_JOY1_CD32_BLUE;
- uid[i].eventid[ID_BUTTON_OFFSET + 2][0] = port ? INPUTEVENT_JOY2_CD32_YELLOW : INPUTEVENT_JOY1_CD32_YELLOW;
- uid[i].eventid[ID_BUTTON_OFFSET + 3][0] = port ? INPUTEVENT_JOY2_CD32_GREEN : INPUTEVENT_JOY1_CD32_GREEN;
- uid[i].eventid[ID_BUTTON_OFFSET + 4][0] = port ? INPUTEVENT_JOY2_CD32_FFW : INPUTEVENT_JOY1_CD32_FFW;
- uid[i].eventid[ID_BUTTON_OFFSET + 5][0] = port ? INPUTEVENT_JOY2_CD32_RWD : INPUTEVENT_JOY1_CD32_RWD;
- uid[i].eventid[ID_BUTTON_OFFSET + 6][0] = port ? INPUTEVENT_JOY2_CD32_PLAY : INPUTEVENT_JOY1_CD32_PLAY;
+ uid[i].eventid[ID_BUTTON_OFFSET + 0][0] = port ? INPUTEVENT_JOY2_CD32_RED : INPUTEVENT_JOY1_CD32_RED;
+ uid[i].eventid[ID_BUTTON_OFFSET + 1][0] = port ? INPUTEVENT_JOY2_CD32_BLUE : INPUTEVENT_JOY1_CD32_BLUE;
+ uid[i].eventid[ID_BUTTON_OFFSET + 2][0] = port ? INPUTEVENT_JOY2_CD32_YELLOW : INPUTEVENT_JOY1_CD32_YELLOW;
+ uid[i].eventid[ID_BUTTON_OFFSET + 3][0] = port ? INPUTEVENT_JOY2_CD32_GREEN : INPUTEVENT_JOY1_CD32_GREEN;
+ uid[i].eventid[ID_BUTTON_OFFSET + 4][0] = port ? INPUTEVENT_JOY2_CD32_FFW : INPUTEVENT_JOY1_CD32_FFW;
+ uid[i].eventid[ID_BUTTON_OFFSET + 5][0] = port ? INPUTEVENT_JOY2_CD32_RWD : INPUTEVENT_JOY1_CD32_RWD;
+ uid[i].eventid[ID_BUTTON_OFFSET + 6][0] = port ? INPUTEVENT_JOY2_CD32_PLAY : INPUTEVENT_JOY1_CD32_PLAY;
}
if (i == 0)
return 1;
sine = sin(fovy);
dz = zf - zn;
if (sine == 0 || dz == 0 || Aspect == 0)
- return pOut;
+ return pOut;
yscale = cos(fovy) / sine;
xscale = yscale / Aspect;
pOut->_11 = xscale;
hr = IDirect3DSurface9_GetDesc (bb, &dsdbb);
hr = IDirect3DSurface9_Release (bb);
- // Set up the texture
+ // Set up the texture
hr = IDirect3DDevice9_SetTextureStageState(d3ddev, 0, D3DTSS_COLOROP, D3DTOP_MODULATE);
hr = IDirect3DDevice9_SetTextureStageState(d3ddev, 0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
hr = IDirect3DDevice9_SetTextureStageState(d3ddev, 0, D3DTSS_COLORARG2, D3DTA_DIFFUSE);
else
vsync2 = 1;
}
- }
+ }
}
ret = IDirect3D9_CreateDevice(d3d, adapter, D3DDEVTYPE_HAL, ahwnd,
max_texture_w = d3dCaps.MaxTextureWidth;
max_texture_h = d3dCaps.MaxTextureHeight;
- write_log("D3D: max texture width: %d, max texture height: %d\n",
+ write_log ("D3D: max texture width: %d, max texture height: %d\n",
max_texture_w, max_texture_h);
if (max_texture_w < t_w || max_texture_h < t_h) {
UBYTE b;
int size;
int shift;
-
+
size=len-(sync-start);
memcpy(dst,sync,size);
dst+=size;
start++;
}
return tmpmfmbuffer;
-}
-
+}
+
#define SCANOFFSET 1 /* scanning range in bytes, -SCANOFFSET to SCANOFFSET */
#define SCANOFFSET2 20
#define SCANLENGHT 200 /* scanning length in bytes */
{
int i,bits,bytes,matched;
UBYTE *sync2bak=sync2;
-
+
sync1+=SCANOFFSET2;
sync2+=SCANOFFSET2;
while(sync1 < sync2bak - 2*SCANOFFSET - SCANOFFSET2 - SCANLENGHT) {
sync2++;
}
return 0;
-}
+}
#endif
#define MFMMASK 0x55555555
write_log ("Restore succeeded but following Blt failed with lost surface. Display driver bug?\n");
return hr;
}
- write_log("Surface clear failed: %s\n", DXError (hr2));
+ write_log ("Surface clear failed: %s\n", DXError (hr2));
}
surfacedesc.dwSize = sizeof surfacedesc;
hr2 = IDirectDrawSurface7_Lock(surface, NULL, &surfacedesc, DDLOCK_SURFACEMEMORYPTR | DDLOCK_WAIT, NULL);
if (SUCCEEDED(hr2)) {
- write_log("Surface Pointer: %p\n", surfacedesc.lpSurface);
+ write_log ("Surface Pointer: %p\n", surfacedesc.lpSurface);
IDirectDrawSurface7_Unlock(surface, NULL);
}
}
if( shown < 2)
{
- dxwrite_log( "DirectDraw Capabilities for %s:\n", hw ? "Display Driver Hardware" : "Display Driver Emulation Layer" );
+ dxwrite_log ( "DirectDraw Capabilities for %s:\n", hw ? "Display Driver Hardware" : "Display Driver Emulation Layer" );
if( caps.dwCaps & DDCAPS_BLT )
- dxwrite_log( "DDCAPS_BLT - Capable of blitting\n" );
+ dxwrite_log ( "DDCAPS_BLT - Capable of blitting\n" );
if( caps.dwCaps & DDCAPS_BLTCOLORFILL )
- dxwrite_log( "DDCAPS_BLTCOLORFILL - Color filling with blitter\n" );
+ dxwrite_log ( "DDCAPS_BLTCOLORFILL - Color filling with blitter\n" );
if( caps.dwCaps & DDCAPS_BLTSTRETCH )
- dxwrite_log( "DDCAPS_BLTSTRETCH - Stretch blitting\n" );
+ dxwrite_log ( "DDCAPS_BLTSTRETCH - Stretch blitting\n" );
if( caps.dwCaps & DDCAPS_CANBLTSYSMEM )
- dxwrite_log( "DDCAPS_CANBLTSYSMEM - Blits from system memory\n" );
+ dxwrite_log ( "DDCAPS_CANBLTSYSMEM - Blits from system memory\n" );
if( caps.dwCaps & DDCAPS_CANCLIP )
- dxwrite_log( "DDCAPS_CANCLIP - Can clip while blitting\n" );
+ dxwrite_log ( "DDCAPS_CANCLIP - Can clip while blitting\n" );
if( caps.dwCaps & DDCAPS_CANCLIPSTRETCHED )
- dxwrite_log( "DDCAPS_CANCLIPSTRETCHED - Can clip while stretch-blitting\n" );
+ dxwrite_log ( "DDCAPS_CANCLIPSTRETCHED - Can clip while stretch-blitting\n" );
if( caps.dwCaps & DDCAPS_COLORKEY )
{
- dxwrite_log( "DDCAPS_COLORKEY - Can color-key with blits/overlays\n" );
+ dxwrite_log ( "DDCAPS_COLORKEY - Can color-key with blits/overlays\n" );
bColourKeyAvailable = TRUE;
}
if( caps.dwCaps & DDCAPS_GDI )
- dxwrite_log( "DDCAPS_GDI - Display h/w shared with GDI\n" );
+ dxwrite_log ( "DDCAPS_GDI - Display h/w shared with GDI\n" );
if( caps.dwCaps & DDCAPS_NOHARDWARE )
- dxwrite_log( "DDCAPS_NOHARDWARE - no h/w support!\n" );
+ dxwrite_log ( "DDCAPS_NOHARDWARE - no h/w support!\n" );
if( caps.dwCaps & DDCAPS_OVERLAY )
{
- dxwrite_log( "DDCAPS_OVERLAY - support for %d overlay(s)\n", caps.dwMaxVisibleOverlays );
+ dxwrite_log ( "DDCAPS_OVERLAY - support for %d overlay(s)\n", caps.dwMaxVisibleOverlays );
if( bColourKeyAvailable )
{
if( caps.dwCKeyCaps & DDCKEYCAPS_DESTOVERLAY )
{
- dxwrite_log( "DDCKEYCAPS_DESTOVERLAY - colour-keyed overlays\n" );
+ dxwrite_log ( "DDCKEYCAPS_DESTOVERLAY - colour-keyed overlays\n" );
bOverlayAvailable = TRUE;
}
}
}
if( caps.dwCaps & DDCAPS_OVERLAYFOURCC )
- dxwrite_log( "DDCAPS_OVERLAYFOURCC - overlay can do color-space conversions\n" );
+ dxwrite_log ( "DDCAPS_OVERLAYFOURCC - overlay can do color-space conversions\n" );
if( caps.dwCaps & DDCAPS_OVERLAYSTRETCH )
- dxwrite_log( "DDCAPS_OVERLAYSTRETCH - overlay can stretch with min=%d/max=%d\n", caps.dwMinOverlayStretch, caps.dwMaxOverlayStretch );
+ dxwrite_log ( "DDCAPS_OVERLAYSTRETCH - overlay can stretch with min=%d/max=%d\n", caps.dwMinOverlayStretch, caps.dwMaxOverlayStretch );
if( caps.dwCaps & DDCAPS_VBI )
- dxwrite_log( "DDCAPS_VBI - h/w can generate a vertical-blanking interrupt\n" );
+ dxwrite_log ( "DDCAPS_VBI - h/w can generate a vertical-blanking interrupt\n" );
if( caps.dwCaps2 & DDCAPS2_CERTIFIED )
- dxwrite_log( "DDCAPS2_CERTIFIED - certified driver\n" );
+ dxwrite_log ( "DDCAPS2_CERTIFIED - certified driver\n" );
if( caps.dwCaps2 & DDCAPS2_CANRENDERWINDOWED )
- dxwrite_log( "DDCAPS2_CANRENDERWINDOWED - GDI windows can be seen when in full-screen\n" );
+ dxwrite_log ( "DDCAPS2_CANRENDERWINDOWED - GDI windows can be seen when in full-screen\n" );
if( caps.dwCaps2 & DDCAPS2_NOPAGELOCKREQUIRED )
- dxwrite_log( "DDCAPS2_NOPAGELOCKREQUIRED - no page locking needed for DMA blits\n" );
+ dxwrite_log ( "DDCAPS2_NOPAGELOCKREQUIRED - no page locking needed for DMA blits\n" );
if( caps.dwCaps2 & DDCAPS2_FLIPNOVSYNC )
- dxwrite_log( "DDCAPS2_FLIPNOVSYNC - can pass DDFLIP_NOVSYNC to Flip calls\n" );
+ dxwrite_log ( "DDCAPS2_FLIPNOVSYNC - can pass DDFLIP_NOVSYNC to Flip calls\n" );
if( caps.dwCaps2 & DDCAPS2_FLIPINTERVAL ) {
- dxwrite_log( "DDCAPS2_FLIPINTERVAL - can pass DDFLIP_INTERVALx to Flip calls\n" );
+ dxwrite_log ( "DDCAPS2_FLIPINTERVAL - can pass DDFLIP_INTERVALx to Flip calls\n" );
flipinterval_supported = 1;
}
-
- dxwrite_log( "Video memory: %d/%d\n", caps.dwVidMemFree, caps.dwVidMemTotal );
+
+ dxwrite_log ( "Video memory: %d/%d\n", caps.dwVidMemFree, caps.dwVidMemTotal );
}
shown++;
}
if (FAILED(ddrval))
break;
}
- else if (ddrval != DDERR_SURFACEBUSY)
+ else if (ddrval != DDERR_SURFACEBUSY)
{
write_log ("lpDDS->Lock() failed - %s\n", DXError (ddrval));
break;
static int warned = 10;
DWORD_PTR pixels = (DWORD_PTR)(surfacedesc->lpSurface);
if (warned > 0 && (pixels & 7)) {
- write_log("bogus surface pointer %x!\n", pixels);
+ write_log ("bogus surface pointer %x!\n", pixels);
warned--;
}
lockcnt++;
if(DirectDrawState.isoverlay && DirectDraw_SurfaceLock(overlay_surface))
{
result = overlay_surface;
- write_log("try_surface_locks() returning overlay\n");
+ write_log ("try_surface_locks() returning overlay\n");
}
else if(want_fullscreen && WIN32GFX_IsPicassoScreen())
{
if(DirectDraw_SurfaceLock(primary_surface))
{
result = primary_surface;
- write_log("try_surface_locks() returning primary\n");
+ write_log ("try_surface_locks() returning primary\n");
}
else if(DirectDraw_SurfaceLock(secondary_surface))
{
result = secondary_surface;
- write_log("try_surface_locks() returning secondary\n");
+ write_log ("try_surface_locks() returning secondary\n");
}
}
else
if(DirectDraw_SurfaceLock(secondary_surface))
{
result = secondary_surface;
- write_log("try_surface_locks() returning secondary\n");
+ write_log ("try_surface_locks() returning secondary\n");
}
}
memset(&pdds,0,sizeof(pdds));
pdds.dwSize = sizeof(pdds);
-
+
IDirectDrawSurface7_GetSurfaceDesc(DirectDrawState.primary.surface, &pdds);
// Use GDI SetPixel to color match for us
ddsd.dwSize = sizeof(ddsd);
hr = IDirectDrawSurface7_Lock(DirectDrawState.primary.surface, NULL, &ddsd, DDLOCK_WAIT, NULL );
if(SUCCEEDED(hr)) {
- dw = *(DWORD *) ddsd.lpSurface;
+ dw = *(DWORD *) ddsd.lpSurface;
if(ddsd.ddpfPixelFormat.dwRGBBitCount < 32) // Mask it to bpp
dw &= (1 << ddsd.ddpfPixelFormat.dwRGBBitCount) - 1;
IDirectDrawSurface7_Unlock(DirectDrawState.primary.surface,NULL);
IDirectDrawSurface7_ReleaseDC(DirectDrawState.primary.surface,hdc);
}
- return dw;
+ return dw;
}
ZeroMemory(&ddsd, sizeof(ddsd));
if (bOverlayAvailable) {
- write_log( "CreateOverlaySurface being called with %d-bits!\n", bits );
+ write_log ( "CreateOverlaySurface being called with %d-bits!\n", bits );
if(bits == 16) {
// Set the overlay format to 16 bit RGB 5:6:5
ddpfOverlayFormat.dwFlags = flags;
ddpfOverlayFormat.dwRGBBitCount = 16;
- ddpfOverlayFormat.dwRBitMask = 0xF800;
+ ddpfOverlayFormat.dwRBitMask = 0xF800;
ddpfOverlayFormat.dwGBitMask = 0x07E0;
- ddpfOverlayFormat.dwBBitMask = 0x001F;
+ ddpfOverlayFormat.dwBBitMask = 0x001F;
} else if(bits == 32) {
// Set the overlay format to 32 bit ARGB 8:8:8:8
ddpfOverlayFormat.dwFlags = flags;
ddpfOverlayFormat.dwRGBBitCount = 32;
- ddpfOverlayFormat.dwRBitMask = 0x00FF0000;
+ ddpfOverlayFormat.dwRBitMask = 0x00FF0000;
ddpfOverlayFormat.dwGBitMask = 0x0000FF00;
- ddpfOverlayFormat.dwBBitMask = 0x000000FF;
+ ddpfOverlayFormat.dwBBitMask = 0x000000FF;
} else if(bits == 8) {
// Set the overlay format to 8 bit palette
ddpfOverlayFormat.dwFlags = flags | DDPF_PALETTEINDEXED8;
ddpfOverlayFormat.dwRGBBitCount = 8;
- ddpfOverlayFormat.dwRBitMask = 0x00000000;
+ ddpfOverlayFormat.dwRBitMask = 0x00000000;
ddpfOverlayFormat.dwGBitMask = 0x00000000;
- ddpfOverlayFormat.dwBBitMask = 0x00000000;
+ ddpfOverlayFormat.dwBBitMask = 0x00000000;
} else {
// We don't handle this case...
return DDERR_INVALIDPIXELFORMAT;
}
-
+
// Setup the overlay surface's attributes in the surface descriptor
ddsd.dwSize = sizeof(ddsd);
ddsd.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT;
DirectDrawState.isoverlay = 0;
}
} else {
- write_log( "CreateOverlaySurface being called, but no overlay support with this card...!\n" );
+ write_log ( "CreateOverlaySurface being called, but no overlay support with this card...!\n" );
}
return ddrval;
}
DirectDrawState.primary.desc.dwFlags = DDSD_CAPS | DDSD_BACKBUFFERCOUNT;
DirectDrawState.primary.desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP;
DirectDrawState.primary.desc.dwBackBufferCount = 2;
- ddrval = IDirectDraw7_CreateSurface(DirectDrawState.directdraw.dd,
+ ddrval = IDirectDraw7_CreateSurface(DirectDrawState.directdraw.dd,
&DirectDrawState.primary.desc, &DirectDrawState.primary.surface, NULL);
if (FAILED(ddrval)) {
// Create a non-flipping pair, since the flipping pair creation failed...
DirectDrawState.primary.desc.dwSize = sizeof(DDSURFACEDESC2);
DirectDrawState.primary.desc.dwFlags = DDSD_CAPS;
DirectDrawState.primary.desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
- ddrval = IDirectDraw7_CreateSurface(DirectDrawState.directdraw.dd,
+ ddrval = IDirectDraw7_CreateSurface(DirectDrawState.directdraw.dd,
&DirectDrawState.primary.desc,
&DirectDrawState.primary.surface,
NULL);
DirectDrawState.primary.desc.dwSize = sizeof(DDSURFACEDESC2);
DirectDrawState.primary.desc.dwFlags = DDSD_CAPS;
DirectDrawState.primary.desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
- ddrval = IDirectDraw7_CreateSurface(DirectDrawState.directdraw.dd,
+ ddrval = IDirectDraw7_CreateSurface(DirectDrawState.directdraw.dd,
&DirectDrawState.primary.desc, &DirectDrawState.primary.surface, NULL);
}
if(FAILED(ddrval))
goto errout;
else
- write_log( "DDRAW: Primary %ssurface created in video-memory\n",
+ write_log ( "DDRAW: Primary %ssurface created in video-memory\n",
DirectDrawState.flipping != single_buffer ? "flipping " : "");
// Check if we can access the back-buffer of our flipping-pair (if present)
DirectDrawState.secondary.desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | xtraflag;
DirectDrawState.secondary.desc.dwWidth = width;
DirectDrawState.secondary.desc.dwHeight = height;
- ddrval = IDirectDraw7_CreateSurface(DirectDrawState.directdraw.dd,
+ ddrval = IDirectDraw7_CreateSurface(DirectDrawState.directdraw.dd,
&DirectDrawState.secondary.desc, &DirectDrawState.secondary.surface, NULL);
if(FAILED(ddrval)) {
- write_log( "DDRAW:Secondary surface creation attempt #1 failed with %s\n", DXError(ddrval));
+ write_log ( "DDRAW:Secondary surface creation attempt #1 failed with %s\n", DXError(ddrval));
DirectDrawState.secondary.desc.ddsCaps.dwCaps &= ~DDSCAPS_VIDEOMEMORY;
DirectDrawState.secondary.desc.ddsCaps.dwCaps |= DDSCAPS_SYSTEMMEMORY;
- ddrval = IDirectDraw7_CreateSurface(DirectDrawState.directdraw.dd,
+ ddrval = IDirectDraw7_CreateSurface(DirectDrawState.directdraw.dd,
&DirectDrawState.secondary.desc, &DirectDrawState.secondary.surface, NULL);
if(SUCCEEDED(ddrval))
- write_log("DDRAW: Secondary surface created in plain system-memory\n");
+ write_log ("DDRAW: Secondary surface created in plain system-memory\n");
else
goto errout;
} else {
- write_log("DDRAW: Secondary surface created in video-memory\n");
+ write_log ("DDRAW: Secondary surface created in video-memory\n");
}
}
DirectDraw_ClearSurfaces ();
DirectDrawState.lockable.lpdesc = NULL;
DirectDrawState.lockable.surface = NULL;
DirectDrawState.lockable.surface = NULL;
- write_log("set_ddraw: Couldn't lock primary, and no secondary available.\n");
+ write_log ("set_ddraw: Couldn't lock primary, and no secondary available.\n");
break;
case primary_surface:
DirectDrawState.lockable.lpdesc = &DirectDrawState.primary.desc;
ddrval = IDirectDraw_CreatePalette(DirectDrawState.directdraw.dd,
DDPCAPS_8BIT | DDPCAPS_ALLOW256, pal, &DirectDrawState.lpDDP, NULL);
if(SUCCEEDED(ddrval))
- ddrval = DirectDraw_SetPalette(0);
+ ddrval = DirectDraw_SetPalette(0);
return ddrval;
}
if (r == 0x0000FF00 && g == 0x00FF0000 && b == 0xFF000000)
return RGBFB_A8R8G8B8;
break;
-
+
default:
write_log ("Unknown %d bit format %d %d %d\n", pfp->dwRGBBitCount, r, g, b);
break;
if (FAILED(ddrval))
break;
} else if (ddrval != DDERR_SURFACEBUSY) {
- write_log("BltFastStub7(): DirectDrawSURFACE7_BltFast() failed with %s\n", DXError (ddrval));
+ write_log ("BltFastStub7(): DirectDrawSURFACE7_BltFast() failed with %s\n", DXError (ddrval));
break;
}
}
break;
}
} else if (ddrval != DDERR_SURFACEBUSY) {
- write_log("BltStub(): DirectDrawSURFACE7_Blt() failed with %s\n", DXError (ddrval));
+ write_log ("BltStub(): DirectDrawSURFACE7_Blt() failed with %s\n", DXError (ddrval));
break;
}
}
DWORD flags = DDFLIP_WAIT;
static int skip;
frame_time_t start;
-
+
start = read_processor_time ();
if (DirectDrawState.flipping == triple_buffer) {
if (!currprefs.gfx_afullscreen && !currprefs.gfx_avsync) {
recurse--;
}
} else {
- write_log("FLIP: DirectDrawSurface_Flip() failed with %s\n", DXError (ddrval));
+ write_log ("FLIP: DirectDrawSurface_Flip() failed with %s\n", DXError (ddrval));
}
}
return result;
DWORD flags, LPDDBLTFX fx)
{
LPDIRECTDRAWSURFACE7 lpDDS4_dst, lpDDS4_src;
-
+
if(dsttype == primary_surface) {
if(DirectDrawState.isoverlay)
lpDDS4_dst = DirectDrawState.overlay.surface;
if ((drivercaps.dwCaps & DDCAPS_ALIGNSIZESRC) && drivercaps.dwAlignSizeSrc)
sr.right = sr.left + (sr.right - sr.left + drivercaps.dwAlignSizeSrc / 2) & ~(drivercaps.dwAlignSizeSrc - 1);
if ((drivercaps.dwCaps & DDCAPS_ALIGNBOUNDARYDEST) && drivercaps.dwAlignBoundaryDest)
- dr.left = (dr.left + drivercaps.dwAlignBoundaryDest / 2) & ~(drivercaps.dwAlignBoundaryDest - 1);
+ dr.left = (dr.left + drivercaps.dwAlignBoundaryDest / 2) & ~(drivercaps.dwAlignBoundaryDest - 1);
if ((drivercaps.dwCaps & DDCAPS_ALIGNSIZEDEST) && drivercaps.dwAlignSizeDest)
dr.right = dr.left + (dr.right - dr.left) & ~(drivercaps.dwAlignSizeDest - 1);
result = IDirectDrawSurface7_UpdateOverlay(DirectDrawState.overlay.surface, &sr, DirectDrawState.primary.surface, &dr, overlayflags, &overlayfx);
-
+
}
if (FAILED(result)) {
if (result == DDERR_SURFACELOST)
{
surface_type_e surface_type;
HRESULT ddrval;
-
+
surface_type = DirectDraw_GetLockableType ();
ddpf->dwSize = sizeof (DDPIXELFORMAT);
if (surface_type == overlay_surface)
HWND window;
struct
{
- LPDIRECTDRAW ddx;
- LPDIRECTDRAW7 dd;
+ LPDIRECTDRAW ddx;
+ LPDIRECTDRAW7 dd;
} directdraw;
struct
{
- LPDIRECTDRAWSURFACE7 surface;
- DDSURFACEDESC2 desc;
+ LPDIRECTDRAWSURFACE7 surface;
+ DDSURFACEDESC2 desc;
} primary;
struct
{
- LPDIRECTDRAWSURFACE7 surface;
- DDSURFACEDESC2 desc;
+ LPDIRECTDRAWSURFACE7 surface;
+ DDSURFACEDESC2 desc;
} secondary;
struct
{
- LPDIRECTDRAWSURFACE7 surface;
- DDSURFACEDESC2 desc;
+ LPDIRECTDRAWSURFACE7 surface;
+ DDSURFACEDESC2 desc;
} tertiary;
struct
{
- LPDIRECTDRAWSURFACE7 surface;
- DDSURFACEDESC2 desc;
+ LPDIRECTDRAWSURFACE7 surface;
+ DDSURFACEDESC2 desc;
} overlay;
struct
{
- LPDIRECTDRAWSURFACE7 surface;
- DDSURFACEDESC2 desc;
+ LPDIRECTDRAWSURFACE7 surface;
+ DDSURFACEDESC2 desc;
} temporary;
struct
{
- DDSURFACEDESC2 desc;
+ DDSURFACEDESC2 desc;
} current;
struct
{
- LPDIRECTDRAWSURFACE7 surface;
- LPDDSURFACEDESC2 lpdesc;
+ LPDIRECTDRAWSURFACE7 surface;
+ LPDDSURFACEDESC2 lpdesc;
} lockable;
LPDIRECTDRAWCLIPPER lpDDC;
LPDIRECTDRAWPALETTE lpDDP;
h = CreateFile("\\\\.\\fdraw0", GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
if (h == INVALID_HANDLE_VALUE)
return 0;
- b = 0; // 500Kbps
+ b = 0; // 500Kbps
if (!DeviceIoControl(h, IOCTL_FD_SET_DATA_RATE, &b, sizeof b, NULL, 0, &ret, NULL)) {
printf("IOCTL_FD_SET_DATA_RATE=%d failed err=%d\n", b, GetLastError());
closedevice();
if (!seek(cyl, head))
return 0;
- rrp.flags = FD_OPTION_MFM;
+ rrp.flags = FD_OPTION_MFM;
rrp.head = head;
rrp.size = 7;
memset (trackbuffer, 0, TRACK_SIZE);
--- /dev/null
+ SECTION code,code
+; This file can be translated with A68k or PhxAss and then linked with BLink
+; to produce an Amiga executable. Make sure it does not contain any
+; relocations, then run it through the filesys.sh script
+;
+; Patrick: It also works with SAS/C asm+slink, but I had to remove
+; the .l from jsr.l and jmp.l.
+; Toni Wilen: modified SECTION, compiles now with AsmOne and clones(?)
+; Removed absolute RT_AREA references
+; 2002.08.06 RDB automount/autoboot support (Toni Wilen)
+; 2002.09.11 KS1.3 RDB support (TW)
+; 200?.??.?? Picasso96 vblank hack (TW)
+; 2006.03.04 Mousehack code integrated (TW)
+; 2006.18.07 FileSystem.resource find routine access fault fixed (TW)
+; 2007.03.30 mousehack do not start multiple times anymore (TW)
+; 2007.06.15 uninitialized variable in memory type selection fixed (stupid me) (TW)
+; 2007.08.09 started implementing removable drive support (TW)
+
+AllocMem = -198
+FreeMem = -210
+
+; don't forget filesys.c! */
+PP_MAXSIZE = 4 * 96
+PP_FSSIZE = 400
+PP_FSPTR = 404
+PP_FSRES = 408
+PP_EXPLIB = 412
+PP_FSHDSTART = 416
+PP_TOTAL = (PP_FSHDSTART+140)
+
+NOTIFY_CLASS = $40000000
+NOTIFY_CODE = $1234
+NRF_SEND_MESSAGE = 1
+NRF_SEND_SIGNAL = 2
+NRF_WAIT_REPLY = 8
+NRF_NOTIFY_INITIAL = 16
+NRF_MAGIC = $80000000
+
+ dc.l 16
+our_seglist:
+ dc.l 0 ;/* NextSeg */
+start:
+ bra filesys_mainloop
+ dc.l make_dev-start
+ dc.l filesys_init-start
+ dc.l exter_server-start
+ dc.l bootcode-start
+ dc.l setup_exter-start
+
+ dc.l p96vsyncfix1-start
+ dc.l mousehack_x-start
+
+bootcode:
+ lea.l doslibname(pc),a1
+ jsr -96(a6) ; FindResident
+ move.l d0,a0
+ move.l 22(a0),d0
+ move.l d0,a0
+ jsr (a0)
+ rts
+
+filesys_init:
+ movem.l d0-d7/a0-a6,-(sp)
+ move.l 4.w,a6
+ move.w #$FFFC,d0 ; filesys base
+ bsr getrtbase
+ move.l (a0),a5
+ lea.l explibname(pc),a1 ; expansion lib name
+ moveq #36,d0
+ moveq #0,d5
+ jsr -552(a6) ; OpenLibrary
+ tst.l d0
+ bne.b FSIN_explibok
+ lea.l explibname(pc),a1 ; expansion lib name
+ moveq #0,d0
+ moveq #1,d5
+ jsr -552(a6) ; OpenLibrary
+FSIN_explibok:
+ move.l d0,a4
+ move.l #PP_TOTAL,d0
+ moveq #1,d1 ; MEMF_PUBLIC
+ jsr AllocMem(a6)
+ move.l d0,a3 ; param packet
+ move.l a4,PP_EXPLIB(a3)
+
+ moveq #0,d6
+FSIN_init_units:
+ cmp.l $10c(a5),d6
+ bcc.b FSIN_units_ok
+ move.l d6,-(sp)
+FSIN_nextsub:
+ moveq #1,d7
+ move.l a3,-(sp)
+ move.l a3,a0
+ bsr.w make_dev
+ move.l (sp)+,a3
+ cmp.l #-2,d0
+ beq.s FSIN_nomoresub
+ swap d6
+ addq.w #1,d6
+ swap d6
+ bra.s FSIN_nextsub
+FSIN_nomoresub:
+ move.l (sp)+,d6
+ addq.w #1,d6
+ bra.b FSIN_init_units
+
+FSIN_units_ok:
+ move.l 4.w,a6
+ move.l a4,a1
+ jsr -414(a6) ; CloseLibrary
+
+; move.w #$FF80,d0
+; bsr.w getrtbase
+; jsr (a0)
+; jsr -$0078(a6) ; Disable
+; lea 322(a6),a0 ; MemHeader
+;FSIN_scanchip:
+; move.l (a0),a0 ; first MemList
+; tst.l (a0)
+; beq.s FSIN_scandone
+; move.w 14(a0),d1 ; attributes
+; and #2,d1 ; MEMF_CHIP?
+; beq.s FSIN_scanchip
+; sub.l 24(a0),d0 ; did KS detect all chip?
+; bmi.s FSIN_scandone
+; beq.s FSIN_scandone
+; ; add the missing piece
+; add.l d0,24(a0) ; mh_Upper
+; add.l d0,28(a0) ; mh_Free
+; add.l d0,62(a6) ; MaxLocMem
+; ; we still need to update last node's free space
+; move.l 16(a0),a0 ; mh_First
+;FSIN_chiploop2
+; tst.l (a0)
+; beq.s FSIN_chiploop
+; move.l (a0),a0
+; bra.s FSIN_chiploop2
+;FSIN_chiploop:
+; add.l d0,4(a0)
+;FSIN_scandone:
+; jsr -$007e(a6) ; Enable
+
+ ; add >2MB chip RAM to memory list
+ move.w #$FF80,d0
+ bsr.w getrtbase
+ jsr (a0)
+ moveq.l #3,d1
+ moveq.l #-10,d2
+ move.l #$200000,a0
+ sub.l a0,d0
+ bcs.b FSIN_chip_done
+ beq.b FSIN_chip_done
+ moveq.l #0,d4
+ move.l d4,a1
+ jsr -618(a6) ; AddMemList
+FSIN_chip_done
+
+ movem.l (sp)+,d0-d7/a0-a6
+general_ret:
+ rts
+
+exter_data:
+exter_server:
+ movem.l a2,-(sp)
+ move.w #$FF50,d0 ; exter_int_helper
+ bsr.w getrtbase
+ moveq.l #0,d0
+ jsr (a0)
+ tst.l d0
+ beq.w exter_server_exit
+ ; This is the hard part - we have to send some messages.
+ move.l 4.w,a6
+EXTS_loop:
+ move.w #$FF50,d0 ; exter_int_helper
+ bsr.w getrtbase
+ moveq.l #2,d0
+ jsr (a0)
+ cmp.w #1,d0
+ blt.b EXTS_done
+ bgt.b EXTS_signal_reply
+ jsr -366(a6) ; PutMsg
+ bra.b EXTS_loop
+EXTS_signal_reply:
+ cmp.w #2,d0
+ bgt.b EXTS_reply
+ move.l d1,d0
+ jsr -$144(a6) ; Signal
+ bra.b EXTS_loop
+EXTS_reply:
+ cmp.w #3,d0
+ bgt.b EXTS_cause
+ jsr -$17a(a6) ; ReplyMsg
+ bra.b EXTS_loop
+EXTS_cause:
+ cmp.w #4,d0
+ bgt.b EXTS_notificationhack
+ jsr -$b4(a6) ; Cause
+ bra.b EXTS_loop
+EXTS_notificationhack:
+ cmp.w #5,d0
+ bgt.b EXTS_done
+ movem.l a0-a1,-(sp)
+ moveq #38,d0
+ move.l #65536+1,d1
+ jsr AllocMem(a6)
+ movem.l (sp)+,a0-a1
+ move.l d0,a2
+ move.b #8,8(a2)
+ move.l a0,14(a2)
+ move.w #38,18(a2)
+ move.l #NOTIFY_CLASS,20(a2)
+ move.w #NOTIFY_CODE,24(a2)
+ move.l a1,26(a2)
+ move.l 16(a1),a0
+ move.l a2,a1
+ jsr -366(a6) ; PutMsg
+ bra.w EXTS_loop
+EXTS_done:
+ move.w #$FF50,d0 ;exter_int_helper
+ bsr.w getrtbase
+ moveq.l #4,d0
+ jsr (a0)
+ moveq.l #1,d0 ; clear Z - it was for us.
+exter_server_exit:
+ movem.l (sp)+,a2
+ rts
+
+setup_exter:
+ movem.l d0-d1/a0-a1,-(sp)
+ moveq.l #26,d0
+ move.l #$10001,d1
+ jsr AllocMem(a6)
+ move.l d0,a1
+ lea.l exter_name(pc),a0
+ move.l a0,10(a1)
+ lea.l exter_data(pc),a0
+ move.l a0,14(a1)
+ lea.l exter_server(pc),a0
+ move.l a0,18(a1)
+ move.w #$0214,8(a1)
+ moveq.l #3,d0
+ jsr -168(a6) ; AddIntServer
+ movem.l (sp)+,d0-d1/a0-a1
+ rts
+
+addfs: ; a0 = first hunk, a1 = parmpacket
+ movem.l d0-d1/a0-a3/a6,-(sp)
+ move.l 4.w,a6
+ move.l a0,a2
+ move.l a1,a3
+ move.l #62+128,d0 ; sizeof(FileSysEntry) + patchflags;
+ move.l #$10001,d1
+ jsr -198(a6)
+ move.l d0,a0
+ moveq #0,d0
+ lea PP_FSHDSTART(a3),a1
+af1 move.b 0(a1,d0.w),14(a0,d0.w)
+ addq.w #1,d0
+ cmp.w #140,d0
+ bne.s af1
+ move.l a2,d0
+ lsr.l #2,d0
+ move.l d0,54(a0) ;seglist
+ move.l a0,a1
+ lea exter_name(pc),a0
+ move.l a0,10(a1) ; name
+ move.l PP_FSRES(a3),a0 ; FileSystem.resource
+ lea 18(a0),a0 ; fsr_FileSysEntries
+ jsr -$f0(a6) ;AddHead
+ movem.l (sp)+,d0-d1/a0-a3/a6
+ rts
+
+relocate: ;a0=pointer to executable, returns first segment in A0
+ movem.l d1-d7/a1-a6,-(sp)
+ move.l 4.w,a6
+ move.l a0,a2
+ cmp.l #$3f3,(a2)+
+ bne.w ree
+ addq.l #8,a2 ; skip name end and skip total hunks + 1
+ move.l 4(a2),d7 ; last hunk
+ sub.l (a2),d7 ; first hunk
+ addq.l #8,a2 ; skip hunk to load first and hunk to load last
+ addq.l #1,d7
+ move.l a2,a3
+ move.l d7,d0
+ add.l d0,d0
+ add.l d0,d0
+ add.l d0,a3
+ move.l a2,a4
+
+ ; allocate hunks
+ sub.l a5,a5 ;prev segment
+ moveq #0,d6
+r15 move.l (a2),d2 ; hunk size (header)
+ moveq #1,d1
+ btst #30,d2 ; chip mem?
+ beq.s r2
+ bset #1,d1
+r2 bset #16,d1
+ lsl.l #2,d2
+ move.l d2,d0
+ bne.s r17
+ clr.l (a2)+ ; empty hunk
+ bra.s r18
+r17 addq.l #8,d0 ; size + pointer to next hunk + hunk size
+ jsr AllocMem(a6)
+ tst.l d0
+ beq.w ree
+ move.l d0,a0
+ move.l d2,(a0)+ ; store size
+ move.l a0,(a2)+ ; store new pointer
+ move.l a5,d1
+ beq.s r10
+ move.l a0,d0
+ lsr.l #2,d0
+ move.l d0,(a5)
+r10 move.l a0,a5
+r18 addq.l #1,d6
+ cmp.l d6,d7
+ bne.s r15
+
+ moveq #0,d6
+r3 move.l d6,d1
+ add.l d1,d1
+ add.l d1,d1
+ move.l 0(a4,d1.l),a0
+ addq.l #4,a0
+ move.l (a3)+,d3 ; hunk type
+ move.l (a3)+,d4 ; hunk size
+ lsl.l #2,d4
+ cmp.l #$3e9,d3 ;code
+ beq.s r4
+ cmp.l #$3ea,d3 ;data
+ bne.s r5
+r4
+ ; code and data
+ move.l d4,d0
+r6 tst.l d0
+ beq.s r7
+ move.b (a3)+,(a0)+
+ subq.l #1,d0
+ bra.s r6
+r5
+ cmp.l #$3eb,d3 ;bss
+ bne.s ree
+
+r7 ; scan for reloc32 or hunk_end
+ move.l (a3)+,d3
+ cmp.l #$3ec,d3 ;reloc32
+ bne.s r13
+
+ ; relocate
+ move.l d6,d1
+ add.l d1,d1
+ add.l d1,d1
+ move.l 0(a4,d1.l),a0 ; current hunk
+ addq.l #4,a0
+r11 move.l (a3)+,d0 ;number of relocs
+ beq.s r7
+ move.l (a3)+,d1 ;hunk
+ add.l d1,d1
+ add.l d1,d1
+ move.l 0(a4,d1.l),d3 ;hunk start address
+ addq.l #4,d3
+r9 move.l (a3)+,d2 ;offset
+ add.l d3,0(a0,d2.l)
+ subq.l #1,d0
+ bne.s r9
+ bra.s r11
+r13
+ cmp.l #$3f2,d3 ;end
+ bne.s ree
+
+ addq.l #1,d6
+ cmp.l d6,d7
+ bne.w r3
+
+ moveq #1,d7
+ move.l (a4),a0
+r0 move.l d7,d0
+ movem.l (sp)+,d1-d7/a1-a6
+ rts
+ree move.w #30000,d0
+re1 move.w #$f00,$dff180
+ move.w #$00f,$dff180
+ move.w #$0f0,$dff180
+ dbf d0,re1
+ moveq #0,d7
+ bra.s r0
+
+fsres
+ movem.l d1/a0-a2/a6,-(sp)
+ move.l 4.w,a6
+ lea $150(a6),a0 ;ResourceList
+ move.l (a0),a0 ;lh_Head
+fsres3
+ tst.l (a0) ;end of list?
+ beq.s fsres1
+ move.l 10(a0),a1 ;name
+ lea fsresname(pc),a2
+fsres5
+ move.b (a1)+,d0
+ move.b (a2)+,d1
+ cmp.b d1,d0
+ bne.s fsres2
+ tst.b d0
+ beq.s fsres4
+ bra.s fsres5
+fsres2
+ move.l (a0),a0
+ bra.s fsres3
+ ; FileSystem.resource does not exist -> create it
+fsres1
+ moveq #32,d0 ; sizeof(FileSysResource)
+ move.l #$10001,d1
+ jsr AllocMem(a6)
+ move.l d0,a2
+ move.b #8,8(a2) ; NT_RESOURCE
+ lea fsresname(pc),a0
+ move.l a0,10(a2) ; node name
+ lea exter_name(pc),a0
+ move.l a0,14(a2) ; fsr_Creator
+ lea 18(a2),a0
+ move.l a0,(a0) ; NewList() fsr_FileSysEntries
+ addq.l #4,(a0)
+ move.l a0,8(a0)
+ lea $150(a6),a0 ; ResourceList
+ move.l a2,a1
+ jsr -$f6(a6) ; AddTail
+ move.l a2,a0
+fsres4
+ move.l a0,d0
+ movem.l (sp)+,d1/a0-a2/a6
+ rts
+
+addvolumenode
+ move.l a6,-(sp)
+ tst.b 32+44(a3)
+ beq.s .end ;empty volume string = empty drive
+ move.l 160(a3),a6
+ cmp.w #37, 20(a6)
+ bcs.s .prev37
+ moveq #(1<<1)+(1<<3),d1 ;LDF_WRITE | LDF_VOLUMES
+ jsr -$29A(a6) ;AttemptLockDosList
+ and.l #~1,d0
+ beq.s .end
+ lea 32(a3),a0
+ move.l a0,d1
+ jsr -$2A6(a6) ;AddDosEntry
+ moveq #(1<<1)+(1<<3),d1 ;LDF_WRITE | LDF_VOLUMES
+ jsr -$294(a6) ;UnLockDosList
+ bra.s .end
+.prev37 move.l 4.w,a6
+ jsr -$0084(a6) ; Forbid
+ move.l 160(a3),a0
+ move.l 34(a0),a0 ; rootnode
+ add.l a0,a0
+ add.l a0,a0
+ move.l 24(a0),a0 ; dosinfo
+ add.l a0,a0
+ add.l a0,a0
+ lea 32(a3),a1
+ move.l 4(a0),(a1)
+ move.l a1,d0
+ lsr.l #2,d0
+ move.l d0,4(a0)
+ jsr -$008a(a6) ;Permit
+.end move.l (sp)+,a6
+ rts
+remvolumenode
+ movem.l a2/a6,-(sp)
+ move.l 160(a3),a6
+ cmp.w #37, 20(a6)
+ bcs.s .prev37
+ moveq #(1<<1)+(1<<3),d1 ;LDF_WRITE | LDF_VOLUMES
+ jsr -$29A(a6) ;AttemptLockDosList
+ and.l #~1,d0
+ beq.s .end
+ lea 32(a3),a0
+ move.l a0,d1
+ jsr -$2A0(a6) ;RemDosEntry
+ moveq #(1<<1)+(1<<3),d1 ;LDF_WRITE | LDF_VOLUMES
+ jsr -$294(a6) ;UnLockDosList
+ bra.s .end
+.prev37 move.l 4.w,a6
+ jsr -$0084(a6) ; Forbid
+ move.l 160(a3),a0
+ move.l 34(a0),a0 ; rootnode
+ add.l a0,a0
+ add.l a0,a0
+ move.l 24(a0),a0 ; dosinfo
+ add.l a0,a0
+ add.l a0,a0
+ lea 4(a0),a1
+ lea 32(a3),a2
+.pr2 move.l 4(a0),d0
+ beq.s .pr1
+ add.l d0,d0
+ add.l d0,d0
+ cmp.l d0,a2
+ beq.s .pr3
+ move.l d0,a1
+ move.l (a1),a0
+ add.l a0,a0
+ add.l a0,a0
+ bra.s .pr2
+.pr3 move.l (a2),(a1)
+.pr1 jsr -$008a(a6) ;Permit
+.end movem.l (sp)+,a2/a6
+ rts
+
+diskinsertremove:
+ movem.l d2/a2/a6,-(sp)
+ moveq #22,d2
+ sub.l d2,sp
+ move.l sp,a2
+ move.w d2,d1
+.l1 clr.b 0(a2,d1.w)
+ subq.w #1,d1
+ bne.s .l1
+ move.l 4.w,a6
+ moveq #15,d1 ;IECLASS_DISKREMOVED
+ tst.l d0
+ beq.s .l2
+ moveq #16,d1 ;IECLASS_DISKINSERTED
+.l2 move.b d1,4(a2) ;ie_Class
+ move.w #$0800,8(a2); ie_Qualifier=IEQUALIFIER_MULTIBROADCAST
+
+ move.l 164(a3),a1
+ move.w #11,28(a1) ;IND_WRITEEVENT
+ move.l #22,36(a1) ;sizeof(struct InputEvent)
+ move.l a2,40(a1)
+ move.b #1,30(a1) ;IOF_QUICK
+
+ move.l 168(a3),a1
+ move.w #10,28(a1) ;TR_GETSYSTIME
+ move.b #1,30(a1) ;IOF_QUICK
+ jsr -$01c8(a6) ;DoIO
+
+ move.l 168(a3),a1
+ move.l 32(a1),14(a2)
+ move.l 36(a1),18(a2)
+
+ move.l 164(a3),a1
+ jsr -$01c8(a6) ;DoIO
+
+ add.l d2,sp
+ movem.l (sp)+,d2/a2/a6
+ rts
+
+dodiskchange
+ tst.b d0
+ beq.s .eject
+ tst.b 32+44(a3)
+ bne.s .end
+ moveq #0,d0
+.dc2
+ tst.b 32+45(a3,d0.w)
+ beq.s .dc1
+ addq.b #1,d0
+ bra.s .dc2
+.dc1
+ move.b d0,32+44(a3)
+ beq.s .end
+ bsr.w addvolumenode
+ moveq #1,d0
+ bsr.w diskinsertremove
+ bra.s .end
+.eject
+ tst.b 32+44(a3)
+ beq.s .end
+ clr.b 32+44(a3)
+ bsr.w remvolumenode
+ moveq #0,d0
+ bsr.w diskinsertremove
+.end
+ rts
+
+action_inhibit
+ tst.l 20(a4) ;dp_Arg1
+ beq.s .add
+ moveq #0,d0
+ bsr dodiskchange
+ rts
+.add
+ moveq #1,d0
+ bsr dodiskchange
+ rts
+
+diskchange
+ tst.b 172(a3)
+ bmi.s .nodisk
+ moveq #1,d0
+ bsr dodiskchange
+ rts
+.nodisk
+ moveq #0,d0
+ bsr dodiskchange
+ rts
+
+ ; exall is complex, need to emulate eac_MatchString and/or eac_MatchFunc
+action_exall
+ move.l 36(a4),a0 ; dp_Arg5, struct ExAllControl
+ tst.l 8(a0) ; eac_MatchString
+ bne.s .ex1
+ tst.l 12(a0) ; eac_MatchFunc
+ bne.s .ex1
+ rts ;nothing to do here
+.ex1: movem.l d2-d7/a2-a6,-(sp)
+ move.l a0,a5
+ move.l 24(a4),a2 ;dp_Arg2, ExAllData
+ move.l (a5),d7 ; eac_Entries
+.ex4 tst.l d7
+ beq.s .ex3
+ move.l a2,d0
+ beq.s .ex3
+ moveq #0,d6
+ move.l 8(a5),d1 ; MatchString
+ beq.s .ex5
+ move.l 4(a2),d2 ; dir/file name
+ move.l 160(a3),a6 ; dosbase
+ jsr -$03cc(a6) ; MatchPatternNoCase
+ tst.l d0
+ bne.s .ex5
+ st d6
+.ex5 move.l 12(a5),d1 ; MatchFunc
+ beq.s .ex6
+ move.l d1,a0
+ move.l a2,a1
+ move.l a2,-(sp)
+ lea 32(a4),a2 ; dp_Arg4, Type
+ pea .pop(pc)
+ move.l 8(a0),-(sp)
+ rts
+.pop move.l (sp)+,a2
+ tst.l d0
+ bne.s .ex6
+ st d6
+.ex6 tst.b d6
+ beq.s .ex7
+ ; need to delete current entry.. this is not really the proper way..
+ move.l 4(a2),d0 ; pointer to filename (which is first address after structure)
+ sub.l a2,d0 ; copy this much data
+ tst.l (a2) ; eac_Next
+ beq.s .ex8
+ move.l (a2),a0
+ move.l a2,a1
+.ex9 move.l (a0)+,(a1)+
+ subq.l #4,d1
+ bpl.s .ex9
+.ex8 subq.l #1,(a5) ; eac_Entries
+ subq.l #1,d7
+ bra.s .ex4
+.ex7 move.l (a2),a2
+ subq.l #1,d7
+ bra.s .ex4
+.ex3 movem.l (sp)+,d2-d7/a2-a6
+ rts
+
+
+
+make_dev: ; IN: A0 param_packet, D6: unit_no, D7: boot, A4: expansionbase
+
+ bsr.w fsres
+ move.l d0,PP_FSRES(a0) ; pointer to FileSystem.resource
+ move.l a0,-(sp)
+ move.w #$FFFC,d0 ; filesys base
+ bsr.w getrtbase
+ move.l (a0),a5
+ move.w #$FF28,d0 ; fill in unit-dependent info (filesys_dev_storeinfo)
+ bsr.w getrtbase
+ move.l a0,a1
+ move.l (sp)+,a0
+ clr.l PP_FSSIZE(a0) ; filesystem size
+ clr.l PP_FSPTR(a0) ; filesystem memory
+ jsr (a1)
+ ; ret:0=virtual,1=hardfile,2=rdbhardfile,-1=hardfile-donotmount,-2=no more subunits
+ move.l d0,d3
+ cmp.l #-2,d3
+ beq.w general_ret
+ cmp.l #2,d3
+ beq.s mountalways
+
+ ; KS < V36: init regular hardfiles only if filesystem is loaded
+ and.l d5,d0
+ beq.s mountalways ; >= 36
+ tst.l PP_FSSIZE(a0)
+ beq.w general_ret ; no filesystem -> don't mount
+
+mountalways
+ ; allocate memory for loaded filesystem
+ move.l PP_FSSIZE(a0),d0
+ beq.s nordbfs1
+ move.l a0,-(sp)
+ moveq #1,d1
+ move.l 4.w,a6
+ jsr AllocMem(a6)
+ move.l (sp)+,a0
+ move.l d0,PP_FSPTR(a0)
+nordbfs1:
+
+ tst.l d3
+ bpl.s do_mount
+
+ ; do not mount but we might need to load possible custom filesystem(s)
+ move.l a0,a1
+ move.w #$FF20,d0 ; record in ui.startup (filesys_dev_remember)
+ bsr.w getrtbase
+ jsr (a0)
+ bra.w dont_mount
+
+do_mount:
+ move.l a4,a6
+ move.l a0,-(sp)
+ jsr -144(a6) ; MakeDosNode()
+ move.l (sp)+,a0 ; parmpacket
+ move.l a0,a1
+ move.l d0,a3 ; devicenode
+ move.w #$FF20,d0 ; record in ui.startup (filesys_dev_remember)
+ bsr.w getrtbase
+ jsr (a0)
+ moveq #0,d0
+ move.l d0,8(a3) ; dn_Task
+ move.l d0,16(a3) ; dn_Handler
+ move.l d0,32(a3) ; dn_SegList
+
+dont_mount
+ tst.l PP_FSPTR(a1) ; filesystem?
+ beq.s nordbfs2
+ move.l PP_FSPTR(a1),a0
+ bsr.w relocate
+ movem.l d0/a0-a1,-(sp)
+ move.l PP_FSSIZE(a1),d0
+ move.l PP_FSPTR(a1),a1
+ move.l 4.w,a6
+ jsr FreeMem(a6)
+ movem.l (sp)+,d0/a0-a1
+ tst.l d0
+ beq.s nordbfs2
+ bsr.w addfs
+nordbfs2:
+
+ tst.l d3
+ bmi.w general_ret
+
+ move.w #$FF18,d0 ; update dn_SegList if needed (filesys_dev_bootfilesys)
+ bsr.w getrtbase
+ jsr (a0)
+
+ move.l d3,d0
+ move.b 79(a1),d3 ; bootpri
+ tst.l d0
+ bne.b MKDV_doboot
+
+MKDV_is_filesys:
+ move.l #4000,20(a3) ; dn_StackSize
+ lea.l our_seglist(pc),a1
+ move.l a1,d0
+ lsr.l #2,d0
+ move.l d0,32(a3) ; dn_SegList
+ moveq #-1,d0
+ move.l d0,36(a3) ; dn_GlobalVec
+
+MKDV_doboot:
+ tst.l d7
+ beq.b MKDV_noboot
+
+ move.l 4.w,a6
+ moveq.l #20,d0
+ moveq.l #0,d1
+ jsr AllocMem(a6)
+ move.l d0,a1 ; bootnode
+ moveq #0,d0
+ move.l d0,(a1)
+ move.l d0,4(a1)
+ move.w d0,14(a1)
+ move.w #$1000,d0
+ or.b d3,d0
+ move.w d0,8(a1)
+ move.l $104(a5),10(a1) ; filesys_configdev
+ move.l a3,16(a1) ; devicenode
+ lea.l 74(a4),a0 ; MountList
+ jmp -270(a6) ; Enqueue()
+
+MKDV_noboot:
+ move.l a3,a0
+ moveq #0,d1
+ move.l d1,a1
+ moveq #-1,d0
+ move.l a4,a6 ; expansion base
+ jmp -150(a6) ; AddDosNode
+
+filesys_mainloop:
+ move.l 4.w,a6
+ sub.l a1,a1
+ jsr -294(a6) ; FindTask
+ move.l d0,a0
+ lea.l $5c(a0),a5 ; pr_MsgPort
+
+ ; Open DOS library
+ lea.l doslibname(pc),a1
+ moveq.l #0,d0
+ jsr -552(a6) ; OpenLibrary
+ move.l d0,a2
+
+ ; Allocate some memory. Usage:
+ ; 0: lock chain
+ ; 4: command chain
+ ; 8: second thread's lock chain
+ ; 12: dummy message
+ ; 32: the volume (80+44+1 bytes)
+ ; 157: mousehack started-flag
+ ; 160: dosbase
+ ; 164: input.device ioreq (disk inserted/removed input message)
+ ; 168: timer.device ioreq
+ ; 172: disk change from host
+ ; 176: my task
+ move.l #12+20+(80+44+1)+(1+3)+4+4+4+(1+3)+4,d0
+ move.l #$10001,d1 ; MEMF_PUBLIC | MEMF_CLEAR
+ jsr AllocMem(a6)
+ move.l d0,a3
+ moveq.l #0,d6
+ move.l d6,(a3)
+ move.l d6,4(a3)
+ move.l d6,8(a3)
+ move.l a2,160(a3)
+
+ sub.l a1,a1
+ jsr -294(a6) ; FindTask
+ move.l d0,176(a3)
+
+ bsr.w allocinputdevice
+ move.l d0,164(a3)
+ bsr.w alloctimerdevice
+ move.l d0,168(a3)
+
+ moveq.l #0,d5 ; No commands queued.
+
+ ; Fetch our startup packet
+ move.l a5,a0
+ jsr -384(a6) ; WaitPort
+ move.l a5,a0
+ jsr -372(a6) ; GetMsg
+ move.l d0,a4
+ move.l 10(a4),d3 ; ln_Name
+ move.w #$FF40,d0 ; startup_handler
+ bsr.w getrtbase
+ moveq.l #0,d0
+ jsr (a0)
+
+ bsr.w addvolumenode
+
+ bsr.w mousehack_init
+ bra.w FSML_Reply
+
+ ; We abuse some of the fields of the message we get. Offset 0 is
+ ; used for chaining unprocessed commands, and offset 1 is used for
+ ; indicating the status of a command. 0 means the command was handed
+ ; off to some UAE thread and did not complete yet, 1 means we didn't
+ ; even hand it over yet because we were afraid that might blow some
+ ; pipe limit, and -1 means the command was handed over and has completed
+ ; processing by now, so it's safe to reply to it.
+
+FSML_loop:
+ bsr.w mousehack_init
+
+ move.l a5,a0
+ jsr -372(a6) ; GetMsg
+ move.l d0,a4
+ tst.l d0
+ bne.s .msg
+
+ moveq #0,d0
+ move.b 15(a5),d1 ;mp_SigBit
+ bset d1,d0
+ bset #17,d0 ; SIGBREAK_CTRL_D
+ jsr -$013e(a6) ;Wait
+.msg
+ ; disk changed?
+ tst.b 172(a3)
+ beq.s .nodc
+ bsr.w diskchange
+ clr.b 172(a3)
+.nodc
+ move.l a4,d0
+ beq.s FSML_loop
+
+ ; notify reply?
+ cmp.w #38, 18(a4)
+ bne.s nonotif
+ cmp.l #NOTIFY_CLASS, 20(a4)
+ bne.s nonotif
+ cmp.w #NOTIFY_CODE, 24(a4)
+ bne.s nonotif
+ move.l 26(a4),a0 ; NotifyRequest
+ move.l 12(a0),d0 ; flags
+ and.l #NRF_WAIT_REPLY|NRF_MAGIC,d0
+ cmp.l #NRF_WAIT_REPLY|NRF_MAGIC,d0
+ bne.s nonoti
+ and.l #~NRF_MAGIC,12(a0)
+ move.l 16(a0),a0
+ move.l a4,a1
+ move.b #8,(a1)
+ jsr -366(a6) ; PutMsg
+ bra.s FSML_loop
+nonoti
+ move.l a4,a1
+ moveq #38,d0
+ jsr FreeMem(a6)
+ bra.w FSML_loop
+
+nonotif
+ move.l 10(a4),d3 ; ln_Name
+ bne.b FSML_FromDOS
+
+ ; It's a dummy packet indicating that some queued command finished.
+ move.w #$FF50,d0 ; exter_int_helper
+ bsr.w getrtbase
+ moveq.l #1,d0
+ jsr (a0)
+ ; Go through the queue and reply all those that finished.
+ lea.l 4(a3),a2
+ move.l (a2),a0
+FSML_check_old:
+ move.l a0,d0
+ beq.w FSML_loop
+ move.l (a0),a1
+ move.l d0,a0
+ ; This field may be accessed concurrently by several UAE threads.
+ ; This _should_ be harmless on all reasonable machines.
+ move.l 4(a0),d0
+ bpl.b FSML_check_next
+ movem.l a0/a1,-(a7)
+ move.l 10(a0),a4
+ bsr.b ReplyOne
+ subq.l #1,d5 ; One command less in the queue
+ movem.l (a7)+,a0/a1
+ move.l a1,(a2)
+ move.l a1,a0
+ bra.b FSML_check_old
+FSML_check_next:
+ move.l a0,a2
+ move.l a1,a0
+ bra.b FSML_check_old
+
+FSML_FromDOS:
+ ; Limit the number of outstanding started commands. We can handle an
+ ; unlimited number of unstarted commands.
+ cmp.l #20,d5
+ bcs FSML_DoCommand
+ ; Too many commands queued.
+ moveq.l #1,d0
+ move.l d0,4(a4)
+ bra.b FSML_Enqueue
+
+FSML_DoCommand:
+ bsr.b LockCheck ; Make sure there are enough locks for the C code to grab.
+ move.w #$FF30,d0 ; filesys_handler
+ bsr.w getrtbase
+ jsr (a0)
+ tst.l d0
+ beq.b FSML_Reply
+ ; The command did not complete yet. Enqueue it and increase number of
+ ; queued commands
+ ; The C code already set 4(a4) to 0
+ addq.l #1,d5
+FSML_Enqueue:
+ move.l 4(a3),(a4)
+ move.l a4,4(a3)
+ bra.w FSML_loop
+
+FSML_Reply:
+ move.l d3,a4
+ bsr.b ReplyOne
+ bra.w FSML_loop
+
+ReplyOne:
+ cmp.l #31,8(a4) ;ACTION_INHIBIT?
+ bne.s FSML_ReplyOne2
+ bsr.w action_inhibit
+FSML_ReplyOne2:
+ cmp.l #1033,8(a4) ;ACTION_EXAMINE_ALL
+ bne.s FSML_ReplyOne3
+ bsr.w action_exall
+FSML_ReplyOne3:
+ move.l (a4),a1 ; dp_Link
+ move.l 4(a4),a0 ; dp_Port
+ move.l a5,4(a4)
+ jmp -366(a6) ; PutMsg
+
+; ugly code to avoid calling AllocMem / FreeMem from native C code.
+; We keep a linked list of 3 locks. In theory, only one should ever
+; be used. Before handling every packet, we check that the list has the
+; right length.
+
+LockCheck:
+ move.l d5,-(a7)
+ moveq.l #-4,d5 ; Keep three locks
+ move.l (a3),a2
+ move.l a2,d7
+LKCK_Loop:
+ move.l a2,d1
+ beq LKCK_ListEnd
+ addq.l #1,d5
+ beq.b LKCK_TooMany
+ move.l a2,a1
+ move.l (a2),a2
+ bra.b LKCK_Loop
+LKCK_ListEnd:
+ addq.l #1,d5
+ beq.b LKCK_ret
+ move.l d7,a2
+ moveq.l #24,d0 ; sizeof Lock is 20, 4 for chain
+ moveq.l #1,d1 ; MEMF_PUBLIC
+ jsr AllocMem(a6)
+ addq.w #1,d6
+ move.l d0,a2
+ move.l d7,(a2)
+ move.l a2,d7
+ bra.b LKCK_ListEnd
+LKCK_TooMany:
+ move.l (a2),d0 ; We have too many, but we tolerate that to some extent.
+ beq.b LKCK_ret
+ move.l d0,a0
+ move.l (a0),d0
+ beq.b LKCK_ret
+ move.l d0,a0
+ move.l (a0),d0
+ beq.b LKCK_ret
+
+ moveq.l #0,d0 ; Now we are sure that we really have too many. Delete some.
+ move.l d0,(a1)
+LKCK_TooManyLoop:
+ move.l a2,a1
+ move.l (a1),a2
+ moveq.l #24,d0
+ jsr FreeMem(a6)
+ add.l #$10000,d6
+ move.l a2,d0
+ bne.b LKCK_TooManyLoop
+LKCK_ret:
+ move.l d7,(a3)
+ move.l (a7)+,d5
+ rts
+
+getrtbase:
+ lea start-8-4(pc),a0
+ and.l #$FFFF,d0
+ add.l d0,a0
+ rts
+
+ ;p96 stuff
+
+p96flag dc.w 0
+p96vsyncfix1
+ cmp.l #34,8(sp) ; picasso_WaitVerticalSync?
+ bne.s p961
+ movem.l d0-d1/a0-a2/a6,-(sp)
+ move.l 4.w,a6
+ sub.l a1,a1
+ jsr -$126(a6) ; FindTask
+ move.l d0,a2
+ move.l a2,a1
+ moveq #-20,d0
+ jsr -$12c(a6) ; SetTaskPri
+ lea p96flag(pc),a0
+ move.w (a0),d1
+p962 cmp.w (a0),d1
+ beq.s p962
+ move.l a2,a1
+ jsr -$12c(a6) ; SetTaskPri
+ moveq #1,d1
+ movem.l (sp)+,d0-d1/a0-a2/a6
+ addq.l #4,sp ; return directly to caller
+p961 rts
+
+
+; mouse hack
+
+newlist:
+ move.l a0,(a0)
+ addq.l #4,(a0)
+ clr.l 4(a0)
+ move.l a0,8(a0)
+ rts
+
+createport:
+ movem.l d2/a2/a6,-(sp)
+ move.l 4,a6
+ moveq #-1,d0
+ jsr -$014a(a6) ;AllocSignal
+ sub.l a0,a0
+ move.l d0,d2
+ bmi.s .f
+ moveq #34,d0
+ move.l #65536+1,d1
+ jsr AllocMem(a6)
+ sub.l a0,a0
+ move.l d0,a2
+ tst.l d0
+ beq.s .f
+ move.b #4,8(a2) ;NT_MSGPORT
+ move.b d2,15(a2)
+ sub.l a1,a1
+ jsr -$0126(a6) ;FindTask
+ move.l d0,16(a2)
+ lea 20(a2),a0
+ bsr.w newlist
+ move.l a2,a0
+.f move.l a0,d0
+ movem.l (sp)+,d2/a2/a6
+ rts
+
+createio:
+ movem.l d2/a2/a6,-(sp)
+ move.l 4,a6
+ tst.l d0
+ beq.s .f
+ move.l d0,a2
+ moveq #48,d2
+ move.l d2,d0
+ move.l #65536+1,d1
+ jsr AllocMem(a6)
+ move.l d0,a0
+ move.b #10,8(a0) ;NT_MESSAGE
+ move.l d2,18(a0)
+ move.l a2,14(a0)
+.f tst.l d0
+ movem.l (sp)+,d2/a2/a6
+ rts
+
+allocinputdevice
+ movem.l a2/a6,-(sp)
+ move.l 4.w,a6
+ bsr.w createport
+ bsr.w createio
+ beq.s .f
+ move.l d0,a1
+ move.l d0,a2
+ lea inp_dev(pc),a0
+ moveq #0,d0
+ moveq #0,d1
+ jsr -$01bc(a6) ;OpenDevice
+ move.l d0,d1
+ moveq #0,d0
+ tst.l d1
+ bne.s .f
+ move.l a2,d0
+.f tst.l d0
+ movem.l (sp)+,a2/a6
+ rts
+
+alloctimerdevice
+ movem.l a2/a6,-(sp)
+ move.l 4.w,a6
+ bsr.w createport
+ bsr.w createio
+ beq.s .f
+ move.l d0,a2
+ move.l d0,a1
+ lea tim_dev(pc),a0
+ moveq #0,d0
+ moveq #0,d1
+ jsr -$01bc(a6) ;OpenDevice
+ move.l d0,d1
+ moveq #0,d0
+ tst.l d1
+ bne.s .f
+ move.l a2,d0
+.f tst.l d0
+ movem.l (sp)+,a2/a6
+ rts
+
+createtask:
+ movem.l d2/d3/a2/a3/a6,-(sp)
+ move.l 4,a6
+ move.l a0,d2
+ move.l a1,d3
+ move.l #92+2048,d0
+ move.l #65536+1,d1
+ jsr AllocMem(a6)
+ tst.l d0
+ beq .f
+ move.l d0,a2
+ move.b #1,8(a2) ;NT_TASK
+ move.l d2,10(a2)
+ lea 92(a2),a3
+ move.l a3,58(a2)
+ lea 2048(a3),a3
+ move.l a3,62(a2)
+ move.l a3,54(a2)
+ move.l a2,a1
+ move.l d3,a2
+ sub.l a3,a3
+ jsr -$011a(a6) ;AddTask
+.f movem.l (sp)+,d2/d3/a2/a3/a6
+ rts
+
+mousehack_e: dc.w 0
+mousehack_x: dc.w 0
+mousehack_y: dc.w 0
+
+MH_INT = 0
+MH_FOO = (MH_INT+22)
+MH_IEV = (MH_FOO+16)
+MH_IO = (MH_IEV+22)
+MH_TM = (MH_IO+4)
+MH_END = (MH_TM+4)
+
+mousehack_init:
+ move.l a0,-(sp)
+ tst.b 157(a3)
+ bne.s .no
+ lea mousehack_e(pc),a0
+ cmp.b #1,(a0)
+ bne.s .no
+ lea mhname(pc),a0
+ lea mousehack_task(pc),a1
+ bsr createtask
+ st 157(a3)
+ ;tell native side that mousehack is active
+ move.w #$FF38,d0
+ bsr.w getrtbase
+ jsr (a0)
+.no move.l (sp)+,a0
+ rts
+
+mousehack_task:
+ move.l 4,a6
+
+ moveq #-1,d0
+ jsr -$014a(a6) ;AllocSignal
+ moveq #0,d2
+ bset d0,d2
+
+ sub.l a1,a1
+ jsr -$0126(a6) ;FindTask
+ move.l d0,a4
+
+ moveq #20,d0
+ move.l a4,a1
+ jsr -$012c(a6) ;SetTaskPri
+
+ moveq #0,d0
+ lea intlibname(pc),a1
+ jsr -$0228(a6)
+ move.l d0,d7
+
+ moveq #0,d0
+ move.w #MH_END,d0
+ move.l #65536+1,d1
+ jsr AllocMem(a6)
+ move.l d0,a5
+
+ bsr.w allocinputdevice
+ move.l d0,MH_IO(a5)
+ beq.w .f
+ bsr.w alloctimerdevice
+ move.l d0,MH_TM(a5)
+ beq.w .f
+
+ lea MH_FOO(a5),a3
+ move.l a4,12(a3);task
+ move.l d2,8(a3) ;sigmask
+ moveq #-1,d0
+ move.l d0,(a3) ;mx
+ move.l d0,4(a3) ;my
+
+ lea MH_INT(a5),a1
+ move.b #2,8(a1) ;NT_INTERRUPT
+ move.b #5,9(a1) ;priority
+ lea mhname(pc),a0
+ move.l a0,10(a1)
+ lea mousehackint(pc),a0
+ move.l a0,18(a1)
+ move.l a3,14(a1)
+ moveq #5,d0 ;INTB_VERTB
+ jsr -$00a8(a6)
+ bra.s mhloop
+.f rts
+
+mhloop
+ move.l d2,d0
+ jsr -$013e(a6) ;Wait
+
+ move.l MH_IO(a5),a1
+ lea MH_IEV(a5),a2
+ move.w #11,28(a1) ;IND_WRITEEVENT
+ move.l #22,36(a1) ;sizeof(struct InputEvent)
+ move.l a2,40(a1)
+ move.b #1,30(a1) ;IOF_QUICK
+
+ move.b #4,4(a2) ;IECLASS_POINTERPOS
+ clr.b 5(a2) ;ie_SubClass
+ clr.w 6(a2) ;ie_Code
+ clr.w 8(a2) ;ie_Qualifier
+
+ move.l d7,a0 ;intbase
+
+ move.l MH_FOO+0(a5),d0
+ move.w 34+14(a0),d1
+ add.w d1,d1
+ sub.w d1,d0
+ move.w d0,10(a2)
+
+ move.l MH_FOO+4(a5),d0
+ move.w 34+12(a0),d1
+ add.w d1,d1
+ sub.w d1,d0
+ ext.l d0
+ move.w d0,12(a2)
+
+ move.l MH_TM(a5),a1
+ move.w #10,28(a1) ;TR_GETSYSTIME
+ move.b #1,30(a1) ;IOF_QUICK
+ jsr -$01c8(a6) ;DoIO
+ move.l MH_TM(a5),a1
+ move.l 32(a1),14(a2)
+ move.l 36(a1),18(a2)
+
+ move.l MH_IO(a5),a1
+ jsr -$01c8(a6) ;DoIO
+
+ bra.w mhloop
+
+mousehackint:
+ move.w mousehack_x(pc),d0
+ ext.l d0
+ move.w mousehack_y(pc),d1
+ ext.l d1
+ cmp.l (a1),d0
+ bne .l1
+ cmp.l 4(a1),d1
+ beq .l2
+.l1 move.l d1,4(a1)
+ move.l d0,(a1)
+ move.l 8(a1),d0
+ move.l 12(a1),a1
+ move.l 4.w,a6
+ jsr -$0144(a6) ; Signal
+.l2 lea $dff000,a0
+ moveq #0,d0
+ rts
+
+inp_dev: dc.b 'input.device',0
+tim_dev: dc.b 'timer.device',0
+mhname: dc.b 'UAE mouse hack',0
+exter_name: dc.b 'UAE filesystem',0
+doslibname: dc.b 'dos.library',0
+intlibname: dc.b 'intuition.library',0
+explibname: dc.b 'expansion.library',0
+fsresname: dc.b 'FileSystem.resource',0
+ END
{
int len;
char *p;
-
+
len = strlen (dir) + 1 + 1;
if (name)
len += 1 + strlen (name);
p = make_uaefsdbpath (dir, NULL);
ret = DeleteFile(p);
- //write_log("delete FSDB stream '%s' = %d\n", p, ret);
+ //write_log ("delete FSDB stream '%s' = %d\n", p, ret);
xfree (p);
return ret;
}
FILETIME t1, t2, t3;
int time_valid = FALSE;
int ret = 0;
-
+
p = make_uaefsdbpath (dir, NULL);
dirattr = GetFileAttributes (dir);
dirflag = FILE_ATTRIBUTE_NORMAL;
dirflag = FILE_FLAG_BACKUP_SEMANTICS; /* argh... */
h = CreateFile (dir, GENERIC_READ, 0,
NULL, OPEN_EXISTING, dirflag, NULL);
- if (h != INVALID_HANDLE_VALUE) {
+ if (h != INVALID_HANDLE_VALUE) {
if (GetFileTime (h, &t1, &t2, &t3))
time_valid = TRUE;
CloseHandle (h);
h = CreateFile (p, GENERIC_WRITE, 0,
NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (h == INVALID_HANDLE_VALUE && GetLastError () == ERROR_ACCESS_DENIED) {
- attr = GetFileAttributes (p);
+ attr = GetFileAttributes (p);
if (attr != INVALID_FILE_ATTRIBUTES) {
if (attr & (FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN)) {
SetFileAttributes (p, attr & ~(FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN));
if (time_valid) {
h = CreateFile (dir, GENERIC_WRITE, 0,
NULL, OPEN_EXISTING, dirflag, NULL);
- if (h != INVALID_HANDLE_VALUE) {
+ if (h != INVALID_HANDLE_VALUE) {
SetFileTime (h, &t1, &t2, &t3);
CloseHandle (h);
}
buf[5 + 257 + 256] = '\0';
strncpy (buf + 5 + 2 * 257, aino->comment ? aino->comment : "", 80);
buf[5 + 2 * 257 + 80] = '\0';
- do_put_mem_long ((uae_u32 *)(buf + 5 + 2 * 257 + 81), winmode);
+ do_put_mem_long ((uae_u32 *)(buf + 5 + 2 * 257 + 81), winmode);
aino->has_dbentry = 0;
aino->dirty = 0;
}
aino->dirty = 0;
aino->db_offset = 0;
if((mode = GetFileAttributes(aino->nname)) == INVALID_FILE_ATTRIBUTES) {
- write_log("xGetFileAttributes('%s') failed! error=%d, aino=%p\n",
+ write_log ("xGetFileAttributes('%s') failed! error=%d, aino=%p\n",
aino->nname, GetLastError(), aino);
return aino;
}
int reset = 0;
if((mode = GetFileAttributes(aino->nname)) == INVALID_FILE_ATTRIBUTES) {
- write_log("GetFileAttributes('%s') failed! error=%d, aino=%p dir=%d\n",
+ write_log ("GetFileAttributes('%s') failed! error=%d, aino=%p dir=%d\n",
aino->nname, GetLastError(), aino, aino->dir);
return 0;
}
mode = 0;
if ((tmpmask & (A_FIBF_WRITE | A_FIBF_DELETE)) == 0)
- mode |= FILE_ATTRIBUTE_READONLY;
+ mode |= FILE_ATTRIBUTE_READONLY;
if (!(tmpmask & A_FIBF_ARCHIVE))
- mode |= FILE_ATTRIBUTE_ARCHIVE;
+ mode |= FILE_ATTRIBUTE_ARCHIVE;
if (tmpmask & A_FIBF_PURE)
- mode |= FILE_ATTRIBUTE_SYSTEM;
+ mode |= FILE_ATTRIBUTE_SYSTEM;
if (tmpmask & A_FIBF_HIDDEN)
- mode |= FILE_ATTRIBUTE_HIDDEN;
+ mode |= FILE_ATTRIBUTE_HIDDEN;
SetFileAttributes (aino->nname, mode);
aino->dirty = 1;
if (0 && aino->dir)
return 0;
if (fsdb_mode_representable_p (aino, mask))
- return mask;
+ return mask;
mask &= ~(A_FIBF_SCRIPT | A_FIBF_READ | A_FIBF_EXECUTE);
if (fsdb_mode_representable_p (aino, mask))
- return mask;
+ return mask;
mask &= ~A_FIBF_WRITE;
if (fsdb_mode_representable_p (aino, mask))
- return mask;
+ return mask;
mask &= ~A_FIBF_DELETE;
if (fsdb_mode_representable_p (aino, mask))
- return mask;
+ return mask;
return 0;
}
int i;
strncat (tmp, suggestion, 240);
-
+
/* replace the evil ones... */
for (i=0; i < NUM_EVILCHARS; i++)
while ((c = strchr (tmp, evilchars[i])) != 0)
HANDLE h;
WIN32_FIND_DATA fd;
static a_inode dummy;
-
+
tmp1 = build_nname (base->nname, UAEFSDB_BEGINSX);
if (!tmp1)
return NULL;
DWORD dirattr = GetFileAttributes (name);
if (dirattr != INVALID_FILE_ATTRIBUTES && (dirattr & FILE_ATTRIBUTE_DIRECTORY))
return RemoveDirectory (name) ? 0 : -1;
- return DeleteFile(name) ? 0 : -1;
+ return DeleteFile(name) ? 0 : -1;
} else {
- SHFILEOPSTRUCT fos;
+ SHFILEOPSTRUCT fos;
/* name must be terminated by \0\0 */
char *p = xcalloc (strlen (name) + 2, 1);
int v;
-
+
strcpy (p, name);
memset (&fos, 0, sizeof (fos));
fos.wFunc = FO_DELETE;
{
struct my_opendirs *mod;
char tmp[MAX_DPATH];
-
+
strcpy (tmp, name);
strcat (tmp, "\\*.*");
mod = xmalloc (sizeof (struct my_opendirs));
void my_closedir (void *d)
{
struct my_opendirs *mod = d;
- FindClose (mod->h);
+ if (d)
+ FindClose (mod->h);
xfree (mod);
}
DWORD CreationDisposition = OPEN_EXISTING;
DWORD FlagsAndAttributes = FILE_ATTRIBUTE_NORMAL;
DWORD attr;
-
+
mos = xmalloc (sizeof (struct my_opens));
if (!mos)
return NULL;
+++ /dev/null
-struct xcputbl XCPUFUNC(xop_smalltbl_0)[] = {
-{ XCPUFUNC(op_0_0), 0, 0 }, /* OR */
-{ XCPUFUNC(op_10_0), 0, 16 }, /* OR */
-{ XCPUFUNC(op_18_0), 0, 24 }, /* OR */
-{ XCPUFUNC(op_20_0), 0, 32 }, /* OR */
-{ XCPUFUNC(op_28_0), 0, 40 }, /* OR */
-{ XCPUFUNC(op_30_0), 0, 48 }, /* OR */
-{ XCPUFUNC(op_38_0), 0, 56 }, /* OR */
-{ XCPUFUNC(op_39_0), 0, 57 }, /* OR */
-{ XCPUFUNC(op_3c_0), 0, 60 }, /* ORSR */
-{ XCPUFUNC(op_40_0), 0, 64 }, /* OR */
-{ XCPUFUNC(op_50_0), 0, 80 }, /* OR */
-{ XCPUFUNC(op_58_0), 0, 88 }, /* OR */
-{ XCPUFUNC(op_60_0), 0, 96 }, /* OR */
-{ XCPUFUNC(op_68_0), 0, 104 }, /* OR */
-{ XCPUFUNC(op_70_0), 0, 112 }, /* OR */
-{ XCPUFUNC(op_78_0), 0, 120 }, /* OR */
-{ XCPUFUNC(op_79_0), 0, 121 }, /* OR */
-{ XCPUFUNC(op_7c_0), 0, 124 }, /* ORSR */
-{ XCPUFUNC(op_80_0), 0, 128 }, /* OR */
-{ XCPUFUNC(op_90_0), 0, 144 }, /* OR */
-{ XCPUFUNC(op_98_0), 0, 152 }, /* OR */
-{ XCPUFUNC(op_a0_0), 0, 160 }, /* OR */
-{ XCPUFUNC(op_a8_0), 0, 168 }, /* OR */
-{ XCPUFUNC(op_b0_0), 0, 176 }, /* OR */
-{ XCPUFUNC(op_b8_0), 0, 184 }, /* OR */
-{ XCPUFUNC(op_b9_0), 0, 185 }, /* OR */
-{ XCPUFUNC(op_d0_0), 0, 208 }, /* CHK2 */
-{ XCPUFUNC(op_e8_0), 0, 232 }, /* CHK2 */
-{ XCPUFUNC(op_f0_0), 0, 240 }, /* CHK2 */
-{ XCPUFUNC(op_f8_0), 0, 248 }, /* CHK2 */
-{ XCPUFUNC(op_f9_0), 0, 249 }, /* CHK2 */
-{ XCPUFUNC(op_fa_0), 0, 250 }, /* CHK2 */
-{ XCPUFUNC(op_fb_0), 0, 251 }, /* CHK2 */
-{ XCPUFUNC(op_100_0), 0, 256 }, /* BTST */
-{ XCPUFUNC(op_108_0), 0, 264 }, /* MVPMR */
-{ XCPUFUNC(op_110_0), 0, 272 }, /* BTST */
-{ XCPUFUNC(op_118_0), 0, 280 }, /* BTST */
-{ XCPUFUNC(op_120_0), 0, 288 }, /* BTST */
-{ XCPUFUNC(op_128_0), 0, 296 }, /* BTST */
-{ XCPUFUNC(op_130_0), 0, 304 }, /* BTST */
-{ XCPUFUNC(op_138_0), 0, 312 }, /* BTST */
-{ XCPUFUNC(op_139_0), 0, 313 }, /* BTST */
-{ XCPUFUNC(op_13a_0), 0, 314 }, /* BTST */
-{ XCPUFUNC(op_13b_0), 0, 315 }, /* BTST */
-{ XCPUFUNC(op_13c_0), 0, 316 }, /* BTST */
-{ XCPUFUNC(op_140_0), 0, 320 }, /* BCHG */
-{ XCPUFUNC(op_148_0), 0, 328 }, /* MVPMR */
-{ XCPUFUNC(op_150_0), 0, 336 }, /* BCHG */
-{ XCPUFUNC(op_158_0), 0, 344 }, /* BCHG */
-{ XCPUFUNC(op_160_0), 0, 352 }, /* BCHG */
-{ XCPUFUNC(op_168_0), 0, 360 }, /* BCHG */
-{ XCPUFUNC(op_170_0), 0, 368 }, /* BCHG */
-{ XCPUFUNC(op_178_0), 0, 376 }, /* BCHG */
-{ XCPUFUNC(op_179_0), 0, 377 }, /* BCHG */
-{ XCPUFUNC(op_17a_0), 0, 378 }, /* BCHG */
-{ XCPUFUNC(op_17b_0), 0, 379 }, /* BCHG */
-{ XCPUFUNC(op_180_0), 0, 384 }, /* BCLR */
-{ XCPUFUNC(op_188_0), 0, 392 }, /* MVPRM */
-{ XCPUFUNC(op_190_0), 0, 400 }, /* BCLR */
-{ XCPUFUNC(op_198_0), 0, 408 }, /* BCLR */
-{ XCPUFUNC(op_1a0_0), 0, 416 }, /* BCLR */
-{ XCPUFUNC(op_1a8_0), 0, 424 }, /* BCLR */
-{ XCPUFUNC(op_1b0_0), 0, 432 }, /* BCLR */
-{ XCPUFUNC(op_1b8_0), 0, 440 }, /* BCLR */
-{ XCPUFUNC(op_1b9_0), 0, 441 }, /* BCLR */
-{ XCPUFUNC(op_1ba_0), 0, 442 }, /* BCLR */
-{ XCPUFUNC(op_1bb_0), 0, 443 }, /* BCLR */
-{ XCPUFUNC(op_1c0_0), 0, 448 }, /* BSET */
-{ XCPUFUNC(op_1c8_0), 0, 456 }, /* MVPRM */
-{ XCPUFUNC(op_1d0_0), 0, 464 }, /* BSET */
-{ XCPUFUNC(op_1d8_0), 0, 472 }, /* BSET */
-{ XCPUFUNC(op_1e0_0), 0, 480 }, /* BSET */
-{ XCPUFUNC(op_1e8_0), 0, 488 }, /* BSET */
-{ XCPUFUNC(op_1f0_0), 0, 496 }, /* BSET */
-{ XCPUFUNC(op_1f8_0), 0, 504 }, /* BSET */
-{ XCPUFUNC(op_1f9_0), 0, 505 }, /* BSET */
-{ XCPUFUNC(op_1fa_0), 0, 506 }, /* BSET */
-{ XCPUFUNC(op_1fb_0), 0, 507 }, /* BSET */
-{ XCPUFUNC(op_200_0), 0, 512 }, /* AND */
-{ XCPUFUNC(op_210_0), 0, 528 }, /* AND */
-{ XCPUFUNC(op_218_0), 0, 536 }, /* AND */
-{ XCPUFUNC(op_220_0), 0, 544 }, /* AND */
-{ XCPUFUNC(op_228_0), 0, 552 }, /* AND */
-{ XCPUFUNC(op_230_0), 0, 560 }, /* AND */
-{ XCPUFUNC(op_238_0), 0, 568 }, /* AND */
-{ XCPUFUNC(op_239_0), 0, 569 }, /* AND */
-{ XCPUFUNC(op_23c_0), 0, 572 }, /* ANDSR */
-{ XCPUFUNC(op_240_0), 0, 576 }, /* AND */
-{ XCPUFUNC(op_250_0), 0, 592 }, /* AND */
-{ XCPUFUNC(op_258_0), 0, 600 }, /* AND */
-{ XCPUFUNC(op_260_0), 0, 608 }, /* AND */
-{ XCPUFUNC(op_268_0), 0, 616 }, /* AND */
-{ XCPUFUNC(op_270_0), 0, 624 }, /* AND */
-{ XCPUFUNC(op_278_0), 0, 632 }, /* AND */
-{ XCPUFUNC(op_279_0), 0, 633 }, /* AND */
-{ XCPUFUNC(op_27c_0), 0, 636 }, /* ANDSR */
-{ XCPUFUNC(op_280_0), 0, 640 }, /* AND */
-{ XCPUFUNC(op_290_0), 0, 656 }, /* AND */
-{ XCPUFUNC(op_298_0), 0, 664 }, /* AND */
-{ XCPUFUNC(op_2a0_0), 0, 672 }, /* AND */
-{ XCPUFUNC(op_2a8_0), 0, 680 }, /* AND */
-{ XCPUFUNC(op_2b0_0), 0, 688 }, /* AND */
-{ XCPUFUNC(op_2b8_0), 0, 696 }, /* AND */
-{ XCPUFUNC(op_2b9_0), 0, 697 }, /* AND */
-{ XCPUFUNC(op_2d0_0), 0, 720 }, /* CHK2 */
-{ XCPUFUNC(op_2e8_0), 0, 744 }, /* CHK2 */
-{ XCPUFUNC(op_2f0_0), 0, 752 }, /* CHK2 */
-{ XCPUFUNC(op_2f8_0), 0, 760 }, /* CHK2 */
-{ XCPUFUNC(op_2f9_0), 0, 761 }, /* CHK2 */
-{ XCPUFUNC(op_2fa_0), 0, 762 }, /* CHK2 */
-{ XCPUFUNC(op_2fb_0), 0, 763 }, /* CHK2 */
-{ XCPUFUNC(op_400_0), 0, 1024 }, /* SUB */
-{ XCPUFUNC(op_410_0), 0, 1040 }, /* SUB */
-{ XCPUFUNC(op_418_0), 0, 1048 }, /* SUB */
-{ XCPUFUNC(op_420_0), 0, 1056 }, /* SUB */
-{ XCPUFUNC(op_428_0), 0, 1064 }, /* SUB */
-{ XCPUFUNC(op_430_0), 0, 1072 }, /* SUB */
-{ XCPUFUNC(op_438_0), 0, 1080 }, /* SUB */
-{ XCPUFUNC(op_439_0), 0, 1081 }, /* SUB */
-{ XCPUFUNC(op_440_0), 0, 1088 }, /* SUB */
-{ XCPUFUNC(op_450_0), 0, 1104 }, /* SUB */
-{ XCPUFUNC(op_458_0), 0, 1112 }, /* SUB */
-{ XCPUFUNC(op_460_0), 0, 1120 }, /* SUB */
-{ XCPUFUNC(op_468_0), 0, 1128 }, /* SUB */
-{ XCPUFUNC(op_470_0), 0, 1136 }, /* SUB */
-{ XCPUFUNC(op_478_0), 0, 1144 }, /* SUB */
-{ XCPUFUNC(op_479_0), 0, 1145 }, /* SUB */
-{ XCPUFUNC(op_480_0), 0, 1152 }, /* SUB */
-{ XCPUFUNC(op_490_0), 0, 1168 }, /* SUB */
-{ XCPUFUNC(op_498_0), 0, 1176 }, /* SUB */
-{ XCPUFUNC(op_4a0_0), 0, 1184 }, /* SUB */
-{ XCPUFUNC(op_4a8_0), 0, 1192 }, /* SUB */
-{ XCPUFUNC(op_4b0_0), 0, 1200 }, /* SUB */
-{ XCPUFUNC(op_4b8_0), 0, 1208 }, /* SUB */
-{ XCPUFUNC(op_4b9_0), 0, 1209 }, /* SUB */
-{ XCPUFUNC(op_4d0_0), 0, 1232 }, /* CHK2 */
-{ XCPUFUNC(op_4e8_0), 0, 1256 }, /* CHK2 */
-{ XCPUFUNC(op_4f0_0), 0, 1264 }, /* CHK2 */
-{ XCPUFUNC(op_4f8_0), 0, 1272 }, /* CHK2 */
-{ XCPUFUNC(op_4f9_0), 0, 1273 }, /* CHK2 */
-{ XCPUFUNC(op_4fa_0), 0, 1274 }, /* CHK2 */
-{ XCPUFUNC(op_4fb_0), 0, 1275 }, /* CHK2 */
-{ XCPUFUNC(op_600_0), 0, 1536 }, /* ADD */
-{ XCPUFUNC(op_610_0), 0, 1552 }, /* ADD */
-{ XCPUFUNC(op_618_0), 0, 1560 }, /* ADD */
-{ XCPUFUNC(op_620_0), 0, 1568 }, /* ADD */
-{ XCPUFUNC(op_628_0), 0, 1576 }, /* ADD */
-{ XCPUFUNC(op_630_0), 0, 1584 }, /* ADD */
-{ XCPUFUNC(op_638_0), 0, 1592 }, /* ADD */
-{ XCPUFUNC(op_639_0), 0, 1593 }, /* ADD */
-{ XCPUFUNC(op_640_0), 0, 1600 }, /* ADD */
-{ XCPUFUNC(op_650_0), 0, 1616 }, /* ADD */
-{ XCPUFUNC(op_658_0), 0, 1624 }, /* ADD */
-{ XCPUFUNC(op_660_0), 0, 1632 }, /* ADD */
-{ XCPUFUNC(op_668_0), 0, 1640 }, /* ADD */
-{ XCPUFUNC(op_670_0), 0, 1648 }, /* ADD */
-{ XCPUFUNC(op_678_0), 0, 1656 }, /* ADD */
-{ XCPUFUNC(op_679_0), 0, 1657 }, /* ADD */
-{ XCPUFUNC(op_680_0), 0, 1664 }, /* ADD */
-{ XCPUFUNC(op_690_0), 0, 1680 }, /* ADD */
-{ XCPUFUNC(op_698_0), 0, 1688 }, /* ADD */
-{ XCPUFUNC(op_6a0_0), 0, 1696 }, /* ADD */
-{ XCPUFUNC(op_6a8_0), 0, 1704 }, /* ADD */
-{ XCPUFUNC(op_6b0_0), 0, 1712 }, /* ADD */
-{ XCPUFUNC(op_6b8_0), 0, 1720 }, /* ADD */
-{ XCPUFUNC(op_6b9_0), 0, 1721 }, /* ADD */
-{ XCPUFUNC(op_6c0_0), 0, 1728 }, /* RTM */
-{ XCPUFUNC(op_6c8_0), 0, 1736 }, /* RTM */
-{ XCPUFUNC(op_6d0_0), 0, 1744 }, /* CALLM */
-{ XCPUFUNC(op_6e8_0), 0, 1768 }, /* CALLM */
-{ XCPUFUNC(op_6f0_0), 0, 1776 }, /* CALLM */
-{ XCPUFUNC(op_6f8_0), 0, 1784 }, /* CALLM */
-{ XCPUFUNC(op_6f9_0), 0, 1785 }, /* CALLM */
-{ XCPUFUNC(op_6fa_0), 0, 1786 }, /* CALLM */
-{ XCPUFUNC(op_6fb_0), 0, 1787 }, /* CALLM */
-{ XCPUFUNC(op_800_0), 0, 2048 }, /* BTST */
-{ XCPUFUNC(op_810_0), 0, 2064 }, /* BTST */
-{ XCPUFUNC(op_818_0), 0, 2072 }, /* BTST */
-{ XCPUFUNC(op_820_0), 0, 2080 }, /* BTST */
-{ XCPUFUNC(op_828_0), 0, 2088 }, /* BTST */
-{ XCPUFUNC(op_830_0), 0, 2096 }, /* BTST */
-{ XCPUFUNC(op_838_0), 0, 2104 }, /* BTST */
-{ XCPUFUNC(op_839_0), 0, 2105 }, /* BTST */
-{ XCPUFUNC(op_83a_0), 0, 2106 }, /* BTST */
-{ XCPUFUNC(op_83b_0), 0, 2107 }, /* BTST */
-{ XCPUFUNC(op_83c_0), 0, 2108 }, /* BTST */
-{ XCPUFUNC(op_840_0), 0, 2112 }, /* BCHG */
-{ XCPUFUNC(op_850_0), 0, 2128 }, /* BCHG */
-{ XCPUFUNC(op_858_0), 0, 2136 }, /* BCHG */
-{ XCPUFUNC(op_860_0), 0, 2144 }, /* BCHG */
-{ XCPUFUNC(op_868_0), 0, 2152 }, /* BCHG */
-{ XCPUFUNC(op_870_0), 0, 2160 }, /* BCHG */
-{ XCPUFUNC(op_878_0), 0, 2168 }, /* BCHG */
-{ XCPUFUNC(op_879_0), 0, 2169 }, /* BCHG */
-{ XCPUFUNC(op_87a_0), 0, 2170 }, /* BCHG */
-{ XCPUFUNC(op_87b_0), 0, 2171 }, /* BCHG */
-{ XCPUFUNC(op_880_0), 0, 2176 }, /* BCLR */
-{ XCPUFUNC(op_890_0), 0, 2192 }, /* BCLR */
-{ XCPUFUNC(op_898_0), 0, 2200 }, /* BCLR */
-{ XCPUFUNC(op_8a0_0), 0, 2208 }, /* BCLR */
-{ XCPUFUNC(op_8a8_0), 0, 2216 }, /* BCLR */
-{ XCPUFUNC(op_8b0_0), 0, 2224 }, /* BCLR */
-{ XCPUFUNC(op_8b8_0), 0, 2232 }, /* BCLR */
-{ XCPUFUNC(op_8b9_0), 0, 2233 }, /* BCLR */
-{ XCPUFUNC(op_8ba_0), 0, 2234 }, /* BCLR */
-{ XCPUFUNC(op_8bb_0), 0, 2235 }, /* BCLR */
-{ XCPUFUNC(op_8c0_0), 0, 2240 }, /* BSET */
-{ XCPUFUNC(op_8d0_0), 0, 2256 }, /* BSET */
-{ XCPUFUNC(op_8d8_0), 0, 2264 }, /* BSET */
-{ XCPUFUNC(op_8e0_0), 0, 2272 }, /* BSET */
-{ XCPUFUNC(op_8e8_0), 0, 2280 }, /* BSET */
-{ XCPUFUNC(op_8f0_0), 0, 2288 }, /* BSET */
-{ XCPUFUNC(op_8f8_0), 0, 2296 }, /* BSET */
-{ XCPUFUNC(op_8f9_0), 0, 2297 }, /* BSET */
-{ XCPUFUNC(op_8fa_0), 0, 2298 }, /* BSET */
-{ XCPUFUNC(op_8fb_0), 0, 2299 }, /* BSET */
-{ XCPUFUNC(op_a00_0), 0, 2560 }, /* EOR */
-{ XCPUFUNC(op_a10_0), 0, 2576 }, /* EOR */
-{ XCPUFUNC(op_a18_0), 0, 2584 }, /* EOR */
-{ XCPUFUNC(op_a20_0), 0, 2592 }, /* EOR */
-{ XCPUFUNC(op_a28_0), 0, 2600 }, /* EOR */
-{ XCPUFUNC(op_a30_0), 0, 2608 }, /* EOR */
-{ XCPUFUNC(op_a38_0), 0, 2616 }, /* EOR */
-{ XCPUFUNC(op_a39_0), 0, 2617 }, /* EOR */
-{ XCPUFUNC(op_a3c_0), 0, 2620 }, /* EORSR */
-{ XCPUFUNC(op_a40_0), 0, 2624 }, /* EOR */
-{ XCPUFUNC(op_a50_0), 0, 2640 }, /* EOR */
-{ XCPUFUNC(op_a58_0), 0, 2648 }, /* EOR */
-{ XCPUFUNC(op_a60_0), 0, 2656 }, /* EOR */
-{ XCPUFUNC(op_a68_0), 0, 2664 }, /* EOR */
-{ XCPUFUNC(op_a70_0), 0, 2672 }, /* EOR */
-{ XCPUFUNC(op_a78_0), 0, 2680 }, /* EOR */
-{ XCPUFUNC(op_a79_0), 0, 2681 }, /* EOR */
-{ XCPUFUNC(op_a7c_0), 0, 2684 }, /* EORSR */
-{ XCPUFUNC(op_a80_0), 0, 2688 }, /* EOR */
-{ XCPUFUNC(op_a90_0), 0, 2704 }, /* EOR */
-{ XCPUFUNC(op_a98_0), 0, 2712 }, /* EOR */
-{ XCPUFUNC(op_aa0_0), 0, 2720 }, /* EOR */
-{ XCPUFUNC(op_aa8_0), 0, 2728 }, /* EOR */
-{ XCPUFUNC(op_ab0_0), 0, 2736 }, /* EOR */
-{ XCPUFUNC(op_ab8_0), 0, 2744 }, /* EOR */
-{ XCPUFUNC(op_ab9_0), 0, 2745 }, /* EOR */
-{ XCPUFUNC(op_ad0_0), 0, 2768 }, /* CAS */
-{ XCPUFUNC(op_ad8_0), 0, 2776 }, /* CAS */
-{ XCPUFUNC(op_ae0_0), 0, 2784 }, /* CAS */
-{ XCPUFUNC(op_ae8_0), 0, 2792 }, /* CAS */
-{ XCPUFUNC(op_af0_0), 0, 2800 }, /* CAS */
-{ XCPUFUNC(op_af8_0), 0, 2808 }, /* CAS */
-{ XCPUFUNC(op_af9_0), 0, 2809 }, /* CAS */
-{ XCPUFUNC(op_c00_0), 0, 3072 }, /* CMP */
-{ XCPUFUNC(op_c10_0), 0, 3088 }, /* CMP */
-{ XCPUFUNC(op_c18_0), 0, 3096 }, /* CMP */
-{ XCPUFUNC(op_c20_0), 0, 3104 }, /* CMP */
-{ XCPUFUNC(op_c28_0), 0, 3112 }, /* CMP */
-{ XCPUFUNC(op_c30_0), 0, 3120 }, /* CMP */
-{ XCPUFUNC(op_c38_0), 0, 3128 }, /* CMP */
-{ XCPUFUNC(op_c39_0), 0, 3129 }, /* CMP */
-{ XCPUFUNC(op_c3a_0), 0, 3130 }, /* CMP */
-{ XCPUFUNC(op_c3b_0), 0, 3131 }, /* CMP */
-{ XCPUFUNC(op_c40_0), 0, 3136 }, /* CMP */
-{ XCPUFUNC(op_c50_0), 0, 3152 }, /* CMP */
-{ XCPUFUNC(op_c58_0), 0, 3160 }, /* CMP */
-{ XCPUFUNC(op_c60_0), 0, 3168 }, /* CMP */
-{ XCPUFUNC(op_c68_0), 0, 3176 }, /* CMP */
-{ XCPUFUNC(op_c70_0), 0, 3184 }, /* CMP */
-{ XCPUFUNC(op_c78_0), 0, 3192 }, /* CMP */
-{ XCPUFUNC(op_c79_0), 0, 3193 }, /* CMP */
-{ XCPUFUNC(op_c7a_0), 0, 3194 }, /* CMP */
-{ XCPUFUNC(op_c7b_0), 0, 3195 }, /* CMP */
-{ XCPUFUNC(op_c80_0), 0, 3200 }, /* CMP */
-{ XCPUFUNC(op_c90_0), 0, 3216 }, /* CMP */
-{ XCPUFUNC(op_c98_0), 0, 3224 }, /* CMP */
-{ XCPUFUNC(op_ca0_0), 0, 3232 }, /* CMP */
-{ XCPUFUNC(op_ca8_0), 0, 3240 }, /* CMP */
-{ XCPUFUNC(op_cb0_0), 0, 3248 }, /* CMP */
-{ XCPUFUNC(op_cb8_0), 0, 3256 }, /* CMP */
-{ XCPUFUNC(op_cb9_0), 0, 3257 }, /* CMP */
-{ XCPUFUNC(op_cba_0), 0, 3258 }, /* CMP */
-{ XCPUFUNC(op_cbb_0), 0, 3259 }, /* CMP */
-{ XCPUFUNC(op_cd0_0), 0, 3280 }, /* CAS */
-{ XCPUFUNC(op_cd8_0), 0, 3288 }, /* CAS */
-{ XCPUFUNC(op_ce0_0), 0, 3296 }, /* CAS */
-{ XCPUFUNC(op_ce8_0), 0, 3304 }, /* CAS */
-{ XCPUFUNC(op_cf0_0), 0, 3312 }, /* CAS */
-{ XCPUFUNC(op_cf8_0), 0, 3320 }, /* CAS */
-{ XCPUFUNC(op_cf9_0), 0, 3321 }, /* CAS */
-{ XCPUFUNC(op_cfc_0), 0, 3324 }, /* CAS2 */
-{ XCPUFUNC(op_e10_0), 0, 3600 }, /* MOVES */
-{ XCPUFUNC(op_e18_0), 0, 3608 }, /* MOVES */
-{ XCPUFUNC(op_e20_0), 0, 3616 }, /* MOVES */
-{ XCPUFUNC(op_e28_0), 0, 3624 }, /* MOVES */
-{ XCPUFUNC(op_e30_0), 0, 3632 }, /* MOVES */
-{ XCPUFUNC(op_e38_0), 0, 3640 }, /* MOVES */
-{ XCPUFUNC(op_e39_0), 0, 3641 }, /* MOVES */
-{ XCPUFUNC(op_e50_0), 0, 3664 }, /* MOVES */
-{ XCPUFUNC(op_e58_0), 0, 3672 }, /* MOVES */
-{ XCPUFUNC(op_e60_0), 0, 3680 }, /* MOVES */
-{ XCPUFUNC(op_e68_0), 0, 3688 }, /* MOVES */
-{ XCPUFUNC(op_e70_0), 0, 3696 }, /* MOVES */
-{ XCPUFUNC(op_e78_0), 0, 3704 }, /* MOVES */
-{ XCPUFUNC(op_e79_0), 0, 3705 }, /* MOVES */
-{ XCPUFUNC(op_e90_0), 0, 3728 }, /* MOVES */
-{ XCPUFUNC(op_e98_0), 0, 3736 }, /* MOVES */
-{ XCPUFUNC(op_ea0_0), 0, 3744 }, /* MOVES */
-{ XCPUFUNC(op_ea8_0), 0, 3752 }, /* MOVES */
-{ XCPUFUNC(op_eb0_0), 0, 3760 }, /* MOVES */
-{ XCPUFUNC(op_eb8_0), 0, 3768 }, /* MOVES */
-{ XCPUFUNC(op_eb9_0), 0, 3769 }, /* MOVES */
-{ XCPUFUNC(op_ed0_0), 0, 3792 }, /* CAS */
-{ XCPUFUNC(op_ed8_0), 0, 3800 }, /* CAS */
-{ XCPUFUNC(op_ee0_0), 0, 3808 }, /* CAS */
-{ XCPUFUNC(op_ee8_0), 0, 3816 }, /* CAS */
-{ XCPUFUNC(op_ef0_0), 0, 3824 }, /* CAS */
-{ XCPUFUNC(op_ef8_0), 0, 3832 }, /* CAS */
-{ XCPUFUNC(op_ef9_0), 0, 3833 }, /* CAS */
-{ XCPUFUNC(op_efc_0), 0, 3836 }, /* CAS2 */
-{ XCPUFUNC(op_1000_0), 0, 4096 }, /* MOVE */
-{ XCPUFUNC(op_1010_0), 0, 4112 }, /* MOVE */
-{ XCPUFUNC(op_1018_0), 0, 4120 }, /* MOVE */
-{ XCPUFUNC(op_1020_0), 0, 4128 }, /* MOVE */
-{ XCPUFUNC(op_1028_0), 0, 4136 }, /* MOVE */
-{ XCPUFUNC(op_1030_0), 0, 4144 }, /* MOVE */
-{ XCPUFUNC(op_1038_0), 0, 4152 }, /* MOVE */
-{ XCPUFUNC(op_1039_0), 0, 4153 }, /* MOVE */
-{ XCPUFUNC(op_103a_0), 0, 4154 }, /* MOVE */
-{ XCPUFUNC(op_103b_0), 0, 4155 }, /* MOVE */
-{ XCPUFUNC(op_103c_0), 0, 4156 }, /* MOVE */
-{ XCPUFUNC(op_1080_0), 0, 4224 }, /* MOVE */
-{ XCPUFUNC(op_1090_0), 0, 4240 }, /* MOVE */
-{ XCPUFUNC(op_1098_0), 0, 4248 }, /* MOVE */
-{ XCPUFUNC(op_10a0_0), 0, 4256 }, /* MOVE */
-{ XCPUFUNC(op_10a8_0), 0, 4264 }, /* MOVE */
-{ XCPUFUNC(op_10b0_0), 0, 4272 }, /* MOVE */
-{ XCPUFUNC(op_10b8_0), 0, 4280 }, /* MOVE */
-{ XCPUFUNC(op_10b9_0), 0, 4281 }, /* MOVE */
-{ XCPUFUNC(op_10ba_0), 0, 4282 }, /* MOVE */
-{ XCPUFUNC(op_10bb_0), 0, 4283 }, /* MOVE */
-{ XCPUFUNC(op_10bc_0), 0, 4284 }, /* MOVE */
-{ XCPUFUNC(op_10c0_0), 0, 4288 }, /* MOVE */
-{ XCPUFUNC(op_10d0_0), 0, 4304 }, /* MOVE */
-{ XCPUFUNC(op_10d8_0), 0, 4312 }, /* MOVE */
-{ XCPUFUNC(op_10e0_0), 0, 4320 }, /* MOVE */
-{ XCPUFUNC(op_10e8_0), 0, 4328 }, /* MOVE */
-{ XCPUFUNC(op_10f0_0), 0, 4336 }, /* MOVE */
-{ XCPUFUNC(op_10f8_0), 0, 4344 }, /* MOVE */
-{ XCPUFUNC(op_10f9_0), 0, 4345 }, /* MOVE */
-{ XCPUFUNC(op_10fa_0), 0, 4346 }, /* MOVE */
-{ XCPUFUNC(op_10fb_0), 0, 4347 }, /* MOVE */
-{ XCPUFUNC(op_10fc_0), 0, 4348 }, /* MOVE */
-{ XCPUFUNC(op_1100_0), 0, 4352 }, /* MOVE */
-{ XCPUFUNC(op_1110_0), 0, 4368 }, /* MOVE */
-{ XCPUFUNC(op_1118_0), 0, 4376 }, /* MOVE */
-{ XCPUFUNC(op_1120_0), 0, 4384 }, /* MOVE */
-{ XCPUFUNC(op_1128_0), 0, 4392 }, /* MOVE */
-{ XCPUFUNC(op_1130_0), 0, 4400 }, /* MOVE */
-{ XCPUFUNC(op_1138_0), 0, 4408 }, /* MOVE */
-{ XCPUFUNC(op_1139_0), 0, 4409 }, /* MOVE */
-{ XCPUFUNC(op_113a_0), 0, 4410 }, /* MOVE */
-{ XCPUFUNC(op_113b_0), 0, 4411 }, /* MOVE */
-{ XCPUFUNC(op_113c_0), 0, 4412 }, /* MOVE */
-{ XCPUFUNC(op_1140_0), 0, 4416 }, /* MOVE */
-{ XCPUFUNC(op_1150_0), 0, 4432 }, /* MOVE */
-{ XCPUFUNC(op_1158_0), 0, 4440 }, /* MOVE */
-{ XCPUFUNC(op_1160_0), 0, 4448 }, /* MOVE */
-{ XCPUFUNC(op_1168_0), 0, 4456 }, /* MOVE */
-{ XCPUFUNC(op_1170_0), 0, 4464 }, /* MOVE */
-{ XCPUFUNC(op_1178_0), 0, 4472 }, /* MOVE */
-{ XCPUFUNC(op_1179_0), 0, 4473 }, /* MOVE */
-{ XCPUFUNC(op_117a_0), 0, 4474 }, /* MOVE */
-{ XCPUFUNC(op_117b_0), 0, 4475 }, /* MOVE */
-{ XCPUFUNC(op_117c_0), 0, 4476 }, /* MOVE */
-{ XCPUFUNC(op_1180_0), 0, 4480 }, /* MOVE */
-{ XCPUFUNC(op_1190_0), 0, 4496 }, /* MOVE */
-{ XCPUFUNC(op_1198_0), 0, 4504 }, /* MOVE */
-{ XCPUFUNC(op_11a0_0), 0, 4512 }, /* MOVE */
-{ XCPUFUNC(op_11a8_0), 0, 4520 }, /* MOVE */
-{ XCPUFUNC(op_11b0_0), 0, 4528 }, /* MOVE */
-{ XCPUFUNC(op_11b8_0), 0, 4536 }, /* MOVE */
-{ XCPUFUNC(op_11b9_0), 0, 4537 }, /* MOVE */
-{ XCPUFUNC(op_11ba_0), 0, 4538 }, /* MOVE */
-{ XCPUFUNC(op_11bb_0), 0, 4539 }, /* MOVE */
-{ XCPUFUNC(op_11bc_0), 0, 4540 }, /* MOVE */
-{ XCPUFUNC(op_11c0_0), 0, 4544 }, /* MOVE */
-{ XCPUFUNC(op_11d0_0), 0, 4560 }, /* MOVE */
-{ XCPUFUNC(op_11d8_0), 0, 4568 }, /* MOVE */
-{ XCPUFUNC(op_11e0_0), 0, 4576 }, /* MOVE */
-{ XCPUFUNC(op_11e8_0), 0, 4584 }, /* MOVE */
-{ XCPUFUNC(op_11f0_0), 0, 4592 }, /* MOVE */
-{ XCPUFUNC(op_11f8_0), 0, 4600 }, /* MOVE */
-{ XCPUFUNC(op_11f9_0), 0, 4601 }, /* MOVE */
-{ XCPUFUNC(op_11fa_0), 0, 4602 }, /* MOVE */
-{ XCPUFUNC(op_11fb_0), 0, 4603 }, /* MOVE */
-{ XCPUFUNC(op_11fc_0), 0, 4604 }, /* MOVE */
-{ XCPUFUNC(op_13c0_0), 0, 5056 }, /* MOVE */
-{ XCPUFUNC(op_13d0_0), 0, 5072 }, /* MOVE */
-{ XCPUFUNC(op_13d8_0), 0, 5080 }, /* MOVE */
-{ XCPUFUNC(op_13e0_0), 0, 5088 }, /* MOVE */
-{ XCPUFUNC(op_13e8_0), 0, 5096 }, /* MOVE */
-{ XCPUFUNC(op_13f0_0), 0, 5104 }, /* MOVE */
-{ XCPUFUNC(op_13f8_0), 0, 5112 }, /* MOVE */
-{ XCPUFUNC(op_13f9_0), 0, 5113 }, /* MOVE */
-{ XCPUFUNC(op_13fa_0), 0, 5114 }, /* MOVE */
-{ XCPUFUNC(op_13fb_0), 0, 5115 }, /* MOVE */
-{ XCPUFUNC(op_13fc_0), 0, 5116 }, /* MOVE */
-{ XCPUFUNC(op_2000_0), 0, 8192 }, /* MOVE */
-{ XCPUFUNC(op_2008_0), 0, 8200 }, /* MOVE */
-{ XCPUFUNC(op_2010_0), 0, 8208 }, /* MOVE */
-{ XCPUFUNC(op_2018_0), 0, 8216 }, /* MOVE */
-{ XCPUFUNC(op_2020_0), 0, 8224 }, /* MOVE */
-{ XCPUFUNC(op_2028_0), 0, 8232 }, /* MOVE */
-{ XCPUFUNC(op_2030_0), 0, 8240 }, /* MOVE */
-{ XCPUFUNC(op_2038_0), 0, 8248 }, /* MOVE */
-{ XCPUFUNC(op_2039_0), 0, 8249 }, /* MOVE */
-{ XCPUFUNC(op_203a_0), 0, 8250 }, /* MOVE */
-{ XCPUFUNC(op_203b_0), 0, 8251 }, /* MOVE */
-{ XCPUFUNC(op_203c_0), 0, 8252 }, /* MOVE */
-{ XCPUFUNC(op_2040_0), 0, 8256 }, /* MOVEA */
-{ XCPUFUNC(op_2048_0), 0, 8264 }, /* MOVEA */
-{ XCPUFUNC(op_2050_0), 0, 8272 }, /* MOVEA */
-{ XCPUFUNC(op_2058_0), 0, 8280 }, /* MOVEA */
-{ XCPUFUNC(op_2060_0), 0, 8288 }, /* MOVEA */
-{ XCPUFUNC(op_2068_0), 0, 8296 }, /* MOVEA */
-{ XCPUFUNC(op_2070_0), 0, 8304 }, /* MOVEA */
-{ XCPUFUNC(op_2078_0), 0, 8312 }, /* MOVEA */
-{ XCPUFUNC(op_2079_0), 0, 8313 }, /* MOVEA */
-{ XCPUFUNC(op_207a_0), 0, 8314 }, /* MOVEA */
-{ XCPUFUNC(op_207b_0), 0, 8315 }, /* MOVEA */
-{ XCPUFUNC(op_207c_0), 0, 8316 }, /* MOVEA */
-{ XCPUFUNC(op_2080_0), 0, 8320 }, /* MOVE */
-{ XCPUFUNC(op_2088_0), 0, 8328 }, /* MOVE */
-{ XCPUFUNC(op_2090_0), 0, 8336 }, /* MOVE */
-{ XCPUFUNC(op_2098_0), 0, 8344 }, /* MOVE */
-{ XCPUFUNC(op_20a0_0), 0, 8352 }, /* MOVE */
-{ XCPUFUNC(op_20a8_0), 0, 8360 }, /* MOVE */
-{ XCPUFUNC(op_20b0_0), 0, 8368 }, /* MOVE */
-{ XCPUFUNC(op_20b8_0), 0, 8376 }, /* MOVE */
-{ XCPUFUNC(op_20b9_0), 0, 8377 }, /* MOVE */
-{ XCPUFUNC(op_20ba_0), 0, 8378 }, /* MOVE */
-{ XCPUFUNC(op_20bb_0), 0, 8379 }, /* MOVE */
-{ XCPUFUNC(op_20bc_0), 0, 8380 }, /* MOVE */
-{ XCPUFUNC(op_20c0_0), 0, 8384 }, /* MOVE */
-{ XCPUFUNC(op_20c8_0), 0, 8392 }, /* MOVE */
-{ XCPUFUNC(op_20d0_0), 0, 8400 }, /* MOVE */
-{ XCPUFUNC(op_20d8_0), 0, 8408 }, /* MOVE */
-{ XCPUFUNC(op_20e0_0), 0, 8416 }, /* MOVE */
-{ XCPUFUNC(op_20e8_0), 0, 8424 }, /* MOVE */
-{ XCPUFUNC(op_20f0_0), 0, 8432 }, /* MOVE */
-{ XCPUFUNC(op_20f8_0), 0, 8440 }, /* MOVE */
-{ XCPUFUNC(op_20f9_0), 0, 8441 }, /* MOVE */
-{ XCPUFUNC(op_20fa_0), 0, 8442 }, /* MOVE */
-{ XCPUFUNC(op_20fb_0), 0, 8443 }, /* MOVE */
-{ XCPUFUNC(op_20fc_0), 0, 8444 }, /* MOVE */
-{ XCPUFUNC(op_2100_0), 0, 8448 }, /* MOVE */
-{ XCPUFUNC(op_2108_0), 0, 8456 }, /* MOVE */
-{ XCPUFUNC(op_2110_0), 0, 8464 }, /* MOVE */
-{ XCPUFUNC(op_2118_0), 0, 8472 }, /* MOVE */
-{ XCPUFUNC(op_2120_0), 0, 8480 }, /* MOVE */
-{ XCPUFUNC(op_2128_0), 0, 8488 }, /* MOVE */
-{ XCPUFUNC(op_2130_0), 0, 8496 }, /* MOVE */
-{ XCPUFUNC(op_2138_0), 0, 8504 }, /* MOVE */
-{ XCPUFUNC(op_2139_0), 0, 8505 }, /* MOVE */
-{ XCPUFUNC(op_213a_0), 0, 8506 }, /* MOVE */
-{ XCPUFUNC(op_213b_0), 0, 8507 }, /* MOVE */
-{ XCPUFUNC(op_213c_0), 0, 8508 }, /* MOVE */
-{ XCPUFUNC(op_2140_0), 0, 8512 }, /* MOVE */
-{ XCPUFUNC(op_2148_0), 0, 8520 }, /* MOVE */
-{ XCPUFUNC(op_2150_0), 0, 8528 }, /* MOVE */
-{ XCPUFUNC(op_2158_0), 0, 8536 }, /* MOVE */
-{ XCPUFUNC(op_2160_0), 0, 8544 }, /* MOVE */
-{ XCPUFUNC(op_2168_0), 0, 8552 }, /* MOVE */
-{ XCPUFUNC(op_2170_0), 0, 8560 }, /* MOVE */
-{ XCPUFUNC(op_2178_0), 0, 8568 }, /* MOVE */
-{ XCPUFUNC(op_2179_0), 0, 8569 }, /* MOVE */
-{ XCPUFUNC(op_217a_0), 0, 8570 }, /* MOVE */
-{ XCPUFUNC(op_217b_0), 0, 8571 }, /* MOVE */
-{ XCPUFUNC(op_217c_0), 0, 8572 }, /* MOVE */
-{ XCPUFUNC(op_2180_0), 0, 8576 }, /* MOVE */
-{ XCPUFUNC(op_2188_0), 0, 8584 }, /* MOVE */
-{ XCPUFUNC(op_2190_0), 0, 8592 }, /* MOVE */
-{ XCPUFUNC(op_2198_0), 0, 8600 }, /* MOVE */
-{ XCPUFUNC(op_21a0_0), 0, 8608 }, /* MOVE */
-{ XCPUFUNC(op_21a8_0), 0, 8616 }, /* MOVE */
-{ XCPUFUNC(op_21b0_0), 0, 8624 }, /* MOVE */
-{ XCPUFUNC(op_21b8_0), 0, 8632 }, /* MOVE */
-{ XCPUFUNC(op_21b9_0), 0, 8633 }, /* MOVE */
-{ XCPUFUNC(op_21ba_0), 0, 8634 }, /* MOVE */
-{ XCPUFUNC(op_21bb_0), 0, 8635 }, /* MOVE */
-{ XCPUFUNC(op_21bc_0), 0, 8636 }, /* MOVE */
-{ XCPUFUNC(op_21c0_0), 0, 8640 }, /* MOVE */
-{ XCPUFUNC(op_21c8_0), 0, 8648 }, /* MOVE */
-{ XCPUFUNC(op_21d0_0), 0, 8656 }, /* MOVE */
-{ XCPUFUNC(op_21d8_0), 0, 8664 }, /* MOVE */
-{ XCPUFUNC(op_21e0_0), 0, 8672 }, /* MOVE */
-{ XCPUFUNC(op_21e8_0), 0, 8680 }, /* MOVE */
-{ XCPUFUNC(op_21f0_0), 0, 8688 }, /* MOVE */
-{ XCPUFUNC(op_21f8_0), 0, 8696 }, /* MOVE */
-{ XCPUFUNC(op_21f9_0), 0, 8697 }, /* MOVE */
-{ XCPUFUNC(op_21fa_0), 0, 8698 }, /* MOVE */
-{ XCPUFUNC(op_21fb_0), 0, 8699 }, /* MOVE */
-{ XCPUFUNC(op_21fc_0), 0, 8700 }, /* MOVE */
-{ XCPUFUNC(op_23c0_0), 0, 9152 }, /* MOVE */
-{ XCPUFUNC(op_23c8_0), 0, 9160 }, /* MOVE */
-{ XCPUFUNC(op_23d0_0), 0, 9168 }, /* MOVE */
-{ XCPUFUNC(op_23d8_0), 0, 9176 }, /* MOVE */
-{ XCPUFUNC(op_23e0_0), 0, 9184 }, /* MOVE */
-{ XCPUFUNC(op_23e8_0), 0, 9192 }, /* MOVE */
-{ XCPUFUNC(op_23f0_0), 0, 9200 }, /* MOVE */
-{ XCPUFUNC(op_23f8_0), 0, 9208 }, /* MOVE */
-{ XCPUFUNC(op_23f9_0), 0, 9209 }, /* MOVE */
-{ XCPUFUNC(op_23fa_0), 0, 9210 }, /* MOVE */
-{ XCPUFUNC(op_23fb_0), 0, 9211 }, /* MOVE */
-{ XCPUFUNC(op_23fc_0), 0, 9212 }, /* MOVE */
-{ XCPUFUNC(op_3000_0), 0, 12288 }, /* MOVE */
-{ XCPUFUNC(op_3008_0), 0, 12296 }, /* MOVE */
-{ XCPUFUNC(op_3010_0), 0, 12304 }, /* MOVE */
-{ XCPUFUNC(op_3018_0), 0, 12312 }, /* MOVE */
-{ XCPUFUNC(op_3020_0), 0, 12320 }, /* MOVE */
-{ XCPUFUNC(op_3028_0), 0, 12328 }, /* MOVE */
-{ XCPUFUNC(op_3030_0), 0, 12336 }, /* MOVE */
-{ XCPUFUNC(op_3038_0), 0, 12344 }, /* MOVE */
-{ XCPUFUNC(op_3039_0), 0, 12345 }, /* MOVE */
-{ XCPUFUNC(op_303a_0), 0, 12346 }, /* MOVE */
-{ XCPUFUNC(op_303b_0), 0, 12347 }, /* MOVE */
-{ XCPUFUNC(op_303c_0), 0, 12348 }, /* MOVE */
-{ XCPUFUNC(op_3040_0), 0, 12352 }, /* MOVEA */
-{ XCPUFUNC(op_3048_0), 0, 12360 }, /* MOVEA */
-{ XCPUFUNC(op_3050_0), 0, 12368 }, /* MOVEA */
-{ XCPUFUNC(op_3058_0), 0, 12376 }, /* MOVEA */
-{ XCPUFUNC(op_3060_0), 0, 12384 }, /* MOVEA */
-{ XCPUFUNC(op_3068_0), 0, 12392 }, /* MOVEA */
-{ XCPUFUNC(op_3070_0), 0, 12400 }, /* MOVEA */
-{ XCPUFUNC(op_3078_0), 0, 12408 }, /* MOVEA */
-{ XCPUFUNC(op_3079_0), 0, 12409 }, /* MOVEA */
-{ XCPUFUNC(op_307a_0), 0, 12410 }, /* MOVEA */
-{ XCPUFUNC(op_307b_0), 0, 12411 }, /* MOVEA */
-{ XCPUFUNC(op_307c_0), 0, 12412 }, /* MOVEA */
-{ XCPUFUNC(op_3080_0), 0, 12416 }, /* MOVE */
-{ XCPUFUNC(op_3088_0), 0, 12424 }, /* MOVE */
-{ XCPUFUNC(op_3090_0), 0, 12432 }, /* MOVE */
-{ XCPUFUNC(op_3098_0), 0, 12440 }, /* MOVE */
-{ XCPUFUNC(op_30a0_0), 0, 12448 }, /* MOVE */
-{ XCPUFUNC(op_30a8_0), 0, 12456 }, /* MOVE */
-{ XCPUFUNC(op_30b0_0), 0, 12464 }, /* MOVE */
-{ XCPUFUNC(op_30b8_0), 0, 12472 }, /* MOVE */
-{ XCPUFUNC(op_30b9_0), 0, 12473 }, /* MOVE */
-{ XCPUFUNC(op_30ba_0), 0, 12474 }, /* MOVE */
-{ XCPUFUNC(op_30bb_0), 0, 12475 }, /* MOVE */
-{ XCPUFUNC(op_30bc_0), 0, 12476 }, /* MOVE */
-{ XCPUFUNC(op_30c0_0), 0, 12480 }, /* MOVE */
-{ XCPUFUNC(op_30c8_0), 0, 12488 }, /* MOVE */
-{ XCPUFUNC(op_30d0_0), 0, 12496 }, /* MOVE */
-{ XCPUFUNC(op_30d8_0), 0, 12504 }, /* MOVE */
-{ XCPUFUNC(op_30e0_0), 0, 12512 }, /* MOVE */
-{ XCPUFUNC(op_30e8_0), 0, 12520 }, /* MOVE */
-{ XCPUFUNC(op_30f0_0), 0, 12528 }, /* MOVE */
-{ XCPUFUNC(op_30f8_0), 0, 12536 }, /* MOVE */
-{ XCPUFUNC(op_30f9_0), 0, 12537 }, /* MOVE */
-{ XCPUFUNC(op_30fa_0), 0, 12538 }, /* MOVE */
-{ XCPUFUNC(op_30fb_0), 0, 12539 }, /* MOVE */
-{ XCPUFUNC(op_30fc_0), 0, 12540 }, /* MOVE */
-{ XCPUFUNC(op_3100_0), 0, 12544 }, /* MOVE */
-{ XCPUFUNC(op_3108_0), 0, 12552 }, /* MOVE */
-{ XCPUFUNC(op_3110_0), 0, 12560 }, /* MOVE */
-{ XCPUFUNC(op_3118_0), 0, 12568 }, /* MOVE */
-{ XCPUFUNC(op_3120_0), 0, 12576 }, /* MOVE */
-{ XCPUFUNC(op_3128_0), 0, 12584 }, /* MOVE */
-{ XCPUFUNC(op_3130_0), 0, 12592 }, /* MOVE */
-{ XCPUFUNC(op_3138_0), 0, 12600 }, /* MOVE */
-{ XCPUFUNC(op_3139_0), 0, 12601 }, /* MOVE */
-{ XCPUFUNC(op_313a_0), 0, 12602 }, /* MOVE */
-{ XCPUFUNC(op_313b_0), 0, 12603 }, /* MOVE */
-{ XCPUFUNC(op_313c_0), 0, 12604 }, /* MOVE */
-{ XCPUFUNC(op_3140_0), 0, 12608 }, /* MOVE */
-{ XCPUFUNC(op_3148_0), 0, 12616 }, /* MOVE */
-{ XCPUFUNC(op_3150_0), 0, 12624 }, /* MOVE */
-{ XCPUFUNC(op_3158_0), 0, 12632 }, /* MOVE */
-{ XCPUFUNC(op_3160_0), 0, 12640 }, /* MOVE */
-{ XCPUFUNC(op_3168_0), 0, 12648 }, /* MOVE */
-{ XCPUFUNC(op_3170_0), 0, 12656 }, /* MOVE */
-{ XCPUFUNC(op_3178_0), 0, 12664 }, /* MOVE */
-{ XCPUFUNC(op_3179_0), 0, 12665 }, /* MOVE */
-{ XCPUFUNC(op_317a_0), 0, 12666 }, /* MOVE */
-{ XCPUFUNC(op_317b_0), 0, 12667 }, /* MOVE */
-{ XCPUFUNC(op_317c_0), 0, 12668 }, /* MOVE */
-{ XCPUFUNC(op_3180_0), 0, 12672 }, /* MOVE */
-{ XCPUFUNC(op_3188_0), 0, 12680 }, /* MOVE */
-{ XCPUFUNC(op_3190_0), 0, 12688 }, /* MOVE */
-{ XCPUFUNC(op_3198_0), 0, 12696 }, /* MOVE */
-{ XCPUFUNC(op_31a0_0), 0, 12704 }, /* MOVE */
-{ XCPUFUNC(op_31a8_0), 0, 12712 }, /* MOVE */
-{ XCPUFUNC(op_31b0_0), 0, 12720 }, /* MOVE */
-{ XCPUFUNC(op_31b8_0), 0, 12728 }, /* MOVE */
-{ XCPUFUNC(op_31b9_0), 0, 12729 }, /* MOVE */
-{ XCPUFUNC(op_31ba_0), 0, 12730 }, /* MOVE */
-{ XCPUFUNC(op_31bb_0), 0, 12731 }, /* MOVE */
-{ XCPUFUNC(op_31bc_0), 0, 12732 }, /* MOVE */
-{ XCPUFUNC(op_31c0_0), 0, 12736 }, /* MOVE */
-{ XCPUFUNC(op_31c8_0), 0, 12744 }, /* MOVE */
-{ XCPUFUNC(op_31d0_0), 0, 12752 }, /* MOVE */
-{ XCPUFUNC(op_31d8_0), 0, 12760 }, /* MOVE */
-{ XCPUFUNC(op_31e0_0), 0, 12768 }, /* MOVE */
-{ XCPUFUNC(op_31e8_0), 0, 12776 }, /* MOVE */
-{ XCPUFUNC(op_31f0_0), 0, 12784 }, /* MOVE */
-{ XCPUFUNC(op_31f8_0), 0, 12792 }, /* MOVE */
-{ XCPUFUNC(op_31f9_0), 0, 12793 }, /* MOVE */
-{ XCPUFUNC(op_31fa_0), 0, 12794 }, /* MOVE */
-{ XCPUFUNC(op_31fb_0), 0, 12795 }, /* MOVE */
-{ XCPUFUNC(op_31fc_0), 0, 12796 }, /* MOVE */
-{ XCPUFUNC(op_33c0_0), 0, 13248 }, /* MOVE */
-{ XCPUFUNC(op_33c8_0), 0, 13256 }, /* MOVE */
-{ XCPUFUNC(op_33d0_0), 0, 13264 }, /* MOVE */
-{ XCPUFUNC(op_33d8_0), 0, 13272 }, /* MOVE */
-{ XCPUFUNC(op_33e0_0), 0, 13280 }, /* MOVE */
-{ XCPUFUNC(op_33e8_0), 0, 13288 }, /* MOVE */
-{ XCPUFUNC(op_33f0_0), 0, 13296 }, /* MOVE */
-{ XCPUFUNC(op_33f8_0), 0, 13304 }, /* MOVE */
-{ XCPUFUNC(op_33f9_0), 0, 13305 }, /* MOVE */
-{ XCPUFUNC(op_33fa_0), 0, 13306 }, /* MOVE */
-{ XCPUFUNC(op_33fb_0), 0, 13307 }, /* MOVE */
-{ XCPUFUNC(op_33fc_0), 0, 13308 }, /* MOVE */
-{ XCPUFUNC(op_4000_0), 0, 16384 }, /* NEGX */
-{ XCPUFUNC(op_4010_0), 0, 16400 }, /* NEGX */
-{ XCPUFUNC(op_4018_0), 0, 16408 }, /* NEGX */
-{ XCPUFUNC(op_4020_0), 0, 16416 }, /* NEGX */
-{ XCPUFUNC(op_4028_0), 0, 16424 }, /* NEGX */
-{ XCPUFUNC(op_4030_0), 0, 16432 }, /* NEGX */
-{ XCPUFUNC(op_4038_0), 0, 16440 }, /* NEGX */
-{ XCPUFUNC(op_4039_0), 0, 16441 }, /* NEGX */
-{ XCPUFUNC(op_4040_0), 0, 16448 }, /* NEGX */
-{ XCPUFUNC(op_4050_0), 0, 16464 }, /* NEGX */
-{ XCPUFUNC(op_4058_0), 0, 16472 }, /* NEGX */
-{ XCPUFUNC(op_4060_0), 0, 16480 }, /* NEGX */
-{ XCPUFUNC(op_4068_0), 0, 16488 }, /* NEGX */
-{ XCPUFUNC(op_4070_0), 0, 16496 }, /* NEGX */
-{ XCPUFUNC(op_4078_0), 0, 16504 }, /* NEGX */
-{ XCPUFUNC(op_4079_0), 0, 16505 }, /* NEGX */
-{ XCPUFUNC(op_4080_0), 0, 16512 }, /* NEGX */
-{ XCPUFUNC(op_4090_0), 0, 16528 }, /* NEGX */
-{ XCPUFUNC(op_4098_0), 0, 16536 }, /* NEGX */
-{ XCPUFUNC(op_40a0_0), 0, 16544 }, /* NEGX */
-{ XCPUFUNC(op_40a8_0), 0, 16552 }, /* NEGX */
-{ XCPUFUNC(op_40b0_0), 0, 16560 }, /* NEGX */
-{ XCPUFUNC(op_40b8_0), 0, 16568 }, /* NEGX */
-{ XCPUFUNC(op_40b9_0), 0, 16569 }, /* NEGX */
-{ XCPUFUNC(op_40c0_0), 0, 16576 }, /* MVSR2 */
-{ XCPUFUNC(op_40d0_0), 0, 16592 }, /* MVSR2 */
-{ XCPUFUNC(op_40d8_0), 0, 16600 }, /* MVSR2 */
-{ XCPUFUNC(op_40e0_0), 0, 16608 }, /* MVSR2 */
-{ XCPUFUNC(op_40e8_0), 0, 16616 }, /* MVSR2 */
-{ XCPUFUNC(op_40f0_0), 0, 16624 }, /* MVSR2 */
-{ XCPUFUNC(op_40f8_0), 0, 16632 }, /* MVSR2 */
-{ XCPUFUNC(op_40f9_0), 0, 16633 }, /* MVSR2 */
-{ XCPUFUNC(op_4100_0), 0, 16640 }, /* CHK */
-{ XCPUFUNC(op_4110_0), 0, 16656 }, /* CHK */
-{ XCPUFUNC(op_4118_0), 0, 16664 }, /* CHK */
-{ XCPUFUNC(op_4120_0), 0, 16672 }, /* CHK */
-{ XCPUFUNC(op_4128_0), 0, 16680 }, /* CHK */
-{ XCPUFUNC(op_4130_0), 0, 16688 }, /* CHK */
-{ XCPUFUNC(op_4138_0), 0, 16696 }, /* CHK */
-{ XCPUFUNC(op_4139_0), 0, 16697 }, /* CHK */
-{ XCPUFUNC(op_413a_0), 0, 16698 }, /* CHK */
-{ XCPUFUNC(op_413b_0), 0, 16699 }, /* CHK */
-{ XCPUFUNC(op_413c_0), 0, 16700 }, /* CHK */
-{ XCPUFUNC(op_4180_0), 0, 16768 }, /* CHK */
-{ XCPUFUNC(op_4190_0), 0, 16784 }, /* CHK */
-{ XCPUFUNC(op_4198_0), 0, 16792 }, /* CHK */
-{ XCPUFUNC(op_41a0_0), 0, 16800 }, /* CHK */
-{ XCPUFUNC(op_41a8_0), 0, 16808 }, /* CHK */
-{ XCPUFUNC(op_41b0_0), 0, 16816 }, /* CHK */
-{ XCPUFUNC(op_41b8_0), 0, 16824 }, /* CHK */
-{ XCPUFUNC(op_41b9_0), 0, 16825 }, /* CHK */
-{ XCPUFUNC(op_41ba_0), 0, 16826 }, /* CHK */
-{ XCPUFUNC(op_41bb_0), 0, 16827 }, /* CHK */
-{ XCPUFUNC(op_41bc_0), 0, 16828 }, /* CHK */
-{ XCPUFUNC(op_41d0_0), 0, 16848 }, /* LEA */
-{ XCPUFUNC(op_41e8_0), 0, 16872 }, /* LEA */
-{ XCPUFUNC(op_41f0_0), 0, 16880 }, /* LEA */
-{ XCPUFUNC(op_41f8_0), 0, 16888 }, /* LEA */
-{ XCPUFUNC(op_41f9_0), 0, 16889 }, /* LEA */
-{ XCPUFUNC(op_41fa_0), 0, 16890 }, /* LEA */
-{ XCPUFUNC(op_41fb_0), 0, 16891 }, /* LEA */
-{ XCPUFUNC(op_4200_0), 0, 16896 }, /* CLR */
-{ XCPUFUNC(op_4210_0), 0, 16912 }, /* CLR */
-{ XCPUFUNC(op_4218_0), 0, 16920 }, /* CLR */
-{ XCPUFUNC(op_4220_0), 0, 16928 }, /* CLR */
-{ XCPUFUNC(op_4228_0), 0, 16936 }, /* CLR */
-{ XCPUFUNC(op_4230_0), 0, 16944 }, /* CLR */
-{ XCPUFUNC(op_4238_0), 0, 16952 }, /* CLR */
-{ XCPUFUNC(op_4239_0), 0, 16953 }, /* CLR */
-{ XCPUFUNC(op_4240_0), 0, 16960 }, /* CLR */
-{ XCPUFUNC(op_4250_0), 0, 16976 }, /* CLR */
-{ XCPUFUNC(op_4258_0), 0, 16984 }, /* CLR */
-{ XCPUFUNC(op_4260_0), 0, 16992 }, /* CLR */
-{ XCPUFUNC(op_4268_0), 0, 17000 }, /* CLR */
-{ XCPUFUNC(op_4270_0), 0, 17008 }, /* CLR */
-{ XCPUFUNC(op_4278_0), 0, 17016 }, /* CLR */
-{ XCPUFUNC(op_4279_0), 0, 17017 }, /* CLR */
-{ XCPUFUNC(op_4280_0), 0, 17024 }, /* CLR */
-{ XCPUFUNC(op_4290_0), 0, 17040 }, /* CLR */
-{ XCPUFUNC(op_4298_0), 0, 17048 }, /* CLR */
-{ XCPUFUNC(op_42a0_0), 0, 17056 }, /* CLR */
-{ XCPUFUNC(op_42a8_0), 0, 17064 }, /* CLR */
-{ XCPUFUNC(op_42b0_0), 0, 17072 }, /* CLR */
-{ XCPUFUNC(op_42b8_0), 0, 17080 }, /* CLR */
-{ XCPUFUNC(op_42b9_0), 0, 17081 }, /* CLR */
-{ XCPUFUNC(op_42c0_0), 0, 17088 }, /* MVSR2 */
-{ XCPUFUNC(op_42d0_0), 0, 17104 }, /* MVSR2 */
-{ XCPUFUNC(op_42d8_0), 0, 17112 }, /* MVSR2 */
-{ XCPUFUNC(op_42e0_0), 0, 17120 }, /* MVSR2 */
-{ XCPUFUNC(op_42e8_0), 0, 17128 }, /* MVSR2 */
-{ XCPUFUNC(op_42f0_0), 0, 17136 }, /* MVSR2 */
-{ XCPUFUNC(op_42f8_0), 0, 17144 }, /* MVSR2 */
-{ XCPUFUNC(op_42f9_0), 0, 17145 }, /* MVSR2 */
-{ XCPUFUNC(op_4400_0), 0, 17408 }, /* NEG */
-{ XCPUFUNC(op_4410_0), 0, 17424 }, /* NEG */
-{ XCPUFUNC(op_4418_0), 0, 17432 }, /* NEG */
-{ XCPUFUNC(op_4420_0), 0, 17440 }, /* NEG */
-{ XCPUFUNC(op_4428_0), 0, 17448 }, /* NEG */
-{ XCPUFUNC(op_4430_0), 0, 17456 }, /* NEG */
-{ XCPUFUNC(op_4438_0), 0, 17464 }, /* NEG */
-{ XCPUFUNC(op_4439_0), 0, 17465 }, /* NEG */
-{ XCPUFUNC(op_4440_0), 0, 17472 }, /* NEG */
-{ XCPUFUNC(op_4450_0), 0, 17488 }, /* NEG */
-{ XCPUFUNC(op_4458_0), 0, 17496 }, /* NEG */
-{ XCPUFUNC(op_4460_0), 0, 17504 }, /* NEG */
-{ XCPUFUNC(op_4468_0), 0, 17512 }, /* NEG */
-{ XCPUFUNC(op_4470_0), 0, 17520 }, /* NEG */
-{ XCPUFUNC(op_4478_0), 0, 17528 }, /* NEG */
-{ XCPUFUNC(op_4479_0), 0, 17529 }, /* NEG */
-{ XCPUFUNC(op_4480_0), 0, 17536 }, /* NEG */
-{ XCPUFUNC(op_4490_0), 0, 17552 }, /* NEG */
-{ XCPUFUNC(op_4498_0), 0, 17560 }, /* NEG */
-{ XCPUFUNC(op_44a0_0), 0, 17568 }, /* NEG */
-{ XCPUFUNC(op_44a8_0), 0, 17576 }, /* NEG */
-{ XCPUFUNC(op_44b0_0), 0, 17584 }, /* NEG */
-{ XCPUFUNC(op_44b8_0), 0, 17592 }, /* NEG */
-{ XCPUFUNC(op_44b9_0), 0, 17593 }, /* NEG */
-{ XCPUFUNC(op_44c0_0), 0, 17600 }, /* MV2SR */
-{ XCPUFUNC(op_44d0_0), 0, 17616 }, /* MV2SR */
-{ XCPUFUNC(op_44d8_0), 0, 17624 }, /* MV2SR */
-{ XCPUFUNC(op_44e0_0), 0, 17632 }, /* MV2SR */
-{ XCPUFUNC(op_44e8_0), 0, 17640 }, /* MV2SR */
-{ XCPUFUNC(op_44f0_0), 0, 17648 }, /* MV2SR */
-{ XCPUFUNC(op_44f8_0), 0, 17656 }, /* MV2SR */
-{ XCPUFUNC(op_44f9_0), 0, 17657 }, /* MV2SR */
-{ XCPUFUNC(op_44fa_0), 0, 17658 }, /* MV2SR */
-{ XCPUFUNC(op_44fb_0), 0, 17659 }, /* MV2SR */
-{ XCPUFUNC(op_44fc_0), 0, 17660 }, /* MV2SR */
-{ XCPUFUNC(op_4600_0), 0, 17920 }, /* NOT */
-{ XCPUFUNC(op_4610_0), 0, 17936 }, /* NOT */
-{ XCPUFUNC(op_4618_0), 0, 17944 }, /* NOT */
-{ XCPUFUNC(op_4620_0), 0, 17952 }, /* NOT */
-{ XCPUFUNC(op_4628_0), 0, 17960 }, /* NOT */
-{ XCPUFUNC(op_4630_0), 0, 17968 }, /* NOT */
-{ XCPUFUNC(op_4638_0), 0, 17976 }, /* NOT */
-{ XCPUFUNC(op_4639_0), 0, 17977 }, /* NOT */
-{ XCPUFUNC(op_4640_0), 0, 17984 }, /* NOT */
-{ XCPUFUNC(op_4650_0), 0, 18000 }, /* NOT */
-{ XCPUFUNC(op_4658_0), 0, 18008 }, /* NOT */
-{ XCPUFUNC(op_4660_0), 0, 18016 }, /* NOT */
-{ XCPUFUNC(op_4668_0), 0, 18024 }, /* NOT */
-{ XCPUFUNC(op_4670_0), 0, 18032 }, /* NOT */
-{ XCPUFUNC(op_4678_0), 0, 18040 }, /* NOT */
-{ XCPUFUNC(op_4679_0), 0, 18041 }, /* NOT */
-{ XCPUFUNC(op_4680_0), 0, 18048 }, /* NOT */
-{ XCPUFUNC(op_4690_0), 0, 18064 }, /* NOT */
-{ XCPUFUNC(op_4698_0), 0, 18072 }, /* NOT */
-{ XCPUFUNC(op_46a0_0), 0, 18080 }, /* NOT */
-{ XCPUFUNC(op_46a8_0), 0, 18088 }, /* NOT */
-{ XCPUFUNC(op_46b0_0), 0, 18096 }, /* NOT */
-{ XCPUFUNC(op_46b8_0), 0, 18104 }, /* NOT */
-{ XCPUFUNC(op_46b9_0), 0, 18105 }, /* NOT */
-{ XCPUFUNC(op_46c0_0), 0, 18112 }, /* MV2SR */
-{ XCPUFUNC(op_46d0_0), 0, 18128 }, /* MV2SR */
-{ XCPUFUNC(op_46d8_0), 0, 18136 }, /* MV2SR */
-{ XCPUFUNC(op_46e0_0), 0, 18144 }, /* MV2SR */
-{ XCPUFUNC(op_46e8_0), 0, 18152 }, /* MV2SR */
-{ XCPUFUNC(op_46f0_0), 0, 18160 }, /* MV2SR */
-{ XCPUFUNC(op_46f8_0), 0, 18168 }, /* MV2SR */
-{ XCPUFUNC(op_46f9_0), 0, 18169 }, /* MV2SR */
-{ XCPUFUNC(op_46fa_0), 0, 18170 }, /* MV2SR */
-{ XCPUFUNC(op_46fb_0), 0, 18171 }, /* MV2SR */
-{ XCPUFUNC(op_46fc_0), 0, 18172 }, /* MV2SR */
-{ XCPUFUNC(op_4800_0), 0, 18432 }, /* NBCD */
-{ XCPUFUNC(op_4808_0), 0, 18440 }, /* LINK */
-{ XCPUFUNC(op_4810_0), 0, 18448 }, /* NBCD */
-{ XCPUFUNC(op_4818_0), 0, 18456 }, /* NBCD */
-{ XCPUFUNC(op_4820_0), 0, 18464 }, /* NBCD */
-{ XCPUFUNC(op_4828_0), 0, 18472 }, /* NBCD */
-{ XCPUFUNC(op_4830_0), 0, 18480 }, /* NBCD */
-{ XCPUFUNC(op_4838_0), 0, 18488 }, /* NBCD */
-{ XCPUFUNC(op_4839_0), 0, 18489 }, /* NBCD */
-{ XCPUFUNC(op_4840_0), 0, 18496 }, /* SWAP */
-{ XCPUFUNC(op_4848_0), 0, 18504 }, /* BKPT */
-{ XCPUFUNC(op_4850_0), 0, 18512 }, /* PEA */
-{ XCPUFUNC(op_4868_0), 0, 18536 }, /* PEA */
-{ XCPUFUNC(op_4870_0), 0, 18544 }, /* PEA */
-{ XCPUFUNC(op_4878_0), 0, 18552 }, /* PEA */
-{ XCPUFUNC(op_4879_0), 0, 18553 }, /* PEA */
-{ XCPUFUNC(op_487a_0), 0, 18554 }, /* PEA */
-{ XCPUFUNC(op_487b_0), 0, 18555 }, /* PEA */
-{ XCPUFUNC(op_4880_0), 0, 18560 }, /* EXT */
-{ XCPUFUNC(op_4890_0), 0, 18576 }, /* MVMLE */
-{ XCPUFUNC(op_48a0_0), 0, 18592 }, /* MVMLE */
-{ XCPUFUNC(op_48a8_0), 0, 18600 }, /* MVMLE */
-{ XCPUFUNC(op_48b0_0), 0, 18608 }, /* MVMLE */
-{ XCPUFUNC(op_48b8_0), 0, 18616 }, /* MVMLE */
-{ XCPUFUNC(op_48b9_0), 0, 18617 }, /* MVMLE */
-{ XCPUFUNC(op_48c0_0), 0, 18624 }, /* EXT */
-{ XCPUFUNC(op_48d0_0), 0, 18640 }, /* MVMLE */
-{ XCPUFUNC(op_48e0_0), 0, 18656 }, /* MVMLE */
-{ XCPUFUNC(op_48e8_0), 0, 18664 }, /* MVMLE */
-{ XCPUFUNC(op_48f0_0), 0, 18672 }, /* MVMLE */
-{ XCPUFUNC(op_48f8_0), 0, 18680 }, /* MVMLE */
-{ XCPUFUNC(op_48f9_0), 0, 18681 }, /* MVMLE */
-{ XCPUFUNC(op_49c0_0), 0, 18880 }, /* EXT */
-{ XCPUFUNC(op_4a00_0), 0, 18944 }, /* TST */
-{ XCPUFUNC(op_4a10_0), 0, 18960 }, /* TST */
-{ XCPUFUNC(op_4a18_0), 0, 18968 }, /* TST */
-{ XCPUFUNC(op_4a20_0), 0, 18976 }, /* TST */
-{ XCPUFUNC(op_4a28_0), 0, 18984 }, /* TST */
-{ XCPUFUNC(op_4a30_0), 0, 18992 }, /* TST */
-{ XCPUFUNC(op_4a38_0), 0, 19000 }, /* TST */
-{ XCPUFUNC(op_4a39_0), 0, 19001 }, /* TST */
-{ XCPUFUNC(op_4a3a_0), 0, 19002 }, /* TST */
-{ XCPUFUNC(op_4a3b_0), 0, 19003 }, /* TST */
-{ XCPUFUNC(op_4a3c_0), 0, 19004 }, /* TST */
-{ XCPUFUNC(op_4a40_0), 0, 19008 }, /* TST */
-{ XCPUFUNC(op_4a48_0), 0, 19016 }, /* TST */
-{ XCPUFUNC(op_4a50_0), 0, 19024 }, /* TST */
-{ XCPUFUNC(op_4a58_0), 0, 19032 }, /* TST */
-{ XCPUFUNC(op_4a60_0), 0, 19040 }, /* TST */
-{ XCPUFUNC(op_4a68_0), 0, 19048 }, /* TST */
-{ XCPUFUNC(op_4a70_0), 0, 19056 }, /* TST */
-{ XCPUFUNC(op_4a78_0), 0, 19064 }, /* TST */
-{ XCPUFUNC(op_4a79_0), 0, 19065 }, /* TST */
-{ XCPUFUNC(op_4a7a_0), 0, 19066 }, /* TST */
-{ XCPUFUNC(op_4a7b_0), 0, 19067 }, /* TST */
-{ XCPUFUNC(op_4a7c_0), 0, 19068 }, /* TST */
-{ XCPUFUNC(op_4a80_0), 0, 19072 }, /* TST */
-{ XCPUFUNC(op_4a88_0), 0, 19080 }, /* TST */
-{ XCPUFUNC(op_4a90_0), 0, 19088 }, /* TST */
-{ XCPUFUNC(op_4a98_0), 0, 19096 }, /* TST */
-{ XCPUFUNC(op_4aa0_0), 0, 19104 }, /* TST */
-{ XCPUFUNC(op_4aa8_0), 0, 19112 }, /* TST */
-{ XCPUFUNC(op_4ab0_0), 0, 19120 }, /* TST */
-{ XCPUFUNC(op_4ab8_0), 0, 19128 }, /* TST */
-{ XCPUFUNC(op_4ab9_0), 0, 19129 }, /* TST */
-{ XCPUFUNC(op_4aba_0), 0, 19130 }, /* TST */
-{ XCPUFUNC(op_4abb_0), 0, 19131 }, /* TST */
-{ XCPUFUNC(op_4abc_0), 0, 19132 }, /* TST */
-{ XCPUFUNC(op_4ac0_0), 0, 19136 }, /* TAS */
-{ XCPUFUNC(op_4ad0_0), 0, 19152 }, /* TAS */
-{ XCPUFUNC(op_4ad8_0), 0, 19160 }, /* TAS */
-{ XCPUFUNC(op_4ae0_0), 0, 19168 }, /* TAS */
-{ XCPUFUNC(op_4ae8_0), 0, 19176 }, /* TAS */
-{ XCPUFUNC(op_4af0_0), 0, 19184 }, /* TAS */
-{ XCPUFUNC(op_4af8_0), 0, 19192 }, /* TAS */
-{ XCPUFUNC(op_4af9_0), 0, 19193 }, /* TAS */
-{ XCPUFUNC(op_4c00_0), 0, 19456 }, /* MULL */
-{ XCPUFUNC(op_4c10_0), 0, 19472 }, /* MULL */
-{ XCPUFUNC(op_4c18_0), 0, 19480 }, /* MULL */
-{ XCPUFUNC(op_4c20_0), 0, 19488 }, /* MULL */
-{ XCPUFUNC(op_4c28_0), 0, 19496 }, /* MULL */
-{ XCPUFUNC(op_4c30_0), 0, 19504 }, /* MULL */
-{ XCPUFUNC(op_4c38_0), 0, 19512 }, /* MULL */
-{ XCPUFUNC(op_4c39_0), 0, 19513 }, /* MULL */
-{ XCPUFUNC(op_4c3a_0), 0, 19514 }, /* MULL */
-{ XCPUFUNC(op_4c3b_0), 0, 19515 }, /* MULL */
-{ XCPUFUNC(op_4c3c_0), 0, 19516 }, /* MULL */
-{ XCPUFUNC(op_4c40_0), 0, 19520 }, /* DIVL */
-{ XCPUFUNC(op_4c50_0), 0, 19536 }, /* DIVL */
-{ XCPUFUNC(op_4c58_0), 0, 19544 }, /* DIVL */
-{ XCPUFUNC(op_4c60_0), 0, 19552 }, /* DIVL */
-{ XCPUFUNC(op_4c68_0), 0, 19560 }, /* DIVL */
-{ XCPUFUNC(op_4c70_0), 0, 19568 }, /* DIVL */
-{ XCPUFUNC(op_4c78_0), 0, 19576 }, /* DIVL */
-{ XCPUFUNC(op_4c79_0), 0, 19577 }, /* DIVL */
-{ XCPUFUNC(op_4c7a_0), 0, 19578 }, /* DIVL */
-{ XCPUFUNC(op_4c7b_0), 0, 19579 }, /* DIVL */
-{ XCPUFUNC(op_4c7c_0), 0, 19580 }, /* DIVL */
-{ XCPUFUNC(op_4c90_0), 0, 19600 }, /* MVMEL */
-{ XCPUFUNC(op_4c98_0), 0, 19608 }, /* MVMEL */
-{ XCPUFUNC(op_4ca8_0), 0, 19624 }, /* MVMEL */
-{ XCPUFUNC(op_4cb0_0), 0, 19632 }, /* MVMEL */
-{ XCPUFUNC(op_4cb8_0), 0, 19640 }, /* MVMEL */
-{ XCPUFUNC(op_4cb9_0), 0, 19641 }, /* MVMEL */
-{ XCPUFUNC(op_4cba_0), 0, 19642 }, /* MVMEL */
-{ XCPUFUNC(op_4cbb_0), 0, 19643 }, /* MVMEL */
-{ XCPUFUNC(op_4cd0_0), 0, 19664 }, /* MVMEL */
-{ XCPUFUNC(op_4cd8_0), 0, 19672 }, /* MVMEL */
-{ XCPUFUNC(op_4ce8_0), 0, 19688 }, /* MVMEL */
-{ XCPUFUNC(op_4cf0_0), 0, 19696 }, /* MVMEL */
-{ XCPUFUNC(op_4cf8_0), 0, 19704 }, /* MVMEL */
-{ XCPUFUNC(op_4cf9_0), 0, 19705 }, /* MVMEL */
-{ XCPUFUNC(op_4cfa_0), 0, 19706 }, /* MVMEL */
-{ XCPUFUNC(op_4cfb_0), 0, 19707 }, /* MVMEL */
-{ XCPUFUNC(op_4e40_0), 0, 20032 }, /* TRAP */
-{ XCPUFUNC(op_4e50_0), 0, 20048 }, /* LINK */
-{ XCPUFUNC(op_4e58_0), 0, 20056 }, /* UNLK */
-{ XCPUFUNC(op_4e60_0), 0, 20064 }, /* MVR2USP */
-{ XCPUFUNC(op_4e68_0), 0, 20072 }, /* MVUSP2R */
-{ XCPUFUNC(op_4e70_0), 0, 20080 }, /* RESET */
-{ XCPUFUNC(op_4e71_0), 0, 20081 }, /* NOP */
-{ XCPUFUNC(op_4e72_0), 0, 20082 }, /* STOP */
-{ XCPUFUNC(op_4e73_0), 0, 20083 }, /* RTE */
-{ XCPUFUNC(op_4e74_0), 0, 20084 }, /* RTD */
-{ XCPUFUNC(op_4e75_0), 0, 20085 }, /* RTS */
-{ XCPUFUNC(op_4e76_0), 0, 20086 }, /* TRAPV */
-{ XCPUFUNC(op_4e77_0), 0, 20087 }, /* RTR */
-{ XCPUFUNC(op_4e7a_0), 0, 20090 }, /* MOVEC2 */
-{ XCPUFUNC(op_4e7b_0), 0, 20091 }, /* MOVE2C */
-{ XCPUFUNC(op_4e90_0), 0, 20112 }, /* JSR */
-{ XCPUFUNC(op_4ea8_0), 0, 20136 }, /* JSR */
-{ XCPUFUNC(op_4eb0_0), 0, 20144 }, /* JSR */
-{ XCPUFUNC(op_4eb8_0), 0, 20152 }, /* JSR */
-{ XCPUFUNC(op_4eb9_0), 0, 20153 }, /* JSR */
-{ XCPUFUNC(op_4eba_0), 0, 20154 }, /* JSR */
-{ XCPUFUNC(op_4ebb_0), 0, 20155 }, /* JSR */
-{ XCPUFUNC(op_4ed0_0), 0, 20176 }, /* JMP */
-{ XCPUFUNC(op_4ee8_0), 0, 20200 }, /* JMP */
-{ XCPUFUNC(op_4ef0_0), 0, 20208 }, /* JMP */
-{ XCPUFUNC(op_4ef8_0), 0, 20216 }, /* JMP */
-{ XCPUFUNC(op_4ef9_0), 0, 20217 }, /* JMP */
-{ XCPUFUNC(op_4efa_0), 0, 20218 }, /* JMP */
-{ XCPUFUNC(op_4efb_0), 0, 20219 }, /* JMP */
-{ XCPUFUNC(op_5000_0), 0, 20480 }, /* ADD */
-{ XCPUFUNC(op_5010_0), 0, 20496 }, /* ADD */
-{ XCPUFUNC(op_5018_0), 0, 20504 }, /* ADD */
-{ XCPUFUNC(op_5020_0), 0, 20512 }, /* ADD */
-{ XCPUFUNC(op_5028_0), 0, 20520 }, /* ADD */
-{ XCPUFUNC(op_5030_0), 0, 20528 }, /* ADD */
-{ XCPUFUNC(op_5038_0), 0, 20536 }, /* ADD */
-{ XCPUFUNC(op_5039_0), 0, 20537 }, /* ADD */
-{ XCPUFUNC(op_5040_0), 0, 20544 }, /* ADD */
-{ XCPUFUNC(op_5048_0), 0, 20552 }, /* ADDA */
-{ XCPUFUNC(op_5050_0), 0, 20560 }, /* ADD */
-{ XCPUFUNC(op_5058_0), 0, 20568 }, /* ADD */
-{ XCPUFUNC(op_5060_0), 0, 20576 }, /* ADD */
-{ XCPUFUNC(op_5068_0), 0, 20584 }, /* ADD */
-{ XCPUFUNC(op_5070_0), 0, 20592 }, /* ADD */
-{ XCPUFUNC(op_5078_0), 0, 20600 }, /* ADD */
-{ XCPUFUNC(op_5079_0), 0, 20601 }, /* ADD */
-{ XCPUFUNC(op_5080_0), 0, 20608 }, /* ADD */
-{ XCPUFUNC(op_5088_0), 0, 20616 }, /* ADDA */
-{ XCPUFUNC(op_5090_0), 0, 20624 }, /* ADD */
-{ XCPUFUNC(op_5098_0), 0, 20632 }, /* ADD */
-{ XCPUFUNC(op_50a0_0), 0, 20640 }, /* ADD */
-{ XCPUFUNC(op_50a8_0), 0, 20648 }, /* ADD */
-{ XCPUFUNC(op_50b0_0), 0, 20656 }, /* ADD */
-{ XCPUFUNC(op_50b8_0), 0, 20664 }, /* ADD */
-{ XCPUFUNC(op_50b9_0), 0, 20665 }, /* ADD */
-{ XCPUFUNC(op_50c0_0), 0, 20672 }, /* Scc */
-{ XCPUFUNC(op_50c8_0), 0, 20680 }, /* DBcc */
-{ XCPUFUNC(op_50d0_0), 0, 20688 }, /* Scc */
-{ XCPUFUNC(op_50d8_0), 0, 20696 }, /* Scc */
-{ XCPUFUNC(op_50e0_0), 0, 20704 }, /* Scc */
-{ XCPUFUNC(op_50e8_0), 0, 20712 }, /* Scc */
-{ XCPUFUNC(op_50f0_0), 0, 20720 }, /* Scc */
-{ XCPUFUNC(op_50f8_0), 0, 20728 }, /* Scc */
-{ XCPUFUNC(op_50f9_0), 0, 20729 }, /* Scc */
-{ XCPUFUNC(op_50fa_0), 0, 20730 }, /* TRAPcc */
-{ XCPUFUNC(op_50fb_0), 0, 20731 }, /* TRAPcc */
-{ XCPUFUNC(op_50fc_0), 0, 20732 }, /* TRAPcc */
-{ XCPUFUNC(op_5100_0), 0, 20736 }, /* SUB */
-{ XCPUFUNC(op_5110_0), 0, 20752 }, /* SUB */
-{ XCPUFUNC(op_5118_0), 0, 20760 }, /* SUB */
-{ XCPUFUNC(op_5120_0), 0, 20768 }, /* SUB */
-{ XCPUFUNC(op_5128_0), 0, 20776 }, /* SUB */
-{ XCPUFUNC(op_5130_0), 0, 20784 }, /* SUB */
-{ XCPUFUNC(op_5138_0), 0, 20792 }, /* SUB */
-{ XCPUFUNC(op_5139_0), 0, 20793 }, /* SUB */
-{ XCPUFUNC(op_5140_0), 0, 20800 }, /* SUB */
-{ XCPUFUNC(op_5148_0), 0, 20808 }, /* SUBA */
-{ XCPUFUNC(op_5150_0), 0, 20816 }, /* SUB */
-{ XCPUFUNC(op_5158_0), 0, 20824 }, /* SUB */
-{ XCPUFUNC(op_5160_0), 0, 20832 }, /* SUB */
-{ XCPUFUNC(op_5168_0), 0, 20840 }, /* SUB */
-{ XCPUFUNC(op_5170_0), 0, 20848 }, /* SUB */
-{ XCPUFUNC(op_5178_0), 0, 20856 }, /* SUB */
-{ XCPUFUNC(op_5179_0), 0, 20857 }, /* SUB */
-{ XCPUFUNC(op_5180_0), 0, 20864 }, /* SUB */
-{ XCPUFUNC(op_5188_0), 0, 20872 }, /* SUBA */
-{ XCPUFUNC(op_5190_0), 0, 20880 }, /* SUB */
-{ XCPUFUNC(op_5198_0), 0, 20888 }, /* SUB */
-{ XCPUFUNC(op_51a0_0), 0, 20896 }, /* SUB */
-{ XCPUFUNC(op_51a8_0), 0, 20904 }, /* SUB */
-{ XCPUFUNC(op_51b0_0), 0, 20912 }, /* SUB */
-{ XCPUFUNC(op_51b8_0), 0, 20920 }, /* SUB */
-{ XCPUFUNC(op_51b9_0), 0, 20921 }, /* SUB */
-{ XCPUFUNC(op_51c0_0), 0, 20928 }, /* Scc */
-{ XCPUFUNC(op_51c8_0), 0, 20936 }, /* DBcc */
-{ XCPUFUNC(op_51d0_0), 0, 20944 }, /* Scc */
-{ XCPUFUNC(op_51d8_0), 0, 20952 }, /* Scc */
-{ XCPUFUNC(op_51e0_0), 0, 20960 }, /* Scc */
-{ XCPUFUNC(op_51e8_0), 0, 20968 }, /* Scc */
-{ XCPUFUNC(op_51f0_0), 0, 20976 }, /* Scc */
-{ XCPUFUNC(op_51f8_0), 0, 20984 }, /* Scc */
-{ XCPUFUNC(op_51f9_0), 0, 20985 }, /* Scc */
-{ XCPUFUNC(op_51fa_0), 0, 20986 }, /* TRAPcc */
-{ XCPUFUNC(op_51fb_0), 0, 20987 }, /* TRAPcc */
-{ XCPUFUNC(op_51fc_0), 0, 20988 }, /* TRAPcc */
-{ XCPUFUNC(op_52c0_0), 0, 21184 }, /* Scc */
-{ XCPUFUNC(op_52c8_0), 0, 21192 }, /* DBcc */
-{ XCPUFUNC(op_52d0_0), 0, 21200 }, /* Scc */
-{ XCPUFUNC(op_52d8_0), 0, 21208 }, /* Scc */
-{ XCPUFUNC(op_52e0_0), 0, 21216 }, /* Scc */
-{ XCPUFUNC(op_52e8_0), 0, 21224 }, /* Scc */
-{ XCPUFUNC(op_52f0_0), 0, 21232 }, /* Scc */
-{ XCPUFUNC(op_52f8_0), 0, 21240 }, /* Scc */
-{ XCPUFUNC(op_52f9_0), 0, 21241 }, /* Scc */
-{ XCPUFUNC(op_52fa_0), 0, 21242 }, /* TRAPcc */
-{ XCPUFUNC(op_52fb_0), 0, 21243 }, /* TRAPcc */
-{ XCPUFUNC(op_52fc_0), 0, 21244 }, /* TRAPcc */
-{ XCPUFUNC(op_53c0_0), 0, 21440 }, /* Scc */
-{ XCPUFUNC(op_53c8_0), 0, 21448 }, /* DBcc */
-{ XCPUFUNC(op_53d0_0), 0, 21456 }, /* Scc */
-{ XCPUFUNC(op_53d8_0), 0, 21464 }, /* Scc */
-{ XCPUFUNC(op_53e0_0), 0, 21472 }, /* Scc */
-{ XCPUFUNC(op_53e8_0), 0, 21480 }, /* Scc */
-{ XCPUFUNC(op_53f0_0), 0, 21488 }, /* Scc */
-{ XCPUFUNC(op_53f8_0), 0, 21496 }, /* Scc */
-{ XCPUFUNC(op_53f9_0), 0, 21497 }, /* Scc */
-{ XCPUFUNC(op_53fa_0), 0, 21498 }, /* TRAPcc */
-{ XCPUFUNC(op_53fb_0), 0, 21499 }, /* TRAPcc */
-{ XCPUFUNC(op_53fc_0), 0, 21500 }, /* TRAPcc */
-{ XCPUFUNC(op_54c0_0), 0, 21696 }, /* Scc */
-{ XCPUFUNC(op_54c8_0), 0, 21704 }, /* DBcc */
-{ XCPUFUNC(op_54d0_0), 0, 21712 }, /* Scc */
-{ XCPUFUNC(op_54d8_0), 0, 21720 }, /* Scc */
-{ XCPUFUNC(op_54e0_0), 0, 21728 }, /* Scc */
-{ XCPUFUNC(op_54e8_0), 0, 21736 }, /* Scc */
-{ XCPUFUNC(op_54f0_0), 0, 21744 }, /* Scc */
-{ XCPUFUNC(op_54f8_0), 0, 21752 }, /* Scc */
-{ XCPUFUNC(op_54f9_0), 0, 21753 }, /* Scc */
-{ XCPUFUNC(op_54fa_0), 0, 21754 }, /* TRAPcc */
-{ XCPUFUNC(op_54fb_0), 0, 21755 }, /* TRAPcc */
-{ XCPUFUNC(op_54fc_0), 0, 21756 }, /* TRAPcc */
-{ XCPUFUNC(op_55c0_0), 0, 21952 }, /* Scc */
-{ XCPUFUNC(op_55c8_0), 0, 21960 }, /* DBcc */
-{ XCPUFUNC(op_55d0_0), 0, 21968 }, /* Scc */
-{ XCPUFUNC(op_55d8_0), 0, 21976 }, /* Scc */
-{ XCPUFUNC(op_55e0_0), 0, 21984 }, /* Scc */
-{ XCPUFUNC(op_55e8_0), 0, 21992 }, /* Scc */
-{ XCPUFUNC(op_55f0_0), 0, 22000 }, /* Scc */
-{ XCPUFUNC(op_55f8_0), 0, 22008 }, /* Scc */
-{ XCPUFUNC(op_55f9_0), 0, 22009 }, /* Scc */
-{ XCPUFUNC(op_55fa_0), 0, 22010 }, /* TRAPcc */
-{ XCPUFUNC(op_55fb_0), 0, 22011 }, /* TRAPcc */
-{ XCPUFUNC(op_55fc_0), 0, 22012 }, /* TRAPcc */
-{ XCPUFUNC(op_56c0_0), 0, 22208 }, /* Scc */
-{ XCPUFUNC(op_56c8_0), 0, 22216 }, /* DBcc */
-{ XCPUFUNC(op_56d0_0), 0, 22224 }, /* Scc */
-{ XCPUFUNC(op_56d8_0), 0, 22232 }, /* Scc */
-{ XCPUFUNC(op_56e0_0), 0, 22240 }, /* Scc */
-{ XCPUFUNC(op_56e8_0), 0, 22248 }, /* Scc */
-{ XCPUFUNC(op_56f0_0), 0, 22256 }, /* Scc */
-{ XCPUFUNC(op_56f8_0), 0, 22264 }, /* Scc */
-{ XCPUFUNC(op_56f9_0), 0, 22265 }, /* Scc */
-{ XCPUFUNC(op_56fa_0), 0, 22266 }, /* TRAPcc */
-{ XCPUFUNC(op_56fb_0), 0, 22267 }, /* TRAPcc */
-{ XCPUFUNC(op_56fc_0), 0, 22268 }, /* TRAPcc */
-{ XCPUFUNC(op_57c0_0), 0, 22464 }, /* Scc */
-{ XCPUFUNC(op_57c8_0), 0, 22472 }, /* DBcc */
-{ XCPUFUNC(op_57d0_0), 0, 22480 }, /* Scc */
-{ XCPUFUNC(op_57d8_0), 0, 22488 }, /* Scc */
-{ XCPUFUNC(op_57e0_0), 0, 22496 }, /* Scc */
-{ XCPUFUNC(op_57e8_0), 0, 22504 }, /* Scc */
-{ XCPUFUNC(op_57f0_0), 0, 22512 }, /* Scc */
-{ XCPUFUNC(op_57f8_0), 0, 22520 }, /* Scc */
-{ XCPUFUNC(op_57f9_0), 0, 22521 }, /* Scc */
-{ XCPUFUNC(op_57fa_0), 0, 22522 }, /* TRAPcc */
-{ XCPUFUNC(op_57fb_0), 0, 22523 }, /* TRAPcc */
-{ XCPUFUNC(op_57fc_0), 0, 22524 }, /* TRAPcc */
-{ XCPUFUNC(op_58c0_0), 0, 22720 }, /* Scc */
-{ XCPUFUNC(op_58c8_0), 0, 22728 }, /* DBcc */
-{ XCPUFUNC(op_58d0_0), 0, 22736 }, /* Scc */
-{ XCPUFUNC(op_58d8_0), 0, 22744 }, /* Scc */
-{ XCPUFUNC(op_58e0_0), 0, 22752 }, /* Scc */
-{ XCPUFUNC(op_58e8_0), 0, 22760 }, /* Scc */
-{ XCPUFUNC(op_58f0_0), 0, 22768 }, /* Scc */
-{ XCPUFUNC(op_58f8_0), 0, 22776 }, /* Scc */
-{ XCPUFUNC(op_58f9_0), 0, 22777 }, /* Scc */
-{ XCPUFUNC(op_58fa_0), 0, 22778 }, /* TRAPcc */
-{ XCPUFUNC(op_58fb_0), 0, 22779 }, /* TRAPcc */
-{ XCPUFUNC(op_58fc_0), 0, 22780 }, /* TRAPcc */
-{ XCPUFUNC(op_59c0_0), 0, 22976 }, /* Scc */
-{ XCPUFUNC(op_59c8_0), 0, 22984 }, /* DBcc */
-{ XCPUFUNC(op_59d0_0), 0, 22992 }, /* Scc */
-{ XCPUFUNC(op_59d8_0), 0, 23000 }, /* Scc */
-{ XCPUFUNC(op_59e0_0), 0, 23008 }, /* Scc */
-{ XCPUFUNC(op_59e8_0), 0, 23016 }, /* Scc */
-{ XCPUFUNC(op_59f0_0), 0, 23024 }, /* Scc */
-{ XCPUFUNC(op_59f8_0), 0, 23032 }, /* Scc */
-{ XCPUFUNC(op_59f9_0), 0, 23033 }, /* Scc */
-{ XCPUFUNC(op_59fa_0), 0, 23034 }, /* TRAPcc */
-{ XCPUFUNC(op_59fb_0), 0, 23035 }, /* TRAPcc */
-{ XCPUFUNC(op_59fc_0), 0, 23036 }, /* TRAPcc */
-{ XCPUFUNC(op_5ac0_0), 0, 23232 }, /* Scc */
-{ XCPUFUNC(op_5ac8_0), 0, 23240 }, /* DBcc */
-{ XCPUFUNC(op_5ad0_0), 0, 23248 }, /* Scc */
-{ XCPUFUNC(op_5ad8_0), 0, 23256 }, /* Scc */
-{ XCPUFUNC(op_5ae0_0), 0, 23264 }, /* Scc */
-{ XCPUFUNC(op_5ae8_0), 0, 23272 }, /* Scc */
-{ XCPUFUNC(op_5af0_0), 0, 23280 }, /* Scc */
-{ XCPUFUNC(op_5af8_0), 0, 23288 }, /* Scc */
-{ XCPUFUNC(op_5af9_0), 0, 23289 }, /* Scc */
-{ XCPUFUNC(op_5afa_0), 0, 23290 }, /* TRAPcc */
-{ XCPUFUNC(op_5afb_0), 0, 23291 }, /* TRAPcc */
-{ XCPUFUNC(op_5afc_0), 0, 23292 }, /* TRAPcc */
-{ XCPUFUNC(op_5bc0_0), 0, 23488 }, /* Scc */
-{ XCPUFUNC(op_5bc8_0), 0, 23496 }, /* DBcc */
-{ XCPUFUNC(op_5bd0_0), 0, 23504 }, /* Scc */
-{ XCPUFUNC(op_5bd8_0), 0, 23512 }, /* Scc */
-{ XCPUFUNC(op_5be0_0), 0, 23520 }, /* Scc */
-{ XCPUFUNC(op_5be8_0), 0, 23528 }, /* Scc */
-{ XCPUFUNC(op_5bf0_0), 0, 23536 }, /* Scc */
-{ XCPUFUNC(op_5bf8_0), 0, 23544 }, /* Scc */
-{ XCPUFUNC(op_5bf9_0), 0, 23545 }, /* Scc */
-{ XCPUFUNC(op_5bfa_0), 0, 23546 }, /* TRAPcc */
-{ XCPUFUNC(op_5bfb_0), 0, 23547 }, /* TRAPcc */
-{ XCPUFUNC(op_5bfc_0), 0, 23548 }, /* TRAPcc */
-{ XCPUFUNC(op_5cc0_0), 0, 23744 }, /* Scc */
-{ XCPUFUNC(op_5cc8_0), 0, 23752 }, /* DBcc */
-{ XCPUFUNC(op_5cd0_0), 0, 23760 }, /* Scc */
-{ XCPUFUNC(op_5cd8_0), 0, 23768 }, /* Scc */
-{ XCPUFUNC(op_5ce0_0), 0, 23776 }, /* Scc */
-{ XCPUFUNC(op_5ce8_0), 0, 23784 }, /* Scc */
-{ XCPUFUNC(op_5cf0_0), 0, 23792 }, /* Scc */
-{ XCPUFUNC(op_5cf8_0), 0, 23800 }, /* Scc */
-{ XCPUFUNC(op_5cf9_0), 0, 23801 }, /* Scc */
-{ XCPUFUNC(op_5cfa_0), 0, 23802 }, /* TRAPcc */
-{ XCPUFUNC(op_5cfb_0), 0, 23803 }, /* TRAPcc */
-{ XCPUFUNC(op_5cfc_0), 0, 23804 }, /* TRAPcc */
-{ XCPUFUNC(op_5dc0_0), 0, 24000 }, /* Scc */
-{ XCPUFUNC(op_5dc8_0), 0, 24008 }, /* DBcc */
-{ XCPUFUNC(op_5dd0_0), 0, 24016 }, /* Scc */
-{ XCPUFUNC(op_5dd8_0), 0, 24024 }, /* Scc */
-{ XCPUFUNC(op_5de0_0), 0, 24032 }, /* Scc */
-{ XCPUFUNC(op_5de8_0), 0, 24040 }, /* Scc */
-{ XCPUFUNC(op_5df0_0), 0, 24048 }, /* Scc */
-{ XCPUFUNC(op_5df8_0), 0, 24056 }, /* Scc */
-{ XCPUFUNC(op_5df9_0), 0, 24057 }, /* Scc */
-{ XCPUFUNC(op_5dfa_0), 0, 24058 }, /* TRAPcc */
-{ XCPUFUNC(op_5dfb_0), 0, 24059 }, /* TRAPcc */
-{ XCPUFUNC(op_5dfc_0), 0, 24060 }, /* TRAPcc */
-{ XCPUFUNC(op_5ec0_0), 0, 24256 }, /* Scc */
-{ XCPUFUNC(op_5ec8_0), 0, 24264 }, /* DBcc */
-{ XCPUFUNC(op_5ed0_0), 0, 24272 }, /* Scc */
-{ XCPUFUNC(op_5ed8_0), 0, 24280 }, /* Scc */
-{ XCPUFUNC(op_5ee0_0), 0, 24288 }, /* Scc */
-{ XCPUFUNC(op_5ee8_0), 0, 24296 }, /* Scc */
-{ XCPUFUNC(op_5ef0_0), 0, 24304 }, /* Scc */
-{ XCPUFUNC(op_5ef8_0), 0, 24312 }, /* Scc */
-{ XCPUFUNC(op_5ef9_0), 0, 24313 }, /* Scc */
-{ XCPUFUNC(op_5efa_0), 0, 24314 }, /* TRAPcc */
-{ XCPUFUNC(op_5efb_0), 0, 24315 }, /* TRAPcc */
-{ XCPUFUNC(op_5efc_0), 0, 24316 }, /* TRAPcc */
-{ XCPUFUNC(op_5fc0_0), 0, 24512 }, /* Scc */
-{ XCPUFUNC(op_5fc8_0), 0, 24520 }, /* DBcc */
-{ XCPUFUNC(op_5fd0_0), 0, 24528 }, /* Scc */
-{ XCPUFUNC(op_5fd8_0), 0, 24536 }, /* Scc */
-{ XCPUFUNC(op_5fe0_0), 0, 24544 }, /* Scc */
-{ XCPUFUNC(op_5fe8_0), 0, 24552 }, /* Scc */
-{ XCPUFUNC(op_5ff0_0), 0, 24560 }, /* Scc */
-{ XCPUFUNC(op_5ff8_0), 0, 24568 }, /* Scc */
-{ XCPUFUNC(op_5ff9_0), 0, 24569 }, /* Scc */
-{ XCPUFUNC(op_5ffa_0), 0, 24570 }, /* TRAPcc */
-{ XCPUFUNC(op_5ffb_0), 0, 24571 }, /* TRAPcc */
-{ XCPUFUNC(op_5ffc_0), 0, 24572 }, /* TRAPcc */
-{ XCPUFUNC(op_6000_0), 0, 24576 }, /* Bcc */
-{ XCPUFUNC(op_6001_0), 0, 24577 }, /* Bcc */
-{ XCPUFUNC(op_60ff_0), 0, 24831 }, /* Bcc */
-{ XCPUFUNC(op_6100_0), 0, 24832 }, /* BSR */
-{ XCPUFUNC(op_6101_0), 0, 24833 }, /* BSR */
-{ XCPUFUNC(op_61ff_0), 0, 25087 }, /* BSR */
-{ XCPUFUNC(op_6200_0), 0, 25088 }, /* Bcc */
-{ XCPUFUNC(op_6201_0), 0, 25089 }, /* Bcc */
-{ XCPUFUNC(op_62ff_0), 0, 25343 }, /* Bcc */
-{ XCPUFUNC(op_6300_0), 0, 25344 }, /* Bcc */
-{ XCPUFUNC(op_6301_0), 0, 25345 }, /* Bcc */
-{ XCPUFUNC(op_63ff_0), 0, 25599 }, /* Bcc */
-{ XCPUFUNC(op_6400_0), 0, 25600 }, /* Bcc */
-{ XCPUFUNC(op_6401_0), 0, 25601 }, /* Bcc */
-{ XCPUFUNC(op_64ff_0), 0, 25855 }, /* Bcc */
-{ XCPUFUNC(op_6500_0), 0, 25856 }, /* Bcc */
-{ XCPUFUNC(op_6501_0), 0, 25857 }, /* Bcc */
-{ XCPUFUNC(op_65ff_0), 0, 26111 }, /* Bcc */
-{ XCPUFUNC(op_6600_0), 0, 26112 }, /* Bcc */
-{ XCPUFUNC(op_6601_0), 0, 26113 }, /* Bcc */
-{ XCPUFUNC(op_66ff_0), 0, 26367 }, /* Bcc */
-{ XCPUFUNC(op_6700_0), 0, 26368 }, /* Bcc */
-{ XCPUFUNC(op_6701_0), 0, 26369 }, /* Bcc */
-{ XCPUFUNC(op_67ff_0), 0, 26623 }, /* Bcc */
-{ XCPUFUNC(op_6800_0), 0, 26624 }, /* Bcc */
-{ XCPUFUNC(op_6801_0), 0, 26625 }, /* Bcc */
-{ XCPUFUNC(op_68ff_0), 0, 26879 }, /* Bcc */
-{ XCPUFUNC(op_6900_0), 0, 26880 }, /* Bcc */
-{ XCPUFUNC(op_6901_0), 0, 26881 }, /* Bcc */
-{ XCPUFUNC(op_69ff_0), 0, 27135 }, /* Bcc */
-{ XCPUFUNC(op_6a00_0), 0, 27136 }, /* Bcc */
-{ XCPUFUNC(op_6a01_0), 0, 27137 }, /* Bcc */
-{ XCPUFUNC(op_6aff_0), 0, 27391 }, /* Bcc */
-{ XCPUFUNC(op_6b00_0), 0, 27392 }, /* Bcc */
-{ XCPUFUNC(op_6b01_0), 0, 27393 }, /* Bcc */
-{ XCPUFUNC(op_6bff_0), 0, 27647 }, /* Bcc */
-{ XCPUFUNC(op_6c00_0), 0, 27648 }, /* Bcc */
-{ XCPUFUNC(op_6c01_0), 0, 27649 }, /* Bcc */
-{ XCPUFUNC(op_6cff_0), 0, 27903 }, /* Bcc */
-{ XCPUFUNC(op_6d00_0), 0, 27904 }, /* Bcc */
-{ XCPUFUNC(op_6d01_0), 0, 27905 }, /* Bcc */
-{ XCPUFUNC(op_6dff_0), 0, 28159 }, /* Bcc */
-{ XCPUFUNC(op_6e00_0), 0, 28160 }, /* Bcc */
-{ XCPUFUNC(op_6e01_0), 0, 28161 }, /* Bcc */
-{ XCPUFUNC(op_6eff_0), 0, 28415 }, /* Bcc */
-{ XCPUFUNC(op_6f00_0), 0, 28416 }, /* Bcc */
-{ XCPUFUNC(op_6f01_0), 0, 28417 }, /* Bcc */
-{ XCPUFUNC(op_6fff_0), 0, 28671 }, /* Bcc */
-{ XCPUFUNC(op_7000_0), 0, 28672 }, /* MOVE */
-{ XCPUFUNC(op_8000_0), 0, 32768 }, /* OR */
-{ XCPUFUNC(op_8010_0), 0, 32784 }, /* OR */
-{ XCPUFUNC(op_8018_0), 0, 32792 }, /* OR */
-{ XCPUFUNC(op_8020_0), 0, 32800 }, /* OR */
-{ XCPUFUNC(op_8028_0), 0, 32808 }, /* OR */
-{ XCPUFUNC(op_8030_0), 0, 32816 }, /* OR */
-{ XCPUFUNC(op_8038_0), 0, 32824 }, /* OR */
-{ XCPUFUNC(op_8039_0), 0, 32825 }, /* OR */
-{ XCPUFUNC(op_803a_0), 0, 32826 }, /* OR */
-{ XCPUFUNC(op_803b_0), 0, 32827 }, /* OR */
-{ XCPUFUNC(op_803c_0), 0, 32828 }, /* OR */
-{ XCPUFUNC(op_8040_0), 0, 32832 }, /* OR */
-{ XCPUFUNC(op_8050_0), 0, 32848 }, /* OR */
-{ XCPUFUNC(op_8058_0), 0, 32856 }, /* OR */
-{ XCPUFUNC(op_8060_0), 0, 32864 }, /* OR */
-{ XCPUFUNC(op_8068_0), 0, 32872 }, /* OR */
-{ XCPUFUNC(op_8070_0), 0, 32880 }, /* OR */
-{ XCPUFUNC(op_8078_0), 0, 32888 }, /* OR */
-{ XCPUFUNC(op_8079_0), 0, 32889 }, /* OR */
-{ XCPUFUNC(op_807a_0), 0, 32890 }, /* OR */
-{ XCPUFUNC(op_807b_0), 0, 32891 }, /* OR */
-{ XCPUFUNC(op_807c_0), 0, 32892 }, /* OR */
-{ XCPUFUNC(op_8080_0), 0, 32896 }, /* OR */
-{ XCPUFUNC(op_8090_0), 0, 32912 }, /* OR */
-{ XCPUFUNC(op_8098_0), 0, 32920 }, /* OR */
-{ XCPUFUNC(op_80a0_0), 0, 32928 }, /* OR */
-{ XCPUFUNC(op_80a8_0), 0, 32936 }, /* OR */
-{ XCPUFUNC(op_80b0_0), 0, 32944 }, /* OR */
-{ XCPUFUNC(op_80b8_0), 0, 32952 }, /* OR */
-{ XCPUFUNC(op_80b9_0), 0, 32953 }, /* OR */
-{ XCPUFUNC(op_80ba_0), 0, 32954 }, /* OR */
-{ XCPUFUNC(op_80bb_0), 0, 32955 }, /* OR */
-{ XCPUFUNC(op_80bc_0), 0, 32956 }, /* OR */
-{ XCPUFUNC(op_80c0_0), 0, 32960 }, /* DIVU */
-{ XCPUFUNC(op_80d0_0), 0, 32976 }, /* DIVU */
-{ XCPUFUNC(op_80d8_0), 0, 32984 }, /* DIVU */
-{ XCPUFUNC(op_80e0_0), 0, 32992 }, /* DIVU */
-{ XCPUFUNC(op_80e8_0), 0, 33000 }, /* DIVU */
-{ XCPUFUNC(op_80f0_0), 0, 33008 }, /* DIVU */
-{ XCPUFUNC(op_80f8_0), 0, 33016 }, /* DIVU */
-{ XCPUFUNC(op_80f9_0), 0, 33017 }, /* DIVU */
-{ XCPUFUNC(op_80fa_0), 0, 33018 }, /* DIVU */
-{ XCPUFUNC(op_80fb_0), 0, 33019 }, /* DIVU */
-{ XCPUFUNC(op_80fc_0), 0, 33020 }, /* DIVU */
-{ XCPUFUNC(op_8100_0), 0, 33024 }, /* SBCD */
-{ XCPUFUNC(op_8108_0), 0, 33032 }, /* SBCD */
-{ XCPUFUNC(op_8110_0), 0, 33040 }, /* OR */
-{ XCPUFUNC(op_8118_0), 0, 33048 }, /* OR */
-{ XCPUFUNC(op_8120_0), 0, 33056 }, /* OR */
-{ XCPUFUNC(op_8128_0), 0, 33064 }, /* OR */
-{ XCPUFUNC(op_8130_0), 0, 33072 }, /* OR */
-{ XCPUFUNC(op_8138_0), 0, 33080 }, /* OR */
-{ XCPUFUNC(op_8139_0), 0, 33081 }, /* OR */
-{ XCPUFUNC(op_8140_0), 0, 33088 }, /* PACK */
-{ XCPUFUNC(op_8148_0), 0, 33096 }, /* PACK */
-{ XCPUFUNC(op_8150_0), 0, 33104 }, /* OR */
-{ XCPUFUNC(op_8158_0), 0, 33112 }, /* OR */
-{ XCPUFUNC(op_8160_0), 0, 33120 }, /* OR */
-{ XCPUFUNC(op_8168_0), 0, 33128 }, /* OR */
-{ XCPUFUNC(op_8170_0), 0, 33136 }, /* OR */
-{ XCPUFUNC(op_8178_0), 0, 33144 }, /* OR */
-{ XCPUFUNC(op_8179_0), 0, 33145 }, /* OR */
-{ XCPUFUNC(op_8180_0), 0, 33152 }, /* UNPK */
-{ XCPUFUNC(op_8188_0), 0, 33160 }, /* UNPK */
-{ XCPUFUNC(op_8190_0), 0, 33168 }, /* OR */
-{ XCPUFUNC(op_8198_0), 0, 33176 }, /* OR */
-{ XCPUFUNC(op_81a0_0), 0, 33184 }, /* OR */
-{ XCPUFUNC(op_81a8_0), 0, 33192 }, /* OR */
-{ XCPUFUNC(op_81b0_0), 0, 33200 }, /* OR */
-{ XCPUFUNC(op_81b8_0), 0, 33208 }, /* OR */
-{ XCPUFUNC(op_81b9_0), 0, 33209 }, /* OR */
-{ XCPUFUNC(op_81c0_0), 0, 33216 }, /* DIVS */
-{ XCPUFUNC(op_81d0_0), 0, 33232 }, /* DIVS */
-{ XCPUFUNC(op_81d8_0), 0, 33240 }, /* DIVS */
-{ XCPUFUNC(op_81e0_0), 0, 33248 }, /* DIVS */
-{ XCPUFUNC(op_81e8_0), 0, 33256 }, /* DIVS */
-{ XCPUFUNC(op_81f0_0), 0, 33264 }, /* DIVS */
-{ XCPUFUNC(op_81f8_0), 0, 33272 }, /* DIVS */
-{ XCPUFUNC(op_81f9_0), 0, 33273 }, /* DIVS */
-{ XCPUFUNC(op_81fa_0), 0, 33274 }, /* DIVS */
-{ XCPUFUNC(op_81fb_0), 0, 33275 }, /* DIVS */
-{ XCPUFUNC(op_81fc_0), 0, 33276 }, /* DIVS */
-{ XCPUFUNC(op_9000_0), 0, 36864 }, /* SUB */
-{ XCPUFUNC(op_9010_0), 0, 36880 }, /* SUB */
-{ XCPUFUNC(op_9018_0), 0, 36888 }, /* SUB */
-{ XCPUFUNC(op_9020_0), 0, 36896 }, /* SUB */
-{ XCPUFUNC(op_9028_0), 0, 36904 }, /* SUB */
-{ XCPUFUNC(op_9030_0), 0, 36912 }, /* SUB */
-{ XCPUFUNC(op_9038_0), 0, 36920 }, /* SUB */
-{ XCPUFUNC(op_9039_0), 0, 36921 }, /* SUB */
-{ XCPUFUNC(op_903a_0), 0, 36922 }, /* SUB */
-{ XCPUFUNC(op_903b_0), 0, 36923 }, /* SUB */
-{ XCPUFUNC(op_903c_0), 0, 36924 }, /* SUB */
-{ XCPUFUNC(op_9040_0), 0, 36928 }, /* SUB */
-{ XCPUFUNC(op_9048_0), 0, 36936 }, /* SUB */
-{ XCPUFUNC(op_9050_0), 0, 36944 }, /* SUB */
-{ XCPUFUNC(op_9058_0), 0, 36952 }, /* SUB */
-{ XCPUFUNC(op_9060_0), 0, 36960 }, /* SUB */
-{ XCPUFUNC(op_9068_0), 0, 36968 }, /* SUB */
-{ XCPUFUNC(op_9070_0), 0, 36976 }, /* SUB */
-{ XCPUFUNC(op_9078_0), 0, 36984 }, /* SUB */
-{ XCPUFUNC(op_9079_0), 0, 36985 }, /* SUB */
-{ XCPUFUNC(op_907a_0), 0, 36986 }, /* SUB */
-{ XCPUFUNC(op_907b_0), 0, 36987 }, /* SUB */
-{ XCPUFUNC(op_907c_0), 0, 36988 }, /* SUB */
-{ XCPUFUNC(op_9080_0), 0, 36992 }, /* SUB */
-{ XCPUFUNC(op_9088_0), 0, 37000 }, /* SUB */
-{ XCPUFUNC(op_9090_0), 0, 37008 }, /* SUB */
-{ XCPUFUNC(op_9098_0), 0, 37016 }, /* SUB */
-{ XCPUFUNC(op_90a0_0), 0, 37024 }, /* SUB */
-{ XCPUFUNC(op_90a8_0), 0, 37032 }, /* SUB */
-{ XCPUFUNC(op_90b0_0), 0, 37040 }, /* SUB */
-{ XCPUFUNC(op_90b8_0), 0, 37048 }, /* SUB */
-{ XCPUFUNC(op_90b9_0), 0, 37049 }, /* SUB */
-{ XCPUFUNC(op_90ba_0), 0, 37050 }, /* SUB */
-{ XCPUFUNC(op_90bb_0), 0, 37051 }, /* SUB */
-{ XCPUFUNC(op_90bc_0), 0, 37052 }, /* SUB */
-{ XCPUFUNC(op_90c0_0), 0, 37056 }, /* SUBA */
-{ XCPUFUNC(op_90c8_0), 0, 37064 }, /* SUBA */
-{ XCPUFUNC(op_90d0_0), 0, 37072 }, /* SUBA */
-{ XCPUFUNC(op_90d8_0), 0, 37080 }, /* SUBA */
-{ XCPUFUNC(op_90e0_0), 0, 37088 }, /* SUBA */
-{ XCPUFUNC(op_90e8_0), 0, 37096 }, /* SUBA */
-{ XCPUFUNC(op_90f0_0), 0, 37104 }, /* SUBA */
-{ XCPUFUNC(op_90f8_0), 0, 37112 }, /* SUBA */
-{ XCPUFUNC(op_90f9_0), 0, 37113 }, /* SUBA */
-{ XCPUFUNC(op_90fa_0), 0, 37114 }, /* SUBA */
-{ XCPUFUNC(op_90fb_0), 0, 37115 }, /* SUBA */
-{ XCPUFUNC(op_90fc_0), 0, 37116 }, /* SUBA */
-{ XCPUFUNC(op_9100_0), 0, 37120 }, /* SUBX */
-{ XCPUFUNC(op_9108_0), 0, 37128 }, /* SUBX */
-{ XCPUFUNC(op_9110_0), 0, 37136 }, /* SUB */
-{ XCPUFUNC(op_9118_0), 0, 37144 }, /* SUB */
-{ XCPUFUNC(op_9120_0), 0, 37152 }, /* SUB */
-{ XCPUFUNC(op_9128_0), 0, 37160 }, /* SUB */
-{ XCPUFUNC(op_9130_0), 0, 37168 }, /* SUB */
-{ XCPUFUNC(op_9138_0), 0, 37176 }, /* SUB */
-{ XCPUFUNC(op_9139_0), 0, 37177 }, /* SUB */
-{ XCPUFUNC(op_9140_0), 0, 37184 }, /* SUBX */
-{ XCPUFUNC(op_9148_0), 0, 37192 }, /* SUBX */
-{ XCPUFUNC(op_9150_0), 0, 37200 }, /* SUB */
-{ XCPUFUNC(op_9158_0), 0, 37208 }, /* SUB */
-{ XCPUFUNC(op_9160_0), 0, 37216 }, /* SUB */
-{ XCPUFUNC(op_9168_0), 0, 37224 }, /* SUB */
-{ XCPUFUNC(op_9170_0), 0, 37232 }, /* SUB */
-{ XCPUFUNC(op_9178_0), 0, 37240 }, /* SUB */
-{ XCPUFUNC(op_9179_0), 0, 37241 }, /* SUB */
-{ XCPUFUNC(op_9180_0), 0, 37248 }, /* SUBX */
-{ XCPUFUNC(op_9188_0), 0, 37256 }, /* SUBX */
-{ XCPUFUNC(op_9190_0), 0, 37264 }, /* SUB */
-{ XCPUFUNC(op_9198_0), 0, 37272 }, /* SUB */
-{ XCPUFUNC(op_91a0_0), 0, 37280 }, /* SUB */
-{ XCPUFUNC(op_91a8_0), 0, 37288 }, /* SUB */
-{ XCPUFUNC(op_91b0_0), 0, 37296 }, /* SUB */
-{ XCPUFUNC(op_91b8_0), 0, 37304 }, /* SUB */
-{ XCPUFUNC(op_91b9_0), 0, 37305 }, /* SUB */
-{ XCPUFUNC(op_91c0_0), 0, 37312 }, /* SUBA */
-{ XCPUFUNC(op_91c8_0), 0, 37320 }, /* SUBA */
-{ XCPUFUNC(op_91d0_0), 0, 37328 }, /* SUBA */
-{ XCPUFUNC(op_91d8_0), 0, 37336 }, /* SUBA */
-{ XCPUFUNC(op_91e0_0), 0, 37344 }, /* SUBA */
-{ XCPUFUNC(op_91e8_0), 0, 37352 }, /* SUBA */
-{ XCPUFUNC(op_91f0_0), 0, 37360 }, /* SUBA */
-{ XCPUFUNC(op_91f8_0), 0, 37368 }, /* SUBA */
-{ XCPUFUNC(op_91f9_0), 0, 37369 }, /* SUBA */
-{ XCPUFUNC(op_91fa_0), 0, 37370 }, /* SUBA */
-{ XCPUFUNC(op_91fb_0), 0, 37371 }, /* SUBA */
-{ XCPUFUNC(op_91fc_0), 0, 37372 }, /* SUBA */
-{ XCPUFUNC(op_b000_0), 0, 45056 }, /* CMP */
-{ XCPUFUNC(op_b010_0), 0, 45072 }, /* CMP */
-{ XCPUFUNC(op_b018_0), 0, 45080 }, /* CMP */
-{ XCPUFUNC(op_b020_0), 0, 45088 }, /* CMP */
-{ XCPUFUNC(op_b028_0), 0, 45096 }, /* CMP */
-{ XCPUFUNC(op_b030_0), 0, 45104 }, /* CMP */
-{ XCPUFUNC(op_b038_0), 0, 45112 }, /* CMP */
-{ XCPUFUNC(op_b039_0), 0, 45113 }, /* CMP */
-{ XCPUFUNC(op_b03a_0), 0, 45114 }, /* CMP */
-{ XCPUFUNC(op_b03b_0), 0, 45115 }, /* CMP */
-{ XCPUFUNC(op_b03c_0), 0, 45116 }, /* CMP */
-{ XCPUFUNC(op_b040_0), 0, 45120 }, /* CMP */
-{ XCPUFUNC(op_b048_0), 0, 45128 }, /* CMP */
-{ XCPUFUNC(op_b050_0), 0, 45136 }, /* CMP */
-{ XCPUFUNC(op_b058_0), 0, 45144 }, /* CMP */
-{ XCPUFUNC(op_b060_0), 0, 45152 }, /* CMP */
-{ XCPUFUNC(op_b068_0), 0, 45160 }, /* CMP */
-{ XCPUFUNC(op_b070_0), 0, 45168 }, /* CMP */
-{ XCPUFUNC(op_b078_0), 0, 45176 }, /* CMP */
-{ XCPUFUNC(op_b079_0), 0, 45177 }, /* CMP */
-{ XCPUFUNC(op_b07a_0), 0, 45178 }, /* CMP */
-{ XCPUFUNC(op_b07b_0), 0, 45179 }, /* CMP */
-{ XCPUFUNC(op_b07c_0), 0, 45180 }, /* CMP */
-{ XCPUFUNC(op_b080_0), 0, 45184 }, /* CMP */
-{ XCPUFUNC(op_b088_0), 0, 45192 }, /* CMP */
-{ XCPUFUNC(op_b090_0), 0, 45200 }, /* CMP */
-{ XCPUFUNC(op_b098_0), 0, 45208 }, /* CMP */
-{ XCPUFUNC(op_b0a0_0), 0, 45216 }, /* CMP */
-{ XCPUFUNC(op_b0a8_0), 0, 45224 }, /* CMP */
-{ XCPUFUNC(op_b0b0_0), 0, 45232 }, /* CMP */
-{ XCPUFUNC(op_b0b8_0), 0, 45240 }, /* CMP */
-{ XCPUFUNC(op_b0b9_0), 0, 45241 }, /* CMP */
-{ XCPUFUNC(op_b0ba_0), 0, 45242 }, /* CMP */
-{ XCPUFUNC(op_b0bb_0), 0, 45243 }, /* CMP */
-{ XCPUFUNC(op_b0bc_0), 0, 45244 }, /* CMP */
-{ XCPUFUNC(op_b0c0_0), 0, 45248 }, /* CMPA */
-{ XCPUFUNC(op_b0c8_0), 0, 45256 }, /* CMPA */
-{ XCPUFUNC(op_b0d0_0), 0, 45264 }, /* CMPA */
-{ XCPUFUNC(op_b0d8_0), 0, 45272 }, /* CMPA */
-{ XCPUFUNC(op_b0e0_0), 0, 45280 }, /* CMPA */
-{ XCPUFUNC(op_b0e8_0), 0, 45288 }, /* CMPA */
-{ XCPUFUNC(op_b0f0_0), 0, 45296 }, /* CMPA */
-{ XCPUFUNC(op_b0f8_0), 0, 45304 }, /* CMPA */
-{ XCPUFUNC(op_b0f9_0), 0, 45305 }, /* CMPA */
-{ XCPUFUNC(op_b0fa_0), 0, 45306 }, /* CMPA */
-{ XCPUFUNC(op_b0fb_0), 0, 45307 }, /* CMPA */
-{ XCPUFUNC(op_b0fc_0), 0, 45308 }, /* CMPA */
-{ XCPUFUNC(op_b100_0), 0, 45312 }, /* EOR */
-{ XCPUFUNC(op_b108_0), 0, 45320 }, /* CMPM */
-{ XCPUFUNC(op_b110_0), 0, 45328 }, /* EOR */
-{ XCPUFUNC(op_b118_0), 0, 45336 }, /* EOR */
-{ XCPUFUNC(op_b120_0), 0, 45344 }, /* EOR */
-{ XCPUFUNC(op_b128_0), 0, 45352 }, /* EOR */
-{ XCPUFUNC(op_b130_0), 0, 45360 }, /* EOR */
-{ XCPUFUNC(op_b138_0), 0, 45368 }, /* EOR */
-{ XCPUFUNC(op_b139_0), 0, 45369 }, /* EOR */
-{ XCPUFUNC(op_b140_0), 0, 45376 }, /* EOR */
-{ XCPUFUNC(op_b148_0), 0, 45384 }, /* CMPM */
-{ XCPUFUNC(op_b150_0), 0, 45392 }, /* EOR */
-{ XCPUFUNC(op_b158_0), 0, 45400 }, /* EOR */
-{ XCPUFUNC(op_b160_0), 0, 45408 }, /* EOR */
-{ XCPUFUNC(op_b168_0), 0, 45416 }, /* EOR */
-{ XCPUFUNC(op_b170_0), 0, 45424 }, /* EOR */
-{ XCPUFUNC(op_b178_0), 0, 45432 }, /* EOR */
-{ XCPUFUNC(op_b179_0), 0, 45433 }, /* EOR */
-{ XCPUFUNC(op_b180_0), 0, 45440 }, /* EOR */
-{ XCPUFUNC(op_b188_0), 0, 45448 }, /* CMPM */
-{ XCPUFUNC(op_b190_0), 0, 45456 }, /* EOR */
-{ XCPUFUNC(op_b198_0), 0, 45464 }, /* EOR */
-{ XCPUFUNC(op_b1a0_0), 0, 45472 }, /* EOR */
-{ XCPUFUNC(op_b1a8_0), 0, 45480 }, /* EOR */
-{ XCPUFUNC(op_b1b0_0), 0, 45488 }, /* EOR */
-{ XCPUFUNC(op_b1b8_0), 0, 45496 }, /* EOR */
-{ XCPUFUNC(op_b1b9_0), 0, 45497 }, /* EOR */
-{ XCPUFUNC(op_b1c0_0), 0, 45504 }, /* CMPA */
-{ XCPUFUNC(op_b1c8_0), 0, 45512 }, /* CMPA */
-{ XCPUFUNC(op_b1d0_0), 0, 45520 }, /* CMPA */
-{ XCPUFUNC(op_b1d8_0), 0, 45528 }, /* CMPA */
-{ XCPUFUNC(op_b1e0_0), 0, 45536 }, /* CMPA */
-{ XCPUFUNC(op_b1e8_0), 0, 45544 }, /* CMPA */
-{ XCPUFUNC(op_b1f0_0), 0, 45552 }, /* CMPA */
-{ XCPUFUNC(op_b1f8_0), 0, 45560 }, /* CMPA */
-{ XCPUFUNC(op_b1f9_0), 0, 45561 }, /* CMPA */
-{ XCPUFUNC(op_b1fa_0), 0, 45562 }, /* CMPA */
-{ XCPUFUNC(op_b1fb_0), 0, 45563 }, /* CMPA */
-{ XCPUFUNC(op_b1fc_0), 0, 45564 }, /* CMPA */
-{ XCPUFUNC(op_c000_0), 0, 49152 }, /* AND */
-{ XCPUFUNC(op_c010_0), 0, 49168 }, /* AND */
-{ XCPUFUNC(op_c018_0), 0, 49176 }, /* AND */
-{ XCPUFUNC(op_c020_0), 0, 49184 }, /* AND */
-{ XCPUFUNC(op_c028_0), 0, 49192 }, /* AND */
-{ XCPUFUNC(op_c030_0), 0, 49200 }, /* AND */
-{ XCPUFUNC(op_c038_0), 0, 49208 }, /* AND */
-{ XCPUFUNC(op_c039_0), 0, 49209 }, /* AND */
-{ XCPUFUNC(op_c03a_0), 0, 49210 }, /* AND */
-{ XCPUFUNC(op_c03b_0), 0, 49211 }, /* AND */
-{ XCPUFUNC(op_c03c_0), 0, 49212 }, /* AND */
-{ XCPUFUNC(op_c040_0), 0, 49216 }, /* AND */
-{ XCPUFUNC(op_c050_0), 0, 49232 }, /* AND */
-{ XCPUFUNC(op_c058_0), 0, 49240 }, /* AND */
-{ XCPUFUNC(op_c060_0), 0, 49248 }, /* AND */
-{ XCPUFUNC(op_c068_0), 0, 49256 }, /* AND */
-{ XCPUFUNC(op_c070_0), 0, 49264 }, /* AND */
-{ XCPUFUNC(op_c078_0), 0, 49272 }, /* AND */
-{ XCPUFUNC(op_c079_0), 0, 49273 }, /* AND */
-{ XCPUFUNC(op_c07a_0), 0, 49274 }, /* AND */
-{ XCPUFUNC(op_c07b_0), 0, 49275 }, /* AND */
-{ XCPUFUNC(op_c07c_0), 0, 49276 }, /* AND */
-{ XCPUFUNC(op_c080_0), 0, 49280 }, /* AND */
-{ XCPUFUNC(op_c090_0), 0, 49296 }, /* AND */
-{ XCPUFUNC(op_c098_0), 0, 49304 }, /* AND */
-{ XCPUFUNC(op_c0a0_0), 0, 49312 }, /* AND */
-{ XCPUFUNC(op_c0a8_0), 0, 49320 }, /* AND */
-{ XCPUFUNC(op_c0b0_0), 0, 49328 }, /* AND */
-{ XCPUFUNC(op_c0b8_0), 0, 49336 }, /* AND */
-{ XCPUFUNC(op_c0b9_0), 0, 49337 }, /* AND */
-{ XCPUFUNC(op_c0ba_0), 0, 49338 }, /* AND */
-{ XCPUFUNC(op_c0bb_0), 0, 49339 }, /* AND */
-{ XCPUFUNC(op_c0bc_0), 0, 49340 }, /* AND */
-{ XCPUFUNC(op_c0c0_0), 0, 49344 }, /* MULU */
-{ XCPUFUNC(op_c0d0_0), 0, 49360 }, /* MULU */
-{ XCPUFUNC(op_c0d8_0), 0, 49368 }, /* MULU */
-{ XCPUFUNC(op_c0e0_0), 0, 49376 }, /* MULU */
-{ XCPUFUNC(op_c0e8_0), 0, 49384 }, /* MULU */
-{ XCPUFUNC(op_c0f0_0), 0, 49392 }, /* MULU */
-{ XCPUFUNC(op_c0f8_0), 0, 49400 }, /* MULU */
-{ XCPUFUNC(op_c0f9_0), 0, 49401 }, /* MULU */
-{ XCPUFUNC(op_c0fa_0), 0, 49402 }, /* MULU */
-{ XCPUFUNC(op_c0fb_0), 0, 49403 }, /* MULU */
-{ XCPUFUNC(op_c0fc_0), 0, 49404 }, /* MULU */
-{ XCPUFUNC(op_c100_0), 0, 49408 }, /* ABCD */
-{ XCPUFUNC(op_c108_0), 0, 49416 }, /* ABCD */
-{ XCPUFUNC(op_c110_0), 0, 49424 }, /* AND */
-{ XCPUFUNC(op_c118_0), 0, 49432 }, /* AND */
-{ XCPUFUNC(op_c120_0), 0, 49440 }, /* AND */
-{ XCPUFUNC(op_c128_0), 0, 49448 }, /* AND */
-{ XCPUFUNC(op_c130_0), 0, 49456 }, /* AND */
-{ XCPUFUNC(op_c138_0), 0, 49464 }, /* AND */
-{ XCPUFUNC(op_c139_0), 0, 49465 }, /* AND */
-{ XCPUFUNC(op_c140_0), 0, 49472 }, /* EXG */
-{ XCPUFUNC(op_c148_0), 0, 49480 }, /* EXG */
-{ XCPUFUNC(op_c150_0), 0, 49488 }, /* AND */
-{ XCPUFUNC(op_c158_0), 0, 49496 }, /* AND */
-{ XCPUFUNC(op_c160_0), 0, 49504 }, /* AND */
-{ XCPUFUNC(op_c168_0), 0, 49512 }, /* AND */
-{ XCPUFUNC(op_c170_0), 0, 49520 }, /* AND */
-{ XCPUFUNC(op_c178_0), 0, 49528 }, /* AND */
-{ XCPUFUNC(op_c179_0), 0, 49529 }, /* AND */
-{ XCPUFUNC(op_c188_0), 0, 49544 }, /* EXG */
-{ XCPUFUNC(op_c190_0), 0, 49552 }, /* AND */
-{ XCPUFUNC(op_c198_0), 0, 49560 }, /* AND */
-{ XCPUFUNC(op_c1a0_0), 0, 49568 }, /* AND */
-{ XCPUFUNC(op_c1a8_0), 0, 49576 }, /* AND */
-{ XCPUFUNC(op_c1b0_0), 0, 49584 }, /* AND */
-{ XCPUFUNC(op_c1b8_0), 0, 49592 }, /* AND */
-{ XCPUFUNC(op_c1b9_0), 0, 49593 }, /* AND */
-{ XCPUFUNC(op_c1c0_0), 0, 49600 }, /* MULS */
-{ XCPUFUNC(op_c1d0_0), 0, 49616 }, /* MULS */
-{ XCPUFUNC(op_c1d8_0), 0, 49624 }, /* MULS */
-{ XCPUFUNC(op_c1e0_0), 0, 49632 }, /* MULS */
-{ XCPUFUNC(op_c1e8_0), 0, 49640 }, /* MULS */
-{ XCPUFUNC(op_c1f0_0), 0, 49648 }, /* MULS */
-{ XCPUFUNC(op_c1f8_0), 0, 49656 }, /* MULS */
-{ XCPUFUNC(op_c1f9_0), 0, 49657 }, /* MULS */
-{ XCPUFUNC(op_c1fa_0), 0, 49658 }, /* MULS */
-{ XCPUFUNC(op_c1fb_0), 0, 49659 }, /* MULS */
-{ XCPUFUNC(op_c1fc_0), 0, 49660 }, /* MULS */
-{ XCPUFUNC(op_d000_0), 0, 53248 }, /* ADD */
-{ XCPUFUNC(op_d010_0), 0, 53264 }, /* ADD */
-{ XCPUFUNC(op_d018_0), 0, 53272 }, /* ADD */
-{ XCPUFUNC(op_d020_0), 0, 53280 }, /* ADD */
-{ XCPUFUNC(op_d028_0), 0, 53288 }, /* ADD */
-{ XCPUFUNC(op_d030_0), 0, 53296 }, /* ADD */
-{ XCPUFUNC(op_d038_0), 0, 53304 }, /* ADD */
-{ XCPUFUNC(op_d039_0), 0, 53305 }, /* ADD */
-{ XCPUFUNC(op_d03a_0), 0, 53306 }, /* ADD */
-{ XCPUFUNC(op_d03b_0), 0, 53307 }, /* ADD */
-{ XCPUFUNC(op_d03c_0), 0, 53308 }, /* ADD */
-{ XCPUFUNC(op_d040_0), 0, 53312 }, /* ADD */
-{ XCPUFUNC(op_d048_0), 0, 53320 }, /* ADD */
-{ XCPUFUNC(op_d050_0), 0, 53328 }, /* ADD */
-{ XCPUFUNC(op_d058_0), 0, 53336 }, /* ADD */
-{ XCPUFUNC(op_d060_0), 0, 53344 }, /* ADD */
-{ XCPUFUNC(op_d068_0), 0, 53352 }, /* ADD */
-{ XCPUFUNC(op_d070_0), 0, 53360 }, /* ADD */
-{ XCPUFUNC(op_d078_0), 0, 53368 }, /* ADD */
-{ XCPUFUNC(op_d079_0), 0, 53369 }, /* ADD */
-{ XCPUFUNC(op_d07a_0), 0, 53370 }, /* ADD */
-{ XCPUFUNC(op_d07b_0), 0, 53371 }, /* ADD */
-{ XCPUFUNC(op_d07c_0), 0, 53372 }, /* ADD */
-{ XCPUFUNC(op_d080_0), 0, 53376 }, /* ADD */
-{ XCPUFUNC(op_d088_0), 0, 53384 }, /* ADD */
-{ XCPUFUNC(op_d090_0), 0, 53392 }, /* ADD */
-{ XCPUFUNC(op_d098_0), 0, 53400 }, /* ADD */
-{ XCPUFUNC(op_d0a0_0), 0, 53408 }, /* ADD */
-{ XCPUFUNC(op_d0a8_0), 0, 53416 }, /* ADD */
-{ XCPUFUNC(op_d0b0_0), 0, 53424 }, /* ADD */
-{ XCPUFUNC(op_d0b8_0), 0, 53432 }, /* ADD */
-{ XCPUFUNC(op_d0b9_0), 0, 53433 }, /* ADD */
-{ XCPUFUNC(op_d0ba_0), 0, 53434 }, /* ADD */
-{ XCPUFUNC(op_d0bb_0), 0, 53435 }, /* ADD */
-{ XCPUFUNC(op_d0bc_0), 0, 53436 }, /* ADD */
-{ XCPUFUNC(op_d0c0_0), 0, 53440 }, /* ADDA */
-{ XCPUFUNC(op_d0c8_0), 0, 53448 }, /* ADDA */
-{ XCPUFUNC(op_d0d0_0), 0, 53456 }, /* ADDA */
-{ XCPUFUNC(op_d0d8_0), 0, 53464 }, /* ADDA */
-{ XCPUFUNC(op_d0e0_0), 0, 53472 }, /* ADDA */
-{ XCPUFUNC(op_d0e8_0), 0, 53480 }, /* ADDA */
-{ XCPUFUNC(op_d0f0_0), 0, 53488 }, /* ADDA */
-{ XCPUFUNC(op_d0f8_0), 0, 53496 }, /* ADDA */
-{ XCPUFUNC(op_d0f9_0), 0, 53497 }, /* ADDA */
-{ XCPUFUNC(op_d0fa_0), 0, 53498 }, /* ADDA */
-{ XCPUFUNC(op_d0fb_0), 0, 53499 }, /* ADDA */
-{ XCPUFUNC(op_d0fc_0), 0, 53500 }, /* ADDA */
-{ XCPUFUNC(op_d100_0), 0, 53504 }, /* ADDX */
-{ XCPUFUNC(op_d108_0), 0, 53512 }, /* ADDX */
-{ XCPUFUNC(op_d110_0), 0, 53520 }, /* ADD */
-{ XCPUFUNC(op_d118_0), 0, 53528 }, /* ADD */
-{ XCPUFUNC(op_d120_0), 0, 53536 }, /* ADD */
-{ XCPUFUNC(op_d128_0), 0, 53544 }, /* ADD */
-{ XCPUFUNC(op_d130_0), 0, 53552 }, /* ADD */
-{ XCPUFUNC(op_d138_0), 0, 53560 }, /* ADD */
-{ XCPUFUNC(op_d139_0), 0, 53561 }, /* ADD */
-{ XCPUFUNC(op_d140_0), 0, 53568 }, /* ADDX */
-{ XCPUFUNC(op_d148_0), 0, 53576 }, /* ADDX */
-{ XCPUFUNC(op_d150_0), 0, 53584 }, /* ADD */
-{ XCPUFUNC(op_d158_0), 0, 53592 }, /* ADD */
-{ XCPUFUNC(op_d160_0), 0, 53600 }, /* ADD */
-{ XCPUFUNC(op_d168_0), 0, 53608 }, /* ADD */
-{ XCPUFUNC(op_d170_0), 0, 53616 }, /* ADD */
-{ XCPUFUNC(op_d178_0), 0, 53624 }, /* ADD */
-{ XCPUFUNC(op_d179_0), 0, 53625 }, /* ADD */
-{ XCPUFUNC(op_d180_0), 0, 53632 }, /* ADDX */
-{ XCPUFUNC(op_d188_0), 0, 53640 }, /* ADDX */
-{ XCPUFUNC(op_d190_0), 0, 53648 }, /* ADD */
-{ XCPUFUNC(op_d198_0), 0, 53656 }, /* ADD */
-{ XCPUFUNC(op_d1a0_0), 0, 53664 }, /* ADD */
-{ XCPUFUNC(op_d1a8_0), 0, 53672 }, /* ADD */
-{ XCPUFUNC(op_d1b0_0), 0, 53680 }, /* ADD */
-{ XCPUFUNC(op_d1b8_0), 0, 53688 }, /* ADD */
-{ XCPUFUNC(op_d1b9_0), 0, 53689 }, /* ADD */
-{ XCPUFUNC(op_d1c0_0), 0, 53696 }, /* ADDA */
-{ XCPUFUNC(op_d1c8_0), 0, 53704 }, /* ADDA */
-{ XCPUFUNC(op_d1d0_0), 0, 53712 }, /* ADDA */
-{ XCPUFUNC(op_d1d8_0), 0, 53720 }, /* ADDA */
-{ XCPUFUNC(op_d1e0_0), 0, 53728 }, /* ADDA */
-{ XCPUFUNC(op_d1e8_0), 0, 53736 }, /* ADDA */
-{ XCPUFUNC(op_d1f0_0), 0, 53744 }, /* ADDA */
-{ XCPUFUNC(op_d1f8_0), 0, 53752 }, /* ADDA */
-{ XCPUFUNC(op_d1f9_0), 0, 53753 }, /* ADDA */
-{ XCPUFUNC(op_d1fa_0), 0, 53754 }, /* ADDA */
-{ XCPUFUNC(op_d1fb_0), 0, 53755 }, /* ADDA */
-{ XCPUFUNC(op_d1fc_0), 0, 53756 }, /* ADDA */
-{ XCPUFUNC(op_e000_0), 0, 57344 }, /* ASR */
-{ XCPUFUNC(op_e008_0), 0, 57352 }, /* LSR */
-{ XCPUFUNC(op_e010_0), 0, 57360 }, /* ROXR */
-{ XCPUFUNC(op_e018_0), 0, 57368 }, /* ROR */
-{ XCPUFUNC(op_e020_0), 0, 57376 }, /* ASR */
-{ XCPUFUNC(op_e028_0), 0, 57384 }, /* LSR */
-{ XCPUFUNC(op_e030_0), 0, 57392 }, /* ROXR */
-{ XCPUFUNC(op_e038_0), 0, 57400 }, /* ROR */
-{ XCPUFUNC(op_e040_0), 0, 57408 }, /* ASR */
-{ XCPUFUNC(op_e048_0), 0, 57416 }, /* LSR */
-{ XCPUFUNC(op_e050_0), 0, 57424 }, /* ROXR */
-{ XCPUFUNC(op_e058_0), 0, 57432 }, /* ROR */
-{ XCPUFUNC(op_e060_0), 0, 57440 }, /* ASR */
-{ XCPUFUNC(op_e068_0), 0, 57448 }, /* LSR */
-{ XCPUFUNC(op_e070_0), 0, 57456 }, /* ROXR */
-{ XCPUFUNC(op_e078_0), 0, 57464 }, /* ROR */
-{ XCPUFUNC(op_e080_0), 0, 57472 }, /* ASR */
-{ XCPUFUNC(op_e088_0), 0, 57480 }, /* LSR */
-{ XCPUFUNC(op_e090_0), 0, 57488 }, /* ROXR */
-{ XCPUFUNC(op_e098_0), 0, 57496 }, /* ROR */
-{ XCPUFUNC(op_e0a0_0), 0, 57504 }, /* ASR */
-{ XCPUFUNC(op_e0a8_0), 0, 57512 }, /* LSR */
-{ XCPUFUNC(op_e0b0_0), 0, 57520 }, /* ROXR */
-{ XCPUFUNC(op_e0b8_0), 0, 57528 }, /* ROR */
-{ XCPUFUNC(op_e0d0_0), 0, 57552 }, /* ASRW */
-{ XCPUFUNC(op_e0d8_0), 0, 57560 }, /* ASRW */
-{ XCPUFUNC(op_e0e0_0), 0, 57568 }, /* ASRW */
-{ XCPUFUNC(op_e0e8_0), 0, 57576 }, /* ASRW */
-{ XCPUFUNC(op_e0f0_0), 0, 57584 }, /* ASRW */
-{ XCPUFUNC(op_e0f8_0), 0, 57592 }, /* ASRW */
-{ XCPUFUNC(op_e0f9_0), 0, 57593 }, /* ASRW */
-{ XCPUFUNC(op_e100_0), 0, 57600 }, /* ASL */
-{ XCPUFUNC(op_e108_0), 0, 57608 }, /* LSL */
-{ XCPUFUNC(op_e110_0), 0, 57616 }, /* ROXL */
-{ XCPUFUNC(op_e118_0), 0, 57624 }, /* ROL */
-{ XCPUFUNC(op_e120_0), 0, 57632 }, /* ASL */
-{ XCPUFUNC(op_e128_0), 0, 57640 }, /* LSL */
-{ XCPUFUNC(op_e130_0), 0, 57648 }, /* ROXL */
-{ XCPUFUNC(op_e138_0), 0, 57656 }, /* ROL */
-{ XCPUFUNC(op_e140_0), 0, 57664 }, /* ASL */
-{ XCPUFUNC(op_e148_0), 0, 57672 }, /* LSL */
-{ XCPUFUNC(op_e150_0), 0, 57680 }, /* ROXL */
-{ XCPUFUNC(op_e158_0), 0, 57688 }, /* ROL */
-{ XCPUFUNC(op_e160_0), 0, 57696 }, /* ASL */
-{ XCPUFUNC(op_e168_0), 0, 57704 }, /* LSL */
-{ XCPUFUNC(op_e170_0), 0, 57712 }, /* ROXL */
-{ XCPUFUNC(op_e178_0), 0, 57720 }, /* ROL */
-{ XCPUFUNC(op_e180_0), 0, 57728 }, /* ASL */
-{ XCPUFUNC(op_e188_0), 0, 57736 }, /* LSL */
-{ XCPUFUNC(op_e190_0), 0, 57744 }, /* ROXL */
-{ XCPUFUNC(op_e198_0), 0, 57752 }, /* ROL */
-{ XCPUFUNC(op_e1a0_0), 0, 57760 }, /* ASL */
-{ XCPUFUNC(op_e1a8_0), 0, 57768 }, /* LSL */
-{ XCPUFUNC(op_e1b0_0), 0, 57776 }, /* ROXL */
-{ XCPUFUNC(op_e1b8_0), 0, 57784 }, /* ROL */
-{ XCPUFUNC(op_e1d0_0), 0, 57808 }, /* ASLW */
-{ XCPUFUNC(op_e1d8_0), 0, 57816 }, /* ASLW */
-{ XCPUFUNC(op_e1e0_0), 0, 57824 }, /* ASLW */
-{ XCPUFUNC(op_e1e8_0), 0, 57832 }, /* ASLW */
-{ XCPUFUNC(op_e1f0_0), 0, 57840 }, /* ASLW */
-{ XCPUFUNC(op_e1f8_0), 0, 57848 }, /* ASLW */
-{ XCPUFUNC(op_e1f9_0), 0, 57849 }, /* ASLW */
-{ XCPUFUNC(op_e2d0_0), 0, 58064 }, /* LSRW */
-{ XCPUFUNC(op_e2d8_0), 0, 58072 }, /* LSRW */
-{ XCPUFUNC(op_e2e0_0), 0, 58080 }, /* LSRW */
-{ XCPUFUNC(op_e2e8_0), 0, 58088 }, /* LSRW */
-{ XCPUFUNC(op_e2f0_0), 0, 58096 }, /* LSRW */
-{ XCPUFUNC(op_e2f8_0), 0, 58104 }, /* LSRW */
-{ XCPUFUNC(op_e2f9_0), 0, 58105 }, /* LSRW */
-{ XCPUFUNC(op_e3d0_0), 0, 58320 }, /* LSLW */
-{ XCPUFUNC(op_e3d8_0), 0, 58328 }, /* LSLW */
-{ XCPUFUNC(op_e3e0_0), 0, 58336 }, /* LSLW */
-{ XCPUFUNC(op_e3e8_0), 0, 58344 }, /* LSLW */
-{ XCPUFUNC(op_e3f0_0), 0, 58352 }, /* LSLW */
-{ XCPUFUNC(op_e3f8_0), 0, 58360 }, /* LSLW */
-{ XCPUFUNC(op_e3f9_0), 0, 58361 }, /* LSLW */
-{ XCPUFUNC(op_e4d0_0), 0, 58576 }, /* ROXRW */
-{ XCPUFUNC(op_e4d8_0), 0, 58584 }, /* ROXRW */
-{ XCPUFUNC(op_e4e0_0), 0, 58592 }, /* ROXRW */
-{ XCPUFUNC(op_e4e8_0), 0, 58600 }, /* ROXRW */
-{ XCPUFUNC(op_e4f0_0), 0, 58608 }, /* ROXRW */
-{ XCPUFUNC(op_e4f8_0), 0, 58616 }, /* ROXRW */
-{ XCPUFUNC(op_e4f9_0), 0, 58617 }, /* ROXRW */
-{ XCPUFUNC(op_e5d0_0), 0, 58832 }, /* ROXLW */
-{ XCPUFUNC(op_e5d8_0), 0, 58840 }, /* ROXLW */
-{ XCPUFUNC(op_e5e0_0), 0, 58848 }, /* ROXLW */
-{ XCPUFUNC(op_e5e8_0), 0, 58856 }, /* ROXLW */
-{ XCPUFUNC(op_e5f0_0), 0, 58864 }, /* ROXLW */
-{ XCPUFUNC(op_e5f8_0), 0, 58872 }, /* ROXLW */
-{ XCPUFUNC(op_e5f9_0), 0, 58873 }, /* ROXLW */
-{ XCPUFUNC(op_e6d0_0), 0, 59088 }, /* RORW */
-{ XCPUFUNC(op_e6d8_0), 0, 59096 }, /* RORW */
-{ XCPUFUNC(op_e6e0_0), 0, 59104 }, /* RORW */
-{ XCPUFUNC(op_e6e8_0), 0, 59112 }, /* RORW */
-{ XCPUFUNC(op_e6f0_0), 0, 59120 }, /* RORW */
-{ XCPUFUNC(op_e6f8_0), 0, 59128 }, /* RORW */
-{ XCPUFUNC(op_e6f9_0), 0, 59129 }, /* RORW */
-{ XCPUFUNC(op_e7d0_0), 0, 59344 }, /* ROLW */
-{ XCPUFUNC(op_e7d8_0), 0, 59352 }, /* ROLW */
-{ XCPUFUNC(op_e7e0_0), 0, 59360 }, /* ROLW */
-{ XCPUFUNC(op_e7e8_0), 0, 59368 }, /* ROLW */
-{ XCPUFUNC(op_e7f0_0), 0, 59376 }, /* ROLW */
-{ XCPUFUNC(op_e7f8_0), 0, 59384 }, /* ROLW */
-{ XCPUFUNC(op_e7f9_0), 0, 59385 }, /* ROLW */
-{ XCPUFUNC(op_e8c0_0), 0, 59584 }, /* BFTST */
-{ XCPUFUNC(op_e8d0_0), 0, 59600 }, /* BFTST */
-{ XCPUFUNC(op_e8e8_0), 0, 59624 }, /* BFTST */
-{ XCPUFUNC(op_e8f0_0), 0, 59632 }, /* BFTST */
-{ XCPUFUNC(op_e8f8_0), 0, 59640 }, /* BFTST */
-{ XCPUFUNC(op_e8f9_0), 0, 59641 }, /* BFTST */
-{ XCPUFUNC(op_e8fa_0), 0, 59642 }, /* BFTST */
-{ XCPUFUNC(op_e8fb_0), 0, 59643 }, /* BFTST */
-{ XCPUFUNC(op_e9c0_0), 0, 59840 }, /* BFEXTU */
-{ XCPUFUNC(op_e9d0_0), 0, 59856 }, /* BFEXTU */
-{ XCPUFUNC(op_e9e8_0), 0, 59880 }, /* BFEXTU */
-{ XCPUFUNC(op_e9f0_0), 0, 59888 }, /* BFEXTU */
-{ XCPUFUNC(op_e9f8_0), 0, 59896 }, /* BFEXTU */
-{ XCPUFUNC(op_e9f9_0), 0, 59897 }, /* BFEXTU */
-{ XCPUFUNC(op_e9fa_0), 0, 59898 }, /* BFEXTU */
-{ XCPUFUNC(op_e9fb_0), 0, 59899 }, /* BFEXTU */
-{ XCPUFUNC(op_eac0_0), 0, 60096 }, /* BFCHG */
-{ XCPUFUNC(op_ead0_0), 0, 60112 }, /* BFCHG */
-{ XCPUFUNC(op_eae8_0), 0, 60136 }, /* BFCHG */
-{ XCPUFUNC(op_eaf0_0), 0, 60144 }, /* BFCHG */
-{ XCPUFUNC(op_eaf8_0), 0, 60152 }, /* BFCHG */
-{ XCPUFUNC(op_eaf9_0), 0, 60153 }, /* BFCHG */
-{ XCPUFUNC(op_ebc0_0), 0, 60352 }, /* BFEXTS */
-{ XCPUFUNC(op_ebd0_0), 0, 60368 }, /* BFEXTS */
-{ XCPUFUNC(op_ebe8_0), 0, 60392 }, /* BFEXTS */
-{ XCPUFUNC(op_ebf0_0), 0, 60400 }, /* BFEXTS */
-{ XCPUFUNC(op_ebf8_0), 0, 60408 }, /* BFEXTS */
-{ XCPUFUNC(op_ebf9_0), 0, 60409 }, /* BFEXTS */
-{ XCPUFUNC(op_ebfa_0), 0, 60410 }, /* BFEXTS */
-{ XCPUFUNC(op_ebfb_0), 0, 60411 }, /* BFEXTS */
-{ XCPUFUNC(op_ecc0_0), 0, 60608 }, /* BFCLR */
-{ XCPUFUNC(op_ecd0_0), 0, 60624 }, /* BFCLR */
-{ XCPUFUNC(op_ece8_0), 0, 60648 }, /* BFCLR */
-{ XCPUFUNC(op_ecf0_0), 0, 60656 }, /* BFCLR */
-{ XCPUFUNC(op_ecf8_0), 0, 60664 }, /* BFCLR */
-{ XCPUFUNC(op_ecf9_0), 0, 60665 }, /* BFCLR */
-{ XCPUFUNC(op_edc0_0), 0, 60864 }, /* BFFFO */
-{ XCPUFUNC(op_edd0_0), 0, 60880 }, /* BFFFO */
-{ XCPUFUNC(op_ede8_0), 0, 60904 }, /* BFFFO */
-{ XCPUFUNC(op_edf0_0), 0, 60912 }, /* BFFFO */
-{ XCPUFUNC(op_edf8_0), 0, 60920 }, /* BFFFO */
-{ XCPUFUNC(op_edf9_0), 0, 60921 }, /* BFFFO */
-{ XCPUFUNC(op_edfa_0), 0, 60922 }, /* BFFFO */
-{ XCPUFUNC(op_edfb_0), 0, 60923 }, /* BFFFO */
-{ XCPUFUNC(op_eec0_0), 0, 61120 }, /* BFSET */
-{ XCPUFUNC(op_eed0_0), 0, 61136 }, /* BFSET */
-{ XCPUFUNC(op_eee8_0), 0, 61160 }, /* BFSET */
-{ XCPUFUNC(op_eef0_0), 0, 61168 }, /* BFSET */
-{ XCPUFUNC(op_eef8_0), 0, 61176 }, /* BFSET */
-{ XCPUFUNC(op_eef9_0), 0, 61177 }, /* BFSET */
-{ XCPUFUNC(op_efc0_0), 0, 61376 }, /* BFINS */
-{ XCPUFUNC(op_efd0_0), 0, 61392 }, /* BFINS */
-{ XCPUFUNC(op_efe8_0), 0, 61416 }, /* BFINS */
-{ XCPUFUNC(op_eff0_0), 0, 61424 }, /* BFINS */
-{ XCPUFUNC(op_eff8_0), 0, 61432 }, /* BFINS */
-{ XCPUFUNC(op_eff9_0), 0, 61433 }, /* BFINS */
-{ XCPUFUNC(op_f000_0), 0, 61440 }, /* MMUOP30A */
-{ XCPUFUNC(op_f008_0), 0, 61448 }, /* MMUOP30A */
-{ XCPUFUNC(op_f010_0), 0, 61456 }, /* MMUOP30A */
-{ XCPUFUNC(op_f018_0), 0, 61464 }, /* MMUOP30A */
-{ XCPUFUNC(op_f020_0), 0, 61472 }, /* MMUOP30A */
-{ XCPUFUNC(op_f028_0), 0, 61480 }, /* MMUOP30A */
-{ XCPUFUNC(op_f030_0), 0, 61488 }, /* MMUOP30A */
-{ XCPUFUNC(op_f038_0), 0, 61496 }, /* MMUOP30A */
-{ XCPUFUNC(op_f039_0), 0, 61497 }, /* MMUOP30A */
-{ XCPUFUNC(op_f03a_0), 0, 61498 }, /* MMUOP30A */
-{ XCPUFUNC(op_f03b_0), 0, 61499 }, /* MMUOP30A */
-{ XCPUFUNC(op_f200_0), 0, 61952 }, /* FPP */
-{ XCPUFUNC(op_f208_0), 0, 61960 }, /* FPP */
-{ XCPUFUNC(op_f210_0), 0, 61968 }, /* FPP */
-{ XCPUFUNC(op_f218_0), 0, 61976 }, /* FPP */
-{ XCPUFUNC(op_f220_0), 0, 61984 }, /* FPP */
-{ XCPUFUNC(op_f228_0), 0, 61992 }, /* FPP */
-{ XCPUFUNC(op_f230_0), 0, 62000 }, /* FPP */
-{ XCPUFUNC(op_f238_0), 0, 62008 }, /* FPP */
-{ XCPUFUNC(op_f239_0), 0, 62009 }, /* FPP */
-{ XCPUFUNC(op_f23a_0), 0, 62010 }, /* FPP */
-{ XCPUFUNC(op_f23b_0), 0, 62011 }, /* FPP */
-{ XCPUFUNC(op_f23c_0), 0, 62012 }, /* FPP */
-{ XCPUFUNC(op_f240_0), 0, 62016 }, /* FScc */
-{ XCPUFUNC(op_f248_0), 0, 62024 }, /* FDBcc */
-{ XCPUFUNC(op_f250_0), 0, 62032 }, /* FScc */
-{ XCPUFUNC(op_f258_0), 0, 62040 }, /* FScc */
-{ XCPUFUNC(op_f260_0), 0, 62048 }, /* FScc */
-{ XCPUFUNC(op_f268_0), 0, 62056 }, /* FScc */
-{ XCPUFUNC(op_f270_0), 0, 62064 }, /* FScc */
-{ XCPUFUNC(op_f278_0), 0, 62072 }, /* FScc */
-{ XCPUFUNC(op_f279_0), 0, 62073 }, /* FScc */
-{ XCPUFUNC(op_f27a_0), 0, 62074 }, /* FTRAPcc */
-{ XCPUFUNC(op_f27b_0), 0, 62075 }, /* FTRAPcc */
-{ XCPUFUNC(op_f27c_0), 0, 62076 }, /* FTRAPcc */
-{ XCPUFUNC(op_f280_0), 0, 62080 }, /* FBcc */
-{ XCPUFUNC(op_f2c0_0), 0, 62144 }, /* FBcc */
-{ XCPUFUNC(op_f310_0), 0, 62224 }, /* FSAVE */
-{ XCPUFUNC(op_f320_0), 0, 62240 }, /* FSAVE */
-{ XCPUFUNC(op_f328_0), 0, 62248 }, /* FSAVE */
-{ XCPUFUNC(op_f330_0), 0, 62256 }, /* FSAVE */
-{ XCPUFUNC(op_f338_0), 0, 62264 }, /* FSAVE */
-{ XCPUFUNC(op_f339_0), 0, 62265 }, /* FSAVE */
-{ XCPUFUNC(op_f350_0), 0, 62288 }, /* FRESTORE */
-{ XCPUFUNC(op_f358_0), 0, 62296 }, /* FRESTORE */
-{ XCPUFUNC(op_f368_0), 0, 62312 }, /* FRESTORE */
-{ XCPUFUNC(op_f370_0), 0, 62320 }, /* FRESTORE */
-{ XCPUFUNC(op_f378_0), 0, 62328 }, /* FRESTORE */
-{ XCPUFUNC(op_f379_0), 0, 62329 }, /* FRESTORE */
-{ XCPUFUNC(op_f37a_0), 0, 62330 }, /* FRESTORE */
-{ XCPUFUNC(op_f37b_0), 0, 62331 }, /* FRESTORE */
-{ XCPUFUNC(op_f408_0), 0, 62472 }, /* CINVL */
-{ XCPUFUNC(op_f410_0), 0, 62480 }, /* CINVP */
-{ XCPUFUNC(op_f418_0), 0, 62488 }, /* CINVA */
-{ XCPUFUNC(op_f419_0), 0, 62489 }, /* CINVA */
-{ XCPUFUNC(op_f41a_0), 0, 62490 }, /* CINVA */
-{ XCPUFUNC(op_f41b_0), 0, 62491 }, /* CINVA */
-{ XCPUFUNC(op_f41c_0), 0, 62492 }, /* CINVA */
-{ XCPUFUNC(op_f41d_0), 0, 62493 }, /* CINVA */
-{ XCPUFUNC(op_f41e_0), 0, 62494 }, /* CINVA */
-{ XCPUFUNC(op_f41f_0), 0, 62495 }, /* CINVA */
-{ XCPUFUNC(op_f428_0), 0, 62504 }, /* CPUSHL */
-{ XCPUFUNC(op_f430_0), 0, 62512 }, /* CPUSHP */
-{ XCPUFUNC(op_f438_0), 0, 62520 }, /* CPUSHA */
-{ XCPUFUNC(op_f439_0), 0, 62521 }, /* CPUSHA */
-{ XCPUFUNC(op_f43a_0), 0, 62522 }, /* CPUSHA */
-{ XCPUFUNC(op_f43b_0), 0, 62523 }, /* CPUSHA */
-{ XCPUFUNC(op_f43c_0), 0, 62524 }, /* CPUSHA */
-{ XCPUFUNC(op_f43d_0), 0, 62525 }, /* CPUSHA */
-{ XCPUFUNC(op_f43e_0), 0, 62526 }, /* CPUSHA */
-{ XCPUFUNC(op_f43f_0), 0, 62527 }, /* CPUSHA */
-{ XCPUFUNC(op_f500_0), 0, 62720 }, /* MMUOP */
-{ XCPUFUNC(op_f600_0), 0, 62976 }, /* MOVE16 */
-{ XCPUFUNC(op_f608_0), 0, 62984 }, /* MOVE16 */
-{ XCPUFUNC(op_f610_0), 0, 62992 }, /* MOVE16 */
-{ XCPUFUNC(op_f618_0), 0, 63000 }, /* MOVE16 */
-{ XCPUFUNC(op_f620_0), 0, 63008 }, /* MOVE16 */
-{ XCPUFUNC(op_f800_0), 0, 63488 }, /* MMUOP30B */
-{ XCPUFUNC(op_f808_0), 0, 63496 }, /* MMUOP30B */
-{ XCPUFUNC(op_f810_0), 0, 63504 }, /* MMUOP30B */
-{ XCPUFUNC(op_f818_0), 0, 63512 }, /* MMUOP30B */
-{ XCPUFUNC(op_f820_0), 0, 63520 }, /* MMUOP30B */
-{ XCPUFUNC(op_f828_0), 0, 63528 }, /* MMUOP30B */
-{ XCPUFUNC(op_f830_0), 0, 63536 }, /* MMUOP30B */
-{ XCPUFUNC(op_f838_0), 0, 63544 }, /* MMUOP30B */
-{ XCPUFUNC(op_f839_0), 0, 63545 }, /* MMUOP30B */
-{ XCPUFUNC(op_f83a_0), 0, 63546 }, /* MMUOP30B */
-{ XCPUFUNC(op_f83b_0), 0, 63547 }, /* MMUOP30B */
-{ 0, 0, 0 }};
+++ /dev/null
-extern xcpuop_func op_0_0_nf;
-extern xcpuop_func op_0_0_ff;
-extern xcpuop_func op_10_0_nf;
-extern xcpuop_func op_10_0_ff;
-extern xcpuop_func op_18_0_nf;
-extern xcpuop_func op_18_0_ff;
-extern xcpuop_func op_20_0_nf;
-extern xcpuop_func op_20_0_ff;
-extern xcpuop_func op_28_0_nf;
-extern xcpuop_func op_28_0_ff;
-extern xcpuop_func op_30_0_nf;
-extern xcpuop_func op_30_0_ff;
-extern xcpuop_func op_38_0_nf;
-extern xcpuop_func op_38_0_ff;
-extern xcpuop_func op_39_0_nf;
-extern xcpuop_func op_39_0_ff;
-extern xcpuop_func op_3c_0_nf;
-extern xcpuop_func op_3c_0_ff;
-extern xcpuop_func op_40_0_nf;
-extern xcpuop_func op_40_0_ff;
-extern xcpuop_func op_50_0_nf;
-extern xcpuop_func op_50_0_ff;
-extern xcpuop_func op_58_0_nf;
-extern xcpuop_func op_58_0_ff;
-extern xcpuop_func op_60_0_nf;
-extern xcpuop_func op_60_0_ff;
-extern xcpuop_func op_68_0_nf;
-extern xcpuop_func op_68_0_ff;
-extern xcpuop_func op_70_0_nf;
-extern xcpuop_func op_70_0_ff;
-extern xcpuop_func op_78_0_nf;
-extern xcpuop_func op_78_0_ff;
-extern xcpuop_func op_79_0_nf;
-extern xcpuop_func op_79_0_ff;
-extern xcpuop_func op_7c_0_nf;
-extern xcpuop_func op_7c_0_ff;
-extern xcpuop_func op_80_0_nf;
-extern xcpuop_func op_80_0_ff;
-extern xcpuop_func op_90_0_nf;
-extern xcpuop_func op_90_0_ff;
-extern xcpuop_func op_98_0_nf;
-extern xcpuop_func op_98_0_ff;
-extern xcpuop_func op_a0_0_nf;
-extern xcpuop_func op_a0_0_ff;
-extern xcpuop_func op_a8_0_nf;
-extern xcpuop_func op_a8_0_ff;
-extern xcpuop_func op_b0_0_nf;
-extern xcpuop_func op_b0_0_ff;
-extern xcpuop_func op_b8_0_nf;
-extern xcpuop_func op_b8_0_ff;
-extern xcpuop_func op_b9_0_nf;
-extern xcpuop_func op_b9_0_ff;
-extern xcpuop_func op_d0_0_nf;
-extern xcpuop_func op_d0_0_ff;
-extern xcpuop_func op_e8_0_nf;
-extern xcpuop_func op_e8_0_ff;
-extern xcpuop_func op_f0_0_nf;
-extern xcpuop_func op_f0_0_ff;
-extern xcpuop_func op_f8_0_nf;
-extern xcpuop_func op_f8_0_ff;
-extern xcpuop_func op_f9_0_nf;
-extern xcpuop_func op_f9_0_ff;
-extern xcpuop_func op_fa_0_nf;
-extern xcpuop_func op_fa_0_ff;
-extern xcpuop_func op_fb_0_nf;
-extern xcpuop_func op_fb_0_ff;
-extern xcpuop_func op_100_0_nf;
-extern xcpuop_func op_100_0_ff;
-extern xcpuop_func op_108_0_nf;
-extern xcpuop_func op_108_0_ff;
-extern xcpuop_func op_110_0_nf;
-extern xcpuop_func op_110_0_ff;
-extern xcpuop_func op_118_0_nf;
-extern xcpuop_func op_118_0_ff;
-extern xcpuop_func op_120_0_nf;
-extern xcpuop_func op_120_0_ff;
-extern xcpuop_func op_128_0_nf;
-extern xcpuop_func op_128_0_ff;
-extern xcpuop_func op_130_0_nf;
-extern xcpuop_func op_130_0_ff;
-extern xcpuop_func op_138_0_nf;
-extern xcpuop_func op_138_0_ff;
-extern xcpuop_func op_139_0_nf;
-extern xcpuop_func op_139_0_ff;
-extern xcpuop_func op_13a_0_nf;
-extern xcpuop_func op_13a_0_ff;
-extern xcpuop_func op_13b_0_nf;
-extern xcpuop_func op_13b_0_ff;
-extern xcpuop_func op_13c_0_nf;
-extern xcpuop_func op_13c_0_ff;
-extern xcpuop_func op_140_0_nf;
-extern xcpuop_func op_140_0_ff;
-extern xcpuop_func op_148_0_nf;
-extern xcpuop_func op_148_0_ff;
-extern xcpuop_func op_150_0_nf;
-extern xcpuop_func op_150_0_ff;
-extern xcpuop_func op_158_0_nf;
-extern xcpuop_func op_158_0_ff;
-extern xcpuop_func op_160_0_nf;
-extern xcpuop_func op_160_0_ff;
-extern xcpuop_func op_168_0_nf;
-extern xcpuop_func op_168_0_ff;
-extern xcpuop_func op_170_0_nf;
-extern xcpuop_func op_170_0_ff;
-extern xcpuop_func op_178_0_nf;
-extern xcpuop_func op_178_0_ff;
-extern xcpuop_func op_179_0_nf;
-extern xcpuop_func op_179_0_ff;
-extern xcpuop_func op_17a_0_nf;
-extern xcpuop_func op_17a_0_ff;
-extern xcpuop_func op_17b_0_nf;
-extern xcpuop_func op_17b_0_ff;
-extern xcpuop_func op_180_0_nf;
-extern xcpuop_func op_180_0_ff;
-extern xcpuop_func op_188_0_nf;
-extern xcpuop_func op_188_0_ff;
-extern xcpuop_func op_190_0_nf;
-extern xcpuop_func op_190_0_ff;
-extern xcpuop_func op_198_0_nf;
-extern xcpuop_func op_198_0_ff;
-extern xcpuop_func op_1a0_0_nf;
-extern xcpuop_func op_1a0_0_ff;
-extern xcpuop_func op_1a8_0_nf;
-extern xcpuop_func op_1a8_0_ff;
-extern xcpuop_func op_1b0_0_nf;
-extern xcpuop_func op_1b0_0_ff;
-extern xcpuop_func op_1b8_0_nf;
-extern xcpuop_func op_1b8_0_ff;
-extern xcpuop_func op_1b9_0_nf;
-extern xcpuop_func op_1b9_0_ff;
-extern xcpuop_func op_1ba_0_nf;
-extern xcpuop_func op_1ba_0_ff;
-extern xcpuop_func op_1bb_0_nf;
-extern xcpuop_func op_1bb_0_ff;
-extern xcpuop_func op_1c0_0_nf;
-extern xcpuop_func op_1c0_0_ff;
-extern xcpuop_func op_1c8_0_nf;
-extern xcpuop_func op_1c8_0_ff;
-extern xcpuop_func op_1d0_0_nf;
-extern xcpuop_func op_1d0_0_ff;
-extern xcpuop_func op_1d8_0_nf;
-extern xcpuop_func op_1d8_0_ff;
-extern xcpuop_func op_1e0_0_nf;
-extern xcpuop_func op_1e0_0_ff;
-extern xcpuop_func op_1e8_0_nf;
-extern xcpuop_func op_1e8_0_ff;
-extern xcpuop_func op_1f0_0_nf;
-extern xcpuop_func op_1f0_0_ff;
-extern xcpuop_func op_1f8_0_nf;
-extern xcpuop_func op_1f8_0_ff;
-extern xcpuop_func op_1f9_0_nf;
-extern xcpuop_func op_1f9_0_ff;
-extern xcpuop_func op_1fa_0_nf;
-extern xcpuop_func op_1fa_0_ff;
-extern xcpuop_func op_1fb_0_nf;
-extern xcpuop_func op_1fb_0_ff;
-extern xcpuop_func op_200_0_nf;
-extern xcpuop_func op_200_0_ff;
-extern xcpuop_func op_210_0_nf;
-extern xcpuop_func op_210_0_ff;
-extern xcpuop_func op_218_0_nf;
-extern xcpuop_func op_218_0_ff;
-extern xcpuop_func op_220_0_nf;
-extern xcpuop_func op_220_0_ff;
-extern xcpuop_func op_228_0_nf;
-extern xcpuop_func op_228_0_ff;
-extern xcpuop_func op_230_0_nf;
-extern xcpuop_func op_230_0_ff;
-extern xcpuop_func op_238_0_nf;
-extern xcpuop_func op_238_0_ff;
-extern xcpuop_func op_239_0_nf;
-extern xcpuop_func op_239_0_ff;
-extern xcpuop_func op_23c_0_nf;
-extern xcpuop_func op_23c_0_ff;
-extern xcpuop_func op_240_0_nf;
-extern xcpuop_func op_240_0_ff;
-extern xcpuop_func op_250_0_nf;
-extern xcpuop_func op_250_0_ff;
-extern xcpuop_func op_258_0_nf;
-extern xcpuop_func op_258_0_ff;
-extern xcpuop_func op_260_0_nf;
-extern xcpuop_func op_260_0_ff;
-extern xcpuop_func op_268_0_nf;
-extern xcpuop_func op_268_0_ff;
-extern xcpuop_func op_270_0_nf;
-extern xcpuop_func op_270_0_ff;
-extern xcpuop_func op_278_0_nf;
-extern xcpuop_func op_278_0_ff;
-extern xcpuop_func op_279_0_nf;
-extern xcpuop_func op_279_0_ff;
-extern xcpuop_func op_27c_0_nf;
-extern xcpuop_func op_27c_0_ff;
-extern xcpuop_func op_280_0_nf;
-extern xcpuop_func op_280_0_ff;
-extern xcpuop_func op_290_0_nf;
-extern xcpuop_func op_290_0_ff;
-extern xcpuop_func op_298_0_nf;
-extern xcpuop_func op_298_0_ff;
-extern xcpuop_func op_2a0_0_nf;
-extern xcpuop_func op_2a0_0_ff;
-extern xcpuop_func op_2a8_0_nf;
-extern xcpuop_func op_2a8_0_ff;
-extern xcpuop_func op_2b0_0_nf;
-extern xcpuop_func op_2b0_0_ff;
-extern xcpuop_func op_2b8_0_nf;
-extern xcpuop_func op_2b8_0_ff;
-extern xcpuop_func op_2b9_0_nf;
-extern xcpuop_func op_2b9_0_ff;
-extern xcpuop_func op_2d0_0_nf;
-extern xcpuop_func op_2d0_0_ff;
-extern xcpuop_func op_2e8_0_nf;
-extern xcpuop_func op_2e8_0_ff;
-extern xcpuop_func op_2f0_0_nf;
-extern xcpuop_func op_2f0_0_ff;
-extern xcpuop_func op_2f8_0_nf;
-extern xcpuop_func op_2f8_0_ff;
-extern xcpuop_func op_2f9_0_nf;
-extern xcpuop_func op_2f9_0_ff;
-extern xcpuop_func op_2fa_0_nf;
-extern xcpuop_func op_2fa_0_ff;
-extern xcpuop_func op_2fb_0_nf;
-extern xcpuop_func op_2fb_0_ff;
-extern xcpuop_func op_400_0_nf;
-extern xcpuop_func op_400_0_ff;
-extern xcpuop_func op_410_0_nf;
-extern xcpuop_func op_410_0_ff;
-extern xcpuop_func op_418_0_nf;
-extern xcpuop_func op_418_0_ff;
-extern xcpuop_func op_420_0_nf;
-extern xcpuop_func op_420_0_ff;
-extern xcpuop_func op_428_0_nf;
-extern xcpuop_func op_428_0_ff;
-extern xcpuop_func op_430_0_nf;
-extern xcpuop_func op_430_0_ff;
-extern xcpuop_func op_438_0_nf;
-extern xcpuop_func op_438_0_ff;
-extern xcpuop_func op_439_0_nf;
-extern xcpuop_func op_439_0_ff;
-extern xcpuop_func op_440_0_nf;
-extern xcpuop_func op_440_0_ff;
-extern xcpuop_func op_450_0_nf;
-extern xcpuop_func op_450_0_ff;
-extern xcpuop_func op_458_0_nf;
-extern xcpuop_func op_458_0_ff;
-extern xcpuop_func op_460_0_nf;
-extern xcpuop_func op_460_0_ff;
-extern xcpuop_func op_468_0_nf;
-extern xcpuop_func op_468_0_ff;
-extern xcpuop_func op_470_0_nf;
-extern xcpuop_func op_470_0_ff;
-extern xcpuop_func op_478_0_nf;
-extern xcpuop_func op_478_0_ff;
-extern xcpuop_func op_479_0_nf;
-extern xcpuop_func op_479_0_ff;
-extern xcpuop_func op_480_0_nf;
-extern xcpuop_func op_480_0_ff;
-extern xcpuop_func op_490_0_nf;
-extern xcpuop_func op_490_0_ff;
-extern xcpuop_func op_498_0_nf;
-extern xcpuop_func op_498_0_ff;
-extern xcpuop_func op_4a0_0_nf;
-extern xcpuop_func op_4a0_0_ff;
-extern xcpuop_func op_4a8_0_nf;
-extern xcpuop_func op_4a8_0_ff;
-extern xcpuop_func op_4b0_0_nf;
-extern xcpuop_func op_4b0_0_ff;
-extern xcpuop_func op_4b8_0_nf;
-extern xcpuop_func op_4b8_0_ff;
-extern xcpuop_func op_4b9_0_nf;
-extern xcpuop_func op_4b9_0_ff;
-extern xcpuop_func op_4d0_0_nf;
-extern xcpuop_func op_4d0_0_ff;
-extern xcpuop_func op_4e8_0_nf;
-extern xcpuop_func op_4e8_0_ff;
-extern xcpuop_func op_4f0_0_nf;
-extern xcpuop_func op_4f0_0_ff;
-extern xcpuop_func op_4f8_0_nf;
-extern xcpuop_func op_4f8_0_ff;
-extern xcpuop_func op_4f9_0_nf;
-extern xcpuop_func op_4f9_0_ff;
-extern xcpuop_func op_4fa_0_nf;
-extern xcpuop_func op_4fa_0_ff;
-extern xcpuop_func op_4fb_0_nf;
-extern xcpuop_func op_4fb_0_ff;
-extern xcpuop_func op_600_0_nf;
-extern xcpuop_func op_600_0_ff;
-extern xcpuop_func op_610_0_nf;
-extern xcpuop_func op_610_0_ff;
-extern xcpuop_func op_618_0_nf;
-extern xcpuop_func op_618_0_ff;
-extern xcpuop_func op_620_0_nf;
-extern xcpuop_func op_620_0_ff;
-extern xcpuop_func op_628_0_nf;
-extern xcpuop_func op_628_0_ff;
-extern xcpuop_func op_630_0_nf;
-extern xcpuop_func op_630_0_ff;
-extern xcpuop_func op_638_0_nf;
-extern xcpuop_func op_638_0_ff;
-extern xcpuop_func op_639_0_nf;
-extern xcpuop_func op_639_0_ff;
-extern xcpuop_func op_640_0_nf;
-extern xcpuop_func op_640_0_ff;
-extern xcpuop_func op_650_0_nf;
-extern xcpuop_func op_650_0_ff;
-extern xcpuop_func op_658_0_nf;
-extern xcpuop_func op_658_0_ff;
-extern xcpuop_func op_660_0_nf;
-extern xcpuop_func op_660_0_ff;
-extern xcpuop_func op_668_0_nf;
-extern xcpuop_func op_668_0_ff;
-extern xcpuop_func op_670_0_nf;
-extern xcpuop_func op_670_0_ff;
-extern xcpuop_func op_678_0_nf;
-extern xcpuop_func op_678_0_ff;
-extern xcpuop_func op_679_0_nf;
-extern xcpuop_func op_679_0_ff;
-extern xcpuop_func op_680_0_nf;
-extern xcpuop_func op_680_0_ff;
-extern xcpuop_func op_690_0_nf;
-extern xcpuop_func op_690_0_ff;
-extern xcpuop_func op_698_0_nf;
-extern xcpuop_func op_698_0_ff;
-extern xcpuop_func op_6a0_0_nf;
-extern xcpuop_func op_6a0_0_ff;
-extern xcpuop_func op_6a8_0_nf;
-extern xcpuop_func op_6a8_0_ff;
-extern xcpuop_func op_6b0_0_nf;
-extern xcpuop_func op_6b0_0_ff;
-extern xcpuop_func op_6b8_0_nf;
-extern xcpuop_func op_6b8_0_ff;
-extern xcpuop_func op_6b9_0_nf;
-extern xcpuop_func op_6b9_0_ff;
-extern xcpuop_func op_6c0_0_nf;
-extern xcpuop_func op_6c0_0_ff;
-extern xcpuop_func op_6c8_0_nf;
-extern xcpuop_func op_6c8_0_ff;
-extern xcpuop_func op_6d0_0_nf;
-extern xcpuop_func op_6d0_0_ff;
-extern xcpuop_func op_6e8_0_nf;
-extern xcpuop_func op_6e8_0_ff;
-extern xcpuop_func op_6f0_0_nf;
-extern xcpuop_func op_6f0_0_ff;
-extern xcpuop_func op_6f8_0_nf;
-extern xcpuop_func op_6f8_0_ff;
-extern xcpuop_func op_6f9_0_nf;
-extern xcpuop_func op_6f9_0_ff;
-extern xcpuop_func op_6fa_0_nf;
-extern xcpuop_func op_6fa_0_ff;
-extern xcpuop_func op_6fb_0_nf;
-extern xcpuop_func op_6fb_0_ff;
-extern xcpuop_func op_800_0_nf;
-extern xcpuop_func op_800_0_ff;
-extern xcpuop_func op_810_0_nf;
-extern xcpuop_func op_810_0_ff;
-extern xcpuop_func op_818_0_nf;
-extern xcpuop_func op_818_0_ff;
-extern xcpuop_func op_820_0_nf;
-extern xcpuop_func op_820_0_ff;
-extern xcpuop_func op_828_0_nf;
-extern xcpuop_func op_828_0_ff;
-extern xcpuop_func op_830_0_nf;
-extern xcpuop_func op_830_0_ff;
-extern xcpuop_func op_838_0_nf;
-extern xcpuop_func op_838_0_ff;
-extern xcpuop_func op_839_0_nf;
-extern xcpuop_func op_839_0_ff;
-extern xcpuop_func op_83a_0_nf;
-extern xcpuop_func op_83a_0_ff;
-extern xcpuop_func op_83b_0_nf;
-extern xcpuop_func op_83b_0_ff;
-extern xcpuop_func op_83c_0_nf;
-extern xcpuop_func op_83c_0_ff;
-extern xcpuop_func op_840_0_nf;
-extern xcpuop_func op_840_0_ff;
-extern xcpuop_func op_850_0_nf;
-extern xcpuop_func op_850_0_ff;
-extern xcpuop_func op_858_0_nf;
-extern xcpuop_func op_858_0_ff;
-extern xcpuop_func op_860_0_nf;
-extern xcpuop_func op_860_0_ff;
-extern xcpuop_func op_868_0_nf;
-extern xcpuop_func op_868_0_ff;
-extern xcpuop_func op_870_0_nf;
-extern xcpuop_func op_870_0_ff;
-extern xcpuop_func op_878_0_nf;
-extern xcpuop_func op_878_0_ff;
-extern xcpuop_func op_879_0_nf;
-extern xcpuop_func op_879_0_ff;
-extern xcpuop_func op_87a_0_nf;
-extern xcpuop_func op_87a_0_ff;
-extern xcpuop_func op_87b_0_nf;
-extern xcpuop_func op_87b_0_ff;
-extern xcpuop_func op_880_0_nf;
-extern xcpuop_func op_880_0_ff;
-extern xcpuop_func op_890_0_nf;
-extern xcpuop_func op_890_0_ff;
-extern xcpuop_func op_898_0_nf;
-extern xcpuop_func op_898_0_ff;
-extern xcpuop_func op_8a0_0_nf;
-extern xcpuop_func op_8a0_0_ff;
-extern xcpuop_func op_8a8_0_nf;
-extern xcpuop_func op_8a8_0_ff;
-extern xcpuop_func op_8b0_0_nf;
-extern xcpuop_func op_8b0_0_ff;
-extern xcpuop_func op_8b8_0_nf;
-extern xcpuop_func op_8b8_0_ff;
-extern xcpuop_func op_8b9_0_nf;
-extern xcpuop_func op_8b9_0_ff;
-extern xcpuop_func op_8ba_0_nf;
-extern xcpuop_func op_8ba_0_ff;
-extern xcpuop_func op_8bb_0_nf;
-extern xcpuop_func op_8bb_0_ff;
-extern xcpuop_func op_8c0_0_nf;
-extern xcpuop_func op_8c0_0_ff;
-extern xcpuop_func op_8d0_0_nf;
-extern xcpuop_func op_8d0_0_ff;
-extern xcpuop_func op_8d8_0_nf;
-extern xcpuop_func op_8d8_0_ff;
-extern xcpuop_func op_8e0_0_nf;
-extern xcpuop_func op_8e0_0_ff;
-extern xcpuop_func op_8e8_0_nf;
-extern xcpuop_func op_8e8_0_ff;
-extern xcpuop_func op_8f0_0_nf;
-extern xcpuop_func op_8f0_0_ff;
-extern xcpuop_func op_8f8_0_nf;
-extern xcpuop_func op_8f8_0_ff;
-extern xcpuop_func op_8f9_0_nf;
-extern xcpuop_func op_8f9_0_ff;
-extern xcpuop_func op_8fa_0_nf;
-extern xcpuop_func op_8fa_0_ff;
-extern xcpuop_func op_8fb_0_nf;
-extern xcpuop_func op_8fb_0_ff;
-extern xcpuop_func op_a00_0_nf;
-extern xcpuop_func op_a00_0_ff;
-extern xcpuop_func op_a10_0_nf;
-extern xcpuop_func op_a10_0_ff;
-extern xcpuop_func op_a18_0_nf;
-extern xcpuop_func op_a18_0_ff;
-extern xcpuop_func op_a20_0_nf;
-extern xcpuop_func op_a20_0_ff;
-extern xcpuop_func op_a28_0_nf;
-extern xcpuop_func op_a28_0_ff;
-extern xcpuop_func op_a30_0_nf;
-extern xcpuop_func op_a30_0_ff;
-extern xcpuop_func op_a38_0_nf;
-extern xcpuop_func op_a38_0_ff;
-extern xcpuop_func op_a39_0_nf;
-extern xcpuop_func op_a39_0_ff;
-extern xcpuop_func op_a3c_0_nf;
-extern xcpuop_func op_a3c_0_ff;
-extern xcpuop_func op_a40_0_nf;
-extern xcpuop_func op_a40_0_ff;
-extern xcpuop_func op_a50_0_nf;
-extern xcpuop_func op_a50_0_ff;
-extern xcpuop_func op_a58_0_nf;
-extern xcpuop_func op_a58_0_ff;
-extern xcpuop_func op_a60_0_nf;
-extern xcpuop_func op_a60_0_ff;
-extern xcpuop_func op_a68_0_nf;
-extern xcpuop_func op_a68_0_ff;
-extern xcpuop_func op_a70_0_nf;
-extern xcpuop_func op_a70_0_ff;
-extern xcpuop_func op_a78_0_nf;
-extern xcpuop_func op_a78_0_ff;
-extern xcpuop_func op_a79_0_nf;
-extern xcpuop_func op_a79_0_ff;
-extern xcpuop_func op_a7c_0_nf;
-extern xcpuop_func op_a7c_0_ff;
-extern xcpuop_func op_a80_0_nf;
-extern xcpuop_func op_a80_0_ff;
-extern xcpuop_func op_a90_0_nf;
-extern xcpuop_func op_a90_0_ff;
-extern xcpuop_func op_a98_0_nf;
-extern xcpuop_func op_a98_0_ff;
-extern xcpuop_func op_aa0_0_nf;
-extern xcpuop_func op_aa0_0_ff;
-extern xcpuop_func op_aa8_0_nf;
-extern xcpuop_func op_aa8_0_ff;
-extern xcpuop_func op_ab0_0_nf;
-extern xcpuop_func op_ab0_0_ff;
-extern xcpuop_func op_ab8_0_nf;
-extern xcpuop_func op_ab8_0_ff;
-extern xcpuop_func op_ab9_0_nf;
-extern xcpuop_func op_ab9_0_ff;
-extern xcpuop_func op_ad0_0_nf;
-extern xcpuop_func op_ad0_0_ff;
-extern xcpuop_func op_ad8_0_nf;
-extern xcpuop_func op_ad8_0_ff;
-extern xcpuop_func op_ae0_0_nf;
-extern xcpuop_func op_ae0_0_ff;
-extern xcpuop_func op_ae8_0_nf;
-extern xcpuop_func op_ae8_0_ff;
-extern xcpuop_func op_af0_0_nf;
-extern xcpuop_func op_af0_0_ff;
-extern xcpuop_func op_af8_0_nf;
-extern xcpuop_func op_af8_0_ff;
-extern xcpuop_func op_af9_0_nf;
-extern xcpuop_func op_af9_0_ff;
-extern xcpuop_func op_c00_0_nf;
-extern xcpuop_func op_c00_0_ff;
-extern xcpuop_func op_c10_0_nf;
-extern xcpuop_func op_c10_0_ff;
-extern xcpuop_func op_c18_0_nf;
-extern xcpuop_func op_c18_0_ff;
-extern xcpuop_func op_c20_0_nf;
-extern xcpuop_func op_c20_0_ff;
-extern xcpuop_func op_c28_0_nf;
-extern xcpuop_func op_c28_0_ff;
-extern xcpuop_func op_c30_0_nf;
-extern xcpuop_func op_c30_0_ff;
-extern xcpuop_func op_c38_0_nf;
-extern xcpuop_func op_c38_0_ff;
-extern xcpuop_func op_c39_0_nf;
-extern xcpuop_func op_c39_0_ff;
-extern xcpuop_func op_c3a_0_nf;
-extern xcpuop_func op_c3a_0_ff;
-extern xcpuop_func op_c3b_0_nf;
-extern xcpuop_func op_c3b_0_ff;
-extern xcpuop_func op_c40_0_nf;
-extern xcpuop_func op_c40_0_ff;
-extern xcpuop_func op_c50_0_nf;
-extern xcpuop_func op_c50_0_ff;
-extern xcpuop_func op_c58_0_nf;
-extern xcpuop_func op_c58_0_ff;
-extern xcpuop_func op_c60_0_nf;
-extern xcpuop_func op_c60_0_ff;
-extern xcpuop_func op_c68_0_nf;
-extern xcpuop_func op_c68_0_ff;
-extern xcpuop_func op_c70_0_nf;
-extern xcpuop_func op_c70_0_ff;
-extern xcpuop_func op_c78_0_nf;
-extern xcpuop_func op_c78_0_ff;
-extern xcpuop_func op_c79_0_nf;
-extern xcpuop_func op_c79_0_ff;
-extern xcpuop_func op_c7a_0_nf;
-extern xcpuop_func op_c7a_0_ff;
-extern xcpuop_func op_c7b_0_nf;
-extern xcpuop_func op_c7b_0_ff;
-extern xcpuop_func op_c80_0_nf;
-extern xcpuop_func op_c80_0_ff;
-extern xcpuop_func op_c90_0_nf;
-extern xcpuop_func op_c90_0_ff;
-extern xcpuop_func op_c98_0_nf;
-extern xcpuop_func op_c98_0_ff;
-extern xcpuop_func op_ca0_0_nf;
-extern xcpuop_func op_ca0_0_ff;
-extern xcpuop_func op_ca8_0_nf;
-extern xcpuop_func op_ca8_0_ff;
-extern xcpuop_func op_cb0_0_nf;
-extern xcpuop_func op_cb0_0_ff;
-extern xcpuop_func op_cb8_0_nf;
-extern xcpuop_func op_cb8_0_ff;
-extern xcpuop_func op_cb9_0_nf;
-extern xcpuop_func op_cb9_0_ff;
-extern xcpuop_func op_cba_0_nf;
-extern xcpuop_func op_cba_0_ff;
-extern xcpuop_func op_cbb_0_nf;
-extern xcpuop_func op_cbb_0_ff;
-extern xcpuop_func op_cd0_0_nf;
-extern xcpuop_func op_cd0_0_ff;
-extern xcpuop_func op_cd8_0_nf;
-extern xcpuop_func op_cd8_0_ff;
-extern xcpuop_func op_ce0_0_nf;
-extern xcpuop_func op_ce0_0_ff;
-extern xcpuop_func op_ce8_0_nf;
-extern xcpuop_func op_ce8_0_ff;
-extern xcpuop_func op_cf0_0_nf;
-extern xcpuop_func op_cf0_0_ff;
-extern xcpuop_func op_cf8_0_nf;
-extern xcpuop_func op_cf8_0_ff;
-extern xcpuop_func op_cf9_0_nf;
-extern xcpuop_func op_cf9_0_ff;
-extern xcpuop_func op_cfc_0_nf;
-extern xcpuop_func op_cfc_0_ff;
-extern xcpuop_func op_e10_0_nf;
-extern xcpuop_func op_e10_0_ff;
-extern xcpuop_func op_e18_0_nf;
-extern xcpuop_func op_e18_0_ff;
-extern xcpuop_func op_e20_0_nf;
-extern xcpuop_func op_e20_0_ff;
-extern xcpuop_func op_e28_0_nf;
-extern xcpuop_func op_e28_0_ff;
-extern xcpuop_func op_e30_0_nf;
-extern xcpuop_func op_e30_0_ff;
-extern xcpuop_func op_e38_0_nf;
-extern xcpuop_func op_e38_0_ff;
-extern xcpuop_func op_e39_0_nf;
-extern xcpuop_func op_e39_0_ff;
-extern xcpuop_func op_e50_0_nf;
-extern xcpuop_func op_e50_0_ff;
-extern xcpuop_func op_e58_0_nf;
-extern xcpuop_func op_e58_0_ff;
-extern xcpuop_func op_e60_0_nf;
-extern xcpuop_func op_e60_0_ff;
-extern xcpuop_func op_e68_0_nf;
-extern xcpuop_func op_e68_0_ff;
-extern xcpuop_func op_e70_0_nf;
-extern xcpuop_func op_e70_0_ff;
-extern xcpuop_func op_e78_0_nf;
-extern xcpuop_func op_e78_0_ff;
-extern xcpuop_func op_e79_0_nf;
-extern xcpuop_func op_e79_0_ff;
-extern xcpuop_func op_e90_0_nf;
-extern xcpuop_func op_e90_0_ff;
-extern xcpuop_func op_e98_0_nf;
-extern xcpuop_func op_e98_0_ff;
-extern xcpuop_func op_ea0_0_nf;
-extern xcpuop_func op_ea0_0_ff;
-extern xcpuop_func op_ea8_0_nf;
-extern xcpuop_func op_ea8_0_ff;
-extern xcpuop_func op_eb0_0_nf;
-extern xcpuop_func op_eb0_0_ff;
-extern xcpuop_func op_eb8_0_nf;
-extern xcpuop_func op_eb8_0_ff;
-extern xcpuop_func op_eb9_0_nf;
-extern xcpuop_func op_eb9_0_ff;
-extern xcpuop_func op_ed0_0_nf;
-extern xcpuop_func op_ed0_0_ff;
-extern xcpuop_func op_ed8_0_nf;
-extern xcpuop_func op_ed8_0_ff;
-extern xcpuop_func op_ee0_0_nf;
-extern xcpuop_func op_ee0_0_ff;
-extern xcpuop_func op_ee8_0_nf;
-extern xcpuop_func op_ee8_0_ff;
-extern xcpuop_func op_ef0_0_nf;
-extern xcpuop_func op_ef0_0_ff;
-extern xcpuop_func op_ef8_0_nf;
-extern xcpuop_func op_ef8_0_ff;
-extern xcpuop_func op_ef9_0_nf;
-extern xcpuop_func op_ef9_0_ff;
-extern xcpuop_func op_efc_0_nf;
-extern xcpuop_func op_efc_0_ff;
-extern xcpuop_func op_1000_0_nf;
-extern xcpuop_func op_1000_0_ff;
-extern xcpuop_func op_1010_0_nf;
-extern xcpuop_func op_1010_0_ff;
-extern xcpuop_func op_1018_0_nf;
-extern xcpuop_func op_1018_0_ff;
-extern xcpuop_func op_1020_0_nf;
-extern xcpuop_func op_1020_0_ff;
-extern xcpuop_func op_1028_0_nf;
-extern xcpuop_func op_1028_0_ff;
-extern xcpuop_func op_1030_0_nf;
-extern xcpuop_func op_1030_0_ff;
-extern xcpuop_func op_1038_0_nf;
-extern xcpuop_func op_1038_0_ff;
-extern xcpuop_func op_1039_0_nf;
-extern xcpuop_func op_1039_0_ff;
-extern xcpuop_func op_103a_0_nf;
-extern xcpuop_func op_103a_0_ff;
-extern xcpuop_func op_103b_0_nf;
-extern xcpuop_func op_103b_0_ff;
-extern xcpuop_func op_103c_0_nf;
-extern xcpuop_func op_103c_0_ff;
-extern xcpuop_func op_1080_0_nf;
-extern xcpuop_func op_1080_0_ff;
-extern xcpuop_func op_1090_0_nf;
-extern xcpuop_func op_1090_0_ff;
-extern xcpuop_func op_1098_0_nf;
-extern xcpuop_func op_1098_0_ff;
-extern xcpuop_func op_10a0_0_nf;
-extern xcpuop_func op_10a0_0_ff;
-extern xcpuop_func op_10a8_0_nf;
-extern xcpuop_func op_10a8_0_ff;
-extern xcpuop_func op_10b0_0_nf;
-extern xcpuop_func op_10b0_0_ff;
-extern xcpuop_func op_10b8_0_nf;
-extern xcpuop_func op_10b8_0_ff;
-extern xcpuop_func op_10b9_0_nf;
-extern xcpuop_func op_10b9_0_ff;
-extern xcpuop_func op_10ba_0_nf;
-extern xcpuop_func op_10ba_0_ff;
-extern xcpuop_func op_10bb_0_nf;
-extern xcpuop_func op_10bb_0_ff;
-extern xcpuop_func op_10bc_0_nf;
-extern xcpuop_func op_10bc_0_ff;
-extern xcpuop_func op_10c0_0_nf;
-extern xcpuop_func op_10c0_0_ff;
-extern xcpuop_func op_10d0_0_nf;
-extern xcpuop_func op_10d0_0_ff;
-extern xcpuop_func op_10d8_0_nf;
-extern xcpuop_func op_10d8_0_ff;
-extern xcpuop_func op_10e0_0_nf;
-extern xcpuop_func op_10e0_0_ff;
-extern xcpuop_func op_10e8_0_nf;
-extern xcpuop_func op_10e8_0_ff;
-extern xcpuop_func op_10f0_0_nf;
-extern xcpuop_func op_10f0_0_ff;
-extern xcpuop_func op_10f8_0_nf;
-extern xcpuop_func op_10f8_0_ff;
-extern xcpuop_func op_10f9_0_nf;
-extern xcpuop_func op_10f9_0_ff;
-extern xcpuop_func op_10fa_0_nf;
-extern xcpuop_func op_10fa_0_ff;
-extern xcpuop_func op_10fb_0_nf;
-extern xcpuop_func op_10fb_0_ff;
-extern xcpuop_func op_10fc_0_nf;
-extern xcpuop_func op_10fc_0_ff;
-extern xcpuop_func op_1100_0_nf;
-extern xcpuop_func op_1100_0_ff;
-extern xcpuop_func op_1110_0_nf;
-extern xcpuop_func op_1110_0_ff;
-extern xcpuop_func op_1118_0_nf;
-extern xcpuop_func op_1118_0_ff;
-extern xcpuop_func op_1120_0_nf;
-extern xcpuop_func op_1120_0_ff;
-extern xcpuop_func op_1128_0_nf;
-extern xcpuop_func op_1128_0_ff;
-extern xcpuop_func op_1130_0_nf;
-extern xcpuop_func op_1130_0_ff;
-extern xcpuop_func op_1138_0_nf;
-extern xcpuop_func op_1138_0_ff;
-extern xcpuop_func op_1139_0_nf;
-extern xcpuop_func op_1139_0_ff;
-extern xcpuop_func op_113a_0_nf;
-extern xcpuop_func op_113a_0_ff;
-extern xcpuop_func op_113b_0_nf;
-extern xcpuop_func op_113b_0_ff;
-extern xcpuop_func op_113c_0_nf;
-extern xcpuop_func op_113c_0_ff;
-extern xcpuop_func op_1140_0_nf;
-extern xcpuop_func op_1140_0_ff;
-extern xcpuop_func op_1150_0_nf;
-extern xcpuop_func op_1150_0_ff;
-extern xcpuop_func op_1158_0_nf;
-extern xcpuop_func op_1158_0_ff;
-extern xcpuop_func op_1160_0_nf;
-extern xcpuop_func op_1160_0_ff;
-extern xcpuop_func op_1168_0_nf;
-extern xcpuop_func op_1168_0_ff;
-extern xcpuop_func op_1170_0_nf;
-extern xcpuop_func op_1170_0_ff;
-extern xcpuop_func op_1178_0_nf;
-extern xcpuop_func op_1178_0_ff;
-extern xcpuop_func op_1179_0_nf;
-extern xcpuop_func op_1179_0_ff;
-extern xcpuop_func op_117a_0_nf;
-extern xcpuop_func op_117a_0_ff;
-extern xcpuop_func op_117b_0_nf;
-extern xcpuop_func op_117b_0_ff;
-extern xcpuop_func op_117c_0_nf;
-extern xcpuop_func op_117c_0_ff;
-extern xcpuop_func op_1180_0_nf;
-extern xcpuop_func op_1180_0_ff;
-extern xcpuop_func op_1190_0_nf;
-extern xcpuop_func op_1190_0_ff;
-extern xcpuop_func op_1198_0_nf;
-extern xcpuop_func op_1198_0_ff;
-extern xcpuop_func op_11a0_0_nf;
-extern xcpuop_func op_11a0_0_ff;
-extern xcpuop_func op_11a8_0_nf;
-extern xcpuop_func op_11a8_0_ff;
-extern xcpuop_func op_11b0_0_nf;
-extern xcpuop_func op_11b0_0_ff;
-extern xcpuop_func op_11b8_0_nf;
-extern xcpuop_func op_11b8_0_ff;
-extern xcpuop_func op_11b9_0_nf;
-extern xcpuop_func op_11b9_0_ff;
-extern xcpuop_func op_11ba_0_nf;
-extern xcpuop_func op_11ba_0_ff;
-extern xcpuop_func op_11bb_0_nf;
-extern xcpuop_func op_11bb_0_ff;
-extern xcpuop_func op_11bc_0_nf;
-extern xcpuop_func op_11bc_0_ff;
-extern xcpuop_func op_11c0_0_nf;
-extern xcpuop_func op_11c0_0_ff;
-extern xcpuop_func op_11d0_0_nf;
-extern xcpuop_func op_11d0_0_ff;
-extern xcpuop_func op_11d8_0_nf;
-extern xcpuop_func op_11d8_0_ff;
-extern xcpuop_func op_11e0_0_nf;
-extern xcpuop_func op_11e0_0_ff;
-extern xcpuop_func op_11e8_0_nf;
-extern xcpuop_func op_11e8_0_ff;
-extern xcpuop_func op_11f0_0_nf;
-extern xcpuop_func op_11f0_0_ff;
-extern xcpuop_func op_11f8_0_nf;
-extern xcpuop_func op_11f8_0_ff;
-extern xcpuop_func op_11f9_0_nf;
-extern xcpuop_func op_11f9_0_ff;
-extern xcpuop_func op_11fa_0_nf;
-extern xcpuop_func op_11fa_0_ff;
-extern xcpuop_func op_11fb_0_nf;
-extern xcpuop_func op_11fb_0_ff;
-extern xcpuop_func op_11fc_0_nf;
-extern xcpuop_func op_11fc_0_ff;
-extern xcpuop_func op_13c0_0_nf;
-extern xcpuop_func op_13c0_0_ff;
-extern xcpuop_func op_13d0_0_nf;
-extern xcpuop_func op_13d0_0_ff;
-extern xcpuop_func op_13d8_0_nf;
-extern xcpuop_func op_13d8_0_ff;
-extern xcpuop_func op_13e0_0_nf;
-extern xcpuop_func op_13e0_0_ff;
-extern xcpuop_func op_13e8_0_nf;
-extern xcpuop_func op_13e8_0_ff;
-extern xcpuop_func op_13f0_0_nf;
-extern xcpuop_func op_13f0_0_ff;
-extern xcpuop_func op_13f8_0_nf;
-extern xcpuop_func op_13f8_0_ff;
-extern xcpuop_func op_13f9_0_nf;
-extern xcpuop_func op_13f9_0_ff;
-extern xcpuop_func op_13fa_0_nf;
-extern xcpuop_func op_13fa_0_ff;
-extern xcpuop_func op_13fb_0_nf;
-extern xcpuop_func op_13fb_0_ff;
-extern xcpuop_func op_13fc_0_nf;
-extern xcpuop_func op_13fc_0_ff;
-extern xcpuop_func op_2000_0_nf;
-extern xcpuop_func op_2000_0_ff;
-extern xcpuop_func op_2008_0_nf;
-extern xcpuop_func op_2008_0_ff;
-extern xcpuop_func op_2010_0_nf;
-extern xcpuop_func op_2010_0_ff;
-extern xcpuop_func op_2018_0_nf;
-extern xcpuop_func op_2018_0_ff;
-extern xcpuop_func op_2020_0_nf;
-extern xcpuop_func op_2020_0_ff;
-extern xcpuop_func op_2028_0_nf;
-extern xcpuop_func op_2028_0_ff;
-extern xcpuop_func op_2030_0_nf;
-extern xcpuop_func op_2030_0_ff;
-extern xcpuop_func op_2038_0_nf;
-extern xcpuop_func op_2038_0_ff;
-extern xcpuop_func op_2039_0_nf;
-extern xcpuop_func op_2039_0_ff;
-extern xcpuop_func op_203a_0_nf;
-extern xcpuop_func op_203a_0_ff;
-extern xcpuop_func op_203b_0_nf;
-extern xcpuop_func op_203b_0_ff;
-extern xcpuop_func op_203c_0_nf;
-extern xcpuop_func op_203c_0_ff;
-extern xcpuop_func op_2040_0_nf;
-extern xcpuop_func op_2040_0_ff;
-extern xcpuop_func op_2048_0_nf;
-extern xcpuop_func op_2048_0_ff;
-extern xcpuop_func op_2050_0_nf;
-extern xcpuop_func op_2050_0_ff;
-extern xcpuop_func op_2058_0_nf;
-extern xcpuop_func op_2058_0_ff;
-extern xcpuop_func op_2060_0_nf;
-extern xcpuop_func op_2060_0_ff;
-extern xcpuop_func op_2068_0_nf;
-extern xcpuop_func op_2068_0_ff;
-extern xcpuop_func op_2070_0_nf;
-extern xcpuop_func op_2070_0_ff;
-extern xcpuop_func op_2078_0_nf;
-extern xcpuop_func op_2078_0_ff;
-extern xcpuop_func op_2079_0_nf;
-extern xcpuop_func op_2079_0_ff;
-extern xcpuop_func op_207a_0_nf;
-extern xcpuop_func op_207a_0_ff;
-extern xcpuop_func op_207b_0_nf;
-extern xcpuop_func op_207b_0_ff;
-extern xcpuop_func op_207c_0_nf;
-extern xcpuop_func op_207c_0_ff;
-extern xcpuop_func op_2080_0_nf;
-extern xcpuop_func op_2080_0_ff;
-extern xcpuop_func op_2088_0_nf;
-extern xcpuop_func op_2088_0_ff;
-extern xcpuop_func op_2090_0_nf;
-extern xcpuop_func op_2090_0_ff;
-extern xcpuop_func op_2098_0_nf;
-extern xcpuop_func op_2098_0_ff;
-extern xcpuop_func op_20a0_0_nf;
-extern xcpuop_func op_20a0_0_ff;
-extern xcpuop_func op_20a8_0_nf;
-extern xcpuop_func op_20a8_0_ff;
-extern xcpuop_func op_20b0_0_nf;
-extern xcpuop_func op_20b0_0_ff;
-extern xcpuop_func op_20b8_0_nf;
-extern xcpuop_func op_20b8_0_ff;
-extern xcpuop_func op_20b9_0_nf;
-extern xcpuop_func op_20b9_0_ff;
-extern xcpuop_func op_20ba_0_nf;
-extern xcpuop_func op_20ba_0_ff;
-extern xcpuop_func op_20bb_0_nf;
-extern xcpuop_func op_20bb_0_ff;
-extern xcpuop_func op_20bc_0_nf;
-extern xcpuop_func op_20bc_0_ff;
-extern xcpuop_func op_20c0_0_nf;
-extern xcpuop_func op_20c0_0_ff;
-extern xcpuop_func op_20c8_0_nf;
-extern xcpuop_func op_20c8_0_ff;
-extern xcpuop_func op_20d0_0_nf;
-extern xcpuop_func op_20d0_0_ff;
-extern xcpuop_func op_20d8_0_nf;
-extern xcpuop_func op_20d8_0_ff;
-extern xcpuop_func op_20e0_0_nf;
-extern xcpuop_func op_20e0_0_ff;
-extern xcpuop_func op_20e8_0_nf;
-extern xcpuop_func op_20e8_0_ff;
-extern xcpuop_func op_20f0_0_nf;
-extern xcpuop_func op_20f0_0_ff;
-extern xcpuop_func op_20f8_0_nf;
-extern xcpuop_func op_20f8_0_ff;
-extern xcpuop_func op_20f9_0_nf;
-extern xcpuop_func op_20f9_0_ff;
-extern xcpuop_func op_20fa_0_nf;
-extern xcpuop_func op_20fa_0_ff;
-extern xcpuop_func op_20fb_0_nf;
-extern xcpuop_func op_20fb_0_ff;
-extern xcpuop_func op_20fc_0_nf;
-extern xcpuop_func op_20fc_0_ff;
-extern xcpuop_func op_2100_0_nf;
-extern xcpuop_func op_2100_0_ff;
-extern xcpuop_func op_2108_0_nf;
-extern xcpuop_func op_2108_0_ff;
-extern xcpuop_func op_2110_0_nf;
-extern xcpuop_func op_2110_0_ff;
-extern xcpuop_func op_2118_0_nf;
-extern xcpuop_func op_2118_0_ff;
-extern xcpuop_func op_2120_0_nf;
-extern xcpuop_func op_2120_0_ff;
-extern xcpuop_func op_2128_0_nf;
-extern xcpuop_func op_2128_0_ff;
-extern xcpuop_func op_2130_0_nf;
-extern xcpuop_func op_2130_0_ff;
-extern xcpuop_func op_2138_0_nf;
-extern xcpuop_func op_2138_0_ff;
-extern xcpuop_func op_2139_0_nf;
-extern xcpuop_func op_2139_0_ff;
-extern xcpuop_func op_213a_0_nf;
-extern xcpuop_func op_213a_0_ff;
-extern xcpuop_func op_213b_0_nf;
-extern xcpuop_func op_213b_0_ff;
-extern xcpuop_func op_213c_0_nf;
-extern xcpuop_func op_213c_0_ff;
-extern xcpuop_func op_2140_0_nf;
-extern xcpuop_func op_2140_0_ff;
-extern xcpuop_func op_2148_0_nf;
-extern xcpuop_func op_2148_0_ff;
-extern xcpuop_func op_2150_0_nf;
-extern xcpuop_func op_2150_0_ff;
-extern xcpuop_func op_2158_0_nf;
-extern xcpuop_func op_2158_0_ff;
-extern xcpuop_func op_2160_0_nf;
-extern xcpuop_func op_2160_0_ff;
-extern xcpuop_func op_2168_0_nf;
-extern xcpuop_func op_2168_0_ff;
-extern xcpuop_func op_2170_0_nf;
-extern xcpuop_func op_2170_0_ff;
-extern xcpuop_func op_2178_0_nf;
-extern xcpuop_func op_2178_0_ff;
-extern xcpuop_func op_2179_0_nf;
-extern xcpuop_func op_2179_0_ff;
-extern xcpuop_func op_217a_0_nf;
-extern xcpuop_func op_217a_0_ff;
-extern xcpuop_func op_217b_0_nf;
-extern xcpuop_func op_217b_0_ff;
-extern xcpuop_func op_217c_0_nf;
-extern xcpuop_func op_217c_0_ff;
-extern xcpuop_func op_2180_0_nf;
-extern xcpuop_func op_2180_0_ff;
-extern xcpuop_func op_2188_0_nf;
-extern xcpuop_func op_2188_0_ff;
-extern xcpuop_func op_2190_0_nf;
-extern xcpuop_func op_2190_0_ff;
-extern xcpuop_func op_2198_0_nf;
-extern xcpuop_func op_2198_0_ff;
-extern xcpuop_func op_21a0_0_nf;
-extern xcpuop_func op_21a0_0_ff;
-extern xcpuop_func op_21a8_0_nf;
-extern xcpuop_func op_21a8_0_ff;
-extern xcpuop_func op_21b0_0_nf;
-extern xcpuop_func op_21b0_0_ff;
-extern xcpuop_func op_21b8_0_nf;
-extern xcpuop_func op_21b8_0_ff;
-extern xcpuop_func op_21b9_0_nf;
-extern xcpuop_func op_21b9_0_ff;
-extern xcpuop_func op_21ba_0_nf;
-extern xcpuop_func op_21ba_0_ff;
-extern xcpuop_func op_21bb_0_nf;
-extern xcpuop_func op_21bb_0_ff;
-extern xcpuop_func op_21bc_0_nf;
-extern xcpuop_func op_21bc_0_ff;
-extern xcpuop_func op_21c0_0_nf;
-extern xcpuop_func op_21c0_0_ff;
-extern xcpuop_func op_21c8_0_nf;
-extern xcpuop_func op_21c8_0_ff;
-extern xcpuop_func op_21d0_0_nf;
-extern xcpuop_func op_21d0_0_ff;
-extern xcpuop_func op_21d8_0_nf;
-extern xcpuop_func op_21d8_0_ff;
-extern xcpuop_func op_21e0_0_nf;
-extern xcpuop_func op_21e0_0_ff;
-extern xcpuop_func op_21e8_0_nf;
-extern xcpuop_func op_21e8_0_ff;
-extern xcpuop_func op_21f0_0_nf;
-extern xcpuop_func op_21f0_0_ff;
-extern xcpuop_func op_21f8_0_nf;
-extern xcpuop_func op_21f8_0_ff;
-extern xcpuop_func op_21f9_0_nf;
-extern xcpuop_func op_21f9_0_ff;
-extern xcpuop_func op_21fa_0_nf;
-extern xcpuop_func op_21fa_0_ff;
-extern xcpuop_func op_21fb_0_nf;
-extern xcpuop_func op_21fb_0_ff;
-extern xcpuop_func op_21fc_0_nf;
-extern xcpuop_func op_21fc_0_ff;
-extern xcpuop_func op_23c0_0_nf;
-extern xcpuop_func op_23c0_0_ff;
-extern xcpuop_func op_23c8_0_nf;
-extern xcpuop_func op_23c8_0_ff;
-extern xcpuop_func op_23d0_0_nf;
-extern xcpuop_func op_23d0_0_ff;
-extern xcpuop_func op_23d8_0_nf;
-extern xcpuop_func op_23d8_0_ff;
-extern xcpuop_func op_23e0_0_nf;
-extern xcpuop_func op_23e0_0_ff;
-extern xcpuop_func op_23e8_0_nf;
-extern xcpuop_func op_23e8_0_ff;
-extern xcpuop_func op_23f0_0_nf;
-extern xcpuop_func op_23f0_0_ff;
-extern xcpuop_func op_23f8_0_nf;
-extern xcpuop_func op_23f8_0_ff;
-extern xcpuop_func op_23f9_0_nf;
-extern xcpuop_func op_23f9_0_ff;
-extern xcpuop_func op_23fa_0_nf;
-extern xcpuop_func op_23fa_0_ff;
-extern xcpuop_func op_23fb_0_nf;
-extern xcpuop_func op_23fb_0_ff;
-extern xcpuop_func op_23fc_0_nf;
-extern xcpuop_func op_23fc_0_ff;
-extern xcpuop_func op_3000_0_nf;
-extern xcpuop_func op_3000_0_ff;
-extern xcpuop_func op_3008_0_nf;
-extern xcpuop_func op_3008_0_ff;
-extern xcpuop_func op_3010_0_nf;
-extern xcpuop_func op_3010_0_ff;
-extern xcpuop_func op_3018_0_nf;
-extern xcpuop_func op_3018_0_ff;
-extern xcpuop_func op_3020_0_nf;
-extern xcpuop_func op_3020_0_ff;
-extern xcpuop_func op_3028_0_nf;
-extern xcpuop_func op_3028_0_ff;
-extern xcpuop_func op_3030_0_nf;
-extern xcpuop_func op_3030_0_ff;
-extern xcpuop_func op_3038_0_nf;
-extern xcpuop_func op_3038_0_ff;
-extern xcpuop_func op_3039_0_nf;
-extern xcpuop_func op_3039_0_ff;
-extern xcpuop_func op_303a_0_nf;
-extern xcpuop_func op_303a_0_ff;
-extern xcpuop_func op_303b_0_nf;
-extern xcpuop_func op_303b_0_ff;
-extern xcpuop_func op_303c_0_nf;
-extern xcpuop_func op_303c_0_ff;
-extern xcpuop_func op_3040_0_nf;
-extern xcpuop_func op_3040_0_ff;
-extern xcpuop_func op_3048_0_nf;
-extern xcpuop_func op_3048_0_ff;
-extern xcpuop_func op_3050_0_nf;
-extern xcpuop_func op_3050_0_ff;
-extern xcpuop_func op_3058_0_nf;
-extern xcpuop_func op_3058_0_ff;
-extern xcpuop_func op_3060_0_nf;
-extern xcpuop_func op_3060_0_ff;
-extern xcpuop_func op_3068_0_nf;
-extern xcpuop_func op_3068_0_ff;
-extern xcpuop_func op_3070_0_nf;
-extern xcpuop_func op_3070_0_ff;
-extern xcpuop_func op_3078_0_nf;
-extern xcpuop_func op_3078_0_ff;
-extern xcpuop_func op_3079_0_nf;
-extern xcpuop_func op_3079_0_ff;
-extern xcpuop_func op_307a_0_nf;
-extern xcpuop_func op_307a_0_ff;
-extern xcpuop_func op_307b_0_nf;
-extern xcpuop_func op_307b_0_ff;
-extern xcpuop_func op_307c_0_nf;
-extern xcpuop_func op_307c_0_ff;
-extern xcpuop_func op_3080_0_nf;
-extern xcpuop_func op_3080_0_ff;
-extern xcpuop_func op_3088_0_nf;
-extern xcpuop_func op_3088_0_ff;
-extern xcpuop_func op_3090_0_nf;
-extern xcpuop_func op_3090_0_ff;
-extern xcpuop_func op_3098_0_nf;
-extern xcpuop_func op_3098_0_ff;
-extern xcpuop_func op_30a0_0_nf;
-extern xcpuop_func op_30a0_0_ff;
-extern xcpuop_func op_30a8_0_nf;
-extern xcpuop_func op_30a8_0_ff;
-extern xcpuop_func op_30b0_0_nf;
-extern xcpuop_func op_30b0_0_ff;
-extern xcpuop_func op_30b8_0_nf;
-extern xcpuop_func op_30b8_0_ff;
-extern xcpuop_func op_30b9_0_nf;
-extern xcpuop_func op_30b9_0_ff;
-extern xcpuop_func op_30ba_0_nf;
-extern xcpuop_func op_30ba_0_ff;
-extern xcpuop_func op_30bb_0_nf;
-extern xcpuop_func op_30bb_0_ff;
-extern xcpuop_func op_30bc_0_nf;
-extern xcpuop_func op_30bc_0_ff;
-extern xcpuop_func op_30c0_0_nf;
-extern xcpuop_func op_30c0_0_ff;
-extern xcpuop_func op_30c8_0_nf;
-extern xcpuop_func op_30c8_0_ff;
-extern xcpuop_func op_30d0_0_nf;
-extern xcpuop_func op_30d0_0_ff;
-extern xcpuop_func op_30d8_0_nf;
-extern xcpuop_func op_30d8_0_ff;
-extern xcpuop_func op_30e0_0_nf;
-extern xcpuop_func op_30e0_0_ff;
-extern xcpuop_func op_30e8_0_nf;
-extern xcpuop_func op_30e8_0_ff;
-extern xcpuop_func op_30f0_0_nf;
-extern xcpuop_func op_30f0_0_ff;
-extern xcpuop_func op_30f8_0_nf;
-extern xcpuop_func op_30f8_0_ff;
-extern xcpuop_func op_30f9_0_nf;
-extern xcpuop_func op_30f9_0_ff;
-extern xcpuop_func op_30fa_0_nf;
-extern xcpuop_func op_30fa_0_ff;
-extern xcpuop_func op_30fb_0_nf;
-extern xcpuop_func op_30fb_0_ff;
-extern xcpuop_func op_30fc_0_nf;
-extern xcpuop_func op_30fc_0_ff;
-extern xcpuop_func op_3100_0_nf;
-extern xcpuop_func op_3100_0_ff;
-extern xcpuop_func op_3108_0_nf;
-extern xcpuop_func op_3108_0_ff;
-extern xcpuop_func op_3110_0_nf;
-extern xcpuop_func op_3110_0_ff;
-extern xcpuop_func op_3118_0_nf;
-extern xcpuop_func op_3118_0_ff;
-extern xcpuop_func op_3120_0_nf;
-extern xcpuop_func op_3120_0_ff;
-extern xcpuop_func op_3128_0_nf;
-extern xcpuop_func op_3128_0_ff;
-extern xcpuop_func op_3130_0_nf;
-extern xcpuop_func op_3130_0_ff;
-extern xcpuop_func op_3138_0_nf;
-extern xcpuop_func op_3138_0_ff;
-extern xcpuop_func op_3139_0_nf;
-extern xcpuop_func op_3139_0_ff;
-extern xcpuop_func op_313a_0_nf;
-extern xcpuop_func op_313a_0_ff;
-extern xcpuop_func op_313b_0_nf;
-extern xcpuop_func op_313b_0_ff;
-extern xcpuop_func op_313c_0_nf;
-extern xcpuop_func op_313c_0_ff;
-extern xcpuop_func op_3140_0_nf;
-extern xcpuop_func op_3140_0_ff;
-extern xcpuop_func op_3148_0_nf;
-extern xcpuop_func op_3148_0_ff;
-extern xcpuop_func op_3150_0_nf;
-extern xcpuop_func op_3150_0_ff;
-extern xcpuop_func op_3158_0_nf;
-extern xcpuop_func op_3158_0_ff;
-extern xcpuop_func op_3160_0_nf;
-extern xcpuop_func op_3160_0_ff;
-extern xcpuop_func op_3168_0_nf;
-extern xcpuop_func op_3168_0_ff;
-extern xcpuop_func op_3170_0_nf;
-extern xcpuop_func op_3170_0_ff;
-extern xcpuop_func op_3178_0_nf;
-extern xcpuop_func op_3178_0_ff;
-extern xcpuop_func op_3179_0_nf;
-extern xcpuop_func op_3179_0_ff;
-extern xcpuop_func op_317a_0_nf;
-extern xcpuop_func op_317a_0_ff;
-extern xcpuop_func op_317b_0_nf;
-extern xcpuop_func op_317b_0_ff;
-extern xcpuop_func op_317c_0_nf;
-extern xcpuop_func op_317c_0_ff;
-extern xcpuop_func op_3180_0_nf;
-extern xcpuop_func op_3180_0_ff;
-extern xcpuop_func op_3188_0_nf;
-extern xcpuop_func op_3188_0_ff;
-extern xcpuop_func op_3190_0_nf;
-extern xcpuop_func op_3190_0_ff;
-extern xcpuop_func op_3198_0_nf;
-extern xcpuop_func op_3198_0_ff;
-extern xcpuop_func op_31a0_0_nf;
-extern xcpuop_func op_31a0_0_ff;
-extern xcpuop_func op_31a8_0_nf;
-extern xcpuop_func op_31a8_0_ff;
-extern xcpuop_func op_31b0_0_nf;
-extern xcpuop_func op_31b0_0_ff;
-extern xcpuop_func op_31b8_0_nf;
-extern xcpuop_func op_31b8_0_ff;
-extern xcpuop_func op_31b9_0_nf;
-extern xcpuop_func op_31b9_0_ff;
-extern xcpuop_func op_31ba_0_nf;
-extern xcpuop_func op_31ba_0_ff;
-extern xcpuop_func op_31bb_0_nf;
-extern xcpuop_func op_31bb_0_ff;
-extern xcpuop_func op_31bc_0_nf;
-extern xcpuop_func op_31bc_0_ff;
-extern xcpuop_func op_31c0_0_nf;
-extern xcpuop_func op_31c0_0_ff;
-extern xcpuop_func op_31c8_0_nf;
-extern xcpuop_func op_31c8_0_ff;
-extern xcpuop_func op_31d0_0_nf;
-extern xcpuop_func op_31d0_0_ff;
-extern xcpuop_func op_31d8_0_nf;
-extern xcpuop_func op_31d8_0_ff;
-extern xcpuop_func op_31e0_0_nf;
-extern xcpuop_func op_31e0_0_ff;
-extern xcpuop_func op_31e8_0_nf;
-extern xcpuop_func op_31e8_0_ff;
-extern xcpuop_func op_31f0_0_nf;
-extern xcpuop_func op_31f0_0_ff;
-extern xcpuop_func op_31f8_0_nf;
-extern xcpuop_func op_31f8_0_ff;
-extern xcpuop_func op_31f9_0_nf;
-extern xcpuop_func op_31f9_0_ff;
-extern xcpuop_func op_31fa_0_nf;
-extern xcpuop_func op_31fa_0_ff;
-extern xcpuop_func op_31fb_0_nf;
-extern xcpuop_func op_31fb_0_ff;
-extern xcpuop_func op_31fc_0_nf;
-extern xcpuop_func op_31fc_0_ff;
-extern xcpuop_func op_33c0_0_nf;
-extern xcpuop_func op_33c0_0_ff;
-extern xcpuop_func op_33c8_0_nf;
-extern xcpuop_func op_33c8_0_ff;
-extern xcpuop_func op_33d0_0_nf;
-extern xcpuop_func op_33d0_0_ff;
-extern xcpuop_func op_33d8_0_nf;
-extern xcpuop_func op_33d8_0_ff;
-extern xcpuop_func op_33e0_0_nf;
-extern xcpuop_func op_33e0_0_ff;
-extern xcpuop_func op_33e8_0_nf;
-extern xcpuop_func op_33e8_0_ff;
-extern xcpuop_func op_33f0_0_nf;
-extern xcpuop_func op_33f0_0_ff;
-extern xcpuop_func op_33f8_0_nf;
-extern xcpuop_func op_33f8_0_ff;
-extern xcpuop_func op_33f9_0_nf;
-extern xcpuop_func op_33f9_0_ff;
-extern xcpuop_func op_33fa_0_nf;
-extern xcpuop_func op_33fa_0_ff;
-extern xcpuop_func op_33fb_0_nf;
-extern xcpuop_func op_33fb_0_ff;
-extern xcpuop_func op_33fc_0_nf;
-extern xcpuop_func op_33fc_0_ff;
-extern xcpuop_func op_4000_0_nf;
-extern xcpuop_func op_4000_0_ff;
-extern xcpuop_func op_4010_0_nf;
-extern xcpuop_func op_4010_0_ff;
-extern xcpuop_func op_4018_0_nf;
-extern xcpuop_func op_4018_0_ff;
-extern xcpuop_func op_4020_0_nf;
-extern xcpuop_func op_4020_0_ff;
-extern xcpuop_func op_4028_0_nf;
-extern xcpuop_func op_4028_0_ff;
-extern xcpuop_func op_4030_0_nf;
-extern xcpuop_func op_4030_0_ff;
-extern xcpuop_func op_4038_0_nf;
-extern xcpuop_func op_4038_0_ff;
-extern xcpuop_func op_4039_0_nf;
-extern xcpuop_func op_4039_0_ff;
-extern xcpuop_func op_4040_0_nf;
-extern xcpuop_func op_4040_0_ff;
-extern xcpuop_func op_4050_0_nf;
-extern xcpuop_func op_4050_0_ff;
-extern xcpuop_func op_4058_0_nf;
-extern xcpuop_func op_4058_0_ff;
-extern xcpuop_func op_4060_0_nf;
-extern xcpuop_func op_4060_0_ff;
-extern xcpuop_func op_4068_0_nf;
-extern xcpuop_func op_4068_0_ff;
-extern xcpuop_func op_4070_0_nf;
-extern xcpuop_func op_4070_0_ff;
-extern xcpuop_func op_4078_0_nf;
-extern xcpuop_func op_4078_0_ff;
-extern xcpuop_func op_4079_0_nf;
-extern xcpuop_func op_4079_0_ff;
-extern xcpuop_func op_4080_0_nf;
-extern xcpuop_func op_4080_0_ff;
-extern xcpuop_func op_4090_0_nf;
-extern xcpuop_func op_4090_0_ff;
-extern xcpuop_func op_4098_0_nf;
-extern xcpuop_func op_4098_0_ff;
-extern xcpuop_func op_40a0_0_nf;
-extern xcpuop_func op_40a0_0_ff;
-extern xcpuop_func op_40a8_0_nf;
-extern xcpuop_func op_40a8_0_ff;
-extern xcpuop_func op_40b0_0_nf;
-extern xcpuop_func op_40b0_0_ff;
-extern xcpuop_func op_40b8_0_nf;
-extern xcpuop_func op_40b8_0_ff;
-extern xcpuop_func op_40b9_0_nf;
-extern xcpuop_func op_40b9_0_ff;
-extern xcpuop_func op_40c0_0_nf;
-extern xcpuop_func op_40c0_0_ff;
-extern xcpuop_func op_40d0_0_nf;
-extern xcpuop_func op_40d0_0_ff;
-extern xcpuop_func op_40d8_0_nf;
-extern xcpuop_func op_40d8_0_ff;
-extern xcpuop_func op_40e0_0_nf;
-extern xcpuop_func op_40e0_0_ff;
-extern xcpuop_func op_40e8_0_nf;
-extern xcpuop_func op_40e8_0_ff;
-extern xcpuop_func op_40f0_0_nf;
-extern xcpuop_func op_40f0_0_ff;
-extern xcpuop_func op_40f8_0_nf;
-extern xcpuop_func op_40f8_0_ff;
-extern xcpuop_func op_40f9_0_nf;
-extern xcpuop_func op_40f9_0_ff;
-extern xcpuop_func op_4100_0_nf;
-extern xcpuop_func op_4100_0_ff;
-extern xcpuop_func op_4110_0_nf;
-extern xcpuop_func op_4110_0_ff;
-extern xcpuop_func op_4118_0_nf;
-extern xcpuop_func op_4118_0_ff;
-extern xcpuop_func op_4120_0_nf;
-extern xcpuop_func op_4120_0_ff;
-extern xcpuop_func op_4128_0_nf;
-extern xcpuop_func op_4128_0_ff;
-extern xcpuop_func op_4130_0_nf;
-extern xcpuop_func op_4130_0_ff;
-extern xcpuop_func op_4138_0_nf;
-extern xcpuop_func op_4138_0_ff;
-extern xcpuop_func op_4139_0_nf;
-extern xcpuop_func op_4139_0_ff;
-extern xcpuop_func op_413a_0_nf;
-extern xcpuop_func op_413a_0_ff;
-extern xcpuop_func op_413b_0_nf;
-extern xcpuop_func op_413b_0_ff;
-extern xcpuop_func op_413c_0_nf;
-extern xcpuop_func op_413c_0_ff;
-extern xcpuop_func op_4180_0_nf;
-extern xcpuop_func op_4180_0_ff;
-extern xcpuop_func op_4190_0_nf;
-extern xcpuop_func op_4190_0_ff;
-extern xcpuop_func op_4198_0_nf;
-extern xcpuop_func op_4198_0_ff;
-extern xcpuop_func op_41a0_0_nf;
-extern xcpuop_func op_41a0_0_ff;
-extern xcpuop_func op_41a8_0_nf;
-extern xcpuop_func op_41a8_0_ff;
-extern xcpuop_func op_41b0_0_nf;
-extern xcpuop_func op_41b0_0_ff;
-extern xcpuop_func op_41b8_0_nf;
-extern xcpuop_func op_41b8_0_ff;
-extern xcpuop_func op_41b9_0_nf;
-extern xcpuop_func op_41b9_0_ff;
-extern xcpuop_func op_41ba_0_nf;
-extern xcpuop_func op_41ba_0_ff;
-extern xcpuop_func op_41bb_0_nf;
-extern xcpuop_func op_41bb_0_ff;
-extern xcpuop_func op_41bc_0_nf;
-extern xcpuop_func op_41bc_0_ff;
-extern xcpuop_func op_41d0_0_nf;
-extern xcpuop_func op_41d0_0_ff;
-extern xcpuop_func op_41e8_0_nf;
-extern xcpuop_func op_41e8_0_ff;
-extern xcpuop_func op_41f0_0_nf;
-extern xcpuop_func op_41f0_0_ff;
-extern xcpuop_func op_41f8_0_nf;
-extern xcpuop_func op_41f8_0_ff;
-extern xcpuop_func op_41f9_0_nf;
-extern xcpuop_func op_41f9_0_ff;
-extern xcpuop_func op_41fa_0_nf;
-extern xcpuop_func op_41fa_0_ff;
-extern xcpuop_func op_41fb_0_nf;
-extern xcpuop_func op_41fb_0_ff;
-extern xcpuop_func op_4200_0_nf;
-extern xcpuop_func op_4200_0_ff;
-extern xcpuop_func op_4210_0_nf;
-extern xcpuop_func op_4210_0_ff;
-extern xcpuop_func op_4218_0_nf;
-extern xcpuop_func op_4218_0_ff;
-extern xcpuop_func op_4220_0_nf;
-extern xcpuop_func op_4220_0_ff;
-extern xcpuop_func op_4228_0_nf;
-extern xcpuop_func op_4228_0_ff;
-extern xcpuop_func op_4230_0_nf;
-extern xcpuop_func op_4230_0_ff;
-extern xcpuop_func op_4238_0_nf;
-extern xcpuop_func op_4238_0_ff;
-extern xcpuop_func op_4239_0_nf;
-extern xcpuop_func op_4239_0_ff;
-extern xcpuop_func op_4240_0_nf;
-extern xcpuop_func op_4240_0_ff;
-extern xcpuop_func op_4250_0_nf;
-extern xcpuop_func op_4250_0_ff;
-extern xcpuop_func op_4258_0_nf;
-extern xcpuop_func op_4258_0_ff;
-extern xcpuop_func op_4260_0_nf;
-extern xcpuop_func op_4260_0_ff;
-extern xcpuop_func op_4268_0_nf;
-extern xcpuop_func op_4268_0_ff;
-extern xcpuop_func op_4270_0_nf;
-extern xcpuop_func op_4270_0_ff;
-extern xcpuop_func op_4278_0_nf;
-extern xcpuop_func op_4278_0_ff;
-extern xcpuop_func op_4279_0_nf;
-extern xcpuop_func op_4279_0_ff;
-extern xcpuop_func op_4280_0_nf;
-extern xcpuop_func op_4280_0_ff;
-extern xcpuop_func op_4290_0_nf;
-extern xcpuop_func op_4290_0_ff;
-extern xcpuop_func op_4298_0_nf;
-extern xcpuop_func op_4298_0_ff;
-extern xcpuop_func op_42a0_0_nf;
-extern xcpuop_func op_42a0_0_ff;
-extern xcpuop_func op_42a8_0_nf;
-extern xcpuop_func op_42a8_0_ff;
-extern xcpuop_func op_42b0_0_nf;
-extern xcpuop_func op_42b0_0_ff;
-extern xcpuop_func op_42b8_0_nf;
-extern xcpuop_func op_42b8_0_ff;
-extern xcpuop_func op_42b9_0_nf;
-extern xcpuop_func op_42b9_0_ff;
-extern xcpuop_func op_42c0_0_nf;
-extern xcpuop_func op_42c0_0_ff;
-extern xcpuop_func op_42d0_0_nf;
-extern xcpuop_func op_42d0_0_ff;
-extern xcpuop_func op_42d8_0_nf;
-extern xcpuop_func op_42d8_0_ff;
-extern xcpuop_func op_42e0_0_nf;
-extern xcpuop_func op_42e0_0_ff;
-extern xcpuop_func op_42e8_0_nf;
-extern xcpuop_func op_42e8_0_ff;
-extern xcpuop_func op_42f0_0_nf;
-extern xcpuop_func op_42f0_0_ff;
-extern xcpuop_func op_42f8_0_nf;
-extern xcpuop_func op_42f8_0_ff;
-extern xcpuop_func op_42f9_0_nf;
-extern xcpuop_func op_42f9_0_ff;
-extern xcpuop_func op_4400_0_nf;
-extern xcpuop_func op_4400_0_ff;
-extern xcpuop_func op_4410_0_nf;
-extern xcpuop_func op_4410_0_ff;
-extern xcpuop_func op_4418_0_nf;
-extern xcpuop_func op_4418_0_ff;
-extern xcpuop_func op_4420_0_nf;
-extern xcpuop_func op_4420_0_ff;
-extern xcpuop_func op_4428_0_nf;
-extern xcpuop_func op_4428_0_ff;
-extern xcpuop_func op_4430_0_nf;
-extern xcpuop_func op_4430_0_ff;
-extern xcpuop_func op_4438_0_nf;
-extern xcpuop_func op_4438_0_ff;
-extern xcpuop_func op_4439_0_nf;
-extern xcpuop_func op_4439_0_ff;
-extern xcpuop_func op_4440_0_nf;
-extern xcpuop_func op_4440_0_ff;
-extern xcpuop_func op_4450_0_nf;
-extern xcpuop_func op_4450_0_ff;
-extern xcpuop_func op_4458_0_nf;
-extern xcpuop_func op_4458_0_ff;
-extern xcpuop_func op_4460_0_nf;
-extern xcpuop_func op_4460_0_ff;
-extern xcpuop_func op_4468_0_nf;
-extern xcpuop_func op_4468_0_ff;
-extern xcpuop_func op_4470_0_nf;
-extern xcpuop_func op_4470_0_ff;
-extern xcpuop_func op_4478_0_nf;
-extern xcpuop_func op_4478_0_ff;
-extern xcpuop_func op_4479_0_nf;
-extern xcpuop_func op_4479_0_ff;
-extern xcpuop_func op_4480_0_nf;
-extern xcpuop_func op_4480_0_ff;
-extern xcpuop_func op_4490_0_nf;
-extern xcpuop_func op_4490_0_ff;
-extern xcpuop_func op_4498_0_nf;
-extern xcpuop_func op_4498_0_ff;
-extern xcpuop_func op_44a0_0_nf;
-extern xcpuop_func op_44a0_0_ff;
-extern xcpuop_func op_44a8_0_nf;
-extern xcpuop_func op_44a8_0_ff;
-extern xcpuop_func op_44b0_0_nf;
-extern xcpuop_func op_44b0_0_ff;
-extern xcpuop_func op_44b8_0_nf;
-extern xcpuop_func op_44b8_0_ff;
-extern xcpuop_func op_44b9_0_nf;
-extern xcpuop_func op_44b9_0_ff;
-extern xcpuop_func op_44c0_0_nf;
-extern xcpuop_func op_44c0_0_ff;
-extern xcpuop_func op_44d0_0_nf;
-extern xcpuop_func op_44d0_0_ff;
-extern xcpuop_func op_44d8_0_nf;
-extern xcpuop_func op_44d8_0_ff;
-extern xcpuop_func op_44e0_0_nf;
-extern xcpuop_func op_44e0_0_ff;
-extern xcpuop_func op_44e8_0_nf;
-extern xcpuop_func op_44e8_0_ff;
-extern xcpuop_func op_44f0_0_nf;
-extern xcpuop_func op_44f0_0_ff;
-extern xcpuop_func op_44f8_0_nf;
-extern xcpuop_func op_44f8_0_ff;
-extern xcpuop_func op_44f9_0_nf;
-extern xcpuop_func op_44f9_0_ff;
-extern xcpuop_func op_44fa_0_nf;
-extern xcpuop_func op_44fa_0_ff;
-extern xcpuop_func op_44fb_0_nf;
-extern xcpuop_func op_44fb_0_ff;
-extern xcpuop_func op_44fc_0_nf;
-extern xcpuop_func op_44fc_0_ff;
-extern xcpuop_func op_4600_0_nf;
-extern xcpuop_func op_4600_0_ff;
-extern xcpuop_func op_4610_0_nf;
-extern xcpuop_func op_4610_0_ff;
-extern xcpuop_func op_4618_0_nf;
-extern xcpuop_func op_4618_0_ff;
-extern xcpuop_func op_4620_0_nf;
-extern xcpuop_func op_4620_0_ff;
-extern xcpuop_func op_4628_0_nf;
-extern xcpuop_func op_4628_0_ff;
-extern xcpuop_func op_4630_0_nf;
-extern xcpuop_func op_4630_0_ff;
-extern xcpuop_func op_4638_0_nf;
-extern xcpuop_func op_4638_0_ff;
-extern xcpuop_func op_4639_0_nf;
-extern xcpuop_func op_4639_0_ff;
-extern xcpuop_func op_4640_0_nf;
-extern xcpuop_func op_4640_0_ff;
-extern xcpuop_func op_4650_0_nf;
-extern xcpuop_func op_4650_0_ff;
-extern xcpuop_func op_4658_0_nf;
-extern xcpuop_func op_4658_0_ff;
-extern xcpuop_func op_4660_0_nf;
-extern xcpuop_func op_4660_0_ff;
-extern xcpuop_func op_4668_0_nf;
-extern xcpuop_func op_4668_0_ff;
-extern xcpuop_func op_4670_0_nf;
-extern xcpuop_func op_4670_0_ff;
-extern xcpuop_func op_4678_0_nf;
-extern xcpuop_func op_4678_0_ff;
-extern xcpuop_func op_4679_0_nf;
-extern xcpuop_func op_4679_0_ff;
-extern xcpuop_func op_4680_0_nf;
-extern xcpuop_func op_4680_0_ff;
-extern xcpuop_func op_4690_0_nf;
-extern xcpuop_func op_4690_0_ff;
-extern xcpuop_func op_4698_0_nf;
-extern xcpuop_func op_4698_0_ff;
-extern xcpuop_func op_46a0_0_nf;
-extern xcpuop_func op_46a0_0_ff;
-extern xcpuop_func op_46a8_0_nf;
-extern xcpuop_func op_46a8_0_ff;
-extern xcpuop_func op_46b0_0_nf;
-extern xcpuop_func op_46b0_0_ff;
-extern xcpuop_func op_46b8_0_nf;
-extern xcpuop_func op_46b8_0_ff;
-extern xcpuop_func op_46b9_0_nf;
-extern xcpuop_func op_46b9_0_ff;
-extern xcpuop_func op_46c0_0_nf;
-extern xcpuop_func op_46c0_0_ff;
-extern xcpuop_func op_46d0_0_nf;
-extern xcpuop_func op_46d0_0_ff;
-extern xcpuop_func op_46d8_0_nf;
-extern xcpuop_func op_46d8_0_ff;
-extern xcpuop_func op_46e0_0_nf;
-extern xcpuop_func op_46e0_0_ff;
-extern xcpuop_func op_46e8_0_nf;
-extern xcpuop_func op_46e8_0_ff;
-extern xcpuop_func op_46f0_0_nf;
-extern xcpuop_func op_46f0_0_ff;
-extern xcpuop_func op_46f8_0_nf;
-extern xcpuop_func op_46f8_0_ff;
-extern xcpuop_func op_46f9_0_nf;
-extern xcpuop_func op_46f9_0_ff;
-extern xcpuop_func op_46fa_0_nf;
-extern xcpuop_func op_46fa_0_ff;
-extern xcpuop_func op_46fb_0_nf;
-extern xcpuop_func op_46fb_0_ff;
-extern xcpuop_func op_46fc_0_nf;
-extern xcpuop_func op_46fc_0_ff;
-extern xcpuop_func op_4800_0_nf;
-extern xcpuop_func op_4800_0_ff;
-extern xcpuop_func op_4808_0_nf;
-extern xcpuop_func op_4808_0_ff;
-extern xcpuop_func op_4810_0_nf;
-extern xcpuop_func op_4810_0_ff;
-extern xcpuop_func op_4818_0_nf;
-extern xcpuop_func op_4818_0_ff;
-extern xcpuop_func op_4820_0_nf;
-extern xcpuop_func op_4820_0_ff;
-extern xcpuop_func op_4828_0_nf;
-extern xcpuop_func op_4828_0_ff;
-extern xcpuop_func op_4830_0_nf;
-extern xcpuop_func op_4830_0_ff;
-extern xcpuop_func op_4838_0_nf;
-extern xcpuop_func op_4838_0_ff;
-extern xcpuop_func op_4839_0_nf;
-extern xcpuop_func op_4839_0_ff;
-extern xcpuop_func op_4840_0_nf;
-extern xcpuop_func op_4840_0_ff;
-extern xcpuop_func op_4848_0_nf;
-extern xcpuop_func op_4848_0_ff;
-extern xcpuop_func op_4850_0_nf;
-extern xcpuop_func op_4850_0_ff;
-extern xcpuop_func op_4868_0_nf;
-extern xcpuop_func op_4868_0_ff;
-extern xcpuop_func op_4870_0_nf;
-extern xcpuop_func op_4870_0_ff;
-extern xcpuop_func op_4878_0_nf;
-extern xcpuop_func op_4878_0_ff;
-extern xcpuop_func op_4879_0_nf;
-extern xcpuop_func op_4879_0_ff;
-extern xcpuop_func op_487a_0_nf;
-extern xcpuop_func op_487a_0_ff;
-extern xcpuop_func op_487b_0_nf;
-extern xcpuop_func op_487b_0_ff;
-extern xcpuop_func op_4880_0_nf;
-extern xcpuop_func op_4880_0_ff;
-extern xcpuop_func op_4890_0_nf;
-extern xcpuop_func op_4890_0_ff;
-extern xcpuop_func op_48a0_0_nf;
-extern xcpuop_func op_48a0_0_ff;
-extern xcpuop_func op_48a8_0_nf;
-extern xcpuop_func op_48a8_0_ff;
-extern xcpuop_func op_48b0_0_nf;
-extern xcpuop_func op_48b0_0_ff;
-extern xcpuop_func op_48b8_0_nf;
-extern xcpuop_func op_48b8_0_ff;
-extern xcpuop_func op_48b9_0_nf;
-extern xcpuop_func op_48b9_0_ff;
-extern xcpuop_func op_48c0_0_nf;
-extern xcpuop_func op_48c0_0_ff;
-extern xcpuop_func op_48d0_0_nf;
-extern xcpuop_func op_48d0_0_ff;
-extern xcpuop_func op_48e0_0_nf;
-extern xcpuop_func op_48e0_0_ff;
-extern xcpuop_func op_48e8_0_nf;
-extern xcpuop_func op_48e8_0_ff;
-extern xcpuop_func op_48f0_0_nf;
-extern xcpuop_func op_48f0_0_ff;
-extern xcpuop_func op_48f8_0_nf;
-extern xcpuop_func op_48f8_0_ff;
-extern xcpuop_func op_48f9_0_nf;
-extern xcpuop_func op_48f9_0_ff;
-extern xcpuop_func op_49c0_0_nf;
-extern xcpuop_func op_49c0_0_ff;
-extern xcpuop_func op_4a00_0_nf;
-extern xcpuop_func op_4a00_0_ff;
-extern xcpuop_func op_4a10_0_nf;
-extern xcpuop_func op_4a10_0_ff;
-extern xcpuop_func op_4a18_0_nf;
-extern xcpuop_func op_4a18_0_ff;
-extern xcpuop_func op_4a20_0_nf;
-extern xcpuop_func op_4a20_0_ff;
-extern xcpuop_func op_4a28_0_nf;
-extern xcpuop_func op_4a28_0_ff;
-extern xcpuop_func op_4a30_0_nf;
-extern xcpuop_func op_4a30_0_ff;
-extern xcpuop_func op_4a38_0_nf;
-extern xcpuop_func op_4a38_0_ff;
-extern xcpuop_func op_4a39_0_nf;
-extern xcpuop_func op_4a39_0_ff;
-extern xcpuop_func op_4a3a_0_nf;
-extern xcpuop_func op_4a3a_0_ff;
-extern xcpuop_func op_4a3b_0_nf;
-extern xcpuop_func op_4a3b_0_ff;
-extern xcpuop_func op_4a3c_0_nf;
-extern xcpuop_func op_4a3c_0_ff;
-extern xcpuop_func op_4a40_0_nf;
-extern xcpuop_func op_4a40_0_ff;
-extern xcpuop_func op_4a48_0_nf;
-extern xcpuop_func op_4a48_0_ff;
-extern xcpuop_func op_4a50_0_nf;
-extern xcpuop_func op_4a50_0_ff;
-extern xcpuop_func op_4a58_0_nf;
-extern xcpuop_func op_4a58_0_ff;
-extern xcpuop_func op_4a60_0_nf;
-extern xcpuop_func op_4a60_0_ff;
-extern xcpuop_func op_4a68_0_nf;
-extern xcpuop_func op_4a68_0_ff;
-extern xcpuop_func op_4a70_0_nf;
-extern xcpuop_func op_4a70_0_ff;
-extern xcpuop_func op_4a78_0_nf;
-extern xcpuop_func op_4a78_0_ff;
-extern xcpuop_func op_4a79_0_nf;
-extern xcpuop_func op_4a79_0_ff;
-extern xcpuop_func op_4a7a_0_nf;
-extern xcpuop_func op_4a7a_0_ff;
-extern xcpuop_func op_4a7b_0_nf;
-extern xcpuop_func op_4a7b_0_ff;
-extern xcpuop_func op_4a7c_0_nf;
-extern xcpuop_func op_4a7c_0_ff;
-extern xcpuop_func op_4a80_0_nf;
-extern xcpuop_func op_4a80_0_ff;
-extern xcpuop_func op_4a88_0_nf;
-extern xcpuop_func op_4a88_0_ff;
-extern xcpuop_func op_4a90_0_nf;
-extern xcpuop_func op_4a90_0_ff;
-extern xcpuop_func op_4a98_0_nf;
-extern xcpuop_func op_4a98_0_ff;
-extern xcpuop_func op_4aa0_0_nf;
-extern xcpuop_func op_4aa0_0_ff;
-extern xcpuop_func op_4aa8_0_nf;
-extern xcpuop_func op_4aa8_0_ff;
-extern xcpuop_func op_4ab0_0_nf;
-extern xcpuop_func op_4ab0_0_ff;
-extern xcpuop_func op_4ab8_0_nf;
-extern xcpuop_func op_4ab8_0_ff;
-extern xcpuop_func op_4ab9_0_nf;
-extern xcpuop_func op_4ab9_0_ff;
-extern xcpuop_func op_4aba_0_nf;
-extern xcpuop_func op_4aba_0_ff;
-extern xcpuop_func op_4abb_0_nf;
-extern xcpuop_func op_4abb_0_ff;
-extern xcpuop_func op_4abc_0_nf;
-extern xcpuop_func op_4abc_0_ff;
-extern xcpuop_func op_4ac0_0_nf;
-extern xcpuop_func op_4ac0_0_ff;
-extern xcpuop_func op_4ad0_0_nf;
-extern xcpuop_func op_4ad0_0_ff;
-extern xcpuop_func op_4ad8_0_nf;
-extern xcpuop_func op_4ad8_0_ff;
-extern xcpuop_func op_4ae0_0_nf;
-extern xcpuop_func op_4ae0_0_ff;
-extern xcpuop_func op_4ae8_0_nf;
-extern xcpuop_func op_4ae8_0_ff;
-extern xcpuop_func op_4af0_0_nf;
-extern xcpuop_func op_4af0_0_ff;
-extern xcpuop_func op_4af8_0_nf;
-extern xcpuop_func op_4af8_0_ff;
-extern xcpuop_func op_4af9_0_nf;
-extern xcpuop_func op_4af9_0_ff;
-extern xcpuop_func op_4c00_0_nf;
-extern xcpuop_func op_4c00_0_ff;
-extern xcpuop_func op_4c10_0_nf;
-extern xcpuop_func op_4c10_0_ff;
-extern xcpuop_func op_4c18_0_nf;
-extern xcpuop_func op_4c18_0_ff;
-extern xcpuop_func op_4c20_0_nf;
-extern xcpuop_func op_4c20_0_ff;
-extern xcpuop_func op_4c28_0_nf;
-extern xcpuop_func op_4c28_0_ff;
-extern xcpuop_func op_4c30_0_nf;
-extern xcpuop_func op_4c30_0_ff;
-extern xcpuop_func op_4c38_0_nf;
-extern xcpuop_func op_4c38_0_ff;
-extern xcpuop_func op_4c39_0_nf;
-extern xcpuop_func op_4c39_0_ff;
-extern xcpuop_func op_4c3a_0_nf;
-extern xcpuop_func op_4c3a_0_ff;
-extern xcpuop_func op_4c3b_0_nf;
-extern xcpuop_func op_4c3b_0_ff;
-extern xcpuop_func op_4c3c_0_nf;
-extern xcpuop_func op_4c3c_0_ff;
-extern xcpuop_func op_4c40_0_nf;
-extern xcpuop_func op_4c40_0_ff;
-extern xcpuop_func op_4c50_0_nf;
-extern xcpuop_func op_4c50_0_ff;
-extern xcpuop_func op_4c58_0_nf;
-extern xcpuop_func op_4c58_0_ff;
-extern xcpuop_func op_4c60_0_nf;
-extern xcpuop_func op_4c60_0_ff;
-extern xcpuop_func op_4c68_0_nf;
-extern xcpuop_func op_4c68_0_ff;
-extern xcpuop_func op_4c70_0_nf;
-extern xcpuop_func op_4c70_0_ff;
-extern xcpuop_func op_4c78_0_nf;
-extern xcpuop_func op_4c78_0_ff;
-extern xcpuop_func op_4c79_0_nf;
-extern xcpuop_func op_4c79_0_ff;
-extern xcpuop_func op_4c7a_0_nf;
-extern xcpuop_func op_4c7a_0_ff;
-extern xcpuop_func op_4c7b_0_nf;
-extern xcpuop_func op_4c7b_0_ff;
-extern xcpuop_func op_4c7c_0_nf;
-extern xcpuop_func op_4c7c_0_ff;
-extern xcpuop_func op_4c90_0_nf;
-extern xcpuop_func op_4c90_0_ff;
-extern xcpuop_func op_4c98_0_nf;
-extern xcpuop_func op_4c98_0_ff;
-extern xcpuop_func op_4ca8_0_nf;
-extern xcpuop_func op_4ca8_0_ff;
-extern xcpuop_func op_4cb0_0_nf;
-extern xcpuop_func op_4cb0_0_ff;
-extern xcpuop_func op_4cb8_0_nf;
-extern xcpuop_func op_4cb8_0_ff;
-extern xcpuop_func op_4cb9_0_nf;
-extern xcpuop_func op_4cb9_0_ff;
-extern xcpuop_func op_4cba_0_nf;
-extern xcpuop_func op_4cba_0_ff;
-extern xcpuop_func op_4cbb_0_nf;
-extern xcpuop_func op_4cbb_0_ff;
-extern xcpuop_func op_4cd0_0_nf;
-extern xcpuop_func op_4cd0_0_ff;
-extern xcpuop_func op_4cd8_0_nf;
-extern xcpuop_func op_4cd8_0_ff;
-extern xcpuop_func op_4ce8_0_nf;
-extern xcpuop_func op_4ce8_0_ff;
-extern xcpuop_func op_4cf0_0_nf;
-extern xcpuop_func op_4cf0_0_ff;
-extern xcpuop_func op_4cf8_0_nf;
-extern xcpuop_func op_4cf8_0_ff;
-extern xcpuop_func op_4cf9_0_nf;
-extern xcpuop_func op_4cf9_0_ff;
-extern xcpuop_func op_4cfa_0_nf;
-extern xcpuop_func op_4cfa_0_ff;
-extern xcpuop_func op_4cfb_0_nf;
-extern xcpuop_func op_4cfb_0_ff;
-extern xcpuop_func op_4e40_0_nf;
-extern xcpuop_func op_4e40_0_ff;
-extern xcpuop_func op_4e50_0_nf;
-extern xcpuop_func op_4e50_0_ff;
-extern xcpuop_func op_4e58_0_nf;
-extern xcpuop_func op_4e58_0_ff;
-extern xcpuop_func op_4e60_0_nf;
-extern xcpuop_func op_4e60_0_ff;
-extern xcpuop_func op_4e68_0_nf;
-extern xcpuop_func op_4e68_0_ff;
-extern xcpuop_func op_4e70_0_nf;
-extern xcpuop_func op_4e70_0_ff;
-extern xcpuop_func op_4e71_0_nf;
-extern xcpuop_func op_4e71_0_ff;
-extern xcpuop_func op_4e72_0_nf;
-extern xcpuop_func op_4e72_0_ff;
-extern xcpuop_func op_4e73_0_nf;
-extern xcpuop_func op_4e73_0_ff;
-extern xcpuop_func op_4e74_0_nf;
-extern xcpuop_func op_4e74_0_ff;
-extern xcpuop_func op_4e75_0_nf;
-extern xcpuop_func op_4e75_0_ff;
-extern xcpuop_func op_4e76_0_nf;
-extern xcpuop_func op_4e76_0_ff;
-extern xcpuop_func op_4e77_0_nf;
-extern xcpuop_func op_4e77_0_ff;
-extern xcpuop_func op_4e7a_0_nf;
-extern xcpuop_func op_4e7a_0_ff;
-extern xcpuop_func op_4e7b_0_nf;
-extern xcpuop_func op_4e7b_0_ff;
-extern xcpuop_func op_4e90_0_nf;
-extern xcpuop_func op_4e90_0_ff;
-extern xcpuop_func op_4ea8_0_nf;
-extern xcpuop_func op_4ea8_0_ff;
-extern xcpuop_func op_4eb0_0_nf;
-extern xcpuop_func op_4eb0_0_ff;
-extern xcpuop_func op_4eb8_0_nf;
-extern xcpuop_func op_4eb8_0_ff;
-extern xcpuop_func op_4eb9_0_nf;
-extern xcpuop_func op_4eb9_0_ff;
-extern xcpuop_func op_4eba_0_nf;
-extern xcpuop_func op_4eba_0_ff;
-extern xcpuop_func op_4ebb_0_nf;
-extern xcpuop_func op_4ebb_0_ff;
-extern xcpuop_func op_4ed0_0_nf;
-extern xcpuop_func op_4ed0_0_ff;
-extern xcpuop_func op_4ee8_0_nf;
-extern xcpuop_func op_4ee8_0_ff;
-extern xcpuop_func op_4ef0_0_nf;
-extern xcpuop_func op_4ef0_0_ff;
-extern xcpuop_func op_4ef8_0_nf;
-extern xcpuop_func op_4ef8_0_ff;
-extern xcpuop_func op_4ef9_0_nf;
-extern xcpuop_func op_4ef9_0_ff;
-extern xcpuop_func op_4efa_0_nf;
-extern xcpuop_func op_4efa_0_ff;
-extern xcpuop_func op_4efb_0_nf;
-extern xcpuop_func op_4efb_0_ff;
-extern xcpuop_func op_5000_0_nf;
-extern xcpuop_func op_5000_0_ff;
-extern xcpuop_func op_5010_0_nf;
-extern xcpuop_func op_5010_0_ff;
-extern xcpuop_func op_5018_0_nf;
-extern xcpuop_func op_5018_0_ff;
-extern xcpuop_func op_5020_0_nf;
-extern xcpuop_func op_5020_0_ff;
-extern xcpuop_func op_5028_0_nf;
-extern xcpuop_func op_5028_0_ff;
-extern xcpuop_func op_5030_0_nf;
-extern xcpuop_func op_5030_0_ff;
-extern xcpuop_func op_5038_0_nf;
-extern xcpuop_func op_5038_0_ff;
-extern xcpuop_func op_5039_0_nf;
-extern xcpuop_func op_5039_0_ff;
-extern xcpuop_func op_5040_0_nf;
-extern xcpuop_func op_5040_0_ff;
-extern xcpuop_func op_5048_0_nf;
-extern xcpuop_func op_5048_0_ff;
-extern xcpuop_func op_5050_0_nf;
-extern xcpuop_func op_5050_0_ff;
-extern xcpuop_func op_5058_0_nf;
-extern xcpuop_func op_5058_0_ff;
-extern xcpuop_func op_5060_0_nf;
-extern xcpuop_func op_5060_0_ff;
-extern xcpuop_func op_5068_0_nf;
-extern xcpuop_func op_5068_0_ff;
-extern xcpuop_func op_5070_0_nf;
-extern xcpuop_func op_5070_0_ff;
-extern xcpuop_func op_5078_0_nf;
-extern xcpuop_func op_5078_0_ff;
-extern xcpuop_func op_5079_0_nf;
-extern xcpuop_func op_5079_0_ff;
-extern xcpuop_func op_5080_0_nf;
-extern xcpuop_func op_5080_0_ff;
-extern xcpuop_func op_5088_0_nf;
-extern xcpuop_func op_5088_0_ff;
-extern xcpuop_func op_5090_0_nf;
-extern xcpuop_func op_5090_0_ff;
-extern xcpuop_func op_5098_0_nf;
-extern xcpuop_func op_5098_0_ff;
-extern xcpuop_func op_50a0_0_nf;
-extern xcpuop_func op_50a0_0_ff;
-extern xcpuop_func op_50a8_0_nf;
-extern xcpuop_func op_50a8_0_ff;
-extern xcpuop_func op_50b0_0_nf;
-extern xcpuop_func op_50b0_0_ff;
-extern xcpuop_func op_50b8_0_nf;
-extern xcpuop_func op_50b8_0_ff;
-extern xcpuop_func op_50b9_0_nf;
-extern xcpuop_func op_50b9_0_ff;
-extern xcpuop_func op_50c0_0_nf;
-extern xcpuop_func op_50c0_0_ff;
-extern xcpuop_func op_50c8_0_nf;
-extern xcpuop_func op_50c8_0_ff;
-extern xcpuop_func op_50d0_0_nf;
-extern xcpuop_func op_50d0_0_ff;
-extern xcpuop_func op_50d8_0_nf;
-extern xcpuop_func op_50d8_0_ff;
-extern xcpuop_func op_50e0_0_nf;
-extern xcpuop_func op_50e0_0_ff;
-extern xcpuop_func op_50e8_0_nf;
-extern xcpuop_func op_50e8_0_ff;
-extern xcpuop_func op_50f0_0_nf;
-extern xcpuop_func op_50f0_0_ff;
-extern xcpuop_func op_50f8_0_nf;
-extern xcpuop_func op_50f8_0_ff;
-extern xcpuop_func op_50f9_0_nf;
-extern xcpuop_func op_50f9_0_ff;
-extern xcpuop_func op_50fa_0_nf;
-extern xcpuop_func op_50fa_0_ff;
-extern xcpuop_func op_50fb_0_nf;
-extern xcpuop_func op_50fb_0_ff;
-extern xcpuop_func op_50fc_0_nf;
-extern xcpuop_func op_50fc_0_ff;
-extern xcpuop_func op_5100_0_nf;
-extern xcpuop_func op_5100_0_ff;
-extern xcpuop_func op_5110_0_nf;
-extern xcpuop_func op_5110_0_ff;
-extern xcpuop_func op_5118_0_nf;
-extern xcpuop_func op_5118_0_ff;
-extern xcpuop_func op_5120_0_nf;
-extern xcpuop_func op_5120_0_ff;
-extern xcpuop_func op_5128_0_nf;
-extern xcpuop_func op_5128_0_ff;
-extern xcpuop_func op_5130_0_nf;
-extern xcpuop_func op_5130_0_ff;
-extern xcpuop_func op_5138_0_nf;
-extern xcpuop_func op_5138_0_ff;
-extern xcpuop_func op_5139_0_nf;
-extern xcpuop_func op_5139_0_ff;
-extern xcpuop_func op_5140_0_nf;
-extern xcpuop_func op_5140_0_ff;
-extern xcpuop_func op_5148_0_nf;
-extern xcpuop_func op_5148_0_ff;
-extern xcpuop_func op_5150_0_nf;
-extern xcpuop_func op_5150_0_ff;
-extern xcpuop_func op_5158_0_nf;
-extern xcpuop_func op_5158_0_ff;
-extern xcpuop_func op_5160_0_nf;
-extern xcpuop_func op_5160_0_ff;
-extern xcpuop_func op_5168_0_nf;
-extern xcpuop_func op_5168_0_ff;
-extern xcpuop_func op_5170_0_nf;
-extern xcpuop_func op_5170_0_ff;
-extern xcpuop_func op_5178_0_nf;
-extern xcpuop_func op_5178_0_ff;
-extern xcpuop_func op_5179_0_nf;
-extern xcpuop_func op_5179_0_ff;
-extern xcpuop_func op_5180_0_nf;
-extern xcpuop_func op_5180_0_ff;
-extern xcpuop_func op_5188_0_nf;
-extern xcpuop_func op_5188_0_ff;
-extern xcpuop_func op_5190_0_nf;
-extern xcpuop_func op_5190_0_ff;
-extern xcpuop_func op_5198_0_nf;
-extern xcpuop_func op_5198_0_ff;
-extern xcpuop_func op_51a0_0_nf;
-extern xcpuop_func op_51a0_0_ff;
-extern xcpuop_func op_51a8_0_nf;
-extern xcpuop_func op_51a8_0_ff;
-extern xcpuop_func op_51b0_0_nf;
-extern xcpuop_func op_51b0_0_ff;
-extern xcpuop_func op_51b8_0_nf;
-extern xcpuop_func op_51b8_0_ff;
-extern xcpuop_func op_51b9_0_nf;
-extern xcpuop_func op_51b9_0_ff;
-extern xcpuop_func op_51c0_0_nf;
-extern xcpuop_func op_51c0_0_ff;
-extern xcpuop_func op_51c8_0_nf;
-extern xcpuop_func op_51c8_0_ff;
-extern xcpuop_func op_51d0_0_nf;
-extern xcpuop_func op_51d0_0_ff;
-extern xcpuop_func op_51d8_0_nf;
-extern xcpuop_func op_51d8_0_ff;
-extern xcpuop_func op_51e0_0_nf;
-extern xcpuop_func op_51e0_0_ff;
-extern xcpuop_func op_51e8_0_nf;
-extern xcpuop_func op_51e8_0_ff;
-extern xcpuop_func op_51f0_0_nf;
-extern xcpuop_func op_51f0_0_ff;
-extern xcpuop_func op_51f8_0_nf;
-extern xcpuop_func op_51f8_0_ff;
-extern xcpuop_func op_51f9_0_nf;
-extern xcpuop_func op_51f9_0_ff;
-extern xcpuop_func op_51fa_0_nf;
-extern xcpuop_func op_51fa_0_ff;
-extern xcpuop_func op_51fb_0_nf;
-extern xcpuop_func op_51fb_0_ff;
-extern xcpuop_func op_51fc_0_nf;
-extern xcpuop_func op_51fc_0_ff;
-extern xcpuop_func op_52c0_0_nf;
-extern xcpuop_func op_52c0_0_ff;
-extern xcpuop_func op_52c8_0_nf;
-extern xcpuop_func op_52c8_0_ff;
-extern xcpuop_func op_52d0_0_nf;
-extern xcpuop_func op_52d0_0_ff;
-extern xcpuop_func op_52d8_0_nf;
-extern xcpuop_func op_52d8_0_ff;
-extern xcpuop_func op_52e0_0_nf;
-extern xcpuop_func op_52e0_0_ff;
-extern xcpuop_func op_52e8_0_nf;
-extern xcpuop_func op_52e8_0_ff;
-extern xcpuop_func op_52f0_0_nf;
-extern xcpuop_func op_52f0_0_ff;
-extern xcpuop_func op_52f8_0_nf;
-extern xcpuop_func op_52f8_0_ff;
-extern xcpuop_func op_52f9_0_nf;
-extern xcpuop_func op_52f9_0_ff;
-extern xcpuop_func op_52fa_0_nf;
-extern xcpuop_func op_52fa_0_ff;
-extern xcpuop_func op_52fb_0_nf;
-extern xcpuop_func op_52fb_0_ff;
-extern xcpuop_func op_52fc_0_nf;
-extern xcpuop_func op_52fc_0_ff;
-extern xcpuop_func op_53c0_0_nf;
-extern xcpuop_func op_53c0_0_ff;
-extern xcpuop_func op_53c8_0_nf;
-extern xcpuop_func op_53c8_0_ff;
-extern xcpuop_func op_53d0_0_nf;
-extern xcpuop_func op_53d0_0_ff;
-extern xcpuop_func op_53d8_0_nf;
-extern xcpuop_func op_53d8_0_ff;
-extern xcpuop_func op_53e0_0_nf;
-extern xcpuop_func op_53e0_0_ff;
-extern xcpuop_func op_53e8_0_nf;
-extern xcpuop_func op_53e8_0_ff;
-extern xcpuop_func op_53f0_0_nf;
-extern xcpuop_func op_53f0_0_ff;
-extern xcpuop_func op_53f8_0_nf;
-extern xcpuop_func op_53f8_0_ff;
-extern xcpuop_func op_53f9_0_nf;
-extern xcpuop_func op_53f9_0_ff;
-extern xcpuop_func op_53fa_0_nf;
-extern xcpuop_func op_53fa_0_ff;
-extern xcpuop_func op_53fb_0_nf;
-extern xcpuop_func op_53fb_0_ff;
-extern xcpuop_func op_53fc_0_nf;
-extern xcpuop_func op_53fc_0_ff;
-extern xcpuop_func op_54c0_0_nf;
-extern xcpuop_func op_54c0_0_ff;
-extern xcpuop_func op_54c8_0_nf;
-extern xcpuop_func op_54c8_0_ff;
-extern xcpuop_func op_54d0_0_nf;
-extern xcpuop_func op_54d0_0_ff;
-extern xcpuop_func op_54d8_0_nf;
-extern xcpuop_func op_54d8_0_ff;
-extern xcpuop_func op_54e0_0_nf;
-extern xcpuop_func op_54e0_0_ff;
-extern xcpuop_func op_54e8_0_nf;
-extern xcpuop_func op_54e8_0_ff;
-extern xcpuop_func op_54f0_0_nf;
-extern xcpuop_func op_54f0_0_ff;
-extern xcpuop_func op_54f8_0_nf;
-extern xcpuop_func op_54f8_0_ff;
-extern xcpuop_func op_54f9_0_nf;
-extern xcpuop_func op_54f9_0_ff;
-extern xcpuop_func op_54fa_0_nf;
-extern xcpuop_func op_54fa_0_ff;
-extern xcpuop_func op_54fb_0_nf;
-extern xcpuop_func op_54fb_0_ff;
-extern xcpuop_func op_54fc_0_nf;
-extern xcpuop_func op_54fc_0_ff;
-extern xcpuop_func op_55c0_0_nf;
-extern xcpuop_func op_55c0_0_ff;
-extern xcpuop_func op_55c8_0_nf;
-extern xcpuop_func op_55c8_0_ff;
-extern xcpuop_func op_55d0_0_nf;
-extern xcpuop_func op_55d0_0_ff;
-extern xcpuop_func op_55d8_0_nf;
-extern xcpuop_func op_55d8_0_ff;
-extern xcpuop_func op_55e0_0_nf;
-extern xcpuop_func op_55e0_0_ff;
-extern xcpuop_func op_55e8_0_nf;
-extern xcpuop_func op_55e8_0_ff;
-extern xcpuop_func op_55f0_0_nf;
-extern xcpuop_func op_55f0_0_ff;
-extern xcpuop_func op_55f8_0_nf;
-extern xcpuop_func op_55f8_0_ff;
-extern xcpuop_func op_55f9_0_nf;
-extern xcpuop_func op_55f9_0_ff;
-extern xcpuop_func op_55fa_0_nf;
-extern xcpuop_func op_55fa_0_ff;
-extern xcpuop_func op_55fb_0_nf;
-extern xcpuop_func op_55fb_0_ff;
-extern xcpuop_func op_55fc_0_nf;
-extern xcpuop_func op_55fc_0_ff;
-extern xcpuop_func op_56c0_0_nf;
-extern xcpuop_func op_56c0_0_ff;
-extern xcpuop_func op_56c8_0_nf;
-extern xcpuop_func op_56c8_0_ff;
-extern xcpuop_func op_56d0_0_nf;
-extern xcpuop_func op_56d0_0_ff;
-extern xcpuop_func op_56d8_0_nf;
-extern xcpuop_func op_56d8_0_ff;
-extern xcpuop_func op_56e0_0_nf;
-extern xcpuop_func op_56e0_0_ff;
-extern xcpuop_func op_56e8_0_nf;
-extern xcpuop_func op_56e8_0_ff;
-extern xcpuop_func op_56f0_0_nf;
-extern xcpuop_func op_56f0_0_ff;
-extern xcpuop_func op_56f8_0_nf;
-extern xcpuop_func op_56f8_0_ff;
-extern xcpuop_func op_56f9_0_nf;
-extern xcpuop_func op_56f9_0_ff;
-extern xcpuop_func op_56fa_0_nf;
-extern xcpuop_func op_56fa_0_ff;
-extern xcpuop_func op_56fb_0_nf;
-extern xcpuop_func op_56fb_0_ff;
-extern xcpuop_func op_56fc_0_nf;
-extern xcpuop_func op_56fc_0_ff;
-extern xcpuop_func op_57c0_0_nf;
-extern xcpuop_func op_57c0_0_ff;
-extern xcpuop_func op_57c8_0_nf;
-extern xcpuop_func op_57c8_0_ff;
-extern xcpuop_func op_57d0_0_nf;
-extern xcpuop_func op_57d0_0_ff;
-extern xcpuop_func op_57d8_0_nf;
-extern xcpuop_func op_57d8_0_ff;
-extern xcpuop_func op_57e0_0_nf;
-extern xcpuop_func op_57e0_0_ff;
-extern xcpuop_func op_57e8_0_nf;
-extern xcpuop_func op_57e8_0_ff;
-extern xcpuop_func op_57f0_0_nf;
-extern xcpuop_func op_57f0_0_ff;
-extern xcpuop_func op_57f8_0_nf;
-extern xcpuop_func op_57f8_0_ff;
-extern xcpuop_func op_57f9_0_nf;
-extern xcpuop_func op_57f9_0_ff;
-extern xcpuop_func op_57fa_0_nf;
-extern xcpuop_func op_57fa_0_ff;
-extern xcpuop_func op_57fb_0_nf;
-extern xcpuop_func op_57fb_0_ff;
-extern xcpuop_func op_57fc_0_nf;
-extern xcpuop_func op_57fc_0_ff;
-extern xcpuop_func op_58c0_0_nf;
-extern xcpuop_func op_58c0_0_ff;
-extern xcpuop_func op_58c8_0_nf;
-extern xcpuop_func op_58c8_0_ff;
-extern xcpuop_func op_58d0_0_nf;
-extern xcpuop_func op_58d0_0_ff;
-extern xcpuop_func op_58d8_0_nf;
-extern xcpuop_func op_58d8_0_ff;
-extern xcpuop_func op_58e0_0_nf;
-extern xcpuop_func op_58e0_0_ff;
-extern xcpuop_func op_58e8_0_nf;
-extern xcpuop_func op_58e8_0_ff;
-extern xcpuop_func op_58f0_0_nf;
-extern xcpuop_func op_58f0_0_ff;
-extern xcpuop_func op_58f8_0_nf;
-extern xcpuop_func op_58f8_0_ff;
-extern xcpuop_func op_58f9_0_nf;
-extern xcpuop_func op_58f9_0_ff;
-extern xcpuop_func op_58fa_0_nf;
-extern xcpuop_func op_58fa_0_ff;
-extern xcpuop_func op_58fb_0_nf;
-extern xcpuop_func op_58fb_0_ff;
-extern xcpuop_func op_58fc_0_nf;
-extern xcpuop_func op_58fc_0_ff;
-extern xcpuop_func op_59c0_0_nf;
-extern xcpuop_func op_59c0_0_ff;
-extern xcpuop_func op_59c8_0_nf;
-extern xcpuop_func op_59c8_0_ff;
-extern xcpuop_func op_59d0_0_nf;
-extern xcpuop_func op_59d0_0_ff;
-extern xcpuop_func op_59d8_0_nf;
-extern xcpuop_func op_59d8_0_ff;
-extern xcpuop_func op_59e0_0_nf;
-extern xcpuop_func op_59e0_0_ff;
-extern xcpuop_func op_59e8_0_nf;
-extern xcpuop_func op_59e8_0_ff;
-extern xcpuop_func op_59f0_0_nf;
-extern xcpuop_func op_59f0_0_ff;
-extern xcpuop_func op_59f8_0_nf;
-extern xcpuop_func op_59f8_0_ff;
-extern xcpuop_func op_59f9_0_nf;
-extern xcpuop_func op_59f9_0_ff;
-extern xcpuop_func op_59fa_0_nf;
-extern xcpuop_func op_59fa_0_ff;
-extern xcpuop_func op_59fb_0_nf;
-extern xcpuop_func op_59fb_0_ff;
-extern xcpuop_func op_59fc_0_nf;
-extern xcpuop_func op_59fc_0_ff;
-extern xcpuop_func op_5ac0_0_nf;
-extern xcpuop_func op_5ac0_0_ff;
-extern xcpuop_func op_5ac8_0_nf;
-extern xcpuop_func op_5ac8_0_ff;
-extern xcpuop_func op_5ad0_0_nf;
-extern xcpuop_func op_5ad0_0_ff;
-extern xcpuop_func op_5ad8_0_nf;
-extern xcpuop_func op_5ad8_0_ff;
-extern xcpuop_func op_5ae0_0_nf;
-extern xcpuop_func op_5ae0_0_ff;
-extern xcpuop_func op_5ae8_0_nf;
-extern xcpuop_func op_5ae8_0_ff;
-extern xcpuop_func op_5af0_0_nf;
-extern xcpuop_func op_5af0_0_ff;
-extern xcpuop_func op_5af8_0_nf;
-extern xcpuop_func op_5af8_0_ff;
-extern xcpuop_func op_5af9_0_nf;
-extern xcpuop_func op_5af9_0_ff;
-extern xcpuop_func op_5afa_0_nf;
-extern xcpuop_func op_5afa_0_ff;
-extern xcpuop_func op_5afb_0_nf;
-extern xcpuop_func op_5afb_0_ff;
-extern xcpuop_func op_5afc_0_nf;
-extern xcpuop_func op_5afc_0_ff;
-extern xcpuop_func op_5bc0_0_nf;
-extern xcpuop_func op_5bc0_0_ff;
-extern xcpuop_func op_5bc8_0_nf;
-extern xcpuop_func op_5bc8_0_ff;
-extern xcpuop_func op_5bd0_0_nf;
-extern xcpuop_func op_5bd0_0_ff;
-extern xcpuop_func op_5bd8_0_nf;
-extern xcpuop_func op_5bd8_0_ff;
-extern xcpuop_func op_5be0_0_nf;
-extern xcpuop_func op_5be0_0_ff;
-extern xcpuop_func op_5be8_0_nf;
-extern xcpuop_func op_5be8_0_ff;
-extern xcpuop_func op_5bf0_0_nf;
-extern xcpuop_func op_5bf0_0_ff;
-extern xcpuop_func op_5bf8_0_nf;
-extern xcpuop_func op_5bf8_0_ff;
-extern xcpuop_func op_5bf9_0_nf;
-extern xcpuop_func op_5bf9_0_ff;
-extern xcpuop_func op_5bfa_0_nf;
-extern xcpuop_func op_5bfa_0_ff;
-extern xcpuop_func op_5bfb_0_nf;
-extern xcpuop_func op_5bfb_0_ff;
-extern xcpuop_func op_5bfc_0_nf;
-extern xcpuop_func op_5bfc_0_ff;
-extern xcpuop_func op_5cc0_0_nf;
-extern xcpuop_func op_5cc0_0_ff;
-extern xcpuop_func op_5cc8_0_nf;
-extern xcpuop_func op_5cc8_0_ff;
-extern xcpuop_func op_5cd0_0_nf;
-extern xcpuop_func op_5cd0_0_ff;
-extern xcpuop_func op_5cd8_0_nf;
-extern xcpuop_func op_5cd8_0_ff;
-extern xcpuop_func op_5ce0_0_nf;
-extern xcpuop_func op_5ce0_0_ff;
-extern xcpuop_func op_5ce8_0_nf;
-extern xcpuop_func op_5ce8_0_ff;
-extern xcpuop_func op_5cf0_0_nf;
-extern xcpuop_func op_5cf0_0_ff;
-extern xcpuop_func op_5cf8_0_nf;
-extern xcpuop_func op_5cf8_0_ff;
-extern xcpuop_func op_5cf9_0_nf;
-extern xcpuop_func op_5cf9_0_ff;
-extern xcpuop_func op_5cfa_0_nf;
-extern xcpuop_func op_5cfa_0_ff;
-extern xcpuop_func op_5cfb_0_nf;
-extern xcpuop_func op_5cfb_0_ff;
-extern xcpuop_func op_5cfc_0_nf;
-extern xcpuop_func op_5cfc_0_ff;
-extern xcpuop_func op_5dc0_0_nf;
-extern xcpuop_func op_5dc0_0_ff;
-extern xcpuop_func op_5dc8_0_nf;
-extern xcpuop_func op_5dc8_0_ff;
-extern xcpuop_func op_5dd0_0_nf;
-extern xcpuop_func op_5dd0_0_ff;
-extern xcpuop_func op_5dd8_0_nf;
-extern xcpuop_func op_5dd8_0_ff;
-extern xcpuop_func op_5de0_0_nf;
-extern xcpuop_func op_5de0_0_ff;
-extern xcpuop_func op_5de8_0_nf;
-extern xcpuop_func op_5de8_0_ff;
-extern xcpuop_func op_5df0_0_nf;
-extern xcpuop_func op_5df0_0_ff;
-extern xcpuop_func op_5df8_0_nf;
-extern xcpuop_func op_5df8_0_ff;
-extern xcpuop_func op_5df9_0_nf;
-extern xcpuop_func op_5df9_0_ff;
-extern xcpuop_func op_5dfa_0_nf;
-extern xcpuop_func op_5dfa_0_ff;
-extern xcpuop_func op_5dfb_0_nf;
-extern xcpuop_func op_5dfb_0_ff;
-extern xcpuop_func op_5dfc_0_nf;
-extern xcpuop_func op_5dfc_0_ff;
-extern xcpuop_func op_5ec0_0_nf;
-extern xcpuop_func op_5ec0_0_ff;
-extern xcpuop_func op_5ec8_0_nf;
-extern xcpuop_func op_5ec8_0_ff;
-extern xcpuop_func op_5ed0_0_nf;
-extern xcpuop_func op_5ed0_0_ff;
-extern xcpuop_func op_5ed8_0_nf;
-extern xcpuop_func op_5ed8_0_ff;
-extern xcpuop_func op_5ee0_0_nf;
-extern xcpuop_func op_5ee0_0_ff;
-extern xcpuop_func op_5ee8_0_nf;
-extern xcpuop_func op_5ee8_0_ff;
-extern xcpuop_func op_5ef0_0_nf;
-extern xcpuop_func op_5ef0_0_ff;
-extern xcpuop_func op_5ef8_0_nf;
-extern xcpuop_func op_5ef8_0_ff;
-extern xcpuop_func op_5ef9_0_nf;
-extern xcpuop_func op_5ef9_0_ff;
-extern xcpuop_func op_5efa_0_nf;
-extern xcpuop_func op_5efa_0_ff;
-extern xcpuop_func op_5efb_0_nf;
-extern xcpuop_func op_5efb_0_ff;
-extern xcpuop_func op_5efc_0_nf;
-extern xcpuop_func op_5efc_0_ff;
-extern xcpuop_func op_5fc0_0_nf;
-extern xcpuop_func op_5fc0_0_ff;
-extern xcpuop_func op_5fc8_0_nf;
-extern xcpuop_func op_5fc8_0_ff;
-extern xcpuop_func op_5fd0_0_nf;
-extern xcpuop_func op_5fd0_0_ff;
-extern xcpuop_func op_5fd8_0_nf;
-extern xcpuop_func op_5fd8_0_ff;
-extern xcpuop_func op_5fe0_0_nf;
-extern xcpuop_func op_5fe0_0_ff;
-extern xcpuop_func op_5fe8_0_nf;
-extern xcpuop_func op_5fe8_0_ff;
-extern xcpuop_func op_5ff0_0_nf;
-extern xcpuop_func op_5ff0_0_ff;
-extern xcpuop_func op_5ff8_0_nf;
-extern xcpuop_func op_5ff8_0_ff;
-extern xcpuop_func op_5ff9_0_nf;
-extern xcpuop_func op_5ff9_0_ff;
-extern xcpuop_func op_5ffa_0_nf;
-extern xcpuop_func op_5ffa_0_ff;
-extern xcpuop_func op_5ffb_0_nf;
-extern xcpuop_func op_5ffb_0_ff;
-extern xcpuop_func op_5ffc_0_nf;
-extern xcpuop_func op_5ffc_0_ff;
-extern xcpuop_func op_6000_0_nf;
-extern xcpuop_func op_6000_0_ff;
-extern xcpuop_func op_6001_0_nf;
-extern xcpuop_func op_6001_0_ff;
-extern xcpuop_func op_60ff_0_nf;
-extern xcpuop_func op_60ff_0_ff;
-extern xcpuop_func op_6100_0_nf;
-extern xcpuop_func op_6100_0_ff;
-extern xcpuop_func op_6101_0_nf;
-extern xcpuop_func op_6101_0_ff;
-extern xcpuop_func op_61ff_0_nf;
-extern xcpuop_func op_61ff_0_ff;
-extern xcpuop_func op_6200_0_nf;
-extern xcpuop_func op_6200_0_ff;
-extern xcpuop_func op_6201_0_nf;
-extern xcpuop_func op_6201_0_ff;
-extern xcpuop_func op_62ff_0_nf;
-extern xcpuop_func op_62ff_0_ff;
-extern xcpuop_func op_6300_0_nf;
-extern xcpuop_func op_6300_0_ff;
-extern xcpuop_func op_6301_0_nf;
-extern xcpuop_func op_6301_0_ff;
-extern xcpuop_func op_63ff_0_nf;
-extern xcpuop_func op_63ff_0_ff;
-extern xcpuop_func op_6400_0_nf;
-extern xcpuop_func op_6400_0_ff;
-extern xcpuop_func op_6401_0_nf;
-extern xcpuop_func op_6401_0_ff;
-extern xcpuop_func op_64ff_0_nf;
-extern xcpuop_func op_64ff_0_ff;
-extern xcpuop_func op_6500_0_nf;
-extern xcpuop_func op_6500_0_ff;
-extern xcpuop_func op_6501_0_nf;
-extern xcpuop_func op_6501_0_ff;
-extern xcpuop_func op_65ff_0_nf;
-extern xcpuop_func op_65ff_0_ff;
-extern xcpuop_func op_6600_0_nf;
-extern xcpuop_func op_6600_0_ff;
-extern xcpuop_func op_6601_0_nf;
-extern xcpuop_func op_6601_0_ff;
-extern xcpuop_func op_66ff_0_nf;
-extern xcpuop_func op_66ff_0_ff;
-extern xcpuop_func op_6700_0_nf;
-extern xcpuop_func op_6700_0_ff;
-extern xcpuop_func op_6701_0_nf;
-extern xcpuop_func op_6701_0_ff;
-extern xcpuop_func op_67ff_0_nf;
-extern xcpuop_func op_67ff_0_ff;
-extern xcpuop_func op_6800_0_nf;
-extern xcpuop_func op_6800_0_ff;
-extern xcpuop_func op_6801_0_nf;
-extern xcpuop_func op_6801_0_ff;
-extern xcpuop_func op_68ff_0_nf;
-extern xcpuop_func op_68ff_0_ff;
-extern xcpuop_func op_6900_0_nf;
-extern xcpuop_func op_6900_0_ff;
-extern xcpuop_func op_6901_0_nf;
-extern xcpuop_func op_6901_0_ff;
-extern xcpuop_func op_69ff_0_nf;
-extern xcpuop_func op_69ff_0_ff;
-extern xcpuop_func op_6a00_0_nf;
-extern xcpuop_func op_6a00_0_ff;
-extern xcpuop_func op_6a01_0_nf;
-extern xcpuop_func op_6a01_0_ff;
-extern xcpuop_func op_6aff_0_nf;
-extern xcpuop_func op_6aff_0_ff;
-extern xcpuop_func op_6b00_0_nf;
-extern xcpuop_func op_6b00_0_ff;
-extern xcpuop_func op_6b01_0_nf;
-extern xcpuop_func op_6b01_0_ff;
-extern xcpuop_func op_6bff_0_nf;
-extern xcpuop_func op_6bff_0_ff;
-extern xcpuop_func op_6c00_0_nf;
-extern xcpuop_func op_6c00_0_ff;
-extern xcpuop_func op_6c01_0_nf;
-extern xcpuop_func op_6c01_0_ff;
-extern xcpuop_func op_6cff_0_nf;
-extern xcpuop_func op_6cff_0_ff;
-extern xcpuop_func op_6d00_0_nf;
-extern xcpuop_func op_6d00_0_ff;
-extern xcpuop_func op_6d01_0_nf;
-extern xcpuop_func op_6d01_0_ff;
-extern xcpuop_func op_6dff_0_nf;
-extern xcpuop_func op_6dff_0_ff;
-extern xcpuop_func op_6e00_0_nf;
-extern xcpuop_func op_6e00_0_ff;
-extern xcpuop_func op_6e01_0_nf;
-extern xcpuop_func op_6e01_0_ff;
-extern xcpuop_func op_6eff_0_nf;
-extern xcpuop_func op_6eff_0_ff;
-extern xcpuop_func op_6f00_0_nf;
-extern xcpuop_func op_6f00_0_ff;
-extern xcpuop_func op_6f01_0_nf;
-extern xcpuop_func op_6f01_0_ff;
-extern xcpuop_func op_6fff_0_nf;
-extern xcpuop_func op_6fff_0_ff;
-extern xcpuop_func op_7000_0_nf;
-extern xcpuop_func op_7000_0_ff;
-extern xcpuop_func op_8000_0_nf;
-extern xcpuop_func op_8000_0_ff;
-extern xcpuop_func op_8010_0_nf;
-extern xcpuop_func op_8010_0_ff;
-extern xcpuop_func op_8018_0_nf;
-extern xcpuop_func op_8018_0_ff;
-extern xcpuop_func op_8020_0_nf;
-extern xcpuop_func op_8020_0_ff;
-extern xcpuop_func op_8028_0_nf;
-extern xcpuop_func op_8028_0_ff;
-extern xcpuop_func op_8030_0_nf;
-extern xcpuop_func op_8030_0_ff;
-extern xcpuop_func op_8038_0_nf;
-extern xcpuop_func op_8038_0_ff;
-extern xcpuop_func op_8039_0_nf;
-extern xcpuop_func op_8039_0_ff;
-extern xcpuop_func op_803a_0_nf;
-extern xcpuop_func op_803a_0_ff;
-extern xcpuop_func op_803b_0_nf;
-extern xcpuop_func op_803b_0_ff;
-extern xcpuop_func op_803c_0_nf;
-extern xcpuop_func op_803c_0_ff;
-extern xcpuop_func op_8040_0_nf;
-extern xcpuop_func op_8040_0_ff;
-extern xcpuop_func op_8050_0_nf;
-extern xcpuop_func op_8050_0_ff;
-extern xcpuop_func op_8058_0_nf;
-extern xcpuop_func op_8058_0_ff;
-extern xcpuop_func op_8060_0_nf;
-extern xcpuop_func op_8060_0_ff;
-extern xcpuop_func op_8068_0_nf;
-extern xcpuop_func op_8068_0_ff;
-extern xcpuop_func op_8070_0_nf;
-extern xcpuop_func op_8070_0_ff;
-extern xcpuop_func op_8078_0_nf;
-extern xcpuop_func op_8078_0_ff;
-extern xcpuop_func op_8079_0_nf;
-extern xcpuop_func op_8079_0_ff;
-extern xcpuop_func op_807a_0_nf;
-extern xcpuop_func op_807a_0_ff;
-extern xcpuop_func op_807b_0_nf;
-extern xcpuop_func op_807b_0_ff;
-extern xcpuop_func op_807c_0_nf;
-extern xcpuop_func op_807c_0_ff;
-extern xcpuop_func op_8080_0_nf;
-extern xcpuop_func op_8080_0_ff;
-extern xcpuop_func op_8090_0_nf;
-extern xcpuop_func op_8090_0_ff;
-extern xcpuop_func op_8098_0_nf;
-extern xcpuop_func op_8098_0_ff;
-extern xcpuop_func op_80a0_0_nf;
-extern xcpuop_func op_80a0_0_ff;
-extern xcpuop_func op_80a8_0_nf;
-extern xcpuop_func op_80a8_0_ff;
-extern xcpuop_func op_80b0_0_nf;
-extern xcpuop_func op_80b0_0_ff;
-extern xcpuop_func op_80b8_0_nf;
-extern xcpuop_func op_80b8_0_ff;
-extern xcpuop_func op_80b9_0_nf;
-extern xcpuop_func op_80b9_0_ff;
-extern xcpuop_func op_80ba_0_nf;
-extern xcpuop_func op_80ba_0_ff;
-extern xcpuop_func op_80bb_0_nf;
-extern xcpuop_func op_80bb_0_ff;
-extern xcpuop_func op_80bc_0_nf;
-extern xcpuop_func op_80bc_0_ff;
-extern xcpuop_func op_80c0_0_nf;
-extern xcpuop_func op_80c0_0_ff;
-extern xcpuop_func op_80d0_0_nf;
-extern xcpuop_func op_80d0_0_ff;
-extern xcpuop_func op_80d8_0_nf;
-extern xcpuop_func op_80d8_0_ff;
-extern xcpuop_func op_80e0_0_nf;
-extern xcpuop_func op_80e0_0_ff;
-extern xcpuop_func op_80e8_0_nf;
-extern xcpuop_func op_80e8_0_ff;
-extern xcpuop_func op_80f0_0_nf;
-extern xcpuop_func op_80f0_0_ff;
-extern xcpuop_func op_80f8_0_nf;
-extern xcpuop_func op_80f8_0_ff;
-extern xcpuop_func op_80f9_0_nf;
-extern xcpuop_func op_80f9_0_ff;
-extern xcpuop_func op_80fa_0_nf;
-extern xcpuop_func op_80fa_0_ff;
-extern xcpuop_func op_80fb_0_nf;
-extern xcpuop_func op_80fb_0_ff;
-extern xcpuop_func op_80fc_0_nf;
-extern xcpuop_func op_80fc_0_ff;
-extern xcpuop_func op_8100_0_nf;
-extern xcpuop_func op_8100_0_ff;
-extern xcpuop_func op_8108_0_nf;
-extern xcpuop_func op_8108_0_ff;
-extern xcpuop_func op_8110_0_nf;
-extern xcpuop_func op_8110_0_ff;
-extern xcpuop_func op_8118_0_nf;
-extern xcpuop_func op_8118_0_ff;
-extern xcpuop_func op_8120_0_nf;
-extern xcpuop_func op_8120_0_ff;
-extern xcpuop_func op_8128_0_nf;
-extern xcpuop_func op_8128_0_ff;
-extern xcpuop_func op_8130_0_nf;
-extern xcpuop_func op_8130_0_ff;
-extern xcpuop_func op_8138_0_nf;
-extern xcpuop_func op_8138_0_ff;
-extern xcpuop_func op_8139_0_nf;
-extern xcpuop_func op_8139_0_ff;
-extern xcpuop_func op_8140_0_nf;
-extern xcpuop_func op_8140_0_ff;
-extern xcpuop_func op_8148_0_nf;
-extern xcpuop_func op_8148_0_ff;
-extern xcpuop_func op_8150_0_nf;
-extern xcpuop_func op_8150_0_ff;
-extern xcpuop_func op_8158_0_nf;
-extern xcpuop_func op_8158_0_ff;
-extern xcpuop_func op_8160_0_nf;
-extern xcpuop_func op_8160_0_ff;
-extern xcpuop_func op_8168_0_nf;
-extern xcpuop_func op_8168_0_ff;
-extern xcpuop_func op_8170_0_nf;
-extern xcpuop_func op_8170_0_ff;
-extern xcpuop_func op_8178_0_nf;
-extern xcpuop_func op_8178_0_ff;
-extern xcpuop_func op_8179_0_nf;
-extern xcpuop_func op_8179_0_ff;
-extern xcpuop_func op_8180_0_nf;
-extern xcpuop_func op_8180_0_ff;
-extern xcpuop_func op_8188_0_nf;
-extern xcpuop_func op_8188_0_ff;
-extern xcpuop_func op_8190_0_nf;
-extern xcpuop_func op_8190_0_ff;
-extern xcpuop_func op_8198_0_nf;
-extern xcpuop_func op_8198_0_ff;
-extern xcpuop_func op_81a0_0_nf;
-extern xcpuop_func op_81a0_0_ff;
-extern xcpuop_func op_81a8_0_nf;
-extern xcpuop_func op_81a8_0_ff;
-extern xcpuop_func op_81b0_0_nf;
-extern xcpuop_func op_81b0_0_ff;
-extern xcpuop_func op_81b8_0_nf;
-extern xcpuop_func op_81b8_0_ff;
-extern xcpuop_func op_81b9_0_nf;
-extern xcpuop_func op_81b9_0_ff;
-extern xcpuop_func op_81c0_0_nf;
-extern xcpuop_func op_81c0_0_ff;
-extern xcpuop_func op_81d0_0_nf;
-extern xcpuop_func op_81d0_0_ff;
-extern xcpuop_func op_81d8_0_nf;
-extern xcpuop_func op_81d8_0_ff;
-extern xcpuop_func op_81e0_0_nf;
-extern xcpuop_func op_81e0_0_ff;
-extern xcpuop_func op_81e8_0_nf;
-extern xcpuop_func op_81e8_0_ff;
-extern xcpuop_func op_81f0_0_nf;
-extern xcpuop_func op_81f0_0_ff;
-extern xcpuop_func op_81f8_0_nf;
-extern xcpuop_func op_81f8_0_ff;
-extern xcpuop_func op_81f9_0_nf;
-extern xcpuop_func op_81f9_0_ff;
-extern xcpuop_func op_81fa_0_nf;
-extern xcpuop_func op_81fa_0_ff;
-extern xcpuop_func op_81fb_0_nf;
-extern xcpuop_func op_81fb_0_ff;
-extern xcpuop_func op_81fc_0_nf;
-extern xcpuop_func op_81fc_0_ff;
-extern xcpuop_func op_9000_0_nf;
-extern xcpuop_func op_9000_0_ff;
-extern xcpuop_func op_9010_0_nf;
-extern xcpuop_func op_9010_0_ff;
-extern xcpuop_func op_9018_0_nf;
-extern xcpuop_func op_9018_0_ff;
-extern xcpuop_func op_9020_0_nf;
-extern xcpuop_func op_9020_0_ff;
-extern xcpuop_func op_9028_0_nf;
-extern xcpuop_func op_9028_0_ff;
-extern xcpuop_func op_9030_0_nf;
-extern xcpuop_func op_9030_0_ff;
-extern xcpuop_func op_9038_0_nf;
-extern xcpuop_func op_9038_0_ff;
-extern xcpuop_func op_9039_0_nf;
-extern xcpuop_func op_9039_0_ff;
-extern xcpuop_func op_903a_0_nf;
-extern xcpuop_func op_903a_0_ff;
-extern xcpuop_func op_903b_0_nf;
-extern xcpuop_func op_903b_0_ff;
-extern xcpuop_func op_903c_0_nf;
-extern xcpuop_func op_903c_0_ff;
-extern xcpuop_func op_9040_0_nf;
-extern xcpuop_func op_9040_0_ff;
-extern xcpuop_func op_9048_0_nf;
-extern xcpuop_func op_9048_0_ff;
-extern xcpuop_func op_9050_0_nf;
-extern xcpuop_func op_9050_0_ff;
-extern xcpuop_func op_9058_0_nf;
-extern xcpuop_func op_9058_0_ff;
-extern xcpuop_func op_9060_0_nf;
-extern xcpuop_func op_9060_0_ff;
-extern xcpuop_func op_9068_0_nf;
-extern xcpuop_func op_9068_0_ff;
-extern xcpuop_func op_9070_0_nf;
-extern xcpuop_func op_9070_0_ff;
-extern xcpuop_func op_9078_0_nf;
-extern xcpuop_func op_9078_0_ff;
-extern xcpuop_func op_9079_0_nf;
-extern xcpuop_func op_9079_0_ff;
-extern xcpuop_func op_907a_0_nf;
-extern xcpuop_func op_907a_0_ff;
-extern xcpuop_func op_907b_0_nf;
-extern xcpuop_func op_907b_0_ff;
-extern xcpuop_func op_907c_0_nf;
-extern xcpuop_func op_907c_0_ff;
-extern xcpuop_func op_9080_0_nf;
-extern xcpuop_func op_9080_0_ff;
-extern xcpuop_func op_9088_0_nf;
-extern xcpuop_func op_9088_0_ff;
-extern xcpuop_func op_9090_0_nf;
-extern xcpuop_func op_9090_0_ff;
-extern xcpuop_func op_9098_0_nf;
-extern xcpuop_func op_9098_0_ff;
-extern xcpuop_func op_90a0_0_nf;
-extern xcpuop_func op_90a0_0_ff;
-extern xcpuop_func op_90a8_0_nf;
-extern xcpuop_func op_90a8_0_ff;
-extern xcpuop_func op_90b0_0_nf;
-extern xcpuop_func op_90b0_0_ff;
-extern xcpuop_func op_90b8_0_nf;
-extern xcpuop_func op_90b8_0_ff;
-extern xcpuop_func op_90b9_0_nf;
-extern xcpuop_func op_90b9_0_ff;
-extern xcpuop_func op_90ba_0_nf;
-extern xcpuop_func op_90ba_0_ff;
-extern xcpuop_func op_90bb_0_nf;
-extern xcpuop_func op_90bb_0_ff;
-extern xcpuop_func op_90bc_0_nf;
-extern xcpuop_func op_90bc_0_ff;
-extern xcpuop_func op_90c0_0_nf;
-extern xcpuop_func op_90c0_0_ff;
-extern xcpuop_func op_90c8_0_nf;
-extern xcpuop_func op_90c8_0_ff;
-extern xcpuop_func op_90d0_0_nf;
-extern xcpuop_func op_90d0_0_ff;
-extern xcpuop_func op_90d8_0_nf;
-extern xcpuop_func op_90d8_0_ff;
-extern xcpuop_func op_90e0_0_nf;
-extern xcpuop_func op_90e0_0_ff;
-extern xcpuop_func op_90e8_0_nf;
-extern xcpuop_func op_90e8_0_ff;
-extern xcpuop_func op_90f0_0_nf;
-extern xcpuop_func op_90f0_0_ff;
-extern xcpuop_func op_90f8_0_nf;
-extern xcpuop_func op_90f8_0_ff;
-extern xcpuop_func op_90f9_0_nf;
-extern xcpuop_func op_90f9_0_ff;
-extern xcpuop_func op_90fa_0_nf;
-extern xcpuop_func op_90fa_0_ff;
-extern xcpuop_func op_90fb_0_nf;
-extern xcpuop_func op_90fb_0_ff;
-extern xcpuop_func op_90fc_0_nf;
-extern xcpuop_func op_90fc_0_ff;
-extern xcpuop_func op_9100_0_nf;
-extern xcpuop_func op_9100_0_ff;
-extern xcpuop_func op_9108_0_nf;
-extern xcpuop_func op_9108_0_ff;
-extern xcpuop_func op_9110_0_nf;
-extern xcpuop_func op_9110_0_ff;
-extern xcpuop_func op_9118_0_nf;
-extern xcpuop_func op_9118_0_ff;
-extern xcpuop_func op_9120_0_nf;
-extern xcpuop_func op_9120_0_ff;
-extern xcpuop_func op_9128_0_nf;
-extern xcpuop_func op_9128_0_ff;
-extern xcpuop_func op_9130_0_nf;
-extern xcpuop_func op_9130_0_ff;
-extern xcpuop_func op_9138_0_nf;
-extern xcpuop_func op_9138_0_ff;
-extern xcpuop_func op_9139_0_nf;
-extern xcpuop_func op_9139_0_ff;
-extern xcpuop_func op_9140_0_nf;
-extern xcpuop_func op_9140_0_ff;
-extern xcpuop_func op_9148_0_nf;
-extern xcpuop_func op_9148_0_ff;
-extern xcpuop_func op_9150_0_nf;
-extern xcpuop_func op_9150_0_ff;
-extern xcpuop_func op_9158_0_nf;
-extern xcpuop_func op_9158_0_ff;
-extern xcpuop_func op_9160_0_nf;
-extern xcpuop_func op_9160_0_ff;
-extern xcpuop_func op_9168_0_nf;
-extern xcpuop_func op_9168_0_ff;
-extern xcpuop_func op_9170_0_nf;
-extern xcpuop_func op_9170_0_ff;
-extern xcpuop_func op_9178_0_nf;
-extern xcpuop_func op_9178_0_ff;
-extern xcpuop_func op_9179_0_nf;
-extern xcpuop_func op_9179_0_ff;
-extern xcpuop_func op_9180_0_nf;
-extern xcpuop_func op_9180_0_ff;
-extern xcpuop_func op_9188_0_nf;
-extern xcpuop_func op_9188_0_ff;
-extern xcpuop_func op_9190_0_nf;
-extern xcpuop_func op_9190_0_ff;
-extern xcpuop_func op_9198_0_nf;
-extern xcpuop_func op_9198_0_ff;
-extern xcpuop_func op_91a0_0_nf;
-extern xcpuop_func op_91a0_0_ff;
-extern xcpuop_func op_91a8_0_nf;
-extern xcpuop_func op_91a8_0_ff;
-extern xcpuop_func op_91b0_0_nf;
-extern xcpuop_func op_91b0_0_ff;
-extern xcpuop_func op_91b8_0_nf;
-extern xcpuop_func op_91b8_0_ff;
-extern xcpuop_func op_91b9_0_nf;
-extern xcpuop_func op_91b9_0_ff;
-extern xcpuop_func op_91c0_0_nf;
-extern xcpuop_func op_91c0_0_ff;
-extern xcpuop_func op_91c8_0_nf;
-extern xcpuop_func op_91c8_0_ff;
-extern xcpuop_func op_91d0_0_nf;
-extern xcpuop_func op_91d0_0_ff;
-extern xcpuop_func op_91d8_0_nf;
-extern xcpuop_func op_91d8_0_ff;
-extern xcpuop_func op_91e0_0_nf;
-extern xcpuop_func op_91e0_0_ff;
-extern xcpuop_func op_91e8_0_nf;
-extern xcpuop_func op_91e8_0_ff;
-extern xcpuop_func op_91f0_0_nf;
-extern xcpuop_func op_91f0_0_ff;
-extern xcpuop_func op_91f8_0_nf;
-extern xcpuop_func op_91f8_0_ff;
-extern xcpuop_func op_91f9_0_nf;
-extern xcpuop_func op_91f9_0_ff;
-extern xcpuop_func op_91fa_0_nf;
-extern xcpuop_func op_91fa_0_ff;
-extern xcpuop_func op_91fb_0_nf;
-extern xcpuop_func op_91fb_0_ff;
-extern xcpuop_func op_91fc_0_nf;
-extern xcpuop_func op_91fc_0_ff;
-extern xcpuop_func op_b000_0_nf;
-extern xcpuop_func op_b000_0_ff;
-extern xcpuop_func op_b010_0_nf;
-extern xcpuop_func op_b010_0_ff;
-extern xcpuop_func op_b018_0_nf;
-extern xcpuop_func op_b018_0_ff;
-extern xcpuop_func op_b020_0_nf;
-extern xcpuop_func op_b020_0_ff;
-extern xcpuop_func op_b028_0_nf;
-extern xcpuop_func op_b028_0_ff;
-extern xcpuop_func op_b030_0_nf;
-extern xcpuop_func op_b030_0_ff;
-extern xcpuop_func op_b038_0_nf;
-extern xcpuop_func op_b038_0_ff;
-extern xcpuop_func op_b039_0_nf;
-extern xcpuop_func op_b039_0_ff;
-extern xcpuop_func op_b03a_0_nf;
-extern xcpuop_func op_b03a_0_ff;
-extern xcpuop_func op_b03b_0_nf;
-extern xcpuop_func op_b03b_0_ff;
-extern xcpuop_func op_b03c_0_nf;
-extern xcpuop_func op_b03c_0_ff;
-extern xcpuop_func op_b040_0_nf;
-extern xcpuop_func op_b040_0_ff;
-extern xcpuop_func op_b048_0_nf;
-extern xcpuop_func op_b048_0_ff;
-extern xcpuop_func op_b050_0_nf;
-extern xcpuop_func op_b050_0_ff;
-extern xcpuop_func op_b058_0_nf;
-extern xcpuop_func op_b058_0_ff;
-extern xcpuop_func op_b060_0_nf;
-extern xcpuop_func op_b060_0_ff;
-extern xcpuop_func op_b068_0_nf;
-extern xcpuop_func op_b068_0_ff;
-extern xcpuop_func op_b070_0_nf;
-extern xcpuop_func op_b070_0_ff;
-extern xcpuop_func op_b078_0_nf;
-extern xcpuop_func op_b078_0_ff;
-extern xcpuop_func op_b079_0_nf;
-extern xcpuop_func op_b079_0_ff;
-extern xcpuop_func op_b07a_0_nf;
-extern xcpuop_func op_b07a_0_ff;
-extern xcpuop_func op_b07b_0_nf;
-extern xcpuop_func op_b07b_0_ff;
-extern xcpuop_func op_b07c_0_nf;
-extern xcpuop_func op_b07c_0_ff;
-extern xcpuop_func op_b080_0_nf;
-extern xcpuop_func op_b080_0_ff;
-extern xcpuop_func op_b088_0_nf;
-extern xcpuop_func op_b088_0_ff;
-extern xcpuop_func op_b090_0_nf;
-extern xcpuop_func op_b090_0_ff;
-extern xcpuop_func op_b098_0_nf;
-extern xcpuop_func op_b098_0_ff;
-extern xcpuop_func op_b0a0_0_nf;
-extern xcpuop_func op_b0a0_0_ff;
-extern xcpuop_func op_b0a8_0_nf;
-extern xcpuop_func op_b0a8_0_ff;
-extern xcpuop_func op_b0b0_0_nf;
-extern xcpuop_func op_b0b0_0_ff;
-extern xcpuop_func op_b0b8_0_nf;
-extern xcpuop_func op_b0b8_0_ff;
-extern xcpuop_func op_b0b9_0_nf;
-extern xcpuop_func op_b0b9_0_ff;
-extern xcpuop_func op_b0ba_0_nf;
-extern xcpuop_func op_b0ba_0_ff;
-extern xcpuop_func op_b0bb_0_nf;
-extern xcpuop_func op_b0bb_0_ff;
-extern xcpuop_func op_b0bc_0_nf;
-extern xcpuop_func op_b0bc_0_ff;
-extern xcpuop_func op_b0c0_0_nf;
-extern xcpuop_func op_b0c0_0_ff;
-extern xcpuop_func op_b0c8_0_nf;
-extern xcpuop_func op_b0c8_0_ff;
-extern xcpuop_func op_b0d0_0_nf;
-extern xcpuop_func op_b0d0_0_ff;
-extern xcpuop_func op_b0d8_0_nf;
-extern xcpuop_func op_b0d8_0_ff;
-extern xcpuop_func op_b0e0_0_nf;
-extern xcpuop_func op_b0e0_0_ff;
-extern xcpuop_func op_b0e8_0_nf;
-extern xcpuop_func op_b0e8_0_ff;
-extern xcpuop_func op_b0f0_0_nf;
-extern xcpuop_func op_b0f0_0_ff;
-extern xcpuop_func op_b0f8_0_nf;
-extern xcpuop_func op_b0f8_0_ff;
-extern xcpuop_func op_b0f9_0_nf;
-extern xcpuop_func op_b0f9_0_ff;
-extern xcpuop_func op_b0fa_0_nf;
-extern xcpuop_func op_b0fa_0_ff;
-extern xcpuop_func op_b0fb_0_nf;
-extern xcpuop_func op_b0fb_0_ff;
-extern xcpuop_func op_b0fc_0_nf;
-extern xcpuop_func op_b0fc_0_ff;
-extern xcpuop_func op_b100_0_nf;
-extern xcpuop_func op_b100_0_ff;
-extern xcpuop_func op_b108_0_nf;
-extern xcpuop_func op_b108_0_ff;
-extern xcpuop_func op_b110_0_nf;
-extern xcpuop_func op_b110_0_ff;
-extern xcpuop_func op_b118_0_nf;
-extern xcpuop_func op_b118_0_ff;
-extern xcpuop_func op_b120_0_nf;
-extern xcpuop_func op_b120_0_ff;
-extern xcpuop_func op_b128_0_nf;
-extern xcpuop_func op_b128_0_ff;
-extern xcpuop_func op_b130_0_nf;
-extern xcpuop_func op_b130_0_ff;
-extern xcpuop_func op_b138_0_nf;
-extern xcpuop_func op_b138_0_ff;
-extern xcpuop_func op_b139_0_nf;
-extern xcpuop_func op_b139_0_ff;
-extern xcpuop_func op_b140_0_nf;
-extern xcpuop_func op_b140_0_ff;
-extern xcpuop_func op_b148_0_nf;
-extern xcpuop_func op_b148_0_ff;
-extern xcpuop_func op_b150_0_nf;
-extern xcpuop_func op_b150_0_ff;
-extern xcpuop_func op_b158_0_nf;
-extern xcpuop_func op_b158_0_ff;
-extern xcpuop_func op_b160_0_nf;
-extern xcpuop_func op_b160_0_ff;
-extern xcpuop_func op_b168_0_nf;
-extern xcpuop_func op_b168_0_ff;
-extern xcpuop_func op_b170_0_nf;
-extern xcpuop_func op_b170_0_ff;
-extern xcpuop_func op_b178_0_nf;
-extern xcpuop_func op_b178_0_ff;
-extern xcpuop_func op_b179_0_nf;
-extern xcpuop_func op_b179_0_ff;
-extern xcpuop_func op_b180_0_nf;
-extern xcpuop_func op_b180_0_ff;
-extern xcpuop_func op_b188_0_nf;
-extern xcpuop_func op_b188_0_ff;
-extern xcpuop_func op_b190_0_nf;
-extern xcpuop_func op_b190_0_ff;
-extern xcpuop_func op_b198_0_nf;
-extern xcpuop_func op_b198_0_ff;
-extern xcpuop_func op_b1a0_0_nf;
-extern xcpuop_func op_b1a0_0_ff;
-extern xcpuop_func op_b1a8_0_nf;
-extern xcpuop_func op_b1a8_0_ff;
-extern xcpuop_func op_b1b0_0_nf;
-extern xcpuop_func op_b1b0_0_ff;
-extern xcpuop_func op_b1b8_0_nf;
-extern xcpuop_func op_b1b8_0_ff;
-extern xcpuop_func op_b1b9_0_nf;
-extern xcpuop_func op_b1b9_0_ff;
-extern xcpuop_func op_b1c0_0_nf;
-extern xcpuop_func op_b1c0_0_ff;
-extern xcpuop_func op_b1c8_0_nf;
-extern xcpuop_func op_b1c8_0_ff;
-extern xcpuop_func op_b1d0_0_nf;
-extern xcpuop_func op_b1d0_0_ff;
-extern xcpuop_func op_b1d8_0_nf;
-extern xcpuop_func op_b1d8_0_ff;
-extern xcpuop_func op_b1e0_0_nf;
-extern xcpuop_func op_b1e0_0_ff;
-extern xcpuop_func op_b1e8_0_nf;
-extern xcpuop_func op_b1e8_0_ff;
-extern xcpuop_func op_b1f0_0_nf;
-extern xcpuop_func op_b1f0_0_ff;
-extern xcpuop_func op_b1f8_0_nf;
-extern xcpuop_func op_b1f8_0_ff;
-extern xcpuop_func op_b1f9_0_nf;
-extern xcpuop_func op_b1f9_0_ff;
-extern xcpuop_func op_b1fa_0_nf;
-extern xcpuop_func op_b1fa_0_ff;
-extern xcpuop_func op_b1fb_0_nf;
-extern xcpuop_func op_b1fb_0_ff;
-extern xcpuop_func op_b1fc_0_nf;
-extern xcpuop_func op_b1fc_0_ff;
-extern xcpuop_func op_c000_0_nf;
-extern xcpuop_func op_c000_0_ff;
-extern xcpuop_func op_c010_0_nf;
-extern xcpuop_func op_c010_0_ff;
-extern xcpuop_func op_c018_0_nf;
-extern xcpuop_func op_c018_0_ff;
-extern xcpuop_func op_c020_0_nf;
-extern xcpuop_func op_c020_0_ff;
-extern xcpuop_func op_c028_0_nf;
-extern xcpuop_func op_c028_0_ff;
-extern xcpuop_func op_c030_0_nf;
-extern xcpuop_func op_c030_0_ff;
-extern xcpuop_func op_c038_0_nf;
-extern xcpuop_func op_c038_0_ff;
-extern xcpuop_func op_c039_0_nf;
-extern xcpuop_func op_c039_0_ff;
-extern xcpuop_func op_c03a_0_nf;
-extern xcpuop_func op_c03a_0_ff;
-extern xcpuop_func op_c03b_0_nf;
-extern xcpuop_func op_c03b_0_ff;
-extern xcpuop_func op_c03c_0_nf;
-extern xcpuop_func op_c03c_0_ff;
-extern xcpuop_func op_c040_0_nf;
-extern xcpuop_func op_c040_0_ff;
-extern xcpuop_func op_c050_0_nf;
-extern xcpuop_func op_c050_0_ff;
-extern xcpuop_func op_c058_0_nf;
-extern xcpuop_func op_c058_0_ff;
-extern xcpuop_func op_c060_0_nf;
-extern xcpuop_func op_c060_0_ff;
-extern xcpuop_func op_c068_0_nf;
-extern xcpuop_func op_c068_0_ff;
-extern xcpuop_func op_c070_0_nf;
-extern xcpuop_func op_c070_0_ff;
-extern xcpuop_func op_c078_0_nf;
-extern xcpuop_func op_c078_0_ff;
-extern xcpuop_func op_c079_0_nf;
-extern xcpuop_func op_c079_0_ff;
-extern xcpuop_func op_c07a_0_nf;
-extern xcpuop_func op_c07a_0_ff;
-extern xcpuop_func op_c07b_0_nf;
-extern xcpuop_func op_c07b_0_ff;
-extern xcpuop_func op_c07c_0_nf;
-extern xcpuop_func op_c07c_0_ff;
-extern xcpuop_func op_c080_0_nf;
-extern xcpuop_func op_c080_0_ff;
-extern xcpuop_func op_c090_0_nf;
-extern xcpuop_func op_c090_0_ff;
-extern xcpuop_func op_c098_0_nf;
-extern xcpuop_func op_c098_0_ff;
-extern xcpuop_func op_c0a0_0_nf;
-extern xcpuop_func op_c0a0_0_ff;
-extern xcpuop_func op_c0a8_0_nf;
-extern xcpuop_func op_c0a8_0_ff;
-extern xcpuop_func op_c0b0_0_nf;
-extern xcpuop_func op_c0b0_0_ff;
-extern xcpuop_func op_c0b8_0_nf;
-extern xcpuop_func op_c0b8_0_ff;
-extern xcpuop_func op_c0b9_0_nf;
-extern xcpuop_func op_c0b9_0_ff;
-extern xcpuop_func op_c0ba_0_nf;
-extern xcpuop_func op_c0ba_0_ff;
-extern xcpuop_func op_c0bb_0_nf;
-extern xcpuop_func op_c0bb_0_ff;
-extern xcpuop_func op_c0bc_0_nf;
-extern xcpuop_func op_c0bc_0_ff;
-extern xcpuop_func op_c0c0_0_nf;
-extern xcpuop_func op_c0c0_0_ff;
-extern xcpuop_func op_c0d0_0_nf;
-extern xcpuop_func op_c0d0_0_ff;
-extern xcpuop_func op_c0d8_0_nf;
-extern xcpuop_func op_c0d8_0_ff;
-extern xcpuop_func op_c0e0_0_nf;
-extern xcpuop_func op_c0e0_0_ff;
-extern xcpuop_func op_c0e8_0_nf;
-extern xcpuop_func op_c0e8_0_ff;
-extern xcpuop_func op_c0f0_0_nf;
-extern xcpuop_func op_c0f0_0_ff;
-extern xcpuop_func op_c0f8_0_nf;
-extern xcpuop_func op_c0f8_0_ff;
-extern xcpuop_func op_c0f9_0_nf;
-extern xcpuop_func op_c0f9_0_ff;
-extern xcpuop_func op_c0fa_0_nf;
-extern xcpuop_func op_c0fa_0_ff;
-extern xcpuop_func op_c0fb_0_nf;
-extern xcpuop_func op_c0fb_0_ff;
-extern xcpuop_func op_c0fc_0_nf;
-extern xcpuop_func op_c0fc_0_ff;
-extern xcpuop_func op_c100_0_nf;
-extern xcpuop_func op_c100_0_ff;
-extern xcpuop_func op_c108_0_nf;
-extern xcpuop_func op_c108_0_ff;
-extern xcpuop_func op_c110_0_nf;
-extern xcpuop_func op_c110_0_ff;
-extern xcpuop_func op_c118_0_nf;
-extern xcpuop_func op_c118_0_ff;
-extern xcpuop_func op_c120_0_nf;
-extern xcpuop_func op_c120_0_ff;
-extern xcpuop_func op_c128_0_nf;
-extern xcpuop_func op_c128_0_ff;
-extern xcpuop_func op_c130_0_nf;
-extern xcpuop_func op_c130_0_ff;
-extern xcpuop_func op_c138_0_nf;
-extern xcpuop_func op_c138_0_ff;
-extern xcpuop_func op_c139_0_nf;
-extern xcpuop_func op_c139_0_ff;
-extern xcpuop_func op_c140_0_nf;
-extern xcpuop_func op_c140_0_ff;
-extern xcpuop_func op_c148_0_nf;
-extern xcpuop_func op_c148_0_ff;
-extern xcpuop_func op_c150_0_nf;
-extern xcpuop_func op_c150_0_ff;
-extern xcpuop_func op_c158_0_nf;
-extern xcpuop_func op_c158_0_ff;
-extern xcpuop_func op_c160_0_nf;
-extern xcpuop_func op_c160_0_ff;
-extern xcpuop_func op_c168_0_nf;
-extern xcpuop_func op_c168_0_ff;
-extern xcpuop_func op_c170_0_nf;
-extern xcpuop_func op_c170_0_ff;
-extern xcpuop_func op_c178_0_nf;
-extern xcpuop_func op_c178_0_ff;
-extern xcpuop_func op_c179_0_nf;
-extern xcpuop_func op_c179_0_ff;
-extern xcpuop_func op_c188_0_nf;
-extern xcpuop_func op_c188_0_ff;
-extern xcpuop_func op_c190_0_nf;
-extern xcpuop_func op_c190_0_ff;
-extern xcpuop_func op_c198_0_nf;
-extern xcpuop_func op_c198_0_ff;
-extern xcpuop_func op_c1a0_0_nf;
-extern xcpuop_func op_c1a0_0_ff;
-extern xcpuop_func op_c1a8_0_nf;
-extern xcpuop_func op_c1a8_0_ff;
-extern xcpuop_func op_c1b0_0_nf;
-extern xcpuop_func op_c1b0_0_ff;
-extern xcpuop_func op_c1b8_0_nf;
-extern xcpuop_func op_c1b8_0_ff;
-extern xcpuop_func op_c1b9_0_nf;
-extern xcpuop_func op_c1b9_0_ff;
-extern xcpuop_func op_c1c0_0_nf;
-extern xcpuop_func op_c1c0_0_ff;
-extern xcpuop_func op_c1d0_0_nf;
-extern xcpuop_func op_c1d0_0_ff;
-extern xcpuop_func op_c1d8_0_nf;
-extern xcpuop_func op_c1d8_0_ff;
-extern xcpuop_func op_c1e0_0_nf;
-extern xcpuop_func op_c1e0_0_ff;
-extern xcpuop_func op_c1e8_0_nf;
-extern xcpuop_func op_c1e8_0_ff;
-extern xcpuop_func op_c1f0_0_nf;
-extern xcpuop_func op_c1f0_0_ff;
-extern xcpuop_func op_c1f8_0_nf;
-extern xcpuop_func op_c1f8_0_ff;
-extern xcpuop_func op_c1f9_0_nf;
-extern xcpuop_func op_c1f9_0_ff;
-extern xcpuop_func op_c1fa_0_nf;
-extern xcpuop_func op_c1fa_0_ff;
-extern xcpuop_func op_c1fb_0_nf;
-extern xcpuop_func op_c1fb_0_ff;
-extern xcpuop_func op_c1fc_0_nf;
-extern xcpuop_func op_c1fc_0_ff;
-extern xcpuop_func op_d000_0_nf;
-extern xcpuop_func op_d000_0_ff;
-extern xcpuop_func op_d010_0_nf;
-extern xcpuop_func op_d010_0_ff;
-extern xcpuop_func op_d018_0_nf;
-extern xcpuop_func op_d018_0_ff;
-extern xcpuop_func op_d020_0_nf;
-extern xcpuop_func op_d020_0_ff;
-extern xcpuop_func op_d028_0_nf;
-extern xcpuop_func op_d028_0_ff;
-extern xcpuop_func op_d030_0_nf;
-extern xcpuop_func op_d030_0_ff;
-extern xcpuop_func op_d038_0_nf;
-extern xcpuop_func op_d038_0_ff;
-extern xcpuop_func op_d039_0_nf;
-extern xcpuop_func op_d039_0_ff;
-extern xcpuop_func op_d03a_0_nf;
-extern xcpuop_func op_d03a_0_ff;
-extern xcpuop_func op_d03b_0_nf;
-extern xcpuop_func op_d03b_0_ff;
-extern xcpuop_func op_d03c_0_nf;
-extern xcpuop_func op_d03c_0_ff;
-extern xcpuop_func op_d040_0_nf;
-extern xcpuop_func op_d040_0_ff;
-extern xcpuop_func op_d048_0_nf;
-extern xcpuop_func op_d048_0_ff;
-extern xcpuop_func op_d050_0_nf;
-extern xcpuop_func op_d050_0_ff;
-extern xcpuop_func op_d058_0_nf;
-extern xcpuop_func op_d058_0_ff;
-extern xcpuop_func op_d060_0_nf;
-extern xcpuop_func op_d060_0_ff;
-extern xcpuop_func op_d068_0_nf;
-extern xcpuop_func op_d068_0_ff;
-extern xcpuop_func op_d070_0_nf;
-extern xcpuop_func op_d070_0_ff;
-extern xcpuop_func op_d078_0_nf;
-extern xcpuop_func op_d078_0_ff;
-extern xcpuop_func op_d079_0_nf;
-extern xcpuop_func op_d079_0_ff;
-extern xcpuop_func op_d07a_0_nf;
-extern xcpuop_func op_d07a_0_ff;
-extern xcpuop_func op_d07b_0_nf;
-extern xcpuop_func op_d07b_0_ff;
-extern xcpuop_func op_d07c_0_nf;
-extern xcpuop_func op_d07c_0_ff;
-extern xcpuop_func op_d080_0_nf;
-extern xcpuop_func op_d080_0_ff;
-extern xcpuop_func op_d088_0_nf;
-extern xcpuop_func op_d088_0_ff;
-extern xcpuop_func op_d090_0_nf;
-extern xcpuop_func op_d090_0_ff;
-extern xcpuop_func op_d098_0_nf;
-extern xcpuop_func op_d098_0_ff;
-extern xcpuop_func op_d0a0_0_nf;
-extern xcpuop_func op_d0a0_0_ff;
-extern xcpuop_func op_d0a8_0_nf;
-extern xcpuop_func op_d0a8_0_ff;
-extern xcpuop_func op_d0b0_0_nf;
-extern xcpuop_func op_d0b0_0_ff;
-extern xcpuop_func op_d0b8_0_nf;
-extern xcpuop_func op_d0b8_0_ff;
-extern xcpuop_func op_d0b9_0_nf;
-extern xcpuop_func op_d0b9_0_ff;
-extern xcpuop_func op_d0ba_0_nf;
-extern xcpuop_func op_d0ba_0_ff;
-extern xcpuop_func op_d0bb_0_nf;
-extern xcpuop_func op_d0bb_0_ff;
-extern xcpuop_func op_d0bc_0_nf;
-extern xcpuop_func op_d0bc_0_ff;
-extern xcpuop_func op_d0c0_0_nf;
-extern xcpuop_func op_d0c0_0_ff;
-extern xcpuop_func op_d0c8_0_nf;
-extern xcpuop_func op_d0c8_0_ff;
-extern xcpuop_func op_d0d0_0_nf;
-extern xcpuop_func op_d0d0_0_ff;
-extern xcpuop_func op_d0d8_0_nf;
-extern xcpuop_func op_d0d8_0_ff;
-extern xcpuop_func op_d0e0_0_nf;
-extern xcpuop_func op_d0e0_0_ff;
-extern xcpuop_func op_d0e8_0_nf;
-extern xcpuop_func op_d0e8_0_ff;
-extern xcpuop_func op_d0f0_0_nf;
-extern xcpuop_func op_d0f0_0_ff;
-extern xcpuop_func op_d0f8_0_nf;
-extern xcpuop_func op_d0f8_0_ff;
-extern xcpuop_func op_d0f9_0_nf;
-extern xcpuop_func op_d0f9_0_ff;
-extern xcpuop_func op_d0fa_0_nf;
-extern xcpuop_func op_d0fa_0_ff;
-extern xcpuop_func op_d0fb_0_nf;
-extern xcpuop_func op_d0fb_0_ff;
-extern xcpuop_func op_d0fc_0_nf;
-extern xcpuop_func op_d0fc_0_ff;
-extern xcpuop_func op_d100_0_nf;
-extern xcpuop_func op_d100_0_ff;
-extern xcpuop_func op_d108_0_nf;
-extern xcpuop_func op_d108_0_ff;
-extern xcpuop_func op_d110_0_nf;
-extern xcpuop_func op_d110_0_ff;
-extern xcpuop_func op_d118_0_nf;
-extern xcpuop_func op_d118_0_ff;
-extern xcpuop_func op_d120_0_nf;
-extern xcpuop_func op_d120_0_ff;
-extern xcpuop_func op_d128_0_nf;
-extern xcpuop_func op_d128_0_ff;
-extern xcpuop_func op_d130_0_nf;
-extern xcpuop_func op_d130_0_ff;
-extern xcpuop_func op_d138_0_nf;
-extern xcpuop_func op_d138_0_ff;
-extern xcpuop_func op_d139_0_nf;
-extern xcpuop_func op_d139_0_ff;
-extern xcpuop_func op_d140_0_nf;
-extern xcpuop_func op_d140_0_ff;
-extern xcpuop_func op_d148_0_nf;
-extern xcpuop_func op_d148_0_ff;
-extern xcpuop_func op_d150_0_nf;
-extern xcpuop_func op_d150_0_ff;
-extern xcpuop_func op_d158_0_nf;
-extern xcpuop_func op_d158_0_ff;
-extern xcpuop_func op_d160_0_nf;
-extern xcpuop_func op_d160_0_ff;
-extern xcpuop_func op_d168_0_nf;
-extern xcpuop_func op_d168_0_ff;
-extern xcpuop_func op_d170_0_nf;
-extern xcpuop_func op_d170_0_ff;
-extern xcpuop_func op_d178_0_nf;
-extern xcpuop_func op_d178_0_ff;
-extern xcpuop_func op_d179_0_nf;
-extern xcpuop_func op_d179_0_ff;
-extern xcpuop_func op_d180_0_nf;
-extern xcpuop_func op_d180_0_ff;
-extern xcpuop_func op_d188_0_nf;
-extern xcpuop_func op_d188_0_ff;
-extern xcpuop_func op_d190_0_nf;
-extern xcpuop_func op_d190_0_ff;
-extern xcpuop_func op_d198_0_nf;
-extern xcpuop_func op_d198_0_ff;
-extern xcpuop_func op_d1a0_0_nf;
-extern xcpuop_func op_d1a0_0_ff;
-extern xcpuop_func op_d1a8_0_nf;
-extern xcpuop_func op_d1a8_0_ff;
-extern xcpuop_func op_d1b0_0_nf;
-extern xcpuop_func op_d1b0_0_ff;
-extern xcpuop_func op_d1b8_0_nf;
-extern xcpuop_func op_d1b8_0_ff;
-extern xcpuop_func op_d1b9_0_nf;
-extern xcpuop_func op_d1b9_0_ff;
-extern xcpuop_func op_d1c0_0_nf;
-extern xcpuop_func op_d1c0_0_ff;
-extern xcpuop_func op_d1c8_0_nf;
-extern xcpuop_func op_d1c8_0_ff;
-extern xcpuop_func op_d1d0_0_nf;
-extern xcpuop_func op_d1d0_0_ff;
-extern xcpuop_func op_d1d8_0_nf;
-extern xcpuop_func op_d1d8_0_ff;
-extern xcpuop_func op_d1e0_0_nf;
-extern xcpuop_func op_d1e0_0_ff;
-extern xcpuop_func op_d1e8_0_nf;
-extern xcpuop_func op_d1e8_0_ff;
-extern xcpuop_func op_d1f0_0_nf;
-extern xcpuop_func op_d1f0_0_ff;
-extern xcpuop_func op_d1f8_0_nf;
-extern xcpuop_func op_d1f8_0_ff;
-extern xcpuop_func op_d1f9_0_nf;
-extern xcpuop_func op_d1f9_0_ff;
-extern xcpuop_func op_d1fa_0_nf;
-extern xcpuop_func op_d1fa_0_ff;
-extern xcpuop_func op_d1fb_0_nf;
-extern xcpuop_func op_d1fb_0_ff;
-extern xcpuop_func op_d1fc_0_nf;
-extern xcpuop_func op_d1fc_0_ff;
-extern xcpuop_func op_e000_0_nf;
-extern xcpuop_func op_e000_0_ff;
-extern xcpuop_func op_e008_0_nf;
-extern xcpuop_func op_e008_0_ff;
-extern xcpuop_func op_e010_0_nf;
-extern xcpuop_func op_e010_0_ff;
-extern xcpuop_func op_e018_0_nf;
-extern xcpuop_func op_e018_0_ff;
-extern xcpuop_func op_e020_0_nf;
-extern xcpuop_func op_e020_0_ff;
-extern xcpuop_func op_e028_0_nf;
-extern xcpuop_func op_e028_0_ff;
-extern xcpuop_func op_e030_0_nf;
-extern xcpuop_func op_e030_0_ff;
-extern xcpuop_func op_e038_0_nf;
-extern xcpuop_func op_e038_0_ff;
-extern xcpuop_func op_e040_0_nf;
-extern xcpuop_func op_e040_0_ff;
-extern xcpuop_func op_e048_0_nf;
-extern xcpuop_func op_e048_0_ff;
-extern xcpuop_func op_e050_0_nf;
-extern xcpuop_func op_e050_0_ff;
-extern xcpuop_func op_e058_0_nf;
-extern xcpuop_func op_e058_0_ff;
-extern xcpuop_func op_e060_0_nf;
-extern xcpuop_func op_e060_0_ff;
-extern xcpuop_func op_e068_0_nf;
-extern xcpuop_func op_e068_0_ff;
-extern xcpuop_func op_e070_0_nf;
-extern xcpuop_func op_e070_0_ff;
-extern xcpuop_func op_e078_0_nf;
-extern xcpuop_func op_e078_0_ff;
-extern xcpuop_func op_e080_0_nf;
-extern xcpuop_func op_e080_0_ff;
-extern xcpuop_func op_e088_0_nf;
-extern xcpuop_func op_e088_0_ff;
-extern xcpuop_func op_e090_0_nf;
-extern xcpuop_func op_e090_0_ff;
-extern xcpuop_func op_e098_0_nf;
-extern xcpuop_func op_e098_0_ff;
-extern xcpuop_func op_e0a0_0_nf;
-extern xcpuop_func op_e0a0_0_ff;
-extern xcpuop_func op_e0a8_0_nf;
-extern xcpuop_func op_e0a8_0_ff;
-extern xcpuop_func op_e0b0_0_nf;
-extern xcpuop_func op_e0b0_0_ff;
-extern xcpuop_func op_e0b8_0_nf;
-extern xcpuop_func op_e0b8_0_ff;
-extern xcpuop_func op_e0d0_0_nf;
-extern xcpuop_func op_e0d0_0_ff;
-extern xcpuop_func op_e0d8_0_nf;
-extern xcpuop_func op_e0d8_0_ff;
-extern xcpuop_func op_e0e0_0_nf;
-extern xcpuop_func op_e0e0_0_ff;
-extern xcpuop_func op_e0e8_0_nf;
-extern xcpuop_func op_e0e8_0_ff;
-extern xcpuop_func op_e0f0_0_nf;
-extern xcpuop_func op_e0f0_0_ff;
-extern xcpuop_func op_e0f8_0_nf;
-extern xcpuop_func op_e0f8_0_ff;
-extern xcpuop_func op_e0f9_0_nf;
-extern xcpuop_func op_e0f9_0_ff;
-extern xcpuop_func op_e100_0_nf;
-extern xcpuop_func op_e100_0_ff;
-extern xcpuop_func op_e108_0_nf;
-extern xcpuop_func op_e108_0_ff;
-extern xcpuop_func op_e110_0_nf;
-extern xcpuop_func op_e110_0_ff;
-extern xcpuop_func op_e118_0_nf;
-extern xcpuop_func op_e118_0_ff;
-extern xcpuop_func op_e120_0_nf;
-extern xcpuop_func op_e120_0_ff;
-extern xcpuop_func op_e128_0_nf;
-extern xcpuop_func op_e128_0_ff;
-extern xcpuop_func op_e130_0_nf;
-extern xcpuop_func op_e130_0_ff;
-extern xcpuop_func op_e138_0_nf;
-extern xcpuop_func op_e138_0_ff;
-extern xcpuop_func op_e140_0_nf;
-extern xcpuop_func op_e140_0_ff;
-extern xcpuop_func op_e148_0_nf;
-extern xcpuop_func op_e148_0_ff;
-extern xcpuop_func op_e150_0_nf;
-extern xcpuop_func op_e150_0_ff;
-extern xcpuop_func op_e158_0_nf;
-extern xcpuop_func op_e158_0_ff;
-extern xcpuop_func op_e160_0_nf;
-extern xcpuop_func op_e160_0_ff;
-extern xcpuop_func op_e168_0_nf;
-extern xcpuop_func op_e168_0_ff;
-extern xcpuop_func op_e170_0_nf;
-extern xcpuop_func op_e170_0_ff;
-extern xcpuop_func op_e178_0_nf;
-extern xcpuop_func op_e178_0_ff;
-extern xcpuop_func op_e180_0_nf;
-extern xcpuop_func op_e180_0_ff;
-extern xcpuop_func op_e188_0_nf;
-extern xcpuop_func op_e188_0_ff;
-extern xcpuop_func op_e190_0_nf;
-extern xcpuop_func op_e190_0_ff;
-extern xcpuop_func op_e198_0_nf;
-extern xcpuop_func op_e198_0_ff;
-extern xcpuop_func op_e1a0_0_nf;
-extern xcpuop_func op_e1a0_0_ff;
-extern xcpuop_func op_e1a8_0_nf;
-extern xcpuop_func op_e1a8_0_ff;
-extern xcpuop_func op_e1b0_0_nf;
-extern xcpuop_func op_e1b0_0_ff;
-extern xcpuop_func op_e1b8_0_nf;
-extern xcpuop_func op_e1b8_0_ff;
-extern xcpuop_func op_e1d0_0_nf;
-extern xcpuop_func op_e1d0_0_ff;
-extern xcpuop_func op_e1d8_0_nf;
-extern xcpuop_func op_e1d8_0_ff;
-extern xcpuop_func op_e1e0_0_nf;
-extern xcpuop_func op_e1e0_0_ff;
-extern xcpuop_func op_e1e8_0_nf;
-extern xcpuop_func op_e1e8_0_ff;
-extern xcpuop_func op_e1f0_0_nf;
-extern xcpuop_func op_e1f0_0_ff;
-extern xcpuop_func op_e1f8_0_nf;
-extern xcpuop_func op_e1f8_0_ff;
-extern xcpuop_func op_e1f9_0_nf;
-extern xcpuop_func op_e1f9_0_ff;
-extern xcpuop_func op_e2d0_0_nf;
-extern xcpuop_func op_e2d0_0_ff;
-extern xcpuop_func op_e2d8_0_nf;
-extern xcpuop_func op_e2d8_0_ff;
-extern xcpuop_func op_e2e0_0_nf;
-extern xcpuop_func op_e2e0_0_ff;
-extern xcpuop_func op_e2e8_0_nf;
-extern xcpuop_func op_e2e8_0_ff;
-extern xcpuop_func op_e2f0_0_nf;
-extern xcpuop_func op_e2f0_0_ff;
-extern xcpuop_func op_e2f8_0_nf;
-extern xcpuop_func op_e2f8_0_ff;
-extern xcpuop_func op_e2f9_0_nf;
-extern xcpuop_func op_e2f9_0_ff;
-extern xcpuop_func op_e3d0_0_nf;
-extern xcpuop_func op_e3d0_0_ff;
-extern xcpuop_func op_e3d8_0_nf;
-extern xcpuop_func op_e3d8_0_ff;
-extern xcpuop_func op_e3e0_0_nf;
-extern xcpuop_func op_e3e0_0_ff;
-extern xcpuop_func op_e3e8_0_nf;
-extern xcpuop_func op_e3e8_0_ff;
-extern xcpuop_func op_e3f0_0_nf;
-extern xcpuop_func op_e3f0_0_ff;
-extern xcpuop_func op_e3f8_0_nf;
-extern xcpuop_func op_e3f8_0_ff;
-extern xcpuop_func op_e3f9_0_nf;
-extern xcpuop_func op_e3f9_0_ff;
-extern xcpuop_func op_e4d0_0_nf;
-extern xcpuop_func op_e4d0_0_ff;
-extern xcpuop_func op_e4d8_0_nf;
-extern xcpuop_func op_e4d8_0_ff;
-extern xcpuop_func op_e4e0_0_nf;
-extern xcpuop_func op_e4e0_0_ff;
-extern xcpuop_func op_e4e8_0_nf;
-extern xcpuop_func op_e4e8_0_ff;
-extern xcpuop_func op_e4f0_0_nf;
-extern xcpuop_func op_e4f0_0_ff;
-extern xcpuop_func op_e4f8_0_nf;
-extern xcpuop_func op_e4f8_0_ff;
-extern xcpuop_func op_e4f9_0_nf;
-extern xcpuop_func op_e4f9_0_ff;
-extern xcpuop_func op_e5d0_0_nf;
-extern xcpuop_func op_e5d0_0_ff;
-extern xcpuop_func op_e5d8_0_nf;
-extern xcpuop_func op_e5d8_0_ff;
-extern xcpuop_func op_e5e0_0_nf;
-extern xcpuop_func op_e5e0_0_ff;
-extern xcpuop_func op_e5e8_0_nf;
-extern xcpuop_func op_e5e8_0_ff;
-extern xcpuop_func op_e5f0_0_nf;
-extern xcpuop_func op_e5f0_0_ff;
-extern xcpuop_func op_e5f8_0_nf;
-extern xcpuop_func op_e5f8_0_ff;
-extern xcpuop_func op_e5f9_0_nf;
-extern xcpuop_func op_e5f9_0_ff;
-extern xcpuop_func op_e6d0_0_nf;
-extern xcpuop_func op_e6d0_0_ff;
-extern xcpuop_func op_e6d8_0_nf;
-extern xcpuop_func op_e6d8_0_ff;
-extern xcpuop_func op_e6e0_0_nf;
-extern xcpuop_func op_e6e0_0_ff;
-extern xcpuop_func op_e6e8_0_nf;
-extern xcpuop_func op_e6e8_0_ff;
-extern xcpuop_func op_e6f0_0_nf;
-extern xcpuop_func op_e6f0_0_ff;
-extern xcpuop_func op_e6f8_0_nf;
-extern xcpuop_func op_e6f8_0_ff;
-extern xcpuop_func op_e6f9_0_nf;
-extern xcpuop_func op_e6f9_0_ff;
-extern xcpuop_func op_e7d0_0_nf;
-extern xcpuop_func op_e7d0_0_ff;
-extern xcpuop_func op_e7d8_0_nf;
-extern xcpuop_func op_e7d8_0_ff;
-extern xcpuop_func op_e7e0_0_nf;
-extern xcpuop_func op_e7e0_0_ff;
-extern xcpuop_func op_e7e8_0_nf;
-extern xcpuop_func op_e7e8_0_ff;
-extern xcpuop_func op_e7f0_0_nf;
-extern xcpuop_func op_e7f0_0_ff;
-extern xcpuop_func op_e7f8_0_nf;
-extern xcpuop_func op_e7f8_0_ff;
-extern xcpuop_func op_e7f9_0_nf;
-extern xcpuop_func op_e7f9_0_ff;
-extern xcpuop_func op_e8c0_0_nf;
-extern xcpuop_func op_e8c0_0_ff;
-extern xcpuop_func op_e8d0_0_nf;
-extern xcpuop_func op_e8d0_0_ff;
-extern xcpuop_func op_e8e8_0_nf;
-extern xcpuop_func op_e8e8_0_ff;
-extern xcpuop_func op_e8f0_0_nf;
-extern xcpuop_func op_e8f0_0_ff;
-extern xcpuop_func op_e8f8_0_nf;
-extern xcpuop_func op_e8f8_0_ff;
-extern xcpuop_func op_e8f9_0_nf;
-extern xcpuop_func op_e8f9_0_ff;
-extern xcpuop_func op_e8fa_0_nf;
-extern xcpuop_func op_e8fa_0_ff;
-extern xcpuop_func op_e8fb_0_nf;
-extern xcpuop_func op_e8fb_0_ff;
-extern xcpuop_func op_e9c0_0_nf;
-extern xcpuop_func op_e9c0_0_ff;
-extern xcpuop_func op_e9d0_0_nf;
-extern xcpuop_func op_e9d0_0_ff;
-extern xcpuop_func op_e9e8_0_nf;
-extern xcpuop_func op_e9e8_0_ff;
-extern xcpuop_func op_e9f0_0_nf;
-extern xcpuop_func op_e9f0_0_ff;
-extern xcpuop_func op_e9f8_0_nf;
-extern xcpuop_func op_e9f8_0_ff;
-extern xcpuop_func op_e9f9_0_nf;
-extern xcpuop_func op_e9f9_0_ff;
-extern xcpuop_func op_e9fa_0_nf;
-extern xcpuop_func op_e9fa_0_ff;
-extern xcpuop_func op_e9fb_0_nf;
-extern xcpuop_func op_e9fb_0_ff;
-extern xcpuop_func op_eac0_0_nf;
-extern xcpuop_func op_eac0_0_ff;
-extern xcpuop_func op_ead0_0_nf;
-extern xcpuop_func op_ead0_0_ff;
-extern xcpuop_func op_eae8_0_nf;
-extern xcpuop_func op_eae8_0_ff;
-extern xcpuop_func op_eaf0_0_nf;
-extern xcpuop_func op_eaf0_0_ff;
-extern xcpuop_func op_eaf8_0_nf;
-extern xcpuop_func op_eaf8_0_ff;
-extern xcpuop_func op_eaf9_0_nf;
-extern xcpuop_func op_eaf9_0_ff;
-extern xcpuop_func op_ebc0_0_nf;
-extern xcpuop_func op_ebc0_0_ff;
-extern xcpuop_func op_ebd0_0_nf;
-extern xcpuop_func op_ebd0_0_ff;
-extern xcpuop_func op_ebe8_0_nf;
-extern xcpuop_func op_ebe8_0_ff;
-extern xcpuop_func op_ebf0_0_nf;
-extern xcpuop_func op_ebf0_0_ff;
-extern xcpuop_func op_ebf8_0_nf;
-extern xcpuop_func op_ebf8_0_ff;
-extern xcpuop_func op_ebf9_0_nf;
-extern xcpuop_func op_ebf9_0_ff;
-extern xcpuop_func op_ebfa_0_nf;
-extern xcpuop_func op_ebfa_0_ff;
-extern xcpuop_func op_ebfb_0_nf;
-extern xcpuop_func op_ebfb_0_ff;
-extern xcpuop_func op_ecc0_0_nf;
-extern xcpuop_func op_ecc0_0_ff;
-extern xcpuop_func op_ecd0_0_nf;
-extern xcpuop_func op_ecd0_0_ff;
-extern xcpuop_func op_ece8_0_nf;
-extern xcpuop_func op_ece8_0_ff;
-extern xcpuop_func op_ecf0_0_nf;
-extern xcpuop_func op_ecf0_0_ff;
-extern xcpuop_func op_ecf8_0_nf;
-extern xcpuop_func op_ecf8_0_ff;
-extern xcpuop_func op_ecf9_0_nf;
-extern xcpuop_func op_ecf9_0_ff;
-extern xcpuop_func op_edc0_0_nf;
-extern xcpuop_func op_edc0_0_ff;
-extern xcpuop_func op_edd0_0_nf;
-extern xcpuop_func op_edd0_0_ff;
-extern xcpuop_func op_ede8_0_nf;
-extern xcpuop_func op_ede8_0_ff;
-extern xcpuop_func op_edf0_0_nf;
-extern xcpuop_func op_edf0_0_ff;
-extern xcpuop_func op_edf8_0_nf;
-extern xcpuop_func op_edf8_0_ff;
-extern xcpuop_func op_edf9_0_nf;
-extern xcpuop_func op_edf9_0_ff;
-extern xcpuop_func op_edfa_0_nf;
-extern xcpuop_func op_edfa_0_ff;
-extern xcpuop_func op_edfb_0_nf;
-extern xcpuop_func op_edfb_0_ff;
-extern xcpuop_func op_eec0_0_nf;
-extern xcpuop_func op_eec0_0_ff;
-extern xcpuop_func op_eed0_0_nf;
-extern xcpuop_func op_eed0_0_ff;
-extern xcpuop_func op_eee8_0_nf;
-extern xcpuop_func op_eee8_0_ff;
-extern xcpuop_func op_eef0_0_nf;
-extern xcpuop_func op_eef0_0_ff;
-extern xcpuop_func op_eef8_0_nf;
-extern xcpuop_func op_eef8_0_ff;
-extern xcpuop_func op_eef9_0_nf;
-extern xcpuop_func op_eef9_0_ff;
-extern xcpuop_func op_efc0_0_nf;
-extern xcpuop_func op_efc0_0_ff;
-extern xcpuop_func op_efd0_0_nf;
-extern xcpuop_func op_efd0_0_ff;
-extern xcpuop_func op_efe8_0_nf;
-extern xcpuop_func op_efe8_0_ff;
-extern xcpuop_func op_eff0_0_nf;
-extern xcpuop_func op_eff0_0_ff;
-extern xcpuop_func op_eff8_0_nf;
-extern xcpuop_func op_eff8_0_ff;
-extern xcpuop_func op_eff9_0_nf;
-extern xcpuop_func op_eff9_0_ff;
-extern xcpuop_func op_f000_0_nf;
-extern xcpuop_func op_f000_0_ff;
-extern xcpuop_func op_f008_0_nf;
-extern xcpuop_func op_f008_0_ff;
-extern xcpuop_func op_f010_0_nf;
-extern xcpuop_func op_f010_0_ff;
-extern xcpuop_func op_f018_0_nf;
-extern xcpuop_func op_f018_0_ff;
-extern xcpuop_func op_f020_0_nf;
-extern xcpuop_func op_f020_0_ff;
-extern xcpuop_func op_f028_0_nf;
-extern xcpuop_func op_f028_0_ff;
-extern xcpuop_func op_f030_0_nf;
-extern xcpuop_func op_f030_0_ff;
-extern xcpuop_func op_f038_0_nf;
-extern xcpuop_func op_f038_0_ff;
-extern xcpuop_func op_f039_0_nf;
-extern xcpuop_func op_f039_0_ff;
-extern xcpuop_func op_f03a_0_nf;
-extern xcpuop_func op_f03a_0_ff;
-extern xcpuop_func op_f03b_0_nf;
-extern xcpuop_func op_f03b_0_ff;
-extern xcpuop_func op_f200_0_nf;
-extern xcpuop_func op_f200_0_ff;
-extern xcpuop_func op_f208_0_nf;
-extern xcpuop_func op_f208_0_ff;
-extern xcpuop_func op_f210_0_nf;
-extern xcpuop_func op_f210_0_ff;
-extern xcpuop_func op_f218_0_nf;
-extern xcpuop_func op_f218_0_ff;
-extern xcpuop_func op_f220_0_nf;
-extern xcpuop_func op_f220_0_ff;
-extern xcpuop_func op_f228_0_nf;
-extern xcpuop_func op_f228_0_ff;
-extern xcpuop_func op_f230_0_nf;
-extern xcpuop_func op_f230_0_ff;
-extern xcpuop_func op_f238_0_nf;
-extern xcpuop_func op_f238_0_ff;
-extern xcpuop_func op_f239_0_nf;
-extern xcpuop_func op_f239_0_ff;
-extern xcpuop_func op_f23a_0_nf;
-extern xcpuop_func op_f23a_0_ff;
-extern xcpuop_func op_f23b_0_nf;
-extern xcpuop_func op_f23b_0_ff;
-extern xcpuop_func op_f23c_0_nf;
-extern xcpuop_func op_f23c_0_ff;
-extern xcpuop_func op_f240_0_nf;
-extern xcpuop_func op_f240_0_ff;
-extern xcpuop_func op_f248_0_nf;
-extern xcpuop_func op_f248_0_ff;
-extern xcpuop_func op_f250_0_nf;
-extern xcpuop_func op_f250_0_ff;
-extern xcpuop_func op_f258_0_nf;
-extern xcpuop_func op_f258_0_ff;
-extern xcpuop_func op_f260_0_nf;
-extern xcpuop_func op_f260_0_ff;
-extern xcpuop_func op_f268_0_nf;
-extern xcpuop_func op_f268_0_ff;
-extern xcpuop_func op_f270_0_nf;
-extern xcpuop_func op_f270_0_ff;
-extern xcpuop_func op_f278_0_nf;
-extern xcpuop_func op_f278_0_ff;
-extern xcpuop_func op_f279_0_nf;
-extern xcpuop_func op_f279_0_ff;
-extern xcpuop_func op_f27a_0_nf;
-extern xcpuop_func op_f27a_0_ff;
-extern xcpuop_func op_f27b_0_nf;
-extern xcpuop_func op_f27b_0_ff;
-extern xcpuop_func op_f27c_0_nf;
-extern xcpuop_func op_f27c_0_ff;
-extern xcpuop_func op_f280_0_nf;
-extern xcpuop_func op_f280_0_ff;
-extern xcpuop_func op_f2c0_0_nf;
-extern xcpuop_func op_f2c0_0_ff;
-extern xcpuop_func op_f310_0_nf;
-extern xcpuop_func op_f310_0_ff;
-extern xcpuop_func op_f320_0_nf;
-extern xcpuop_func op_f320_0_ff;
-extern xcpuop_func op_f328_0_nf;
-extern xcpuop_func op_f328_0_ff;
-extern xcpuop_func op_f330_0_nf;
-extern xcpuop_func op_f330_0_ff;
-extern xcpuop_func op_f338_0_nf;
-extern xcpuop_func op_f338_0_ff;
-extern xcpuop_func op_f339_0_nf;
-extern xcpuop_func op_f339_0_ff;
-extern xcpuop_func op_f350_0_nf;
-extern xcpuop_func op_f350_0_ff;
-extern xcpuop_func op_f358_0_nf;
-extern xcpuop_func op_f358_0_ff;
-extern xcpuop_func op_f368_0_nf;
-extern xcpuop_func op_f368_0_ff;
-extern xcpuop_func op_f370_0_nf;
-extern xcpuop_func op_f370_0_ff;
-extern xcpuop_func op_f378_0_nf;
-extern xcpuop_func op_f378_0_ff;
-extern xcpuop_func op_f379_0_nf;
-extern xcpuop_func op_f379_0_ff;
-extern xcpuop_func op_f37a_0_nf;
-extern xcpuop_func op_f37a_0_ff;
-extern xcpuop_func op_f37b_0_nf;
-extern xcpuop_func op_f37b_0_ff;
-extern xcpuop_func op_f408_0_nf;
-extern xcpuop_func op_f408_0_ff;
-extern xcpuop_func op_f410_0_nf;
-extern xcpuop_func op_f410_0_ff;
-extern xcpuop_func op_f418_0_nf;
-extern xcpuop_func op_f418_0_ff;
-extern xcpuop_func op_f419_0_nf;
-extern xcpuop_func op_f419_0_ff;
-extern xcpuop_func op_f41a_0_nf;
-extern xcpuop_func op_f41a_0_ff;
-extern xcpuop_func op_f41b_0_nf;
-extern xcpuop_func op_f41b_0_ff;
-extern xcpuop_func op_f41c_0_nf;
-extern xcpuop_func op_f41c_0_ff;
-extern xcpuop_func op_f41d_0_nf;
-extern xcpuop_func op_f41d_0_ff;
-extern xcpuop_func op_f41e_0_nf;
-extern xcpuop_func op_f41e_0_ff;
-extern xcpuop_func op_f41f_0_nf;
-extern xcpuop_func op_f41f_0_ff;
-extern xcpuop_func op_f428_0_nf;
-extern xcpuop_func op_f428_0_ff;
-extern xcpuop_func op_f430_0_nf;
-extern xcpuop_func op_f430_0_ff;
-extern xcpuop_func op_f438_0_nf;
-extern xcpuop_func op_f438_0_ff;
-extern xcpuop_func op_f439_0_nf;
-extern xcpuop_func op_f439_0_ff;
-extern xcpuop_func op_f43a_0_nf;
-extern xcpuop_func op_f43a_0_ff;
-extern xcpuop_func op_f43b_0_nf;
-extern xcpuop_func op_f43b_0_ff;
-extern xcpuop_func op_f43c_0_nf;
-extern xcpuop_func op_f43c_0_ff;
-extern xcpuop_func op_f43d_0_nf;
-extern xcpuop_func op_f43d_0_ff;
-extern xcpuop_func op_f43e_0_nf;
-extern xcpuop_func op_f43e_0_ff;
-extern xcpuop_func op_f43f_0_nf;
-extern xcpuop_func op_f43f_0_ff;
-extern xcpuop_func op_f500_0_nf;
-extern xcpuop_func op_f500_0_ff;
-extern xcpuop_func op_f600_0_nf;
-extern xcpuop_func op_f600_0_ff;
-extern xcpuop_func op_f608_0_nf;
-extern xcpuop_func op_f608_0_ff;
-extern xcpuop_func op_f610_0_nf;
-extern xcpuop_func op_f610_0_ff;
-extern xcpuop_func op_f618_0_nf;
-extern xcpuop_func op_f618_0_ff;
-extern xcpuop_func op_f620_0_nf;
-extern xcpuop_func op_f620_0_ff;
-extern xcpuop_func op_f800_0_nf;
-extern xcpuop_func op_f800_0_ff;
-extern xcpuop_func op_f808_0_nf;
-extern xcpuop_func op_f808_0_ff;
-extern xcpuop_func op_f810_0_nf;
-extern xcpuop_func op_f810_0_ff;
-extern xcpuop_func op_f818_0_nf;
-extern xcpuop_func op_f818_0_ff;
-extern xcpuop_func op_f820_0_nf;
-extern xcpuop_func op_f820_0_ff;
-extern xcpuop_func op_f828_0_nf;
-extern xcpuop_func op_f828_0_ff;
-extern xcpuop_func op_f830_0_nf;
-extern xcpuop_func op_f830_0_ff;
-extern xcpuop_func op_f838_0_nf;
-extern xcpuop_func op_f838_0_ff;
-extern xcpuop_func op_f839_0_nf;
-extern xcpuop_func op_f839_0_ff;
-extern xcpuop_func op_f83a_0_nf;
-extern xcpuop_func op_f83a_0_ff;
-extern xcpuop_func op_f83b_0_nf;
-extern xcpuop_func op_f83b_0_ff;
#define hfd_log write_log
#ifdef WINDDK
-#include <devioctl.h>
+#include <devioctl.h>
#include <ntddstor.h>
#include <winioctl.h>
#include <initguid.h> // Guid definition
if (!f)
return;
for (i = 0; i <= blocks; i++) {
- DWORD outlen, high;
- high = (DWORD)(offset >> 32);
+ DWORD outlen, high;
+ high = (DWORD)(offset >> 32);
if (SetFilePointer (h, (DWORD)offset, &high, FILE_BEGIN) == INVALID_FILE_SIZE)
break;
- ReadFile (h, buf, blocksize, &outlen, NULL);
+ ReadFile (h, buf, blocksize, &outlen, NULL);
fwrite (buf, 1, blocksize, f);
offset += blocksize;
}
offset += blocksize;
}
if (!empty) {
- write_log ("hd ignored, not empty and no RDB detected\n");
- return 0;
+ write_log ("hd ignored, not empty and no RDB detected\n");
+ return 0;
}
write_log ("hd accepted (empty)\n");
return -2;
s[strlen(s) - 1] = 0;
}
-int isharddrive (char *name)
+int isharddrive (const char *name)
{
int i;
static char *hdz[] = { "hdz", "zip", "rar", "7z", NULL };
-int hdf_open (struct hardfiledata *hfd, char *name)
+int hdf_open (struct hardfiledata *hfd, const char *name)
{
HANDLE h = INVALID_HANDLE_VALUE;
DWORD flags;
return 0;
}
if (!DeviceIoControl(h, FSCTL_ALLOW_EXTENDED_DASD_IO, NULL, 0, NULL, 0, &r, NULL))
- write_log("FSCTL_ALLOW_EXTENDED_DASD_IO returned %d\n", GetLastError());
+ write_log ("FSCTL_ALLOW_EXTENDED_DASD_IO returned %d\n", GetLastError());
strncpy (hfd->vendor_id, udi->vendor_id, 8);
strncpy (hfd->product_id, udi->product_id, 16);
strncpy (hfd->product_rev, udi->product_rev, 4);
}
} else {
int zmode = 0;
- char *ext = strrchr (name, '.');
+ char *ext = strrchr (name, '.');
if (ext != NULL) {
ext++;
for (i = 0; hdz[i]; i++) {
}
h = CreateFile (name, GENERIC_READ | (hfd->readonly ? 0 : GENERIC_WRITE), hfd->readonly ? FILE_SHARE_READ : 0, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS, NULL);
- hfd->handle = h;
- i = strlen (name) - 1;
+ hfd->handle = h;
+ i = strlen (name) - 1;
while (i >= 0) {
if ((i > 0 && (name[i - 1] == '/' || name[i - 1] == '\\')) || i == 0) {
strcpy (hfd->vendor_id, "UAE");
hfd->cache_valid = 0;
}
-int hdf_dup (struct hardfiledata *dhfd, struct hardfiledata *shfd)
+int hdf_dup (struct hardfiledata *dhfd, const struct hardfiledata *shfd)
{
if (!shfd->handle_valid)
return 0;
if (shfd->handle_valid == HDF_HANDLE_WIN32) {
- HANDLE duphandle;
+ HANDLE duphandle;
if (!DuplicateHandle (GetCurrentProcess(), shfd->handle, GetCurrentProcess() , &duphandle, 0, FALSE, DUPLICATE_SAME_ACCESS))
return 0;
dhfd->handle = duphandle;
abort ();
}
if (hfd->handle_valid == HDF_HANDLE_WIN32) {
- high = (DWORD)(offset >> 32);
+ high = (DWORD)(offset >> 32);
ret = SetFilePointer (hfd->handle, (DWORD)offset, &high, FILE_BEGIN);
if (ret == INVALID_FILE_SIZE && GetLastError() != NO_ERROR)
return -1;
gui_message ("hd: poscheck failed. seek failure, error %d", err);
abort ();
}
- pos = ((uae_u64)high) << 32 | ret;
+ pos = ((uae_u64)high) << 32 | ret;
} else if (hfd->handle_valid == HDF_HANDLE_ZFILE) {
pos = zfile_ftell (hfd->handle);
}
hdf_seek (hfd, hfd->cache_offset);
poscheck (hfd, CACHE_SIZE);
WriteFile (hfd->handle, hfd->cache, CACHE_SIZE, &outlen, NULL);
- hfd->cache_needs_flush = 0;
+ hfd->cache_needs_flush = 0;
}
}
#endif
memcpy (buffer, hfd->cache + coff, size);
outlen2 = size;
} else {
- ReadFile (hfd->handle, hfd->cache, size, &outlen2, NULL);
+ ReadFile (hfd->handle, hfd->cache, size, &outlen2, NULL);
if (outlen2 == size)
memcpy (buffer, hfd->cache, size);
}
IntDevInfo - Handles to the interface device information list
- Index - Device member
+ Index - Device member
Return Value:
PUCHAR p;
UCHAR outBuf[20000];
ULONG length = 0,
- returned = 0,
- returnedLength;
+ returned = 0,
+ returnedLength;
DWORD interfaceDetailDataSize = 0,
- reqSize,
- errorCode,
- i, j;
+ reqSize,
+ errorCode,
+ i, j;
DRIVE_LAYOUT_INFORMATION *dli;
DISK_GEOMETRY dg;
GET_LENGTH_INFORMATION gli;
interfaceData.cbSize = sizeof (SP_INTERFACE_DEVICE_DATA);
- status = SetupDiEnumDeviceInterfaces (
- IntDevInfo, // Interface Device Info handle
- 0, // Device Info data
- &GUID_DEVINTERFACE_DISK, // Interface registered by driver
- Index, // Member
- &interfaceData // Device Interface Data
- );
+ status = SetupDiEnumDeviceInterfaces (
+ IntDevInfo, // Interface Device Info handle
+ 0, // Device Info data
+ &GUID_DEVINTERFACE_DISK, // Interface registered by driver
+ Index, // Member
+ &interfaceData // Device Interface Data
+ );
if (status == FALSE) {
- errorCode = GetLastError();
- if (errorCode != ERROR_NO_MORE_ITEMS) {
- write_log ("SetupDiEnumDeviceInterfaces failed with error: %d\n", errorCode);
- }
+ errorCode = GetLastError();
+ if (errorCode != ERROR_NO_MORE_ITEMS) {
+ write_log ("SetupDiEnumDeviceInterfaces failed with error: %d\n", errorCode);
+ }
ret = 0;
goto end;
}
-
+
//
- // Find out required buffer size, so pass NULL
+ // Find out required buffer size, so pass NULL
//
status = SetupDiGetDeviceInterfaceDetail (
- IntDevInfo, // Interface Device info handle
- &interfaceData, // Interface data for the event class
- NULL, // Checking for buffer size
- 0, // Checking for buffer size
- &reqSize, // Buffer size required to get the detail data
- NULL // Checking for buffer size
- );
+ IntDevInfo, // Interface Device info handle
+ &interfaceData, // Interface data for the event class
+ NULL, // Checking for buffer size
+ 0, // Checking for buffer size
+ &reqSize, // Buffer size required to get the detail data
+ NULL // Checking for buffer size
+ );
//
- // This call returns ERROR_INSUFFICIENT_BUFFER with reqSize
+ // This call returns ERROR_INSUFFICIENT_BUFFER with reqSize
// set to the required buffer size. Ignore the above error and
// pass a bigger buffer to get the detail data
//
if (status == FALSE) {
- errorCode = GetLastError();
- if (errorCode != ERROR_INSUFFICIENT_BUFFER) {
- write_log("SetupDiGetDeviceInterfaceDetail failed with error: %d\n", errorCode);
+ errorCode = GetLastError();
+ if (errorCode != ERROR_INSUFFICIENT_BUFFER) {
+ write_log ("SetupDiGetDeviceInterfaceDetail failed with error: %d\n", errorCode);
ret = 0;
goto end;
- }
+ }
}
//
interfaceDetailDataSize = reqSize;
interfaceDetailData = malloc (interfaceDetailDataSize);
if ( interfaceDetailData == NULL ) {
- write_log ("Unable to allocate memory to get the interface detail data.\n");
+ write_log ("Unable to allocate memory to get the interface detail data.\n");
ret = 0;
goto end;
}
interfaceDetailData->cbSize = sizeof (SP_INTERFACE_DEVICE_DETAIL_DATA);
status = SetupDiGetDeviceInterfaceDetail (
- IntDevInfo, // Interface Device info handle
- &interfaceData, // Interface data for the event class
- interfaceDetailData, // Interface detail data
- interfaceDetailDataSize, // Interface detail data size
- &reqSize, // Buffer size required to get the detail data
- NULL); // Interface device info
+ IntDevInfo, // Interface Device info handle
+ &interfaceData, // Interface data for the event class
+ interfaceDetailData, // Interface detail data
+ interfaceDetailDataSize, // Interface detail data size
+ &reqSize, // Buffer size required to get the detail data
+ NULL); // Interface device info
if ( status == FALSE ) {
- write_log("Error in SetupDiGetDeviceInterfaceDetail failed with error: %d\n", GetLastError());
+ write_log ("Error in SetupDiGetDeviceInterfaceDetail failed with error: %d\n", GetLastError());
ret = 0;
goto end;
}
strcpy (udi->device_path, interfaceDetailData->DevicePath);
write_log ("opening device '%s'\n", udi->device_path);
hDevice = CreateFile(
- interfaceDetailData->DevicePath, // device interface name
- GENERIC_READ | GENERIC_WRITE, // dwDesiredAccess
- FILE_SHARE_READ | FILE_SHARE_WRITE, // dwShareMode
- NULL, // lpSecurityAttributes
- OPEN_EXISTING, // dwCreationDistribution
- 0, // dwFlagsAndAttributes
- NULL // hTemplateFile
- );
-
+ interfaceDetailData->DevicePath, // device interface name
+ GENERIC_READ | GENERIC_WRITE, // dwDesiredAccess
+ FILE_SHARE_READ | FILE_SHARE_WRITE, // dwShareMode
+ NULL, // lpSecurityAttributes
+ OPEN_EXISTING, // dwCreationDistribution
+ 0, // dwFlagsAndAttributes
+ NULL // hTemplateFile
+ );
+
//
- // We have the handle to talk to the device.
+ // We have the handle to talk to the device.
// So we can release the interfaceDetailData buffer
//
interfaceDetailData = NULL;
if (hDevice == INVALID_HANDLE_VALUE) {
- write_log ("CreateFile failed with error: %d\n", GetLastError());
+ write_log ("CreateFile failed with error: %d\n", GetLastError());
ret = 1;
goto end;
}
query.QueryType = PropertyStandardQuery;
status = DeviceIoControl(
- hDevice,
- IOCTL_STORAGE_QUERY_PROPERTY,
- &query,
- sizeof( STORAGE_PROPERTY_QUERY ),
- &outBuf,
- sizeof (outBuf),
- &returnedLength,
- NULL
- );
+ hDevice,
+ IOCTL_STORAGE_QUERY_PROPERTY,
+ &query,
+ sizeof( STORAGE_PROPERTY_QUERY ),
+ &outBuf,
+ sizeof (outBuf),
+ &returnedLength,
+ NULL
+ );
if ( !status ) {
- write_log("IOCTL_STORAGE_QUERY_PROPERTY failed with error code%d.\n", GetLastError());
+ write_log ("IOCTL_STORAGE_QUERY_PROPERTY failed with error code%d.\n", GetLastError());
ret = 1;
goto end;
}
query.PropertyId = StorageDeviceProperty;
query.QueryType = PropertyStandardQuery;
status = DeviceIoControl(
- hDevice,
- IOCTL_STORAGE_QUERY_PROPERTY,
- &query,
- sizeof( STORAGE_PROPERTY_QUERY ),
- &outBuf,
- sizeof (outBuf),
- &returnedLength,
- NULL);
- if (!status) {
- write_log ("IOCTL_STORAGE_QUERY_PROPERTY failed with error code %d.\n", GetLastError());
+ hDevice,
+ IOCTL_STORAGE_QUERY_PROPERTY,
+ &query,
+ sizeof( STORAGE_PROPERTY_QUERY ),
+ &outBuf,
+ sizeof (outBuf),
+ &returnedLength,
+ NULL);
+ if (!status) {
+ write_log ("IOCTL_STORAGE_QUERY_PROPERTY failed with error code %d.\n", GetLastError());
ret = 1;
goto end;
- }
- devDesc = (PSTORAGE_DEVICE_DESCRIPTOR) outBuf;
- p = (PUCHAR) outBuf;
- if (devDesc->DeviceType != INQ_DASD && devDesc->DeviceType != INQ_ROMD && devDesc->DeviceType != INQ_OPTD) {
+ }
+ devDesc = (PSTORAGE_DEVICE_DESCRIPTOR) outBuf;
+ p = (PUCHAR) outBuf;
+ if (devDesc->DeviceType != INQ_DASD && devDesc->DeviceType != INQ_ROMD && devDesc->DeviceType != INQ_OPTD) {
ret = 1;
write_log ("not a direct access device, ignored (type=%d)\n", devDesc->DeviceType);
goto end;
}
- if (devDesc->VendorIdOffset && p[devDesc->VendorIdOffset]) {
- j = 0;
- for (i = devDesc->VendorIdOffset; p[i] != (UCHAR) NULL && i < returnedLength; i++)
- udi->vendor_id[j++] = p[i];
- }
- if (devDesc->ProductIdOffset && p[devDesc->ProductIdOffset]) {
- j = 0;
- for (i = devDesc->ProductIdOffset; p[i] != (UCHAR) NULL && i < returnedLength; i++)
- udi->product_id[j++] = p[i];
- }
- if (devDesc->ProductRevisionOffset && p[devDesc->ProductRevisionOffset]) {
+ if (devDesc->VendorIdOffset && p[devDesc->VendorIdOffset]) {
+ j = 0;
+ for (i = devDesc->VendorIdOffset; p[i] != (UCHAR) NULL && i < returnedLength; i++)
+ udi->vendor_id[j++] = p[i];
+ }
+ if (devDesc->ProductIdOffset && p[devDesc->ProductIdOffset]) {
+ j = 0;
+ for (i = devDesc->ProductIdOffset; p[i] != (UCHAR) NULL && i < returnedLength; i++)
+ udi->product_id[j++] = p[i];
+ }
+ if (devDesc->ProductRevisionOffset && p[devDesc->ProductRevisionOffset]) {
j = 0;
for (i = devDesc->ProductRevisionOffset; p[i] != (UCHAR) NULL && i < returnedLength; i++)
- udi->product_rev[j++] = p[i];
- }
- if (devDesc->SerialNumberOffset && p[devDesc->SerialNumberOffset]) {
+ udi->product_rev[j++] = p[i];
+ }
+ if (devDesc->SerialNumberOffset && p[devDesc->SerialNumberOffset]) {
j = 0;
for (i = devDesc->SerialNumberOffset; p[i] != (UCHAR) NULL && i < returnedLength; i++)
- udi->product_serial[j++] = p[i];
- }
+ udi->product_serial[j++] = p[i];
+ }
if (udi->vendor_id[0])
strcat (udi->device_name, udi->vendor_id);
if (udi->product_id[0]) {
strcat (udi->device_name, udi->product_serial);
}
if (!udi->device_name[0]) {
- write_log("empty device id?!?, replacing with device path\n");
+ write_log ("empty device id?!?, replacing with device path\n");
strcpy (udi->device_name, udi->device_path);
}
write_log ("device id string: '%s'\n", udi->device_name);
if (!DeviceIoControl (hDevice, IOCTL_DISK_GET_DRIVE_GEOMETRY, NULL, 0, (void*)&dg, sizeof (dg), &returnedLength, NULL)) {
- write_log ("IOCTL_DISK_GET_DRIVE_GEOMETRY failed with error code %d.\n", GetLastError());
- ret = 1;
- goto end;
+ write_log ("IOCTL_DISK_GET_DRIVE_GEOMETRY failed with error code %d.\n", GetLastError());
+ ret = 1;
+ goto end;
}
gli_ok = 1;
if (!DeviceIoControl (hDevice, IOCTL_DISK_GET_LENGTH_INFO, NULL, 0, (void*)&gli, sizeof (gli), &returnedLength, NULL)) {
- write_log ("IOCTL_DISK_GET_LENGTH_INFO failed with error code %d.\n", GetLastError());
+ write_log ("IOCTL_DISK_GET_LENGTH_INFO failed with error code %d.\n", GetLastError());
gli_ok = 0;
write_log ("IOCTL_DISK_GET_LENGTH_INFO not supported, detected disk size may not be correct.\n");
}
memset (outBuf, 0, sizeof (outBuf));
status = DeviceIoControl(hDevice, IOCTL_DISK_GET_DRIVE_LAYOUT, NULL, 0,
- &outBuf, sizeof (outBuf), &returnedLength, NULL);
+ &outBuf, sizeof (outBuf), &returnedLength, NULL);
if (!status) {
- write_log("IOCTL_DISK_GET_DRIVE_LAYOUT failed with error code%d.\n", GetLastError());
+ write_log ("IOCTL_DISK_GET_DRIVE_LAYOUT failed with error code%d.\n", GetLastError());
ret = 1;
goto end;
}
trim (orgname);
dli = (DRIVE_LAYOUT_INFORMATION*)outBuf;
if (dli->PartitionCount) {
- struct uae_driveinfo *udi2 = udi;
- int nonzeropart = 0;
- int gotpart = 0;
+ struct uae_driveinfo *udi2 = udi;
+ int nonzeropart = 0;
+ int gotpart = 0;
int safepart = 0;
write_log ("%d MBR partitions found\n", dli->PartitionCount);
for (i = 0; i < dli->PartitionCount && (*index2) < MAX_FILESYSTEM_UNITS; i++) {
if (hIntDevInfo != INVALID_HANDLE_VALUE) {
while (index < MAX_FILESYSTEM_UNITS) {
memset (uae_drives + index2, 0, sizeof (struct uae_driveinfo));
- if (!GetDeviceProperty (hIntDevInfo, index, &index2, buffer))
+ if (!GetDeviceProperty (hIntDevInfo, index, &index2, buffer))
break;
index++;
num_drives = index2;
HWND hwnd, hwndprogress, hwndprogresstxt;
MSG msg;
int pct, cnt;
-
+
cache = VirtualAlloc (NULL, COPY_CACHE_SIZE, MEM_COMMIT, PAGE_READWRITE);
if (!cache)
goto err;
written = 0;
for (;;) {
if (progressdialogreturn >= 0)
- break;
+ break;
if (cnt > 0) {
SendMessage(hwndprogress, PBM_SETPOS, (WPARAM)pct, 0);
sprintf (tmp, "%dM / %dM (%d%%)", (int)(written >> 20), (int)(size >> 20), pct);
WIN32GUI_LoadUIString (IDS_HDCLONE_FAIL, tmp, MAX_DPATH);
sprintf (tmp2, tmp, progressdialogreturn, GetLastError());
gui_message (tmp2);
-
+
ok:
if (h != INVALID_HANDLE_VALUE)
CloseHandle(h);
//*((int*)pc) = (c1*5+c2*2+c3)/8;
*((int*)pc) = ((((c1 & 0x00FF00)*5 + (c2 & 0x00FF00)*2 + (c3 & 0x00FF00) ) & 0x0007F800) +
- (((c1 & 0xFF00FF)*5 + (c2 & 0xFF00FF)*2 + (c3 & 0xFF00FF) ) & 0x07F807F8)) >> 3;
+ (((c1 & 0xFF00FF)*5 + (c2 & 0xFF00FF)*2 + (c3 & 0xFF00FF) ) & 0x07F807F8)) >> 3;
}
inline void Interp7(unsigned char * pc, int c1, int c2, int c3)
//*((int*)pc) = (c1*6+c2+c3)/8;
*((int*)pc) = ((((c1 & 0x00FF00)*6 + (c2 & 0x00FF00) + (c3 & 0x00FF00) ) & 0x0007F800) +
- (((c1 & 0xFF00FF)*6 + (c2 & 0xFF00FF) + (c3 & 0xFF00FF) ) & 0x07F807F8)) >> 3;
+ (((c1 & 0xFF00FF)*6 + (c2 & 0xFF00FF) + (c3 & 0xFF00FF) ) & 0x07F807F8)) >> 3;
}
inline void Interp9(unsigned char * pc, int c1, int c2, int c3)
//*((int*)pc) = (c1*2+(c2+c3)*3)/8;
*((int*)pc) = ((((c1 & 0x00FF00)*2 + ((c2 & 0x00FF00) + (c3 & 0x00FF00))*3 ) & 0x0007F800) +
- (((c1 & 0xFF00FF)*2 + ((c2 & 0xFF00FF) + (c3 & 0xFF00FF))*3 ) & 0x07F807F8)) >> 3;
+ (((c1 & 0xFF00FF)*2 + ((c2 & 0xFF00FF) + (c3 & 0xFF00FF))*3 ) & 0x07F807F8)) >> 3;
}
inline void Interp10(unsigned char * pc, int c1, int c2, int c3)
//*((int*)pc) = (c1*14+c2+c3)/16;
*((int*)pc) = ((((c1 & 0x00FF00)*14 + (c2 & 0x00FF00) + (c3 & 0x00FF00) ) & 0x000FF000) +
- (((c1 & 0xFF00FF)*14 + (c2 & 0xFF00FF) + (c3 & 0xFF00FF) ) & 0x0FF00FF0)) >> 4;
+ (((c1 & 0xFF00FF)*14 + (c2 & 0xFF00FF) + (c3 & 0xFF00FF) ) & 0x0FF00FF0)) >> 4;
}
YUV1 = RGBtoYUV[w1];
YUV2 = RGBtoYUV[w2];
return ( ( abs((YUV1 & Ymask) - (YUV2 & Ymask)) > trY ) ||
- ( abs((YUV1 & Umask) - (YUV2 & Umask)) > trU ) ||
- ( abs((YUV1 & Vmask) - (YUV2 & Vmask)) > trV ) );
+ ( abs((YUV1 & Umask) - (YUV2 & Umask)) > trU ) ||
+ ( abs((YUV1 & Vmask) - (YUV2 & Vmask)) > trV ) );
}
void hq2x_32( unsigned char * pIn, unsigned char * pOut, int Xres, int Yres, int BpL )
if (i>0)
{
- w[1] = *((unsigned short*)(pIn + prevline - 2));
- w[4] = *((unsigned short*)(pIn - 2));
- w[7] = *((unsigned short*)(pIn + nextline - 2));
+ w[1] = *((unsigned short*)(pIn + prevline - 2));
+ w[4] = *((unsigned short*)(pIn - 2));
+ w[7] = *((unsigned short*)(pIn + nextline - 2));
}
else
{
- w[1] = w[2];
- w[4] = w[5];
- w[7] = w[8];
+ w[1] = w[2];
+ w[4] = w[5];
+ w[7] = w[8];
}
if (i<Xres-1)
{
- w[3] = *((unsigned short*)(pIn + prevline + 2));
- w[6] = *((unsigned short*)(pIn + 2));
- w[9] = *((unsigned short*)(pIn + nextline + 2));
+ w[3] = *((unsigned short*)(pIn + prevline + 2));
+ w[6] = *((unsigned short*)(pIn + 2));
+ w[9] = *((unsigned short*)(pIn + nextline + 2));
}
else
{
- w[3] = w[2];
- w[6] = w[5];
- w[9] = w[8];
+ w[3] = w[2];
+ w[6] = w[5];
+ w[9] = w[8];
}
int pattern = 0;
for (k=1; k<=9; k++)
{
- if (k==5) continue;
+ if (k==5) continue;
- if ( w[k] != w[5] )
- {
- YUV2 = RGBtoYUV[w[k]];
- if ( ( abs((YUV1 & Ymask) - (YUV2 & Ymask)) > trY ) ||
- ( abs((YUV1 & Umask) - (YUV2 & Umask)) > trU ) ||
- ( abs((YUV1 & Vmask) - (YUV2 & Vmask)) > trV ) )
- pattern |= flag;
- }
- flag <<= 1;
+ if ( w[k] != w[5] )
+ {
+ YUV2 = RGBtoYUV[w[k]];
+ if ( ( abs((YUV1 & Ymask) - (YUV2 & Ymask)) > trY ) ||
+ ( abs((YUV1 & Umask) - (YUV2 & Umask)) > trU ) ||
+ ( abs((YUV1 & Vmask) - (YUV2 & Vmask)) > trV ) )
+ pattern |= flag;
+ }
+ flag <<= 1;
}
for (k=1; k<=9; k++)
- c[k] = LUT16to32[w[k]];
+ c[k] = LUT16to32[w[k]];
switch (pattern)
{
- case 0:
- case 1:
- case 4:
- case 32:
- case 128:
- case 5:
- case 132:
- case 160:
- case 33:
- case 129:
- case 36:
- case 133:
- case 164:
- case 161:
- case 37:
- case 165:
- {
- PIXEL00_20
- PIXEL01_20
- PIXEL10_20
- PIXEL11_20
- break;
- }
- case 2:
- case 34:
- case 130:
- case 162:
- {
- PIXEL00_22
- PIXEL01_21
- PIXEL10_20
- PIXEL11_20
- break;
- }
- case 16:
- case 17:
- case 48:
- case 49:
- {
- PIXEL00_20
- PIXEL01_22
- PIXEL10_20
- PIXEL11_21
- break;
- }
- case 64:
- case 65:
- case 68:
- case 69:
- {
- PIXEL00_20
- PIXEL01_20
- PIXEL10_21
- PIXEL11_22
- break;
- }
- case 8:
- case 12:
- case 136:
- case 140:
- {
- PIXEL00_21
- PIXEL01_20
- PIXEL10_22
- PIXEL11_20
- break;
- }
- case 3:
- case 35:
- case 131:
- case 163:
- {
- PIXEL00_11
- PIXEL01_21
- PIXEL10_20
- PIXEL11_20
- break;
- }
- case 6:
- case 38:
- case 134:
- case 166:
- {
- PIXEL00_22
- PIXEL01_12
- PIXEL10_20
- PIXEL11_20
- break;
- }
- case 20:
- case 21:
- case 52:
- case 53:
- {
- PIXEL00_20
- PIXEL01_11
- PIXEL10_20
- PIXEL11_21
- break;
- }
- case 144:
- case 145:
- case 176:
- case 177:
- {
- PIXEL00_20
- PIXEL01_22
- PIXEL10_20
- PIXEL11_12
- break;
- }
- case 192:
- case 193:
- case 196:
- case 197:
- {
- PIXEL00_20
- PIXEL01_20
- PIXEL10_21
- PIXEL11_11
- break;
- }
- case 96:
- case 97:
- case 100:
- case 101:
- {
- PIXEL00_20
- PIXEL01_20
- PIXEL10_12
- PIXEL11_22
- break;
- }
- case 40:
- case 44:
- case 168:
- case 172:
- {
- PIXEL00_21
- PIXEL01_20
- PIXEL10_11
- PIXEL11_20
- break;
- }
- case 9:
- case 13:
- case 137:
- case 141:
- {
- PIXEL00_12
- PIXEL01_20
- PIXEL10_22
- PIXEL11_20
- break;
- }
- case 18:
- case 50:
- {
- PIXEL00_22
- if (Diff(w[2], w[6]))
- {
- PIXEL01_10
- }
- else
- {
- PIXEL01_20
- }
- PIXEL10_20
- PIXEL11_21
- break;
- }
- case 80:
- case 81:
- {
- PIXEL00_20
- PIXEL01_22
- PIXEL10_21
- if (Diff(w[6], w[8]))
- {
- PIXEL11_10
- }
- else
- {
- PIXEL11_20
- }
- break;
- }
- case 72:
- case 76:
- {
- PIXEL00_21
- PIXEL01_20
- if (Diff(w[8], w[4]))
- {
- PIXEL10_10
- }
- else
- {
- PIXEL10_20
- }
- PIXEL11_22
- break;
- }
- case 10:
- case 138:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_10
- }
- else
- {
- PIXEL00_20
- }
- PIXEL01_21
- PIXEL10_22
- PIXEL11_20
- break;
- }
- case 66:
- {
- PIXEL00_22
- PIXEL01_21
- PIXEL10_21
- PIXEL11_22
- break;
- }
- case 24:
- {
- PIXEL00_21
- PIXEL01_22
- PIXEL10_22
- PIXEL11_21
- break;
- }
- case 7:
- case 39:
- case 135:
- {
- PIXEL00_11
- PIXEL01_12
- PIXEL10_20
- PIXEL11_20
- break;
- }
- case 148:
- case 149:
- case 180:
- {
- PIXEL00_20
- PIXEL01_11
- PIXEL10_20
- PIXEL11_12
- break;
- }
- case 224:
- case 228:
- case 225:
- {
- PIXEL00_20
- PIXEL01_20
- PIXEL10_12
- PIXEL11_11
- break;
- }
- case 41:
- case 169:
- case 45:
- {
- PIXEL00_12
- PIXEL01_20
- PIXEL10_11
- PIXEL11_20
- break;
- }
- case 22:
- case 54:
- {
- PIXEL00_22
- if (Diff(w[2], w[6]))
- {
- PIXEL01_0
- }
- else
- {
- PIXEL01_20
- }
- PIXEL10_20
- PIXEL11_21
- break;
- }
- case 208:
- case 209:
- {
- PIXEL00_20
- PIXEL01_22
- PIXEL10_21
- if (Diff(w[6], w[8]))
- {
- PIXEL11_0
- }
- else
- {
- PIXEL11_20
- }
- break;
- }
- case 104:
- case 108:
- {
- PIXEL00_21
- PIXEL01_20
- if (Diff(w[8], w[4]))
- {
- PIXEL10_0
- }
- else
- {
- PIXEL10_20
- }
- PIXEL11_22
- break;
- }
- case 11:
- case 139:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_0
- }
- else
- {
- PIXEL00_20
- }
- PIXEL01_21
- PIXEL10_22
- PIXEL11_20
- break;
- }
- case 19:
- case 51:
- {
- if (Diff(w[2], w[6]))
- {
- PIXEL00_11
- PIXEL01_10
- }
- else
- {
- PIXEL00_60
- PIXEL01_90
- }
- PIXEL10_20
- PIXEL11_21
- break;
- }
- case 146:
- case 178:
- {
- PIXEL00_22
- if (Diff(w[2], w[6]))
- {
- PIXEL01_10
- PIXEL11_12
- }
- else
- {
- PIXEL01_90
- PIXEL11_61
- }
- PIXEL10_20
- break;
- }
- case 84:
- case 85:
- {
- PIXEL00_20
- if (Diff(w[6], w[8]))
- {
- PIXEL01_11
- PIXEL11_10
- }
- else
- {
- PIXEL01_60
- PIXEL11_90
- }
- PIXEL10_21
- break;
- }
- case 112:
- case 113:
- {
- PIXEL00_20
- PIXEL01_22
- if (Diff(w[6], w[8]))
- {
- PIXEL10_12
- PIXEL11_10
- }
- else
- {
- PIXEL10_61
- PIXEL11_90
- }
- break;
- }
- case 200:
- case 204:
- {
- PIXEL00_21
- PIXEL01_20
- if (Diff(w[8], w[4]))
- {
- PIXEL10_10
- PIXEL11_11
- }
- else
- {
- PIXEL10_90
- PIXEL11_60
- }
- break;
- }
- case 73:
- case 77:
- {
- if (Diff(w[8], w[4]))
- {
- PIXEL00_12
- PIXEL10_10
- }
- else
- {
- PIXEL00_61
- PIXEL10_90
- }
- PIXEL01_20
- PIXEL11_22
- break;
- }
- case 42:
- case 170:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_10
- PIXEL10_11
- }
- else
- {
- PIXEL00_90
- PIXEL10_60
- }
- PIXEL01_21
- PIXEL11_20
- break;
- }
- case 14:
- case 142:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_10
- PIXEL01_12
- }
- else
- {
- PIXEL00_90
- PIXEL01_61
- }
- PIXEL10_22
- PIXEL11_20
- break;
- }
- case 67:
- {
- PIXEL00_11
- PIXEL01_21
- PIXEL10_21
- PIXEL11_22
- break;
- }
- case 70:
- {
- PIXEL00_22
- PIXEL01_12
- PIXEL10_21
- PIXEL11_22
- break;
- }
- case 28:
- {
- PIXEL00_21
- PIXEL01_11
- PIXEL10_22
- PIXEL11_21
- break;
- }
- case 152:
- {
- PIXEL00_21
- PIXEL01_22
- PIXEL10_22
- PIXEL11_12
- break;
- }
- case 194:
- {
- PIXEL00_22
- PIXEL01_21
- PIXEL10_21
- PIXEL11_11
- break;
- }
- case 98:
- {
- PIXEL00_22
- PIXEL01_21
- PIXEL10_12
- PIXEL11_22
- break;
- }
- case 56:
- {
- PIXEL00_21
- PIXEL01_22
- PIXEL10_11
- PIXEL11_21
- break;
- }
- case 25:
- {
- PIXEL00_12
- PIXEL01_22
- PIXEL10_22
- PIXEL11_21
- break;
- }
- case 26:
- case 31:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_0
- }
- else
- {
- PIXEL00_20
- }
- if (Diff(w[2], w[6]))
- {
- PIXEL01_0
- }
- else
- {
- PIXEL01_20
- }
- PIXEL10_22
- PIXEL11_21
- break;
- }
- case 82:
- case 214:
- {
- PIXEL00_22
- if (Diff(w[2], w[6]))
- {
- PIXEL01_0
- }
- else
- {
- PIXEL01_20
- }
- PIXEL10_21
- if (Diff(w[6], w[8]))
- {
- PIXEL11_0
- }
- else
- {
- PIXEL11_20
- }
- break;
- }
- case 88:
- case 248:
- {
- PIXEL00_21
- PIXEL01_22
- if (Diff(w[8], w[4]))
- {
- PIXEL10_0
- }
- else
- {
- PIXEL10_20
- }
- if (Diff(w[6], w[8]))
- {
- PIXEL11_0
- }
- else
- {
- PIXEL11_20
- }
- break;
- }
- case 74:
- case 107:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_0
- }
- else
- {
- PIXEL00_20
- }
- PIXEL01_21
- if (Diff(w[8], w[4]))
- {
- PIXEL10_0
- }
- else
- {
- PIXEL10_20
- }
- PIXEL11_22
- break;
- }
- case 27:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_0
- }
- else
- {
- PIXEL00_20
- }
- PIXEL01_10
- PIXEL10_22
- PIXEL11_21
- break;
- }
- case 86:
- {
- PIXEL00_22
- if (Diff(w[2], w[6]))
- {
- PIXEL01_0
- }
- else
- {
- PIXEL01_20
- }
- PIXEL10_21
- PIXEL11_10
- break;
- }
- case 216:
- {
- PIXEL00_21
- PIXEL01_22
- PIXEL10_10
- if (Diff(w[6], w[8]))
- {
- PIXEL11_0
- }
- else
- {
- PIXEL11_20
- }
- break;
- }
- case 106:
- {
- PIXEL00_10
- PIXEL01_21
- if (Diff(w[8], w[4]))
- {
- PIXEL10_0
- }
- else
- {
- PIXEL10_20
- }
- PIXEL11_22
- break;
- }
- case 30:
- {
- PIXEL00_10
- if (Diff(w[2], w[6]))
- {
- PIXEL01_0
- }
- else
- {
- PIXEL01_20
- }
- PIXEL10_22
- PIXEL11_21
- break;
- }
- case 210:
- {
- PIXEL00_22
- PIXEL01_10
- PIXEL10_21
- if (Diff(w[6], w[8]))
- {
- PIXEL11_0
- }
- else
- {
- PIXEL11_20
- }
- break;
- }
- case 120:
- {
- PIXEL00_21
- PIXEL01_22
- if (Diff(w[8], w[4]))
- {
- PIXEL10_0
- }
- else
- {
- PIXEL10_20
- }
- PIXEL11_10
- break;
- }
- case 75:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_0
- }
- else
- {
- PIXEL00_20
- }
- PIXEL01_21
- PIXEL10_10
- PIXEL11_22
- break;
- }
- case 29:
- {
- PIXEL00_12
- PIXEL01_11
- PIXEL10_22
- PIXEL11_21
- break;
- }
- case 198:
- {
- PIXEL00_22
- PIXEL01_12
- PIXEL10_21
- PIXEL11_11
- break;
- }
- case 184:
- {
- PIXEL00_21
- PIXEL01_22
- PIXEL10_11
- PIXEL11_12
- break;
- }
- case 99:
- {
- PIXEL00_11
- PIXEL01_21
- PIXEL10_12
- PIXEL11_22
- break;
- }
- case 57:
- {
- PIXEL00_12
- PIXEL01_22
- PIXEL10_11
- PIXEL11_21
- break;
- }
- case 71:
- {
- PIXEL00_11
- PIXEL01_12
- PIXEL10_21
- PIXEL11_22
- break;
- }
- case 156:
- {
- PIXEL00_21
- PIXEL01_11
- PIXEL10_22
- PIXEL11_12
- break;
- }
- case 226:
- {
- PIXEL00_22
- PIXEL01_21
- PIXEL10_12
- PIXEL11_11
- break;
- }
- case 60:
- {
- PIXEL00_21
- PIXEL01_11
- PIXEL10_11
- PIXEL11_21
- break;
- }
- case 195:
- {
- PIXEL00_11
- PIXEL01_21
- PIXEL10_21
- PIXEL11_11
- break;
- }
- case 102:
- {
- PIXEL00_22
- PIXEL01_12
- PIXEL10_12
- PIXEL11_22
- break;
- }
- case 153:
- {
- PIXEL00_12
- PIXEL01_22
- PIXEL10_22
- PIXEL11_12
- break;
- }
- case 58:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_10
- }
- else
- {
- PIXEL00_70
- }
- if (Diff(w[2], w[6]))
- {
- PIXEL01_10
- }
- else
- {
- PIXEL01_70
- }
- PIXEL10_11
- PIXEL11_21
- break;
- }
- case 83:
- {
- PIXEL00_11
- if (Diff(w[2], w[6]))
- {
- PIXEL01_10
- }
- else
- {
- PIXEL01_70
- }
- PIXEL10_21
- if (Diff(w[6], w[8]))
- {
- PIXEL11_10
- }
- else
- {
- PIXEL11_70
- }
- break;
- }
- case 92:
- {
- PIXEL00_21
- PIXEL01_11
- if (Diff(w[8], w[4]))
- {
- PIXEL10_10
- }
- else
- {
- PIXEL10_70
- }
- if (Diff(w[6], w[8]))
- {
- PIXEL11_10
- }
- else
- {
- PIXEL11_70
- }
- break;
- }
- case 202:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_10
- }
- else
- {
- PIXEL00_70
- }
- PIXEL01_21
- if (Diff(w[8], w[4]))
- {
- PIXEL10_10
- }
- else
- {
- PIXEL10_70
- }
- PIXEL11_11
- break;
- }
- case 78:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_10
- }
- else
- {
- PIXEL00_70
- }
- PIXEL01_12
- if (Diff(w[8], w[4]))
- {
- PIXEL10_10
- }
- else
- {
- PIXEL10_70
- }
- PIXEL11_22
- break;
- }
- case 154:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_10
- }
- else
- {
- PIXEL00_70
- }
- if (Diff(w[2], w[6]))
- {
- PIXEL01_10
- }
- else
- {
- PIXEL01_70
- }
- PIXEL10_22
- PIXEL11_12
- break;
- }
- case 114:
- {
- PIXEL00_22
- if (Diff(w[2], w[6]))
- {
- PIXEL01_10
- }
- else
- {
- PIXEL01_70
- }
- PIXEL10_12
- if (Diff(w[6], w[8]))
- {
- PIXEL11_10
- }
- else
- {
- PIXEL11_70
- }
- break;
- }
- case 89:
- {
- PIXEL00_12
- PIXEL01_22
- if (Diff(w[8], w[4]))
- {
- PIXEL10_10
- }
- else
- {
- PIXEL10_70
- }
- if (Diff(w[6], w[8]))
- {
- PIXEL11_10
- }
- else
- {
- PIXEL11_70
- }
- break;
- }
- case 90:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_10
- }
- else
- {
- PIXEL00_70
- }
- if (Diff(w[2], w[6]))
- {
- PIXEL01_10
- }
- else
- {
- PIXEL01_70
- }
- if (Diff(w[8], w[4]))
- {
- PIXEL10_10
- }
- else
- {
- PIXEL10_70
- }
- if (Diff(w[6], w[8]))
- {
- PIXEL11_10
- }
- else
- {
- PIXEL11_70
- }
- break;
- }
- case 55:
- case 23:
- {
- if (Diff(w[2], w[6]))
- {
- PIXEL00_11
- PIXEL01_0
- }
- else
- {
- PIXEL00_60
- PIXEL01_90
- }
- PIXEL10_20
- PIXEL11_21
- break;
- }
- case 182:
- case 150:
- {
- PIXEL00_22
- if (Diff(w[2], w[6]))
- {
- PIXEL01_0
- PIXEL11_12
- }
- else
- {
- PIXEL01_90
- PIXEL11_61
- }
- PIXEL10_20
- break;
- }
- case 213:
- case 212:
- {
- PIXEL00_20
- if (Diff(w[6], w[8]))
- {
- PIXEL01_11
- PIXEL11_0
- }
- else
- {
- PIXEL01_60
- PIXEL11_90
- }
- PIXEL10_21
- break;
- }
- case 241:
- case 240:
- {
- PIXEL00_20
- PIXEL01_22
- if (Diff(w[6], w[8]))
- {
- PIXEL10_12
- PIXEL11_0
- }
- else
- {
- PIXEL10_61
- PIXEL11_90
- }
- break;
- }
- case 236:
- case 232:
- {
- PIXEL00_21
- PIXEL01_20
- if (Diff(w[8], w[4]))
- {
- PIXEL10_0
- PIXEL11_11
- }
- else
- {
- PIXEL10_90
- PIXEL11_60
- }
- break;
- }
- case 109:
- case 105:
- {
- if (Diff(w[8], w[4]))
- {
- PIXEL00_12
- PIXEL10_0
- }
- else
- {
- PIXEL00_61
- PIXEL10_90
- }
- PIXEL01_20
- PIXEL11_22
- break;
- }
- case 171:
- case 43:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_0
- PIXEL10_11
- }
- else
- {
- PIXEL00_90
- PIXEL10_60
- }
- PIXEL01_21
- PIXEL11_20
- break;
- }
- case 143:
- case 15:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_0
- PIXEL01_12
- }
- else
- {
- PIXEL00_90
- PIXEL01_61
- }
- PIXEL10_22
- PIXEL11_20
- break;
- }
- case 124:
- {
- PIXEL00_21
- PIXEL01_11
- if (Diff(w[8], w[4]))
- {
- PIXEL10_0
- }
- else
- {
- PIXEL10_20
- }
- PIXEL11_10
- break;
- }
- case 203:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_0
- }
- else
- {
- PIXEL00_20
- }
- PIXEL01_21
- PIXEL10_10
- PIXEL11_11
- break;
- }
- case 62:
- {
- PIXEL00_10
- if (Diff(w[2], w[6]))
- {
- PIXEL01_0
- }
- else
- {
- PIXEL01_20
- }
- PIXEL10_11
- PIXEL11_21
- break;
- }
- case 211:
- {
- PIXEL00_11
- PIXEL01_10
- PIXEL10_21
- if (Diff(w[6], w[8]))
- {
- PIXEL11_0
- }
- else
- {
- PIXEL11_20
- }
- break;
- }
- case 118:
- {
- PIXEL00_22
- if (Diff(w[2], w[6]))
- {
- PIXEL01_0
- }
- else
- {
- PIXEL01_20
- }
- PIXEL10_12
- PIXEL11_10
- break;
- }
- case 217:
- {
- PIXEL00_12
- PIXEL01_22
- PIXEL10_10
- if (Diff(w[6], w[8]))
- {
- PIXEL11_0
- }
- else
- {
- PIXEL11_20
- }
- break;
- }
- case 110:
- {
- PIXEL00_10
- PIXEL01_12
- if (Diff(w[8], w[4]))
- {
- PIXEL10_0
- }
- else
- {
- PIXEL10_20
- }
- PIXEL11_22
- break;
- }
- case 155:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_0
- }
- else
- {
- PIXEL00_20
- }
- PIXEL01_10
- PIXEL10_22
- PIXEL11_12
- break;
- }
- case 188:
- {
- PIXEL00_21
- PIXEL01_11
- PIXEL10_11
- PIXEL11_12
- break;
- }
- case 185:
- {
- PIXEL00_12
- PIXEL01_22
- PIXEL10_11
- PIXEL11_12
- break;
- }
- case 61:
- {
- PIXEL00_12
- PIXEL01_11
- PIXEL10_11
- PIXEL11_21
- break;
- }
- case 157:
- {
- PIXEL00_12
- PIXEL01_11
- PIXEL10_22
- PIXEL11_12
- break;
- }
- case 103:
- {
- PIXEL00_11
- PIXEL01_12
- PIXEL10_12
- PIXEL11_22
- break;
- }
- case 227:
- {
- PIXEL00_11
- PIXEL01_21
- PIXEL10_12
- PIXEL11_11
- break;
- }
- case 230:
- {
- PIXEL00_22
- PIXEL01_12
- PIXEL10_12
- PIXEL11_11
- break;
- }
- case 199:
- {
- PIXEL00_11
- PIXEL01_12
- PIXEL10_21
- PIXEL11_11
- break;
- }
- case 220:
- {
- PIXEL00_21
- PIXEL01_11
- if (Diff(w[8], w[4]))
- {
- PIXEL10_10
- }
- else
- {
- PIXEL10_70
- }
- if (Diff(w[6], w[8]))
- {
- PIXEL11_0
- }
- else
- {
- PIXEL11_20
- }
- break;
- }
- case 158:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_10
- }
- else
- {
- PIXEL00_70
- }
- if (Diff(w[2], w[6]))
- {
- PIXEL01_0
- }
- else
- {
- PIXEL01_20
- }
- PIXEL10_22
- PIXEL11_12
- break;
- }
- case 234:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_10
- }
- else
- {
- PIXEL00_70
- }
- PIXEL01_21
- if (Diff(w[8], w[4]))
- {
- PIXEL10_0
- }
- else
- {
- PIXEL10_20
- }
- PIXEL11_11
- break;
- }
- case 242:
- {
- PIXEL00_22
- if (Diff(w[2], w[6]))
- {
- PIXEL01_10
- }
- else
- {
- PIXEL01_70
- }
- PIXEL10_12
- if (Diff(w[6], w[8]))
- {
- PIXEL11_0
- }
- else
- {
- PIXEL11_20
- }
- break;
- }
- case 59:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_0
- }
- else
- {
- PIXEL00_20
- }
- if (Diff(w[2], w[6]))
- {
- PIXEL01_10
- }
- else
- {
- PIXEL01_70
- }
- PIXEL10_11
- PIXEL11_21
- break;
- }
- case 121:
- {
- PIXEL00_12
- PIXEL01_22
- if (Diff(w[8], w[4]))
- {
- PIXEL10_0
- }
- else
- {
- PIXEL10_20
- }
- if (Diff(w[6], w[8]))
- {
- PIXEL11_10
- }
- else
- {
- PIXEL11_70
- }
- break;
- }
- case 87:
- {
- PIXEL00_11
- if (Diff(w[2], w[6]))
- {
- PIXEL01_0
- }
- else
- {
- PIXEL01_20
- }
- PIXEL10_21
- if (Diff(w[6], w[8]))
- {
- PIXEL11_10
- }
- else
- {
- PIXEL11_70
- }
- break;
- }
- case 79:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_0
- }
- else
- {
- PIXEL00_20
- }
- PIXEL01_12
- if (Diff(w[8], w[4]))
- {
- PIXEL10_10
- }
- else
- {
- PIXEL10_70
- }
- PIXEL11_22
- break;
- }
- case 122:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_10
- }
- else
- {
- PIXEL00_70
- }
- if (Diff(w[2], w[6]))
- {
- PIXEL01_10
- }
- else
- {
- PIXEL01_70
- }
- if (Diff(w[8], w[4]))
- {
- PIXEL10_0
- }
- else
- {
- PIXEL10_20
- }
- if (Diff(w[6], w[8]))
- {
- PIXEL11_10
- }
- else
- {
- PIXEL11_70
- }
- break;
- }
- case 94:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_10
- }
- else
- {
- PIXEL00_70
- }
- if (Diff(w[2], w[6]))
- {
- PIXEL01_0
- }
- else
- {
- PIXEL01_20
- }
- if (Diff(w[8], w[4]))
- {
- PIXEL10_10
- }
- else
- {
- PIXEL10_70
- }
- if (Diff(w[6], w[8]))
- {
- PIXEL11_10
- }
- else
- {
- PIXEL11_70
- }
- break;
- }
- case 218:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_10
- }
- else
- {
- PIXEL00_70
- }
- if (Diff(w[2], w[6]))
- {
- PIXEL01_10
- }
- else
- {
- PIXEL01_70
- }
- if (Diff(w[8], w[4]))
- {
- PIXEL10_10
- }
- else
- {
- PIXEL10_70
- }
- if (Diff(w[6], w[8]))
- {
- PIXEL11_0
- }
- else
- {
- PIXEL11_20
- }
- break;
- }
- case 91:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_0
- }
- else
- {
- PIXEL00_20
- }
- if (Diff(w[2], w[6]))
- {
- PIXEL01_10
- }
- else
- {
- PIXEL01_70
- }
- if (Diff(w[8], w[4]))
- {
- PIXEL10_10
- }
- else
- {
- PIXEL10_70
- }
- if (Diff(w[6], w[8]))
- {
- PIXEL11_10
- }
- else
- {
- PIXEL11_70
- }
- break;
- }
- case 229:
- {
- PIXEL00_20
- PIXEL01_20
- PIXEL10_12
- PIXEL11_11
- break;
- }
- case 167:
- {
- PIXEL00_11
- PIXEL01_12
- PIXEL10_20
- PIXEL11_20
- break;
- }
- case 173:
- {
- PIXEL00_12
- PIXEL01_20
- PIXEL10_11
- PIXEL11_20
- break;
- }
- case 181:
- {
- PIXEL00_20
- PIXEL01_11
- PIXEL10_20
- PIXEL11_12
- break;
- }
- case 186:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_10
- }
- else
- {
- PIXEL00_70
- }
- if (Diff(w[2], w[6]))
- {
- PIXEL01_10
- }
- else
- {
- PIXEL01_70
- }
- PIXEL10_11
- PIXEL11_12
- break;
- }
- case 115:
- {
- PIXEL00_11
- if (Diff(w[2], w[6]))
- {
- PIXEL01_10
- }
- else
- {
- PIXEL01_70
- }
- PIXEL10_12
- if (Diff(w[6], w[8]))
- {
- PIXEL11_10
- }
- else
- {
- PIXEL11_70
- }
- break;
- }
- case 93:
- {
- PIXEL00_12
- PIXEL01_11
- if (Diff(w[8], w[4]))
- {
- PIXEL10_10
- }
- else
- {
- PIXEL10_70
- }
- if (Diff(w[6], w[8]))
- {
- PIXEL11_10
- }
- else
- {
- PIXEL11_70
- }
- break;
- }
- case 206:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_10
- }
- else
- {
- PIXEL00_70
- }
- PIXEL01_12
- if (Diff(w[8], w[4]))
- {
- PIXEL10_10
- }
- else
- {
- PIXEL10_70
- }
- PIXEL11_11
- break;
- }
- case 205:
- case 201:
- {
- PIXEL00_12
- PIXEL01_20
- if (Diff(w[8], w[4]))
- {
- PIXEL10_10
- }
- else
- {
- PIXEL10_70
- }
- PIXEL11_11
- break;
- }
- case 174:
- case 46:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_10
- }
- else
- {
- PIXEL00_70
- }
- PIXEL01_12
- PIXEL10_11
- PIXEL11_20
- break;
- }
- case 179:
- case 147:
- {
- PIXEL00_11
- if (Diff(w[2], w[6]))
- {
- PIXEL01_10
- }
- else
- {
- PIXEL01_70
- }
- PIXEL10_20
- PIXEL11_12
- break;
- }
- case 117:
- case 116:
- {
- PIXEL00_20
- PIXEL01_11
- PIXEL10_12
- if (Diff(w[6], w[8]))
- {
- PIXEL11_10
- }
- else
- {
- PIXEL11_70
- }
- break;
- }
- case 189:
- {
- PIXEL00_12
- PIXEL01_11
- PIXEL10_11
- PIXEL11_12
- break;
- }
- case 231:
- {
- PIXEL00_11
- PIXEL01_12
- PIXEL10_12
- PIXEL11_11
- break;
- }
- case 126:
- {
- PIXEL00_10
- if (Diff(w[2], w[6]))
- {
- PIXEL01_0
- }
- else
- {
- PIXEL01_20
- }
- if (Diff(w[8], w[4]))
- {
- PIXEL10_0
- }
- else
- {
- PIXEL10_20
- }
- PIXEL11_10
- break;
- }
- case 219:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_0
- }
- else
- {
- PIXEL00_20
- }
- PIXEL01_10
- PIXEL10_10
- if (Diff(w[6], w[8]))
- {
- PIXEL11_0
- }
- else
- {
- PIXEL11_20
- }
- break;
- }
- case 125:
- {
- if (Diff(w[8], w[4]))
- {
- PIXEL00_12
- PIXEL10_0
- }
- else
- {
- PIXEL00_61
- PIXEL10_90
- }
- PIXEL01_11
- PIXEL11_10
- break;
- }
- case 221:
- {
- PIXEL00_12
- if (Diff(w[6], w[8]))
- {
- PIXEL01_11
- PIXEL11_0
- }
- else
- {
- PIXEL01_60
- PIXEL11_90
- }
- PIXEL10_10
- break;
- }
- case 207:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_0
- PIXEL01_12
- }
- else
- {
- PIXEL00_90
- PIXEL01_61
- }
- PIXEL10_10
- PIXEL11_11
- break;
- }
- case 238:
- {
- PIXEL00_10
- PIXEL01_12
- if (Diff(w[8], w[4]))
- {
- PIXEL10_0
- PIXEL11_11
- }
- else
- {
- PIXEL10_90
- PIXEL11_60
- }
- break;
- }
- case 190:
- {
- PIXEL00_10
- if (Diff(w[2], w[6]))
- {
- PIXEL01_0
- PIXEL11_12
- }
- else
- {
- PIXEL01_90
- PIXEL11_61
- }
- PIXEL10_11
- break;
- }
- case 187:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_0
- PIXEL10_11
- }
- else
- {
- PIXEL00_90
- PIXEL10_60
- }
- PIXEL01_10
- PIXEL11_12
- break;
- }
- case 243:
- {
- PIXEL00_11
- PIXEL01_10
- if (Diff(w[6], w[8]))
- {
- PIXEL10_12
- PIXEL11_0
- }
- else
- {
- PIXEL10_61
- PIXEL11_90
- }
- break;
- }
- case 119:
- {
- if (Diff(w[2], w[6]))
- {
- PIXEL00_11
- PIXEL01_0
- }
- else
- {
- PIXEL00_60
- PIXEL01_90
- }
- PIXEL10_12
- PIXEL11_10
- break;
- }
- case 237:
- case 233:
- {
- PIXEL00_12
- PIXEL01_20
- if (Diff(w[8], w[4]))
- {
- PIXEL10_0
- }
- else
- {
- PIXEL10_100
- }
- PIXEL11_11
- break;
- }
- case 175:
- case 47:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_0
- }
- else
- {
- PIXEL00_100
- }
- PIXEL01_12
- PIXEL10_11
- PIXEL11_20
- break;
- }
- case 183:
- case 151:
- {
- PIXEL00_11
- if (Diff(w[2], w[6]))
- {
- PIXEL01_0
- }
- else
- {
- PIXEL01_100
- }
- PIXEL10_20
- PIXEL11_12
- break;
- }
- case 245:
- case 244:
- {
- PIXEL00_20
- PIXEL01_11
- PIXEL10_12
- if (Diff(w[6], w[8]))
- {
- PIXEL11_0
- }
- else
- {
- PIXEL11_100
- }
- break;
- }
- case 250:
- {
- PIXEL00_10
- PIXEL01_10
- if (Diff(w[8], w[4]))
- {
- PIXEL10_0
- }
- else
- {
- PIXEL10_20
- }
- if (Diff(w[6], w[8]))
- {
- PIXEL11_0
- }
- else
- {
- PIXEL11_20
- }
- break;
- }
- case 123:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_0
- }
- else
- {
- PIXEL00_20
- }
- PIXEL01_10
- if (Diff(w[8], w[4]))
- {
- PIXEL10_0
- }
- else
- {
- PIXEL10_20
- }
- PIXEL11_10
- break;
- }
- case 95:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_0
- }
- else
- {
- PIXEL00_20
- }
- if (Diff(w[2], w[6]))
- {
- PIXEL01_0
- }
- else
- {
- PIXEL01_20
- }
- PIXEL10_10
- PIXEL11_10
- break;
- }
- case 222:
- {
- PIXEL00_10
- if (Diff(w[2], w[6]))
- {
- PIXEL01_0
- }
- else
- {
- PIXEL01_20
- }
- PIXEL10_10
- if (Diff(w[6], w[8]))
- {
- PIXEL11_0
- }
- else
- {
- PIXEL11_20
- }
- break;
- }
- case 252:
- {
- PIXEL00_21
- PIXEL01_11
- if (Diff(w[8], w[4]))
- {
- PIXEL10_0
- }
- else
- {
- PIXEL10_20
- }
- if (Diff(w[6], w[8]))
- {
- PIXEL11_0
- }
- else
- {
- PIXEL11_100
- }
- break;
- }
- case 249:
- {
- PIXEL00_12
- PIXEL01_22
- if (Diff(w[8], w[4]))
- {
- PIXEL10_0
- }
- else
- {
- PIXEL10_100
- }
- if (Diff(w[6], w[8]))
- {
- PIXEL11_0
- }
- else
- {
- PIXEL11_20
- }
- break;
- }
- case 235:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_0
- }
- else
- {
- PIXEL00_20
- }
- PIXEL01_21
- if (Diff(w[8], w[4]))
- {
- PIXEL10_0
- }
- else
- {
- PIXEL10_100
- }
- PIXEL11_11
- break;
- }
- case 111:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_0
- }
- else
- {
- PIXEL00_100
- }
- PIXEL01_12
- if (Diff(w[8], w[4]))
- {
- PIXEL10_0
- }
- else
- {
- PIXEL10_20
- }
- PIXEL11_22
- break;
- }
- case 63:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_0
- }
- else
- {
- PIXEL00_100
- }
- if (Diff(w[2], w[6]))
- {
- PIXEL01_0
- }
- else
- {
- PIXEL01_20
- }
- PIXEL10_11
- PIXEL11_21
- break;
- }
- case 159:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_0
- }
- else
- {
- PIXEL00_20
- }
- if (Diff(w[2], w[6]))
- {
- PIXEL01_0
- }
- else
- {
- PIXEL01_100
- }
- PIXEL10_22
- PIXEL11_12
- break;
- }
- case 215:
- {
- PIXEL00_11
- if (Diff(w[2], w[6]))
- {
- PIXEL01_0
- }
- else
- {
- PIXEL01_100
- }
- PIXEL10_21
- if (Diff(w[6], w[8]))
- {
- PIXEL11_0
- }
- else
- {
- PIXEL11_20
- }
- break;
- }
- case 246:
- {
- PIXEL00_22
- if (Diff(w[2], w[6]))
- {
- PIXEL01_0
- }
- else
- {
- PIXEL01_20
- }
- PIXEL10_12
- if (Diff(w[6], w[8]))
- {
- PIXEL11_0
- }
- else
- {
- PIXEL11_100
- }
- break;
- }
- case 254:
- {
- PIXEL00_10
- if (Diff(w[2], w[6]))
- {
- PIXEL01_0
- }
- else
- {
- PIXEL01_20
- }
- if (Diff(w[8], w[4]))
- {
- PIXEL10_0
- }
- else
- {
- PIXEL10_20
- }
- if (Diff(w[6], w[8]))
- {
- PIXEL11_0
- }
- else
- {
- PIXEL11_100
- }
- break;
- }
- case 253:
- {
- PIXEL00_12
- PIXEL01_11
- if (Diff(w[8], w[4]))
- {
- PIXEL10_0
- }
- else
- {
- PIXEL10_100
- }
- if (Diff(w[6], w[8]))
- {
- PIXEL11_0
- }
- else
- {
- PIXEL11_100
- }
- break;
- }
- case 251:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_0
- }
- else
- {
- PIXEL00_20
- }
- PIXEL01_10
- if (Diff(w[8], w[4]))
- {
- PIXEL10_0
- }
- else
- {
- PIXEL10_100
- }
- if (Diff(w[6], w[8]))
- {
- PIXEL11_0
- }
- else
- {
- PIXEL11_20
- }
- break;
- }
- case 239:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_0
- }
- else
- {
- PIXEL00_100
- }
- PIXEL01_12
- if (Diff(w[8], w[4]))
- {
- PIXEL10_0
- }
- else
- {
- PIXEL10_100
- }
- PIXEL11_11
- break;
- }
- case 127:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_0
- }
- else
- {
- PIXEL00_100
- }
- if (Diff(w[2], w[6]))
- {
- PIXEL01_0
- }
- else
- {
- PIXEL01_20
- }
- if (Diff(w[8], w[4]))
- {
- PIXEL10_0
- }
- else
- {
- PIXEL10_20
- }
- PIXEL11_10
- break;
- }
- case 191:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_0
- }
- else
- {
- PIXEL00_100
- }
- if (Diff(w[2], w[6]))
- {
- PIXEL01_0
- }
- else
- {
- PIXEL01_100
- }
- PIXEL10_11
- PIXEL11_12
- break;
- }
- case 223:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_0
- }
- else
- {
- PIXEL00_20
- }
- if (Diff(w[2], w[6]))
- {
- PIXEL01_0
- }
- else
- {
- PIXEL01_100
- }
- PIXEL10_10
- if (Diff(w[6], w[8]))
- {
- PIXEL11_0
- }
- else
- {
- PIXEL11_20
- }
- break;
- }
- case 247:
- {
- PIXEL00_11
- if (Diff(w[2], w[6]))
- {
- PIXEL01_0
- }
- else
- {
- PIXEL01_100
- }
- PIXEL10_12
- if (Diff(w[6], w[8]))
- {
- PIXEL11_0
- }
- else
- {
- PIXEL11_100
- }
- break;
- }
- case 255:
- {
- if (Diff(w[4], w[2]))
- {
- PIXEL00_0
- }
- else
- {
- PIXEL00_100
- }
- if (Diff(w[2], w[6]))
- {
- PIXEL01_0
- }
- else
- {
- PIXEL01_100
- }
- if (Diff(w[8], w[4]))
- {
- PIXEL10_0
- }
- else
- {
- PIXEL10_100
- }
- if (Diff(w[6], w[8]))
- {
- PIXEL11_0
- }
- else
- {
- PIXEL11_100
- }
- break;
- }
+ case 0:
+ case 1:
+ case 4:
+ case 32:
+ case 128:
+ case 5:
+ case 132:
+ case 160:
+ case 33:
+ case 129:
+ case 36:
+ case 133:
+ case 164:
+ case 161:
+ case 37:
+ case 165:
+ {
+ PIXEL00_20
+ PIXEL01_20
+ PIXEL10_20
+ PIXEL11_20
+ break;
+ }
+ case 2:
+ case 34:
+ case 130:
+ case 162:
+ {
+ PIXEL00_22
+ PIXEL01_21
+ PIXEL10_20
+ PIXEL11_20
+ break;
+ }
+ case 16:
+ case 17:
+ case 48:
+ case 49:
+ {
+ PIXEL00_20
+ PIXEL01_22
+ PIXEL10_20
+ PIXEL11_21
+ break;
+ }
+ case 64:
+ case 65:
+ case 68:
+ case 69:
+ {
+ PIXEL00_20
+ PIXEL01_20
+ PIXEL10_21
+ PIXEL11_22
+ break;
+ }
+ case 8:
+ case 12:
+ case 136:
+ case 140:
+ {
+ PIXEL00_21
+ PIXEL01_20
+ PIXEL10_22
+ PIXEL11_20
+ break;
+ }
+ case 3:
+ case 35:
+ case 131:
+ case 163:
+ {
+ PIXEL00_11
+ PIXEL01_21
+ PIXEL10_20
+ PIXEL11_20
+ break;
+ }
+ case 6:
+ case 38:
+ case 134:
+ case 166:
+ {
+ PIXEL00_22
+ PIXEL01_12
+ PIXEL10_20
+ PIXEL11_20
+ break;
+ }
+ case 20:
+ case 21:
+ case 52:
+ case 53:
+ {
+ PIXEL00_20
+ PIXEL01_11
+ PIXEL10_20
+ PIXEL11_21
+ break;
+ }
+ case 144:
+ case 145:
+ case 176:
+ case 177:
+ {
+ PIXEL00_20
+ PIXEL01_22
+ PIXEL10_20
+ PIXEL11_12
+ break;
+ }
+ case 192:
+ case 193:
+ case 196:
+ case 197:
+ {
+ PIXEL00_20
+ PIXEL01_20
+ PIXEL10_21
+ PIXEL11_11
+ break;
+ }
+ case 96:
+ case 97:
+ case 100:
+ case 101:
+ {
+ PIXEL00_20
+ PIXEL01_20
+ PIXEL10_12
+ PIXEL11_22
+ break;
+ }
+ case 40:
+ case 44:
+ case 168:
+ case 172:
+ {
+ PIXEL00_21
+ PIXEL01_20
+ PIXEL10_11
+ PIXEL11_20
+ break;
+ }
+ case 9:
+ case 13:
+ case 137:
+ case 141:
+ {
+ PIXEL00_12
+ PIXEL01_20
+ PIXEL10_22
+ PIXEL11_20
+ break;
+ }
+ case 18:
+ case 50:
+ {
+ PIXEL00_22
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_10
+ }
+ else
+ {
+ PIXEL01_20
+ }
+ PIXEL10_20
+ PIXEL11_21
+ break;
+ }
+ case 80:
+ case 81:
+ {
+ PIXEL00_20
+ PIXEL01_22
+ PIXEL10_21
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_10
+ }
+ else
+ {
+ PIXEL11_20
+ }
+ break;
+ }
+ case 72:
+ case 76:
+ {
+ PIXEL00_21
+ PIXEL01_20
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_10
+ }
+ else
+ {
+ PIXEL10_20
+ }
+ PIXEL11_22
+ break;
+ }
+ case 10:
+ case 138:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_10
+ }
+ else
+ {
+ PIXEL00_20
+ }
+ PIXEL01_21
+ PIXEL10_22
+ PIXEL11_20
+ break;
+ }
+ case 66:
+ {
+ PIXEL00_22
+ PIXEL01_21
+ PIXEL10_21
+ PIXEL11_22
+ break;
+ }
+ case 24:
+ {
+ PIXEL00_21
+ PIXEL01_22
+ PIXEL10_22
+ PIXEL11_21
+ break;
+ }
+ case 7:
+ case 39:
+ case 135:
+ {
+ PIXEL00_11
+ PIXEL01_12
+ PIXEL10_20
+ PIXEL11_20
+ break;
+ }
+ case 148:
+ case 149:
+ case 180:
+ {
+ PIXEL00_20
+ PIXEL01_11
+ PIXEL10_20
+ PIXEL11_12
+ break;
+ }
+ case 224:
+ case 228:
+ case 225:
+ {
+ PIXEL00_20
+ PIXEL01_20
+ PIXEL10_12
+ PIXEL11_11
+ break;
+ }
+ case 41:
+ case 169:
+ case 45:
+ {
+ PIXEL00_12
+ PIXEL01_20
+ PIXEL10_11
+ PIXEL11_20
+ break;
+ }
+ case 22:
+ case 54:
+ {
+ PIXEL00_22
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_0
+ }
+ else
+ {
+ PIXEL01_20
+ }
+ PIXEL10_20
+ PIXEL11_21
+ break;
+ }
+ case 208:
+ case 209:
+ {
+ PIXEL00_20
+ PIXEL01_22
+ PIXEL10_21
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_0
+ }
+ else
+ {
+ PIXEL11_20
+ }
+ break;
+ }
+ case 104:
+ case 108:
+ {
+ PIXEL00_21
+ PIXEL01_20
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_0
+ }
+ else
+ {
+ PIXEL10_20
+ }
+ PIXEL11_22
+ break;
+ }
+ case 11:
+ case 139:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_0
+ }
+ else
+ {
+ PIXEL00_20
+ }
+ PIXEL01_21
+ PIXEL10_22
+ PIXEL11_20
+ break;
+ }
+ case 19:
+ case 51:
+ {
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL00_11
+ PIXEL01_10
+ }
+ else
+ {
+ PIXEL00_60
+ PIXEL01_90
+ }
+ PIXEL10_20
+ PIXEL11_21
+ break;
+ }
+ case 146:
+ case 178:
+ {
+ PIXEL00_22
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_10
+ PIXEL11_12
+ }
+ else
+ {
+ PIXEL01_90
+ PIXEL11_61
+ }
+ PIXEL10_20
+ break;
+ }
+ case 84:
+ case 85:
+ {
+ PIXEL00_20
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL01_11
+ PIXEL11_10
+ }
+ else
+ {
+ PIXEL01_60
+ PIXEL11_90
+ }
+ PIXEL10_21
+ break;
+ }
+ case 112:
+ case 113:
+ {
+ PIXEL00_20
+ PIXEL01_22
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL10_12
+ PIXEL11_10
+ }
+ else
+ {
+ PIXEL10_61
+ PIXEL11_90
+ }
+ break;
+ }
+ case 200:
+ case 204:
+ {
+ PIXEL00_21
+ PIXEL01_20
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_10
+ PIXEL11_11
+ }
+ else
+ {
+ PIXEL10_90
+ PIXEL11_60
+ }
+ break;
+ }
+ case 73:
+ case 77:
+ {
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL00_12
+ PIXEL10_10
+ }
+ else
+ {
+ PIXEL00_61
+ PIXEL10_90
+ }
+ PIXEL01_20
+ PIXEL11_22
+ break;
+ }
+ case 42:
+ case 170:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_10
+ PIXEL10_11
+ }
+ else
+ {
+ PIXEL00_90
+ PIXEL10_60
+ }
+ PIXEL01_21
+ PIXEL11_20
+ break;
+ }
+ case 14:
+ case 142:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_10
+ PIXEL01_12
+ }
+ else
+ {
+ PIXEL00_90
+ PIXEL01_61
+ }
+ PIXEL10_22
+ PIXEL11_20
+ break;
+ }
+ case 67:
+ {
+ PIXEL00_11
+ PIXEL01_21
+ PIXEL10_21
+ PIXEL11_22
+ break;
+ }
+ case 70:
+ {
+ PIXEL00_22
+ PIXEL01_12
+ PIXEL10_21
+ PIXEL11_22
+ break;
+ }
+ case 28:
+ {
+ PIXEL00_21
+ PIXEL01_11
+ PIXEL10_22
+ PIXEL11_21
+ break;
+ }
+ case 152:
+ {
+ PIXEL00_21
+ PIXEL01_22
+ PIXEL10_22
+ PIXEL11_12
+ break;
+ }
+ case 194:
+ {
+ PIXEL00_22
+ PIXEL01_21
+ PIXEL10_21
+ PIXEL11_11
+ break;
+ }
+ case 98:
+ {
+ PIXEL00_22
+ PIXEL01_21
+ PIXEL10_12
+ PIXEL11_22
+ break;
+ }
+ case 56:
+ {
+ PIXEL00_21
+ PIXEL01_22
+ PIXEL10_11
+ PIXEL11_21
+ break;
+ }
+ case 25:
+ {
+ PIXEL00_12
+ PIXEL01_22
+ PIXEL10_22
+ PIXEL11_21
+ break;
+ }
+ case 26:
+ case 31:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_0
+ }
+ else
+ {
+ PIXEL00_20
+ }
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_0
+ }
+ else
+ {
+ PIXEL01_20
+ }
+ PIXEL10_22
+ PIXEL11_21
+ break;
+ }
+ case 82:
+ case 214:
+ {
+ PIXEL00_22
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_0
+ }
+ else
+ {
+ PIXEL01_20
+ }
+ PIXEL10_21
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_0
+ }
+ else
+ {
+ PIXEL11_20
+ }
+ break;
+ }
+ case 88:
+ case 248:
+ {
+ PIXEL00_21
+ PIXEL01_22
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_0
+ }
+ else
+ {
+ PIXEL10_20
+ }
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_0
+ }
+ else
+ {
+ PIXEL11_20
+ }
+ break;
+ }
+ case 74:
+ case 107:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_0
+ }
+ else
+ {
+ PIXEL00_20
+ }
+ PIXEL01_21
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_0
+ }
+ else
+ {
+ PIXEL10_20
+ }
+ PIXEL11_22
+ break;
+ }
+ case 27:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_0
+ }
+ else
+ {
+ PIXEL00_20
+ }
+ PIXEL01_10
+ PIXEL10_22
+ PIXEL11_21
+ break;
+ }
+ case 86:
+ {
+ PIXEL00_22
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_0
+ }
+ else
+ {
+ PIXEL01_20
+ }
+ PIXEL10_21
+ PIXEL11_10
+ break;
+ }
+ case 216:
+ {
+ PIXEL00_21
+ PIXEL01_22
+ PIXEL10_10
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_0
+ }
+ else
+ {
+ PIXEL11_20
+ }
+ break;
+ }
+ case 106:
+ {
+ PIXEL00_10
+ PIXEL01_21
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_0
+ }
+ else
+ {
+ PIXEL10_20
+ }
+ PIXEL11_22
+ break;
+ }
+ case 30:
+ {
+ PIXEL00_10
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_0
+ }
+ else
+ {
+ PIXEL01_20
+ }
+ PIXEL10_22
+ PIXEL11_21
+ break;
+ }
+ case 210:
+ {
+ PIXEL00_22
+ PIXEL01_10
+ PIXEL10_21
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_0
+ }
+ else
+ {
+ PIXEL11_20
+ }
+ break;
+ }
+ case 120:
+ {
+ PIXEL00_21
+ PIXEL01_22
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_0
+ }
+ else
+ {
+ PIXEL10_20
+ }
+ PIXEL11_10
+ break;
+ }
+ case 75:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_0
+ }
+ else
+ {
+ PIXEL00_20
+ }
+ PIXEL01_21
+ PIXEL10_10
+ PIXEL11_22
+ break;
+ }
+ case 29:
+ {
+ PIXEL00_12
+ PIXEL01_11
+ PIXEL10_22
+ PIXEL11_21
+ break;
+ }
+ case 198:
+ {
+ PIXEL00_22
+ PIXEL01_12
+ PIXEL10_21
+ PIXEL11_11
+ break;
+ }
+ case 184:
+ {
+ PIXEL00_21
+ PIXEL01_22
+ PIXEL10_11
+ PIXEL11_12
+ break;
+ }
+ case 99:
+ {
+ PIXEL00_11
+ PIXEL01_21
+ PIXEL10_12
+ PIXEL11_22
+ break;
+ }
+ case 57:
+ {
+ PIXEL00_12
+ PIXEL01_22
+ PIXEL10_11
+ PIXEL11_21
+ break;
+ }
+ case 71:
+ {
+ PIXEL00_11
+ PIXEL01_12
+ PIXEL10_21
+ PIXEL11_22
+ break;
+ }
+ case 156:
+ {
+ PIXEL00_21
+ PIXEL01_11
+ PIXEL10_22
+ PIXEL11_12
+ break;
+ }
+ case 226:
+ {
+ PIXEL00_22
+ PIXEL01_21
+ PIXEL10_12
+ PIXEL11_11
+ break;
+ }
+ case 60:
+ {
+ PIXEL00_21
+ PIXEL01_11
+ PIXEL10_11
+ PIXEL11_21
+ break;
+ }
+ case 195:
+ {
+ PIXEL00_11
+ PIXEL01_21
+ PIXEL10_21
+ PIXEL11_11
+ break;
+ }
+ case 102:
+ {
+ PIXEL00_22
+ PIXEL01_12
+ PIXEL10_12
+ PIXEL11_22
+ break;
+ }
+ case 153:
+ {
+ PIXEL00_12
+ PIXEL01_22
+ PIXEL10_22
+ PIXEL11_12
+ break;
+ }
+ case 58:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_10
+ }
+ else
+ {
+ PIXEL00_70
+ }
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_10
+ }
+ else
+ {
+ PIXEL01_70
+ }
+ PIXEL10_11
+ PIXEL11_21
+ break;
+ }
+ case 83:
+ {
+ PIXEL00_11
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_10
+ }
+ else
+ {
+ PIXEL01_70
+ }
+ PIXEL10_21
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_10
+ }
+ else
+ {
+ PIXEL11_70
+ }
+ break;
+ }
+ case 92:
+ {
+ PIXEL00_21
+ PIXEL01_11
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_10
+ }
+ else
+ {
+ PIXEL10_70
+ }
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_10
+ }
+ else
+ {
+ PIXEL11_70
+ }
+ break;
+ }
+ case 202:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_10
+ }
+ else
+ {
+ PIXEL00_70
+ }
+ PIXEL01_21
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_10
+ }
+ else
+ {
+ PIXEL10_70
+ }
+ PIXEL11_11
+ break;
+ }
+ case 78:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_10
+ }
+ else
+ {
+ PIXEL00_70
+ }
+ PIXEL01_12
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_10
+ }
+ else
+ {
+ PIXEL10_70
+ }
+ PIXEL11_22
+ break;
+ }
+ case 154:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_10
+ }
+ else
+ {
+ PIXEL00_70
+ }
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_10
+ }
+ else
+ {
+ PIXEL01_70
+ }
+ PIXEL10_22
+ PIXEL11_12
+ break;
+ }
+ case 114:
+ {
+ PIXEL00_22
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_10
+ }
+ else
+ {
+ PIXEL01_70
+ }
+ PIXEL10_12
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_10
+ }
+ else
+ {
+ PIXEL11_70
+ }
+ break;
+ }
+ case 89:
+ {
+ PIXEL00_12
+ PIXEL01_22
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_10
+ }
+ else
+ {
+ PIXEL10_70
+ }
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_10
+ }
+ else
+ {
+ PIXEL11_70
+ }
+ break;
+ }
+ case 90:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_10
+ }
+ else
+ {
+ PIXEL00_70
+ }
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_10
+ }
+ else
+ {
+ PIXEL01_70
+ }
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_10
+ }
+ else
+ {
+ PIXEL10_70
+ }
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_10
+ }
+ else
+ {
+ PIXEL11_70
+ }
+ break;
+ }
+ case 55:
+ case 23:
+ {
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL00_11
+ PIXEL01_0
+ }
+ else
+ {
+ PIXEL00_60
+ PIXEL01_90
+ }
+ PIXEL10_20
+ PIXEL11_21
+ break;
+ }
+ case 182:
+ case 150:
+ {
+ PIXEL00_22
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_0
+ PIXEL11_12
+ }
+ else
+ {
+ PIXEL01_90
+ PIXEL11_61
+ }
+ PIXEL10_20
+ break;
+ }
+ case 213:
+ case 212:
+ {
+ PIXEL00_20
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL01_11
+ PIXEL11_0
+ }
+ else
+ {
+ PIXEL01_60
+ PIXEL11_90
+ }
+ PIXEL10_21
+ break;
+ }
+ case 241:
+ case 240:
+ {
+ PIXEL00_20
+ PIXEL01_22
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL10_12
+ PIXEL11_0
+ }
+ else
+ {
+ PIXEL10_61
+ PIXEL11_90
+ }
+ break;
+ }
+ case 236:
+ case 232:
+ {
+ PIXEL00_21
+ PIXEL01_20
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_0
+ PIXEL11_11
+ }
+ else
+ {
+ PIXEL10_90
+ PIXEL11_60
+ }
+ break;
+ }
+ case 109:
+ case 105:
+ {
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL00_12
+ PIXEL10_0
+ }
+ else
+ {
+ PIXEL00_61
+ PIXEL10_90
+ }
+ PIXEL01_20
+ PIXEL11_22
+ break;
+ }
+ case 171:
+ case 43:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_0
+ PIXEL10_11
+ }
+ else
+ {
+ PIXEL00_90
+ PIXEL10_60
+ }
+ PIXEL01_21
+ PIXEL11_20
+ break;
+ }
+ case 143:
+ case 15:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_0
+ PIXEL01_12
+ }
+ else
+ {
+ PIXEL00_90
+ PIXEL01_61
+ }
+ PIXEL10_22
+ PIXEL11_20
+ break;
+ }
+ case 124:
+ {
+ PIXEL00_21
+ PIXEL01_11
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_0
+ }
+ else
+ {
+ PIXEL10_20
+ }
+ PIXEL11_10
+ break;
+ }
+ case 203:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_0
+ }
+ else
+ {
+ PIXEL00_20
+ }
+ PIXEL01_21
+ PIXEL10_10
+ PIXEL11_11
+ break;
+ }
+ case 62:
+ {
+ PIXEL00_10
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_0
+ }
+ else
+ {
+ PIXEL01_20
+ }
+ PIXEL10_11
+ PIXEL11_21
+ break;
+ }
+ case 211:
+ {
+ PIXEL00_11
+ PIXEL01_10
+ PIXEL10_21
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_0
+ }
+ else
+ {
+ PIXEL11_20
+ }
+ break;
+ }
+ case 118:
+ {
+ PIXEL00_22
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_0
+ }
+ else
+ {
+ PIXEL01_20
+ }
+ PIXEL10_12
+ PIXEL11_10
+ break;
+ }
+ case 217:
+ {
+ PIXEL00_12
+ PIXEL01_22
+ PIXEL10_10
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_0
+ }
+ else
+ {
+ PIXEL11_20
+ }
+ break;
+ }
+ case 110:
+ {
+ PIXEL00_10
+ PIXEL01_12
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_0
+ }
+ else
+ {
+ PIXEL10_20
+ }
+ PIXEL11_22
+ break;
+ }
+ case 155:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_0
+ }
+ else
+ {
+ PIXEL00_20
+ }
+ PIXEL01_10
+ PIXEL10_22
+ PIXEL11_12
+ break;
+ }
+ case 188:
+ {
+ PIXEL00_21
+ PIXEL01_11
+ PIXEL10_11
+ PIXEL11_12
+ break;
+ }
+ case 185:
+ {
+ PIXEL00_12
+ PIXEL01_22
+ PIXEL10_11
+ PIXEL11_12
+ break;
+ }
+ case 61:
+ {
+ PIXEL00_12
+ PIXEL01_11
+ PIXEL10_11
+ PIXEL11_21
+ break;
+ }
+ case 157:
+ {
+ PIXEL00_12
+ PIXEL01_11
+ PIXEL10_22
+ PIXEL11_12
+ break;
+ }
+ case 103:
+ {
+ PIXEL00_11
+ PIXEL01_12
+ PIXEL10_12
+ PIXEL11_22
+ break;
+ }
+ case 227:
+ {
+ PIXEL00_11
+ PIXEL01_21
+ PIXEL10_12
+ PIXEL11_11
+ break;
+ }
+ case 230:
+ {
+ PIXEL00_22
+ PIXEL01_12
+ PIXEL10_12
+ PIXEL11_11
+ break;
+ }
+ case 199:
+ {
+ PIXEL00_11
+ PIXEL01_12
+ PIXEL10_21
+ PIXEL11_11
+ break;
+ }
+ case 220:
+ {
+ PIXEL00_21
+ PIXEL01_11
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_10
+ }
+ else
+ {
+ PIXEL10_70
+ }
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_0
+ }
+ else
+ {
+ PIXEL11_20
+ }
+ break;
+ }
+ case 158:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_10
+ }
+ else
+ {
+ PIXEL00_70
+ }
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_0
+ }
+ else
+ {
+ PIXEL01_20
+ }
+ PIXEL10_22
+ PIXEL11_12
+ break;
+ }
+ case 234:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_10
+ }
+ else
+ {
+ PIXEL00_70
+ }
+ PIXEL01_21
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_0
+ }
+ else
+ {
+ PIXEL10_20
+ }
+ PIXEL11_11
+ break;
+ }
+ case 242:
+ {
+ PIXEL00_22
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_10
+ }
+ else
+ {
+ PIXEL01_70
+ }
+ PIXEL10_12
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_0
+ }
+ else
+ {
+ PIXEL11_20
+ }
+ break;
+ }
+ case 59:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_0
+ }
+ else
+ {
+ PIXEL00_20
+ }
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_10
+ }
+ else
+ {
+ PIXEL01_70
+ }
+ PIXEL10_11
+ PIXEL11_21
+ break;
+ }
+ case 121:
+ {
+ PIXEL00_12
+ PIXEL01_22
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_0
+ }
+ else
+ {
+ PIXEL10_20
+ }
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_10
+ }
+ else
+ {
+ PIXEL11_70
+ }
+ break;
+ }
+ case 87:
+ {
+ PIXEL00_11
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_0
+ }
+ else
+ {
+ PIXEL01_20
+ }
+ PIXEL10_21
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_10
+ }
+ else
+ {
+ PIXEL11_70
+ }
+ break;
+ }
+ case 79:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_0
+ }
+ else
+ {
+ PIXEL00_20
+ }
+ PIXEL01_12
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_10
+ }
+ else
+ {
+ PIXEL10_70
+ }
+ PIXEL11_22
+ break;
+ }
+ case 122:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_10
+ }
+ else
+ {
+ PIXEL00_70
+ }
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_10
+ }
+ else
+ {
+ PIXEL01_70
+ }
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_0
+ }
+ else
+ {
+ PIXEL10_20
+ }
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_10
+ }
+ else
+ {
+ PIXEL11_70
+ }
+ break;
+ }
+ case 94:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_10
+ }
+ else
+ {
+ PIXEL00_70
+ }
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_0
+ }
+ else
+ {
+ PIXEL01_20
+ }
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_10
+ }
+ else
+ {
+ PIXEL10_70
+ }
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_10
+ }
+ else
+ {
+ PIXEL11_70
+ }
+ break;
+ }
+ case 218:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_10
+ }
+ else
+ {
+ PIXEL00_70
+ }
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_10
+ }
+ else
+ {
+ PIXEL01_70
+ }
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_10
+ }
+ else
+ {
+ PIXEL10_70
+ }
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_0
+ }
+ else
+ {
+ PIXEL11_20
+ }
+ break;
+ }
+ case 91:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_0
+ }
+ else
+ {
+ PIXEL00_20
+ }
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_10
+ }
+ else
+ {
+ PIXEL01_70
+ }
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_10
+ }
+ else
+ {
+ PIXEL10_70
+ }
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_10
+ }
+ else
+ {
+ PIXEL11_70
+ }
+ break;
+ }
+ case 229:
+ {
+ PIXEL00_20
+ PIXEL01_20
+ PIXEL10_12
+ PIXEL11_11
+ break;
+ }
+ case 167:
+ {
+ PIXEL00_11
+ PIXEL01_12
+ PIXEL10_20
+ PIXEL11_20
+ break;
+ }
+ case 173:
+ {
+ PIXEL00_12
+ PIXEL01_20
+ PIXEL10_11
+ PIXEL11_20
+ break;
+ }
+ case 181:
+ {
+ PIXEL00_20
+ PIXEL01_11
+ PIXEL10_20
+ PIXEL11_12
+ break;
+ }
+ case 186:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_10
+ }
+ else
+ {
+ PIXEL00_70
+ }
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_10
+ }
+ else
+ {
+ PIXEL01_70
+ }
+ PIXEL10_11
+ PIXEL11_12
+ break;
+ }
+ case 115:
+ {
+ PIXEL00_11
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_10
+ }
+ else
+ {
+ PIXEL01_70
+ }
+ PIXEL10_12
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_10
+ }
+ else
+ {
+ PIXEL11_70
+ }
+ break;
+ }
+ case 93:
+ {
+ PIXEL00_12
+ PIXEL01_11
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_10
+ }
+ else
+ {
+ PIXEL10_70
+ }
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_10
+ }
+ else
+ {
+ PIXEL11_70
+ }
+ break;
+ }
+ case 206:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_10
+ }
+ else
+ {
+ PIXEL00_70
+ }
+ PIXEL01_12
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_10
+ }
+ else
+ {
+ PIXEL10_70
+ }
+ PIXEL11_11
+ break;
+ }
+ case 205:
+ case 201:
+ {
+ PIXEL00_12
+ PIXEL01_20
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_10
+ }
+ else
+ {
+ PIXEL10_70
+ }
+ PIXEL11_11
+ break;
+ }
+ case 174:
+ case 46:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_10
+ }
+ else
+ {
+ PIXEL00_70
+ }
+ PIXEL01_12
+ PIXEL10_11
+ PIXEL11_20
+ break;
+ }
+ case 179:
+ case 147:
+ {
+ PIXEL00_11
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_10
+ }
+ else
+ {
+ PIXEL01_70
+ }
+ PIXEL10_20
+ PIXEL11_12
+ break;
+ }
+ case 117:
+ case 116:
+ {
+ PIXEL00_20
+ PIXEL01_11
+ PIXEL10_12
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_10
+ }
+ else
+ {
+ PIXEL11_70
+ }
+ break;
+ }
+ case 189:
+ {
+ PIXEL00_12
+ PIXEL01_11
+ PIXEL10_11
+ PIXEL11_12
+ break;
+ }
+ case 231:
+ {
+ PIXEL00_11
+ PIXEL01_12
+ PIXEL10_12
+ PIXEL11_11
+ break;
+ }
+ case 126:
+ {
+ PIXEL00_10
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_0
+ }
+ else
+ {
+ PIXEL01_20
+ }
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_0
+ }
+ else
+ {
+ PIXEL10_20
+ }
+ PIXEL11_10
+ break;
+ }
+ case 219:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_0
+ }
+ else
+ {
+ PIXEL00_20
+ }
+ PIXEL01_10
+ PIXEL10_10
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_0
+ }
+ else
+ {
+ PIXEL11_20
+ }
+ break;
+ }
+ case 125:
+ {
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL00_12
+ PIXEL10_0
+ }
+ else
+ {
+ PIXEL00_61
+ PIXEL10_90
+ }
+ PIXEL01_11
+ PIXEL11_10
+ break;
+ }
+ case 221:
+ {
+ PIXEL00_12
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL01_11
+ PIXEL11_0
+ }
+ else
+ {
+ PIXEL01_60
+ PIXEL11_90
+ }
+ PIXEL10_10
+ break;
+ }
+ case 207:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_0
+ PIXEL01_12
+ }
+ else
+ {
+ PIXEL00_90
+ PIXEL01_61
+ }
+ PIXEL10_10
+ PIXEL11_11
+ break;
+ }
+ case 238:
+ {
+ PIXEL00_10
+ PIXEL01_12
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_0
+ PIXEL11_11
+ }
+ else
+ {
+ PIXEL10_90
+ PIXEL11_60
+ }
+ break;
+ }
+ case 190:
+ {
+ PIXEL00_10
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_0
+ PIXEL11_12
+ }
+ else
+ {
+ PIXEL01_90
+ PIXEL11_61
+ }
+ PIXEL10_11
+ break;
+ }
+ case 187:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_0
+ PIXEL10_11
+ }
+ else
+ {
+ PIXEL00_90
+ PIXEL10_60
+ }
+ PIXEL01_10
+ PIXEL11_12
+ break;
+ }
+ case 243:
+ {
+ PIXEL00_11
+ PIXEL01_10
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL10_12
+ PIXEL11_0
+ }
+ else
+ {
+ PIXEL10_61
+ PIXEL11_90
+ }
+ break;
+ }
+ case 119:
+ {
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL00_11
+ PIXEL01_0
+ }
+ else
+ {
+ PIXEL00_60
+ PIXEL01_90
+ }
+ PIXEL10_12
+ PIXEL11_10
+ break;
+ }
+ case 237:
+ case 233:
+ {
+ PIXEL00_12
+ PIXEL01_20
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_0
+ }
+ else
+ {
+ PIXEL10_100
+ }
+ PIXEL11_11
+ break;
+ }
+ case 175:
+ case 47:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_0
+ }
+ else
+ {
+ PIXEL00_100
+ }
+ PIXEL01_12
+ PIXEL10_11
+ PIXEL11_20
+ break;
+ }
+ case 183:
+ case 151:
+ {
+ PIXEL00_11
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_0
+ }
+ else
+ {
+ PIXEL01_100
+ }
+ PIXEL10_20
+ PIXEL11_12
+ break;
+ }
+ case 245:
+ case 244:
+ {
+ PIXEL00_20
+ PIXEL01_11
+ PIXEL10_12
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_0
+ }
+ else
+ {
+ PIXEL11_100
+ }
+ break;
+ }
+ case 250:
+ {
+ PIXEL00_10
+ PIXEL01_10
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_0
+ }
+ else
+ {
+ PIXEL10_20
+ }
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_0
+ }
+ else
+ {
+ PIXEL11_20
+ }
+ break;
+ }
+ case 123:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_0
+ }
+ else
+ {
+ PIXEL00_20
+ }
+ PIXEL01_10
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_0
+ }
+ else
+ {
+ PIXEL10_20
+ }
+ PIXEL11_10
+ break;
+ }
+ case 95:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_0
+ }
+ else
+ {
+ PIXEL00_20
+ }
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_0
+ }
+ else
+ {
+ PIXEL01_20
+ }
+ PIXEL10_10
+ PIXEL11_10
+ break;
+ }
+ case 222:
+ {
+ PIXEL00_10
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_0
+ }
+ else
+ {
+ PIXEL01_20
+ }
+ PIXEL10_10
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_0
+ }
+ else
+ {
+ PIXEL11_20
+ }
+ break;
+ }
+ case 252:
+ {
+ PIXEL00_21
+ PIXEL01_11
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_0
+ }
+ else
+ {
+ PIXEL10_20
+ }
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_0
+ }
+ else
+ {
+ PIXEL11_100
+ }
+ break;
+ }
+ case 249:
+ {
+ PIXEL00_12
+ PIXEL01_22
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_0
+ }
+ else
+ {
+ PIXEL10_100
+ }
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_0
+ }
+ else
+ {
+ PIXEL11_20
+ }
+ break;
+ }
+ case 235:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_0
+ }
+ else
+ {
+ PIXEL00_20
+ }
+ PIXEL01_21
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_0
+ }
+ else
+ {
+ PIXEL10_100
+ }
+ PIXEL11_11
+ break;
+ }
+ case 111:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_0
+ }
+ else
+ {
+ PIXEL00_100
+ }
+ PIXEL01_12
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_0
+ }
+ else
+ {
+ PIXEL10_20
+ }
+ PIXEL11_22
+ break;
+ }
+ case 63:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_0
+ }
+ else
+ {
+ PIXEL00_100
+ }
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_0
+ }
+ else
+ {
+ PIXEL01_20
+ }
+ PIXEL10_11
+ PIXEL11_21
+ break;
+ }
+ case 159:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_0
+ }
+ else
+ {
+ PIXEL00_20
+ }
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_0
+ }
+ else
+ {
+ PIXEL01_100
+ }
+ PIXEL10_22
+ PIXEL11_12
+ break;
+ }
+ case 215:
+ {
+ PIXEL00_11
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_0
+ }
+ else
+ {
+ PIXEL01_100
+ }
+ PIXEL10_21
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_0
+ }
+ else
+ {
+ PIXEL11_20
+ }
+ break;
+ }
+ case 246:
+ {
+ PIXEL00_22
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_0
+ }
+ else
+ {
+ PIXEL01_20
+ }
+ PIXEL10_12
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_0
+ }
+ else
+ {
+ PIXEL11_100
+ }
+ break;
+ }
+ case 254:
+ {
+ PIXEL00_10
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_0
+ }
+ else
+ {
+ PIXEL01_20
+ }
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_0
+ }
+ else
+ {
+ PIXEL10_20
+ }
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_0
+ }
+ else
+ {
+ PIXEL11_100
+ }
+ break;
+ }
+ case 253:
+ {
+ PIXEL00_12
+ PIXEL01_11
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_0
+ }
+ else
+ {
+ PIXEL10_100
+ }
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_0
+ }
+ else
+ {
+ PIXEL11_100
+ }
+ break;
+ }
+ case 251:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_0
+ }
+ else
+ {
+ PIXEL00_20
+ }
+ PIXEL01_10
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_0
+ }
+ else
+ {
+ PIXEL10_100
+ }
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_0
+ }
+ else
+ {
+ PIXEL11_20
+ }
+ break;
+ }
+ case 239:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_0
+ }
+ else
+ {
+ PIXEL00_100
+ }
+ PIXEL01_12
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_0
+ }
+ else
+ {
+ PIXEL10_100
+ }
+ PIXEL11_11
+ break;
+ }
+ case 127:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_0
+ }
+ else
+ {
+ PIXEL00_100
+ }
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_0
+ }
+ else
+ {
+ PIXEL01_20
+ }
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_0
+ }
+ else
+ {
+ PIXEL10_20
+ }
+ PIXEL11_10
+ break;
+ }
+ case 191:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_0
+ }
+ else
+ {
+ PIXEL00_100
+ }
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_0
+ }
+ else
+ {
+ PIXEL01_100
+ }
+ PIXEL10_11
+ PIXEL11_12
+ break;
+ }
+ case 223:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_0
+ }
+ else
+ {
+ PIXEL00_20
+ }
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_0
+ }
+ else
+ {
+ PIXEL01_100
+ }
+ PIXEL10_10
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_0
+ }
+ else
+ {
+ PIXEL11_20
+ }
+ break;
+ }
+ case 247:
+ {
+ PIXEL00_11
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_0
+ }
+ else
+ {
+ PIXEL01_100
+ }
+ PIXEL10_12
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_0
+ }
+ else
+ {
+ PIXEL11_100
+ }
+ break;
+ }
+ case 255:
+ {
+ if (Diff(w[4], w[2]))
+ {
+ PIXEL00_0
+ }
+ else
+ {
+ PIXEL00_100
+ }
+ if (Diff(w[2], w[6]))
+ {
+ PIXEL01_0
+ }
+ else
+ {
+ PIXEL01_100
+ }
+ if (Diff(w[8], w[4]))
+ {
+ PIXEL10_0
+ }
+ else
+ {
+ PIXEL10_100
+ }
+ if (Diff(w[6], w[8]))
+ {
+ PIXEL11_0
+ }
+ else
+ {
+ PIXEL11_100
+ }
+ break;
+ }
}
pIn+=2;
pOut+=8;
write_log ("PARAPORT: GetProcAddress() failed\n");
paraport_free ();
}
- write_log("PARAPORT:");
+ write_log ("PARAPORT:");
for (i = 0; i < 4 ; i++) {
sprintf (tmp, "LPT%d", i + 1);
pp = pp_openport (tmp);
if (pp != INVALID_HANDLE_VALUE) {
mask |= 1 << i;
pp_closeport (pp);
- write_log(" %s", tmp);
+ write_log (" %s", tmp);
}
pp = 0;
}
if (!mask)
write_log ("no parallel ports detected");
- write_log("\n");
+ write_log ("\n");
return mask;
}
return 0;
}
strcpy (oldport, port);
- write_log("PARAPORT: port '%s' opened\n", port);
+ write_log ("PARAPORT: port '%s' opened\n", port);
memset (c, 0, sizeof (PARAPORT_CYCLE));
c[0].MaskControl = PARAPORT_MASK_CONTROL | PARAPORT_MASK_CONTROL_DIRECTION;
c[0].Control = PARAPORT_MASK_CONTROL_INIT | PARAPORT_MASK_CONTROL_DIRECTION;
if (!pp_executecycle (pport, c, 1)) {
- write_log ("PARAPORT: init executeCycle failed\n");
+ write_log ("PARAPORT: init executeCycle failed\n");
}
return 1;
}
-#include <windows.h>
+#include <windows.h>
#include <stdio.h>
#include <conio.h>
DWORD ret, avail;
for (;;) {
- Sleep(50);
+ Sleep(50);
if (!threadmode_in)
continue;
threadmode_out = 1;
return 0;
}
if (avail > 0) {
- if (!ReadFile(p, buf, sizeof buf, &ret, NULL)) {
+ if (!ReadFile(p, buf, sizeof buf, &ret, NULL)) {
printf ("ReadFile() failed, err=%d\n", GetLastError());
return 0;
}
}
}
-int main(int argc, char *argv[])
-{
+int main(int argc, char *argv[])
+{
DWORD mode;
DWORD tid;
static struct uae_input_device_kbr_default keytrans[] = {
{ DIK_ESCAPE, INPUTEVENT_KEY_ESC },
-
+
{ DIK_F1, INPUTEVENT_KEY_F1 },
{ DIK_F2, INPUTEVENT_KEY_F2 },
{ DIK_F3, INPUTEVENT_KEY_F3 },
int e = 0;
switch (scancode)
{
- case DIK_UP:
- if (specialpressed())
+ case DIK_UP:
+ if (specialpressed())
e = INPUTEVENT_KEY_CDTV_PLAYPAUSE;
break;
case DIK_DOWN:
if (scancode == specialkeycode())
return;
- //write_log( "keyboard = %d scancode = 0x%02.2x state = %d\n", keyboard, scancode, newstate );
+ //write_log ( "keyboard = %d scancode = 0x%02.2x state = %d\n", keyboard, scancode, newstate );
if (newstate) {
switch (scancode)
{
octx.index = 0;
ret = lgLcdOpen(&octx);
if (ret != ERROR_SUCCESS) {
- write_log("LCD: lgLcdOpen() returned %d\n", ret);
+ write_log ("LCD: lgLcdOpen() returned %d\n", ret);
lcd_close();
return 0;
}
SelectObject(dc, bmp);
GetObject (bmp, sizeof (binfo), &binfo);
for (y = 0; y < binfo.bmHeight; y++) {
- for (x = 0; x < binfo.bmWidth; x++) {
+ for (x = 0; x < binfo.bmWidth; x++) {
bitmap[y * binfo.bmWidth + x] = GetPixel(dc, x, y) == 0 ? 0xff : 0;
}
}
memcpy (origbitmap, bitmap, desc.Width * desc.Height);
DeleteDC(dc);
- write_log("LCD: Logitech LCD system initialized\n");
+ write_log ("LCD: Logitech LCD system initialized\n");
return 1;
}
return;
if (led < 0) {
- lgLcdUpdateBitmap(device, lbh, LGLCD_PRIORITY_IDLE_NO_SHOW);
+ lgLcdUpdateBitmap(device, lbh, LGLCD_PRIORITY_IDLE_NO_SHOW);
return;
}
if (led >= 1 && led <= 4) {
x = 23 + (led - 1) * 40;
y = 17;
- track = gui_data.drive_track[led - 1];
+ track = gui_data.drive_track[led - 1];
if (gui_data.drive_disabled[led - 1])
track = -1;
putnumbers(x, y, track, on);
} else if (led == 5) {
dorect(&coords[4 * 1], on);
} else if (led == 6) {
- dorect(&coords[4 * 0], on);
+ dorect(&coords[4 * 0], on);
} else if (led == 7) {
y = 2;
x = 125;
#ifndef __MACCESS_H__
#define __MACCESS_H__
- /*
+ /*
* UAE - The Un*x Amiga Emulator
- *
+ *
* Memory access functions
*
* Copyright 1996 Bernd Schmidt
STATIC_INLINE uae_u16 do_get_mem_word(uae_u16 *a)
{
uae_u8 *b = (uae_u8 *)a;
-
+
return (*b << 8) | (*(b+1));
}
{
#if !defined(X86_MSVC_ASSEMBLY)
uae_u8 *b = (uae_u8 *)a;
-
+
*b = v >> 24;
- *(b+1) = v >> 16;
+ *(b+1) = v >> 16;
*(b+2) = v >> 8;
*(b+3) = v;
#else
STATIC_INLINE void do_put_mem_word(uae_u16 *a, uae_u16 v)
{
uae_u8 *b = (uae_u8 *)a;
-
+
*b = v >> 8;
*(b+1) = (uae_u8)v;
}
- /*
+ /*
* UAE - The Un*x Amiga Emulator
- *
+ *
* Miscellaneous machine dependent support functions and definitions
*
* Copyright 1996 Bernd Schmidt
*wrd2 = longarray[1];
*wrd3 = longarray[0]; // little endian
if (!srcarray[0] && (srcarray[1]==0x7ff00000 || srcarray[1]==0xfff00000))
- *wrd2 = 0; // The MSB of the mantissa was set wrongly for infinity, causing a NaN
+ *wrd2 = 0; // The MSB of the mantissa was set wrongly for infinity, causing a NaN
}
#endif
#endif /* X86_MSVC_ASSEMBLY */
double frac;
if ((wrd1 & 0x7fff0000) == 0 && wrd2 == 0 && wrd3 == 0)
- return 0.0;
+ return 0.0;
frac = ((double)wrd2 + ((double)wrd3 / twoto32)) / 2147483648.0;
if (wrd1 & 0x80000000)
- frac = -frac;
+ frac = -frac;
return ldexp (frac, ((wrd1 >> 16) & 0x7fff) - 16383);
}
#endif
double frac;
if (src == 0.0) {
- *wrd1 = 0;
- *wrd2 = 0;
- *wrd3 = 0;
- return;
+ *wrd1 = 0;
+ *wrd2 = 0;
+ *wrd3 = 0;
+ return;
}
if (src < 0) {
- *wrd1 = 0x80000000;
- src = -src;
+ *wrd1 = 0x80000000;
+ src = -src;
} else {
- *wrd1 = 0;
+ *wrd1 = 0;
}
frac = frexp (src, &expon);
frac += 0.5 / (twoto32 * twoto32);
if (frac >= 1.0) {
- frac /= 2.0;
- expon++;
+ frac /= 2.0;
+ expon++;
}
*wrd1 |= (((expon + 16383 - 1) & 0x7fff) << 16);
*wrd2 = (uae_u32) (frac * twoto32);
* MODULE: midi.c
*
* DESCRIPTION: MIDI-handling code for MIDI-I/O. Parses the MIDI-output stream and
- * sends system-exclusive MIDI-messages out using midiOutLongMsg(), while using
+ * sends system-exclusive MIDI-messages out using midiOutLongMsg(), while using
* midiOutShortMsg() for normal MIDI-messages. MIDI-input is passed byte-for-byte
* up to the Amiga's serial-port.
*
* 1999.09.05 1.0 Brian King - creation
* 2000.01.30 1.1 Brian King - addition of midi-input
* 2002.05.xx 1.2 Bernd Roesch - sysex in/MTC/Song Position pointer add
- */
+ */
#include "sysconfig.h"
#include <windows.h>
#define TRACE(x)
#endif
#define MIDI_INBUFFERS 800 //use 13 MB Buffer with this settings
- //on my system it work ok with 10 but who
+ //on my system it work ok with 10 but who
//know when windows rest for a while
//with sysex size of 40 win can 8 sec sleep
#define INBUFFLEN 16000 //if this is not enough a warning come
}
outbufferselect = 0;
} else {
- write_log("MIDI: ERROR - MidiOutAlloc() called twice?\n");
+ write_log ("MIDI: ERROR - MidiOutAlloc() called twice?\n");
}
return out_allocated;
}
out->dwFlags = 0;
if((result = midiOutPrepareHeader(outHandle, out, sizeof( MIDIHDR)))) {
- write_log( "MIDI: error %s / %d\n", getmidiouterr(err, result), result);
+ write_log ( "MIDI: error %s / %d\n", getmidiouterr(err, result), result);
result = 0;
}
return result;
}
}
} else {
- write_log("MIDI: ERROR - MidiInAlloc() called twice?\n");
+ write_log ("MIDI: ERROR - MidiInAlloc() called twice?\n");
}
return in_allocated;
}
only_one_time = 0;
}
-static unsigned char plen[128] = {
+static unsigned char plen[128] = {
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
if(data >= MIDI_CLOCK) {
switch(data)
{
- case MIDI_CLOCK:
+ case MIDI_CLOCK:
TRACE(( "MIDI: MIDI_CLOCK\n" ));
break;
- case MIDI_START:
+ case MIDI_START:
TRACE(( "MIDI: MIDI_START\n" ));
break;
- case MIDI_CONTINUE:
+ case MIDI_CONTINUE:
TRACE(( "MIDI: MIDI_CONTINUE\n" ));
break;
- case MIDI_STOP:
+ case MIDI_STOP:
TRACE(( "MIDI: MIDI_STOP\n" ));
break;
default:
midiOutShortMsg(outHandle, shortMsg);
}
} else { // handle input-data
-
+
}
return result;
}
* PURPOSE: Translate Midi in messages to raw serial data
* NOTES: Sysex in not supported
-
+
*/
-
+
static unsigned char midibuf[BUFFLEN];
static long midi_inptr = 0, midi_inlast = 0;
static void add1byte(DWORD_PTR w) //put 1 Byte to Midibuffer
{
if(midi_inlast >= BUFFLEN - 10) {
- TRACE(("add1byte buffer full %d %d (%02.2X)\n", midi_inlast, midi_inptr, w));
- return;
+ TRACE(("add1byte buffer full %d %d (%02.2X)\n", midi_inlast, midi_inptr, w));
+ return;
}
midibuf[midi_inlast++] = (uae_u8)w;
}
static void add2byte(DWORD_PTR w) //put 2 Byte to Midibuffer
{
if(midi_inlast >= BUFFLEN - 10) {
- TRACE(("add2byte buffer full %d %d (%04.4X)\n", midi_inlast, midi_inptr, w));
- return;
+ TRACE(("add2byte buffer full %d %d (%04.4X)\n", midi_inlast, midi_inptr, w));
+ return;
}
midibuf[midi_inlast++] = (uae_u8)w;
w = w >> 8;
static void add3byte(DWORD_PTR w) //put 3 Byte to Midibuffer
{
if(midi_inlast >= BUFFLEN - 10) {
- TRACE(("add3byte buffer full %d %d (%08.8X)\n", midi_inlast, midi_inptr, w));
- return;
+ TRACE(("add3byte buffer full %d %d (%08.8X)\n", midi_inlast, midi_inptr, w));
+ return;
}
midibuf[midi_inlast++] = (uae_u8)w;
w = w >> 8;
int ismidibyte(void)
{
- if (midi_inptr < midi_inlast)
+ if (midi_inptr < midi_inlast)
return 1;
return 0;
-}
+}
LONG getmidibyte(void) //return midibyte or -1 if none
-{
+{
int i;
LONG rv;
overflow = 0;
}
TRACE(("getmidibyte(%02.2X)\n", midibuf[midi_inptr]));
- if (midibuf[midi_inptr] >= 0xf0) { // only check for free buffers if status sysex
+ if (midibuf[midi_inptr] >= 0xf0) { // only check for free buffers if status sysex
for (i = 0;i < MIDI_INBUFFERS;i++) {
if (midiin[i].dwFlags == (MHDR_DONE|MHDR_PREPARED)) {
// add a buffer if one is free
LeaveCriticalSection(&cs_proc);
midiInAddBuffer(inHandle, &midiin[i], sizeof(MIDIHDR));
EnterCriticalSection(&cs_proc);
- }
+ }
}
}
rv = -1;
- if (midi_inptr < midi_inlast)
+ if (midi_inptr < midi_inlast)
rv = midibuf[midi_inptr++];
if (midi_inptr >= midi_inlast)
midi_inptr = midi_inlast = 0;
{
EnterCriticalSection (&cs_proc);
if(wMsg == MIM_ERROR) {
- TRACE(("MIDI Data Lost\n"));
+ TRACE(("MIDI Data Lost\n"));
}
if(wMsg == MIM_LONGDATA) {
- LPMIDIHDR midiin = (LPMIDIHDR)dwParam1;
- static long synum;
- TRACE(("MIM_LONGDATA bytes=%d ts=%u\n", midiin->dwBytesRecorded, dwParam2));
- if (exitin == 1)
+ LPMIDIHDR midiin = (LPMIDIHDR)dwParam1;
+ static long synum;
+ TRACE(("MIM_LONGDATA bytes=%d ts=%u\n", midiin->dwBytesRecorded, dwParam2));
+ if (exitin == 1)
goto end; //for safeness midi want close
if ((midi_inlast + midiin->dwBytesRecorded) >= (BUFFLEN-6)) {
overflow = 1;
}
if(wMsg == MM_MIM_DATA || wMsg == MM_MIM_MOREDATA) {
- BYTE state = (BYTE)dwParam1;
+ BYTE state = (BYTE)dwParam1;
TRACE(("%s %08.8X\n", wMsg == MM_MIM_DATA ? "MM_MIM_DATA" : "MM_MIM_MOREDATA", dwParam1));
if(state == 254)
goto end;
if(state < 0xf0)
state = state & 0xf0;
switch (state)
- {
+ {
case 0x80: //Note OFF
add3byte(dwParam1);
break;
{
unsigned long result = 0, i;
char err[MAX_DPATH];
-
+
if((result = midiOutOpen(&outHandle, currprefs.win32_midioutdev, 0, 0,CALLBACK_NULL))) {
- write_log("MIDI OUT: error %s / %d while opening port %d\n", getmidiouterr(err, result), result, currprefs.win32_midioutdev);
+ write_log ("MIDI OUT: error %s / %d while opening port %d\n", getmidiouterr(err, result), result, currprefs.win32_midioutdev);
result = 0;
} else {
InitializeCriticalSection(&cs_proc);
// We don't need input for output...
- if((currprefs.win32_midiindev >= 0) &&
+ if((currprefs.win32_midiindev >= 0) &&
(result = midiInOpen( &inHandle, currprefs.win32_midiindev, (DWORD_PTR)MidiInProc, 0, CALLBACK_FUNCTION|MIDI_IO_STATUS))) {
- write_log( "MIDI IN: error %s / %d while opening port %d\n", getmidiinerr(err, result), result, currprefs.win32_midiindev);
+ write_log ( "MIDI IN: error %s / %d while opening port %d\n", getmidiinerr(err, result), result, currprefs.win32_midiindev);
} else {
midi_in_ready = TRUE;
result=midiInStart(inHandle);
}
-
+
if(MidiOut_Alloc()) {
if(midi_in_ready) {
if(!MidiIn_Alloc()) {
midiInClose(inHandle);
- midi_in_ready = FALSE;
+ midi_in_ready = FALSE;
} else {
for (i = 0;i < MIDI_INBUFFERS; i++) {
midiin[i].lpData = inbuffer[i];
} else {
midiOutClose(outHandle);
if(midi_in_ready) {
- midiInClose(inHandle);
- midi_in_ready = FALSE;
+ midiInClose(inHandle);
+ midi_in_ready = FALSE;
}
result = 0;
DeleteCriticalSection(&cs_proc);
exitin = 0;
}
midi_ready = FALSE;
- write_log("MIDI: closed.\n");
+ write_log ("MIDI: closed.\n");
DeleteCriticalSection(&cs_proc);
}
}
Disable();
max = gettime(0);
for (;;) {
- i = gettime(i);
- if (i >= max) max = i;
- else break;
+ i = gettime(i);
+ if (i >= max) max = i;
+ else break;
}
max -= 2;
Enable();
return (newtime > (lasttime + 60));
}
-
+
static char *buffer[2] = { 0, 0} ;
static long bufferlength[2] = { 0,0 };
short sysex = 0;
short i;
for (;track;track = track->next) {
- tool = (struct MIDITool *) track->toollist;
- if (tool->tool.toolid == ID_MDIN) {
- sysex |= tool->status;
- }
+ tool = (struct MIDITool *) track->toollist;
+ if (tool->tool.toolid == ID_MDIN) {
+ sysex |= tool->status;
+ }
}
if (sysex & 128) {
- if (allocated < 2) {
- for (i=0;i<2;i++) {
- if (!buffer[i]) {
- buffer[i] = (char *) (*functions->myalloc)(BUFFLEN,MEMF_PUBLIC);
- if (buffer[i]) {
- bufferlength[i] = BUFFLEN;
- allocated++;
- }
- else bufferlength[i] = 0;
- }
- }
- bufferselect = 0;
- }
+ if (allocated < 2) {
+ for (i=0;i<2;i++) {
+ if (!buffer[i]) {
+ buffer[i] = (char *) (*functions->myalloc)(BUFFLEN,MEMF_PUBLIC);
+ if (buffer[i]) {
+ bufferlength[i] = BUFFLEN;
+ allocated++;
+ }
+ else bufferlength[i] = 0;
+ }
+ }
+ bufferselect = 0;
+ }
}
else {
- if (allocated) {
- for (i=0;i<2;i++) {
- if (buffer[i]) {
- allocated--;
- (*functions->myfree)(buffer[i],bufferlength[i]);
- bufferlength[i] = 0;
- buffer[i] = 0;
- }
- }
- bufferselect = 0;
- }
- allocated = 0;
+ if (allocated) {
+ for (i=0;i<2;i++) {
+ if (buffer[i]) {
+ allocated--;
+ (*functions->myfree)(buffer[i],bufferlength[i]);
+ bufferlength[i] = 0;
+ buffer[i] = 0;
+ }
+ }
+ bufferselect = 0;
+ }
+ allocated = 0;
}
return(allocated);
}
{
struct MIDITool *tool;
- tool = (struct MIDITool *)
- (*functions->myalloc)(sizeof(struct MIDITool),MEMF_CLEAR);
+ tool = (struct MIDITool *)
+ (*functions->myalloc)(sizeof(struct MIDITool),MEMF_CLEAR);
if (tool) {
- if (copy) {
- memcpy((char *)tool,(char *)copy,sizeof(struct MIDITool));
- tool->tool.next = 0;
- if (tool->status & 128) allocbuffers();
- }
- tool->tool.tooltype = TOOL_INPUT;
- tool->tool.toolid = ID_MDIN;
- tool->status = 0x7F;
- tool->tool.touched = TOUCH_INIT;
+ if (copy) {
+ memcpy((char *)tool,(char *)copy,sizeof(struct MIDITool));
+ tool->tool.next = 0;
+ if (tool->status & 128) allocbuffers();
+ }
+ tool->tool.tooltype = TOOL_INPUT;
+ tool->tool.toolid = ID_MDIN;
+ tool->status = 0x7F;
+ tool->tool.touched = TOUCH_INIT;
}
return((struct Tool *)tool);
}
{
if (tool->status & 128) {
- tool->status = 0;
- allocbuffers();
+ tool->status = 0;
+ allocbuffers();
}
(*functions->myfree)(tool,sizeof(struct MIDITool));
}
char menuname[100];
midiinNewWindowStructure1.Screen = functions->screen;
if (tool->tool.touched & TOUCH_EDIT) {
- midiinNewWindowStructure1.LeftEdge = tool->tool.left;
- midiinNewWindowStructure1.TopEdge = tool->tool.top;
- midiinNewWindowStructure1.Width = tool->tool.width;
- midiinNewWindowStructure1.Height = tool->tool.height;
+ midiinNewWindowStructure1.LeftEdge = tool->tool.left;
+ midiinNewWindowStructure1.TopEdge = tool->tool.top;
+ midiinNewWindowStructure1.Width = tool->tool.width;
+ midiinNewWindowStructure1.Height = tool->tool.height;
}
if (!(tool->tool.touched & TOUCH_INIT)) tool->status = 0x7F;
- newwindow = (struct NewWindow *)
- (*functions->DupeNewWindow)(&midiinNewWindowStructure1);
+ newwindow = (struct NewWindow *)
+ (*functions->DupeNewWindow)(&midiinNewWindowStructure1);
if (!newwindow) return;
newwindow->Title = 0;
newwindow->Flags |= BORDERLESS;
window = (struct Window *) (*functions->FlashyOpenWindow)(newwindow);
if (!window) return;
(*functions->EmbossWindowOn)(window,WINDOWCLOSE|WINDOWDEPTH|WINDOWDRAG,
- "Midi In",-1,-1,0,0);
+ "Midi In",-1,-1,0,0);
tool->tool.window = window;
(*functions->EmbossOn)(window,1,1);
(*functions->EmbossOn)(window,2,1);
TitleMenu.MenuName = menuname;
SetMenuStrip(window,&TitleMenu);
for (;;) {
- message = (struct IntuiMessage *)(*functions->GetIntuiMessage)(window);
- class = message->Class;
- code = message->Code;
- gadget = (struct Gadget *) message->IAddress;
- class = (*functions->SystemGadgets)(window,class,gadget,code);
- ReplyMsg((struct Message *)message);
- if (class == CLOSEWINDOW) break;
- else if (class == GADGETUP) {
- class = gadget->GadgetID;
- switch (class) {
- case 1 :
- tool->status ^= 3;
- (*functions->SelectEmbossed)(window,1,tool->status & 1);
- break;
- case 2 :
- case 3 :
- case 4 :
- case 5 :
- case 6 :
- case 7 :
- class = 1 << (class);
- tool->status ^= class;
- if (class & 128) {
- if (!allocbuffers() && (tool->status & 128))
- tool->status &= ~128;
- }
- (*functions->SelectEmbossed)
- (window,gadget->GadgetID,tool->status & class);
- break;
- }
- }
+ message = (struct IntuiMessage *)(*functions->GetIntuiMessage)(window);
+ class = message->Class;
+ code = message->Code;
+ gadget = (struct Gadget *) message->IAddress;
+ class = (*functions->SystemGadgets)(window,class,gadget,code);
+ ReplyMsg((struct Message *)message);
+ if (class == CLOSEWINDOW) break;
+ else if (class == GADGETUP) {
+ class = gadget->GadgetID;
+ switch (class) {
+ case 1 :
+ tool->status ^= 3;
+ (*functions->SelectEmbossed)(window,1,tool->status & 1);
+ break;
+ case 2 :
+ case 3 :
+ case 4 :
+ case 5 :
+ case 6 :
+ case 7 :
+ class = 1 << (class);
+ tool->status ^= class;
+ if (class & 128) {
+ if (!allocbuffers() && (tool->status & 128))
+ tool->status &= ~128;
+ }
+ (*functions->SelectEmbossed)
+ (window,gadget->GadgetID,tool->status & class);
+ break;
+ }
+ }
}
ClearMenuStrip(window);
(*functions->EmbossOff)(window,1);
static struct Interrupt midiintin;
-static unsigned char plen[128] = {
+static unsigned char plen[128] = {
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
short i;
unsigned long j;
if (string) {
- dprintf("Length: %ld\n",string->length);
- for (i=0;i<string->length;i++) {
- j = string->string[i];
- j &= 0xFF;
- dprintf("%lx ",j);
- }
+ dprintf("Length: %ld\n",string->length);
+ for (i=0;i<string->length;i++) {
+ j = string->string[i];
+ j &= 0xFF;
+ dprintf("%lx ",j);
+ }
}
else dprintf("No string");
dprintf("\n");
eventsignal = 1 << AllocSignal(-1);
index = 0;
for (;;) {
- Wait(eventsignal);
- for (;index != eventindex;) {
- event = &eventarray[index];
- status = 1 << ((event->status >> 4) - 8);
- if (status == 2) {
- if (!event->byte1) {
- index++;
- index &= 0x1F;
- continue;
- }
- if (event->byte2 && functions->remotecontrol[event->byte1]) {
- if (functions->processinputevent) {
- (*functions->processinputevent)
- (functions->remotecontrol[event->byte1]);
- index++;
- index &= 0x1F;
- continue;
- }
- }
- }
- if (status == 128) {
- if (functions->multiin) {
- for (track = functions->tracklist;track;track = track->next) {
- tool = (struct MIDITool *) track->toollist;
- if (tool->tool.toolid == ID_MDIN) {
- if (tool->status & 128) break;
- }
- }
- }
- else track = master.intrack;
- if (track) {
- tool = (struct MIDITool *) track->toollist;
- stringevent = (struct StringEvent *)
- (*functions->fastallocevent)();
- if (stringevent) {
- stringevent->type = EVENT_SYSX;
- stringevent->tool = tool->tool.next;
- stringevent->time = event->time;
- if (!event->tool) {
- index++;
- index &= 0x1F;
- continue;
- }
- stringevent->string = (struct String *)
- (*functions->myalloc)(event->data + 3,0);
- if (stringevent->string) {
- stringevent->string->length = event->data + 2;
- memcpy(stringevent->string->string,event->tool,
- event->data);
- }
- stringevent->status = MIDI_SYSX;
- (*functions->qevent)(stringevent);
- }
- }
- index++;
- index &= 0x1F;
- continue;
- }
- if (functions->multiin) {
- channel = event->status & 15;
- track = (struct Track *) functions->tracklist;
- for (;track;track = track->next) {
- tool = (struct MIDITool *) track->toollist;
- if (tool && (tool->tool.toolid == ID_MDIN) &&
- (tool->status & status)) {
- if (track->channelin == channel) {
- break;
- }
- }
- }
- }
- else {
- track = master.intrack;
- }
- if (track) {
- tool = (struct MIDITool *) track->toollist;
- if (tool && (tool->tool.toolid == ID_MDIN) &&
- (tool->status & status)) {
- copy = (struct Event *) (*functions->fastallocevent)();
- if (copy) {
- copy->type = EVENT_VOICE;
- copy->tool = tool->tool.next;
- copy->status = (event->status & 0xF0);
- copy->byte1 = event->byte1;
- copy->byte2 = event->byte2;
- if (copy->status == MIDI_NOTEON) {
- if (!copy->byte2) copy->status = MIDI_NOTEOFF;
- }
- copy->time = event->time;
- (*functions->qevent)(copy);
- }
- }
- }
- index++;
- index &= 0x1F;
- continue;
- }
+ Wait(eventsignal);
+ for (;index != eventindex;) {
+ event = &eventarray[index];
+ status = 1 << ((event->status >> 4) - 8);
+ if (status == 2) {
+ if (!event->byte1) {
+ index++;
+ index &= 0x1F;
+ continue;
+ }
+ if (event->byte2 && functions->remotecontrol[event->byte1]) {
+ if (functions->processinputevent) {
+ (*functions->processinputevent)
+ (functions->remotecontrol[event->byte1]);
+ index++;
+ index &= 0x1F;
+ continue;
+ }
+ }
+ }
+ if (status == 128) {
+ if (functions->multiin) {
+ for (track = functions->tracklist;track;track = track->next) {
+ tool = (struct MIDITool *) track->toollist;
+ if (tool->tool.toolid == ID_MDIN) {
+ if (tool->status & 128) break;
+ }
+ }
+ }
+ else track = master.intrack;
+ if (track) {
+ tool = (struct MIDITool *) track->toollist;
+ stringevent = (struct StringEvent *)
+ (*functions->fastallocevent)();
+ if (stringevent) {
+ stringevent->type = EVENT_SYSX;
+ stringevent->tool = tool->tool.next;
+ stringevent->time = event->time;
+ if (!event->tool) {
+ index++;
+ index &= 0x1F;
+ continue;
+ }
+ stringevent->string = (struct String *)
+ (*functions->myalloc)(event->data + 3,0);
+ if (stringevent->string) {
+ stringevent->string->length = event->data + 2;
+ memcpy(stringevent->string->string,event->tool,
+ event->data);
+ }
+ stringevent->status = MIDI_SYSX;
+ (*functions->qevent)(stringevent);
+ }
+ }
+ index++;
+ index &= 0x1F;
+ continue;
+ }
+ if (functions->multiin) {
+ channel = event->status & 15;
+ track = (struct Track *) functions->tracklist;
+ for (;track;track = track->next) {
+ tool = (struct MIDITool *) track->toollist;
+ if (tool && (tool->tool.toolid == ID_MDIN) &&
+ (tool->status & status)) {
+ if (track->channelin == channel) {
+ break;
+ }
+ }
+ }
+ }
+ else {
+ track = master.intrack;
+ }
+ if (track) {
+ tool = (struct MIDITool *) track->toollist;
+ if (tool && (tool->tool.toolid == ID_MDIN) &&
+ (tool->status & status)) {
+ copy = (struct Event *) (*functions->fastallocevent)();
+ if (copy) {
+ copy->type = EVENT_VOICE;
+ copy->tool = tool->tool.next;
+ copy->status = (event->status & 0xF0);
+ copy->byte1 = event->byte1;
+ copy->byte2 = event->byte2;
+ if (copy->status == MIDI_NOTEON) {
+ if (!copy->byte2) copy->status = MIDI_NOTEOFF;
+ }
+ copy->time = event->time;
+ (*functions->qevent)(copy);
+ }
+ }
+ }
+ index++;
+ index &= 0x1F;
+ continue;
+ }
}
}
static char *bufferpoint = 0;
for (data = custom.serdatr;;data = custom.serdatr) {
- if (!(data & 0x4000)) {
- if (sysexon && master.readsysex && !timeout()) continue;
- return;
- }
- if (data & 0x8000) unknownstatus = 1;
- if (sysexon && master.readsysex) reset();
- event = &eventarray[eventindex];
- custom.intreq = INTF_RBF;
- data &= 0xFF;
- if (data & 0x80) {
- if (data >= MIDI_CLOCK) {
- if (data == MIDI_CLOCK) {
- timeevent.status = MIDI_CLOCK;
- if (functions->midiclock)
- (*functions->processmidiclock)(&timeevent);
- continue;
- }
- if (data == MIDI_START) {
- timeevent.status = MIDI_START;
- if (functions->midiclock)
- (*functions->processmidiclock)(&timeevent);
- continue;
- }
- if (data == MIDI_CONTINUE) {
- timeevent.status = MIDI_CONTINUE;
- if (functions->midiclock)
- (*functions->processmidiclock)(&timeevent);
- continue;
- }
- if (data == MIDI_STOP) {
- timeevent.status = MIDI_STOP;
- if (functions->midiclock)
- (*functions->processmidiclock)(&timeevent);
- continue;
- }
- continue;
- }
- else if (data == MIDI_MTC) {
- miditimecode = 1;
- continue;
- }
- else if (sysexon) { /* End of Sysex. */
- if (master.readsysex) {
- (*master.readsysex)(MIDI_EOX);
- }
- else if (allocated) {
- bufferpoint[bufferindex++] = MIDI_EOX;
- if (bufferindex >= BUFFLEN) bufferindex = (BUFFLEN - 1);
- eventindex++;
- eventindex &= 0x1F;
- event->status = MIDI_SYSX;
- event->time = functions->timenow;
- event->byte1 = bufferselect;
- event->data = bufferindex;
- event->tool = (struct Tool *) bufferpoint;
- Signal(eventtask,eventsignal);
- bufferselect = !bufferselect;
- if (bufferselect >= allocated) bufferselect = 0;
- bufferpoint = buffer[bufferselect];
- }
- sysexon = 0;
- unknownstatus = 1;
- if (data == MIDI_EOX) continue;
- }
- status = data;
- midiinlen = plen[data & 0x7F];
- midiinpos = 0;
- unknownstatus = 0;
- if (data == MIDI_SYSX) {
- sysexon = 1;
- if (master.readsysex) {
- reset();
- (*master.readsysex)(MIDI_SYSX);
- }
- else if (allocated) {
- bufferindex = 0;
- bufferpoint = buffer[bufferselect];
- bufferpoint[bufferindex++] = MIDI_SYSX;
- }
- continue;
- }
- }
- else if (miditimecode) {
+ if (!(data & 0x4000)) {
+ if (sysexon && master.readsysex && !timeout()) continue;
+ return;
+ }
+ if (data & 0x8000) unknownstatus = 1;
+ if (sysexon && master.readsysex) reset();
+ event = &eventarray[eventindex];
+ custom.intreq = INTF_RBF;
+ data &= 0xFF;
+ if (data & 0x80) {
+ if (data >= MIDI_CLOCK) {
+ if (data == MIDI_CLOCK) {
+ timeevent.status = MIDI_CLOCK;
+ if (functions->midiclock)
+ (*functions->processmidiclock)(&timeevent);
+ continue;
+ }
+ if (data == MIDI_START) {
+ timeevent.status = MIDI_START;
+ if (functions->midiclock)
+ (*functions->processmidiclock)(&timeevent);
+ continue;
+ }
+ if (data == MIDI_CONTINUE) {
+ timeevent.status = MIDI_CONTINUE;
+ if (functions->midiclock)
+ (*functions->processmidiclock)(&timeevent);
+ continue;
+ }
+ if (data == MIDI_STOP) {
+ timeevent.status = MIDI_STOP;
+ if (functions->midiclock)
+ (*functions->processmidiclock)(&timeevent);
+ continue;
+ }
+ continue;
+ }
+ else if (data == MIDI_MTC) {
+ miditimecode = 1;
+ continue;
+ }
+ else if (sysexon) { /* End of Sysex. */
+ if (master.readsysex) {
+ (*master.readsysex)(MIDI_EOX);
+ }
+ else if (allocated) {
+ bufferpoint[bufferindex++] = MIDI_EOX;
+ if (bufferindex >= BUFFLEN) bufferindex = (BUFFLEN - 1);
+ eventindex++;
+ eventindex &= 0x1F;
+ event->status = MIDI_SYSX;
+ event->time = functions->timenow;
+ event->byte1 = bufferselect;
+ event->data = bufferindex;
+ event->tool = (struct Tool *) bufferpoint;
+ Signal(eventtask,eventsignal);
+ bufferselect = !bufferselect;
+ if (bufferselect >= allocated) bufferselect = 0;
+ bufferpoint = buffer[bufferselect];
+ }
+ sysexon = 0;
+ unknownstatus = 1;
+ if (data == MIDI_EOX) continue;
+ }
+ status = data;
+ midiinlen = plen[data & 0x7F];
+ midiinpos = 0;
+ unknownstatus = 0;
+ if (data == MIDI_SYSX) {
+ sysexon = 1;
+ if (master.readsysex) {
+ reset();
+ (*master.readsysex)(MIDI_SYSX);
+ }
+ else if (allocated) {
+ bufferindex = 0;
+ bufferpoint = buffer[bufferselect];
+ bufferpoint[bufferindex++] = MIDI_SYSX;
+ }
+ continue;
+ }
+ }
+ else if (miditimecode) {
// if (functions->smpteclock) {
- timeevent.status = MIDI_MTC;
- timeevent.byte1 = data;
- (*functions->processsmpteclock)(&timeevent);
+ timeevent.status = MIDI_MTC;
+ timeevent.byte1 = data;
+ (*functions->processsmpteclock)(&timeevent);
// }
- miditimecode = 0;
- continue;
- }
- else if (sysexon) {
- if (master.readsysex) {
- (*master.readsysex)(data);
- }
- else if (allocated) {
- bufferpoint[bufferindex++] = data;
- if (bufferindex >= BUFFLEN) bufferindex = (BUFFLEN - 1);
- }
- continue;
- }
- else if (unknownstatus) {
- continue;
- }
- else if (++midiinpos == 1) event->byte1 = data;
- else event->byte2 = data;
- if (midiinpos >= midiinlen) {
- event->status = status;
- midiinpos = 0;
- if (status == MIDI_SONGPP) {
- if (functions->midiclock)
- (*functions->processmidiclock)(event);
- continue;
- }
- else {
- eventindex++;
- eventindex &= 0x1F;
- event->time = functions->timenow;
- Signal(eventtask,eventsignal);
- continue;
- }
- }
+ miditimecode = 0;
+ continue;
+ }
+ else if (sysexon) {
+ if (master.readsysex) {
+ (*master.readsysex)(data);
+ }
+ else if (allocated) {
+ bufferpoint[bufferindex++] = data;
+ if (bufferindex >= BUFFLEN) bufferindex = (BUFFLEN - 1);
+ }
+ continue;
+ }
+ else if (unknownstatus) {
+ continue;
+ }
+ else if (++midiinpos == 1) event->byte1 = data;
+ else event->byte2 = data;
+ if (midiinpos >= midiinlen) {
+ event->status = status;
+ midiinpos = 0;
+ if (status == MIDI_SONGPP) {
+ if (functions->midiclock)
+ (*functions->processmidiclock)(event);
+ continue;
+ }
+ else {
+ eventindex++;
+ eventindex &= 0x1F;
+ event->time = functions->timenow;
+ Signal(eventtask,eventsignal);
+ continue;
+ }
+ }
}
}
\f
Disable();
oldserin = (struct Interrupt *) SetIntVector(INTB_RBF,&midiintin);
Enable();
- custom.serper = 114;
+ custom.serper = 114;
custom.intena = INTF_SETCLR | INTF_RBF;
functions->releasemidi = releaseint;
functions->stealmidi = 0;
midiintin.is_Code = midiincode;
eventtask = CreateTask("midi in",40,eventcode,4000);
if (functions->releasemidi) {
- (*functions->releasemidi)();
+ (*functions->releasemidi)();
}
functions->releasemidi = releaseint;
stealint();
#include <float.h>
-#include "sysconfig.h"
+#include "sysconfig.h"
#include "sysdeps.h"
#include "sys/mman.h"
#include "memory.h"
static uae_u8 *p96fakeram;
static int p96fakeramsize;
-static void *virtualallocwithlock(LPVOID addr, SIZE_T size, DWORD allocationtype, DWORD protect)
+static void *virtualallocwithlock(LPVOID addr, SIZE_T size, DWORD allocationtype, DWORD protect)
{
void *p = VirtualAlloc (addr, size, allocationtype, protect);
if (p && memorylocking && os_winnt)
pSetProcessWorkingSetSize = (SETPROCESSWORKINGSETSIZE)GetProcAddress(GetModuleHandle("kernal32.dll", "GetProcessWorkingSetSize");
if (!pSetProcessWorkingSetSize)
return;
- pSetProcessWorkingSetSize(GetCurrentProcess (),
+ pSetProcessWorkingSetSize(GetCurrentProcess (),
);
#endif
blah = VirtualAlloc(NULL, size + add, MEM_RESERVE, PAGE_EXECUTE_READWRITE);
if (blah)
break;
- write_log("NATMEM: %dM area failed to allocate, err=%d\n", (size + add) >> 20, GetLastError());
+ write_log ("NATMEM: %dM area failed to allocate, err=%d\n", (size + add) >> 20, GetLastError());
size >>= 1;
if (size < 0x10000000) {
- write_log("NATMEM: No special area could be allocated (2)!\n");
+ write_log ("NATMEM: No special area could be allocated (2)!\n");
return;
}
}
if (p96mode) {
p96mem_offset = VirtualAlloc(natmem_offset + size + add, 128 * 1024 * 1024, MEM_RESERVE | MEM_WRITE_WATCH, PAGE_EXECUTE_READWRITE);
if (!p96mem_offset) {
- write_log("NATMEM: failed to allocate special Picasso96 GFX RAM\n");
+ write_log ("NATMEM: failed to allocate special Picasso96 GFX RAM\n");
p96mode = 0;
}
}
}
if (!natmem_offset) {
- write_log("NATMEM: No special area could be allocated! (1)\n");
+ write_log ("NATMEM: No special area could be allocated! (1)\n");
} else {
max_z3fastmem = size;
- write_log("NATMEM: Our special area: 0x%p-0x%p (%dM)\n",
+ write_log ("NATMEM: Our special area: 0x%p-0x%p (%dM)\n",
natmem_offset, (uae_u8*)natmem_offset + size + add, (size + add) >> 20);
canbang = 1;
allocated = 1;
}
- write_log("Max Z3FastRAM %dM. Total physical RAM %uM\n", max_z3fastmem >> 20, totalphys64 >> 20);
+ write_log ("Max Z3FastRAM %dM. Total physical RAM %uM\n", max_z3fastmem >> 20, totalphys64 >> 20);
}
}
void *shmat(int shmid, void *shmaddr, int shmflg)
-{
+{
void *result = (void *)-1;
BOOL got = FALSE;
-
+
#ifdef NATMEM_OFFSET
unsigned int size=shmids[shmid].size;
if(shmids[shmid].attached)
}
}
#endif
-
+
if ((shmids[shmid].key == shmid) && shmids[shmid].size) {
got = FALSE;
if (got == FALSE) {
} else {
if (memorylocking && os_winnt)
VirtualLock(shmaddr, size);
- shmids[shmid].attached = result;
+ shmids[shmid].attached = result;
write_log ("VirtualAlloc %08.8X - %08.8X %x (%dk) ok\n",
(uae_u8*)shmaddr - natmem_offset, (uae_u8*)shmaddr - natmem_offset + size,
size, size >> 10);
-/*
+/*
* UAE - The Un*x Amiga Emulator
*
* OpenGL renderer
// InitMultisample: Used To Query The Multisample Frequencies
static int InitMultisample(HDC hDC, PIXELFORMATDESCRIPTOR *pfd)
-{
+{
PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormatARB;
int pixelFormat;
int valid, i;
UINT numFormats;
float fAttributes[] = {0,0};
// These Attributes Are The Bits We Want To Test For In Our Sample
- // Everything Is Pretty Standard, The Only One We Want To
+ // Everything Is Pretty Standard, The Only One We Want To
// Really Focus On Is The SAMPLE BUFFERS ARB And WGL SAMPLES
// These Two Are Going To Do The Main Testing For Whether Or Not
// We Support Multisampling On This Hardware.
return 0;
// Get Our Pixel Format
- wglChoosePixelFormatARB = (PFNWGLCHOOSEPIXELFORMATARBPROC)wglGetProcAddress("wglChoosePixelFormatARB");
- if (!wglChoosePixelFormatARB)
+ wglChoosePixelFormatARB = (PFNWGLCHOOSEPIXELFORMATARBPROC)wglGetProcAddress("wglChoosePixelFormatARB");
+ if (!wglChoosePixelFormatARB)
return 0;
for (i = 8; i >= 2; i -= 2) {
// If We Returned True, And Our Format Count Is Greater Than 1
if (valid && numFormats >= 1) {
arbMultisampleSupported = i;
- arbMultisampleFormat = pixelFormat;
+ arbMultisampleFormat = pixelFormat;
write_log ("OPENGL: max FSAA = %d\n", i);
return arbMultisampleSupported;
}
for (;;) {
- memset (&pfd, 0, sizeof (pfd));
+ memset (&pfd, 0, sizeof (pfd));
pfd.nSize = sizeof (PIXELFORMATDESCRIPTOR);
pfd.nVersion = 1;
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER | PFD_TYPE_RGBA;
sprintf (errmsg, "OPENGL: can't set pixelformat %x", PixelFormat);
return errmsg;
}
-
+
if (!(hrc = wglCreateContext (openglhdc))) {
strcpy (errmsg, "OPENGL: can't create gl rendering context");
return errmsg;
}
-
+
if (!wglMakeCurrent (openglhdc, hrc)) {
strcpy (errmsg, "OPENGL: can't activate gl rendering context");
return errmsg;
ext1 = glGetString (GL_EXTENSIONS);
if (!init)
- write_log("OpenGL extensions: %s\n", ext1);
+ write_log ("OpenGL extensions: %s\n", ext1);
if (strstr (ext1, "EXT_packed_pixels"))
packed_pixels = 1;
if (strstr (ext1, "WGL_EXT_swap_control")) {
"EXT_packed_pixels extension was not found.");
OGL_free();
return errmsg;
- }
+ }
ti2d_internalformat = GL_RGB5_A1;
- ti2d_format = GL_RGBA;
- ti2d_type = GL_UNSIGNED_SHORT_5_5_5_1_EXT;
+ ti2d_format = GL_RGBA;
+ ti2d_type = GL_UNSIGNED_SHORT_5_5_5_1_EXT;
}
if (depth == 32) {
ti2d_internalformat = GL_RGBA;
}
}
if (ti2d_type < 0) {
- sprintf (errmsg, "OPENGL: Only 15, 16 or 32 bit screen depths supported (was %d)", depth);
- OGL_free();
+ sprintf (errmsg, "OPENGL: Only 15, 16 or 32 bit screen depths supported (was %d)", depth);
+ OGL_free();
return errmsg;
}
-
+
glGenTextures (total_textures, tex);
/* "bitplane" texture */
glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glClearColor (0.0, 0.0, 0.0, 0.0);
- glShadeModel (GL_FLAT);
+ glShadeModel (GL_FLAT);
glDisable (GL_DEPTH_TEST);
glEnable (GL_TEXTURE_2D);
glDisable (GL_LIGHTING);
OGL_refresh ();
init = 1;
- write_log("OPENGL: using texture depth %d texture size %d * %d scanline texture size %d * %d\n",
+ write_log ("OPENGL: using texture depth %d texture size %d * %d scanline texture size %d * %d\n",
depth, required_texture_size, required_texture_size, required_sl_texture_size, required_sl_texture_size);
return 0;
}
osl3 = currprefs.gfx_filter_scanlinelevel;
osl2 = currprefs.gfx_filter_scanlineratio;
if (!currprefs.gfx_filter_scanlines) {
- glDisable (GL_BLEND);
+ glDisable (GL_BLEND);
return;
- }
+ }
glEnable (GL_BLEND);
scanlinetex = tex[total_textures - 1];
glBindTexture (GL_TEXTURE_2D, scanlinetex);
glTexImage2D (GL_TEXTURE_2D, 0, sl_ti2d_internalformat,
- required_sl_texture_size, required_sl_texture_size, 0, sl_ti2d_format, sl_ti2d_type, 0);
+ required_sl_texture_size, required_sl_texture_size, 0, sl_ti2d_format, sl_ti2d_type, 0);
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
if (packed_pixels) {
/* 16-bit, R4G4B4A4 */
uae_u8 sll = sl42;
- p = &sld[((y + yy) * w_width + x) * 2];
+ p = &sld[((y + yy) * w_width + x) * 2];
p[0] = sl4 | (sll << 4);
p[1] = (sll << 4) | (sll << 0);
} else {
/* 32-bit, R8G8B8A8 */
- p = &sld[((y + yy) * w_width + x) * 4];
+ p = &sld[((y + yy) * w_width + x) * 4];
p[0] = p[1] = p[2] = sl82;
p[3] = sl8;
}
break;
}
if (currprefs.gfx_filter_scanlines > 0) {
- glBindTexture (GL_TEXTURE_2D, scanlinetex);
+ glBindTexture (GL_TEXTURE_2D, scanlinetex);
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filtering);
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filtering);
}
float v = (float)required_sl_texture_size;
glBindTexture (GL_TEXTURE_2D, scanlinetex);
glBegin (GL_QUADS);
- glTexCoord2f (0, -1.0f); glVertex2f (0, 0);
+ glTexCoord2f (0, -1.0f); glVertex2f (0, 0);
glTexCoord2f (0, 0); glVertex2f (0, v);
glTexCoord2f (1.0f, 0); glVertex2f (v, v);
glTexCoord2f (1.0f, -1.0f); glVertex2f (v, 0);
switch (depth)
{
case 32:
- *rb = 8;
+ *rb = 8;
*gb = 8;
*bb = 8;
*ab = 8;
break;
case 15:
case 16:
- *rb = 5;
+ *rb = 5;
*gb = 5;
*bb = 5;
*ab = 1;
void OGL_free (void)
{
if (hrc) {
- wglMakeCurrent (NULL, NULL);
- wglDeleteContext (hrc);
- hrc = 0;
+ wglMakeCurrent (NULL, NULL);
+ wglDeleteContext (hrc);
+ hrc = 0;
}
if (openglhdc) {
ReleaseDC (hwnd, openglhdc);
-/*
+/*
* UAE - The Un*x Amiga Emulator
*
* Not a parser, but parallel and serial emulation for Win32
static int openprinter_ps (void)
{
char *gsargv[] = {
- "-dNOPAUSE", "-dBATCH", "-dNOPAGEPROMPT", "-dNOPROMPT", "-dQUIET", "-dNoCancel",
+ "-dNOPAUSE", "-dBATCH", "-dNOPAGEPROMPT", "-dNOPROMPT", "-dQUIET", "-dNoCancel",
"-sDEVICE=mswinpr2", NULL
};
int gsargc, gsargc2, i;
}
if (postscript_print_debugging) {
for(i = 0; i < gsargc2; i++)
- write_log("GSPARM%d: '%s'\n", i, tmpparms[i]);
+ write_log ("GSPARM%d: '%s'\n", i, tmpparms[i]);
}
__try {
int rc = ptr_gsapi_init_with_args (gsinstance, gsargc2, tmpparms);
if (rc != 0) {
- write_log("GS failed, returncode %d\n", rc);
+ write_log ("GS failed, returncode %d\n", rc);
return 0;
}
ptr_gsapi_run_string_begin (gsinstance, 0, &gs_exitcode);
} __except(ExceptionFilter(GetExceptionInformation(), GetExceptionCode())) {
- write_log("GS crashed\n");
+ write_log ("GS crashed\n");
return 0;
}
psmode = 1;
} else if (hPrt != INVALID_HANDLE_VALUE) {
if (WritePrinter(hPrt, prtbuf, prtbufbytes, &written)) {
if (written != prtbufbytes)
- write_log("PRINTER: Only wrote %d of %d bytes!\n", written, prtbufbytes);
+ write_log ("PRINTER: Only wrote %d of %d bytes!\n", written, prtbufbytes);
} else {
- write_log("PRINTER: Couldn't write data!\n");
+ write_log ("PRINTER: Couldn't write data!\n");
}
} else {
- write_log("PRINTER: Not open!\n");
+ write_log ("PRINTER: Not open!\n");
}
prtbufbytes = 0;
}
freepsbuffers ();
return;
} else if (!psmode && !stricmp (prev, "%!PS")) {
-
+
if (postscript_print_debugging)
prtdump = zfile_fopen ("psdump.dat", "wb");
ptr_gsapi_revision = (GSAPI_REVISION)GetProcAddress (gsdll, "gsapi_revision");
if (!ptr_gsapi_revision) {
unload_ghostscript ();
- write_log("incompatible %s! (1)\n", path);
+ write_log ("incompatible %s! (1)\n", path);
return -1;
}
if (ptr_gsapi_revision(&r, sizeof(r))) {
unload_ghostscript ();
- write_log("incompatible %s! (2)\n", path);
+ write_log ("incompatible %s! (2)\n", path);
return -2;
}
ptr_gsapi_new_instance = (GSAPI_NEW_INSTANCE)GetProcAddress (gsdll, "gsapi_new_instance");
!ptr_gsapi_run_string_begin || !ptr_gsapi_run_string_continue || !ptr_gsapi_run_string_end ||
!ptr_gsapi_init_with_args) {
unload_ghostscript ();
- write_log("incompatible %s! (3)\n", path);
+ write_log ("incompatible %s! (3)\n", path);
return -3;
}
write_log ("%s: %s rev %d initialized\n", path, r.product, r.revision);
{
DOC_INFO_1 DocInfo;
static int first;
-
+
closeprinter ();
if (!currprefs.prtname[0])
return;
}
}
if (hPrt != INVALID_HANDLE_VALUE) {
- write_log( "PRINTER: Opening printer \"%s\" with handle 0x%x.\n", currprefs.prtname, hPrt );
+ write_log ( "PRINTER: Opening printer \"%s\" with handle 0x%x.\n", currprefs.prtname, hPrt );
} else if (*currprefs.prtname) {
- write_log( "PRINTER: ERROR - Couldn't open printer \"%s\" for output.\n", currprefs.prtname );
+ write_log ( "PRINTER: ERROR - Couldn't open printer \"%s\" for output.\n", currprefs.prtname );
}
}
uae_u16 s = 0;
if (!ClearCommError (sd->hCom, &err, &ComStat))
- return 0;
+ return 0;
*pending = ComStat.cbInQue;
if (status) {
s |= (err & CE_BREAK) ? (1 << 10) : 0;
dcb.fDsrSensitivity = FALSE;
dcb.fOutxDsrFlow = FALSE;
dcb.fDtrControl = DTR_CONTROL_DISABLE;
-
+
if (rtscts) {
- dcb.fOutxCtsFlow = TRUE;
- dcb.fRtsControl = RTS_CONTROL_HANDSHAKE;
+ dcb.fOutxCtsFlow = TRUE;
+ dcb.fRtsControl = RTS_CONTROL_HANDSHAKE;
} else {
- dcb.fRtsControl = RTS_CONTROL_DISABLE;
- dcb.fOutxCtsFlow = FALSE;
- }
+ dcb.fRtsControl = RTS_CONTROL_DISABLE;
+ dcb.fOutxCtsFlow = FALSE;
+ }
dcb.fTXContinueOnXoff = FALSE;
if (xonxoff & 1) {
//dcb.XonLim = 2048;
if (!SetCommState (sd->hCom, &dcb)) {
- write_log("uaeserial: SetCommState() failed %d\n", GetLastError());
+ write_log ("uaeserial: SetCommState() failed %d\n", GetLastError());
return 5;
}
SetupComm (sd->hCom, rbuffer, rbuffer);
COMSTAT ComStat;
if (!ClearCommError (sd->hCom, &err, &ComStat))
- return 0;
+ return 0;
if (len > ComStat.cbInQue)
return 0;
if (!ReadFile (sd->hCom, data, len, NULL, &sd->olr)) {
sd->hCom = CreateFile (buf, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, NULL);
if (sd->hCom == INVALID_HANDLE_VALUE) {
- write_log("UAESER: '%s' failed to open, err=%d\n", buf, GetLastError());
+ write_log ("UAESER: '%s' failed to open, err=%d\n", buf, GetLastError());
goto end;
}
uae_sem_init (&sd->sync_sem, 0, 0);
void uaeser_close (struct uaeserialdatawin32 *sd)
{
if (sd->threadactive) {
- sd->threadactive = -1;
- SetEvent (sd->evtt);
- while (sd->threadactive)
+ sd->threadactive = -1;
+ SetEvent (sd->evtt);
+ while (sd->threadactive)
Sleep(10);
CloseHandle (sd->evtt);
}
dcb.fDsrSensitivity = FALSE;
dcb.fOutxDsrFlow = FALSE;
dcb.fDtrControl = DTR_CONTROL_DISABLE;
-
+
if (currprefs.serial_hwctsrts) {
- dcb.fOutxCtsFlow = TRUE;
- dcb.fRtsControl = RTS_CONTROL_HANDSHAKE;
+ dcb.fOutxCtsFlow = TRUE;
+ dcb.fRtsControl = RTS_CONTROL_HANDSHAKE;
} else {
- dcb.fRtsControl = RTS_CONTROL_DISABLE;
- dcb.fOutxCtsFlow = FALSE;
- }
+ dcb.fRtsControl = RTS_CONTROL_DISABLE;
+ dcb.fOutxCtsFlow = FALSE;
+ }
dcb.fTXContinueOnXoff = FALSE;
dcb.fOutX = FALSE;
dcb.fErrorChar = FALSE;
dcb.fNull = FALSE;
dcb.fAbortOnError = FALSE;
-
+
//dcb.XoffLim = 512;
//dcb.XonLim = 2048;
if (SetCommState (hCom, &dcb)) {
- write_log ("SERIAL: Using %s CTS/RTS=%d\n", sername, currprefs.serial_hwctsrts);
- return 1;
+ write_log ("SERIAL: Using %s CTS/RTS=%d\n", sername, currprefs.serial_hwctsrts);
+ return 1;
}
write_log ("SERIAL: serial driver didn't accept new parameters\n");
Midi_Close();
//need for camd Midi Stuff(it close midi and reopen it but serial.c think the baudrate
//is the same and do not open midi), so setting serper to different value helps
- serper = 0x30;
+ serper = 0x30;
}
if(writeevent)
CloseHandle(writeevent);
COMSTAT ComStat;
DWORD dwErrorFlags;
DWORD actual;
-
-
+
+
if (midi_ready) {
*buffer = getmidibyte ();
if (*buffer < 0)
*pstatus = 0;
if (hCom == INVALID_HANDLE_VALUE || !currprefs.use_serial)
return;
-
+
GetCommModemStatus (hCom, &stat);
if (stat & MS_CTS_ON)
status |= TIOCM_CTS;
}
void hsyncstuff(void)
-//only generate Interrupts when
+//only generate Interrupts when
//writebuffer is complete flushed
//check state of lwin rwin
{
static int keycheck = 0;
-
+
#ifdef AHI
{ //begin ahi_sound
static int count;
static int enumserialports_2(void)
{
- // Create a device information set that will be the container for
+ // Create a device information set that will be the container for
// the device interfaces.
HDEVINFO hDevInfo = INVALID_HANDLE_VALUE;
SP_DEVICE_INTERFACE_DETAIL_DATA *pDetData = NULL;
hDevInfo = SetupDiGetClassDevs(&GUID_CLASS_COMPORT, NULL, NULL, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE);
if(hDevInfo == INVALID_HANDLE_VALUE)
- return 0;
+ return 0;
// Enumerate the serial ports
pDetData = xmalloc (dwDetDataSize);
// This is required, according to the documentation. Yes,
ifcData.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);
pDetData->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA);
for (ii = 0; bOk; ii++) {
- bOk = SetupDiEnumDeviceInterfaces(hDevInfo, NULL, &GUID_CLASS_COMPORT, ii, &ifcData);
- if (bOk) {
+ bOk = SetupDiEnumDeviceInterfaces(hDevInfo, NULL, &GUID_CLASS_COMPORT, ii, &ifcData);
+ if (bOk) {
// Got a device. Get the details.
SP_DEVINFO_DATA devdata = {sizeof(SP_DEVINFO_DATA)};
bOk = SetupDiGetDeviceInterfaceDetail(hDevInfo,
- &ifcData, pDetData, dwDetDataSize, NULL, &devdata);
+ &ifcData, pDetData, dwDetDataSize, NULL, &devdata);
if (bOk) {
- // Got a path to the device. Try to get some more info.
- TCHAR fname[256];
- TCHAR desc[256];
- BOOL bSuccess = SetupDiGetDeviceRegistryProperty(
+ // Got a path to the device. Try to get some more info.
+ TCHAR fname[256];
+ TCHAR desc[256];
+ BOOL bSuccess = SetupDiGetDeviceRegistryProperty(
hDevInfo, &devdata, SPDRP_FRIENDLYNAME, NULL,
(PBYTE)fname, sizeof(fname), NULL);
bSuccess = bSuccess && SetupDiGetDeviceRegistryProperty(
} else {
comports[cnt].cfgname = my_strdup (pDetData->DevicePath);
}
- write_log("SERPORT: '%s' = '%s' = '%s'\n", comports[cnt].name, comports[cnt].cfgname, comports[cnt].dev);
+ write_log ("SERPORT: '%s' = '%s' = '%s'\n", comports[cnt].name, comports[cnt].cfgname, comports[cnt].dev);
cnt++;
}
} else {
- write_log("SetupDiGetDeviceInterfaceDetail failed, err=%d", GetLastError());
- goto end;
+ write_log ("SetupDiGetDeviceInterfaceDetail failed, err=%d", GetLastError());
+ goto end;
}
} else {
DWORD err = GetLastError();
if (err != ERROR_NO_MORE_ITEMS) {
- write_log("SetupDiEnumDeviceInterfaces failed, err=%d", err);
+ write_log ("SetupDiEnumDeviceInterfaces failed, err=%d", err);
goto end;
}
}
DWORD size = sizeof(COMMCONFIG);
char devname[1000];
- write_log("Serial port enumeration..\n");
+ write_log ("Serial port enumeration..\n");
cnt = 0;
if (os_winnt)
cnt = enumserialports_2();
sprintf(comports[cnt].dev, "\\.\\\\%s", name);
comports[j].cfgname = my_strdup (name);
comports[j].name = my_strdup (name);
- write_log("SERPORT: %d:'%s' = '%s' (%s)\n", cnt, comports[j].name, comports[j].dev, devname);
+ write_log ("SERPORT: %d:'%s' = '%s' (%s)\n", cnt, comports[j].name, comports[j].dev, devname);
cnt++;
}
}
}
- write_log("Serial port enumeration end\n");
+ write_log ("Serial port enumeration end\n");
return cnt;
}
-/*
+/*
* UAE - The Un*x Amiga Emulator
*
* Not a parser, but parallel and serial emulation for Win32
#include "options.h"
#include "threaddep/thread.h"
-#include "memory.h"
+#include "memory.h"
#include "custom.h"
#include "events.h"
#include "newcpu.h"
#include "picasso96_win.h"
#include "win32gfx.h"
-int p96hack_vpos, p96hack_vpos2, p96refresh_active;
+int p96hack_vpos, p96hack_vpos2, p96refresh_active;
int have_done_picasso; /* For the JIT compiler */
-static int vsyncgfxwrite = 0;
+static int vsyncgfxwrite = 0;
static int p96syncrate, vsyncgfxcount;
int p96hsync_counter, palette_changed;
#if defined(X86_MSVC_ASSEMBLY)
return;
v = get_long (4); // execbase
v += 378; // liblist
- while ((v = get_long(v))) {
- uae_u32 v2 = get_long(v + 10); // name
+ while ((v = get_long (v))) {
+ uae_u32 v2 = get_long (v + 10); // name
uae_u8 *p;
addrbank *b = &get_mem_bank(v2);
if (!b || !b->check (v2, 12))
continue;
p = b->xlateaddr(v2);
if (!memcmp(p, "rtg.library\0", 12)) {
- uae_u16 ver = get_word(v + 20);
- uae_u16 rev = get_word(v + 22);
+ uae_u16 ver = get_word (v + 20);
+ uae_u16 rev = get_word (v + 22);
if (ver * 10000 + rev < UAE_RTG_LIBRARY_VERSION * 10000 + UAE_RTG_LIBRARY_REVISION) {
char msg[2000];
WIN32GUI_LoadUIString(IDS_OLDRTGLIBRARY, msg, sizeof(msg));
gui_message(msg, ver, rev, UAE_RTG_LIBRARY_VERSION, UAE_RTG_LIBRARY_REVISION);
} else {
- write_log("P96: rtg.library %d.%d detected\n", ver, rev);
+ write_log ("P96: rtg.library %d.%d detected\n", ver, rev);
}
checked = TRUE;
}
#ifdef LOCK_UNLOCK_MADNESS
#if defined(P96TRACING_ENABLED) && P96TRACING_LEVEL > 1
// This format of output lets you double-click and jump to file/line
- write_log( "%s(%d) : calling P96 UNLOCK with picasso_on=%d\n", filename, linenum, picasso_on);
+ write_log ( "%s(%d) : calling P96 UNLOCK with picasso_on=%d\n", filename, linenum, picasso_on);
#endif
if(picasso_on)
{
#ifdef PIXEL_LOCK
flushpixels();
-#endif
+#endif
gfx_unlock_picasso ();
}
#endif
#ifdef LOCK_UNLOCK_MADNESS
#if defined(P96TRACING_ENABLED) && P96TRACING_LEVEL > 1
// This format of output lets you double-click and jump to file/line
- write_log( "%s(%d) : calling P96 LOCK with picasso_on=%d\n", filename, linenum, picasso_on);
+ write_log ( "%s(%d) : calling P96 LOCK with picasso_on=%d\n", filename, linenum, picasso_on);
#endif
if(picasso_on)
{
int i;
uaecptr amigamodeinfoptr;
struct LibResolution *uaememptr = (struct LibResolution *)get_mem_bank(amigalibresptr).xlateaddr(amigalibresptr);
-
+
write_log ("LibResolution Structure Dump:\n");
-
+
if (get_long (amigalibresptr + PSSO_LibResolution_DisplayID) == 0xFFFFFFFF) {
write_log (" Finished With LibResolutions...\n");
} else {
static void DumpLine( struct Line *line )
{
if(line) {
- write_log("Line->X = %d\n", line->X);
- write_log("Line->Y = %d\n", line->Y);
- write_log("Line->Length = %d\n", line->Length);
- write_log("Line->dX = %d\n", line->dX);
- write_log("Line->dY = %d\n", line->dY);
- write_log("Line->sDelta = %d\n", line->sDelta);
- write_log("Line->lDelta = %d\n", line->lDelta);
- write_log("Line->twoSDminusLD = %d\n", line->twoSDminusLD);
- write_log("Line->LinePtrn = %d\n", line->LinePtrn);
- write_log("Line->PatternShift = %d\n", line->PatternShift);
- write_log("Line->FgPen = 0x%x\n", line->FgPen);
- write_log("Line->BgPen = 0x%x\n", line->BgPen);
- write_log("Line->Horizontal = %d\n", line->Horizontal);
- write_log("Line->DrawMode = %d\n", line->DrawMode);
- write_log("Line->Xorigin = %d\n", line->Xorigin);
- write_log("Line->Yorigin = %d\n", line->Yorigin);
+ write_log ("Line->X = %d\n", line->X);
+ write_log ("Line->Y = %d\n", line->Y);
+ write_log ("Line->Length = %d\n", line->Length);
+ write_log ("Line->dX = %d\n", line->dX);
+ write_log ("Line->dY = %d\n", line->dY);
+ write_log ("Line->sDelta = %d\n", line->sDelta);
+ write_log ("Line->lDelta = %d\n", line->lDelta);
+ write_log ("Line->twoSDminusLD = %d\n", line->twoSDminusLD);
+ write_log ("Line->LinePtrn = %d\n", line->LinePtrn);
+ write_log ("Line->PatternShift = %d\n", line->PatternShift);
+ write_log ("Line->FgPen = 0x%x\n", line->FgPen);
+ write_log ("Line->BgPen = 0x%x\n", line->BgPen);
+ write_log ("Line->Horizontal = %d\n", line->Horizontal);
+ write_log ("Line->DrawMode = %d\n", line->DrawMode);
+ write_log ("Line->Xorigin = %d\n", line->Xorigin);
+ write_log ("Line->Yorigin = %d\n", line->Yorigin);
}
#endif
static void ShowSupportedResolutions (void)
{
int i = 0;
-
+
write_log ("-----------------\n");
while (DisplayModes[i].depth >= 0) {
write_log ("%s\n", DisplayModes[i].name);
switch (RGBfmt) {
case RGBFB_CLUT:
return 1;
-
+
case RGBFB_A8R8G8B8:
case RGBFB_A8B8G8R8:
case RGBFB_R8G8B8A8:
case RGBFB_B8G8R8A8:
return 4;
-
+
case RGBFB_B8G8R8:
case RGBFB_R8G8B8:
return 3;
-
+
case RGBFB_R5G5B5:
case RGBFB_R5G6B5:
case RGBFB_R5G6B5PC:
static int CopyRenderInfoStructureA2U (uaecptr amigamemptr, struct RenderInfo *ri)
{
uaecptr memp = get_long (amigamemptr + PSSO_RenderInfo_Memory);
-
+
if (valid_address (memp, PSSO_RenderInfo_sizeof)) {
ri->Memory = get_real_address (memp);
ri->BytesPerRow = get_word (amigamemptr + PSSO_RenderInfo_BytesPerRow);
static int CopyBitMapStructureA2U (uaecptr amigamemptr, struct BitMap *bm)
{
int i;
-
+
bm->BytesPerRow = get_word (amigamemptr + PSSO_BitMap_BytesPerRow);
bm->Rows = get_word (amigamemptr + PSSO_BitMap_Rows);
bm->Flags = get_byte (amigamemptr + PSSO_BitMap_Flags);
bm->Depth = get_byte (amigamemptr + PSSO_BitMap_Depth);
-
+
/* ARGH - why is THIS happening? */
if(bm->Depth > 8)
bm->Depth = 8;
-
+
for (i = 0; i < bm->Depth; i++) {
uaecptr plane = get_long (amigamemptr + PSSO_BitMap_Planes + i*4);
switch (plane) {
static int CopyTemplateStructureA2U (uaecptr amigamemptr, struct Template *tmpl)
{
uaecptr memp = get_long (amigamemptr + PSSO_Template_Memory);
-
+
if (valid_address (memp, sizeof(struct Template))) {
tmpl->Memory = get_real_address (memp);
tmpl->BytesPerRow = get_word (amigamemptr + PSSO_Template_BytesPerRow);
static int CopyLineStructureA2U(uaecptr amigamemptr, struct Line *line)
{
if(valid_address(amigamemptr, sizeof(struct Line))) {
- line->X = get_word(amigamemptr + PSSO_Line_X);
- line->Y = get_word(amigamemptr + PSSO_Line_Y);
- line->Length = get_word(amigamemptr + PSSO_Line_Length);
- line->dX = get_word(amigamemptr + PSSO_Line_dX);
- line->dY = get_word(amigamemptr + PSSO_Line_dY);
- line->lDelta = get_word(amigamemptr + PSSO_Line_lDelta);
- line->sDelta = get_word(amigamemptr + PSSO_Line_sDelta);
- line->twoSDminusLD = get_word(amigamemptr + PSSO_Line_twoSDminusLD);
- line->LinePtrn = get_word(amigamemptr + PSSO_Line_LinePtrn);
- line->PatternShift = get_word(amigamemptr + PSSO_Line_PatternShift);
- line->FgPen = get_long(amigamemptr + PSSO_Line_FgPen);
- line->BgPen = get_long(amigamemptr + PSSO_Line_BgPen);
- line->Horizontal = get_word(amigamemptr + PSSO_Line_Horizontal);
- line->DrawMode = get_byte(amigamemptr + PSSO_Line_DrawMode);
- line->Xorigin = get_word(amigamemptr + PSSO_Line_Xorigin);
- line->Yorigin = get_word(amigamemptr + PSSO_Line_Yorigin);
+ line->X = get_word (amigamemptr + PSSO_Line_X);
+ line->Y = get_word (amigamemptr + PSSO_Line_Y);
+ line->Length = get_word (amigamemptr + PSSO_Line_Length);
+ line->dX = get_word (amigamemptr + PSSO_Line_dX);
+ line->dY = get_word (amigamemptr + PSSO_Line_dY);
+ line->lDelta = get_word (amigamemptr + PSSO_Line_lDelta);
+ line->sDelta = get_word (amigamemptr + PSSO_Line_sDelta);
+ line->twoSDminusLD = get_word (amigamemptr + PSSO_Line_twoSDminusLD);
+ line->LinePtrn = get_word (amigamemptr + PSSO_Line_LinePtrn);
+ line->PatternShift = get_word (amigamemptr + PSSO_Line_PatternShift);
+ line->FgPen = get_long (amigamemptr + PSSO_Line_FgPen);
+ line->BgPen = get_long (amigamemptr + PSSO_Line_BgPen);
+ line->Horizontal = get_word (amigamemptr + PSSO_Line_Horizontal);
+ line->DrawMode = get_byte (amigamemptr + PSSO_Line_DrawMode);
+ line->Xorigin = get_word (amigamemptr + PSSO_Line_Xorigin);
+ line->Yorigin = get_word (amigamemptr + PSSO_Line_Yorigin);
return 1;
}
- write_log("ERROR - Invalid Line structure...\n");
+ write_log ("ERROR - Invalid Line structure...\n");
return 0;
}
{
char *uaememptr = 0;
int i;
-
+
uaememptr = gfxmem_xlate (amigamemptr); /* I know that amigamemptr is inside my gfxmem chunk, so I can just do the xlate() */
memset (uaememptr, 0, PSSO_LibResolution_sizeof); /* zero out our LibResolution structure */
strcpy (uaememptr + PSSO_LibResolution_P96ID, libres->P96ID);
uae_u32 pen, int Bpp, RGBFTYPE rgbtype)
{
uae_u8 *dst;
-
+
/* Try OS specific fillrect function here; and return if successful. Make sure we adjust for
* the pen values if we're doing 8-bit display-emulation on a 16-bit or higher screen. */
#ifdef PIXEL_LOCK
- flushpixels();
+ flushpixels();
#endif
if(picasso_vidinfo.rgbformat == picasso96_state.RGBFormat)
return;
}
else
- {
+ {
if(DX_Fill(x, y, width, height, picasso_vidinfo.clut[src[0]], rgbtype))
return;
}
P96TRACE(("P96_WARNING: do_fillrect() using fall-back routine!\n"));
-
+
if(y + height > picasso_vidinfo.height)
height = picasso_vidinfo.height - y;
if(x + width > picasso_vidinfo.width)
#endif
if (!dst)
goto out;
-
+
width *= Bpp;
dst += y * picasso_vidinfo.rowbytes + x * picasso_vidinfo.pixbytes;
- if (picasso_vidinfo.rgbformat == picasso96_state.RGBFormat)
+ if (picasso_vidinfo.rgbformat == picasso96_state.RGBFormat)
{
if(Bpp == 1)
{
{
memset(dst, pen, width);
dst += picasso_vidinfo.rowbytes;
- }
+ }
}
else
{
{
memcpy (dst, src, width);
dst += picasso_vidinfo.rowbytes;
- }
+ }
}
}
else
write_log ("ERROR - do_fillrect() failure1 (%d)\n", picasso96_state.RGBFormat);
goto out;
}
-
- while (height-- > 0)
+
+ while (height-- > 0)
{
unsigned int i;
- switch (psiz)
+ switch (psiz)
{
case 2:
for (i = 0; i < width; i++)
* must do it by hand using the data in the frame-buffer, calculated using
* the RenderInfo data and our coordinates.
*/
-static void do_blit(struct RenderInfo *ri, int Bpp,
- unsigned int srcx, unsigned int srcy, unsigned int dstx, unsigned int dsty,
+static void do_blit(struct RenderInfo *ri, int Bpp,
+ unsigned int srcx, unsigned int srcy, unsigned int dstx, unsigned int dsty,
unsigned int width, unsigned int height, BLIT_OPCODE opcode, int can_do_blit)
{
uae_u8 *dstp, *srcp;
} //hack to use cpu rotines for scrolling in big Screens
if (picasso96_state.XOffset < 0)
can_do_blit = 0;
-
+
dstx=dstx - picasso96_state.XOffset;
dsty=dsty - picasso96_state.YOffset;
if((int)dstx <= 0) {
if(dstx + width >= picasso_vidinfo.width)
width = picasso_vidinfo.width - dstx;
- if (can_do_blit)
+ if (can_do_blit)
{
//
// Call OS blitting function that can do it in video memory.
//
if(DX_Blit(srcx, srcy, dstx, dsty, width, height, opcode))
return;
- srcx = dstx;
- srcy = dsty;
+ srcx = dstx;
+ srcy = dsty;
}
#ifdef LOCK_UNLOCK_MADNESS
PICASSO96_Lock();
{
#ifdef LOCK_UNLOCK_MADNESS
goto out;
- #else
+ #else
return;
#endif
}
write_log ("WARNING: do_blit() couldn't lock\n");
goto out;
}
-
+
/* The areas can't overlap: the source is always in the Picasso frame buffer,
* and the destination is a different buffer owned by the graphics code. */
dstp += dsty * picasso_vidinfo.rowbytes + dstx * picasso_vidinfo.pixbytes;
P96TRACE(("do_blit with srcp 0x%x, dstp 0x%x, dst_rowbytes %d, srcx %d, srcy %d, dstx %d, dsty %d, w %d, h %d, dst_pixbytes %d\n",
srcp, dstp, picasso_vidinfo.rowbytes, srcx, srcy, dstx, dsty, width, height, picasso_vidinfo.pixbytes));
P96TRACE(("gfxmem is at 0x%x\n",gfxmemory));
-
- if (picasso_vidinfo.rgbformat == picasso96_state.RGBFormat)
+
+ if (picasso_vidinfo.rgbformat == picasso96_state.RGBFormat)
{
P96TRACE(("do_blit type-a\n"));
width *= Bpp;
- while (height-- > 0)
+ while (height-- > 0)
{
memcpy (dstp, srcp, width);
srcp += ri->BytesPerRow;
write_log ("ERROR: do_blit() failure, %d!\n", picasso96_state.RGBFormat);
goto out;
}
- while (height-- > 0)
+ while (height-- > 0)
{
unsigned int i;
- switch (psiz)
+ switch (psiz)
{
case 2:
for (i = 0; i < width; i++)
static void do_invertrect( struct RenderInfo *ri, int Bpp, int x, int y, int width, int height)
{
/* if(DX_InvertRect(x, y, width, height))
- return;*/ //deactivate in 0.8.20
+ return;*/ //deactivate in 0.8.20
P96TRACE(("do_invertrect falling back to do_blit!\n"));
do_blit (ri, Bpp, x, y, x, y, width, height, BLIT_SRC, 0);
}
if (! picasso_vidinfo.extra_mem) /* The "out" will flush the dirty lines directly */
goto out;
-
+
#ifdef LOCK_UNLOCK_MADNESS
dstp = picasso96_state.HostAddress;
P96TRACE(("flushing %d\n", wgfx_y));
#endif
src = gfxmemory + wgfx_min;
-
+
if(picasso_vidinfo.rgbformat == picasso96_state.RGBFormat)
{
#if P96TRACING_LEVEL > 0
write_log ("ERROR - wgfx_do_flushline() failure, %d!\n", picasso96_state.RGBFormat);
goto out;
}
-
+
dstp += wgfx_y * picasso_vidinfo.rowbytes + (wgfx_min - wgfx_linestart) * psiz;
switch (psiz) {
case 2:
goto out;
}
}
-
+
out:
#ifndef LOCK_UNLOCK_MADNESS
gfx_unlock_picasso ();
return 0;
if (ri->Memory != gfxmemory + (picasso96_state.Address - gfxmem_start))
return 0;
-
+
return 1;
}
/* Do our virtual frame-buffer memory. First, we do a single line fill by hand */
oldstart = start = src = ri->Memory + X * Bpp + Y * ri->BytesPerRow;
-
- switch (Bpp)
+
+ switch (Bpp)
{
case 1:
memset (start, Pen, Width);
break;
case 2:
- for (cols = 0; cols < Width; cols++)
+ for (cols = 0; cols < Width; cols++)
{
do_put_mem_word ((uae_u16 *)start, (uae_u16)Pen);
start += 2;
}
break;
case 3:
- for (cols = 0; cols < Width; cols++)
+ for (cols = 0; cols < Width; cols++)
{
do_put_mem_byte (start, (uae_u8)Pen);
start++;
}
break;
case 4:
- for (cols = 0; cols < Width; cols++)
+ for (cols = 0; cols < Width; cols++)
{
/**start = Pen; */
do_put_mem_long ((uae_u32 *)start, Pen);
if (vsyncgfxcount > 1) {
if (picasso_on) {
if (picasso96_state.RGBFormat == picasso_vidinfo.rgbformat
- || picasso96_state.RGBFormat == RGBFB_CHUNKY) {
+ || picasso96_state.RGBFormat == RGBFB_CHUNKY) {
static frame_time_t cycles;
blitcount++;
cycles = read_processor_time();
picasso_refresh(1);
vsyncgfxcount = 0;
- write_log("%d Blitnum %.3fms\n", blitcount,
+ write_log ("%d Blitnum %.3fms\n", blitcount,
(read_processor_time() - cycles) * 1000 / (double)syncbase);
}
}
{
struct RenderInfo ri;
static int beamcon0_before, p96refresh_was;
-
+
if (! picasso_on)
return;
{ //for higher P96 mousedraw rate
/* HACK until ntsc timing is fixed.. */
} //end for higher P96 mousedraw rate
have_done_picasso = 1;
-
+
/* Make sure that the first time we show a Picasso video mode, we don't blit any crap.
* We can do this by checking if we have an Address yet. */
if (picasso96_state.Address) {
height = picasso96_state.Height;
}
do_blit(&ri, picasso96_state.BytesPerPixel, 0, 0, 0, 0, width, height, BLIT_SRC, 0);
- }
+ }
else
{
write_log ("ERROR - picasso_refresh() can't refresh!\n");
unsigned long dstx, unsigned long dsty, unsigned long width, unsigned
long height, uae_u8 mask, BLIT_OPCODE opcode)
{
-
+
uae_u8 *src, *dst, *tmp, *tmp2, *tmp3;
uae_u8 Bpp = GetBytesPerPixel(ri->RGBFormat);
unsigned long total_width = width * Bpp;
{
write_log ("WARNING - BlitRect() has mask 0x%x with Bpp %d.\n", mask, Bpp);
}
-
- if (mask == 0xFF || Bpp > 1)
+
+ if (mask == 0xFF || Bpp > 1)
{
if(opcode == BLIT_SRC)
{
/* handle normal case efficiently */
- if (ri->Memory == dstri->Memory && dsty == srcy)
+ if (ri->Memory == dstri->Memory && dsty == srcy)
{
unsigned long i;
for (i = 0; i < height; i++, src += ri->BytesPerRow, dst += dstri->BytesPerRow)
memmove (dst, src, total_width);
}
- else if (dsty < srcy)
+ else if (dsty < srcy)
{
unsigned long i;
for (i = 0; i < height; i++, src += ri->BytesPerRow, dst += dstri->BytesPerRow)
uae_u32 *src2_32 = (uae_u32*)src;
uae_u32 *dst2_32 = (uae_u32*)dst;
unsigned int y;
-
+
for(y = 0; y < height; y++) /* Vertical lines */
{
uae_u8 *bound = src + total_width - 4;
*dst2_32 = ~(*src2_32 ^ *dst2_32);
break;
case BLIT_DST:
- write_log( "do_blitrect_frame_buffer shouldn't get BLIT_DST!\n");
+ write_log ( "do_blitrect_frame_buffer shouldn't get BLIT_DST!\n");
break;
case BLIT_NOTONLYSRC:
*dst2_32 = ~(*src2_32) | *dst2_32;
break;
case BLIT_SRC:
- write_log( "do_blitrect_frame_buffer shouldn't get BLIT_SRC!\n");
+ write_log ( "do_blitrect_frame_buffer shouldn't get BLIT_SRC!\n");
break;
case BLIT_NOTONLYDST:
*dst2_32 = ~(*dst2_32) | *src2_32;
*dst2_32 = 0xFFFFFFFF;
break;
case 30: //code for swap source with dest in byte
- {
+ {
uae_u32 temp;
temp = *src2_32;
*src2_32 = *dst2_32;
}
break;
case BLIT_LAST:
- write_log( "do_blitrect_frame_buffer shouldn't get BLIT_LAST!\n");
+ write_log ( "do_blitrect_frame_buffer shouldn't get BLIT_LAST!\n");
break;
} /* switch opcode */
}// for end
*dst2 = ~(*src2 ^ *dst2);
break;
case BLIT_DST:
- write_log( "do_blitrect_frame_buffer shouldn't get BLIT_DST!\n");
+ write_log ( "do_blitrect_frame_buffer shouldn't get BLIT_DST!\n");
break;
case BLIT_NOTONLYSRC:
*dst2 = ~(*src2) | *dst2;
break;
case BLIT_SRC:
- write_log( "do_blitrect_frame_buffer shouldn't get BLIT_SRC!\n");
+ write_log ( "do_blitrect_frame_buffer shouldn't get BLIT_SRC!\n");
break;
case BLIT_NOTONLYDST:
*dst2 = ~(*dst2) | *src2;
*dst2 = 0xFF;
break;
case BLIT_LAST:
- write_log( "do_blitrect_frame_buffer shouldn't get BLIT_LAST!\n");
+ write_log ( "do_blitrect_frame_buffer shouldn't get BLIT_LAST!\n");
break;
case 30: //code for swap source with dest in long
{
return;
/* copy the src-rect into our temporary buffer space */
- for (lines = 0; lines < height; lines++, src += ri->BytesPerRow, tmp2 += linewidth)
+ for (lines = 0; lines < height; lines++, src += ri->BytesPerRow, tmp2 += linewidth)
{
memcpy (tmp2, src, total_width);
}
/* copy the temporary buffer to the destination */
- for (lines = 0; lines < height; lines++, dst += dstri->BytesPerRow, tmp += linewidth)
+ for (lines = 0; lines < height; lines++, dst += dstri->BytesPerRow, tmp += linewidth)
{
unsigned long cols;
- for (cols = 0; cols < width; cols++)
+ for (cols = 0; cols < width; cols++)
{
dst[cols] &= ~mask;
dst[cols] |= tmp[cols] & mask;
}
/* free the temp-buf */
free (tmp3);
-}
+}
#if 0
/*
STATIC_INLINE void do_blitrect_frame_buffer( struct RenderInfo *ri, struct RenderInfo *dstri, unsigned long srcx, unsigned long srcy,
unsigned long dstx, unsigned long dsty, unsigned long width, unsigned long height, uae_u8 mask, BLIT_OPCODE opcode )
{
-
+
uae_u8 *src, *dst, *tmp, *tmp2, *tmp3;
uae_u8 Bpp = GetBytesPerPixel(ri->RGBFormat);
unsigned long total_width = width * Bpp;
{
write_log ("WARNING - BlitRect() has mask 0x%x with Bpp %d.\n", mask, Bpp);
}
-
- if (mask == 0xFF || Bpp > 1)
+
+ if (mask == 0xFF || Bpp > 1)
{
if( opcode == BLIT_SRC )
{
/* handle normal case efficiently */
- if (ri->Memory == dstri->Memory && dsty == srcy)
+ if (ri->Memory == dstri->Memory && dsty == srcy)
{
unsigned long i;
for (i = 0; i < height; i++, src += ri->BytesPerRow, dst += dstri->BytesPerRow)
memmove (dst, src, total_width);
}
- else if (dsty < srcy)
+ else if (dsty < srcy)
{
unsigned long i;
for (i = 0; i < height; i++, src += ri->BytesPerRow, dst += dstri->BytesPerRow)
uae_u8 *src2 = src;
uae_u8 *dst2 = dst;
unsigned int y;
-
+
for( y = 0; y < height; y++ ) /* Vertical lines */
{
for( src2 = src, dst2 = dst; src2 < src + total_width; src2++, dst2++ ) /* Horizontal bytes */
*dst2 = ~(*src2 ^ *dst2);
break;
case BLIT_DST:
- write_log( "do_blitrect_frame_buffer shouldn't get BLIT_DST!\n" );
+ write_log ( "do_blitrect_frame_buffer shouldn't get BLIT_DST!\n" );
break;
case BLIT_NOTONLYSRC:
*dst2 = ~(*src2) | *dst2;
break;
case BLIT_SRC:
- write_log( "do_blitrect_frame_buffer shouldn't get BLIT_SRC!\n" );
+ write_log ( "do_blitrect_frame_buffer shouldn't get BLIT_SRC!\n" );
break;
case BLIT_NOTONLYDST:
*dst2 = ~(*dst2) | *src2;
*dst2 = 0xFF;
break;
case BLIT_LAST:
- write_log( "do_blitrect_frame_buffer shouldn't get BLIT_LAST!\n" );
+ write_log ( "do_blitrect_frame_buffer shouldn't get BLIT_LAST!\n" );
break;
} /* switch opcode */
} /* for width */
return;
/* copy the src-rect into our temporary buffer space */
- for (lines = 0; lines < height; lines++, src += ri->BytesPerRow, tmp2 += linewidth)
+ for (lines = 0; lines < height; lines++, src += ri->BytesPerRow, tmp2 += linewidth)
{
memcpy (tmp2, src, total_width);
}
/* copy the temporary buffer to the destination */
- for (lines = 0; lines < height; lines++, dst += dstri->BytesPerRow, tmp += linewidth)
+ for (lines = 0; lines < height; lines++, dst += dstri->BytesPerRow, tmp += linewidth)
{
unsigned long cols;
- for (cols = 0; cols < width; cols++)
+ for (cols = 0; cols < width; cols++)
{
dst[cols] &= ~mask;
dst[cols] |= tmp[cols] & mask;
#endif
/*
-DrawLine:
-Synopsis: DrawLine(bi, ri, line, Mask, RGBFormat);
-Inputs: a0: struct BoardInfo *bi
-a1: struct RenderInfo *ri
-a2: struct Line *line
-d0.b: Mask
-d7.l: RGBFormat
+DrawLine:
+Synopsis: DrawLine(bi, ri, line, Mask, RGBFormat);
+Inputs: a0: struct BoardInfo *bi
+a1: struct RenderInfo *ri
+a2: struct Line *line
+d0.b: Mask
+d7.l: RGBFormat
This function is used to paint a line on the board memory possibly using the blitter. It is called by Draw
-and obeyes the destination RGBFormat as well as ForeGround and BackGround pens and draw modes.
+and obeyes the destination RGBFormat as well as ForeGround and BackGround pens and draw modes.
*/
uae_u32 REGPARAM2 picasso_DrawLine (struct regstruct *regs)
{
#ifdef P96_DRAWLINE
struct Line line;
struct RenderInfo ri;
- uae_u8 Mask = m68k_dreg(regs, 0);
- RGBFTYPE RGBFormat = m68k_dreg(regs, 7);
+ uae_u8 Mask = m68k_dreg (regs, 0);
+ RGBFTYPE RGBFormat = m68k_dreg (regs, 7);
- CopyRenderInfoStructureA2U(m68k_areg(regs, 1), &ri);
- CopyLineStructureA2U(m68k_areg(regs, 2), &line);
+ CopyRenderInfoStructureA2U(m68k_areg (regs, 1), &ri);
+ CopyLineStructureA2U(m68k_areg (regs, 2), &line);
#if defined( P96TRACING_ENABLED ) && P96TRACING_LEVEL > 0
DumpLine( &line );
#endif
#ifdef HARDWARE_SPRITE_EMULATION
/*
-SetSprite:
-Synopsis: SetSprite(bi, activate, RGBFormat);
-Inputs: a0: struct BoardInfo *bi
-d0: BOOL activate
-d7: RGBFTYPE RGBFormat
+SetSprite:
+Synopsis: SetSprite(bi, activate, RGBFormat);
+Inputs: a0: struct BoardInfo *bi
+d0: BOOL activate
+d7: RGBFTYPE RGBFormat
-This function activates or deactivates the hardware sprite.
+This function activates or deactivates the hardware sprite.
*/
uae_u32 picasso_SetSprite (void)
{
uae_u32 result = 0;
- uae_u32 activate = m68k_dreg( regs, 0 );
+ uae_u32 activate = m68k_dreg ( regs, 0 );
result = DX_ShowCursor( activate );
write_log ("SetSprite() - trying to %s cursor, result = %d\n", activate ? "show":"hide", result);
return result;
}
/*
-SetSpritePosition:
-Synopsis: SetSpritePosition(bi, RGBFormat);
-Inputs: a0: struct BoardInfo *bi
-d7: RGBFTYPE RGBFormat
+SetSpritePosition:
+Synopsis: SetSpritePosition(bi, RGBFormat);
+Inputs: a0: struct BoardInfo *bi
+d7: RGBFTYPE RGBFormat
This function sets the hardware mouse sprite position according to the values in the BoardInfo structure.
MouseX and MouseY are the coordinates relative to the screen bitmap. XOffset and YOffset must be subtracted
-to account for possible screen panning.
+to account for possible screen panning.
*/
uae_u32 picasso_SetSpritePosition (void)
{
uae_u32 result = 0;
- uaecptr bi = m68k_areg( regs, 0 );
- uae_u16 MouseX = get_word( bi + PSSO_BoardInfo_MouseX ) - picasso96_state.XOffset;
- uae_u16 MouseY = get_word( bi + PSSO_BoardInfo_MouseY ) - picasso96_state.YOffset;
-
+ uaecptr bi = m68k_areg ( regs, 0 );
+ uae_u16 MouseX = get_word ( bi + PSSO_BoardInfo_MouseX ) - picasso96_state.XOffset;
+ uae_u16 MouseY = get_word ( bi + PSSO_BoardInfo_MouseY ) - picasso96_state.YOffset;
+
// Keep these around, because we don't want flickering
static uae_u16 OldMouseX = -1;
static uae_u16 OldMouseY = -1;
}
/*
-SetSpriteImage:
-Synopsis: SetSpriteImage(bi, RGBFormat);
-Inputs: a0: struct BoardInfo *bi
-d7: RGBFTYPE RGBFormat
+SetSpriteImage:
+Synopsis: SetSpriteImage(bi, RGBFormat);
+Inputs: a0: struct BoardInfo *bi
+d7: RGBFTYPE RGBFormat
This function gets new sprite image data from the MouseImage field of the BoardInfo structure and writes
it to the board.
-There are three possible cases:
+There are three possible cases:
BIB_HIRESSPRITE is set:
skip the first two long words and the following sprite data is arranged as an array of two longwords. Those form the
-two bit planes for one image line respectively.
+two bit planes for one image line respectively.
BIB_HIRESSPRITE and BIB_BIGSPRITE are not set:
skip the first two words and the following sprite data is arranged as an array of two words. Those form the two
-bit planes for one image line respectively.
+bit planes for one image line respectively.
BIB_HIRESSPRITE is not set and BIB_BIGSPRITE is set:
skip the first two words and the following sprite data is arranged as an array of two words. Those form the two bit
planes for one image line respectively. You have to double each pixel horizontally and vertically. All coordinates
used in this case already assume a zoomed sprite, only the sprite data is not zoomed yet. You will have to
-compensate for this when accounting for hotspot offsets and sprite dimensions.
+compensate for this when accounting for hotspot offsets and sprite dimensions.
*/
uae_u32 picasso_SetSpriteImage (void)
{
}
/*
-SetSpriteColor:
-Synopsis: SetSpriteColor(bi, index, red, green, blue, RGBFormat);
-Inputs: a0: struct BoardInfo *bi
-d0.b: index
-d1.b: red
-d2.b: green
-d3.b: blue
-d7: RGBFTYPE RGBFormat
-
-This function changes one of the possible three colors of the hardware sprite.
+SetSpriteColor:
+Synopsis: SetSpriteColor(bi, index, red, green, blue, RGBFormat);
+Inputs: a0: struct BoardInfo *bi
+d0.b: index
+d1.b: red
+d2.b: green
+d3.b: blue
+d7: RGBFTYPE RGBFormat
+
+This function changes one of the possible three colors of the hardware sprite.
*/
uae_u32 picasso_SetSpriteColor (void)
{
uaecptr AmigaBoardInfo = m68k_areg (regs, 0);
/* NOTES: See BoardInfo struct definition in Picasso96 dev info */
-
+
if (allocated_gfxmem && !picasso96_state.CardFound) {
/* Fill in MemoryBase, MemorySize */
put_long (AmigaBoardInfo + PSSO_BoardInfo_MemoryBase, gfxmem_start);
}
uaememptr = gfxmem_xlate(amigamemptr); /* I know that amigamemptr is inside my gfxmem chunk, so I can just do the xlate() */
memset(uaememptr, 0, PSSO_ModeInfo_sizeof); /* zero out our ModeInfo struct */
-
+
put_word (amigamemptr + PSSO_ModeInfo_Width, dm->res.width);
put_word (amigamemptr + PSSO_ModeInfo_Height, dm->res.height);
put_byte (amigamemptr + PSSO_ModeInfo_Depth, dm->depth * 8);
put_word (amigamemptr + PSSO_ModeInfo_HorSyncSize, 0);
put_byte (amigamemptr + PSSO_ModeInfo_HorSyncSkew, 0);
put_byte (amigamemptr + PSSO_ModeInfo_HorEnableSkew, 0);
-
+
put_word (amigamemptr + PSSO_ModeInfo_VerTotal, dm->res.height);
put_word (amigamemptr + PSSO_ModeInfo_VerBlankSize, 0);
put_word (amigamemptr + PSSO_ModeInfo_VerSyncStart, 0);
put_word (amigamemptr + PSSO_ModeInfo_VerSyncSize, 0);
-
+
put_byte (amigamemptr + PSSO_ModeInfo_first_union, 98);
put_byte (amigamemptr + PSSO_ModeInfo_second_union, 14);
-
+
put_long (amigamemptr + PSSO_ModeInfo_PixelClock,
dm->res.width * dm->res.height * (currprefs.gfx_refreshrate ? abs (currprefs.gfx_refreshrate) : default_freq));
}
return 0x50001000 | (mi[i].id * 0x10000);
}
(*unkcnt)++;
- write_log("P96: Non-unique mode %dx%d\n", w, h);
+ write_log ("P96: Non-unique mode %dx%d\n", w, h);
return 0x51000000 - (*unkcnt) * 0x10000;
#if 0
int result;
put_word (AmigaBoardInfo + PSSO_BoardInfo_MaxVerResolution + 4, hicolour.height);
put_word (AmigaBoardInfo + PSSO_BoardInfo_MaxVerResolution + 6, truecolour.height);
put_word (AmigaBoardInfo + PSSO_BoardInfo_MaxVerResolution + 8, alphacolour.height);
-
+
i = 0;
unkcnt = 0;
- while (DisplayModes[i].depth >= 0) {
+ while (DisplayModes[i].depth >= 0) {
int j = i;
/* Add a LibResolution structure to the ResolutionsList MinList in our BoardInfo */
res.DisplayID = AssignModeID(i, LibResolutionStructureCount, &unkcnt);
res.Modes[HICOLOR] = 0;
res.Modes[TRUECOLOR] = 0;
res.Modes[TRUEALPHA] = 0;
-
+
do {
/* Handle this display mode's depth */
-
+
/* New: Only add the modes when there is enough P96 RTG memory to hold the bitmap */
if((allocated_gfxmem - 32768) >
(DisplayModes[i].res.width * DisplayModes[i].res.height * DisplayModes[i].depth))
} while (DisplayModes[i].depth >= 0
&& DisplayModes[i].res.width == DisplayModes[j].res.width
&& DisplayModes[i].res.height == DisplayModes[j].res.height);
-
+
amigamemptr = gfxmem_start + allocated_gfxmem - 16384 + (PSSO_LibResolution_sizeof * LibResolutionStructureCount++);
CopyLibResolutionStructureU2A (&res, amigamemptr);
#if defined P96TRACING_ENABLED && P96TRACING_LEVEL > 1
#endif
AmigaListAddTail (AmigaBoardInfo + PSSO_BoardInfo_ResolutionsList, amigamemptr);
}
-
+
return -1;
}
* whenever it is ready to change the screen state. */
picasso_requested_on = flag;
write_log ("SetSwitch() - trying to show %s screen\n", flag ? "picasso96":"amiga");
-
+
/* Put old switch-state in D0 */
return !flag;
static void init_picasso_screen(void);
void picasso_enablescreen (int on)
-{
+{
if (!init_picasso_screen_called)
init_picasso_screen();
wgfx_linestart = 0xFFFFFFFF;
int i;
uaecptr boardinfo = m68k_areg (regs, 0);
uaecptr clut = boardinfo + PSSO_BoardInfo_CLUT + start * 3;
-
+
for (i = start; i < start + count; i++) {
int r = get_byte (clut);
int g = get_byte (clut + 1);
int b = get_byte (clut + 2);
-
- palette_changed |= (picasso96_state.CLUT[i].Red != r
+
+ palette_changed |= (picasso96_state.CLUT[i].Red != r
|| picasso96_state.CLUT[i].Green != g
|| picasso96_state.CLUT[i].Blue != b);
-
- picasso96_state.CLUT[i].Red = r;
+
+ picasso96_state.CLUT[i].Red = r;
picasso96_state.CLUT[i].Green = g;
picasso96_state.CLUT[i].Blue = b;
clut += 3;
{
/* Fill in some static UAE related structure about this new DAC setting
* Lets us keep track of what pixel format the Amiga is thinking about in our frame-buffer */
-
+
P96TRACE(("SetDAC()\n"));
return 1;
}
if(set_panning_called) {
picasso96_state.Extent = picasso96_state.Address + picasso96_state.BytesPerRow * picasso96_state.VirtualHeight;
}
- if (set_gc_called) {
+ if (set_gc_called) {
gfx_set_picasso_modeinfo (picasso96_state.Width, picasso96_state.Height,
picasso96_state.GC_Depth, picasso96_state.RGBFormat);
}
(picasso_vidinfo.selected_rgbformat == picasso96_state.RGBFormat))
{
DX_SetPalette (0, 256);
- picasso_refresh (1);
+ picasso_refresh (1);
}
init_picasso_screen_called = 1;
}
/* Fill in some static UAE related structure about this new ModeInfo setting */
uae_u32 border = m68k_dreg (regs, 0);
uaecptr modeinfo = m68k_areg (regs, 1);
-
+
picasso96_state.Width = get_word (modeinfo + PSSO_ModeInfo_Width);
picasso96_state.VirtualWidth = picasso96_state.Width; /* in case SetPanning doesn't get called */
-
+
picasso96_state.Height = get_word (modeinfo + PSSO_ModeInfo_Height);
picasso96_state.VirtualHeight = picasso96_state.Height; /* in case SetPanning doesn't get called */
-
+
picasso96_state.GC_Depth = get_byte (modeinfo + PSSO_ModeInfo_Depth);
picasso96_state.GC_Flags = get_byte (modeinfo + PSSO_ModeInfo_Flags);
-
+
P96TRACE(("SetGC(%d,%d,%d,%d)\n", picasso96_state.Width, picasso96_state.Height, picasso96_state.GC_Depth, border));
set_gc_called = 1;
picasso96_state.HostAddress = NULL;
else
picasso96_state.BigAssBitmap = 0;
picasso96_state.BytesPerRow = picasso96_state.VirtualWidth * picasso96_state.BytesPerPixel;
-}
+}
uae_u32 REGPARAM2 picasso_SetPanning (struct regstruct *regs)
-{
+{
uae_u16 Width = m68k_dreg (regs, 0);
uaecptr start_of_screen = m68k_areg (regs, 1);
- uaecptr bi = m68k_areg(regs, 0);
- uaecptr bmeptr = get_long(bi + PSSO_BoardInfo_BitMapExtra); /* Get our BoardInfo ptr's BitMapExtra ptr */
+ uaecptr bi = m68k_areg (regs, 0);
+ uaecptr bmeptr = get_long (bi + PSSO_BoardInfo_BitMapExtra); /* Get our BoardInfo ptr's BitMapExtra ptr */
uae_u16 bme_width, bme_height;
if(oldscr == 0) {
- oldscr = start_of_screen;
+ oldscr = start_of_screen;
}
if (oldscr != start_of_screen) {
set_gc_called = 0;
oldscr = start_of_screen;
}
- bme_width = get_word(bmeptr + PSSO_BitMapExtra_Width);
- bme_height = get_word(bmeptr + PSSO_BitMapExtra_Height);
-
+ bme_width = get_word (bmeptr + PSSO_BitMapExtra_Width);
+ bme_height = get_word (bmeptr + PSSO_BitMapExtra_Height);
+
picasso96_state.Address = start_of_screen; /* Amiga-side address */
picasso96_state.XOffset = (uae_s16)(m68k_dreg (regs, 1) & 0xFFFF);
picasso96_state.YOffset = (uae_s16)(m68k_dreg (regs, 2) & 0xFFFF);
start_of_screen, picasso96_state.BytesPerRow, picasso96_state.BytesPerPixel, picasso96_state.RGBFormat));
init_picasso_screen ();
set_panning_called = 0;
-
+
return 1;
}
#if 0 && defined ALIGN_POINTER_TO32
int align_adjust = ALIGN_POINTER_TO32(ptr);
int len2;
-
+
len -= align_adjust;
while (align_adjust) {
*ptr ^= val;
/*
* InvertRect:
-*
+*
* Inputs:
* a0:struct BoardInfo *bi
* a1:struct RenderInfo *ri
* d3.w:Height
* d4.l:Mask
* d7.l:RGBFormat
-*
+*
* This function is used to invert a rectangular area on the board. It is called by BltBitMap,
* BltPattern and BltTemplate.
*/
unsigned long width_in_bytes;
uae_u32 result = 0;
-
+
#ifndef LOCK_UNLOCK_MADNESS
- wgfx_flushline ();
+ wgfx_flushline ();
#endif
-
+
if (CopyRenderInfoStructureA2U (renderinfo, &ri))
{
P96TRACE(("InvertRect %dbpp 0x%lx\n", Bpp, (long)mask));
-
- if (mask != 0xFF && Bpp > 1)
+
+ if (mask != 0xFF && Bpp > 1)
{
mask = 0xFF;
}
xorval = 0x01010101 * (mask & 0xFF);
width_in_bytes = Bpp * Width;
rectstart = uae_mem = ri.Memory + Y*ri.BytesPerRow + X*Bpp;
-
+
for (lines = 0; lines < Height; lines++, uae_mem += ri.BytesPerRow)
do_xor8 (uae_mem, width_in_bytes, xorval);
-
+
if (vsyncgfxwrite == 0) {
if (renderinfo_is_current_screen (&ri)) {
if (mask == 0xFF)
uae_u32 Pen = m68k_dreg (regs, 4);
uae_u8 Mask = (uae_u8)m68k_dreg (regs, 5);
RGBFTYPE RGBFormat = m68k_dreg (regs, 7);
-
+
uae_u8 *src;
uae_u8 *oldstart;
int Bpp;
#ifndef LOCK_UNLOCK_MADNESS
wgfx_flushline ();
#endif
-
+
if (CopyRenderInfoStructureA2U (renderinfo, &ri) && Y != 0xFFFF)
{
if (ri.RGBFormat != RGBFormat)
write_log ("Weird Stuff!\n");
-
+
Bpp = GetBytesPerPixel (RGBFormat);
-
+
P96TRACE(("FillRect(%d, %d, %d, %d) Pen 0x%x BPP %d BPR %d Mask 0x%x\n",
X, Y, Width, Height, Pen, Bpp, ri.BytesPerRow, Mask));
-
+
if(Bpp > 1)
Mask = 0xFF;
-
- if (Mask == 0xFF)
+
+ if (Mask == 0xFF)
{
if(Width == 1 || Height == 1)
{
{
src = ri.Memory + X * Bpp + Y * ri.BytesPerRow;
X = X - picasso96_state.XOffset;
- Y = Y - picasso96_state.YOffset;
+ Y = Y - picasso96_state.YOffset;
if((int)X < 0) { Width = Width + X; X = 0; }
if((int)Width < 1) return 1;
if((int)Y < 0) { Height = Height + Y; Y = 0; }
else
{
/* We get here only if Mask != 0xFF */
- if (Bpp != 1)
+ if (Bpp != 1)
{
- write_log( "WARNING - FillRect() has unhandled mask 0x%x with Bpp %d. Using fall-back routine.\n", Mask, Bpp );
+ write_log ( "WARNING - FillRect() has unhandled mask 0x%x with Bpp %d. Using fall-back routine.\n", Mask, Bpp );
}
else
{
{
uae_u8 *start = oldstart;
uae_u8 *end = start + Height * ri.BytesPerRow;
- for (; start != end; start += ri.BytesPerRow)
+ for (; start != end; start += ri.BytesPerRow)
{
uae_u8 *p = start;
unsigned long cols;
- for (cols = 0; cols < Width; cols++)
+ for (cols = 0; cols < Width; cols++)
{
uae_u32 tmpval = do_get_mem_byte (p + cols) & Mask;
do_put_mem_byte (p + cols, (uae_u8)(Pen | tmpval));
unsigned long height = blitrectdata.height;
uae_u8 mask = blitrectdata.mask;
BLIT_OPCODE opcode = blitrectdata.opcode;
-
+
uae_u8 Bpp = GetBytesPerPixel(ri->RGBFormat);
unsigned long total_width = width * Bpp;
unsigned long linewidth = (total_width + 15) & ~15;
int can_do_visible_blit = 0;
-
+
if(opcode == BLIT_DST)
{
- write_log( "WARNING: BlitRect() being called with opcode of BLIT_DST\n" );
+ write_log ( "WARNING: BlitRect() being called with opcode of BLIT_DST\n" );
return 1;
}
-
+
/*
* If we have no destination RenderInfo, then we're dealing with a single-buffer action, called
* from picasso_BlitRect(). The code in do_blitrect_frame_buffer() deals with the frame-buffer,
//if (dstri->Memory == ri->Memory)
if (dstri == NULL || dstri->Memory == ri->Memory)
{
- if(mask != 0xFF && Bpp > 1)
+ if(mask != 0xFF && Bpp > 1)
{
mask = 0xFF;
}
dstri = ri;
can_do_visible_blit = 1;
}
-
+
/* Do our virtual frame-buffer memory first */
do_blitrect_frame_buffer(ri, dstri, srcx, srcy, dstx, dsty, width, height, mask, opcode);
/* Now we do the on-screen display, if renderinfo points to it */
{
P96TRACE(("Did not do_blit 1 in BlitRect()\n"));
}
-
+
return 1;
}
blitrectdata.height = height;
blitrectdata.mask = mask;
blitrectdata.opcode = opcode;
-
+
return BlitRectHelper();
}
uae_u32 result = 0;
P96_SM_RW;
-
+
#ifndef LOCK_UNLOCK_MADNESS
- wgfx_flushline ();
+ wgfx_flushline ();
#endif
-
+
P96TRACE(("BlitRect(%d, %d, %d, %d, %d, %d, 0x%x)\n", srcx, srcy, dstx, dsty, width, height, Mask));
result = BlitRect(renderinfo, (uaecptr)NULL, srcx, srcy, dstx, dsty, width, height, Mask, BLIT_SRC);
uae_u32 result = 0;
P96_SM_RW;
-
+
#ifndef LOCK_UNLOCK_MADNESS
- wgfx_flushline ();
+ wgfx_flushline ();
#endif
P96TRACE(("BlitRectNoMaskComplete() op 0x%2x, xy(%4d,%4d) --> xy(%4d,%4d), wh(%4d,%4d)\n",
OpCode, srcx, srcy, dstx, dsty, width, height));
-
+
result = BlitRect(srcri, dstri, srcx, srcy, dstx, dsty, width, height, 0xFF, OpCode);
return result;
/*
* BlitPattern:
-*
+*
* Synopsis:BlitPattern(bi, ri, pattern, X, Y, Width, Height, Mask, RGBFormat);
* Inputs:
* a0:struct BoardInfo *bi
* d3.w:Height
* d4.w:Mask
* d7.l:RGBFormat
-*
+*
* This function is used to paint a pattern on the board memory using the blitter. It is called by
* BltPattern, if a AreaPtrn is used with positive AreaPtSz. The pattern consists of a b/w image
* using a single plane of image data which will be expanded repeatedly to the destination RGBFormat
uae_u32 result = 0;
P96_SM_RW;
-
+
#ifndef LOCK_UNLOCK_MADNESS
wgfx_flushline ();
#endif
-
+
if(CopyRenderInfoStructureA2U (rinf, &ri) && CopyPatternStructureA2U (pinf, &pattern))
{
Bpp = GetBytesPerPixel(ri.RGBFormat);
uae_mem = ri.Memory + Y * ri.BytesPerRow + X * Bpp; /* offset with address */
-
+
if (pattern.DrawMode & INVERS)
inversion = 1;
-
+
pattern.DrawMode &= 0x03;
- if (Mask != 0xFF)
+ if (Mask != 0xFF)
{
if(Bpp > 1)
Mask = 0xFF;
#endif
ysize_mask = (1 << pattern.Size) - 1;
xshift = pattern.XOffset & 15;
-
+
for (rows = 0; rows < H; rows++, uae_mem += ri.BytesPerRow) {
unsigned long prow = (rows + pattern.YOffset) & ysize_mask;
unsigned int d = do_get_mem_word (((uae_u16 *)pattern.Memory) + prow);
uae_u8 *uae_mem2 = uae_mem;
unsigned long cols;
-
+
if (xshift != 0)
d = (d << xshift) | (d >> (16 - xshift));
-
- for (cols = 0; cols < W; cols += 16, uae_mem2 += Bpp << 4)
+
+ for (cols = 0; cols < W; cols += 16, uae_mem2 += Bpp << 4)
{
long bits;
long max = W - cols;
unsigned int data = d;
-
+
if (max > 16)
max = 16;
-
- for (bits = 0; bits < max; bits++)
+
+ for (bits = 0; bits < max; bits++)
{
int bit_set = data & 0x8000;
data <<= 1;
case COMP:
if (bit_set) {
fgpen = pattern.FgPen;
-
+
switch (Bpp) {
case 1:
{
}
}
}
-
+
/* If we need to update a second-buffer (extra_mem is set), then do it only if visible! */
if (picasso_vidinfo.extra_mem && renderinfo_is_current_screen (&ri)) {
if (vsyncgfxwrite == 0)
#ifndef LOCK_UNLOCK_MADNESS
wgfx_flushline ();
#endif
-
+
if (CopyRenderInfoStructureA2U (rinf, &ri) && CopyTemplateStructureA2U (tmpl, &tmp))
{
Bpp = GetBytesPerPixel(ri.RGBFormat);
uae_mem = ri.Memory + Y*ri.BytesPerRow + X*Bpp; /* offset into address */
-
+
if (tmp.DrawMode & INVERS)
inversion = 1;
-
+
tmp.DrawMode &= 0x03;
- if (Mask != 0xFF)
+ if (Mask != 0xFF)
{
if(Bpp > 1)
Mask = 0xFF;
{
P96TRACE(("BlitTemplate() xy(%d,%d), wh(%d,%d) draw 0x%x fg 0x%x bg 0x%x \n",
X, Y, W, H, tmp.DrawMode, tmp.FgPen, tmp.BgPen));
-
+
bitoffset = tmp.XOffset % 8;
-
+
#if defined(P96TRACING_ENABLED) && (P96TRACING_LEVEL > 0)
DumpTemplate(&tmp, W, H);
#endif
-
+
tmpl_base = tmp.Memory + tmp.XOffset / 8;
-
+
for (rows = 0; rows < H; rows++, uae_mem += ri.BytesPerRow, tmpl_base += tmp.BytesPerRow) {
unsigned long cols;
uae_u8 *tmpl_mem = tmpl_base;
uae_u8 *uae_mem2 = uae_mem;
unsigned int data = *tmpl_mem;
-
+
for (cols = 0; cols < W; cols += 8, uae_mem2 += Bpp << 3) {
unsigned int byte;
long bits;
long max = W - cols;
-
+
if (max > 8)
max = 8;
-
+
data <<= 8;
data |= *++tmpl_mem;
-
+
byte = data >> (8 - bitoffset);
-
+
for (bits = 0; bits < max; bits++) {
int bit_set = (byte & 0x80);
byte <<= 1;
fgpen = tmp.BgPen;
if (bit_set)
fgpen = tmp.FgPen;
-
+
PixelWrite(uae_mem2, bits, fgpen, Bpp, Mask);
break;
case COMP:
if (bit_set) {
fgpen = tmp.FgPen;
-
+
switch (Bpp) {
case 1:
{
}
}
}
-
+
/* If we need to update a second-buffer (extra_mem is set), then do it only if visible! */
if(picasso_vidinfo.extra_mem && renderinfo_is_current_screen(&ri)) {
if (vsyncgfxwrite == 0)
do_blit(&ri, Bpp, X, Y, X, Y, W, H, BLIT_SRC, 0);
}
-
+
result = 1;
}
- }
+ }
return 1;
}
{
uae_u16 width = m68k_dreg (regs, 0);
uae_u32 type = m68k_dreg (regs, 7);
-
+
width = GetBytesPerPixel(type) * width;
P96TRACE(("CalculateBytesPerRow() = %d\n",width));
-
+
return width;
}
* a0: struct BoardInfo
* d0: BOOL state
* This function enables and disables the video display.
-*
+*
* NOTE: return the opposite of the state
*/
uae_u32 REGPARAM2 picasso_SetDisplay (struct regstruct *regs)
void picasso_handle_hsync (void)
{
static int p96hsync;
-
+
if (currprefs.gfxmem_size == 0)
return;
if (WIN32GFX_IsPicassoScreen () && currprefs.gfx_pfullscreen && currprefs.gfx_pvsync) {
uae_u8 mask)
{
int j;
-
+
uae_u8 *PLANAR[8], *image = ri->Memory + dstx * GetBytesPerPixel (ri->RGBFormat) + dsty * ri->BytesPerRow;
int Depth = bm->Depth;
unsigned long rows, bitoffset = srcx & 7;
long eol_offset;
-
- /* if (mask != 0xFF)
+
+ /* if (mask != 0xFF)
write_log ("P2C - pixel-width = %d, bit-offset = %d\n", width, bitoffset); */
-
+
/* Set up our bm->Planes[] pointers to the right horizontal offset */
for (j = 0; j < Depth; j++) {
uae_u8 *p = bm->Planes[j];
eol_offset = (long)bm->BytesPerRow - (long)((width + 7) >> 3);
for (rows = 0; rows < height; rows++, image += ri->BytesPerRow) {
unsigned long cols;
-
+
for (cols = 0; cols < width; cols += 8) {
int k;
uae_u32 a = 0, b = 0;
uae_u32 result = 0;
P96_SM_RW;
-
+
#ifndef LOCK_UNLOCK_MADNESS
wgfx_flushline ();
#endif
write_log ("ERROR - BlitPlanar2Chunky() has minterm 0x%x, which I don't handle. Using fall-back routine.\n",
minterm);
}
- else if(CopyRenderInfoStructureA2U (ri, &local_ri) &&
+ else if(CopyRenderInfoStructureA2U (ri, &local_ri) &&
CopyBitMapStructureA2U (bm, &local_bm))
{
P96TRACE(("BlitPlanar2Chunky(%d, %d, %d, %d, %d, %d) Minterm 0x%x, Mask 0x%x, Depth %d\n",
int Depth = bm->Depth;
unsigned long rows;
long eol_offset;
-
+
if(!bpp)
return;
-
+
/* Set up our bm->Planes[] pointers to the right horizontal offset */
for (j = 0; j < Depth; j++) {
uae_u8 *p = bm->Planes[j];
if ((mask & (1 << j)) == 0)
PLANAR[j] = &all_zeros_bitmap;
}
-
+
eol_offset = (long)bm->BytesPerRow - (long)((width + (srcx & 7)) >> 3);
for (rows = 0; rows < height; rows++, image += ri->BytesPerRow) {
unsigned long cols;
uae_u8 *image2 = image;
unsigned int bitoffs = 7 - (srcx & 7);
int i;
-
+
for (cols = 0; cols < width; cols ++) {
int v = 0, k;
for (k = 0; k < Depth; k++) {
v |= ((*PLANAR[k] >> bitoffs) & 1) << k;
}
}
-
+
switch (bpp) {
case 2:
do_put_mem_word ((uae_u16 *)image2, (uae_u16)(cim->Colors[v]));
}
}
}
-
+
for (i = 0; i < Depth; i++) {
if (PLANAR[i] != &all_zeros_bitmap && PLANAR[i] != &all_ones_bitmap) {
PLANAR[i] += eol_offset;
}
/*
-* BlitPlanar2Direct:
-*
+* BlitPlanar2Direct:
+*
* Synopsis:
* BlitPlanar2Direct(bi, bm, ri, cim, SrcX, SrcY, DstX, DstY, SizeX, SizeY, MinTerm, Mask);
* Inputs:
* d5.w:SizeY
* d6.b:MinTerm
* d7.b:Mask
-*
+*
* This function is currently used to blit from planar bitmaps within system memory to direct color
* bitmaps (15, 16, 24 or 32 bit) on the board. Watch out for plane pointers that are 0x00000000 (represents
* a plane with all bits "0") or 0xffffffff (represents a plane with all bits "1"). The ColorIndexMapping is
* used to map the color index of each pixel formed by the bits in the bitmap's planes to a direct color value
* which is written to the destination RenderInfo. The color mask and all colors within the mapping are words,
* triple bytes or longwords respectively similar to the color values used in FillRect(), BlitPattern() or
-* BlitTemplate().
+* BlitTemplate().
*/
uae_u32 REGPARAM2 picasso_BlitPlanar2Direct (struct regstruct *regs)
{
uae_u32 result = 0;
P96_SM_RW;
-
+
#ifndef LOCK_UNLOCK_MADNESS
wgfx_flushline ();
#endif
-
+
if (minterm != 0x0C) {
write_log ("WARNING - BlitPlanar2Direct() has unhandled op-code 0x%x. Using fall-back routine.\n",
minterm);
if (picasso96_state.RGBFormat != RGBFB_CHUNKY)
{
- write_log ("ERROR - flushpixels() has non RGBFB_CHUNKY mode!\n");
+ write_log ("ERROR - flushpixels() has non RGBFB_CHUNKY mode!\n");
return;
}
if (!picasso_vidinfo.extra_mem)
return;
for (i = 0; i < pixelcount; i++)
- {
- uaecptr addr = pixelbase[i].addr;
- uae_u32 value = pixelbase[i].value;
- int y = addr / picasso96_state.BytesPerRow;
- int xbytes = addr % picasso96_state.BytesPerRow;
-
+ {
+ uaecptr addr = pixelbase[i].addr;
+ uae_u32 value = pixelbase[i].value;
+ int y = addr / picasso96_state.BytesPerRow;
+ int xbytes = addr % picasso96_state.BytesPerRow;
+
if (xbytes < picasso96_state.Width * picasso96_state.BytesPerPixel && y < picasso96_state.Height)
- {
+ {
if(psiz == 4)
{
- uae_u8 *addr = dst + y * picasso_vidinfo.rowbytes + xbytes * 4;
- switch (pixelbase[i].size)
- {
+ uae_u8 *addr = dst + y * picasso_vidinfo.rowbytes + xbytes * 4;
+ switch (pixelbase[i].size)
+ {
case 4:
{
- *(uae_u32 *)addr = picasso_vidinfo.clut[value & 0xff];
- addr += 4;
- *(uae_u32 *)addr = picasso_vidinfo.clut[(value >> 8) & 0xff];
- addr += 4;
- *(uae_u32 *)addr = picasso_vidinfo.clut[(value >> 16) & 0xff];
- addr += 4;
- *(uae_u32 *)addr = picasso_vidinfo.clut[(value >> 24) & 0xff];
- break;
+ *(uae_u32 *)addr = picasso_vidinfo.clut[value & 0xff];
+ addr += 4;
+ *(uae_u32 *)addr = picasso_vidinfo.clut[(value >> 8) & 0xff];
+ addr += 4;
+ *(uae_u32 *)addr = picasso_vidinfo.clut[(value >> 16) & 0xff];
+ addr += 4;
+ *(uae_u32 *)addr = picasso_vidinfo.clut[(value >> 24) & 0xff];
+ break;
}
case 2:
{
- *(uae_u32 *)addr = picasso_vidinfo.clut[(value >> 8) & 0xff];
- addr += 4;
- *(uae_u32 *)addr = picasso_vidinfo.clut[value & 0xff];
- break;
+ *(uae_u32 *)addr = picasso_vidinfo.clut[(value >> 8) & 0xff];
+ addr += 4;
+ *(uae_u32 *)addr = picasso_vidinfo.clut[value & 0xff];
+ break;
}
case 1:
{
- *(uae_u32 *)addr = picasso_vidinfo.clut[value & 0xff];
- break;
+ *(uae_u32 *)addr = picasso_vidinfo.clut[value & 0xff];
+ break;
}
}
}
else
{
- uae_u8 *addr = dst + y * picasso_vidinfo.rowbytes + xbytes * 2;
+ uae_u8 *addr = dst + y * picasso_vidinfo.rowbytes + xbytes * 2;
- switch (pixelbase[i].size)
- {
+ switch (pixelbase[i].size)
+ {
case 4:
{
- *(uae_u16 *)addr = picasso_vidinfo.clut[value & 0xff];
- addr += 2;
- *(uae_u16 *)addr = picasso_vidinfo.clut[(value >> 8) & 0xff];
- addr += 2;
- *(uae_u16 *)addr = picasso_vidinfo.clut[(value >> 16) & 0xff];
- addr += 2;
- *(uae_u16 *)addr = picasso_vidinfo.clut[(value >> 24) & 0xff];
- break;
+ *(uae_u16 *)addr = picasso_vidinfo.clut[value & 0xff];
+ addr += 2;
+ *(uae_u16 *)addr = picasso_vidinfo.clut[(value >> 8) & 0xff];
+ addr += 2;
+ *(uae_u16 *)addr = picasso_vidinfo.clut[(value >> 16) & 0xff];
+ addr += 2;
+ *(uae_u16 *)addr = picasso_vidinfo.clut[(value >> 24) & 0xff];
+ break;
}
case 2:
{
}
case 1:
{
- *(uae_u16 *)addr = picasso_vidinfo.clut[value & 0xff];
- break;
- }
+ *(uae_u16 *)addr = picasso_vidinfo.clut[value & 0xff];
+ break;
+ }
}
}
}
ULONG_PTR gwwcnt;
if (!picasso_vidinfo.extra_mem)
- return;
+ return;
if (!gwwbuf) {
gwwbufsize = allocated_gfxmem / 4096 + 1;
gwwbuf = xmalloc (gwwbufsize * sizeof (void*));
for (j = 0; j < ps / 4; j++) {
int xbytes, y;
uae_u32 *dst2;
- y = addr / picasso96_state.BytesPerRow;
+ y = addr / picasso96_state.BytesPerRow;
xbytes = addr % picasso96_state.BytesPerRow;
dst2 = (uae_u32*)(dst + y * picasso_vidinfo.rowbytes + xbytes);
if (xbytes < rowwidth_dst && y < picasso96_state.Height)
int rowwidth_dst = picasso96_state.Width * picasso96_state.BytesPerPixel;
if (!picasso_vidinfo.extra_mem)
- return;
+ return;
for (i = 0; i < pixelcount; i++)
- {
- uaecptr addr = pixelbase[i].addr;
- uae_u32 value = pixelbase[i].value;
- if(addr > xminaddr && addr < xmaxaddr)
- {
+ {
+ uaecptr addr = pixelbase[i].addr;
+ uae_u32 value = pixelbase[i].value;
+ if(addr > xminaddr && addr < xmaxaddr)
+ {
switch (pixelbase[i].size)
{
- case 4:
+ case 4:
#ifdef SWAPSPEEDUP
- *(uae_u32 *)(ydestaddr + addr) = value;
- #else
- do_put_mem_long ((uae_u32 *)(ydestaddr + addr), value);
- #endif
- break;;
- case 2:
- do_put_mem_word ((uae_u16 *)(ydestaddr + addr), value);
- break;
- case 1:
- *(uae_u8 *)(ydestaddr + addr) = value;
- break;
+ *(uae_u32 *)(ydestaddr + addr) = value;
+ #else
+ do_put_mem_long ((uae_u32 *)(ydestaddr + addr), value);
+ #endif
+ break;;
+ case 2:
+ do_put_mem_word ((uae_u16 *)(ydestaddr + addr), value);
+ break;
+ case 1:
+ *(uae_u8 *)(ydestaddr + addr) = value;
+ break;
}
}
else
{
int xbytes, y;
- y = addr / picasso96_state.BytesPerRow;
+ y = addr / picasso96_state.BytesPerRow;
xbytes = addr % picasso96_state.BytesPerRow;
- xminaddr = y * picasso96_state.BytesPerRow;
+ xminaddr = y * picasso96_state.BytesPerRow;
xmaxaddr = xminaddr + rowwidth_src;
ydestaddr = dst + y * picasso_vidinfo.rowbytes - xminaddr;
-
+
if (xbytes < rowwidth_dst && y < picasso96_state.Height)
- {
- switch (pixelbase[i].size)
- {
+ {
+ switch (pixelbase[i].size)
+ {
case 4:
#ifdef SWAPSPEEDUP
*(uae_u32 *)(ydestaddr + addr) = value;
- #else
+ #else
do_put_mem_long ((uae_u32 *)(ydestaddr + addr), value);
- #endif
+ #endif
break;;
case 2:
do_put_mem_word ((uae_u16 *)(ydestaddr + addr), value);
break;
}
}
- else
+ else
{
- xmaxaddr = 0;
+ xmaxaddr = 0;
}
- }
+ }
}
}
{
uae_u8 *dst;
int lock = 0;
-
+
if (pixelcount == 0 && p96mode == 0)
return;
if (!picasso_on) {
if(DirectDraw_IsLocked() == FALSE) {
dst = gfx_lock_picasso ();
lock = 1;
- } else
+ } else
#endif
dst = picasso96_state.HostAddress;
if (dst) {
}
return;
#else
-#ifndef LOCK_UNLOCK_MADNESS
+#ifndef LOCK_UNLOCK_MADNESS
/*
* Several writes to successive memory locations are a common access pattern.
* Try to optimize it.
return;
addr -= picasso96_state.Address + (picasso96_state.XOffset * picasso96_state.BytesPerPixel)
+ (picasso96_state.YOffset * picasso96_state.BytesPerRow);
-
+
y = addr / picasso96_state.BytesPerRow;
xbytes = addr % picasso96_state.BytesPerRow;
x = xbytes / picasso96_state.BytesPerPixel;
-
+
#ifdef LOCK_UNLOCK_MADNESS
if (! picasso_vidinfo.extra_mem) {
pixelcount = 0;
return;
}
-
+
if (x < picasso96_state.Width && y < picasso96_state.Height) {
dst = picasso96_state.HostAddress;
if (dst) {
do_put_mem_word ((uae_u16 *)(dst + y * picasso_vidinfo.rowbytes + xbytes), value);
break;
case 4:
- do_put_mem_long ((uae_u32 *)(dst + y * picasso_vidinfo.rowbytes + xbytes), value);
+ do_put_mem_long ((uae_u32 *)(dst + y * picasso_vidinfo.rowbytes + xbytes), value);
break;
}
}
addr &= gfxmem_mask;
m = (uae_u16 *)(gfxmemory + addr);
do_put_mem_word(m, (uae_u16)w);
-
+
/* write the word to our displayable memory */
if (vsyncgfxwrite == 0)
write_gfx_x(addr, w, 2);
addr -= gfxmem_start & gfxmem_mask;
addr &= gfxmem_mask;
gfxmemory[addr] = b;
-
+
/* write the byte to our displayable memory */
if (vsyncgfxwrite == 0)
write_gfx_x(addr, b, 1);
oldscr=0;
//fastscreen
memset (&picasso96_state, 0, sizeof(struct picasso96_state_struct));
-
+
if (1) {
int i, count;
-
+
for (i = 0; i < 256; i++) {
p2ctab[i][0] = (((i & 128) ? 0x01000000 : 0)
| ((i & 64) ? 0x010000 : 0)
init_picasso_screen_called = 0;
set_gc_called = !!(flags & 2);
set_panning_called = !!(flags & 4);
- changed_prefs.gfxmem_size = restore_u32();
+ changed_prefs.gfxmem_size = restore_u32();
picasso96_state.Address = restore_u32();
picasso96_state.RGBFormat = restore_u32();
picasso96_state.Width = restore_u16();
typedef enum {
GCT_Unknown,
GCT_ET4000,
- GCT_ETW32,
+ GCT_ETW32,
GCT_CirrusGD542x,
- GCT_NCR77C32BLT,
+ GCT_NCR77C32BLT,
GCT_CirrusGD5446,
GCT_CirrusGD5434,
GCT_S3Trio64,
#include "options.h"
#include "threaddep/thread.h"
-#include "memory.h"
+#include "memory.h"
#include "custom.h"
#include "events.h"
#include "newcpu.h"
#include "picasso96_win.h"
#include "win32gfx.h"
-int p96hack_vpos, p96hack_vpos2, p96refresh_active;
+int p96hack_vpos, p96hack_vpos2, p96refresh_active;
int have_done_picasso; /* For the JIT compiler */
-static int vsyncgfxwrite = 0;
+static int vsyncgfxwrite = 0;
static int p96syncrate, vsyncgfxcount;
static int p96hsync_counter;
return;
v = get_long (4); // execbase
v += 378; // liblist
- while ((v = get_long(v))) {
- uae_u32 v2 = get_long(v + 10); // name
+ while ((v = get_long (v))) {
+ uae_u32 v2 = get_long (v + 10); // name
uae_u8 *p;
addrbank *b = &get_mem_bank(v2);
if (!b || !b->check (v2, 12))
continue;
p = b->xlateaddr(v2);
if (!memcmp(p, "rtg.library\0", 12)) {
- uae_u16 ver = get_word(v + 20);
- uae_u16 rev = get_word(v + 22);
+ uae_u16 ver = get_word (v + 20);
+ uae_u16 rev = get_word (v + 22);
if (ver * 10000 + rev < UAE_RTG_LIBRARY_VERSION * 10000 + UAE_RTG_LIBRARY_REVISION) {
char msg[2000];
WIN32GUI_LoadUIString(IDS_OLDRTGLIBRARY, msg, sizeof(msg));
gui_message(msg, ver, rev, UAE_RTG_LIBRARY_VERSION, UAE_RTG_LIBRARY_REVISION);
} else {
- write_log("P96: rtg.library %d.%d detected\n", ver, rev);
+ write_log ("P96: rtg.library %d.%d detected\n", ver, rev);
}
checked = TRUE;
}
#ifdef LOCK_UNLOCK_MADNESS
#if defined(P96TRACING_ENABLED) && P96TRACING_LEVEL > 1
// This format of output lets you double-click and jump to file/line
- write_log("%s(%d) : calling P96 UNLOCK with picasso_on=%d\n", filename, linenum, picasso_on);
+ write_log ("%s(%d) : calling P96 UNLOCK with picasso_on=%d\n", filename, linenum, picasso_on);
#endif
if(picasso_on) {
#ifdef PIXEL_LOCK
flushpixels();
-#endif
+#endif
gfx_unlock_picasso ();
picasso96_state.HostAddress = NULL;
}
#ifdef LOCK_UNLOCK_MADNESS
#if defined(P96TRACING_ENABLED) && P96TRACING_LEVEL > 1
// This format of output lets you double-click and jump to file/line
- write_log( "%s(%d) : calling P96 LOCK with picasso_on=%d\n", filename, linenum, picasso_on );
+ write_log ( "%s(%d) : calling P96 LOCK with picasso_on=%d\n", filename, linenum, picasso_on );
#endif
if(picasso_on) {
picasso96_state.HostAddress = gfx_lock_picasso ();
int i;
uaecptr amigamodeinfoptr;
struct LibResolution *uaememptr = (struct LibResolution *)get_mem_bank(amigalibresptr).xlateaddr(amigalibresptr);
-
+
write_log ("LibResolution Structure Dump:\n");
-
+
if (get_long (amigalibresptr + PSSO_LibResolution_DisplayID) == 0xFFFFFFFF) {
write_log (" Finished With LibResolutions...\n");
} else {
static void DumpLine( struct Line *line )
{
if(line) {
- write_log("Line->X = %d\n", line->X);
- write_log("Line->Y = %d\n", line->Y);
- write_log("Line->Length = %d\n", line->Length);
- write_log("Line->dX = %d\n", line->dX);
- write_log("Line->dY = %d\n", line->dY);
- write_log("Line->sDelta = %d\n", line->sDelta);
- write_log("Line->lDelta = %d\n", line->lDelta);
- write_log("Line->twoSDminusLD = %d\n", line->twoSDminusLD);
- write_log("Line->LinePtrn = %d\n", line->LinePtrn);
- write_log("Line->PatternShift = %d\n", line->PatternShift);
- write_log("Line->FgPen = 0x%x\n", line->FgPen);
- write_log("Line->BgPen = 0x%x\n", line->BgPen);
- write_log("Line->Horizontal = %d\n", line->Horizontal);
- write_log("Line->DrawMode = %d\n", line->DrawMode);
- write_log("Line->Xorigin = %d\n", line->Xorigin);
- write_log("Line->Yorigin = %d\n", line->Yorigin);
+ write_log ("Line->X = %d\n", line->X);
+ write_log ("Line->Y = %d\n", line->Y);
+ write_log ("Line->Length = %d\n", line->Length);
+ write_log ("Line->dX = %d\n", line->dX);
+ write_log ("Line->dY = %d\n", line->dY);
+ write_log ("Line->sDelta = %d\n", line->sDelta);
+ write_log ("Line->lDelta = %d\n", line->lDelta);
+ write_log ("Line->twoSDminusLD = %d\n", line->twoSDminusLD);
+ write_log ("Line->LinePtrn = %d\n", line->LinePtrn);
+ write_log ("Line->PatternShift = %d\n", line->PatternShift);
+ write_log ("Line->FgPen = 0x%x\n", line->FgPen);
+ write_log ("Line->BgPen = 0x%x\n", line->BgPen);
+ write_log ("Line->Horizontal = %d\n", line->Horizontal);
+ write_log ("Line->DrawMode = %d\n", line->DrawMode);
+ write_log ("Line->Xorigin = %d\n", line->Xorigin);
+ write_log ("Line->Yorigin = %d\n", line->Yorigin);
}
}
#endif
static void ShowSupportedResolutions (void)
{
int i = 0;
-
+
write_log ("-----------------\n");
while (DisplayModes[i].depth >= 0) {
write_log ("%s\n", DisplayModes[i].name);
switch (RGBfmt) {
case RGBFB_CLUT:
return 1;
-
+
case RGBFB_A8R8G8B8:
case RGBFB_A8B8G8R8:
case RGBFB_R8G8B8A8:
case RGBFB_B8G8R8A8:
return 4;
-
+
case RGBFB_B8G8R8:
case RGBFB_R8G8B8:
return 3;
-
+
case RGBFB_R5G5B5:
case RGBFB_R5G6B5:
case RGBFB_R5G6B5PC:
static int CopyRenderInfoStructureA2U (uaecptr amigamemptr, struct RenderInfo *ri)
{
uaecptr memp = get_long (amigamemptr + PSSO_RenderInfo_Memory);
-
+
if (valid_address (memp, PSSO_RenderInfo_sizeof)) {
ri->Memory = get_real_address (memp);
ri->BytesPerRow = get_word (amigamemptr + PSSO_RenderInfo_BytesPerRow);
static int CopyBitMapStructureA2U (uaecptr amigamemptr, struct BitMap *bm)
{
int i;
-
+
bm->BytesPerRow = get_word (amigamemptr + PSSO_BitMap_BytesPerRow);
bm->Rows = get_word (amigamemptr + PSSO_BitMap_Rows);
bm->Flags = get_byte (amigamemptr + PSSO_BitMap_Flags);
bm->Depth = get_byte (amigamemptr + PSSO_BitMap_Depth);
-
+
/* ARGH - why is THIS happening? */
if(bm->Depth > 8)
bm->Depth = 8;
-
+
for (i = 0; i < bm->Depth; i++) {
uaecptr plane = get_long (amigamemptr + PSSO_BitMap_Planes + i * 4);
switch (plane) {
static int CopyTemplateStructureA2U (uaecptr amigamemptr, struct Template *tmpl)
{
uaecptr memp = get_long (amigamemptr + PSSO_Template_Memory);
-
+
if (valid_address (memp, sizeof(struct Template))) {
tmpl->Memory = get_real_address (memp);
tmpl->BytesPerRow = get_word (amigamemptr + PSSO_Template_BytesPerRow);
static int CopyLineStructureA2U(uaecptr amigamemptr, struct Line *line)
{
if(valid_address(amigamemptr, sizeof(struct Line))) {
- line->X = get_word(amigamemptr + PSSO_Line_X);
- line->Y = get_word(amigamemptr + PSSO_Line_Y);
- line->Length = get_word(amigamemptr + PSSO_Line_Length);
- line->dX = get_word(amigamemptr + PSSO_Line_dX);
- line->dY = get_word(amigamemptr + PSSO_Line_dY);
- line->lDelta = get_word(amigamemptr + PSSO_Line_lDelta);
- line->sDelta = get_word(amigamemptr + PSSO_Line_sDelta);
- line->twoSDminusLD = get_word(amigamemptr + PSSO_Line_twoSDminusLD);
- line->LinePtrn = get_word(amigamemptr + PSSO_Line_LinePtrn);
- line->PatternShift = get_word(amigamemptr + PSSO_Line_PatternShift);
- line->FgPen = get_long(amigamemptr + PSSO_Line_FgPen);
- line->BgPen = get_long(amigamemptr + PSSO_Line_BgPen);
- line->Horizontal = get_word(amigamemptr + PSSO_Line_Horizontal);
- line->DrawMode = get_byte(amigamemptr + PSSO_Line_DrawMode);
- line->Xorigin = get_word(amigamemptr + PSSO_Line_Xorigin);
- line->Yorigin = get_word(amigamemptr + PSSO_Line_Yorigin);
+ line->X = get_word (amigamemptr + PSSO_Line_X);
+ line->Y = get_word (amigamemptr + PSSO_Line_Y);
+ line->Length = get_word (amigamemptr + PSSO_Line_Length);
+ line->dX = get_word (amigamemptr + PSSO_Line_dX);
+ line->dY = get_word (amigamemptr + PSSO_Line_dY);
+ line->lDelta = get_word (amigamemptr + PSSO_Line_lDelta);
+ line->sDelta = get_word (amigamemptr + PSSO_Line_sDelta);
+ line->twoSDminusLD = get_word (amigamemptr + PSSO_Line_twoSDminusLD);
+ line->LinePtrn = get_word (amigamemptr + PSSO_Line_LinePtrn);
+ line->PatternShift = get_word (amigamemptr + PSSO_Line_PatternShift);
+ line->FgPen = get_long (amigamemptr + PSSO_Line_FgPen);
+ line->BgPen = get_long (amigamemptr + PSSO_Line_BgPen);
+ line->Horizontal = get_word (amigamemptr + PSSO_Line_Horizontal);
+ line->DrawMode = get_byte (amigamemptr + PSSO_Line_DrawMode);
+ line->Xorigin = get_word (amigamemptr + PSSO_Line_Xorigin);
+ line->Yorigin = get_word (amigamemptr + PSSO_Line_Yorigin);
return 1;
}
- write_log("ERROR - Invalid Line structure...\n");
+ write_log ("ERROR - Invalid Line structure...\n");
return 0;
}
{
char *uaememptr = 0;
int i;
-
+
uaememptr = gfxmem_xlate (amigamemptr); /* I know that amigamemptr is inside my gfxmem chunk, so I can just do the xlate() */
memset (uaememptr, 0, PSSO_LibResolution_sizeof); /* zero out our LibResolution structure */
strcpy (uaememptr + PSSO_LibResolution_P96ID, libres->P96ID);
/* Try OS specific fillrect function here; and return if successful. Make sure we adjust for
* the pen values if we're doing 8-bit display-emulation on a 16-bit or higher screen. */
#ifdef PIXEL_LOCK
- flushpixels();
+ flushpixels();
#endif
if(picasso_vidinfo.rgbformat == picasso96_state.RGBFormat) {
if(DX_Fill(x, y, width, height, pen, rgbtype))
return;
- } else {
+ } else {
if(DX_Fill(x, y, width, height, picasso_vidinfo.clut[src[0]], rgbtype))
return;
}
P96TRACE(("P96_WARNING: do_fillrect() using fall-back routine!\n"));
-
+
if(y + height > picasso_vidinfo.height)
height = picasso_vidinfo.height - y;
if(x + width > picasso_vidinfo.width)
if (! picasso_vidinfo.extra_mem)
return;
-
+
#ifdef LOCK_UNLOCK_MADNESS
PICASSO96_Lock();
dst = picasso96_state.HostAddress;
#endif
if (!dst)
goto out;
-
+
width *= Bpp;
dst += y * picasso_vidinfo.rowbytes + x * picasso_vidinfo.pixbytes;
- if (picasso_vidinfo.rgbformat == picasso96_state.RGBFormat)
+ if (picasso_vidinfo.rgbformat == picasso96_state.RGBFormat)
{
if(Bpp == 1)
{
{
memset(dst, pen, width);
dst += picasso_vidinfo.rowbytes;
- }
+ }
}
else
{
{
memcpy (dst, src, width);
dst += picasso_vidinfo.rowbytes;
- }
+ }
}
}
else
write_log ("ERROR - do_fillrect() calling abort 1!\n");
abort ();
}
-
- while (height-- > 0)
+
+ while (height-- > 0)
{
unsigned int i;
- switch (psiz)
+ switch (psiz)
{
case 2:
for (i = 0; i < width; i++)
break;
default:
write_log ("ERROR - do_fillrect() calling abort 2!\n");
- abort ();
+ abort ();
break;
}
dst += picasso_vidinfo.rowbytes;
* must do it by hand using the data in the frame-buffer, calculated using
* the RenderInfo data and our coordinates.
*/
-static void do_blit(struct RenderInfo *ri, int Bpp,
- unsigned int srcx, unsigned int srcy,
+static void do_blit(struct RenderInfo *ri, int Bpp,
+ unsigned int srcx, unsigned int srcy,
unsigned int dstx, unsigned int dsty,
unsigned int width, unsigned int height,
BLIT_OPCODE opcode, int can_do_blit)
} //hack to use cpu rotines for scrolling in big Screens
if (picasso96_state.XOffset < 0)
can_do_blit = 0;
-
+
dstx = dstx - picasso96_state.XOffset;
dsty = dsty - picasso96_state.YOffset;
if((int)dstx <= 0) {
srcy = dsty;
}
if (opcode != BLIT_SRC) {
- write_log("do_blit() opcode = %d!\n", opcode);
+ write_log ("do_blit() opcode = %d!\n", opcode);
return;
}
{
#ifdef LOCK_UNLOCK_MADNESS
goto out;
- #else
+ #else
return;
#endif
}
write_log ("WARNING: do_blit() couldn't lock\n");
goto out;
}
-
+
/* The areas can't overlap: the source is always in the Picasso frame buffer,
* and the destination is a different buffer owned by the graphics code. */
dstp += dsty * picasso_vidinfo.rowbytes + dstx * picasso_vidinfo.pixbytes;
P96TRACE(("do_blit with srcp %p, dstp %p, dst_rowbytes %d, srcx %d, srcy %d, dstx %d, dsty %d, w %d, h %d, dst_pixbytes %d\n",
srcp, dstp, picasso_vidinfo.rowbytes, srcx, srcy, dstx, dsty, width, height, picasso_vidinfo.pixbytes));
P96TRACE(("gfxmem is at %p\n", gfxmemory));
-
- if (picasso_vidinfo.rgbformat == picasso96_state.RGBFormat)
+
+ if (picasso_vidinfo.rgbformat == picasso96_state.RGBFormat)
{
P96TRACE(("do_blit type-a\n"));
width *= Bpp;
- while (height-- > 0)
+ while (height-- > 0)
{
memcpy (dstp, srcp, width);
srcp += ri->BytesPerRow;
write_log ("ERROR: do_blit() calling abort 1!\n");
abort ();
}
- while (height-- > 0)
+ while (height-- > 0)
{
unsigned int i;
- switch (psiz)
+ switch (psiz)
{
case 2:
for (i = 0; i < width; i++)
static void do_invertrect(struct RenderInfo *ri, int Bpp, int x, int y, int width, int height)
{
/* if(DX_InvertRect(x, y, width, height))
- return;*/ //deactivate in 0.8.20
+ return;*/ //deactivate in 0.8.20
P96TRACE(("do_invertrect falling back to do_blit!\n"));
do_blit (ri, Bpp, x, y, x, y, width, height, BLIT_SRC, 0);
}
if (! picasso_vidinfo.extra_mem) /* The "out" will flush the dirty lines directly */
goto out;
-
+
#ifdef LOCK_UNLOCK_MADNESS
dstp = picasso96_state.HostAddress;
#else
#endif
src = gfxmemory + wgfx_min;
-
+
if(picasso_vidinfo.rgbformat == picasso96_state.RGBFormat)
{
#if P96TRACING_LEVEL > 0
write_log ("ERROR - wgfx_do_flushline() calling abort 1!\n");
abort ();
}
-
+
dstp += wgfx_y * picasso_vidinfo.rowbytes + (wgfx_min - wgfx_linestart) * psiz;
switch (psiz) {
case 2:
break;
default:
write_log ("ERROR - wgfx_do_flushline() calling abort 2!\n");
- abort ();
+ abort ();
break;
}
}
-
+
out:
#ifndef LOCK_UNLOCK_MADNESS
gfx_unlock_picasso ();
return 0;
if (ri->Memory != gfxmemory + (picasso96_state.Address - gfxmem_start))
return 0;
-
+
return 1;
}
/* Do our virtual frame-buffer memory. First, we do a single line fill by hand */
oldstart = start = src = ri->Memory + X * Bpp + Y * ri->BytesPerRow;
-
- switch (Bpp)
+
+ switch (Bpp)
{
case 1:
memset (start, Pen, Width);
break;
case 2:
- for (cols = 0; cols < Width; cols++)
+ for (cols = 0; cols < Width; cols++)
{
do_put_mem_word ((uae_u16 *)start, (uae_u16)Pen);
start += 2;
}
break;
case 3:
- for (cols = 0; cols < Width; cols++)
+ for (cols = 0; cols < Width; cols++)
{
do_put_mem_byte (start, (uae_u8)Pen);
start++;
}
break;
case 4:
- for (cols = 0; cols < Width; cols++)
+ for (cols = 0; cols < Width; cols++)
{
/**start = Pen; */
do_put_mem_long ((uae_u32 *)start, Pen);
if (vsyncgfxcount > 1) {
if (picasso_on) {
if (picasso96_state.RGBFormat == picasso_vidinfo.rgbformat
- || picasso96_state.RGBFormat == RGBFB_CHUNKY) {
+ || picasso96_state.RGBFormat == RGBFB_CHUNKY) {
static frame_time_t cycles;
blitcount++;
cycles = read_processor_time();
picasso_refresh(1);
vsyncgfxcount = 0;
- write_log("%d Blitnum %.3fms\n", blitcount,
+ write_log ("%d Blitnum %.3fms\n", blitcount,
(read_processor_time() - cycles) * 1000 / (double)syncbase);
}
}
height = picasso96_state.Height;
}
do_blit(&ri, picasso96_state.BytesPerPixel, 0, 0, 0, 0, width, height, BLIT_SRC, 0);
- }
+ }
else
{
write_log ("ERROR - picasso_refresh() can't refresh!\n");
unsigned long width, unsigned long height,
uae_u8 mask, BLIT_OPCODE opcode)
{
-
+
uae_u8 *src, *dst, *tmp, *tmp2, *tmp3;
uae_u8 Bpp = GetBytesPerPixel(ri->RGBFormat);
unsigned long total_width = width * Bpp;
{
write_log ("WARNING - BlitRect() has mask 0x%x with Bpp %d.\n", mask, Bpp);
}
-
- if (mask == 0xFF || Bpp > 1)
+
+ if (mask == 0xFF || Bpp > 1)
{
if(opcode == BLIT_SRC)
{
for (i = 0; i < height; i++, src += ri->BytesPerRow, dst += dstri->BytesPerRow)
memmove (dst, src, total_width);
}
- else if (dsty < srcy)
+ else if (dsty < srcy)
{
unsigned long i;
for (i = 0; i < height; i++, src += ri->BytesPerRow, dst += dstri->BytesPerRow)
*dst2_32 = ~(*src2_32 ^ *dst2_32);
break;
case BLIT_DST:
- write_log( "do_blitrect_frame_buffer shouldn't get BLIT_DST!\n");
+ write_log ( "do_blitrect_frame_buffer shouldn't get BLIT_DST!\n");
break;
case BLIT_NOTONLYSRC:
*dst2_32 = ~(*src2_32) | *dst2_32;
break;
case BLIT_SRC:
- write_log( "do_blitrect_frame_buffer shouldn't get BLIT_SRC!\n");
+ write_log ( "do_blitrect_frame_buffer shouldn't get BLIT_SRC!\n");
break;
case BLIT_NOTONLYDST:
*dst2_32 = ~(*dst2_32) | *src2_32;
*dst2_32 = 0xFFFFFFFF;
break;
case 30: //code for swap source with dest in byte
- {
+ {
uae_u32 temp;
temp = *src2_32;
*src2_32 = *dst2_32;
}
break;
case BLIT_LAST:
- write_log( "do_blitrect_frame_buffer shouldn't get BLIT_LAST!\n");
+ write_log ( "do_blitrect_frame_buffer shouldn't get BLIT_LAST!\n");
break;
} /* switch opcode */
}// for end
*dst2 = ~(*src2 ^ *dst2);
break;
case BLIT_DST:
- write_log("do_blitrect_frame_buffer shouldn't get BLIT_DST!\n");
+ write_log ("do_blitrect_frame_buffer shouldn't get BLIT_DST!\n");
break;
case BLIT_NOTONLYSRC:
*dst2 = ~(*src2) | *dst2;
break;
case BLIT_SRC:
- write_log("do_blitrect_frame_buffer shouldn't get BLIT_SRC!\n");
+ write_log ("do_blitrect_frame_buffer shouldn't get BLIT_SRC!\n");
break;
case BLIT_NOTONLYDST:
*dst2 = ~(*dst2) | *src2;
*dst2 = 0xFF;
break;
case BLIT_LAST:
- write_log("do_blitrect_frame_buffer shouldn't get BLIT_LAST!\n");
+ write_log ("do_blitrect_frame_buffer shouldn't get BLIT_LAST!\n");
break;
case 30: //code for swap source with dest in long
{
tmp3 = tmp2 = tmp = xmalloc (linewidth * height); /* allocate enough memory for the src-rect */
if (!tmp)
- return;
+ return;
/* copy the src-rect into our temporary buffer space */
- for (lines = 0; lines < height; lines++, src += ri->BytesPerRow, tmp2 += linewidth)
+ for (lines = 0; lines < height; lines++, src += ri->BytesPerRow, tmp2 += linewidth)
{
memcpy (tmp2, src, total_width);
}
/* copy the temporary buffer to the destination */
- for (lines = 0; lines < height; lines++, dst += dstri->BytesPerRow, tmp+= linewidth)
+ for (lines = 0; lines < height; lines++, dst += dstri->BytesPerRow, tmp+= linewidth)
{
unsigned long cols;
- for (cols = 0; cols < width; cols++)
+ for (cols = 0; cols < width; cols++)
{
dst[cols] &= ~mask;
dst[cols] |= tmp[cols] & mask;
}
/* free the temp-buf */
xfree (tmp3);
-}
+}
/*
-DrawLine:
-Synopsis: DrawLine(bi, ri, line, Mask, RGBFormat);
-Inputs: a0: struct BoardInfo *bi
-a1: struct RenderInfo *ri
-a2: struct Line *line
-d0.b: Mask
-d7.l: RGBFormat
+DrawLine:
+Synopsis: DrawLine(bi, ri, line, Mask, RGBFormat);
+Inputs: a0: struct BoardInfo *bi
+a1: struct RenderInfo *ri
+a2: struct Line *line
+d0.b: Mask
+d7.l: RGBFormat
This function is used to paint a line on the board memory possibly using the blitter. It is called by Draw
-and obeyes the destination RGBFormat as well as ForeGround and BackGround pens and draw modes.
+and obeyes the destination RGBFormat as well as ForeGround and BackGround pens and draw modes.
*/
uae_u32 REGPARAM2 picasso_DrawLine (struct regstruct *regs)
{
#ifdef P96_DRAWLINE
struct Line line;
struct RenderInfo ri;
- uae_u8 Mask = m68k_dreg(regs, 0);
- RGBFTYPE RGBFormat = m68k_dreg(regs, 7);
+ uae_u8 Mask = m68k_dreg (regs, 0);
+ RGBFTYPE RGBFormat = m68k_dreg (regs, 7);
- CopyRenderInfoStructureA2U(m68k_areg(regs, 1), &ri);
- CopyLineStructureA2U(m68k_areg(regs, 2), &line);
+ CopyRenderInfoStructureA2U(m68k_areg (regs, 1), &ri);
+ CopyLineStructureA2U(m68k_areg (regs, 2), &line);
#if defined( P96TRACING_ENABLED ) && P96TRACING_LEVEL > 0
DumpLine( &line );
#endif
#ifdef HARDWARE_SPRITE_EMULATION
/*
-SetSprite:
-Synopsis: SetSprite(bi, activate, RGBFormat);
-Inputs: a0: struct BoardInfo *bi
-d0: BOOL activate
-d7: RGBFTYPE RGBFormat
+SetSprite:
+Synopsis: SetSprite(bi, activate, RGBFormat);
+Inputs: a0: struct BoardInfo *bi
+d0: BOOL activate
+d7: RGBFTYPE RGBFormat
-This function activates or deactivates the hardware sprite.
+This function activates or deactivates the hardware sprite.
*/
uae_u32 picasso_SetSprite (void)
{
uae_u32 result = 0;
- uae_u32 activate = m68k_dreg( regs, 0 );
+ uae_u32 activate = m68k_dreg ( regs, 0 );
result = DX_ShowCursor( activate );
write_log ("SetSprite() - trying to %s cursor, result = %d\n", activate ? "show":"hide", result);
return result;
}
/*
-SetSpritePosition:
-Synopsis: SetSpritePosition(bi, RGBFormat);
-Inputs: a0: struct BoardInfo *bi
-d7: RGBFTYPE RGBFormat
+SetSpritePosition:
+Synopsis: SetSpritePosition(bi, RGBFormat);
+Inputs: a0: struct BoardInfo *bi
+d7: RGBFTYPE RGBFormat
This function sets the hardware mouse sprite position according to the values in the BoardInfo structure.
MouseX and MouseY are the coordinates relative to the screen bitmap. XOffset and YOffset must be subtracted
-to account for possible screen panning.
+to account for possible screen panning.
*/
uae_u32 picasso_SetSpritePosition (void)
{
uae_u32 result = 0;
- uaecptr bi = m68k_areg(regs, 0);
- uae_u16 MouseX = get_word(bi + PSSO_BoardInfo_MouseX) - picasso96_state.XOffset;
- uae_u16 MouseY = get_word(bi + PSSO_BoardInfo_MouseY) - picasso96_state.YOffset;
-
+ uaecptr bi = m68k_areg (regs, 0);
+ uae_u16 MouseX = get_word (bi + PSSO_BoardInfo_MouseX) - picasso96_state.XOffset;
+ uae_u16 MouseY = get_word (bi + PSSO_BoardInfo_MouseY) - picasso96_state.YOffset;
+
// Keep these around, because we don't want flickering
static uae_u16 OldMouseX = -1;
static uae_u16 OldMouseY = -1;
}
/*
-SetSpriteImage:
-Synopsis: SetSpriteImage(bi, RGBFormat);
-Inputs: a0: struct BoardInfo *bi
-d7: RGBFTYPE RGBFormat
+SetSpriteImage:
+Synopsis: SetSpriteImage(bi, RGBFormat);
+Inputs: a0: struct BoardInfo *bi
+d7: RGBFTYPE RGBFormat
This function gets new sprite image data from the MouseImage field of the BoardInfo structure and writes
it to the board.
-There are three possible cases:
+There are three possible cases:
BIB_HIRESSPRITE is set:
skip the first two long words and the following sprite data is arranged as an array of two longwords. Those form the
-two bit planes for one image line respectively.
+two bit planes for one image line respectively.
BIB_HIRESSPRITE and BIB_BIGSPRITE are not set:
skip the first two words and the following sprite data is arranged as an array of two words. Those form the two
-bit planes for one image line respectively.
+bit planes for one image line respectively.
BIB_HIRESSPRITE is not set and BIB_BIGSPRITE is set:
skip the first two words and the following sprite data is arranged as an array of two words. Those form the two bit
planes for one image line respectively. You have to double each pixel horizontally and vertically. All coordinates
used in this case already assume a zoomed sprite, only the sprite data is not zoomed yet. You will have to
-compensate for this when accounting for hotspot offsets and sprite dimensions.
+compensate for this when accounting for hotspot offsets and sprite dimensions.
*/
uae_u32 picasso_SetSpriteImage (void)
{
}
/*
-SetSpriteColor:
-Synopsis: SetSpriteColor(bi, index, red, green, blue, RGBFormat);
-Inputs: a0: struct BoardInfo *bi
-d0.b: index
-d1.b: red
-d2.b: green
-d3.b: blue
-d7: RGBFTYPE RGBFormat
-
-This function changes one of the possible three colors of the hardware sprite.
+SetSpriteColor:
+Synopsis: SetSpriteColor(bi, index, red, green, blue, RGBFormat);
+Inputs: a0: struct BoardInfo *bi
+d0.b: index
+d1.b: red
+d2.b: green
+d3.b: blue
+d7: RGBFTYPE RGBFormat
+
+This function changes one of the possible three colors of the hardware sprite.
*/
uae_u32 picasso_SetSpriteColor (void)
{
uaecptr AmigaBoardInfo = m68k_areg (regs, 0);
/* NOTES: See BoardInfo struct definition in Picasso96 dev info */
-
+
if (allocated_gfxmem && !picasso96_state.CardFound) {
/* Fill in MemoryBase, MemorySize */
put_long (AmigaBoardInfo + PSSO_BoardInfo_MemoryBase, gfxmem_start);
}
uaememptr = gfxmem_xlate(amigamemptr); /* I know that amigamemptr is inside my gfxmem chunk, so I can just do the xlate() */
memset(uaememptr, 0, PSSO_ModeInfo_sizeof); /* zero out our ModeInfo struct */
-
+
put_word (amigamemptr + PSSO_ModeInfo_Width, dm->res.width);
put_word (amigamemptr + PSSO_ModeInfo_Height, dm->res.height);
put_byte (amigamemptr + PSSO_ModeInfo_Depth, dm->depth * 8);
put_word (amigamemptr + PSSO_ModeInfo_HorSyncSize, 0);
put_byte (amigamemptr + PSSO_ModeInfo_HorSyncSkew, 0);
put_byte (amigamemptr + PSSO_ModeInfo_HorEnableSkew, 0);
-
+
put_word (amigamemptr + PSSO_ModeInfo_VerTotal, dm->res.height);
put_word (amigamemptr + PSSO_ModeInfo_VerBlankSize, 0);
put_word (amigamemptr + PSSO_ModeInfo_VerSyncStart, 0);
put_word (amigamemptr + PSSO_ModeInfo_VerSyncSize, 0);
-
+
put_byte (amigamemptr + PSSO_ModeInfo_first_union, 98);
put_byte (amigamemptr + PSSO_ModeInfo_second_union, 14);
-
+
put_long (amigamemptr + PSSO_ModeInfo_PixelClock,
dm->res.width * dm->res.height * (currprefs.gfx_refreshrate ? abs (currprefs.gfx_refreshrate) : default_freq));
}
return 0x50001000 | (mi[i].id * 0x10000);
}
(*unkcnt)++;
- write_log("P96: Non-unique mode %dx%d\n", w, h);
+ write_log ("P96: Non-unique mode %dx%d\n", w, h);
return 0x51000000 - (*unkcnt) * 0x10000;
#if 0
int result;
put_word (AmigaBoardInfo + PSSO_BoardInfo_MaxVerResolution + 4, hicolour.height);
put_word (AmigaBoardInfo + PSSO_BoardInfo_MaxVerResolution + 6, truecolour.height);
put_word (AmigaBoardInfo + PSSO_BoardInfo_MaxVerResolution + 8, alphacolour.height);
-
+
i = 0;
unkcnt = 0;
- while (DisplayModes[i].depth >= 0) {
+ while (DisplayModes[i].depth >= 0) {
int j = i;
/* Add a LibResolution structure to the ResolutionsList MinList in our BoardInfo */
res.DisplayID = AssignModeID(i, LibResolutionStructureCount, &unkcnt);
res.Modes[HICOLOR] = 0;
res.Modes[TRUECOLOR] = 0;
res.Modes[TRUEALPHA] = 0;
-
+
do {
/* Handle this display mode's depth */
-
+
/* New: Only add the modes when there is enough P96 RTG memory to hold the bitmap */
if((allocated_gfxmem - 32768) >
(DisplayModes[i].res.width * DisplayModes[i].res.height * DisplayModes[i].depth))
} while (DisplayModes[i].depth >= 0
&& DisplayModes[i].res.width == DisplayModes[j].res.width
&& DisplayModes[i].res.height == DisplayModes[j].res.height);
-
+
amigamemptr = gfxmem_start + allocated_gfxmem - 16384 + (PSSO_LibResolution_sizeof * LibResolutionStructureCount++);
CopyLibResolutionStructureU2A (&res, amigamemptr);
#if defined P96TRACING_ENABLED && P96TRACING_LEVEL > 1
#endif
AmigaListAddTail (AmigaBoardInfo + PSSO_BoardInfo_ResolutionsList, amigamemptr);
}
-
+
return -1;
}
* whenever it is ready to change the screen state. */
picasso_requested_on = flag;
write_log ("SetSwitch() - trying to show %s screen\n", flag ? "picasso96" : "amiga");
-
+
/* Put old switch-state in D0 */
return !flag;
}
void picasso_enablescreen (int on)
-{
+{
#if 0
wgfx_linestart = 0xFFFFFFFF;
#endif
int i;
uaecptr boardinfo = m68k_areg (regs, 0);
uaecptr clut = boardinfo + PSSO_BoardInfo_CLUT + start * 3;
-
+
for (i = start; i < start + count; i++) {
int r = get_byte (clut);
int g = get_byte (clut + 1);
int b = get_byte (clut + 2);
-
- palette_changed |= (picasso96_state.CLUT[i].Red != r
+
+ palette_changed |= (picasso96_state.CLUT[i].Red != r
|| picasso96_state.CLUT[i].Green != g
|| picasso96_state.CLUT[i].Blue != b);
-
- picasso96_state.CLUT[i].Red = r;
+
+ picasso96_state.CLUT[i].Red = r;
picasso96_state.CLUT[i].Green = g;
picasso96_state.CLUT[i].Blue = b;
clut += 3;
{
/* Fill in some static UAE related structure about this new DAC setting
* Lets us keep track of what pixel format the Amiga is thinking about in our frame-buffer */
-
+
P96TRACE(("SetDAC()\n"));
return 1;
}
if((picasso_vidinfo.width == picasso96_state.Width) &&
(picasso_vidinfo.height == picasso96_state.Height) &&
(picasso_vidinfo.depth == (picasso96_state.GC_Depth >> 3)) &&
- (picasso_vidinfo.selected_rgbformat == picasso96_state.RGBFormat))
+ (picasso_vidinfo.selected_rgbformat == picasso96_state.RGBFormat))
{
DX_SetPalette (0, 256);
- picasso_refresh (1);
+ picasso_refresh (1);
}
}
/* Fill in some static UAE related structure about this new ModeInfo setting */
uae_u32 border = m68k_dreg (regs, 0);
uaecptr modeinfo = m68k_areg (regs, 1);
-
+
picasso96_state.Width = get_word (modeinfo + PSSO_ModeInfo_Width);
picasso96_state.VirtualWidth = picasso96_state.Width; /* in case SetPanning doesn't get called */
-
+
picasso96_state.Height = get_word (modeinfo + PSSO_ModeInfo_Height);
picasso96_state.VirtualHeight = picasso96_state.Height; /* in case SetPanning doesn't get called */
-
+
picasso96_state.GC_Depth = get_byte (modeinfo + PSSO_ModeInfo_Depth);
picasso96_state.GC_Flags = get_byte (modeinfo + PSSO_ModeInfo_Flags);
-
+
P96TRACE(("SetGC(%d,%d,%d,%d)\n", picasso96_state.Width, picasso96_state.Height, picasso96_state.GC_Depth, border));
set_gc_called = 1;
picasso96_state.HostAddress = NULL;
*/
uae_u32 REGPARAM2 picasso_SetPanning (struct regstruct *regs)
-{
+{
uae_u16 Width = m68k_dreg (regs, 0);
uaecptr start_of_screen = m68k_areg (regs, 1);
- uaecptr bi = m68k_areg(regs, 0);
- uaecptr bmeptr = get_long(bi + PSSO_BoardInfo_BitMapExtra); /* Get our BoardInfo ptr's BitMapExtra ptr */
+ uaecptr bi = m68k_areg (regs, 0);
+ uaecptr bmeptr = get_long (bi + PSSO_BoardInfo_BitMapExtra); /* Get our BoardInfo ptr's BitMapExtra ptr */
uae_u16 bme_width, bme_height;
if(oldscr == 0) {
- oldscr = start_of_screen;
+ oldscr = start_of_screen;
}
if (oldscr != start_of_screen) {
set_gc_called = 0;
oldscr = start_of_screen;
}
- bme_width = get_word(bmeptr + PSSO_BitMapExtra_Width);
- bme_height = get_word(bmeptr + PSSO_BitMapExtra_Height);
-
+ bme_width = get_word (bmeptr + PSSO_BitMapExtra_Width);
+ bme_height = get_word (bmeptr + PSSO_BitMapExtra_Height);
+
picasso96_state.Address = start_of_screen; /* Amiga-side address */
picasso96_state.XOffset = (uae_s16)(m68k_dreg (regs, 1) & 0xFFFF);
picasso96_state.YOffset = (uae_s16)(m68k_dreg (regs, 2) & 0xFFFF);
picasso96_state.RGBFormat = m68k_dreg (regs, 7);
picasso96_state.BytesPerPixel = GetBytesPerPixel (picasso96_state.RGBFormat);
picasso96_state.BytesPerRow = bme_width * picasso96_state.BytesPerPixel;
-
+
set_panning_called = 1;
P96TRACE(("SetPanning(%d, %d, %d) Start 0x%x, BPR %d Bpp %d RGBF %d\n",
Width, picasso96_state.XOffset, picasso96_state.YOffset,
start_of_screen, picasso96_state.BytesPerRow, picasso96_state.BytesPerPixel, picasso96_state.RGBFormat));
init_picasso_screen ();
set_panning_called = 0;
-
+
return 1;
}
#if 0 && defined ALIGN_POINTER_TO32
int align_adjust = ALIGN_POINTER_TO32(ptr);
int len2;
-
+
len -= align_adjust;
while (align_adjust) {
*ptr ^= val;
/*
* InvertRect:
-*
+*
* Inputs:
* a0:struct BoardInfo *bi
* a1:struct RenderInfo *ri
* d3.w:Height
* d4.l:Mask
* d7.l:RGBFormat
-*
+*
* This function is used to invert a rectangular area on the board. It is called by BltBitMap,
* BltPattern and BltTemplate.
*/
return 0;
#endif
#ifndef LOCK_UNLOCK_MADNESS
- wgfx_flushline ();
+ wgfx_flushline ();
#endif
-
+
if (CopyRenderInfoStructureA2U (renderinfo, &ri))
{
P96TRACE(("InvertRect %dbpp 0x%lx\n", Bpp, (long)mask));
-
- if (mask != 0xFF && Bpp > 1)
+
+ if (mask != 0xFF && Bpp > 1)
mask = 0xFF;
xorval = 0x01010101 * (mask & 0xFF);
width_in_bytes = Bpp * Width;
rectstart = uae_mem = ri.Memory + Y * ri.BytesPerRow + X * Bpp;
-
+
for (lines = 0; lines < Height; lines++, uae_mem += ri.BytesPerRow)
do_xor8 (uae_mem, width_in_bytes, xorval);
-
+
if (vsyncgfxwrite == 0) {
if (renderinfo_is_current_screen (&ri)) {
if (mask == 0xFF)
uae_u32 Pen = m68k_dreg (regs, 4);
uae_u8 Mask = (uae_u8)m68k_dreg (regs, 5);
RGBFTYPE RGBFormat = m68k_dreg (regs, 7);
-
+
uae_u8 *src;
uae_u8 *oldstart;
int Bpp;
#ifndef LOCK_UNLOCK_MADNESS
wgfx_flushline ();
#endif
-
+
if (CopyRenderInfoStructureA2U (renderinfo, &ri) && Y != 0xFFFF)
{
if (ri.RGBFormat != RGBFormat)
write_log ("Weird Stuff!\n");
-
+
Bpp = GetBytesPerPixel (RGBFormat);
-
+
P96TRACE(("FillRect(%d, %d, %d, %d) Pen 0x%x BPP %d BPR %d Mask 0x%x\n",
X, Y, Width, Height, Pen, Bpp, ri.BytesPerRow, Mask));
-
+
if(Bpp > 1)
Mask = 0xFF;
-
- if (Mask == 0xFF)
+
+ if (Mask == 0xFF)
{
if((Width == 1) || (Height == 1))
{
{
src = ri.Memory + X * Bpp + Y * ri.BytesPerRow;
X = X - picasso96_state.XOffset;
- Y = Y - picasso96_state.YOffset;
+ Y = Y - picasso96_state.YOffset;
if((int)X < 0) {
Width = Width + X;
X = 0;
else
{
/* We get here only if Mask != 0xFF */
- if (Bpp != 1)
+ if (Bpp != 1)
{
- write_log("WARNING - FillRect() has unhandled mask 0x%x with Bpp %d. Using fall-back routine.\n", Mask, Bpp);
+ write_log ("WARNING - FillRect() has unhandled mask 0x%x with Bpp %d. Using fall-back routine.\n", Mask, Bpp);
}
else
{
{
uae_u8 *start = oldstart;
uae_u8 *end = start + Height * ri.BytesPerRow;
- for (; start != end; start += ri.BytesPerRow)
+ for (; start != end; start += ri.BytesPerRow)
{
uae_u8 *p = start;
unsigned long cols;
- for (cols = 0; cols < Width; cols++)
+ for (cols = 0; cols < Width; cols++)
{
uae_u32 tmpval = do_get_mem_byte (p + cols) & Mask;
do_put_mem_byte (p + cols, (uae_u8)(Pen | tmpval));
unsigned long height = blitrectdata.height;
uae_u8 mask = blitrectdata.mask;
BLIT_OPCODE opcode = blitrectdata.opcode;
-
+
uae_u8 Bpp = GetBytesPerPixel(ri->RGBFormat);
int can_do_visible_blit = 0;
if(opcode == BLIT_DST)
{
- write_log("WARNING: BlitRect() being called with opcode of BLIT_DST\n");
+ write_log ("WARNING: BlitRect() being called with opcode of BLIT_DST\n");
return 1;
}
-
+
/*
* If we have no destination RenderInfo, then we're dealing with a single-buffer action, called
* from picasso_BlitRect(). The code in do_blitrect_frame_buffer() deals with the frame-buffer,
*/
if (dstri == NULL || dstri->Memory == ri->Memory)
{
- if(mask != 0xFF && Bpp > 1)
+ if(mask != 0xFF && Bpp > 1)
mask = 0xFF;
dstri = ri;
can_do_visible_blit = 1;
}
-
+
/* Do our virtual frame-buffer memory first */
do_blitrect_frame_buffer(ri, dstri, srcx, srcy, dstx, dsty, width, height, mask, opcode);
/* Now we do the on-screen display, if renderinfo points to it */
blitrectdata.height = height;
blitrectdata.mask = mask;
blitrectdata.opcode = opcode;
-
+
return BlitRectHelper();
}
return 0;
#endif
#ifndef LOCK_UNLOCK_MADNESS
- wgfx_flushline ();
+ wgfx_flushline ();
#endif
P96TRACE(("BlitRect(%d, %d, %d, %d, %d, %d, 0x%x)\n", srcx, srcy, dstx, dsty, width, height, Mask));
result = BlitRect(renderinfo, 0, srcx, srcy, dstx, dsty, width, height, Mask, BLIT_SRC);
return 0;
#endif
#ifndef LOCK_UNLOCK_MADNESS
- wgfx_flushline ();
+ wgfx_flushline ();
#endif
P96TRACE(("BlitRectNoMaskComplete() op 0x%2x, xy(%4d,%4d) --> xy(%4d,%4d), wh(%4d,%4d)\n",
OpCode, srcx, srcy, dstx, dsty, width, height));
-
+
result = BlitRect(srcri, dstri, srcx, srcy, dstx, dsty, width, height, 0xFF, OpCode);
return result;
/*
* BlitPattern:
-*
+*
* Synopsis:BlitPattern(bi, ri, pattern, X, Y, Width, Height, Mask, RGBFormat);
* Inputs:
* a0:struct BoardInfo *bi
* d3.w:Height
* d4.w:Mask
* d7.l:RGBFormat
-*
+*
* This function is used to paint a pattern on the board memory using the blitter. It is called by
* BltPattern, if a AreaPtrn is used with positive AreaPtSz. The pattern consists of a b/w image
* using a single plane of image data which will be expanded repeatedly to the destination RGBFormat
#ifndef LOCK_UNLOCK_MADNESS
wgfx_flushline ();
#endif
-
+
if(CopyRenderInfoStructureA2U (rinf, &ri) && CopyPatternStructureA2U (pinf, &pattern))
{
Bpp = GetBytesPerPixel(ri.RGBFormat);
uae_mem = ri.Memory + Y * ri.BytesPerRow + X * Bpp; /* offset with address */
-
+
if (pattern.DrawMode & INVERS)
inversion = 1;
-
+
pattern.DrawMode &= 0x03;
- if (Mask != 0xFF)
+ if (Mask != 0xFF)
{
if(Bpp > 1)
Mask = 0xFF;
#endif
ysize_mask = (1 << pattern.Size) - 1;
xshift = pattern.XOffset & 15;
-
+
for (rows = 0; rows < H; rows++, uae_mem += ri.BytesPerRow) {
unsigned long prow = (rows + pattern.YOffset) & ysize_mask;
unsigned int d = do_get_mem_word (((uae_u16 *)pattern.Memory) + prow);
uae_u8 *uae_mem2 = uae_mem;
unsigned long cols;
-
+
if (xshift != 0)
d = (d << xshift) | (d >> (16 - xshift));
-
- for (cols = 0; cols < W; cols += 16, uae_mem2 += Bpp << 4)
+
+ for (cols = 0; cols < W; cols += 16, uae_mem2 += Bpp << 4)
{
long bits;
long max = W - cols;
unsigned int data = d;
-
+
if (max > 16)
max = 16;
-
- for (bits = 0; bits < max; bits++)
+
+ for (bits = 0; bits < max; bits++)
{
int bit_set = data & 0x8000;
data <<= 1;
case COMP:
if (bit_set) {
fgpen = pattern.FgPen;
-
+
switch (Bpp) {
case 1:
{
#ifndef LOCK_UNLOCK_MADNESS
wgfx_flushline ();
#endif
-
+
if (CopyRenderInfoStructureA2U (rinf, &ri) && CopyTemplateStructureA2U (tmpl, &tmp))
{
Bpp = GetBytesPerPixel(ri.RGBFormat);
uae_mem = ri.Memory + Y*ri.BytesPerRow + X*Bpp; /* offset into address */
-
+
if (tmp.DrawMode & INVERS)
inversion = 1;
-
+
tmp.DrawMode &= 0x03;
- if (Mask != 0xFF)
+ if (Mask != 0xFF)
{
if(Bpp > 1)
Mask = 0xFF;
{
P96TRACE(("BlitTemplate() xy(%d,%d), wh(%d,%d) draw 0x%x fg 0x%x bg 0x%x \n",
X, Y, W, H, tmp.DrawMode, tmp.FgPen, tmp.BgPen));
-
+
bitoffset = tmp.XOffset % 8;
-
+
#if defined(P96TRACING_ENABLED) && (P96TRACING_LEVEL > 0)
DumpTemplate(&tmp, W, H);
#endif
-
+
tmpl_base = tmp.Memory + tmp.XOffset / 8;
-
+
for (rows = 0; rows < H; rows++, uae_mem += ri.BytesPerRow, tmpl_base += tmp.BytesPerRow) {
unsigned long cols;
uae_u8 *tmpl_mem = tmpl_base;
uae_u8 *uae_mem2 = uae_mem;
unsigned int data = *tmpl_mem;
-
+
for (cols = 0; cols < W; cols += 8, uae_mem2 += Bpp << 3) {
unsigned int byte;
long bits;
long max = W - cols;
-
+
if (max > 8)
max = 8;
-
+
data <<= 8;
data |= *++tmpl_mem;
-
+
byte = data >> (8 - bitoffset);
-
+
for (bits = 0; bits < max; bits++) {
int bit_set = (byte & 0x80);
byte <<= 1;
fgpen = tmp.BgPen;
if (bit_set)
fgpen = tmp.FgPen;
-
+
PixelWrite(uae_mem2, bits, fgpen, Bpp, Mask);
break;
case COMP:
if (bit_set) {
fgpen = tmp.FgPen;
-
+
switch (Bpp) {
case 1:
{
}
}
}
-
+
#ifdef PIXEL_LOCK
flushpixels();
#endif
}
result = 1;
}
-}
+}
return 1;
}
{
uae_u16 width = m68k_dreg (regs, 0);
uae_u32 type = m68k_dreg (regs, 7);
-
+
width = GetBytesPerPixel(type) * width;
P96TRACE(("CalculateBytesPerRow() = %d\n",width));
-
+
return width;
}
* a0: struct BoardInfo
* d0: BOOL state
* This function enables and disables the video display.
-*
+*
* NOTE: return the opposite of the state
*/
uae_u32 REGPARAM2 picasso_SetDisplay (struct regstruct *regs)
void picasso_handle_hsync (void)
{
static int p96hsync;
-
+
if (currprefs.gfxmem_size == 0)
return;
if (WIN32GFX_IsPicassoScreen () && currprefs.gfx_pfullscreen && currprefs.gfx_vsync) {
uae_u8 mask)
{
int j;
-
+
uae_u8 *PLANAR[8], *image = ri->Memory + dstx * GetBytesPerPixel (ri->RGBFormat) + dsty * ri->BytesPerRow;
int Depth = bm->Depth;
unsigned long rows, bitoffset = srcx & 7;
long eol_offset;
-
- /* if (mask != 0xFF)
+
+ /* if (mask != 0xFF)
write_log ("P2C - pixel-width = %d, bit-offset = %d\n", width, bitoffset); */
-
+
/* Set up our bm->Planes[] pointers to the right horizontal offset */
for (j = 0; j < Depth; j++) {
uae_u8 *p = bm->Planes[j];
eol_offset = (long)bm->BytesPerRow - (long)((width + 7) >> 3);
for (rows = 0; rows < height; rows++, image += ri->BytesPerRow) {
unsigned long cols;
-
+
for (cols = 0; cols < width; cols += 8) {
int k;
uae_u32 a = 0, b = 0;
write_log ("ERROR - BlitPlanar2Chunky() has minterm 0x%x, which I don't handle. Using fall-back routine.\n",
minterm);
}
- else if(CopyRenderInfoStructureA2U (ri, &local_ri) &&
+ else if(CopyRenderInfoStructureA2U (ri, &local_ri) &&
CopyBitMapStructureA2U (bm, &local_bm))
{
P96TRACE(("BlitPlanar2Chunky(%d, %d, %d, %d, %d, %d) Minterm 0x%x, Mask 0x%x, Depth %d\n",
int Depth = bm->Depth;
unsigned long rows;
long eol_offset;
-
+
if(!bpp)
return;
-
+
/* Set up our bm->Planes[] pointers to the right horizontal offset */
for (j = 0; j < Depth; j++) {
uae_u8 *p = bm->Planes[j];
if ((mask & (1 << j)) == 0)
PLANAR[j] = &all_zeros_bitmap;
}
-
+
eol_offset = (long)bm->BytesPerRow - (long)((width + (srcx & 7)) >> 3);
for (rows = 0; rows < height; rows++, image += ri->BytesPerRow) {
unsigned long cols;
uae_u8 *image2 = image;
unsigned int bitoffs = 7 - (srcx & 7);
int i;
-
+
for (cols = 0; cols < width; cols ++) {
int v = 0, k;
for (k = 0; k < Depth; k++) {
v |= ((*PLANAR[k] >> bitoffs) & 1) << k;
}
}
-
+
switch (bpp) {
case 2:
do_put_mem_word ((uae_u16 *)image2, (uae_u16)(cim->Colors[v]));
}
}
}
-
+
for (i = 0; i < Depth; i++) {
if (PLANAR[i] != &all_zeros_bitmap && PLANAR[i] != &all_ones_bitmap) {
PLANAR[i] += eol_offset;
}
/*
-* BlitPlanar2Direct:
-*
+* BlitPlanar2Direct:
+*
* Synopsis:
* BlitPlanar2Direct(bi, bm, ri, cim, SrcX, SrcY, DstX, DstY, SizeX, SizeY, MinTerm, Mask);
* Inputs:
* d5.w:SizeY
* d6.b:MinTerm
* d7.b:Mask
-*
+*
* This function is currently used to blit from planar bitmaps within system memory to direct color
* bitmaps (15, 16, 24 or 32 bit) on the board. Watch out for plane pointers that are 0x00000000 (represents
* a plane with all bits "0") or 0xffffffff (represents a plane with all bits "1"). The ColorIndexMapping is
* used to map the color index of each pixel formed by the bits in the bitmap's planes to a direct color value
* which is written to the destination RenderInfo. The color mask and all colors within the mapping are words,
* triple bytes or longwords respectively similar to the color values used in FillRect(), BlitPattern() or
-* BlitTemplate().
+* BlitTemplate().
*/
uae_u32 REGPARAM2 picasso_BlitPlanar2Direct (struct regstruct *regs)
{
#ifndef LOCK_UNLOCK_MADNESS
wgfx_flushline ();
#endif
-
+
if (minterm != 0x0C)
{
write_log ("WARNING - BlitPlanar2Direct() has unhandled op-code 0x%x. Using fall-back routine.\n",
int lock = 0;
int needrefresh;
struct frect r;
-
+
if (pixelcount == 0)
return;
if (!picasso_on) {
write_log ("ERROR - flushpixels() has non RGBFB_CHUNKY mode!\n");
goto out;
}
- for (i = 0; i < pixelcount; i++) {
+ for (i = 0; i < pixelcount; i++) {
int i2 = pixelbase[i].size;
uaecptr addr = pixelbase[i].addr;
- uae_u32 value = pixelbase[i].value;
+ uae_u32 value = pixelbase[i].value;
int y = addr / picasso96_state.BytesPerRow;
int xbytes = addr % picasso96_state.BytesPerRow;
if (! picasso_vidinfo.extra_mem)
break;
-
- if (xbytes < picasso96_state.Width * picasso96_state.BytesPerPixel && y < picasso96_state.Height) {
+
+ if (xbytes < picasso96_state.Width * picasso96_state.BytesPerPixel && y < picasso96_state.Height) {
if(psiz == 4) {
uae_u8 *addr;
-
+
addr = dst + y * picasso_vidinfo.rowbytes + xbytes * 4;
if (i2 == 4) {
*(uae_u32 *) addr = picasso_vidinfo.clut[value & 0xff];
}
} else {
uae_u8 *addr;
-
+
addr = dst + y * picasso_vidinfo.rowbytes + xbytes * 2;
if (i2 == 4) {
*(uae_u16 *) addr = picasso_vidinfo.clut[value & 0xff];
} else {
- for (i = 0;i < pixelcount; i++) {
+ for (i = 0;i < pixelcount; i++) {
uaecptr addr = pixelbase[i].addr;
uae_u32 value = pixelbase[i].value;
int y = addr / picasso96_state.BytesPerRow;
int xbytes = addr % picasso96_state.BytesPerRow;
uae_u8 *p = dst + y * picasso_vidinfo.rowbytes + xbytes;
-
+
if (! picasso_vidinfo.extra_mem)
- continue;
+ continue;
- if (xbytes < picasso96_state.Width * picasso96_state.BytesPerPixel && y < picasso96_state.Height) {
+ if (xbytes < picasso96_state.Width * picasso96_state.BytesPerPixel && y < picasso96_state.Height) {
switch (pixelbase[i].size)
{
case 1:
case 2:
*(uae_u16 *)p = value;
break;
- case 4:
+ case 4:
*(uae_u32 *)p = value;
break;
}
}
out:;
if(lock)
- gfx_unlock_picasso();
+ gfx_unlock_picasso();
pixelcount = 0;
flush_it(&r);
}
cnt = watchbuffersize;
if (GetWriteWatch(WRITE_WATCH_FLAG_RESET, gfxmemory, allocated_gfxmem, watchbuffer, &cnt, &pagesize)) {
- write_log("GetWriteWatch failed, err=%d\n", GetLastError());
+ write_log ("GetWriteWatch failed, err=%d\n", GetLastError());
return;
}
if (cnt == 0)
continue;
addr -= (picasso96_state.XOffset * picasso96_state.BytesPerPixel)
+ (picasso96_state.YOffset * picasso96_state.BytesPerRow);
- y = addr / picasso96_state.BytesPerRow;
+ y = addr / picasso96_state.BytesPerRow;
if (y >= picasso96_state.Height)
continue;
- xbytes = addr % picasso96_state.BytesPerRow;
- p = dst + y * picasso_vidinfo.rowbytes + xbytes;
+ xbytes = addr % picasso96_state.BytesPerRow;
+ p = dst + y * picasso_vidinfo.rowbytes + xbytes;
tonextrow_p = picasso_vidinfo.rowbytes - xbytes;
tonextrow_addr = (picasso96_state.BytesPerRow - xbytes) / 4;
}
}
}
- write_log("%d ", total);
+ write_log ("%d ", total);
out:;
if(lock)
- gfx_unlock_picasso();
+ gfx_unlock_picasso();
flush_it(&r);
}
}
return;
#endif
-#ifndef LOCK_UNLOCK_MADNESS
+#ifndef LOCK_UNLOCK_MADNESS
/*
* Several writes to successive memory locations are a common access pattern.
* Try to optimize it.
return;
addr -= picasso96_state.Address + (picasso96_state.XOffset * picasso96_state.BytesPerPixel)
+ (picasso96_state.YOffset * picasso96_state.BytesPerRow);
-
+
y = addr / picasso96_state.BytesPerRow;
xbytes = addr % picasso96_state.BytesPerRow;
x = xbytes / picasso96_state.BytesPerPixel;
-
+
#ifdef LOCK_UNLOCK_MADNESS
if (! picasso_vidinfo.extra_mem) {
pixelcount = 0;
return;
}
-
+
if (x < picasso96_state.Width && y < picasso96_state.Height) {
dst = picasso96_state.HostAddress;
//dst = gfx_lock_picasso ();
do_put_mem_word ((uae_u16 *)(dst + y * picasso_vidinfo.rowbytes + xbytes), value);
break;
case 4:
- do_put_mem_long ((uae_u32 *)(dst + y * picasso_vidinfo.rowbytes + xbytes), value);
+ do_put_mem_long ((uae_u32 *)(dst + y * picasso_vidinfo.rowbytes + xbytes), value);
break;
}
//gfx_unlock_picasso ();
oldscr = 0;
//fastscreen
memset (&picasso96_state, 0, sizeof(struct picasso96_state_struct));
-
+
if (1) {
int i, count;
-
+
for (i = 0; i < 256; i++) {
p2ctab[i][0] = (((i & 128) ? 0x01000000 : 0)
| ((i & 64) ? 0x010000 : 0)
-/*
+/*
* UAE - The Un*x Amiga Emulator
*
* Win32 interface
WIN32_FIND_DATA fd;
if ((hFind = FindFirstFile(name,&fd)) == INVALID_HANDLE_VALUE) {
- fd.dwFileAttributes = GetFileAttributes(name);
- return fd.dwFileAttributes;
+ fd.dwFileAttributes = GetFileAttributes(name);
+ return fd.dwFileAttributes;
}
FindClose(hFind);
static void tmToSystemTime(struct tm *tmtime, LPSYSTEMTIME systime)
{
if (tmtime == NULL) {
- GetSystemTime (systime);
+ GetSystemTime (systime);
} else {
- systime->wDay = tmtime->tm_mday;
- systime->wDayOfWeek = tmtime->tm_wday;
- systime->wMonth = tmtime->tm_mon + 1;
- systime->wYear = tmtime->tm_year + 1900;
- systime->wHour = tmtime->tm_hour;
- systime->wMinute = tmtime->tm_min;
- systime->wSecond = tmtime->tm_sec;
- systime->wMilliseconds = 0;
+ systime->wDay = tmtime->tm_mday;
+ systime->wDayOfWeek = tmtime->tm_wday;
+ systime->wMonth = tmtime->tm_mon + 1;
+ systime->wYear = tmtime->tm_year + 1900;
+ systime->wHour = tmtime->tm_hour;
+ systime->wMinute = tmtime->tm_min;
+ systime->wSecond = tmtime->tm_sec;
+ systime->wMilliseconds = 0;
}
}
return 0;
*(__int64 *)&LocalFileTime = (((__int64)(377*365+91+days)*(__int64)1440+(__int64)minute)*(__int64)(60*50)+(__int64)tick)*(__int64)200000;
-
+
if (tolocal) {
if (!LocalFileTimeToFileTime(&LocalFileTime,&FileTime))
FileTime = LocalFileTime;
} else {
FileTime = LocalFileTime;
}
-
+
success = SetFileTime(hFile,&FileTime,&FileTime,&FileTime);
CloseHandle(hFile);
-
+
return success;
}
get_time(actime, &days, &mins, &ticks);
if(setfiletime (name, days, mins, ticks, tolocal))
- result = 0;
+ result = 0;
return result;
}
hThread = (HANDLE)_beginthreadex(NULL, 0, thread_init, thp, 0, &foo);
*tid = hThread;
if (hThread) {
- SetThreadPriority (hThread, THREAD_PRIORITY_ABOVE_NORMAL);
+ SetThreadPriority (hThread, THREAD_PRIORITY_ABOVE_NORMAL);
if (name)
- write_log("Thread '%s' started (%d)\n", name, foo);
+ write_log ("Thread '%s' started (%d)\n", name, foo);
} else {
- result = 0;
- write_log("Thread '%s' failed to start!?\n", name ? name : "<unknown>");
+ result = 0;
+ write_log ("Thread '%s' failed to start!?\n", name ? name : "<unknown>");
}
return result;
}
void uae_set_thread_priority (int pri)
{
/* workaround for filesystem emulation freeze with some dual core systems */
- //SetThreadAffinityMask(GetCurrentThread(), cpu_affinity);
+ //SetThreadAffinityMask(GetCurrentThread(), cpu_affinity);
}
#define IDC_AVIOUTPUT_FILETEXT 1610
#define IDC_INPUTDEVICETEXT 1610
#define IDC_ALWAYSONTOP 1610
-#define IDC_MAPROM2 1610
-#define IDC_HRTMON 1610
#define IDC_AVIOUTPUT_FILE 1611
#define IDC_INPUTLIST 1611
#define IDC_CATWEASEL 1611
#define IDC_CS_SCSIMODE 1772
#define IDC_DF0ENABLE 1773
#define IDC_DF1ENABLE 1774
+#define IDC_FS_SELECT_DIR 1774
+#define IDC_FS_SELECT_FILE 1775
#define IDC_DF2ENABLE 1776
+#define IDC_FS_SELECT_EJECT 1776
#define IDC_DF3ENABLE 1778
#define ID__FLOPPYDRIVES 40004
#define ID_FLOPPYDRIVES_DF0 40005
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 334
#define _APS_NEXT_COMMAND_VALUE 40029
-#define _APS_NEXT_CONTROL_VALUE 1774
+#define _APS_NEXT_CONTROL_VALUE 1775
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
-// Microsoft Visual C++ generated resource script.\r
-//\r
-#include "resource."\r
-\r
-#define APSTUDIO_READONLY_SYMBOLS\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Generated from the TEXTINCLUDE 2 resource.\r
-//\r
-#include "afxres.h"\r\r
-/////////////////////////////////////////////////////////////////////////////\r
-#undef APSTUDIO_READONLY_SYMBOLS\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// English (U.S.) resources\r
-\r
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r
-#ifdef _WIN32\r
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US\r
-#pragma code_page(1252)\r
-#endif //_WIN32\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Accelerator\r
-//\r
-\r
-IDR_DBGACCEL ACCELERATORS \r
-BEGIN\r
- VK_F1, ID_DBG_PAGE1, VIRTKEY, NOINVERT\r
- VK_F2, ID_DBG_PAGE2, VIRTKEY, NOINVERT\r
- VK_F3, ID_DBG_PAGE3, VIRTKEY, NOINVERT\r
- VK_F4, ID_DBG_PAGE4, VIRTKEY, NOINVERT\r
- VK_F5, ID_DBG_PAGE5, VIRTKEY, NOINVERT\r
- VK_F6, ID_DBG_PAGE6, VIRTKEY, NOINVERT\r
- VK_F7, ID_DBG_PAGE7, VIRTKEY, NOINVERT\r
- VK_F8, ID_DBG_PAGE8, VIRTKEY, NOINVERT\r
- VK_F9, ID_DBG_PAGE9, VIRTKEY, NOINVERT\r
- VK_DOWN, IDC_DBG_MEMDOWN, VIRTKEY, ALT, NOINVERT\r
- VK_RIGHT, IDC_DBG_MEMDOWNFAST, VIRTKEY, ALT, NOINVERT\r
- VK_UP, IDC_DBG_MEMUP, VIRTKEY, ALT, NOINVERT\r
- VK_LEFT, IDC_DBG_MEMUPFAST, VIRTKEY, ALT, NOINVERT\r
- "H", IDC_DBG_HELP, VIRTKEY, ALT, NOINVERT\r
- "P", IDC_DBG_MEMTOPC, VIRTKEY, ALT, NOINVERT\r
-END\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Dialog\r
-//\r
-\r
-IDD_KICKSTART DIALOGEX 0, 0, 300, 176\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-EXSTYLE WS_EX_CONTEXTHELP\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
- GROUPBOX "System ROM Settings",-1,5,0,290,74\r
- RTEXT "Main ROM file:",IDC_ROMTEXT,10,15,75,10\r
- COMBOBOX IDC_ROMFILE,89,12,186,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP\r
- PUSHBUTTON "...",IDC_KICKCHOOSER,280,10,10,15\r
- RTEXT "Extended ROM file:",IDC_ROMFILE2TEXT,10,35,75,10\r
- COMBOBOX IDC_ROMFILE2,89,31,186,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP\r
- PUSHBUTTON "...",IDC_ROMCHOOSER2,280,30,10,15\r
- CONTROL "MapROM emulation [] Creates a BlizKick-compatible memory area.",IDC_MAPROM,\r
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,95,54,87,10\r
- CONTROL "ShapeShifter support [] Patches the system ROM for ShapeShifter compatibility.",IDC_KICKSHIFTER,\r
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,54,87,10\r
- GROUPBOX "Miscellaneous",-1,5,76,290,57\r
- RTEXT "Cartridge ROM file:",IDC_FLASHTEXT2,8,93,75,10\r
- COMBOBOX IDC_CARTFILE,89,90,186,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP\r
- PUSHBUTTON "...",IDC_CARTCHOOSER,280,90,10,15\r
- RTEXT "Flash RAM file:",IDC_FLASHTEXT,8,112,75,10\r
- EDITTEXT IDC_FLASHFILE,89,110,185,13,ES_AUTOHSCROLL\r
- PUSHBUTTON "...",IDC_FLASHCHOOSER,280,110,10,15\r
- GROUPBOX "HRTMon Settings",-1,5,136,290,31,NOT WS_VISIBLE\r
- CONTROL "Enable HRTMon [] HRTMon is monitor/debugger similar to Action Replay series, default activation key is Page Up.",IDC_HRTMON,\r
- "Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,89,148,84,10\r
-END\r
-\r
-IDD_DISPLAY DIALOGEX 0, 0, 300, 235\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
- GROUPBOX "Screen",IDC_SCREENRESTEXT,12,0,199,67,BS_LEFT\r
- RTEXT "Full screen:",IDC_SELECTRESTEXT,15,17,40,15,SS_CENTERIMAGE\r
- COMBOBOX IDC_DISPLAYSELECT,59,10,147,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- COMBOBOX IDC_RESOLUTION,59,27,52,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- COMBOBOX IDC_REFRESHRATE,145,27,61,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- EDITTEXT IDC_XSIZE,59,48,35,12,ES_NUMBER\r
- EDITTEXT IDC_YSIZE,103,48,35,12,ES_NUMBER\r
- GROUPBOX "Settings",IDC_SETTINGSTEXT,12,73,199,125\r
- CONTROL "Correct aspect ratio",IDC_ASPECT,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,19,126,92,10\r
- CONTROL "Force low resolution",IDC_LORES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,126,89,10\r
- LTEXT "Refresh:",IDC_REFRESHTEXT,18,162,28,8\r
- CONTROL "Slider1",IDC_FRAMERATE,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,47,157,75,20\r
- EDITTEXT IDC_RATETEXT,127,161,77,12,ES_CENTER | ES_READONLY\r
- GROUPBOX "Centering",IDC_STATIC,221,0,61,67\r
- CONTROL "Horizontal",IDC_XCENTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,229,16,49,10\r
- CONTROL "Vertical",IDC_YCENTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,229,32,49,10\r
- GROUPBOX "Line Mode",IDC_LINEMODE,222,73,61,73\r
- CONTROL "Normal",IDC_LM_NORMAL,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_GROUP | WS_TABSTOP,231,89,44,10\r
- CONTROL "Double",IDC_LM_DOUBLED,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,231,105,45,10\r
- CONTROL "Scanlines",IDC_LM_SCANLINES,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,231,121,46,10\r
- COMBOBOX IDC_DA_MODE,20,211,58,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- CONTROL "",IDC_DA_SLIDER,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,84,207,101,20\r
- LTEXT "FPS adj.:",IDC_REFRESH2TEXT,16,182,32,8\r
- CONTROL "",IDC_FRAMERATE2,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,47,177,127,20\r
- EDITTEXT IDC_RATE2TEXT,178,181,26,12,ES_CENTER | ES_READONLY\r
- COMBOBOX IDC_RESOLUTIONDEPTH,112,27,32,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- CONTROL "Filtered low resolution",IDC_LORES_SMOOTHED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,140,89,10\r
- COMBOBOX IDC_SCREENMODE_NATIVE,100,85,102,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- COMBOBOX IDC_SCREENMODE_RTG,100,103,102,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- RTEXT "Native mode:",IDC_STATIC,19,85,59,15,SS_CENTERIMAGE\r
- RTEXT "Windowed:",IDC_WINDOWEDTEXT,15,51,40,8\r
- RTEXT "RTG mode:",IDC_STATIC,19,101,59,15,SS_CENTERIMAGE\r
- PUSHBUTTON "Reset to defaults",IDC_DA_RESET,212,211,73,14\r
-END\r
-\r
-IDD_MEMORY DIALOGEX 0, 0, 300, 175\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-EXSTYLE WS_EX_CONTEXTHELP\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
- GROUPBOX "Memory Settings",-1,14,7,274,91\r
- RTEXT "Chip:",-1,24,31,20,10,SS_CENTERIMAGE\r
- CONTROL "Slider1",IDC_CHIPMEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,54,22,50,20\r
- EDITTEXT IDC_CHIPRAM,105,26,30,12,ES_CENTER | ES_READONLY\r
- RTEXT "Slow:",-1,149,31,20,10,SS_CENTERIMAGE\r
- CONTROL "Slider1",IDC_SLOWMEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,179,22,60,20\r
- EDITTEXT IDC_SLOWRAM,243,25,30,12,ES_CENTER | ES_READONLY\r
- RTEXT "Fast:",IDC_FASTTEXT,24,52,20,10,SS_CENTERIMAGE\r
- CONTROL "Slider1",IDC_FASTMEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,54,47,50,20\r
- EDITTEXT IDC_FASTRAM,105,53,30,12,ES_CENTER | ES_READONLY\r
- RTEXT "Z3 Fast:",IDC_Z3TEXT,139,52,30,10,SS_CENTERIMAGE\r
- CONTROL "Slider1",IDC_Z3FASTMEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,179,47,60,20\r
- EDITTEXT IDC_Z3FASTRAM,243,52,30,12,ES_CENTER | ES_READONLY\r
- RTEXT "RTG: [] Graphics card memory. Required for RTG (Picasso96) emulation.",IDC_GFXCARDTEXT,81,77,90,10,SS_NOTIFY | SS_CENTERIMAGE\r
- CONTROL "Slider1",IDC_P96MEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,179,72,60,20\r
- EDITTEXT IDC_P96RAM,243,75,30,12,ES_CENTER | ES_READONLY\r
- GROUPBOX "Advanced Memory Settings",-1,13,104,275,65\r
- RTEXT "Motherboard RAM (Low area):",-1,39,122,129,10,SS_CENTERIMAGE\r
- CONTROL "",IDC_MBMEM1,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,180,117,59,20\r
- EDITTEXT IDC_MBRAM1,243,121,30,12,ES_CENTER | ES_READONLY\r
- RTEXT "Motherboard RAM (High area):",-1,39,144,127,10,SS_CENTERIMAGE\r
- CONTROL "",IDC_MBMEM2,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,180,139,59,20\r
- EDITTEXT IDC_MBRAM2,243,142,30,12,ES_CENTER | ES_READONLY\r
-END\r
-\r
-IDD_CPU DIALOGEX 0, 0, 300, 226\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x0\r
-BEGIN\r
- GROUPBOX "CPU",IDC_STATIC,5,3,81,139,BS_LEFT\r
- CONTROL "68000",IDC_CPU0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,13,16,63,10\r
- CONTROL "68010",IDC_CPU1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,30,65,10\r
- CONTROL "68020",IDC_CPU2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,44,63,10\r
- CONTROL "68030",IDC_CPU3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,58,64,10\r
- CONTROL "68040",IDC_CPU4,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,72,66,10\r
- CONTROL "68060",IDC_CPU5,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,85,66,10\r
- CONTROL "More compatible [] Emulate 68000's prefetch registers. More compatible but slower.",IDC_COMPATIBLE,\r
- "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,10,114,73,8\r
- CONTROL "JIT [] Enable just-in-time CPU emulator. Significantly increases the speed of the CPU emulation. Requires 68020 or higher CPU.",IDC_JITENABLE,\r
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,127,73,10\r
- GROUPBOX "CPU Emulation Speed",IDC_STATIC,90,3,205,90\r
- CONTROL "Fastest possible, but maintain chipset timing",IDC_CS_HOST,\r
- "Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_GROUP | WS_TABSTOP,95,18,195,10\r
- CONTROL "Match A500 speed",IDC_CS_68000,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,95,32,195,10\r
- CONTROL "Adjustable between CPU and chipset",IDC_CS_ADJUSTABLE,\r
- "Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,95,47,195,10\r
- RTEXT "CPU",IDC_CS_CPU_TEXT,96,73,15,10,SS_CENTERIMAGE | WS_TABSTOP\r
- CONTROL "Slider1",IDC_SPEED,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,114,68,67,20\r
- LTEXT "Chipset",IDC_CS_CHIPSET_TEXT,182,73,25,10,SS_CENTERIMAGE | NOT WS_GROUP | WS_TABSTOP\r
- RTEXT "CPU idle",IDC_CS_CPU_TEXT2,236,56,32,10,SS_CENTERIMAGE | WS_TABSTOP\r
- CONTROL "",IDC_CPUIDLE,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,219,68,69,20\r
- GROUPBOX "Advanced JIT Settings",IDC_STATIC,90,94,205,93\r
- RTEXT "Cache size:",IDC_CS_CACHE_TEXT,95,113,45,10,SS_CENTERIMAGE | WS_TABSTOP\r
- CONTROL "Slider1",IDC_CACHE,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,140,108,115,20\r
- EDITTEXT IDC_CACHETEXT,255,113,30,12,ES_CENTER | ES_READONLY\r
- CONTROL "Hard flush",IDC_HARDFLUSH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,100,141,63,10\r
- CONTROL "Constant jump",IDC_CONSTJUMP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,100,155,63,10\r
- CONTROL "FPU support",IDC_JITFPU,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,100,168,62,10\r
- CONTROL "Force settings",IDC_FORCE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,168,141,62,10\r
- CONTROL "No flags",IDC_NOFLAGS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,168,155,62,10\r
- CONTROL "Direct",IDC_TRUST0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,235,141,52,10\r
- CONTROL "Indirect",IDC_TRUST1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,235,155,52,10\r
- CONTROL "After RTG",IDC_TRUST2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,235,168,52,10\r
- CONTROL "More compatible [] More compatible but slower FPU emulation.",IDC_COMPATIBLE_FPU,\r
- "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,9,206,73,10\r
- GROUPBOX "FPU",IDC_STATIC,6,144,81,76,BS_LEFT\r
- CONTROL "24-bit addressing",IDC_COMPATIBLE24,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,10,100,73,8\r
- CONTROL "None",IDC_FPU0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,14,154,63,10\r
- CONTROL "68881",IDC_FPU1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,14,166,63,10\r
- CONTROL "68882",IDC_FPU2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,14,179,63,10\r
- CONTROL "CPU internal",IDC_FPU3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,14,192,63,10\r
-END\r
-\r
-IDD_FLOPPY DIALOGEX 0, 0, 300, 240\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x0\r
-BEGIN\r
- COMBOBOX IDC_DF0TEXT,2,22,296,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP\r
- COMBOBOX IDC_DF0TYPE,123,6,49,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- RTEXT "Write-protected",IDC_STATIC,174,8,59,10,SS_CENTERIMAGE\r
- CONTROL "",IDC_DF0WP,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,238,4,10,15\r
- PUSHBUTTON "Eject",IDC_EJECT0,253,4,30,15\r
- PUSHBUTTON "...",IDC_DF0,287,4,10,15\r
- COMBOBOX IDC_DF1TEXT,2,58,296,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP\r
- COMBOBOX IDC_DF1TYPE,123,42,49,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- RTEXT "Write-protected",IDC_STATIC,174,43,59,10,SS_CENTERIMAGE\r
- CONTROL "",IDC_DF1WP,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,238,40,10,15\r
- PUSHBUTTON "Eject",IDC_EJECT1,253,40,30,15\r
- PUSHBUTTON "...",IDC_DF1,287,40,10,15\r
- COMBOBOX IDC_DF2TEXT,2,93,296,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP\r
- COMBOBOX IDC_DF2TYPE,123,77,49,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- RTEXT "Write-protected",IDC_STATIC,174,77,59,10,SS_CENTERIMAGE\r
- CONTROL "",IDC_DF2WP,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,238,75,9,15\r
- PUSHBUTTON "Eject",IDC_EJECT2,253,75,30,15\r
- PUSHBUTTON "...",IDC_DF2,287,75,10,15\r
- COMBOBOX IDC_DF3TEXT,2,128,296,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP\r
- COMBOBOX IDC_DF3TYPE,123,112,49,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- RTEXT "Write-protected",IDC_STATIC,174,113,59,10,SS_CENTERIMAGE\r
- CONTROL "",IDC_DF3WP,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,238,111,9,15\r
- PUSHBUTTON "Eject",IDC_EJECT3,253,110,30,15\r
- PUSHBUTTON "...",IDC_DF3,287,109,10,15\r
- GROUPBOX "New Floppy Disk Image",IDC_SETTINGSTEXT,5,183,289,49\r
- COMBOBOX IDC_FLOPPYTYPE,16,196,51,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- PUSHBUTTON "Create Standard Disk [] Creates a standard 880 or 1760 KB ADF disk image.",IDC_CREATE,76,196,97,15\r
- PUSHBUTTON "Create Custom Disk [] Creates a low level (MFM) ADF disk image (about 2MB). Useful for programs that use non-standard disk formats (for example some save disks or DOS-formatted floppies)",IDC_CREATE_RAW,183,196,101,15\r
- GROUPBOX "Floppy Drive Emulation Speed",IDC_SETTINGSTEXT2,5,144,289,35\r
- CONTROL "",IDC_FLOPPYSPD,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,32,152,116,20\r
- EDITTEXT IDC_FLOPPYSPDTEXT,169,155,107,12,ES_CENTER | ES_READONLY\r
- PUSHBUTTON "Delete save image",IDC_SAVEIMAGE0,43,5,70,15,NOT WS_VISIBLE\r
- PUSHBUTTON "Delete save image",IDC_SAVEIMAGE1,43,40,70,15,NOT WS_VISIBLE\r
- PUSHBUTTON "Delete save image",IDC_SAVEIMAGE2,43,75,70,15,NOT WS_VISIBLE\r
- PUSHBUTTON "Delete save image",IDC_SAVEIMAGE3,43,110,70,15,NOT WS_VISIBLE\r
- EDITTEXT IDC_CREATE_NAME,75,215,98,13,ES_AUTOHSCROLL\r
- RTEXT "Disk label:",IDC_STATIC,14,216,52,10,SS_CENTERIMAGE\r
- CONTROL "DF0:",IDC_DF0ENABLE,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,3,6,34,15\r
- CONTROL "DF1:",IDC_DF1ENABLE,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,3,41,34,15\r
- CONTROL "DF2:",IDC_DF2ENABLE,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,3,76,34,15\r
- CONTROL "DF3:",IDC_DF3ENABLE,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,3,111,34,15\r
-END\r
-\r
-IDD_HARDDISK DIALOGEX 0, 0, 300, 240\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-EXSTYLE WS_EX_CONTEXTHELP\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
- CONTROL "List1",IDC_VOLUMELIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,5,0,290,182\r
- PUSHBUTTON "Add &Directory...",IDC_NEW_FS,10,186,64,15\r
- PUSHBUTTON "Add &Hardfile...",IDC_NEW_HF,153,186,64,15\r
- PUSHBUTTON "Add Ha&rd Drive...",IDC_NEW_HD,223,186,65,15\r
- PUSHBUTTON "Remove",IDC_REMOVE,232,207,60,15\r
- PUSHBUTTON "&Properties",IDC_EDIT,232,225,60,15\r
- CONTROL "Add PC drives at startup",IDC_MAPDRIVES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,209,100,10\r
- CONTROL "Disable UAEFSDB-support",IDC_NOUAEFSDB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,110,209,119,10\r
- CONTROL "Don't use Windows Recycle Bin",IDC_NORECYCLEBIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,110,220,121,10\r
- CONTROL "Include network drives",IDC_MAPDRIVES_NET,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,220,101,10\r
- PUSHBUTTON "Add Archive...",IDC_NEW_FSARCH,82,186,64,15\r
-END\r
-\r
-IDD_SOUND DIALOGEX 0, 0, 300, 231\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
- RTEXT "Sound device:",IDC_SOUNDCARD,8,9,51,13,SS_CENTERIMAGE\r
- COMBOBOX IDC_SOUNDCARDLIST,64,9,229,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- GROUPBOX "Sound Emulation",IDC_SOUNDSETTINGS,5,30,120,81\r
- CONTROL "Disabled",IDC_SOUND0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,13,45,101,10\r
- CONTROL "Disabled, but emulated",IDC_SOUND1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,57,102,10\r
- CONTROL "Enabled",IDC_SOUND2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,69,102,10\r
- CONTROL "Enabled, 100% accurate",IDC_SOUND3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,81,101,10\r
- GROUPBOX "Volume",IDC_STATIC,131,36,164,31\r
- CONTROL "",IDC_SOUNDVOLUME,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,137,44,105,20\r
- EDITTEXT IDC_SOUNDVOLUME2,247,47,40,12,ES_CENTER | ES_READONLY\r
- GROUPBOX "Sound Buffer Size",IDC_STATIC,132,73,164,31\r
- CONTROL "Slider1",IDC_SOUNDBUFFERRAM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,138,81,106,19\r
- EDITTEXT IDC_SOUNDBUFFERMEM,248,84,40,12,ES_CENTER | ES_READONLY\r
- GROUPBOX "Settings",IDC_SOUNDINTERPOLATION2,6,114,290,60\r
- LTEXT "Frequency:",IDC_SOUNDFREQTXT,11,147,53,8,SS_CENTERIMAGE\r
- COMBOBOX IDC_SOUNDFREQ,13,156,51,75,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP\r
- LTEXT "Audio filter:",IDC_SOUNDFILTERTXT,209,148,77,8,SS_CENTERIMAGE\r
- COMBOBOX IDC_SOUNDFILTER,209,157,80,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- LTEXT "Channel mode:",IDC_SOUNDSTEREOTXT,11,124,57,8,SS_CENTERIMAGE\r
- COMBOBOX IDC_SOUNDSTEREO,13,133,122,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- LTEXT "Interpolation:",IDC_SOUNDINTERPOLATIONTXT,209,124,75,8,SS_CENTERIMAGE\r
- COMBOBOX IDC_SOUNDINTERPOLATION,209,132,80,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- LTEXT "Stereo separation:",IDC_SOUNDSTEREOSEPTXT,141,124,63,8,SS_CENTERIMAGE\r
- COMBOBOX IDC_SOUNDSTEREOSEP,142,133,62,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- LTEXT "Stereo delay:",IDC_SOUNDSTEREOMIXTXT,141,148,63,8,SS_CENTERIMAGE\r
- COMBOBOX IDC_SOUNDSTEREOMIX,142,157,62,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- GROUPBOX "Floppy Drive Sound Emulation",IDC_STATIC,6,177,290,46\r
- CONTROL "",IDC_SOUNDDRIVEVOLUME,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,14,185,107,19\r
- EDITTEXT IDC_SOUNDDRIVEVOLUME2,124,191,40,12,ES_CENTER | ES_READONLY\r
- COMBOBOX IDC_SOUNDDRIVE,237,187,46,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- COMBOBOX IDC_SOUNDDRIVESELECT,18,205,265,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- COMBOBOX IDC_SOUNDSWAP,73,157,62,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- LTEXT "Swap channels:",IDC_SOUNDSWAPTXT,74,148,61,8,SS_CENTERIMAGE\r
- CONTROL "Automatic switching",IDC_SOUND_AUTO,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,14,95,103,10\r
-END\r
-\r
-IDD_LOADSAVE DIALOGEX 0, 0, 302, 241\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
- CONTROL "",IDC_CONFIGTREE,"SysTreeView32",TVS_HASLINES | TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,6,3,289,153,WS_EX_CLIENTEDGE\r
- RTEXT "Name:",IDC_STATIC,4,161,40,15,SS_CENTERIMAGE\r
- EDITTEXT IDC_EDITNAME,48,162,146,13,ES_AUTOHSCROLL\r
- RTEXT "Description:",IDC_STATIC,4,183,41,15,SS_CENTERIMAGE\r
- EDITTEXT IDC_EDITDESCRIPTION,48,183,146,13,ES_AUTOHSCROLL\r
- RTEXT "Link:",IDC_STATIC,4,204,40,15,SS_CENTERIMAGE\r
- COMBOBOX IDC_CONFIGLINK,48,205,93,150,CBS_DROPDOWN | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- CONTROL "Ignore link",IDC_CONFIGNOLINK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,146,206,48,10\r
- EDITTEXT IDC_EDITPATH,199,161,49,15,ES_AUTOHSCROLL | WS_DISABLED\r
- CONTROL "Autoload",IDC_CONFIGAUTO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,253,163,42,10\r
- GROUPBOX "Additional Information",IDC_STATIC,199,179,96,38,BS_LEFT\r
- PUSHBUTTON "View",IDC_VIEWINFO,208,195,37,15\r
- PUSHBUTTON "Set",IDC_SETINFO,250,195,37,15\r
- PUSHBUTTON "Load",IDC_QUICKLOAD,5,225,44,15\r
- PUSHBUTTON "Save",IDC_QUICKSAVE,54,225,44,15\r
- PUSHBUTTON "Load From...",IDC_LOAD,121,225,49,15\r
- PUSHBUTTON "Delete",IDC_DELETE,251,225,44,15\r
- PUSHBUTTON "Save As...",IDC_SAVE,175,225,44,15\r
-END\r
-\r
-IDD_PORTS DIALOGEX 0, 0, 300, 238\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
- GROUPBOX "Parallel Port",IDC_SERPARFRAME,5,2,291,68\r
- RTEXT "Printer:",IDC_STATIC,12,15,25,15,SS_CENTERIMAGE\r
- COMBOBOX IDC_PRINTERLIST,49,15,153,134,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- PUSHBUTTON "Flush print job",IDC_FLUSHPRINTER,220,14,58,12\r
- CONTROL "PostScript detection",IDC_PSPRINTERDETECT,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,11,33,79,12\r
- CONTROL "PostScript printer emulation",IDC_PSPRINTER,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,95,33,110,12\r
- RTEXT "Autoflush [] Time in seconds after a pending print job is automatically flushed.",IDC_PRINTERAUTOFLUSHTXT,202,32,57,15,SS_NOTIFY | SS_CENTERIMAGE\r
- EDITTEXT IDC_PRINTERAUTOFLUSH,263,33,25,12,ES_NUMBER\r
- RTEXT "Ghostscript extra parameters:",IDC_STATIC,12,49,102,15,SS_CENTERIMAGE\r
- EDITTEXT IDC_PS_PARAMS,124,50,165,12,ES_AUTOHSCROLL\r
- GROUPBOX "Serial Port",IDC_SERIALFRAME,4,72,292,48\r
- COMBOBOX IDC_SERIAL,49,84,232,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- CONTROL "Shared",IDC_SER_SHARED,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,11,102,48,13\r
- CONTROL "RTS/CTS",IDC_SER_CTSRTS,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,65,102,55,12\r
- GROUPBOX "MIDI",IDC_MIDIFRAME,4,123,292,33\r
- RTEXT "Out:",IDC_MIDI,10,134,34,15,SS_CENTERIMAGE\r
- COMBOBOX IDC_MIDIOUTLIST,50,134,95,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- RTEXT "In:",IDC_MIDI2,150,134,29,15,SS_CENTERIMAGE\r
- COMBOBOX IDC_MIDIINLIST,185,134,95,134,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- GROUPBOX "Mouse/Joystick Ports",IDC_PORT0,4,158,292,75\r
- COMBOBOX IDC_PORT0_JOYS,45,174,241,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- COMBOBOX IDC_PORT1_JOYS,45,195,241,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- PUSHBUTTON "Swap ports",IDC_SWAP,211,214,75,14\r
- RTEXT "Port 0:",IDC_STATIC,11,173,25,15,SS_CENTERIMAGE\r
- RTEXT "Port 1:",IDC_STATIC,11,194,25,15,SS_CENTERIMAGE\r
- LTEXT "X-Arcade layout information []#1",IDC_STATIC,16,213,106,15,SS_NOTIFY | SS_CENTERIMAGE\r
- CONTROL "Direct []Use when emulating serial-link games on two PCs running WinUAE",IDC_SER_DIRECT,\r
- "Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,132,103,65,12\r
- CONTROL "uaeserial.device",IDC_UAESERIAL,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,207,103,78,13\r
-END\r
-\r
-IDD_CONTRIBUTORS DIALOGEX 0, 0, 411, 242\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION\r
-CAPTION "UAE Authors and Contributors..."\r
-FONT 8, "MS Sans Serif", 0, 0, 0x0\r
-BEGIN\r
- DEFPUSHBUTTON "Ok",ID_OK,177,219,53,14\r
- CONTROL "",IDC_CONTRIBUTORS,"RICHEDIT",TCS_HOTTRACK | TCS_VERTICAL | TCS_RAGGEDRIGHT | TCS_OWNERDRAWFIXED | TCS_MULTISELECT | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,4,5,404,206\r
-END\r
-\r
-IDD_ABOUT DIALOGEX 0, 0, 300, 191\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x0\r
-BEGIN\r
- CONTROL "",IDC_RICHEDIT1,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,45,10,210,15\r
- CONTROL "",IDC_RICHEDIT2,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,20,30,260,13\r
- PUSHBUTTON "Contributors",IDC_CONTRIBUTORS,110,55,80,15\r
- CONTROL "",IDC_UAEHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,20,120,80,15\r
- CONTROL "",IDC_PICASSOHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,200,90,80,20\r
- CONTROL "",IDC_AMIGAHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,109,90,80,20\r
- CONTROL "",IDC_WINUAEHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,200,120,80,15\r
- CONTROL "",IDC_AIABHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,110,120,80,15\r
- CONTROL "",IDC_THEROOTS,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,20,145,80,15\r
- CONTROL "",IDC_CAPS,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,200,145,80,15\r
- CONTROL "",IDC_ABIME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,110,145,80,15\r
- CONTROL "",IDC_CLOANTOHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,20,90,80,20\r
- CONTROL "",IDC_AMIGASYS,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,63,169,80,15\r
- CONTROL "",IDC_AMIKIT,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,157,169,80,15\r
-END\r
-\r
-IDD_MISC1 DIALOGEX 0, 0, 300, 237\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
- GROUPBOX "Advanced",IDC_STATIC,8,2,285,110\r
- CONTROL "Untrap mouse with middle button",IDC_JULIAN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,15,129,10\r
- CONTROL "Show GUI on startup",IDC_SHOWGUI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,27,120,10\r
- CONTROL "On-screen LEDs",IDC_SHOWLEDS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,40,115,10\r
- CONTROL "uaescsi.device",IDC_SCSIDEVICE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,53,117,10\r
- CONTROL "Don't show taskbar button",IDC_NOTASKBARBUTTON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,66,117,10\r
- CONTROL "bsdsocket.library emulation",IDC_SOCKETS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,161,15,120,10\r
- CONTROL "Use CTRL-F11 to quit",IDC_CTRLF11,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,161,27,120,10\r
- CONTROL "Don't use RGB overlays",IDC_NOOVERLAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,161,40,120,10\r
- CONTROL "Synchronize clock",IDC_CLOCKSYNC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,161,66,115,10\r
- GROUPBOX "Keyboard LEDs",IDC_STATIC,7,140,85,94\r
- COMBOBOX IDC_KBLED1,22,154,56,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- COMBOBOX IDC_KBLED2,22,173,56,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- COMBOBOX IDC_KBLED3,22,193,56,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- GROUPBOX "Logging",IDC_STATIC,97,140,195,25\r
- CONTROL "Create log file",IDC_CREATELOGFILE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,151,72,10\r
- CONTROL "Illegal memory accesses",IDC_ILLEGAL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,189,151,95,10\r
- GROUPBOX "State Files",IDC_STATIC,98,165,195,69\r
- PUSHBUTTON "Load state...",IDC_DOLOADSTATE,105,182,49,14\r
- PUSHBUTTON "Save state...",IDC_DOSAVESTATE,105,208,49,14\r
- CONTROL "Enable state recording",IDC_STATE_CAPTURE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,188,181,88,10\r
- RTEXT "Recording rate (seconds):",IDC_STATIC,157,199,86,10,SS_CENTERIMAGE | WS_TABSTOP\r
- COMBOBOX IDC_STATE_RATE,248,197,38,65,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP\r
- RTEXT "Recording buffer (MB):",IDC_STATIC,157,219,83,10,SS_CENTERIMAGE | WS_TABSTOP\r
- COMBOBOX IDC_STATE_BUFFERSIZE,248,217,38,65,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP\r
- CONTROL "Always on top",IDC_ALWAYSONTOP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,79,117,10\r
- CONTROL "Catweasel",IDC_CATWEASEL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,161,79,115,10\r
- CONTROL "USB mode",IDC_KBLED_USB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,22,216,64,10\r
- COMBOBOX IDC_SCSIMODE,161,51,104,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- COMBOBOX IDC_LANGUAGE,103,121,179,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- GROUPBOX "Language",IDC_STATIC,7,112,285,25\r
- CONTROL "Disable powersaving features",IDC_POWERSAVE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,92,120,10\r
- CONTROL "Magic Mouse",IDC_MOUSETRICK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,161,92,119,10\r
-END\r
-\r
-IDD_HARDFILE DIALOGEX 0, 0, 299, 212\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | DS_CENTERMOUSE | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU\r
-CAPTION "Hardfile Settings"\r
-FONT 8, "MS Sans Serif", 0, 0, 0x0\r
-BEGIN\r
- GROUPBOX "Settings",IDC_STATIC,10,5,280,113\r
- RTEXT "Path:",IDC_HARDFILE_DIR_TEXT,26,18,22,10\r
- EDITTEXT IDC_PATH_NAME,52,15,213,15,ES_AUTOHSCROLL\r
- PUSHBUTTON "...",IDC_SELECTOR,271,15,11,15\r
- RTEXT "FileSys:",IDC_HARDFILE_FILESYS_TEXT,14,37,34,10\r
- EDITTEXT IDC_PATH_FILESYS,52,34,213,15,ES_AUTOHSCROLL\r
- PUSHBUTTON "...",IDC_FILESYS_SELECTOR,271,34,11,15\r
- RTEXT "Device:",IDC_HARDFILE_DEVICE_TEXT,17,58,31,10\r
- EDITTEXT IDC_HARDFILE_DEVICE,52,54,40,15,ES_AUTOHSCROLL\r
- RTEXT "Boot priority:",IDC_HARDFILE_BOOTPRI_TEXT,24,79,44,8\r
- EDITTEXT IDC_HARDFILE_BOOTPRI,74,75,40,15\r
- CONTROL "Read/write",IDC_RW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,110,57,50,10\r
- PUSHBUTTON "Enable RDB mode",IDC_HDF_RDB,192,55,92,14\r
- RTEXT "Surfaces:",IDC_SURFACES_TEXT,120,79,30,10\r
- EDITTEXT IDC_HEADS,155,75,35,15,ES_NUMBER\r
- RTEXT "Reserved:",IDC_RESERVED_TEXT,197,79,35,10\r
- EDITTEXT IDC_RESERVED,237,75,35,15,ES_NUMBER\r
- RTEXT "Sectors:",IDC_SECTORS_TEXT,120,101,30,10\r
- EDITTEXT IDC_SECTORS,155,96,35,15,ES_NUMBER\r
- RTEXT "Block size:",IDC_BLOCKSIZE_TEXT,197,101,35,10\r
- EDITTEXT IDC_BLOCKSIZE,237,96,35,15,ES_NUMBER\r
- GROUPBOX "New hard disk image file",IDC_STATIC,10,120,280,62\r
- PUSHBUTTON "Create",IDC_HF_CREATE,50,135,80,14\r
- EDITTEXT IDC_HF_SIZE,146,135,61,15,ES_NUMBER\r
- PUSHBUTTON "OK",IDOK,102,191,50,14\r
- PUSHBUTTON "Cancel",IDCANCEL,158,191,50,14\r
- EDITTEXT IDC_HF_DOSTYPE,146,158,61,15\r
- COMBOBOX IDC_HDF_CONTROLLER,73,97,41,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- RTEXT "DOS type",IDC_STATIC,214,160,32,10,SS_CENTERIMAGE\r
- RTEXT "MB",IDC_STATIC,214,138,13,10,SS_CENTERIMAGE\r
- RTEXT "Type:",IDC_STATIC,18,160,25,10,SS_CENTERIMAGE\r
- RTEXT "HD Controller:",IDC_STATIC,13,98,52,10,SS_CENTERIMAGE\r
-END\r
-\r
-IDD_FILESYS DIALOGEX 15, 25, 299, 111\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | DS_CENTERMOUSE | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU\r
-CAPTION "Volume Settings"\r
-FONT 8, "MS Sans Serif", 0, 0, 0x0\r
-BEGIN\r
- LTEXT "Device name:",-1,5,9,54,10\r
- EDITTEXT IDC_VOLUME_DEVICE,65,5,86,15,ES_AUTOHSCROLL\r
- LTEXT "Volume label:",-1,5,31,54,10\r
- EDITTEXT IDC_VOLUME_NAME,65,25,85,15,ES_AUTOHSCROLL\r
- LTEXT "Path:",-1,5,51,44,10\r
- EDITTEXT IDC_PATH_NAME,65,46,213,15,ES_AUTOHSCROLL\r
- PUSHBUTTON "...",IDC_SELECTOR,283,46,10,15\r
- CONTROL "Read/write",IDC_RW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,72,70,50,10\r
- RTEXT "Boot priority:",IDC_VOLUME_BOOTPRI_TEXT,135,70,51,8\r
- EDITTEXT IDC_VOLUME_BOOTPRI,199,68,27,15\r
- PUSHBUTTON "OK",IDOK,120,91,48,15\r
- PUSHBUTTON "Cancel",IDCANCEL,175,91,48,15\r
-END\r
-\r
-IDD_SETINFO DIALOGEX 0, 0, 229, 85\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | DS_CENTERMOUSE | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU\r
-CAPTION "Additional Information Settings"\r
-FONT 8, "MS Sans Serif", 0, 0, 0x0\r
-BEGIN\r
- RTEXT "Path:",-1,5,20,24,15,SS_CENTERIMAGE\r
- EDITTEXT IDC_PATH_NAME,35,20,169,15,ES_AUTOHSCROLL\r
- PUSHBUTTON "...",IDC_SELECTOR,210,20,10,15\r
- PUSHBUTTON "OK",IDOK,120,65,48,15\r
- PUSHBUTTON "Cancel",IDCANCEL,175,65,48,15\r
-END\r
-\r
-IDD_CHIPSET DIALOGEX 0, 65490, 300, 229\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x0\r
-BEGIN\r
- GROUPBOX "Chipset",IDC_STATIC,14,11,145,90\r
- CONTROL "OCS [] Original chipset. A1000 and most A500s.",IDC_OCS,\r
- "Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,37,26,51,10\r
- CONTROL "ECS Agnus [] Enhanced chipset (ECS Agnus chip only). Later A500 and A2000 hardware revisions.",IDC_ECS_AGNUS,\r
- "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,37,42,55,10\r
- CONTROL "Full ECS [] Full ECS chipset (ECS Agnus and ECS Denise chips). A500+, A600 and A3000.",IDC_ECS,\r
- "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,37,58,52,10\r
- CONTROL "AGA [] Advanced Graphics Architecture chipset. A1200, A4000 and CD32.",IDC_AGA,\r
- "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,100,26,51,10\r
- CONTROL "NTSC [] North American and Japanese display standard, 60Hz refresh rate. Other countries use PAL (50Hz. display refresh rate)",IDC_NTSC,\r
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,101,58,50,10\r
- GROUPBOX "Options",IDC_STATIC,168,11,114,89\r
- CONTROL "Immediate Blitter [] Faster but less compatible blitter emulation.",IDC_BLITIMM,\r
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,174,30,96,10\r
- CONTROL "Cycle-exact [] The most compatible A500 emulation mode. Very fast PC recommended.",IDC_CYCLEEXACT,\r
- "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,174,43,100,10\r
- GROUPBOX "Collision Level",IDC_STATIC,14,105,267,48\r
- CONTROL "None [] Collision hardware emulation disabled.",IDC_COLLISION0,\r
- "Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,40,121,59,10\r
- CONTROL "Sprites only [] Emulate only sprite vs. sprite collisions.",IDC_COLLISION1,\r
- "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,39,137,62,10\r
- CONTROL "Sprites and Sprites vs. Playfield [] Recommended collision emulation level.",IDC_COLLISION2,\r
- "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,109,121,161,10\r
- CONTROL "Full [] 100% collision hardware emulation. Only very few games need this option. Slowest.",IDC_COLLISION3,\r
- "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,109,137,119,10\r
- GROUPBOX "Sound Emulation",IDC_STATIC,13,159,268,65\r
- CONTROL "Disabled",IDC_CS_SOUND0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,39,175,102,10\r
- CONTROL "Emulated",IDC_CS_SOUND1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,39,190,91,10\r
- CONTROL "Emulated, 100% accurate",IDC_CS_SOUND2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,39,205,95,10\r
- CONTROL "Genlock connected [] Allow boot sequence to detect genlock. Genlock is not emulated.",IDC_GENLOCK,\r
- "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,174,56,100,10\r
- CONTROL "Faster RTG [] Enables less accurate custom chipset emulation mode when Picasso96 is enabled.",IDC_FASTERRTG,\r
- "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,174,68,100,10\r
- COMBOBOX IDC_CS_EXT,101,80,49,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- RTEXT "Chipset Extra",IDC_STATIC,25,79,52,15,SS_CENTERIMAGE\r
-END\r
-\r
-IDD_CHIPSET2 DIALOGEX 0, 65490, 300, 247\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x0\r
-BEGIN\r
- GROUPBOX "Advanced Chipset Options",IDC_STATIC,7,6,287,239\r
- GROUPBOX "Battery Backed Up Real Time Clock",IDC_STATIC,14,37,275,29\r
- CONTROL "None",IDC_CS_RTC1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,22,49,55,10\r
- CONTROL "MSM6242B",IDC_CS_RTC2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,91,49,52,10\r
- CONTROL "RF5C01A",IDC_CS_RTC3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,160,49,46,10\r
- EDITTEXT IDC_CS_RTCADJUST,218,47,64,13,ES_AUTOHSCROLL\r
- GROUPBOX "CIA-A TOD Clock Source",IDC_STATIC,12,69,275,29\r
- CONTROL "Vertical Sync",IDC_CS_CIAA_TOD1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,25,81,63,10\r
- CONTROL "Power Supply 50Hz",IDC_CS_CIAA_TOD2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,95,81,85,10\r
- CONTROL "Power Supply 60Hz",IDC_CS_CIAA_TOD3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,192,81,88,10\r
- CONTROL "Boot ROM Mirror",IDC_CS_KSMIRROR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,108,80,10\r
- CONTROL "A1000 Boot RAM/ROM",IDC_CS_A1000RAM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,108,88,10\r
- CONTROL "CD32 CD",IDC_CS_CD32CD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,121,76,10\r
- CONTROL "CD32 C2P",IDC_CS_CD32C2P,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,121,87,10\r
- CONTROL "CD32 NVRAM",IDC_CS_CD32NVRAM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,190,121,84,10\r
- CONTROL "CDTV CD",IDC_CS_CDTVCD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,134,47,10\r
- CONTROL "CDTV SRAM",IDC_CS_CDTVRAM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,133,87,10\r
- CONTROL "CDTV SRAM Expansion",IDC_CS_CDTVRAMEXP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,190,133,90,10\r
- CONTROL "A600/A1200 IDE",IDC_CS_IDE1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,146,79,10\r
- CONTROL "A4000/A4000T IDE",IDC_CS_IDE2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,146,88,10\r
- CONTROL "Ramsey revision:",IDC_CS_RAMSEY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,211,71,10\r
- EDITTEXT IDC_CS_RAMSEYREV,94,209,45,13,ES_AUTOHSCROLL\r
- CONTROL "Fat Gary revision:",IDC_CS_FATGARY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,224,71,10\r
- EDITTEXT IDC_CS_FATGARYREV,94,223,45,13,ES_AUTOHSCROLL\r
- CONTROL "A3000 SCSI",IDC_CS_DMAC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,175,76,10\r
- CONTROL "Compatible Settings",IDC_CS_COMPATIBLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,21,234,10\r
- CONTROL "DF0: ID Hardware",IDC_CS_DF0IDHW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,190,108,92,10\r
- CONTROL "Agnus/Alice revision:",IDC_CS_AGNUS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,150,211,81,10\r
- EDITTEXT IDC_CS_AGNUSREV,235,209,45,13,ES_AUTOHSCROLL\r
- CONTROL "Denise/Lisa revision:",IDC_CS_DENISE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,150,227,81,10\r
- EDITTEXT IDC_CS_DENISEREV,235,226,45,13,ES_AUTOHSCROLL\r
- CONTROL "A590/A2091 SCSI",IDC_CS_A2091,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,175,76,10\r
- CONTROL "A4000T SCSI",IDC_CS_DMAC2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,190,175,88,10\r
- LTEXT "A4091/A4000T SCSI not yet implemented.",IDC_STATIC,25,161,224,8,SS_CENTERIMAGE\r
- CONTROL "PCMCIA",IDC_CS_PCMCIA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,190,146,92,10\r
- CONTROL "A4091 SCSI",IDC_CS_A4091,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,187,76,10\r
- CONTROL "CDTV SCSI",IDC_CS_CDTVSCSI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,187,76,10\r
- CONTROL "Include host SCSI devices",IDC_CS_SCSIMODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,190,187,101,10\r
-END\r
-\r
-IDD_AVIOUTPUT DIALOGEX 0, 0, 288, 203\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
- GROUPBOX "Output Properties",IDC_STATIC,5,8,274,118\r
- EDITTEXT IDC_AVIOUTPUT_FILETEXT,15,21,226,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER,WS_EX_CLIENTEDGE\r
- PUSHBUTTON "...",IDC_AVIOUTPUT_FILE,249,20,19,12\r
- CONTROL "Audio",IDC_AVIOUTPUT_AUDIO,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_FLAT | WS_TABSTOP,15,36,39,11\r
- CONTROL "",IDC_AVIOUTPUT_AUDIO_STATIC,"Static",SS_LEFTNOWORDWRAP | SS_CENTERIMAGE | SS_SUNKEN | WS_GROUP,59,36,209,11\r
- CONTROL "Video",IDC_AVIOUTPUT_VIDEO,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_FLAT | WS_TABSTOP,15,50,39,11\r
- CONTROL "",IDC_AVIOUTPUT_VIDEO_STATIC,"Static",SS_LEFTNOWORDWRAP | SS_CENTERIMAGE | SS_SUNKEN | WS_GROUP,59,50,209,11\r
- CONTROL "Disable frame rate limit while recording",IDC_AVIOUTPUT_FRAMELIMITER,\r
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,68,158,10\r
- CONTROL "AVI output enabled",IDC_AVIOUTPUT_ACTIVATED,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,15,103,108,14\r
- CONTROL "PAL",IDC_AVIOUTPUT_PAL,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,133,103,66,14\r
- CONTROL "NTSC",IDC_AVIOUTPUT_NTSC,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,204,103,66,14\r
- CONTROL "Slider1",IDC_AVIOUTPUT_FPS,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | TBS_ENABLESELRANGE | WS_TABSTOP,166,84,87,11\r
- LTEXT "fps",IDC_AVIOUTPUT_FPS_STATIC,255,84,19,8\r
- PUSHBUTTON "Save screenshot",IDC_SCREENSHOT,16,141,76,14\r
- GROUPBOX "Ripper",IDC_STATIC,5,127,274,38\r
- PUSHBUTTON "Pro Wizard",IDC_PROWIZARD,100,141,76,14,WS_DISABLED\r
- CONTROL "Sample ripper",IDC_SAMPLERIPPER_ACTIVATED,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,192,141,77,14\r
- GROUPBOX "Input Recorder",IDC_STATIC,5,166,274,33\r
- CONTROL "Record",IDC_INPREC_RECORD,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,191,177,77,14\r
- CONTROL "Playback",IDC_INPREC_PLAY,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,16,178,77,14\r
- CONTROL "Alt. playback mode",IDC_INPREC_PLAYMODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,103,180,78,10\r
- CONTROL "Disable sound output while recording",IDC_AVIOUTPUT_NOSOUNDOUTPUT,\r
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,85,148,10\r
-END\r
-\r
-IDD_INPUT DIALOGEX 0, 0, 300, 242\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
- COMBOBOX IDC_INPUTTYPE,5,5,98,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- COMBOBOX IDC_INPUTDEVICE,109,5,167,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- CONTROL "",IDC_INPUTDEVICEDISABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,282,8,9,8\r
- CONTROL "List1",IDC_INPUTLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,5,22,290,146\r
- COMBOBOX IDC_INPUTAMIGACNT,5,174,24,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- COMBOBOX IDC_INPUTAMIGA,33,174,262,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- RTEXT "Joystick dead zone (%):",-1,7,196,79,10,SS_CENTERIMAGE\r
- EDITTEXT IDC_INPUTDEADZONE,92,195,25,12,ES_NUMBER\r
- RTEXT "Autofire rate (frames):",-1,10,212,76,10,SS_CENTERIMAGE\r
- EDITTEXT IDC_INPUTAUTOFIRERATE,92,210,25,12,ES_NUMBER\r
- RTEXT "Digital joy-mouse speed:",-1,124,196,84,10,SS_CENTERIMAGE\r
- EDITTEXT IDC_INPUTSPEEDD,215,195,25,12,ES_NUMBER\r
- RTEXT "Analog joy-mouse speed:",-1,120,212,88,10,SS_CENTERIMAGE\r
- EDITTEXT IDC_INPUTSPEEDA,215,211,25,12,ES_NUMBER\r
- RTEXT "Mouse speed:",-1,132,228,76,10,SS_CENTERIMAGE\r
- EDITTEXT IDC_INPUTSPEEDM,215,227,25,12,ES_NUMBER\r
- PUSHBUTTON "Copy from:",IDC_INPUTCOPY,249,195,45,14\r
- COMBOBOX IDC_INPUTCOPYFROM,249,211,45,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- PUSHBUTTON "Swap 1<>2",IDC_INPUTSWAP,249,226,45,14\r
-END\r
-\r
-IDD_FILTER DIALOGEX 0, 0, 296, 224\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
- GROUPBOX "Filter Settings",-1,0,0,294,186\r
- CONTROL "Enable",IDC_FILTERENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,17,46,10\r
- COMBOBOX IDC_FILTERMODE,62,15,61,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- COMBOBOX IDC_FILTERFILTER,128,15,81,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- PUSHBUTTON "Reset to defaults",IDC_FILTERDEFAULT,213,15,73,14\r
- RTEXT "Horiz. size:",-1,4,44,54,10,SS_CENTERIMAGE\r
- CONTROL "Slider1",IDC_FILTERHZ,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,37,152,19\r
- EDITTEXT IDC_FILTERHZV,253,40,34,12,ES_CENTER | ES_READONLY\r
- RTEXT "Vert. size:",-1,5,64,54,10,SS_CENTERIMAGE\r
- CONTROL "Slider1",IDC_FILTERVZ,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,57,152,19\r
- EDITTEXT IDC_FILTERVZV,253,59,34,12,ES_CENTER | ES_READONLY\r
- RTEXT "Horiz. position:",-1,5,84,55,10,SS_CENTERIMAGE\r
- CONTROL "Slider1",IDC_FILTERHO,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,77,151,19\r
- EDITTEXT IDC_FILTERHOV,253,79,34,12,ES_CENTER | ES_READONLY\r
- RTEXT "Vert. position:",-1,5,103,55,10,SS_CENTERIMAGE\r
- CONTROL "Slider1",IDC_FILTERVO,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,99,151,19\r
- EDITTEXT IDC_FILTERVOV,253,101,34,12,ES_CENTER | ES_READONLY\r
- RTEXT "Extra settings:",-1,27,133,57,10,SS_CENTERIMAGE\r
- CONTROL "Slider1",IDC_FILTERXL,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,157,151,19\r
- EDITTEXT IDC_FILTERXLV,253,159,34,12,ES_CENTER | ES_READONLY\r
- COMBOBOX IDC_FILTERSLR,253,130,33,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- GROUPBOX "Presets",-1,0,187,296,36\r
- COMBOBOX IDC_FILTERPRESETS,8,201,119,150,CBS_DROPDOWN | CBS_SORT | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- PUSHBUTTON "Load",IDC_FILTERPRESETLOAD,132,200,47,14\r
- PUSHBUTTON "Save",IDC_FILTERPRESETSAVE,184,200,47,14\r
- PUSHBUTTON "Delete",IDC_FILTERPRESETDELETE,236,200,47,14\r
- COMBOBOX IDC_FILTERHZMULT,67,43,27,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- COMBOBOX IDC_FILTERVZMULT,67,63,27,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- CONTROL "Autoscale",IDC_FILTERAUTORES,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,26,168,63,10\r
- COMBOBOX IDC_FILTERXTRA,105,130,138,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-END\r
-\r
-IDD_HARDDRIVE DIALOGEX 0, 0, 380, 66\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | DS_CENTERMOUSE | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU\r
-CAPTION "Harddrive Settings"\r
-FONT 8, "MS Sans Serif", 0, 0, 0x0\r
-BEGIN\r
- LTEXT "Hard drive:",-1,7,11,35,10\r
- COMBOBOX IDC_HARDDRIVE,49,9,325,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- CONTROL "Read/write",IDC_RW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,247,33,55,10\r
- DEFPUSHBUTTON "Add hard drive",IDOK,173,30,65,14\r
- PUSHBUTTON "Cancel",IDCANCEL,321,30,54,14\r
- DEFPUSHBUTTON "Create hard disk image file",IDC_HARDDRIVE_IMAGE,49,30,115,14\r
- EDITTEXT IDC_PATH_NAME,89,49,169,15,ES_AUTOHSCROLL | NOT WS_VISIBLE\r
-END\r
-\r
-IDD_MISC2 DIALOGEX 0, 0, 300, 92\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
- GROUPBOX "When Active",IDC_STATIC,8,7,88,73\r
- RTEXT "Run at priority:",IDC_ACTIVE_PRI,14,17,52,10,SS_CENTERIMAGE | WS_TABSTOP\r
- COMBOBOX IDC_ACTIVE_PRIORITY,14,29,76,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- GROUPBOX "When Inactive",IDC_STATIC,102,7,92,73\r
- RTEXT "Run at priority:",IDC_INACTIVE_PRI,109,17,51,10,SS_CENTERIMAGE | WS_TABSTOP\r
- COMBOBOX IDC_INACTIVE_PRIORITY,109,29,76,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- CONTROL "Pause emulation",IDC_INACTIVE_PAUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,109,50,69,10\r
- CONTROL "Disable sound",IDC_INACTIVE_NOSOUND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,109,63,79,10\r
- GROUPBOX "When Minimized",IDC_STATIC,199,7,92,73\r
- RTEXT "Run at priority:",IDC_MINIMIZED_PRI,207,18,51,10,SS_CENTERIMAGE | WS_TABSTOP\r
- COMBOBOX IDC_MINIMIZED_PRIORITY,207,30,76,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- CONTROL "Pause emulation",IDC_MINIMIZED_PAUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,207,50,69,10\r
- CONTROL "Disable sound",IDC_MINIMIZED_NOSOUND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,207,63,79,10\r
-END\r
-\r
-IDD_DISK DIALOGEX 0, 0, 300, 242\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_CONTROL | DS_CENTER | DS_CENTERMOUSE | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x0\r
-BEGIN\r
- CONTROL "",IDC_DISKLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,4,6,292,196\r
- PUSHBUTTON "Remove floppy disk image",IDC_DISKLISTREMOVE,149,223,101,15\r
- COMBOBOX IDC_DISKTEXT,3,205,293,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP\r
- PUSHBUTTON "Insert floppy disk image",IDC_DISKLISTINSERT,34,223,101,15\r
-END\r
-\r
-IDD_PANEL DIALOGEX 0, 0, 420, 278\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_SYSMENU\r
-EXSTYLE WS_EX_ACCEPTFILES | WS_EX_CONTROLPARENT\r
-CAPTION "WinUAE Properties"\r
-FONT 8, "MS Sans Serif", 0, 0, 0x0\r
-BEGIN\r
- GROUPBOX "",IDC_PANEL_FRAME,112,4,303,247,NOT WS_VISIBLE\r
- CONTROL "",IDC_PANELTREE,"SysTreeView32",TVS_HASLINES | TVS_SHOWSELALWAYS | TVS_NOSCROLL | WS_BORDER | WS_TABSTOP,5,5,101,248,WS_EX_CLIENTEDGE\r
- GROUPBOX "",IDC_PANEL_FRAME_OUTER,110,2,307,251\r
- PUSHBUTTON "Reset",IDC_RESETAMIGA,6,259,47,14\r
- PUSHBUTTON "Quit",IDC_QUITEMU,57,259,47,14\r
- DEFPUSHBUTTON "OK",IDOK,260,259,50,14\r
- PUSHBUTTON "Cancel",IDCANCEL,313,259,50,14\r
- PUSHBUTTON "Help",IDHELP,366,259,50,14,WS_DISABLED\r
-END\r
-\r
-IDD_PATHS DIALOGEX 0, 0, 300, 237\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
- LTEXT "System ROMs:",IDC_PATHS_ROML,14,9,260,8,SS_CENTERIMAGE\r
- EDITTEXT IDC_PATHS_ROM,14,22,261,15,ES_AUTOHSCROLL\r
- PUSHBUTTON "...",IDC_PATHS_ROMS,281,22,11,15\r
- LTEXT "Configuration files:",IDC_PATHS_CONFIGL,14,40,260,8,SS_CENTERIMAGE\r
- EDITTEXT IDC_PATHS_CONFIG,14,52,261,15,ES_AUTOHSCROLL\r
- PUSHBUTTON "...",IDC_PATHS_CONFIGS,281,52,11,15\r
- LTEXT "Screenshots:",IDC_PATHS_SCREENSHOTL,14,71,260,8,SS_CENTERIMAGE\r
- EDITTEXT IDC_PATHS_SCREENSHOT,14,83,261,15,ES_AUTOHSCROLL\r
- PUSHBUTTON "...",IDC_PATHS_SCREENSHOTS,281,83,11,15\r
- LTEXT "State files:",IDC_PATHS_STATEFILEL,14,102,260,8,SS_CENTERIMAGE\r
- EDITTEXT IDC_PATHS_SAVESTATE,14,114,261,15,ES_AUTOHSCROLL\r
- PUSHBUTTON "...",IDC_PATHS_SAVESTATES,281,114,11,15\r
- LTEXT "Videos:",IDC_PATHS_AVIOUTPUTL,14,132,260,8,SS_CENTERIMAGE\r
- EDITTEXT IDC_PATHS_AVIOUTPUT,14,144,261,15,ES_AUTOHSCROLL\r
- PUSHBUTTON "...",IDC_PATHS_AVIOUTPUTS,282,144,11,15\r
- LTEXT "Saveimages:",IDC_PATHS_SAVEIMAGEL,14,163,260,8,SS_CENTERIMAGE\r
- EDITTEXT IDC_PATHS_SAVEIMAGE,14,175,261,15,ES_AUTOHSCROLL\r
- PUSHBUTTON "...",IDC_PATHS_SAVEIMAGES,281,175,11,15\r
- PUSHBUTTON "Reset to defaults",IDC_PATHS_DEFAULT,14,199,92,14\r
- PUSHBUTTON "Rescan ROMs",IDC_ROM_RESCAN,14,218,92,14\r
- PUSHBUTTON "Clear registry",IDC_RESETREGISTRY,112,218,77,14\r
- COMBOBOX IDC_PATHS_DEFAULTTYPE,112,199,163,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- PUSHBUTTON "Clear disk history",IDC_RESETDISKHISTORY,198,218,77,14\r
-END\r
-\r
-IDD_QUICKSTART DIALOGEX 0, 0, 300, 242\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
- GROUPBOX "Emulated Hardware",IDC_QUICKSTART_CONFIG,3,0,294,54\r
- RTEXT "Model:",IDC_STATIC,5,14,50,10,SS_CENTERIMAGE\r
- COMBOBOX IDC_QUICKSTART_MODEL,59,12,233,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- RTEXT "Configuration:",IDC_STATIC,5,33,50,10,SS_CENTERIMAGE\r
- COMBOBOX IDC_QUICKSTART_CONFIGURATION,59,31,233,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- GROUPBOX "Compatibility vs Required CPU Power ",IDC_QUICKSTART_COMPA,3,56,294,33\r
- RTEXT "Best compatibility",IDC_STATIC,13,70,67,10,SS_CENTERIMAGE\r
- CONTROL "",IDC_QUICKSTART_COMPATIBILITY,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,88,65,115,21\r
- RTEXT "Low compatibility",IDC_STATIC,215,70,63,10,SS_CENTERIMAGE\r
- GROUPBOX "Host Configuration",IDC_QUICKSTART_HOST,3,91,294,33\r
- RTEXT "Configuration:",IDC_STATIC,5,105,55,10,SS_CENTERIMAGE\r
- COMBOBOX IDC_QUICKSTART_HOSTCONFIG,65,103,225,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
- GROUPBOX "Emulated Floppy Drives",IDC_QUICKSTART_DF,3,126,294,84\r
- CONTROL "Floppy drive DF0:",IDC_DF0QENABLE,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,10,136,72,15\r
- PUSHBUTTON "Select disk image",IDC_DF0QQ,85,136,98,15\r
- RTEXT "Write-protected",IDC_STATIC,185,139,56,10,SS_CENTERIMAGE\r
- CONTROL "",IDC_DF0WPQ,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,246,137,10,15\r
- PUSHBUTTON "Eject",IDC_EJECT0Q,261,136,30,15\r
- COMBOBOX IDC_DF0TEXTQ,9,154,282,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP\r
- CONTROL "Floppy drive DF1:",IDC_DF1QENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,172,71,15\r
- PUSHBUTTON "Select disk image",IDC_DF1QQ,85,172,98,15\r
- RTEXT "Write-protected",IDC_STATIC,185,175,55,10,SS_CENTERIMAGE\r
- CONTROL "",IDC_DF1WPQ,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,246,173,10,15\r
- PUSHBUTTON "Eject",IDC_EJECT1Q,261,172,30,15\r
- COMBOBOX IDC_DF1TEXTQ,9,190,282,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP\r
- PUSHBUTTON "Set configuration",IDC_QUICKSTART_SETCONFIG,9,219,72,15,NOT WS_VISIBLE\r
- GROUPBOX "Mode",IDC_STATIC,190,211,107,27,BS_LEFT\r
- CONTROL "Start in Quickstart mode",IDC_QUICKSTARTMODE,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,197,222,94,10\r
-END\r
-\r
-IDD_FRONTEND DIALOGEX 0, 0, 420, 242\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
-FONT 8, "MS Sans Serif", 0, 0, 0x1\r
-BEGIN\r
- CONTROL "",IDC_FE_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,6,9,235,124\r
- GROUPBOX "",IDC_FE_INFO,249,140,160,95\r
- GROUPBOX "",IDC_FE_SCREENSHOT,249,7,160,128\r
-END\r
-\r
-IDD_PROGRESSBAR DIALOGEX 0, 0, 229, 58\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU\r
-CAPTION "Processing..."\r
-FONT 8, "MS Sans Serif", 0, 0, 0x0\r
-BEGIN\r
- PUSHBUTTON "Cancel",IDCANCEL,88,40,50,14\r
- CONTROL "",IDC_PROGRESSBAR,"msctls_progress32",WS_BORDER | 0x1,7,19,215,14\r
- CTEXT "x",IDC_PROGRESSBAR_TEXT,23,5,187,10,SS_CENTERIMAGE | WS_TABSTOP\r
-END\r
-\r
-IDD_STRINGBOX DIALOGEX 0, 0, 229, 58\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU\r
-CAPTION "Enter text..."\r
-FONT 8, "MS Sans Serif", 0, 0, 0x0\r
-BEGIN\r
- DEFPUSHBUTTON "OK",IDOK,48,39,50,14\r
- PUSHBUTTON "Cancel",IDCANCEL,151,39,50,14\r
- EDITTEXT IDC_STRINGBOXEDIT,7,17,214,14,ES_AUTOHSCROLL | ES_WANTRETURN\r
- CTEXT "Custom input event",IDC_STRINGBOX_TEXT,23,5,187,10,SS_CENTERIMAGE | WS_TABSTOP\r
-END\r
-\r
-IDD_DEBUGGER DIALOGEX 0, 0, 454, 368\r
-STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_THICKFRAME\r
-EXSTYLE WS_EX_CONTROLPARENT\r
-CAPTION "WinUAE Debugger"\r
-FONT 8, "Courier New", 0, 0, 0x0\r
-BEGIN\r
- EDITTEXT IDC_DBG_OUTPUT1,1,79,370,262,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | ES_WANTRETURN | WS_VSCROLL | NOT WS_TABSTOP\r
- EDITTEXT IDC_DBG_OUTPUT2,1,79,370,262,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | ES_WANTRETURN | WS_VSCROLL | NOT WS_TABSTOP\r
- LISTBOX IDC_DBG_MEM,1,92,370,249,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
- LISTBOX IDC_DBG_DASM,1,92,370,249,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
- EDITTEXT IDC_DBG_MEMINPUT,1,79,36,12,ES_AUTOHSCROLL | ES_WANTRETURN\r
- EDITTEXT IDC_DBG_INPUT,1,342,354,12,ES_AUTOHSCROLL | ES_WANTRETURN\r
- PUSHBUTTON "?",IDC_DBG_HELP,356,342,15,12,NOT WS_TABSTOP\r
- PUSHBUTTON "Set to PC",IDC_DBG_MEMTOPC,38,79,45,12,NOT WS_TABSTOP\r
- LISTBOX IDC_DBG_DREG,1,1,52,66,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
- LISTBOX IDC_DBG_AREG,54,1,52,66,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
- LISTBOX IDC_DBG_AMEM,106,1,231,66,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
- LISTBOX IDC_DBG_CCR,338,1,57,42,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
- LISTBOX IDC_DBG_SP_VBR,338,44,115,34,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
- LISTBOX IDC_DBG_MMISC,396,1,57,42,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
- LISTBOX IDC_DBG_PC,1,68,52,10,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
- LISTBOX IDC_DBG_PREFETCH,54,68,283,10,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
- LISTBOX IDC_DBG_FPREG,372,218,81,66,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
- LISTBOX IDC_DBG_FPSR,372,285,81,34,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
- LISTBOX IDC_DBG_MISCCPU,372,320,81,34,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
- CONTROL "",IDC_DBG_STATUS,"msctls_statusbar32",0x103,0,355,453,12\r
- LISTBOX IDC_DBG_BRKPTS,1,79,370,262,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL\r
- LISTBOX IDC_DBG_MCUSTOM,372,79,81,138,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT\r
- LISTBOX IDC_DBG_MISC,1,79,370,262,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL\r
- LISTBOX IDC_DBG_CUSTOM,1,79,370,262,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL\r
-END\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Icon\r
-//\r
-\r
-// Icon with lowest ID value placed first to ensure application icon\r
-// remains consistent on all systems.\r
-IDI_APPICON ICON "winuae.ico"\r
-IDI_FLOPPY ICON "35floppy.ico"\r
-IDI_ABOUT ICON "amigainfo.ico"\r
-IDI_HARDDISK ICON "Drive.ico"\r
-IDI_CPU ICON "cpu.ico"\r
-IDI_PORTS ICON "joystick.ico"\r
-IDI_INPUT ICON "joystick.ico"\r
-IDI_MISC1 ICON "misc.ico"\r
-IDI_MISC2 ICON "misc.ico"\r
-IDI_MOVE_UP ICON "move_up.ico"\r
-IDI_MOVE_DOWN ICON "move_dow.ico"\r
-IDI_AVIOUTPUT ICON "avioutput.ico"\r
-IDI_DISK ICON "Drive.ico"\r
-IDI_CONFIGFILE ICON "file.ico"\r
-IDI_FOLDER ICON "folder.ico"\r
-IDI_SOUND ICON "sound.ico"\r
-IDI_DISPLAY ICON "screen.ico"\r
-IDI_ROOT ICON "root.ico"\r
-IDI_MEMORY ICON "chip.ico"\r
-IDI_QUICKSTART ICON "quickstart.ico"\r
-IDI_PATHS ICON "paths.ico"\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Version\r
-//\r
-\r
-VS_VERSION_INFO VERSIONINFO\r
- FILEVERSION 1,4,4,0\r
- PRODUCTVERSION 1,4,4,0\r
- FILEFLAGSMASK 0x3fL\r
-#ifdef _DEBUG\r
- FILEFLAGS 0x1L\r
-#else\r
- FILEFLAGS 0x0L\r
-#endif\r
- FILEOS 0x40004L\r
- FILETYPE 0x1L\r
- FILESUBTYPE 0x0L\r
-BEGIN\r
- BLOCK "StringFileInfo"\r
- BEGIN\r
- BLOCK "040904b0"\r
- BEGIN\r
- VALUE "FileDescription", "WinUAE"\r
- VALUE "FileVersion", "1.4.4"\r
- VALUE "InternalName", "WinUAE"\r
- VALUE "LegalCopyright", "© 1996-2007 under the GNU Public License (GPL)"\r
- VALUE "OriginalFilename", "WinUAE.exe"\r
- VALUE "ProductName", "WinUAE"\r
- VALUE "ProductVersion", "1.4.4"\r
- END\r
- END\r
- BLOCK "VarFileInfo"\r
- BEGIN\r
- VALUE "Translation", 0x409, 1200\r
- END\r
-END\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Cursor\r
-//\r
-\r
-IDC_MYHAND CURSOR "H_arrow.cur"\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Menu\r
-//\r
-\r
-IDM_SYSTRAY MENU \r
-BEGIN\r
- POPUP "Menu"\r
- BEGIN\r
- MENUITEM "Configuration", ID_ST_CONFIGURATION\r
- POPUP "Floppy drives"\r
- BEGIN\r
- MENUITEM "Eject all drives", ID_ST_EJECTALL\r
- MENUITEM "DF0:", ID_ST_DF0\r
- MENUITEM "DF1:", ID_ST_DF1\r
- MENUITEM "DF2:", ID_ST_DF2\r
- MENUITEM "DF3:", ID_ST_DF3\r
- END\r
- MENUITEM "Reset", ID_ST_RESET\r
- MENUITEM "Help", ID_ST_HELP\r
- MENUITEM "Quit WinUAE", ID_ST_QUIT\r
- END\r
-END\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// WAVE\r
-//\r
-\r
-IDR_DRIVE_STARTUP_A500_1 WAVE "drive_startup.wav"\r
-IDR_DRIVE_CLICK_A500_1 WAVE "drive_click.wav"\r
-IDR_DRIVE_SPIN_A500_1 WAVE "drive_spin.wav"\r
-IDR_DRIVE_SNATCH_A500_1 WAVE "drive_snatch.wav"\r
-IDR_DRIVE_SPINND_A500_1 WAVE "drive_spinnd.wav"\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Bitmap\r
-//\r
-\r
-IDB_XARCADE BITMAP "xarcade-winuae.bmp"\r
-IDB_LCD160X43 BITMAP "lcd.bmp"\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// String Table\r
-//\r
-\r
-STRINGTABLE \r
-BEGIN\r
- IDS_KICKSTART "ROM"\r
- IDS_DISK "Disk swapper"\r
- IDS_DISPLAY "Display"\r
- IDS_HARDDISK "Hard drives"\r
- IDS_FLOPPY "Floppy drives"\r
- IDS_ABOUT "About"\r
- IDS_LOADSAVE "Configurations"\r
- IDS_AVIOUTPUT "Output"\r
- IDS_PORTS "Game & I/O ports"\r
- IDS_MISC1 "Misc"\r
- IDS_MEMORY "RAM"\r
- IDS_CPU "CPU and FPU"\r
- IDS_CHIPSET "Chipset"\r
- IDS_INPUT "Input"\r
- IDS_FILTER "Filter"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- IDS_MISC2 "Priority"\r
- IDS_PATHS "Paths"\r
- IDS_QUICKSTART "Quickstart"\r
- IDS_FRONTEND "Frontend"\r
- IDS_CHIPSET2 "Adv. Chipset"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- IDS_EXTTEXT "Floppy disk image files"\r
- IDS_EXTACTUAL "ADF"\r
- IDS_SOUND "Sound"\r
- IDS_CDROM "CD-ROM"\r
- IDS_FRAMERATE "Every %1Frame"\r
- IDS_SECOND "second "\r
- IDS_THIRD "third "\r
- IDS_FOURTH "fourth "\r
- IDS_FIFTH "fifth "\r
- IDS_SIXTH "sixth "\r
- IDS_SEVENTH "seventh "\r
- IDS_EIGHTH "eighth "\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- IDS_NINTH "ninth "\r
- IDS_TENTH "tenth "\r
- IDS_SELECTADF "Select a floppy disk image file..."\r
- IDS_ADF "Floppy disk image files"\r
- IDS_CHOOSEBLANK "Choose a blank floppy disk image file..."\r
- IDS_SELECTHDF "Select a hard disk image file..."\r
- IDS_HDF "Hard disk image files"\r
- IDS_SELECTUAE "Select a WinUAE configuration file..."\r
- IDS_UAE "WinUAE configuration files"\r
- IDS_SELECTROM "Select a system ROM file..."\r
- IDS_ROM "System ROM files"\r
- IDS_SELECTKEY "Select a system ROM key file..."\r
- IDS_KEY "System ROM key files"\r
- IDS_SELECTINFO "Select information for your configuration..."\r
- IDS_NONE "none"\r
- IDS_VOLUME "Volume"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- IDS_SELECTFILESYSROOT "Please select the root directory of the file system..."\r
- IDS_DEFAULTMIDIOUT "Default MIDI-Out Device"\r
- IDS_CONTRIBUTORS1 "Bernd Schmidt - The Grand-Master\nSam Jordan - Custom-chip, floppy-DMA, etc.\nMathias Ortmann - Original WinUAE Main Guy, BSD Socket support\nBrian King - Picasso96 Support, Integrated GUI for WinUAE, previous WinUAE Main Guy\nToni Wilen - Core updates, WinUAE Main Guy\nGustavo Goedert/Peter Remmers/Michael Sontheimer/Tomi Hakala/Tim Gunn/Nemo Pohle - DOS Port Stuff\nSamuel Devulder/Olaf Barthel/Sam Jordan - Amiga Ports\nKrister Bergman - XFree86 and OS/2 Port\nA. Blanchard/Ernesto Corvi - MacOS Port\nChristian Bauer - BeOS Port\nIan Stephenson - NextStep Port\nPeter Teichmann - Acorn/RiscOS Port\nStefan Reinauer - ZorroII/III AutoConfig, Serial Support\nChristian Schmitt/Chris Hames - Serial Support\nHerman ten Brugge - 68020/68881 Emulation Code\nTauno Taipaleenmaki - Various UAE-Control/UAE-Library Support\nBrett Eden/Tim Gunn/Paolo Besser/Nemo Pohle - Various Docs and Web-Sites\nGeorg Veichtlbauer - Help File coordinator, German GUI\nFulvio Leonardi - Italian translator for WinUAE\n"\r
- IDS_CONTRIBUTORS2 "Bill Panagouleas - Hardware support\nSpecial thanks to Alexander Kneer and Tobias Abt (The Picasso96 Team)\nSteven Weiser - Postscript printing emulation idea and testing.\nPéter Tóth /Balázs Rátkai/Iván Herczeg/András Arató - Hungarian translation.\nKarsten Bock, Gavin Fance, Dirk Trowe and Christoph Meier - Freezer cartridge hardware support."\r
- IDS_INVALIDPRTPORT "The printer you have in this configuration is not valid on this machine.\n"\r
- IDS_RESTOREUSS "Restore a WinUAE snapshot file"\r
- IDS_USS "WinUAE snapshot files"\r
- IDS_WRONGOSVERSION "WinUAE is no longer supported on Windows NT. Please upgrade to either Windows 2000 or Windows XP or a later version."\r
- IDS_SELECTFLASH "Select a flash or battery-backed RAM file..."\r
- IDS_FLASH "WinUAE flash or battery-backed RAM file"\r
- IDS_INPUTHOSTWIDGET "Input source"\r
- IDS_INPUTAMIGAEVENT "Input target"\r
- IDS_INPUTAUTOFIRE "Autofire"\r
- IDS_SAVEUSS "Save a WinUAE snapshot file"\r
- IDS_MIDIOVERFLOW "Sysexbuffer overflow. Should not happen. Please report this to\nberndroesch1@compuserve.de"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- IDS_PATH "Path"\r
- IDS_RW "R/W"\r
- IDS_SECTORS "Sectors"\r
- IDS_SURFACES "Bill Panagouleas - Hardware support\nSpecial thanks to Alexander Kneer and Tobias Abt (The Picasso96 Team)\nSteven Weiser - Postscript printing emulation idea and testing.\nHungarian translation - Péter Tóth , Balázs Rátkai , Iván Herczeg , András Arató"\r
- IDS_RESERVED "Reserved"\r
- IDS_BLOCKSIZE "Block size"\r
- IDS_NAME "Name"\r
- IDS_DESCRIPTION "Description"\r
- IDS_COULDNOTLOADCONFIG "Could not load the selected configuration!\n"\r
- IDS_NOHELP "Online help is disabled because the HTML Help functionality is not installed on this system. HTML Help is available from http://www.microsoft.com/downloads/.\n"\r
- IDS_MUSTSELECTCONFIG "You must select a configuration or enter a name before selecting Load...\n"\r
- IDS_INVALIDCOMPORT "The serial port you have in this configuration is not valid on this machine.\n"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- IDS_HFDSIZE "Size"\r
- IDS_DEVICE "Device"\r
- IDS_BOOTPRI "BootPri"\r
- IDS_FLOPPY_COMPATIBLE " (compatible)"\r
- IDS_FLOPPY_TURBO "Turbo"\r
- IDS_YES "yes"\r
- IDS_NO "no"\r
- IDS_PRI_ABOVENORMAL "Above Normal"\r
- IDS_PRI_NORMAL "Normal"\r
- IDS_PRI_BELOWNORMAL "Below Normal"\r
- IDS_PRI_LOW "Low"\r
- IDS_OLDRTGLIBRARY "The installed LIBS:Picasso96/rtg.library (%d.%d) should be updated.\nA newer version is included in the ""Amiga Programs"" directory\n of the WinUAE distribution archive.\n\nNewer library version fixes graphics problems and increases performance."\r
- IDS_DEFAULT_AF2005 "Amiga Forever 2005+"\r
- IDS_DEFAULT_AF "Amiga Forever"\r
- IDS_DEFAULT_WINUAE "WinUAE default (old)"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- IDS_SOUND_STEREO2 "Cloned Stereo (4 Channels)"\r
- IDS_INPUT_CUSTOMEVENT "<Custom event>"\r
- IDS_DEFAULT_NEWWINUAE "WinUAE default (new)"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- IDS_UNSUPPORTEDPIXELFORMAT \r
- "Error: unsupported pixel format. Please use a different screen mode.\n"\r
- IDS_MUSTENTERNAME "You must select a configuration or enter a name before selecting Save...\n"\r
- IDS_MUSTSELECTCONFIGFORDELETE \r
- "You must select a configuration or enter a name before selecting Delete...\n"\r
- IDS_DELETECONFIGCONFIRMATION \r
- "Are you sure you want to Delete this configuration?\n"\r
- IDS_DELETECONFIGTITLE "Confirm Delete"\r
- IDS_MUSTSELECTPATH "You must select a path!"\r
- IDS_SETTINGSERROR "Settings error"\r
- IDS_MUSTSELECTNAME "You must select a name for the volume!"\r
- IDS_MUSTSELECTFILE "You must select a file!"\r
- IDS_FAILEDHARDFILECREATION "Failed to create hard disk image file..."\r
- IDS_CREATIONERROR "Creation error"\r
- IDS_ERRORTITLE "WinUAE message"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- IDS_INP "WinUAE Input Recording"\r
- IDS_RESTOREINP "Playback a WinUAE input recording"\r
- IDS_SAVEINP "Record a WinUAE input recording"\r
- IDS_SCREEN_WINDOWED "Windowed"\r
- IDS_SCREEN_FULLSCREEN "Fullscreen"\r
- IDS_SCREEN_FULLWINDOW "Full-window"\r
- IDS_SCREEN_VSYNC "VSync"\r
- IDS_SOUND_MONO "Mono"\r
- IDS_SOUND_MIXED "Mixed"\r
- IDS_SOUND_STEREO "Stereo"\r
- IDS_SOUND_INTERPOL_DISABLED "Disabled"\r
- IDS_SOUND_FILTER_OFF "Always off"\r
- IDS_SOUND_FILTER_EMULATED "Emulated (A500)"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- IDS_SOUND_FILTER_EMULATED_E "Emulated (A1200)"\r
- IDS_INPUT_COMPATIBILITY "Compatibility mode"\r
- IDS_INPUT_CUSTOM "Configuration #%d"\r
- IDS_INPUT_COPY_DEFAULT "Default"\r
- IDS_INPUT_COPY_CUSTOM "Config #%d"\r
- IDS_3D_NO_FILTER "Point (%d-bit)"\r
- IDS_3D_BILINEAR "Bilinear (%d-bit)"\r
- IDS_VSYNC_DEFAULT "Default"\r
- IDS_DRIVESOUND_NONE "No sound"\r
- IDS_DRIVESOUND_DEFAULT_A500 "A500 (WinUAE built-in)"\r
- IDS_AVIOUTPUT_NOCODEC "no codec selected"\r
- IDS_DISK_IMAGENAME "Disk image"\r
- IDS_DISK_DRIVENAME "Drive"\r
- IDS_AGA8BIT "AGA emulation requires a 16-bit or higher display depth.\nSwitching from 8-bit to 16-bit."\r
- IDS_UNSUPPORTEDSCREENMODE \r
- "The selected screen mode can't be displayed in a window, because %s\nSwitching to full-screen display."\r
- IDS_UNSUPPORTEDSCREENMODE_1 \r
- "the desktop is running in an unknown color mode."\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- IDS_UNSUPPORTEDSCREENMODE_2 \r
- "the desktop is running in 8-bit color depth, which WinUAE can't use in windowed mode."\r
- IDS_UNSUPPORTEDSCREENMODE_3 \r
- "the desktop is too small for the specified window size."\r
- IDS_UNSUPPORTEDSCREENMODE_4 \r
- "you selected an RTG (Picasso96) display with a color depth different from that of the desktop and an overlay was unavailable."\r
- IDS_FLOPPYTYPE35DD "3.5"" DD"\r
- IDS_FLOPPYTYPE35HD "3.5"" HD"\r
- IDS_FLOPPYTYPE525SD "5.25"" SD"\r
- IDS_FLOPPYTYPEDISABLED "Disabled"\r
- IDS_STMENUNOFLOPPY "No floppy disk inserted"\r
- IDS_TREEVIEW_HARDWARE "Hardware"\r
- IDS_TREEVIEW_HOST "Host"\r
- IDS_TREEVIEW_MISC "Miscellaneous"\r
- IDS_TREEVIEW_SETTINGS "Settings"\r
- IDS_WINUAETITLE_MMB "[Mouse active - press ALT+TAB or middle mouse button to cancel]"\r
- IDS_WINUAETITLE_NORMAL "[Mouse active - press ALT+TAB to cancel]"\r
- IDS_STARTEMULATION "Start"\r
- IDS_TREEVIEW_ABOUT "About"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- IDS_NOHARDDRIVES "No hard disks detected that were either empty or RDB-partitioned."\r
- IDS_DEFAULT_HOST "Default Configuration"\r
- IDS_SOUND_4CHANNEL "4 Channels"\r
- IDS_HF_FS_CUSTOM "Custom"\r
- IDS_SELECTFS "Select file system handler (FastFileSystem, SmartFilesystem, etc.)"\r
- IDS_KEYJOY "Keyboard Layout A (Numeric keypad, 0 and 5 = Fire)\nKeyboard Layout B (Cursor keys, Right CTRL and ALT = Fire)\nKeyboard Layout C (W=Up S=Down A=Left D=Right, Left ALT = Fire)\nX-Arcade (Left)\nX-Arcade (Right)"\r
- IDS_STATEFILE_UNCOMPRESSED "Uncompressed"\r
- IDS_STATEFILE_RAMDUMP "RAM dump"\r
- IDS_STATEFILE_WAVE "Wave audio dump"\r
- IDS_SOUND_SWAP_PAULA "Paula only"\r
- IDS_SOUND_SWAP_AHI "AHI only"\r
- IDS_SOUND_SWAP_BOTH "Both"\r
- IDS_SOUND_FILTER_ON_AGA "Always on (A500)"\r
- IDS_SOUND_FILTER_ON_A500 "Always on (A1200)"\r
- IDS_DRIVESOUND_PC_FLOPPY "PC floppy drive %c"\r
- IDS_FLOPPYTYPE35DDESCOM "3.5"" ESCOM"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- IDS_NUMSG_NEEDEXT2 "The software uses a non-standard floppy disk format. You may need to use a custom floppy disk image file instead of a standard one. This message will not appear again."\r
- IDS_NUMSG_NOROMKEY "Could not find system ROM key file."\r
- IDS_NUMSG_KSROMCRCERROR "System ROM checksum incorrect. The system ROM image file may be corrupt."\r
- IDS_NUMSG_KSROMREADERROR "Error while reading system ROM."\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- IDS_NUMSG_NOEXTROM "No extended ROM found."\r
- IDS_NUMSG_MODRIP_NOTFOUND "No music modules or packed data found."\r
- IDS_NUMSG_MODRIP_FINISHED "Scan finished."\r
- IDS_NUMSG_MODRIP_SAVE "Module/packed data found\n%s\nWould you like to save it?"\r
- IDS_NUMSG_KS68020 "The selected system ROM requires a 68020 with 32-bit addressing or 68030 or higher CPU."\r
- IDS_NUMSG_ROMNEED "One of the following system ROMs is required:\n\n%s\n\nCheck the System ROM path in the Paths panel and click Rescan ROMs."\r
- IDS_NUMSG_STATEHD "WARNING: Current configuration is not fully compatible with state saves.\nThis message will not appear again."\r
- IDS_NUMSG_NOCAPS "Selected disk image needs the SPS plugin\nwhich is available from\nhttp//www.softpres.org/"\r
- IDS_NUMSG_OLDCAPS "You need an updated SPS plugin\nwhich is available from\nhttp//www.softpres.org/"\r
- IDS_IMGCHK_BOOTBLOCKCRCERROR \r
- "The selected floppy disk image is not bootable (boot block checksum error)"\r
- IDS_IMGCHK_BOOTBLOCKNO "The selected floppy disk image is not bootable (no boot block)"\r
- IDS_IMGCHK_DAMAGED "The selected floppy disk image is damaged or unformatted"\r
- IDS_IMGCHK_KS2 "The selected floppy disk image requires a 2.04 or later system ROM.\nThe configuration has been updated."\r
- IDS_IMGCHK_KS3 "The selected floppy disk image requires a 3.0 or later system ROM.\nThe configuration has been updated."\r
- IDS_ROMSCANEND "Scan of ROMs finished"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- IDS_ROM_AVAILABLE "available"\r
- IDS_ROM_UNAVAILABLE "unavailable"\r
- IDS_HARDDRIVESAFETYWARNING1 \r
- "Warning: The drive safety check is active. Selected drive is not empty and non-RDB partitioned."\r
- IDS_NUMSG_KS68EC020 "The selected system ROM requires a 68020 with 24-bit addressing or higher CPU."\r
- IDS_ROMSCANNOROMS "No supported system ROMs detected."\r
- IDS_NUMSG_KICKREP "You need to have a floppy disk (image file) in DF0: to use the system ROM replacement."\r
- IDS_NUMSG_KICKREPNO "The floppy disk (image file) in DF0: is not compatible with the system ROM replacement functionality."\r
- IDS_NUMSG_NOROM "Could not load system ROM, trying system ROM replacement."\r
- IDS_HDCLONE_OK "Hard drive image file created succesfully."\r
- IDS_HDCLONE_FAIL "Hard drive image file creation failed.\nError code %d:%d."\r
- IDS_NUMSG_KS68030 "The selected system ROM requires a 68030 CPU."\r
- IDS_NUMSG_EXPROMNEED "One of the following expansion boot ROMs is required:\n\n%s\n\nCheck the System ROM path in the Paths panel and click Rescan ROMs."\r
- IDS_HARDDRIVESAFETYWARNING2 \r
- "Warning: The drive safety check has been disabled, and non-empty and non-RDB partitioned hard disk(s) were detected."\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- IDS_QS_MODELS "A500\nA500+\nA600\nA1000\nA1200\nA3000\nCD32\nCDTV\nArcadia Multi Select system\nExpanded WinUAE example configuration"\r
- IDS_QS_MODEL_A500 "1.3 ROM, OCS, 512 KB Chip + 512 KB Slow RAM (most common)\nThis configuration is capable of running most games and demos produced for first-generation hardware. Only few exceptions need a different configuration (e.g. the oldest games tend to be incompatible with this configuration).\n1.3 ROM, ECS Agnus, 512 KB Chip RAM + 512 KB Slow RAM\nLater hardware revision of the A500. Nearly 100% compatible with the previous configuration.\n1.3 ROM, ECS Agnus, 1 MB Chip RAM\nFew newer games and demos require this configuration.\n1.3 ROM, OCS Agnus, 512 KB Chip RAM\nVery old (e.g. pre-1988) games and demos may require this configuration.\n1.2 ROM, OCS Agnus, 512 KB Chip RAM\nAs available for the A1000, and installed on the first A500 and A2000 series. Some very old programs only work correctly with this configuration. Note: This system ROM version can only boot from floppy disk (no hard disk boot support).\n1.2 ROM, OCS Agnus, 512 KB Chip RAM + 512 KB Slow RAM\nThis configuration adds expansion memory to the first A500 produced. Try this if your game does not work with newer configurations, but works with the previous one. It could add some features to the game, including faster loading times. Note: This system ROM version can only boot from floppy disk (no hard disk boot support)."\r
- IDS_QS_MODEL_A500P "Basic non-expanded configuration\nThe A500+ adds an ECS Agnus chip, 1 MB of Chip RAM and a 2.0 ROM to the A500. Many A500 games and demos don't work properly on an A500+.\n2 MB Chip RAM expanded configuration\n\n4 MB Fast RAM expanded configuration\n"\r
- IDS_QS_MODEL_A600 "Basic non-expanded configuration\nThe A600 is smaller than the A500+ and has an updated 2.0 ROM.\n2 MB Chip RAM expanded configuration\n\n4 MB Fast RAM expanded configuration\n"\r
- IDS_QS_MODEL_A1000 "512 KB Chip RAM\nThe A1000 was the first model produced, with a configuration equivalent to that of an A500 with OCS chipset. You normally don't need to use this configuration, unless you are nostalgic and would like to hear the short A1000 boot tune\n""ICS"" Denise without EHB support\nVery first A1000 models had Denise without EHB capability.\n256 KB Chip RAM\n Unexpanded A1000. All later A1000 models were sold with a 256 KB RAM expansion built-in."\r
- IDS_QS_MODEL_A1200 "Basic non-expanded configuration\nUse this configuration to run most AGA demos and games\n4 MB Fast RAM expanded configuration\nSome newer AGA games and demos need an expanded A1200 to run."\r
- IDS_QS_MODEL_CD32 "CD32\nThe CD32 was one the first 32-bit consoles on the market. It is basically an A1200 with a built-in CD-ROM drive. Insert your CD32 or CDTV CD-ROM into a free CD-ROM drive before starting the emulation."\r
- IDS_QS_MODEL_CDTV "CDTV\nThe CDTV was the first model with a built-in CD-ROM drive. Looking like a black CD player, it featured a configuration equivalent to that of an A500 with 1 MB RAM and an ECS chipset.\nFloppy drive and 64KB SRAM card expanded CDTV\n"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- IDS_QS_MODEL_UAE "High-end expanded configuration"\r
- IDS_QS_MODEL_ARCADIA "Arcadia\nArcadia Multi Select system is arcade platform developed by Arcadia and Mastertronic. It is based on an A500 mainboard with ROM cage attached to expansion port. Arcadia ROM files go to ""Cartridge ROM File"" in ROM-panel."\r
- IDS_QS_MODEL_A3000 "1.4 ROM, 2MB Chip + 8MB Fast\n\n3.1 ROM, 2MB Chip + 8MB Fast\n"\r
- IDS_QS_MODEL_A4000 "A4000 (test)\nA4000"\r
- IDS_QS_MODEL_A4000T "A4000T (test)\nA4000T"\r
-END\r
-\r
-#endif // English (U.S.) resources\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// Finnish resources\r
-\r
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FIN)\r
-#ifdef _WIN32\r
-LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT\r
-#pragma code_page(1252)\r
-#endif //_WIN32\r
-\r
-#ifdef APSTUDIO_INVOKED\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// TEXTINCLUDE\r
-//\r
-\r
-1 TEXTINCLUDE \r
-BEGIN\r
- "resource.\0"\r
-END\r
-\r
-3 TEXTINCLUDE \r
-BEGIN\r
- "\r\0"\r
-END\r
-\r
-2 TEXTINCLUDE \r
-BEGIN\r
- "#include ""afxres.h""\r\0"\r
-END\r
-\r
-#endif // APSTUDIO_INVOKED\r
-\r
-#endif // Finnish resources\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-\r
-\r
-#ifndef APSTUDIO_INVOKED\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Generated from the TEXTINCLUDE 3 resource.\r
-//\r
-\r\r
-/////////////////////////////////////////////////////////////////////////////\r
-#endif // not APSTUDIO_INVOKED\r
-\r
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Accelerator
+//
+
+IDR_DBGACCEL ACCELERATORS
+BEGIN
+ VK_F1, ID_DBG_PAGE1, VIRTKEY, NOINVERT
+ VK_F2, ID_DBG_PAGE2, VIRTKEY, NOINVERT
+ VK_F3, ID_DBG_PAGE3, VIRTKEY, NOINVERT
+ VK_F4, ID_DBG_PAGE4, VIRTKEY, NOINVERT
+ VK_F5, ID_DBG_PAGE5, VIRTKEY, NOINVERT
+ VK_F6, ID_DBG_PAGE6, VIRTKEY, NOINVERT
+ VK_F7, ID_DBG_PAGE7, VIRTKEY, NOINVERT
+ VK_F8, ID_DBG_PAGE8, VIRTKEY, NOINVERT
+ VK_F9, ID_DBG_PAGE9, VIRTKEY, NOINVERT
+ VK_DOWN, IDC_DBG_MEMDOWN, VIRTKEY, ALT, NOINVERT
+ VK_RIGHT, IDC_DBG_MEMDOWNFAST, VIRTKEY, ALT, NOINVERT
+ VK_UP, IDC_DBG_MEMUP, VIRTKEY, ALT, NOINVERT
+ VK_LEFT, IDC_DBG_MEMUPFAST, VIRTKEY, ALT, NOINVERT
+ "H", IDC_DBG_HELP, VIRTKEY, ALT, NOINVERT
+ "P", IDC_DBG_MEMTOPC, VIRTKEY, ALT, NOINVERT
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_KICKSTART DIALOGEX 0, 0, 300, 176
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+EXSTYLE WS_EX_CONTEXTHELP
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+ GROUPBOX "System ROM Settings",-1,5,0,290,74
+ RTEXT "Main ROM file:",IDC_ROMTEXT,10,15,75,10
+ COMBOBOX IDC_ROMFILE,89,12,186,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "...",IDC_KICKCHOOSER,280,10,10,15
+ RTEXT "Extended ROM file:",IDC_ROMFILE2TEXT,10,35,75,10
+ COMBOBOX IDC_ROMFILE2,89,31,186,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "...",IDC_ROMCHOOSER2,280,30,10,15
+ CONTROL "MapROM emulation [] Creates a BlizKick-compatible memory area.",IDC_MAPROM,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,95,54,87,10
+ CONTROL "ShapeShifter support [] Patches the system ROM for ShapeShifter compatibility.",IDC_KICKSHIFTER,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,54,87,10
+ GROUPBOX "Miscellaneous",-1,5,76,290,57
+ RTEXT "Cartridge ROM file:",IDC_FLASHTEXT2,8,93,75,10
+ COMBOBOX IDC_CARTFILE,89,90,186,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "...",IDC_CARTCHOOSER,280,90,10,15
+ RTEXT "Flash RAM file:",IDC_FLASHTEXT,8,112,75,10
+ EDITTEXT IDC_FLASHFILE,89,110,185,13,ES_AUTOHSCROLL
+ PUSHBUTTON "...",IDC_FLASHCHOOSER,280,110,10,15
+END
+
+IDD_DISPLAY DIALOGEX 0, 0, 300, 235
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+ GROUPBOX "Screen",IDC_SCREENRESTEXT,12,0,199,67,BS_LEFT
+ RTEXT "Full screen:",IDC_SELECTRESTEXT,15,17,40,15,SS_CENTERIMAGE
+ COMBOBOX IDC_DISPLAYSELECT,59,10,147,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_RESOLUTION,59,27,52,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_REFRESHRATE,145,27,61,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ EDITTEXT IDC_XSIZE,59,48,35,12,ES_NUMBER
+ EDITTEXT IDC_YSIZE,103,48,35,12,ES_NUMBER
+ GROUPBOX "Settings",IDC_SETTINGSTEXT,12,73,199,125
+ CONTROL "Correct aspect ratio",IDC_ASPECT,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,19,126,92,10
+ CONTROL "Force low resolution",IDC_LORES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,126,89,10
+ LTEXT "Refresh:",IDC_REFRESHTEXT,18,162,28,8
+ CONTROL "Slider1",IDC_FRAMERATE,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,47,157,75,20
+ EDITTEXT IDC_RATETEXT,127,161,77,12,ES_CENTER | ES_READONLY
+ GROUPBOX "Centering",IDC_STATIC,221,0,61,67
+ CONTROL "Horizontal",IDC_XCENTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,229,16,49,10
+ CONTROL "Vertical",IDC_YCENTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,229,32,49,10
+ GROUPBOX "Line Mode",IDC_LINEMODE,222,73,61,73
+ CONTROL "Normal",IDC_LM_NORMAL,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_GROUP | WS_TABSTOP,231,89,44,10
+ CONTROL "Double",IDC_LM_DOUBLED,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,231,105,45,10
+ CONTROL "Scanlines",IDC_LM_SCANLINES,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,231,121,46,10
+ COMBOBOX IDC_DA_MODE,20,211,58,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ CONTROL "",IDC_DA_SLIDER,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,84,207,101,20
+ LTEXT "FPS adj.:",IDC_REFRESH2TEXT,16,182,32,8
+ CONTROL "",IDC_FRAMERATE2,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,47,177,127,20
+ EDITTEXT IDC_RATE2TEXT,178,181,26,12,ES_CENTER | ES_READONLY
+ COMBOBOX IDC_RESOLUTIONDEPTH,112,27,32,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ CONTROL "Filtered low resolution",IDC_LORES_SMOOTHED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,140,89,10
+ COMBOBOX IDC_SCREENMODE_NATIVE,100,85,102,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_SCREENMODE_RTG,100,103,102,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ RTEXT "Native mode:",IDC_STATIC,19,85,59,15,SS_CENTERIMAGE
+ RTEXT "Windowed:",IDC_WINDOWEDTEXT,15,51,40,8
+ RTEXT "RTG mode:",IDC_STATIC,19,101,59,15,SS_CENTERIMAGE
+ PUSHBUTTON "Reset to defaults",IDC_DA_RESET,212,211,73,14
+END
+
+IDD_MEMORY DIALOGEX 0, 0, 300, 175
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+EXSTYLE WS_EX_CONTEXTHELP
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+ GROUPBOX "Memory Settings",-1,14,7,274,91
+ RTEXT "Chip:",-1,24,31,20,10,SS_CENTERIMAGE
+ CONTROL "Slider1",IDC_CHIPMEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,54,22,50,20
+ EDITTEXT IDC_CHIPRAM,105,26,30,12,ES_CENTER | ES_READONLY
+ RTEXT "Slow:",-1,149,31,20,10,SS_CENTERIMAGE
+ CONTROL "Slider1",IDC_SLOWMEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,179,22,60,20
+ EDITTEXT IDC_SLOWRAM,243,25,30,12,ES_CENTER | ES_READONLY
+ RTEXT "Fast:",IDC_FASTTEXT,24,52,20,10,SS_CENTERIMAGE
+ CONTROL "Slider1",IDC_FASTMEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,54,47,50,20
+ EDITTEXT IDC_FASTRAM,105,53,30,12,ES_CENTER | ES_READONLY
+ RTEXT "Z3 Fast:",IDC_Z3TEXT,139,52,30,10,SS_CENTERIMAGE
+ CONTROL "Slider1",IDC_Z3FASTMEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,179,47,60,20
+ EDITTEXT IDC_Z3FASTRAM,243,52,30,12,ES_CENTER | ES_READONLY
+ RTEXT "RTG: [] Graphics card memory. Required for RTG (Picasso96) emulation.",IDC_GFXCARDTEXT,81,77,90,10,SS_NOTIFY | SS_CENTERIMAGE
+ CONTROL "Slider1",IDC_P96MEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,179,72,60,20
+ EDITTEXT IDC_P96RAM,243,75,30,12,ES_CENTER | ES_READONLY
+ GROUPBOX "Advanced Memory Settings",-1,13,104,275,65
+ RTEXT "Motherboard RAM (Low area):",-1,39,122,129,10,SS_CENTERIMAGE
+ CONTROL "",IDC_MBMEM1,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,180,117,59,20
+ EDITTEXT IDC_MBRAM1,243,121,30,12,ES_CENTER | ES_READONLY
+ RTEXT "Motherboard RAM (High area):",-1,39,144,127,10,SS_CENTERIMAGE
+ CONTROL "",IDC_MBMEM2,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,180,139,59,20
+ EDITTEXT IDC_MBRAM2,243,142,30,12,ES_CENTER | ES_READONLY
+END
+
+IDD_CPU DIALOGEX 0, 0, 300, 226
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+ GROUPBOX "CPU",IDC_STATIC,5,3,81,139,BS_LEFT
+ CONTROL "68000",IDC_CPU0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,13,16,63,10
+ CONTROL "68010",IDC_CPU1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,30,65,10
+ CONTROL "68020",IDC_CPU2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,44,63,10
+ CONTROL "68030",IDC_CPU3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,58,64,10
+ CONTROL "68040",IDC_CPU4,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,72,66,10
+ CONTROL "68060",IDC_CPU5,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,85,66,10
+ CONTROL "More compatible [] Emulate 68000's prefetch registers. More compatible but slower.",IDC_COMPATIBLE,
+ "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,10,114,73,8
+ CONTROL "JIT [] Enable just-in-time CPU emulator. Significantly increases the speed of the CPU emulation. Requires 68020 or higher CPU.",IDC_JITENABLE,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,127,73,10
+ GROUPBOX "CPU Emulation Speed",IDC_STATIC,90,3,205,90
+ CONTROL "Fastest possible, but maintain chipset timing",IDC_CS_HOST,
+ "Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_GROUP | WS_TABSTOP,95,18,195,10
+ CONTROL "Match A500 speed",IDC_CS_68000,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,95,32,195,10
+ CONTROL "Adjustable between CPU and chipset",IDC_CS_ADJUSTABLE,
+ "Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,95,47,195,10
+ RTEXT "CPU",IDC_CS_CPU_TEXT,96,73,15,10,SS_CENTERIMAGE | WS_TABSTOP
+ CONTROL "Slider1",IDC_SPEED,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,114,68,67,20
+ LTEXT "Chipset",IDC_CS_CHIPSET_TEXT,182,73,25,10,SS_CENTERIMAGE | NOT WS_GROUP | WS_TABSTOP
+ RTEXT "CPU idle",IDC_CS_CPU_TEXT2,236,56,32,10,SS_CENTERIMAGE | WS_TABSTOP
+ CONTROL "",IDC_CPUIDLE,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,219,68,69,20
+ GROUPBOX "Advanced JIT Settings",IDC_STATIC,90,94,205,93
+ RTEXT "Cache size:",IDC_CS_CACHE_TEXT,95,113,45,10,SS_CENTERIMAGE | WS_TABSTOP
+ CONTROL "Slider1",IDC_CACHE,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,140,108,115,20
+ EDITTEXT IDC_CACHETEXT,255,113,30,12,ES_CENTER | ES_READONLY
+ CONTROL "Hard flush",IDC_HARDFLUSH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,100,141,63,10
+ CONTROL "Constant jump",IDC_CONSTJUMP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,100,155,63,10
+ CONTROL "FPU support",IDC_JITFPU,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,100,168,62,10
+ CONTROL "Force settings",IDC_FORCE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,168,141,62,10
+ CONTROL "No flags",IDC_NOFLAGS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,168,155,62,10
+ CONTROL "Direct",IDC_TRUST0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,235,141,52,10
+ CONTROL "Indirect",IDC_TRUST1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,235,155,52,10
+ CONTROL "After RTG",IDC_TRUST2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,235,168,52,10
+ CONTROL "More compatible [] More compatible but slower FPU emulation.",IDC_COMPATIBLE_FPU,
+ "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,9,206,73,10
+ GROUPBOX "FPU",IDC_STATIC,6,144,81,76,BS_LEFT
+ CONTROL "24-bit addressing",IDC_COMPATIBLE24,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,10,100,73,8
+ CONTROL "None",IDC_FPU0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,14,154,63,10
+ CONTROL "68881",IDC_FPU1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,14,166,63,10
+ CONTROL "68882",IDC_FPU2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,14,179,63,10
+ CONTROL "CPU internal",IDC_FPU3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,14,192,63,10
+END
+
+IDD_FLOPPY DIALOGEX 0, 0, 300, 240
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+ COMBOBOX IDC_DF0TEXT,2,22,296,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_DF0TYPE,123,6,49,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ RTEXT "Write-protected",IDC_STATIC,174,8,59,10,SS_CENTERIMAGE
+ CONTROL "",IDC_DF0WP,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,238,4,10,15
+ PUSHBUTTON "Eject",IDC_EJECT0,253,4,30,15
+ PUSHBUTTON "...",IDC_DF0,287,4,10,15
+ COMBOBOX IDC_DF1TEXT,2,58,296,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_DF1TYPE,123,42,49,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ RTEXT "Write-protected",IDC_STATIC,174,43,59,10,SS_CENTERIMAGE
+ CONTROL "",IDC_DF1WP,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,238,40,10,15
+ PUSHBUTTON "Eject",IDC_EJECT1,253,40,30,15
+ PUSHBUTTON "...",IDC_DF1,287,40,10,15
+ COMBOBOX IDC_DF2TEXT,2,93,296,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_DF2TYPE,123,77,49,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ RTEXT "Write-protected",IDC_STATIC,174,77,59,10,SS_CENTERIMAGE
+ CONTROL "",IDC_DF2WP,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,238,75,9,15
+ PUSHBUTTON "Eject",IDC_EJECT2,253,75,30,15
+ PUSHBUTTON "...",IDC_DF2,287,75,10,15
+ COMBOBOX IDC_DF3TEXT,2,128,296,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_DF3TYPE,123,112,49,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ RTEXT "Write-protected",IDC_STATIC,174,113,59,10,SS_CENTERIMAGE
+ CONTROL "",IDC_DF3WP,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,238,111,9,15
+ PUSHBUTTON "Eject",IDC_EJECT3,253,110,30,15
+ PUSHBUTTON "...",IDC_DF3,287,109,10,15
+ GROUPBOX "New Floppy Disk Image",IDC_SETTINGSTEXT,5,183,289,49
+ COMBOBOX IDC_FLOPPYTYPE,16,196,51,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Create Standard Disk [] Creates a standard 880 or 1760 KB ADF disk image.",IDC_CREATE,76,196,97,15
+ PUSHBUTTON "Create Custom Disk [] Creates a low level (MFM) ADF disk image (about 2MB). Useful for programs that use non-standard disk formats (for example some save disks or DOS-formatted floppies)",IDC_CREATE_RAW,183,196,101,15
+ GROUPBOX "Floppy Drive Emulation Speed",IDC_SETTINGSTEXT2,5,144,289,35
+ CONTROL "",IDC_FLOPPYSPD,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,32,152,116,20
+ EDITTEXT IDC_FLOPPYSPDTEXT,169,155,107,12,ES_CENTER | ES_READONLY
+ PUSHBUTTON "Delete save image",IDC_SAVEIMAGE0,43,5,70,15,NOT WS_VISIBLE
+ PUSHBUTTON "Delete save image",IDC_SAVEIMAGE1,43,40,70,15,NOT WS_VISIBLE
+ PUSHBUTTON "Delete save image",IDC_SAVEIMAGE2,43,75,70,15,NOT WS_VISIBLE
+ PUSHBUTTON "Delete save image",IDC_SAVEIMAGE3,43,110,70,15,NOT WS_VISIBLE
+ EDITTEXT IDC_CREATE_NAME,75,215,98,13,ES_AUTOHSCROLL
+ RTEXT "Disk label:",IDC_STATIC,14,216,52,10,SS_CENTERIMAGE
+ CONTROL "DF0:",IDC_DF0ENABLE,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,3,6,34,15
+ CONTROL "DF1:",IDC_DF1ENABLE,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,3,41,34,15
+ CONTROL "DF2:",IDC_DF2ENABLE,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,3,76,34,15
+ CONTROL "DF3:",IDC_DF3ENABLE,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,3,111,34,15
+END
+
+IDD_HARDDISK DIALOGEX 0, 0, 300, 240
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+EXSTYLE WS_EX_CONTEXTHELP
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+ CONTROL "List1",IDC_VOLUMELIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,5,0,290,182
+ PUSHBUTTON "Add &Directory or Archive...",IDC_NEW_FS,10,186,103,15
+ PUSHBUTTON "Add &Hardfile...",IDC_NEW_HF,130,186,74,15
+ PUSHBUTTON "Add Ha&rd Drive...",IDC_NEW_HD,220,186,75,15
+ PUSHBUTTON "Remove",IDC_REMOVE,232,207,60,15
+ PUSHBUTTON "&Properties",IDC_EDIT,232,225,60,15
+ CONTROL "Add PC drives at startup",IDC_MAPDRIVES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,209,100,10
+ CONTROL "Disable UAEFSDB-support",IDC_NOUAEFSDB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,110,209,119,10
+ CONTROL "Don't use Windows Recycle Bin",IDC_NORECYCLEBIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,110,220,121,10
+ CONTROL "Include network drives",IDC_MAPDRIVES_NET,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,220,101,10
+END
+
+IDD_SOUND DIALOGEX 0, 0, 300, 231
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+ RTEXT "Sound device:",IDC_SOUNDCARD,8,9,51,13,SS_CENTERIMAGE
+ COMBOBOX IDC_SOUNDCARDLIST,64,9,229,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ GROUPBOX "Sound Emulation",IDC_SOUNDSETTINGS,5,30,120,81
+ CONTROL "Disabled",IDC_SOUND0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,13,45,101,10
+ CONTROL "Disabled, but emulated",IDC_SOUND1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,57,102,10
+ CONTROL "Enabled",IDC_SOUND2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,69,102,10
+ CONTROL "Enabled, 100% accurate",IDC_SOUND3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,81,101,10
+ GROUPBOX "Volume",IDC_STATIC,131,36,164,31
+ CONTROL "",IDC_SOUNDVOLUME,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,137,44,105,20
+ EDITTEXT IDC_SOUNDVOLUME2,247,47,40,12,ES_CENTER | ES_READONLY
+ GROUPBOX "Sound Buffer Size",IDC_STATIC,132,73,164,31
+ CONTROL "Slider1",IDC_SOUNDBUFFERRAM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,138,81,106,19
+ EDITTEXT IDC_SOUNDBUFFERMEM,248,84,40,12,ES_CENTER | ES_READONLY
+ GROUPBOX "Settings",IDC_SOUNDINTERPOLATION2,6,114,290,60
+ LTEXT "Frequency:",IDC_SOUNDFREQTXT,11,147,53,8,SS_CENTERIMAGE
+ COMBOBOX IDC_SOUNDFREQ,13,156,51,75,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Audio filter:",IDC_SOUNDFILTERTXT,209,148,77,8,SS_CENTERIMAGE
+ COMBOBOX IDC_SOUNDFILTER,209,157,80,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Channel mode:",IDC_SOUNDSTEREOTXT,11,124,57,8,SS_CENTERIMAGE
+ COMBOBOX IDC_SOUNDSTEREO,13,133,122,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Interpolation:",IDC_SOUNDINTERPOLATIONTXT,209,124,75,8,SS_CENTERIMAGE
+ COMBOBOX IDC_SOUNDINTERPOLATION,209,132,80,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Stereo separation:",IDC_SOUNDSTEREOSEPTXT,141,124,63,8,SS_CENTERIMAGE
+ COMBOBOX IDC_SOUNDSTEREOSEP,142,133,62,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Stereo delay:",IDC_SOUNDSTEREOMIXTXT,141,148,63,8,SS_CENTERIMAGE
+ COMBOBOX IDC_SOUNDSTEREOMIX,142,157,62,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ GROUPBOX "Floppy Drive Sound Emulation",IDC_STATIC,6,177,290,46
+ CONTROL "",IDC_SOUNDDRIVEVOLUME,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,14,185,107,19
+ EDITTEXT IDC_SOUNDDRIVEVOLUME2,124,191,40,12,ES_CENTER | ES_READONLY
+ COMBOBOX IDC_SOUNDDRIVE,237,187,46,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_SOUNDDRIVESELECT,18,205,265,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_SOUNDSWAP,73,157,62,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Swap channels:",IDC_SOUNDSWAPTXT,74,148,61,8,SS_CENTERIMAGE
+ CONTROL "Automatic switching",IDC_SOUND_AUTO,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,14,95,103,10
+END
+
+IDD_LOADSAVE DIALOGEX 0, 0, 302, 241
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+ CONTROL "",IDC_CONFIGTREE,"SysTreeView32",TVS_HASLINES | TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,6,3,289,153,WS_EX_CLIENTEDGE
+ RTEXT "Name:",IDC_STATIC,4,161,40,15,SS_CENTERIMAGE
+ EDITTEXT IDC_EDITNAME,48,162,146,13,ES_AUTOHSCROLL
+ RTEXT "Description:",IDC_STATIC,4,183,41,15,SS_CENTERIMAGE
+ EDITTEXT IDC_EDITDESCRIPTION,48,183,146,13,ES_AUTOHSCROLL
+ RTEXT "Link:",IDC_STATIC,4,204,40,15,SS_CENTERIMAGE
+ COMBOBOX IDC_CONFIGLINK,48,205,93,150,CBS_DROPDOWN | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ CONTROL "Ignore link",IDC_CONFIGNOLINK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,146,206,48,10
+ EDITTEXT IDC_EDITPATH,199,161,49,15,ES_AUTOHSCROLL | WS_DISABLED
+ CONTROL "Autoload",IDC_CONFIGAUTO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,253,163,42,10
+ GROUPBOX "Additional Information",IDC_STATIC,199,179,96,38,BS_LEFT
+ PUSHBUTTON "View",IDC_VIEWINFO,208,195,37,15
+ PUSHBUTTON "Set",IDC_SETINFO,250,195,37,15
+ PUSHBUTTON "Load",IDC_QUICKLOAD,5,225,44,15
+ PUSHBUTTON "Save",IDC_QUICKSAVE,54,225,44,15
+ PUSHBUTTON "Load From...",IDC_LOAD,121,225,49,15
+ PUSHBUTTON "Delete",IDC_DELETE,251,225,44,15
+ PUSHBUTTON "Save As...",IDC_SAVE,175,225,44,15
+END
+
+IDD_PORTS DIALOGEX 0, 0, 300, 238
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+ GROUPBOX "Parallel Port",IDC_SERPARFRAME,5,2,291,68
+ RTEXT "Printer:",IDC_STATIC,12,15,25,15,SS_CENTERIMAGE
+ COMBOBOX IDC_PRINTERLIST,49,15,153,134,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Flush print job",IDC_FLUSHPRINTER,220,14,58,12
+ CONTROL "PostScript detection",IDC_PSPRINTERDETECT,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,11,33,79,12
+ CONTROL "PostScript printer emulation",IDC_PSPRINTER,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,95,33,110,12
+ RTEXT "Autoflush [] Time in seconds after a pending print job is automatically flushed.",IDC_PRINTERAUTOFLUSHTXT,202,32,57,15,SS_NOTIFY | SS_CENTERIMAGE
+ EDITTEXT IDC_PRINTERAUTOFLUSH,263,33,25,12,ES_NUMBER
+ RTEXT "Ghostscript extra parameters:",IDC_STATIC,12,49,102,15,SS_CENTERIMAGE
+ EDITTEXT IDC_PS_PARAMS,124,50,165,12,ES_AUTOHSCROLL
+ GROUPBOX "Serial Port",IDC_SERIALFRAME,4,72,292,48
+ COMBOBOX IDC_SERIAL,49,84,232,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ CONTROL "Shared",IDC_SER_SHARED,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,11,102,48,13
+ CONTROL "RTS/CTS",IDC_SER_CTSRTS,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,65,102,55,12
+ GROUPBOX "MIDI",IDC_MIDIFRAME,4,123,292,33
+ RTEXT "Out:",IDC_MIDI,10,134,34,15,SS_CENTERIMAGE
+ COMBOBOX IDC_MIDIOUTLIST,50,134,95,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ RTEXT "In:",IDC_MIDI2,150,134,29,15,SS_CENTERIMAGE
+ COMBOBOX IDC_MIDIINLIST,185,134,95,134,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ GROUPBOX "Mouse/Joystick Ports",IDC_PORT0,4,158,292,75
+ COMBOBOX IDC_PORT0_JOYS,45,174,241,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_PORT1_JOYS,45,195,241,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Swap ports",IDC_SWAP,211,214,75,14
+ RTEXT "Port 0:",IDC_STATIC,11,173,25,15,SS_CENTERIMAGE
+ RTEXT "Port 1:",IDC_STATIC,11,194,25,15,SS_CENTERIMAGE
+ LTEXT "X-Arcade layout information []#1",IDC_STATIC,16,213,106,15,SS_NOTIFY | SS_CENTERIMAGE
+ CONTROL "Direct []Use when emulating serial-link games on two PCs running WinUAE",IDC_SER_DIRECT,
+ "Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,132,103,65,12
+ CONTROL "uaeserial.device",IDC_UAESERIAL,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,207,103,78,13
+END
+
+IDD_CONTRIBUTORS DIALOGEX 0, 0, 411, 242
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION
+CAPTION "UAE Authors and Contributors..."
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+ DEFPUSHBUTTON "Ok",ID_OK,177,219,53,14
+ CONTROL "",IDC_CONTRIBUTORS,"RICHEDIT",TCS_HOTTRACK | TCS_VERTICAL | TCS_RAGGEDRIGHT | TCS_OWNERDRAWFIXED | TCS_MULTISELECT | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,4,5,404,206
+END
+
+IDD_ABOUT DIALOGEX 0, 0, 300, 191
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+ CONTROL "",IDC_RICHEDIT1,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,45,10,210,15
+ CONTROL "",IDC_RICHEDIT2,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,20,30,260,13
+ PUSHBUTTON "Contributors",IDC_CONTRIBUTORS,110,55,80,15
+ CONTROL "",IDC_UAEHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,20,120,80,15
+ CONTROL "",IDC_PICASSOHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,200,90,80,20
+ CONTROL "",IDC_AMIGAHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,109,90,80,20
+ CONTROL "",IDC_WINUAEHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,200,120,80,15
+ CONTROL "",IDC_AIABHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,110,120,80,15
+ CONTROL "",IDC_THEROOTS,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,20,145,80,15
+ CONTROL "",IDC_CAPS,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,200,145,80,15
+ CONTROL "",IDC_ABIME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,110,145,80,15
+ CONTROL "",IDC_CLOANTOHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,20,90,80,20
+ CONTROL "",IDC_AMIGASYS,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,63,169,80,15
+ CONTROL "",IDC_AMIKIT,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,157,169,80,15
+END
+
+IDD_MISC1 DIALOGEX 0, 0, 300, 237
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+ GROUPBOX "Advanced",IDC_STATIC,8,2,285,110
+ CONTROL "Untrap mouse with middle button",IDC_JULIAN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,15,129,10
+ CONTROL "Show GUI on startup",IDC_SHOWGUI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,27,120,10
+ CONTROL "On-screen LEDs",IDC_SHOWLEDS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,40,115,10
+ CONTROL "uaescsi.device",IDC_SCSIDEVICE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,53,117,10
+ CONTROL "Don't show taskbar button",IDC_NOTASKBARBUTTON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,66,117,10
+ CONTROL "bsdsocket.library emulation",IDC_SOCKETS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,161,15,120,10
+ CONTROL "Use CTRL-F11 to quit",IDC_CTRLF11,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,161,27,120,10
+ CONTROL "Don't use RGB overlays",IDC_NOOVERLAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,161,40,120,10
+ CONTROL "Synchronize clock",IDC_CLOCKSYNC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,161,66,115,10
+ GROUPBOX "Keyboard LEDs",IDC_STATIC,7,140,85,94
+ COMBOBOX IDC_KBLED1,22,154,56,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_KBLED2,22,173,56,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_KBLED3,22,193,56,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ GROUPBOX "Logging",IDC_STATIC,97,140,195,25
+ CONTROL "Create log file",IDC_CREATELOGFILE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,151,72,10
+ CONTROL "Illegal memory accesses",IDC_ILLEGAL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,189,151,95,10
+ GROUPBOX "State Files",IDC_STATIC,98,165,195,69
+ PUSHBUTTON "Load state...",IDC_DOLOADSTATE,105,182,49,14
+ PUSHBUTTON "Save state...",IDC_DOSAVESTATE,105,208,49,14
+ CONTROL "Enable state recording",IDC_STATE_CAPTURE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,188,181,88,10
+ RTEXT "Recording rate (seconds):",IDC_STATIC,157,199,86,10,SS_CENTERIMAGE | WS_TABSTOP
+ COMBOBOX IDC_STATE_RATE,248,197,38,65,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
+ RTEXT "Recording buffer (MB):",IDC_STATIC,157,219,83,10,SS_CENTERIMAGE | WS_TABSTOP
+ COMBOBOX IDC_STATE_BUFFERSIZE,248,217,38,65,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
+ CONTROL "Always on top",IDC_ALWAYSONTOP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,79,117,10
+ CONTROL "Catweasel",IDC_CATWEASEL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,161,79,115,10
+ CONTROL "USB mode",IDC_KBLED_USB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,22,216,64,10
+ COMBOBOX IDC_SCSIMODE,161,51,104,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_LANGUAGE,103,121,179,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ GROUPBOX "Language",IDC_STATIC,7,112,285,25
+ CONTROL "Disable powersaving features",IDC_POWERSAVE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,92,120,10
+ CONTROL "Magic Mouse",IDC_MOUSETRICK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,161,92,119,10
+END
+
+IDD_HARDFILE DIALOGEX 0, 0, 299, 212
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | DS_CENTERMOUSE | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Hardfile Settings"
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+ GROUPBOX "Settings",IDC_STATIC,10,5,280,113
+ RTEXT "Path:",IDC_HARDFILE_DIR_TEXT,26,18,22,10
+ EDITTEXT IDC_PATH_NAME,52,15,213,15,ES_AUTOHSCROLL
+ PUSHBUTTON "...",IDC_SELECTOR,271,15,11,15
+ RTEXT "FileSys:",IDC_HARDFILE_FILESYS_TEXT,14,37,34,10
+ EDITTEXT IDC_PATH_FILESYS,52,34,213,15,ES_AUTOHSCROLL
+ PUSHBUTTON "...",IDC_FILESYS_SELECTOR,271,34,11,15
+ RTEXT "Device:",IDC_HARDFILE_DEVICE_TEXT,17,58,31,10
+ EDITTEXT IDC_HARDFILE_DEVICE,52,54,40,15,ES_AUTOHSCROLL
+ RTEXT "Boot priority:",IDC_HARDFILE_BOOTPRI_TEXT,24,79,44,8
+ EDITTEXT IDC_HARDFILE_BOOTPRI,74,75,40,15
+ CONTROL "Read/write",IDC_RW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,110,57,50,10
+ PUSHBUTTON "Enable RDB mode",IDC_HDF_RDB,192,55,92,14
+ RTEXT "Surfaces:",IDC_SURFACES_TEXT,120,79,30,10
+ EDITTEXT IDC_HEADS,155,75,35,15,ES_NUMBER
+ RTEXT "Reserved:",IDC_RESERVED_TEXT,197,79,35,10
+ EDITTEXT IDC_RESERVED,237,75,35,15,ES_NUMBER
+ RTEXT "Sectors:",IDC_SECTORS_TEXT,120,101,30,10
+ EDITTEXT IDC_SECTORS,155,96,35,15,ES_NUMBER
+ RTEXT "Block size:",IDC_BLOCKSIZE_TEXT,197,101,35,10
+ EDITTEXT IDC_BLOCKSIZE,237,96,35,15,ES_NUMBER
+ GROUPBOX "New hard disk image file",IDC_STATIC,10,120,280,62
+ PUSHBUTTON "Create",IDC_HF_CREATE,50,135,80,14
+ EDITTEXT IDC_HF_SIZE,146,135,61,15,ES_NUMBER
+ PUSHBUTTON "OK",IDOK,102,191,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,158,191,50,14
+ EDITTEXT IDC_HF_DOSTYPE,146,158,61,15
+ COMBOBOX IDC_HDF_CONTROLLER,73,97,41,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ RTEXT "DOS type",IDC_STATIC,214,160,32,10,SS_CENTERIMAGE
+ RTEXT "MB",IDC_STATIC,214,138,13,10,SS_CENTERIMAGE
+ RTEXT "Type:",IDC_STATIC,18,160,25,10,SS_CENTERIMAGE
+ RTEXT "HD Controller:",IDC_STATIC,13,98,52,10,SS_CENTERIMAGE
+END
+
+IDD_FILESYS DIALOGEX 15, 25, 299, 111
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | DS_CENTERMOUSE | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Volume Settings"
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+ LTEXT "Device name:",-1,5,9,54,10
+ EDITTEXT IDC_VOLUME_DEVICE,65,5,104,15,ES_AUTOHSCROLL
+ LTEXT "Volume label:",-1,5,31,54,10
+ EDITTEXT IDC_VOLUME_NAME,65,25,103,15,ES_AUTOHSCROLL
+ LTEXT "Path:",-1,5,51,44,10
+ EDITTEXT IDC_PATH_NAME,65,46,227,15,ES_AUTOHSCROLL
+ PUSHBUTTON "Select Directory",IDC_FS_SELECT_DIR,64,66,103,15
+ CONTROL "Read/write",IDC_RW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,215,9,75,10
+ RTEXT "Boot priority:",IDC_VOLUME_BOOTPRI_TEXT,178,29,59,8
+ EDITTEXT IDC_VOLUME_BOOTPRI,261,27,30,15
+ PUSHBUTTON "OK",IDOK,65,91,48,15
+ PUSHBUTTON "Cancel",IDCANCEL,120,91,48,15
+ PUSHBUTTON "Select Archive or Plain File",IDC_FS_SELECT_FILE,189,66,103,15
+ PUSHBUTTON "Eject",IDC_FS_SELECT_EJECT,230,91,62,15
+END
+
+IDD_SETINFO DIALOGEX 0, 0, 229, 85
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | DS_CENTERMOUSE | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Additional Information Settings"
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+ RTEXT "Path:",-1,5,20,24,15,SS_CENTERIMAGE
+ EDITTEXT IDC_PATH_NAME,35,20,169,15,ES_AUTOHSCROLL
+ PUSHBUTTON "...",IDC_SELECTOR,210,20,10,15
+ PUSHBUTTON "OK",IDOK,120,65,48,15
+ PUSHBUTTON "Cancel",IDCANCEL,175,65,48,15
+END
+
+IDD_CHIPSET DIALOGEX 0, 65490, 300, 229
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+ GROUPBOX "Chipset",IDC_STATIC,14,11,145,90
+ CONTROL "OCS [] Original chipset. A1000 and most A500s.",IDC_OCS,
+ "Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,37,26,51,10
+ CONTROL "ECS Agnus [] Enhanced chipset (ECS Agnus chip only). Later A500 and A2000 hardware revisions.",IDC_ECS_AGNUS,
+ "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,37,42,55,10
+ CONTROL "Full ECS [] Full ECS chipset (ECS Agnus and ECS Denise chips). A500+, A600 and A3000.",IDC_ECS,
+ "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,37,58,52,10
+ CONTROL "AGA [] Advanced Graphics Architecture chipset. A1200, A4000 and CD32.",IDC_AGA,
+ "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,100,26,51,10
+ CONTROL "NTSC [] North American and Japanese display standard, 60Hz refresh rate. Other countries use PAL (50Hz. display refresh rate)",IDC_NTSC,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,101,58,50,10
+ GROUPBOX "Options",IDC_STATIC,168,11,114,89
+ CONTROL "Immediate Blitter [] Faster but less compatible blitter emulation.",IDC_BLITIMM,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,174,30,96,10
+ CONTROL "Cycle-exact [] The most compatible A500 emulation mode. Very fast PC recommended.",IDC_CYCLEEXACT,
+ "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,174,43,100,10
+ GROUPBOX "Collision Level",IDC_STATIC,14,105,267,48
+ CONTROL "None [] Collision hardware emulation disabled.",IDC_COLLISION0,
+ "Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,40,121,59,10
+ CONTROL "Sprites only [] Emulate only sprite vs. sprite collisions.",IDC_COLLISION1,
+ "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,39,137,62,10
+ CONTROL "Sprites and Sprites vs. Playfield [] Recommended collision emulation level.",IDC_COLLISION2,
+ "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,109,121,161,10
+ CONTROL "Full [] 100% collision hardware emulation. Only very few games need this option. Slowest.",IDC_COLLISION3,
+ "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,109,137,119,10
+ GROUPBOX "Sound Emulation",IDC_STATIC,13,159,268,65
+ CONTROL "Disabled",IDC_CS_SOUND0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,39,175,102,10
+ CONTROL "Emulated",IDC_CS_SOUND1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,39,190,91,10
+ CONTROL "Emulated, 100% accurate",IDC_CS_SOUND2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,39,205,95,10
+ CONTROL "Genlock connected [] Allow boot sequence to detect genlock. Genlock is not emulated.",IDC_GENLOCK,
+ "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,174,56,100,10
+ CONTROL "Faster RTG [] Enables less accurate custom chipset emulation mode when Picasso96 is enabled.",IDC_FASTERRTG,
+ "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,174,68,100,10
+ COMBOBOX IDC_CS_EXT,101,80,49,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ RTEXT "Chipset Extra",IDC_STATIC,25,79,52,15,SS_CENTERIMAGE
+END
+
+IDD_CHIPSET2 DIALOGEX 0, 65490, 300, 247
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+ GROUPBOX "Advanced Chipset Options",IDC_STATIC,7,6,287,239
+ GROUPBOX "Battery Backed Up Real Time Clock",IDC_STATIC,14,37,275,29
+ CONTROL "None",IDC_CS_RTC1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,22,49,55,10
+ CONTROL "MSM6242B",IDC_CS_RTC2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,91,49,52,10
+ CONTROL "RF5C01A",IDC_CS_RTC3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,160,49,46,10
+ EDITTEXT IDC_CS_RTCADJUST,218,47,64,13,ES_AUTOHSCROLL
+ GROUPBOX "CIA-A TOD Clock Source",IDC_STATIC,12,69,275,29
+ CONTROL "Vertical Sync",IDC_CS_CIAA_TOD1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,25,81,63,10
+ CONTROL "Power Supply 50Hz",IDC_CS_CIAA_TOD2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,95,81,85,10
+ CONTROL "Power Supply 60Hz",IDC_CS_CIAA_TOD3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,192,81,88,10
+ CONTROL "Boot ROM Mirror",IDC_CS_KSMIRROR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,108,80,10
+ CONTROL "A1000 Boot RAM/ROM",IDC_CS_A1000RAM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,108,88,10
+ CONTROL "CD32 CD",IDC_CS_CD32CD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,121,76,10
+ CONTROL "CD32 C2P",IDC_CS_CD32C2P,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,121,87,10
+ CONTROL "CD32 NVRAM",IDC_CS_CD32NVRAM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,190,121,84,10
+ CONTROL "CDTV CD",IDC_CS_CDTVCD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,134,47,10
+ CONTROL "CDTV SRAM",IDC_CS_CDTVRAM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,133,87,10
+ CONTROL "CDTV SRAM Expansion",IDC_CS_CDTVRAMEXP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,190,133,90,10
+ CONTROL "A600/A1200 IDE",IDC_CS_IDE1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,146,79,10
+ CONTROL "A4000/A4000T IDE",IDC_CS_IDE2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,146,88,10
+ CONTROL "Ramsey revision:",IDC_CS_RAMSEY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,211,71,10
+ EDITTEXT IDC_CS_RAMSEYREV,94,209,45,13,ES_AUTOHSCROLL
+ CONTROL "Fat Gary revision:",IDC_CS_FATGARY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,224,71,10
+ EDITTEXT IDC_CS_FATGARYREV,94,223,45,13,ES_AUTOHSCROLL
+ CONTROL "A3000 SCSI",IDC_CS_DMAC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,175,76,10
+ CONTROL "Compatible Settings",IDC_CS_COMPATIBLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,21,234,10
+ CONTROL "DF0: ID Hardware",IDC_CS_DF0IDHW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,190,108,92,10
+ CONTROL "Agnus/Alice revision:",IDC_CS_AGNUS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,150,211,81,10
+ EDITTEXT IDC_CS_AGNUSREV,235,209,45,13,ES_AUTOHSCROLL
+ CONTROL "Denise/Lisa revision:",IDC_CS_DENISE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,150,227,81,10
+ EDITTEXT IDC_CS_DENISEREV,235,226,45,13,ES_AUTOHSCROLL
+ CONTROL "A590/A2091 SCSI",IDC_CS_A2091,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,175,76,10
+ CONTROL "A4000T SCSI",IDC_CS_DMAC2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,190,175,88,10
+ LTEXT "A4091/A4000T SCSI not yet implemented.",IDC_STATIC,25,161,224,8,SS_CENTERIMAGE
+ CONTROL "PCMCIA",IDC_CS_PCMCIA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,190,146,92,10
+ CONTROL "A4091 SCSI",IDC_CS_A4091,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,187,76,10
+ CONTROL "CDTV SCSI",IDC_CS_CDTVSCSI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,187,76,10
+ CONTROL "Include host SCSI devices",IDC_CS_SCSIMODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,190,187,101,10
+END
+
+IDD_AVIOUTPUT DIALOGEX 0, 0, 288, 203
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+ GROUPBOX "Output Properties",IDC_STATIC,5,8,274,118
+ EDITTEXT IDC_AVIOUTPUT_FILETEXT,15,21,226,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER,WS_EX_CLIENTEDGE
+ PUSHBUTTON "...",IDC_AVIOUTPUT_FILE,249,20,19,12
+ CONTROL "Audio",IDC_AVIOUTPUT_AUDIO,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_FLAT | WS_TABSTOP,15,36,39,11
+ CONTROL "",IDC_AVIOUTPUT_AUDIO_STATIC,"Static",SS_LEFTNOWORDWRAP | SS_CENTERIMAGE | SS_SUNKEN | WS_GROUP,59,36,209,11
+ CONTROL "Video",IDC_AVIOUTPUT_VIDEO,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_FLAT | WS_TABSTOP,15,50,39,11
+ CONTROL "",IDC_AVIOUTPUT_VIDEO_STATIC,"Static",SS_LEFTNOWORDWRAP | SS_CENTERIMAGE | SS_SUNKEN | WS_GROUP,59,50,209,11
+ CONTROL "Disable frame rate limit while recording",IDC_AVIOUTPUT_FRAMELIMITER,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,68,158,10
+ CONTROL "AVI output enabled",IDC_AVIOUTPUT_ACTIVATED,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,15,103,108,14
+ CONTROL "PAL",IDC_AVIOUTPUT_PAL,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,133,103,66,14
+ CONTROL "NTSC",IDC_AVIOUTPUT_NTSC,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,204,103,66,14
+ CONTROL "Slider1",IDC_AVIOUTPUT_FPS,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | TBS_ENABLESELRANGE | WS_TABSTOP,166,84,87,11
+ LTEXT "fps",IDC_AVIOUTPUT_FPS_STATIC,255,84,19,8
+ PUSHBUTTON "Save screenshot",IDC_SCREENSHOT,16,141,76,14
+ GROUPBOX "Ripper",IDC_STATIC,5,127,274,38
+ PUSHBUTTON "Pro Wizard 1.62",IDC_PROWIZARD,100,141,76,14,WS_DISABLED
+ CONTROL "Sample ripper",IDC_SAMPLERIPPER_ACTIVATED,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,192,141,77,14
+ GROUPBOX "Input Recorder",IDC_STATIC,5,166,274,33
+ CONTROL "Record",IDC_INPREC_RECORD,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,191,177,77,14
+ CONTROL "Playback",IDC_INPREC_PLAY,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,16,178,77,14
+ CONTROL "Alt. playback mode",IDC_INPREC_PLAYMODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,103,180,78,10
+ CONTROL "Disable sound output while recording",IDC_AVIOUTPUT_NOSOUNDOUTPUT,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,85,148,10
+END
+
+IDD_INPUT DIALOGEX 0, 0, 300, 242
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+ COMBOBOX IDC_INPUTTYPE,5,5,98,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_INPUTDEVICE,109,5,167,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ CONTROL "",IDC_INPUTDEVICEDISABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,282,8,9,8
+ CONTROL "List1",IDC_INPUTLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,5,22,290,146
+ COMBOBOX IDC_INPUTAMIGACNT,5,174,24,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_INPUTAMIGA,33,174,262,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ RTEXT "Joystick dead zone (%):",-1,7,196,79,10,SS_CENTERIMAGE
+ EDITTEXT IDC_INPUTDEADZONE,92,195,25,12,ES_NUMBER
+ RTEXT "Autofire rate (frames):",-1,10,212,76,10,SS_CENTERIMAGE
+ EDITTEXT IDC_INPUTAUTOFIRERATE,92,210,25,12,ES_NUMBER
+ RTEXT "Digital joy-mouse speed:",-1,124,196,84,10,SS_CENTERIMAGE
+ EDITTEXT IDC_INPUTSPEEDD,215,195,25,12,ES_NUMBER
+ RTEXT "Analog joy-mouse speed:",-1,120,212,88,10,SS_CENTERIMAGE
+ EDITTEXT IDC_INPUTSPEEDA,215,211,25,12,ES_NUMBER
+ RTEXT "Mouse speed:",-1,132,228,76,10,SS_CENTERIMAGE
+ EDITTEXT IDC_INPUTSPEEDM,215,227,25,12,ES_NUMBER
+ PUSHBUTTON "Copy from:",IDC_INPUTCOPY,249,195,45,14
+ COMBOBOX IDC_INPUTCOPYFROM,249,211,45,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Swap 1<>2",IDC_INPUTSWAP,249,226,45,14
+END
+
+IDD_FILTER DIALOGEX 0, 0, 296, 224
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+ GROUPBOX "Filter Settings",-1,0,0,294,186
+ CONTROL "Enable",IDC_FILTERENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,17,46,10
+ COMBOBOX IDC_FILTERMODE,62,15,61,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_FILTERFILTER,128,15,81,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Reset to defaults",IDC_FILTERDEFAULT,213,15,73,14
+ RTEXT "Horiz. size:",-1,4,44,54,10,SS_CENTERIMAGE
+ CONTROL "Slider1",IDC_FILTERHZ,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,37,152,19
+ EDITTEXT IDC_FILTERHZV,253,40,34,12,ES_CENTER | ES_READONLY
+ RTEXT "Vert. size:",-1,5,64,54,10,SS_CENTERIMAGE
+ CONTROL "Slider1",IDC_FILTERVZ,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,57,152,19
+ EDITTEXT IDC_FILTERVZV,253,59,34,12,ES_CENTER | ES_READONLY
+ RTEXT "Horiz. position:",-1,5,84,55,10,SS_CENTERIMAGE
+ CONTROL "Slider1",IDC_FILTERHO,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,77,151,19
+ EDITTEXT IDC_FILTERHOV,253,79,34,12,ES_CENTER | ES_READONLY
+ RTEXT "Vert. position:",-1,5,103,55,10,SS_CENTERIMAGE
+ CONTROL "Slider1",IDC_FILTERVO,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,99,151,19
+ EDITTEXT IDC_FILTERVOV,253,101,34,12,ES_CENTER | ES_READONLY
+ RTEXT "Extra settings:",-1,27,133,57,10,SS_CENTERIMAGE
+ CONTROL "Slider1",IDC_FILTERXL,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,99,157,151,19
+ EDITTEXT IDC_FILTERXLV,253,159,34,12,ES_CENTER | ES_READONLY
+ COMBOBOX IDC_FILTERSLR,253,130,33,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ GROUPBOX "Presets",-1,0,187,296,36
+ COMBOBOX IDC_FILTERPRESETS,8,201,119,150,CBS_DROPDOWN | CBS_SORT | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Load",IDC_FILTERPRESETLOAD,132,200,47,14
+ PUSHBUTTON "Save",IDC_FILTERPRESETSAVE,184,200,47,14
+ PUSHBUTTON "Delete",IDC_FILTERPRESETDELETE,236,200,47,14
+ COMBOBOX IDC_FILTERHZMULT,67,43,27,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_FILTERVZMULT,67,63,27,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ CONTROL "Autoscale",IDC_FILTERAUTORES,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,26,168,63,10
+ COMBOBOX IDC_FILTERXTRA,105,130,138,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+END
+
+IDD_HARDDRIVE DIALOGEX 0, 0, 380, 66
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | DS_CENTERMOUSE | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Harddrive Settings"
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+ LTEXT "Hard drive:",-1,7,11,35,10
+ COMBOBOX IDC_HARDDRIVE,49,9,325,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ CONTROL "Read/write",IDC_RW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,247,33,55,10
+ DEFPUSHBUTTON "Add hard drive",IDOK,173,30,65,14
+ PUSHBUTTON "Cancel",IDCANCEL,321,30,54,14
+ DEFPUSHBUTTON "Create hard disk image file",IDC_HARDDRIVE_IMAGE,49,30,115,14
+ EDITTEXT IDC_PATH_NAME,89,49,169,15,ES_AUTOHSCROLL | NOT WS_VISIBLE
+END
+
+IDD_MISC2 DIALOGEX 0, 0, 300, 92
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+ GROUPBOX "When Active",IDC_STATIC,8,7,88,73
+ RTEXT "Run at priority:",IDC_ACTIVE_PRI,14,17,52,10,SS_CENTERIMAGE | WS_TABSTOP
+ COMBOBOX IDC_ACTIVE_PRIORITY,14,29,76,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ GROUPBOX "When Inactive",IDC_STATIC,102,7,92,73
+ RTEXT "Run at priority:",IDC_INACTIVE_PRI,109,17,51,10,SS_CENTERIMAGE | WS_TABSTOP
+ COMBOBOX IDC_INACTIVE_PRIORITY,109,29,76,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ CONTROL "Pause emulation",IDC_INACTIVE_PAUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,109,50,69,10
+ CONTROL "Disable sound",IDC_INACTIVE_NOSOUND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,109,63,79,10
+ GROUPBOX "When Minimized",IDC_STATIC,199,7,92,73
+ RTEXT "Run at priority:",IDC_MINIMIZED_PRI,207,18,51,10,SS_CENTERIMAGE | WS_TABSTOP
+ COMBOBOX IDC_MINIMIZED_PRIORITY,207,30,76,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ CONTROL "Pause emulation",IDC_MINIMIZED_PAUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,207,50,69,10
+ CONTROL "Disable sound",IDC_MINIMIZED_NOSOUND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,207,63,79,10
+END
+
+IDD_DISK DIALOGEX 0, 0, 300, 242
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_CONTROL | DS_CENTER | DS_CENTERMOUSE | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+ CONTROL "",IDC_DISKLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,4,6,292,196
+ PUSHBUTTON "Remove floppy disk image",IDC_DISKLISTREMOVE,149,223,101,15
+ COMBOBOX IDC_DISKTEXT,3,205,293,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Insert floppy disk image",IDC_DISKLISTINSERT,34,223,101,15
+END
+
+IDD_PANEL DIALOGEX 0, 0, 420, 278
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_SYSMENU
+EXSTYLE WS_EX_ACCEPTFILES | WS_EX_CONTROLPARENT
+CAPTION "WinUAE Properties"
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+ GROUPBOX "",IDC_PANEL_FRAME,112,4,303,247,NOT WS_VISIBLE
+ CONTROL "",IDC_PANELTREE,"SysTreeView32",TVS_HASLINES | TVS_SHOWSELALWAYS | TVS_NOSCROLL | WS_BORDER | WS_TABSTOP,5,5,101,248,WS_EX_CLIENTEDGE
+ GROUPBOX "",IDC_PANEL_FRAME_OUTER,110,2,307,251
+ PUSHBUTTON "Reset",IDC_RESETAMIGA,6,259,47,14
+ PUSHBUTTON "Quit",IDC_QUITEMU,57,259,47,14
+ DEFPUSHBUTTON "OK",IDOK,260,259,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,313,259,50,14
+ PUSHBUTTON "Help",IDHELP,366,259,50,14,WS_DISABLED
+END
+
+IDD_PATHS DIALOGEX 0, 0, 300, 237
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+ LTEXT "System ROMs:",IDC_PATHS_ROML,14,9,260,8,SS_CENTERIMAGE
+ EDITTEXT IDC_PATHS_ROM,14,22,261,15,ES_AUTOHSCROLL
+ PUSHBUTTON "...",IDC_PATHS_ROMS,281,22,11,15
+ LTEXT "Configuration files:",IDC_PATHS_CONFIGL,14,40,260,8,SS_CENTERIMAGE
+ EDITTEXT IDC_PATHS_CONFIG,14,52,261,15,ES_AUTOHSCROLL
+ PUSHBUTTON "...",IDC_PATHS_CONFIGS,281,52,11,15
+ LTEXT "Screenshots:",IDC_PATHS_SCREENSHOTL,14,71,260,8,SS_CENTERIMAGE
+ EDITTEXT IDC_PATHS_SCREENSHOT,14,83,261,15,ES_AUTOHSCROLL
+ PUSHBUTTON "...",IDC_PATHS_SCREENSHOTS,281,83,11,15
+ LTEXT "State files:",IDC_PATHS_STATEFILEL,14,102,260,8,SS_CENTERIMAGE
+ EDITTEXT IDC_PATHS_SAVESTATE,14,114,261,15,ES_AUTOHSCROLL
+ PUSHBUTTON "...",IDC_PATHS_SAVESTATES,281,114,11,15
+ LTEXT "Videos:",IDC_PATHS_AVIOUTPUTL,14,132,260,8,SS_CENTERIMAGE
+ EDITTEXT IDC_PATHS_AVIOUTPUT,14,144,261,15,ES_AUTOHSCROLL
+ PUSHBUTTON "...",IDC_PATHS_AVIOUTPUTS,282,144,11,15
+ LTEXT "Saveimages:",IDC_PATHS_SAVEIMAGEL,14,163,260,8,SS_CENTERIMAGE
+ EDITTEXT IDC_PATHS_SAVEIMAGE,14,175,261,15,ES_AUTOHSCROLL
+ PUSHBUTTON "...",IDC_PATHS_SAVEIMAGES,281,175,11,15
+ PUSHBUTTON "Reset to defaults",IDC_PATHS_DEFAULT,14,199,92,14
+ PUSHBUTTON "Rescan ROMs",IDC_ROM_RESCAN,14,218,92,14
+ PUSHBUTTON "Clear registry",IDC_RESETREGISTRY,112,218,77,14
+ COMBOBOX IDC_PATHS_DEFAULTTYPE,112,199,163,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Clear disk history",IDC_RESETDISKHISTORY,198,218,77,14
+END
+
+IDD_QUICKSTART DIALOGEX 0, 0, 300, 242
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+ GROUPBOX "Emulated Hardware",IDC_QUICKSTART_CONFIG,3,0,294,54
+ RTEXT "Model:",IDC_STATIC,5,14,50,10,SS_CENTERIMAGE
+ COMBOBOX IDC_QUICKSTART_MODEL,59,12,233,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ RTEXT "Configuration:",IDC_STATIC,5,33,50,10,SS_CENTERIMAGE
+ COMBOBOX IDC_QUICKSTART_CONFIGURATION,59,31,233,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ GROUPBOX "Compatibility vs Required CPU Power ",IDC_QUICKSTART_COMPA,3,56,294,33
+ RTEXT "Best compatibility",IDC_STATIC,13,70,67,10,SS_CENTERIMAGE
+ CONTROL "",IDC_QUICKSTART_COMPATIBILITY,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,88,65,115,21
+ RTEXT "Low compatibility",IDC_STATIC,215,70,63,10,SS_CENTERIMAGE
+ GROUPBOX "Host Configuration",IDC_QUICKSTART_HOST,3,91,294,33
+ RTEXT "Configuration:",IDC_STATIC,5,105,55,10,SS_CENTERIMAGE
+ COMBOBOX IDC_QUICKSTART_HOSTCONFIG,65,103,225,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ GROUPBOX "Emulated Floppy Drives",IDC_QUICKSTART_DF,3,126,294,84
+ CONTROL "Floppy drive DF0:",IDC_DF0QENABLE,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,10,136,72,15
+ PUSHBUTTON "Select disk image",IDC_DF0QQ,85,136,98,15
+ RTEXT "Write-protected",IDC_STATIC,185,139,56,10,SS_CENTERIMAGE
+ CONTROL "",IDC_DF0WPQ,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,246,137,10,15
+ PUSHBUTTON "Eject",IDC_EJECT0Q,261,136,30,15
+ COMBOBOX IDC_DF0TEXTQ,9,154,282,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
+ CONTROL "Floppy drive DF1:",IDC_DF1QENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,172,71,15
+ PUSHBUTTON "Select disk image",IDC_DF1QQ,85,172,98,15
+ RTEXT "Write-protected",IDC_STATIC,185,175,55,10,SS_CENTERIMAGE
+ CONTROL "",IDC_DF1WPQ,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,246,173,10,15
+ PUSHBUTTON "Eject",IDC_EJECT1Q,261,172,30,15
+ COMBOBOX IDC_DF1TEXTQ,9,190,282,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "Set configuration",IDC_QUICKSTART_SETCONFIG,9,219,72,15,NOT WS_VISIBLE
+ GROUPBOX "Mode",IDC_STATIC,190,211,107,27,BS_LEFT
+ CONTROL "Start in Quickstart mode",IDC_QUICKSTARTMODE,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,197,222,94,10
+END
+
+IDD_FRONTEND DIALOGEX 0, 0, 420, 242
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+ CONTROL "",IDC_FE_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,6,9,235,124
+ GROUPBOX "",IDC_FE_INFO,249,140,160,95
+ GROUPBOX "",IDC_FE_SCREENSHOT,249,7,160,128
+END
+
+IDD_PROGRESSBAR DIALOGEX 0, 0, 229, 58
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Processing..."
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+ PUSHBUTTON "Cancel",IDCANCEL,88,40,50,14
+ CONTROL "",IDC_PROGRESSBAR,"msctls_progress32",PBS_SMOOTH | WS_BORDER,7,19,215,14
+ CTEXT "x",IDC_PROGRESSBAR_TEXT,23,5,187,10,SS_CENTERIMAGE | WS_TABSTOP
+END
+
+IDD_STRINGBOX DIALOGEX 0, 0, 229, 58
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Enter text..."
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+ DEFPUSHBUTTON "OK",IDOK,48,39,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,151,39,50,14
+ EDITTEXT IDC_STRINGBOXEDIT,7,17,214,14,ES_AUTOHSCROLL | ES_WANTRETURN
+ CTEXT "Custom input event",IDC_STRINGBOX_TEXT,23,5,187,10,SS_CENTERIMAGE | WS_TABSTOP
+END
+
+IDD_DEBUGGER DIALOGEX 0, 0, 454, 368
+STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_THICKFRAME
+EXSTYLE WS_EX_CONTROLPARENT
+CAPTION "WinUAE Debugger"
+FONT 8, "Courier New", 0, 0, 0x0
+BEGIN
+ EDITTEXT IDC_DBG_OUTPUT1,1,79,370,262,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | ES_WANTRETURN | WS_VSCROLL | NOT WS_TABSTOP
+ EDITTEXT IDC_DBG_OUTPUT2,1,79,370,262,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | ES_WANTRETURN | WS_VSCROLL | NOT WS_TABSTOP
+ LISTBOX IDC_DBG_MEM,1,92,370,249,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+ LISTBOX IDC_DBG_DASM,1,92,370,249,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+ EDITTEXT IDC_DBG_MEMINPUT,1,79,36,12,ES_AUTOHSCROLL | ES_WANTRETURN
+ EDITTEXT IDC_DBG_INPUT,1,342,354,12,ES_AUTOHSCROLL | ES_WANTRETURN
+ PUSHBUTTON "?",IDC_DBG_HELP,356,342,15,12,NOT WS_TABSTOP
+ PUSHBUTTON "Set to PC",IDC_DBG_MEMTOPC,38,79,45,12,NOT WS_TABSTOP
+ LISTBOX IDC_DBG_DREG,1,1,52,66,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+ LISTBOX IDC_DBG_AREG,54,1,52,66,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+ LISTBOX IDC_DBG_AMEM,106,1,231,66,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+ LISTBOX IDC_DBG_CCR,338,1,57,42,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+ LISTBOX IDC_DBG_SP_VBR,338,44,115,34,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+ LISTBOX IDC_DBG_MMISC,396,1,57,42,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+ LISTBOX IDC_DBG_PC,1,68,52,10,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+ LISTBOX IDC_DBG_PREFETCH,54,68,283,10,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+ LISTBOX IDC_DBG_FPREG,372,218,81,66,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+ LISTBOX IDC_DBG_FPSR,372,285,81,34,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+ LISTBOX IDC_DBG_MISCCPU,372,320,81,34,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+ CONTROL "",IDC_DBG_STATUS,"msctls_statusbar32",0x103,0,355,453,12
+ LISTBOX IDC_DBG_BRKPTS,1,79,370,262,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL
+ LISTBOX IDC_DBG_MCUSTOM,372,79,81,138,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT
+ LISTBOX IDC_DBG_MISC,1,79,370,262,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL
+ LISTBOX IDC_DBG_CUSTOM,1,79,370,262,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_APPICON ICON "winuae.ico"
+IDI_FLOPPY ICON "35floppy.ico"
+IDI_ABOUT ICON "amigainfo.ico"
+IDI_HARDDISK ICON "Drive.ico"
+IDI_CPU ICON "cpu.ico"
+IDI_PORTS ICON "joystick.ico"
+IDI_INPUT ICON "joystick.ico"
+IDI_MISC1 ICON "misc.ico"
+IDI_MISC2 ICON "misc.ico"
+IDI_MOVE_UP ICON "move_up.ico"
+IDI_MOVE_DOWN ICON "move_dow.ico"
+IDI_AVIOUTPUT ICON "avioutput.ico"
+IDI_DISK ICON "Drive.ico"
+IDI_CONFIGFILE ICON "file.ico"
+IDI_FOLDER ICON "folder.ico"
+IDI_SOUND ICON "sound.ico"
+IDI_DISPLAY ICON "screen.ico"
+IDI_ROOT ICON "root.ico"
+IDI_MEMORY ICON "chip.ico"
+IDI_QUICKSTART ICON "quickstart.ico"
+IDI_PATHS ICON "paths.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,4,4,0
+ PRODUCTVERSION 1,4,4,0
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x40004L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "FileDescription", "WinUAE"
+ VALUE "FileVersion", "1.4.4"
+ VALUE "InternalName", "WinUAE"
+ VALUE "LegalCopyright", "© 1996-2007 under the GNU Public License (GPL)"
+ VALUE "OriginalFilename", "WinUAE.exe"
+ VALUE "ProductName", "WinUAE"
+ VALUE "ProductVersion", "1.4.4"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Cursor
+//
+
+IDC_MYHAND CURSOR "H_arrow.cur"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Menu
+//
+
+IDM_SYSTRAY MENU
+BEGIN
+ POPUP "Menu"
+ BEGIN
+ MENUITEM "Configuration", ID_ST_CONFIGURATION
+ POPUP "Floppy drives"
+ BEGIN
+ MENUITEM "Eject all drives", ID_ST_EJECTALL
+ MENUITEM "DF0:", ID_ST_DF0
+ MENUITEM "DF1:", ID_ST_DF1
+ MENUITEM "DF2:", ID_ST_DF2
+ MENUITEM "DF3:", ID_ST_DF3
+ END
+ MENUITEM "Reset", ID_ST_RESET
+ MENUITEM "Help", ID_ST_HELP
+ MENUITEM "Quit WinUAE", ID_ST_QUIT
+ END
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// WAVE
+//
+
+IDR_DRIVE_STARTUP_A500_1 WAVE "drive_startup.wav"
+IDR_DRIVE_CLICK_A500_1 WAVE "drive_click.wav"
+IDR_DRIVE_SPIN_A500_1 WAVE "drive_spin.wav"
+IDR_DRIVE_SNATCH_A500_1 WAVE "drive_snatch.wav"
+IDR_DRIVE_SPINND_A500_1 WAVE "drive_spinnd.wav"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Bitmap
+//
+
+IDB_XARCADE BITMAP "xarcade-winuae.bmp"
+IDB_LCD160X43 BITMAP "lcd.bmp"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE
+BEGIN
+ IDS_KICKSTART "ROM"
+ IDS_DISK "Disk swapper"
+ IDS_DISPLAY "Display"
+ IDS_HARDDISK "Hard drives"
+ IDS_FLOPPY "Floppy drives"
+ IDS_ABOUT "About"
+ IDS_LOADSAVE "Configurations"
+ IDS_AVIOUTPUT "Output"
+ IDS_PORTS "Game & I/O ports"
+ IDS_MISC1 "Misc"
+ IDS_MEMORY "RAM"
+ IDS_CPU "CPU and FPU"
+ IDS_CHIPSET "Chipset"
+ IDS_INPUT "Input"
+ IDS_FILTER "Filter"
+END
+
+STRINGTABLE
+BEGIN
+ IDS_MISC2 "Priority"
+ IDS_PATHS "Paths"
+ IDS_QUICKSTART "Quickstart"
+ IDS_FRONTEND "Frontend"
+ IDS_CHIPSET2 "Adv. Chipset"
+END
+
+STRINGTABLE
+BEGIN
+ IDS_EXTTEXT "Floppy disk image files"
+ IDS_EXTACTUAL "ADF"
+ IDS_SOUND "Sound"
+ IDS_CDROM "CD-ROM"
+ IDS_FRAMERATE "Every %1Frame"
+ IDS_SECOND "second "
+ IDS_THIRD "third "
+ IDS_FOURTH "fourth "
+ IDS_FIFTH "fifth "
+ IDS_SIXTH "sixth "
+ IDS_SEVENTH "seventh "
+ IDS_EIGHTH "eighth "
+END
+
+STRINGTABLE
+BEGIN
+ IDS_NINTH "ninth "
+ IDS_TENTH "tenth "
+ IDS_SELECTADF "Select a floppy disk image file..."
+ IDS_ADF "Floppy disk image files"
+ IDS_CHOOSEBLANK "Choose a blank floppy disk image file..."
+ IDS_SELECTHDF "Select a hard disk image file..."
+ IDS_HDF "Hard disk image files"
+ IDS_SELECTUAE "Select a WinUAE configuration file..."
+ IDS_UAE "WinUAE configuration files"
+ IDS_SELECTROM "Select a system ROM file..."
+ IDS_ROM "System ROM files"
+ IDS_SELECTKEY "Select a system ROM key file..."
+ IDS_KEY "System ROM key files"
+ IDS_SELECTINFO "Select information for your configuration..."
+ IDS_NONE "none"
+ IDS_VOLUME "Volume"
+END
+
+STRINGTABLE
+BEGIN
+ IDS_SELECTFILESYSROOT "Please select the root directory of the file system..."
+ IDS_DEFAULTMIDIOUT "Default MIDI-Out Device"
+ IDS_CONTRIBUTORS1 "Bernd Schmidt - The Grand-Master\nSam Jordan - Custom-chip, floppy-DMA, etc.\nMathias Ortmann - Original WinUAE Main Guy, BSD Socket support\nBrian King - Picasso96 Support, Integrated GUI for WinUAE, previous WinUAE Main Guy\nToni Wilen - Core updates, WinUAE Main Guy\nGustavo Goedert/Peter Remmers/Michael Sontheimer/Tomi Hakala/Tim Gunn/Nemo Pohle - DOS Port Stuff\nSamuel Devulder/Olaf Barthel/Sam Jordan - Amiga Ports\nKrister Bergman - XFree86 and OS/2 Port\nA. Blanchard/Ernesto Corvi - MacOS Port\nChristian Bauer - BeOS Port\nIan Stephenson - NextStep Port\nPeter Teichmann - Acorn/RiscOS Port\nStefan Reinauer - ZorroII/III AutoConfig, Serial Support\nChristian Schmitt/Chris Hames - Serial Support\nHerman ten Brugge - 68020/68881 Emulation Code\nTauno Taipaleenmaki - Various UAE-Control/UAE-Library Support\nBrett Eden/Tim Gunn/Paolo Besser/Nemo Pohle - Various Docs and Web-Sites\nGeorg Veichtlbauer - Help File coordinator, German GUI\nFulvio Leonardi - Italian translator for WinUAE\n"
+ IDS_CONTRIBUTORS2 "Bill Panagouleas - Hardware support\nSpecial thanks to Alexander Kneer and Tobias Abt (The Picasso96 Team)\nSteven Weiser - Postscript printing emulation idea and testing.\nPéter Tóth /Balázs Rátkai/Iván Herczeg/András Arató - Hungarian translation.\nKarsten Bock, Gavin Fance, Dirk Trowe and Christoph Meier - Freezer cartridge hardware support."
+ IDS_INVALIDPRTPORT "The printer you have in this configuration is not valid on this machine.\n"
+ IDS_RESTOREUSS "Restore a WinUAE snapshot file"
+ IDS_USS "WinUAE snapshot files"
+ IDS_WRONGOSVERSION "WinUAE is no longer supported on Windows NT. Please upgrade to either Windows 2000 or Windows XP or a later version."
+ IDS_SELECTFLASH "Select a flash or battery-backed RAM file..."
+ IDS_FLASH "WinUAE flash or battery-backed RAM file"
+ IDS_INPUTHOSTWIDGET "Input source"
+ IDS_INPUTAMIGAEVENT "Input target"
+ IDS_INPUTAUTOFIRE "Autofire"
+ IDS_SAVEUSS "Save a WinUAE snapshot file"
+ IDS_MIDIOVERFLOW "Sysexbuffer overflow. Should not happen. Please report this to\nberndroesch1@compuserve.de"
+END
+
+STRINGTABLE
+BEGIN
+ IDS_PATH "Path"
+ IDS_RW "R/W"
+ IDS_SECTORS "Sectors"
+ IDS_SURFACES "Bill Panagouleas - Hardware support\nSpecial thanks to Alexander Kneer and Tobias Abt (The Picasso96 Team)\nSteven Weiser - Postscript printing emulation idea and testing.\nHungarian translation - Péter Tóth , Balázs Rátkai , Iván Herczeg , András Arató"
+ IDS_RESERVED "Reserved"
+ IDS_BLOCKSIZE "Block size"
+ IDS_NAME "Name"
+ IDS_DESCRIPTION "Description"
+ IDS_COULDNOTLOADCONFIG "Could not load the selected configuration!\n"
+ IDS_NOHELP "Online help is disabled because the HTML Help functionality is not installed on this system. HTML Help is available from http://www.microsoft.com/downloads/.\n"
+ IDS_MUSTSELECTCONFIG "You must select a configuration or enter a name before selecting Load...\n"
+ IDS_INVALIDCOMPORT "The serial port you have in this configuration is not valid on this machine.\n"
+END
+
+STRINGTABLE
+BEGIN
+ IDS_HFDSIZE "Size"
+ IDS_DEVICE "Device"
+ IDS_BOOTPRI "BootPri"
+ IDS_FLOPPY_COMPATIBLE " (compatible)"
+ IDS_FLOPPY_TURBO "Turbo"
+ IDS_YES "yes"
+ IDS_NO "no"
+ IDS_PRI_ABOVENORMAL "Above Normal"
+ IDS_PRI_NORMAL "Normal"
+ IDS_PRI_BELOWNORMAL "Below Normal"
+ IDS_PRI_LOW "Low"
+ IDS_OLDRTGLIBRARY "The installed LIBS:Picasso96/rtg.library (%d.%d) should be updated.\nA newer version is included in the ""Amiga Programs"" directory\n of the WinUAE distribution archive.\n\nNewer library version fixes graphics problems and increases performance."
+ IDS_DEFAULT_AF2005 "Amiga Forever 2005+"
+ IDS_DEFAULT_AF "Amiga Forever"
+ IDS_DEFAULT_WINUAE "WinUAE default (old)"
+END
+
+STRINGTABLE
+BEGIN
+ IDS_SOUND_STEREO2 "Cloned Stereo (4 Channels)"
+ IDS_INPUT_CUSTOMEVENT "<Custom event>"
+ IDS_DEFAULT_NEWWINUAE "WinUAE default (new)"
+END
+
+STRINGTABLE
+BEGIN
+ IDS_UNSUPPORTEDPIXELFORMAT
+ "Error: unsupported pixel format. Please use a different screen mode.\n"
+ IDS_MUSTENTERNAME "You must select a configuration or enter a name before selecting Save...\n"
+ IDS_MUSTSELECTCONFIGFORDELETE
+ "You must select a configuration or enter a name before selecting Delete...\n"
+ IDS_DELETECONFIGCONFIRMATION
+ "Are you sure you want to Delete this configuration?\n"
+ IDS_DELETECONFIGTITLE "Confirm Delete"
+ IDS_MUSTSELECTPATH "You must select a path!"
+ IDS_SETTINGSERROR "Settings error"
+ IDS_MUSTSELECTNAME "You must select a name for the volume!"
+ IDS_MUSTSELECTFILE "You must select a file!"
+ IDS_FAILEDHARDFILECREATION "Failed to create hard disk image file..."
+ IDS_CREATIONERROR "Creation error"
+ IDS_ERRORTITLE "WinUAE message"
+END
+
+STRINGTABLE
+BEGIN
+ IDS_INP "WinUAE Input Recording"
+ IDS_RESTOREINP "Playback a WinUAE input recording"
+ IDS_SAVEINP "Record a WinUAE input recording"
+ IDS_SCREEN_WINDOWED "Windowed"
+ IDS_SCREEN_FULLSCREEN "Fullscreen"
+ IDS_SCREEN_FULLWINDOW "Full-window"
+ IDS_SCREEN_VSYNC "VSync"
+ IDS_SOUND_MONO "Mono"
+ IDS_SOUND_MIXED "Mixed"
+ IDS_SOUND_STEREO "Stereo"
+ IDS_SOUND_INTERPOL_DISABLED "Disabled"
+ IDS_SOUND_FILTER_OFF "Always off"
+ IDS_SOUND_FILTER_EMULATED "Emulated (A500)"
+END
+
+STRINGTABLE
+BEGIN
+ IDS_SOUND_FILTER_EMULATED_E "Emulated (A1200)"
+ IDS_INPUT_COMPATIBILITY "Compatibility mode"
+ IDS_INPUT_CUSTOM "Configuration #%d"
+ IDS_INPUT_COPY_DEFAULT "Default"
+ IDS_INPUT_COPY_CUSTOM "Config #%d"
+ IDS_3D_NO_FILTER "Point (%d-bit)"
+ IDS_3D_BILINEAR "Bilinear (%d-bit)"
+ IDS_VSYNC_DEFAULT "Default"
+ IDS_DRIVESOUND_NONE "No sound"
+ IDS_DRIVESOUND_DEFAULT_A500 "A500 (WinUAE built-in)"
+ IDS_AVIOUTPUT_NOCODEC "no codec selected"
+ IDS_DISK_IMAGENAME "Disk image"
+ IDS_DISK_DRIVENAME "Drive"
+ IDS_AGA8BIT "AGA emulation requires a 16-bit or higher display depth.\nSwitching from 8-bit to 16-bit."
+ IDS_UNSUPPORTEDSCREENMODE
+ "The selected screen mode can't be displayed in a window, because %s\nSwitching to full-screen display."
+ IDS_UNSUPPORTEDSCREENMODE_1
+ "the desktop is running in an unknown color mode."
+END
+
+STRINGTABLE
+BEGIN
+ IDS_UNSUPPORTEDSCREENMODE_2
+ "the desktop is running in 8-bit color depth, which WinUAE can't use in windowed mode."
+ IDS_UNSUPPORTEDSCREENMODE_3
+ "the desktop is too small for the specified window size."
+ IDS_UNSUPPORTEDSCREENMODE_4
+ "you selected an RTG (Picasso96) display with a color depth different from that of the desktop and an overlay was unavailable."
+ IDS_FLOPPYTYPE35DD "3.5"" DD"
+ IDS_FLOPPYTYPE35HD "3.5"" HD"
+ IDS_FLOPPYTYPE525SD "5.25"" SD"
+ IDS_FLOPPYTYPEDISABLED "Disabled"
+ IDS_STMENUNOFLOPPY "No floppy disk inserted"
+ IDS_TREEVIEW_HARDWARE "Hardware"
+ IDS_TREEVIEW_HOST "Host"
+ IDS_TREEVIEW_MISC "Miscellaneous"
+ IDS_TREEVIEW_SETTINGS "Settings"
+ IDS_WINUAETITLE_MMB "[Mouse active - press ALT+TAB or middle mouse button to cancel]"
+ IDS_WINUAETITLE_NORMAL "[Mouse active - press ALT+TAB to cancel]"
+ IDS_STARTEMULATION "Start"
+ IDS_TREEVIEW_ABOUT "About"
+END
+
+STRINGTABLE
+BEGIN
+ IDS_NOHARDDRIVES "No hard disks detected that were either empty or RDB-partitioned."
+ IDS_DEFAULT_HOST "Default Configuration"
+ IDS_SOUND_4CHANNEL "4 Channels"
+ IDS_HF_FS_CUSTOM "Custom"
+ IDS_SELECTFS "Select file system handler (FastFileSystem, SmartFilesystem, etc.)"
+ IDS_KEYJOY "Keyboard Layout A (Numeric keypad, 0 and 5 = Fire)\nKeyboard Layout B (Cursor keys, Right CTRL and ALT = Fire)\nKeyboard Layout C (W=Up S=Down A=Left D=Right, Left ALT = Fire)\nX-Arcade (Left)\nX-Arcade (Right)"
+ IDS_STATEFILE_UNCOMPRESSED "Uncompressed"
+ IDS_STATEFILE_RAMDUMP "RAM dump"
+ IDS_STATEFILE_WAVE "Wave audio dump"
+ IDS_SOUND_SWAP_PAULA "Paula only"
+ IDS_SOUND_SWAP_AHI "AHI only"
+ IDS_SOUND_SWAP_BOTH "Both"
+ IDS_SOUND_FILTER_ON_AGA "Always on (A500)"
+ IDS_SOUND_FILTER_ON_A500 "Always on (A1200)"
+ IDS_DRIVESOUND_PC_FLOPPY "PC floppy drive %c"
+ IDS_FLOPPYTYPE35DDESCOM "3.5"" ESCOM"
+END
+
+STRINGTABLE
+BEGIN
+ IDS_NUMSG_NEEDEXT2 "The software uses a non-standard floppy disk format. You may need to use a custom floppy disk image file instead of a standard one. This message will not appear again."
+ IDS_NUMSG_NOROMKEY "Could not find system ROM key file."
+ IDS_NUMSG_KSROMCRCERROR "System ROM checksum incorrect. The system ROM image file may be corrupt."
+ IDS_NUMSG_KSROMREADERROR "Error while reading system ROM."
+END
+
+STRINGTABLE
+BEGIN
+ IDS_NUMSG_NOEXTROM "No extended ROM found."
+ IDS_NUMSG_MODRIP_NOTFOUND "No music modules or packed data found."
+ IDS_NUMSG_MODRIP_FINISHED "Scan finished."
+ IDS_NUMSG_MODRIP_SAVE "Module/packed data found\n%s\nStart address %08.8X, Size %d bytes\nWould you like to save it?"
+ IDS_NUMSG_KS68020 "The selected system ROM requires a 68020 with 32-bit addressing or 68030 or higher CPU."
+ IDS_NUMSG_ROMNEED "One of the following system ROMs is required:\n\n%s\n\nCheck the System ROM path in the Paths panel and click Rescan ROMs."
+ IDS_NUMSG_STATEHD "WARNING: Current configuration is not fully compatible with state saves.\nThis message will not appear again."
+ IDS_NUMSG_NOCAPS "Selected disk image needs the SPS plugin\nwhich is available from\nhttp//www.softpres.org/"
+ IDS_NUMSG_OLDCAPS "You need an updated SPS plugin\nwhich is available from\nhttp//www.softpres.org/"
+ IDS_IMGCHK_BOOTBLOCKCRCERROR
+ "The selected floppy disk image is not bootable (boot block checksum error)"
+ IDS_IMGCHK_BOOTBLOCKNO "The selected floppy disk image is not bootable (no boot block)"
+ IDS_IMGCHK_DAMAGED "The selected floppy disk image is damaged or unformatted"
+ IDS_IMGCHK_KS2 "The selected floppy disk image requires a 2.04 or later system ROM.\nThe configuration has been updated."
+ IDS_IMGCHK_KS3 "The selected floppy disk image requires a 3.0 or later system ROM.\nThe configuration has been updated."
+ IDS_ROMSCANEND "Scan of ROMs finished"
+END
+
+STRINGTABLE
+BEGIN
+ IDS_ROM_AVAILABLE "available"
+ IDS_ROM_UNAVAILABLE "unavailable"
+ IDS_HARDDRIVESAFETYWARNING1
+ "Warning: The drive safety check is active. Selected drive is not empty and non-RDB partitioned."
+ IDS_NUMSG_KS68EC020 "The selected system ROM requires a 68020 with 24-bit addressing or higher CPU."
+ IDS_ROMSCANNOROMS "No supported system ROMs detected."
+ IDS_NUMSG_KICKREP "You need to have a floppy disk (image file) in DF0: to use the system ROM replacement."
+ IDS_NUMSG_KICKREPNO "The floppy disk (image file) in DF0: is not compatible with the system ROM replacement functionality."
+ IDS_NUMSG_NOROM "Could not load system ROM, trying system ROM replacement."
+ IDS_HDCLONE_OK "Hard drive image file created succesfully."
+ IDS_HDCLONE_FAIL "Hard drive image file creation failed.\nError code %d:%d."
+ IDS_NUMSG_KS68030 "The selected system ROM requires a 68030 CPU."
+ IDS_NUMSG_EXPROMNEED "One of the following expansion boot ROMs is required:\n\n%s\n\nCheck the System ROM path in the Paths panel and click Rescan ROMs."
+ IDS_HARDDRIVESAFETYWARNING2
+ "Warning: The drive safety check has been disabled, and non-empty and non-RDB partitioned hard disk(s) were detected."
+END
+
+STRINGTABLE
+BEGIN
+ IDS_QS_MODELS "A500\nA500+\nA600\nA1000\nA1200\nA3000\nCD32\nCDTV\nArcadia Multi Select system\nExpanded WinUAE example configuration"
+ IDS_QS_MODEL_A500 "1.3 ROM, OCS, 512 KB Chip + 512 KB Slow RAM (most common)\nThis configuration is capable of running most games and demos produced for first-generation hardware. Only few exceptions need a different configuration (e.g. the oldest games tend to be incompatible with this configuration).\n1.3 ROM, ECS Agnus, 512 KB Chip RAM + 512 KB Slow RAM\nLater hardware revision of the A500. Nearly 100% compatible with the previous configuration.\n1.3 ROM, ECS Agnus, 1 MB Chip RAM\nFew newer games and demos require this configuration.\n1.3 ROM, OCS Agnus, 512 KB Chip RAM\nVery old (e.g. pre-1988) games and demos may require this configuration.\n1.2 ROM, OCS Agnus, 512 KB Chip RAM\nAs available for the A1000, and installed on the first A500 and A2000 series. Some very old programs only work correctly with this configuration. Note: This system ROM version can only boot from floppy disk (no hard disk boot support).\n1.2 ROM, OCS Agnus, 512 KB Chip RAM + 512 KB Slow RAM\nThis configuration adds expansion memory to the first A500 produced. Try this if your game does not work with newer configurations, but works with the previous one. It could add some features to the game, including faster loading times. Note: This system ROM version can only boot from floppy disk (no hard disk boot support)."
+ IDS_QS_MODEL_A500P "Basic non-expanded configuration\nThe A500+ adds an ECS Agnus chip, 1 MB of Chip RAM and a 2.0 ROM to the A500. Many A500 games and demos don't work properly on an A500+.\n2 MB Chip RAM expanded configuration\n\n4 MB Fast RAM expanded configuration\n"
+ IDS_QS_MODEL_A600 "Basic non-expanded configuration\nThe A600 is smaller than the A500+ and has an updated 2.0 ROM.\n2 MB Chip RAM expanded configuration\n\n4 MB Fast RAM expanded configuration\n"
+ IDS_QS_MODEL_A1000 "512 KB Chip RAM\nThe A1000 was the first model produced, with a configuration equivalent to that of an A500 with OCS chipset. You normally don't need to use this configuration, unless you are nostalgic and would like to hear the short A1000 boot tune\n""ICS"" Denise without EHB support\nVery first A1000 models had Denise without EHB capability.\n256 KB Chip RAM\n Unexpanded A1000. All later A1000 models were sold with a 256 KB RAM expansion built-in."
+ IDS_QS_MODEL_A1200 "Basic non-expanded configuration\nUse this configuration to run most AGA demos and games\n4 MB Fast RAM expanded configuration\nSome newer AGA games and demos need an expanded A1200 to run."
+ IDS_QS_MODEL_CD32 "CD32\nThe CD32 was one the first 32-bit consoles on the market. It is basically an A1200 with a built-in CD-ROM drive. Insert your CD32 or CDTV CD-ROM into a free CD-ROM drive before starting the emulation."
+ IDS_QS_MODEL_CDTV "CDTV\nThe CDTV was the first model with a built-in CD-ROM drive. Looking like a black CD player, it featured a configuration equivalent to that of an A500 with 1 MB RAM and an ECS chipset.\nFloppy drive and 64KB SRAM card expanded CDTV\n"
+END
+
+STRINGTABLE
+BEGIN
+ IDS_QS_MODEL_UAE "High-end expanded configuration"
+ IDS_QS_MODEL_ARCADIA "Arcadia\nArcadia Multi Select system is arcade platform developed by Arcadia and Mastertronic. It is based on an A500 mainboard with ROM cage attached to expansion port. Arcadia ROM files go to ""Cartridge ROM File"" in ROM-panel."
+ IDS_QS_MODEL_A3000 "1.4 ROM, 2MB Chip + 8MB Fast\n\n3.1 ROM, 2MB Chip + 8MB Fast\n"
+ IDS_QS_MODEL_A4000 "A4000 (test)\nA4000"
+ IDS_QS_MODEL_A4000T "A4000T (test)\nA4000T"
+END
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// Finnish resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FIN)
+#ifdef _WIN32
+LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.\0"
+END
+
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#endif // Finnish resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
}
static _inline int GetResult(uint32 A, uint32 B, uint32 C, uint32 D)
-{
+{
const bool ac = (A==C);
const bool bc = (B==C);
const int x1 = ac;
}
static void internal_scale2x_32_def(u32* dst0,
- u32* dst1,
- const u32* src0,
- const u32* src1,
- const u32* src2,
- unsigned count) {
+ u32* dst1,
+ const u32* src0,
+ const u32* src1,
+ const u32* src2,
+ unsigned count) {
/* first pixel */
dst0[0] = src1[0];
dst1[0] = src1[0];
/* always do the first and last run */
count -= 2*4;
-#ifdef __GNUC__
+#ifdef __GNUC__
__asm__ __volatile__(
- /* first run */
- /* set the current, current_pre, current_next registers */
- "pxor %%mm0,%%mm0\n" /* use a fake black out of screen */
- "movq 0(%1),%%mm7\n"
- "movq 8(%1),%%mm1\n"
- "psrlq $48,%%mm0\n"
- "psllq $48,%%mm1\n"
- "movq %%mm7,%%mm2\n"
- "movq %%mm7,%%mm3\n"
- "psllq $16,%%mm2\n"
- "psrlq $16,%%mm3\n"
- "por %%mm2,%%mm0\n"
- "por %%mm3,%%mm1\n"
-
- /* current_upper */
- "movq (%0),%%mm6\n"
-
- /* compute the upper-left pixel for dst0 on %%mm2 */
- /* compute the upper-right pixel for dst0 on %%mm4 */
- "movq %%mm0,%%mm2\n"
- "movq %%mm1,%%mm4\n"
- "movq %%mm0,%%mm3\n"
- "movq %%mm1,%%mm5\n"
- "pcmpeqw %%mm6,%%mm2\n"
- "pcmpeqw %%mm6,%%mm4\n"
- "pcmpeqw (%2),%%mm3\n"
- "pcmpeqw (%2),%%mm5\n"
- "pandn %%mm2,%%mm3\n"
- "pandn %%mm4,%%mm5\n"
- "movq %%mm0,%%mm2\n"
- "movq %%mm1,%%mm4\n"
- "pcmpeqw %%mm1,%%mm2\n"
- "pcmpeqw %%mm0,%%mm4\n"
- "pandn %%mm3,%%mm2\n"
- "pandn %%mm5,%%mm4\n"
- "movq %%mm2,%%mm3\n"
- "movq %%mm4,%%mm5\n"
- "pand %%mm6,%%mm2\n"
- "pand %%mm6,%%mm4\n"
- "pandn %%mm7,%%mm3\n"
- "pandn %%mm7,%%mm5\n"
- "por %%mm3,%%mm2\n"
- "por %%mm5,%%mm4\n"
-
- /* set *dst0 */
- "movq %%mm2,%%mm3\n"
- "punpcklwd %%mm4,%%mm2\n"
- "punpckhwd %%mm4,%%mm3\n"
- "movq %%mm2,(%3)\n"
- "movq %%mm3,8(%3)\n"
-
- /* next */
- "addl $8,%0\n"
- "addl $8,%1\n"
- "addl $8,%2\n"
- "addl $16,%3\n"
-
- /* central runs */
- "shrl $2,%4\n"
- "jz 1f\n"
- ASM_JUMP_ALIGN
- "0:\n"
-
- /* set the current, current_pre, current_next registers */
- "movq -8(%1),%%mm0\n"
- "movq (%1),%%mm7\n"
- "movq 8(%1),%%mm1\n"
- "psrlq $48,%%mm0\n"
- "psllq $48,%%mm1\n"
- "movq %%mm7,%%mm2\n"
- "movq %%mm7,%%mm3\n"
- "psllq $16,%%mm2\n"
- "psrlq $16,%%mm3\n"
- "por %%mm2,%%mm0\n"
- "por %%mm3,%%mm1\n"
-
- /* current_upper */
- "movq (%0),%%mm6\n"
-
- /* compute the upper-left pixel for dst0 on %%mm2 */
- /* compute the upper-right pixel for dst0 on %%mm4 */
- "movq %%mm0,%%mm2\n"
- "movq %%mm1,%%mm4\n"
- "movq %%mm0,%%mm3\n"
- "movq %%mm1,%%mm5\n"
- "pcmpeqw %%mm6,%%mm2\n"
- "pcmpeqw %%mm6,%%mm4\n"
- "pcmpeqw (%2),%%mm3\n"
- "pcmpeqw (%2),%%mm5\n"
- "pandn %%mm2,%%mm3\n"
- "pandn %%mm4,%%mm5\n"
- "movq %%mm0,%%mm2\n"
- "movq %%mm1,%%mm4\n"
- "pcmpeqw %%mm1,%%mm2\n"
- "pcmpeqw %%mm0,%%mm4\n"
- "pandn %%mm3,%%mm2\n"
- "pandn %%mm5,%%mm4\n"
- "movq %%mm2,%%mm3\n"
- "movq %%mm4,%%mm5\n"
- "pand %%mm6,%%mm2\n"
- "pand %%mm6,%%mm4\n"
- "pandn %%mm7,%%mm3\n"
- "pandn %%mm7,%%mm5\n"
- "por %%mm3,%%mm2\n"
- "por %%mm5,%%mm4\n"
-
- /* set *dst0 */
- "movq %%mm2,%%mm3\n"
- "punpcklwd %%mm4,%%mm2\n"
- "punpckhwd %%mm4,%%mm3\n"
- "movq %%mm2,(%3)\n"
- "movq %%mm3,8(%3)\n"
-
- /* next */
- "addl $8,%0\n"
- "addl $8,%1\n"
- "addl $8,%2\n"
- "addl $16,%3\n"
-
- "decl %4\n"
- "jnz 0b\n"
- "1:\n"
-
- /* final run */
- /* set the current, current_pre, current_next registers */
- "movq -8(%1),%%mm0\n"
- "movq (%1),%%mm7\n"
- "pxor %%mm1,%%mm1\n" /* use a fake black out of screen */
- "psrlq $48,%%mm0\n"
- "psllq $48,%%mm1\n"
- "movq %%mm7,%%mm2\n"
- "movq %%mm7,%%mm3\n"
- "psllq $16,%%mm2\n"
- "psrlq $16,%%mm3\n"
- "por %%mm2,%%mm0\n"
- "por %%mm3,%%mm1\n"
-
- /* current_upper */
- "movq (%0),%%mm6\n"
-
- /* compute the upper-left pixel for dst0 on %%mm2 */
- /* compute the upper-right pixel for dst0 on %%mm4 */
- "movq %%mm0,%%mm2\n"
- "movq %%mm1,%%mm4\n"
- "movq %%mm0,%%mm3\n"
- "movq %%mm1,%%mm5\n"
- "pcmpeqw %%mm6,%%mm2\n"
- "pcmpeqw %%mm6,%%mm4\n"
- "pcmpeqw (%2),%%mm3\n"
- "pcmpeqw (%2),%%mm5\n"
- "pandn %%mm2,%%mm3\n"
- "pandn %%mm4,%%mm5\n"
- "movq %%mm0,%%mm2\n"
- "movq %%mm1,%%mm4\n"
- "pcmpeqw %%mm1,%%mm2\n"
- "pcmpeqw %%mm0,%%mm4\n"
- "pandn %%mm3,%%mm2\n"
- "pandn %%mm5,%%mm4\n"
- "movq %%mm2,%%mm3\n"
- "movq %%mm4,%%mm5\n"
- "pand %%mm6,%%mm2\n"
- "pand %%mm6,%%mm4\n"
- "pandn %%mm7,%%mm3\n"
- "pandn %%mm7,%%mm5\n"
- "por %%mm3,%%mm2\n"
- "por %%mm5,%%mm4\n"
-
- /* set *dst0 */
- "movq %%mm2,%%mm3\n"
- "punpcklwd %%mm4,%%mm2\n"
- "punpckhwd %%mm4,%%mm3\n"
- "movq %%mm2,(%3)\n"
- "movq %%mm3,8(%3)\n"
- "emms\n"
-
- : "+r" (src0), "+r" (src1), "+r" (src2), "+r" (dst), "+r" (count)
- :
- : "cc"
- );
+ /* first run */
+ /* set the current, current_pre, current_next registers */
+ "pxor %%mm0,%%mm0\n" /* use a fake black out of screen */
+ "movq 0(%1),%%mm7\n"
+ "movq 8(%1),%%mm1\n"
+ "psrlq $48,%%mm0\n"
+ "psllq $48,%%mm1\n"
+ "movq %%mm7,%%mm2\n"
+ "movq %%mm7,%%mm3\n"
+ "psllq $16,%%mm2\n"
+ "psrlq $16,%%mm3\n"
+ "por %%mm2,%%mm0\n"
+ "por %%mm3,%%mm1\n"
+
+ /* current_upper */
+ "movq (%0),%%mm6\n"
+
+ /* compute the upper-left pixel for dst0 on %%mm2 */
+ /* compute the upper-right pixel for dst0 on %%mm4 */
+ "movq %%mm0,%%mm2\n"
+ "movq %%mm1,%%mm4\n"
+ "movq %%mm0,%%mm3\n"
+ "movq %%mm1,%%mm5\n"
+ "pcmpeqw %%mm6,%%mm2\n"
+ "pcmpeqw %%mm6,%%mm4\n"
+ "pcmpeqw (%2),%%mm3\n"
+ "pcmpeqw (%2),%%mm5\n"
+ "pandn %%mm2,%%mm3\n"
+ "pandn %%mm4,%%mm5\n"
+ "movq %%mm0,%%mm2\n"
+ "movq %%mm1,%%mm4\n"
+ "pcmpeqw %%mm1,%%mm2\n"
+ "pcmpeqw %%mm0,%%mm4\n"
+ "pandn %%mm3,%%mm2\n"
+ "pandn %%mm5,%%mm4\n"
+ "movq %%mm2,%%mm3\n"
+ "movq %%mm4,%%mm5\n"
+ "pand %%mm6,%%mm2\n"
+ "pand %%mm6,%%mm4\n"
+ "pandn %%mm7,%%mm3\n"
+ "pandn %%mm7,%%mm5\n"
+ "por %%mm3,%%mm2\n"
+ "por %%mm5,%%mm4\n"
+
+ /* set *dst0 */
+ "movq %%mm2,%%mm3\n"
+ "punpcklwd %%mm4,%%mm2\n"
+ "punpckhwd %%mm4,%%mm3\n"
+ "movq %%mm2,(%3)\n"
+ "movq %%mm3,8(%3)\n"
+
+ /* next */
+ "addl $8,%0\n"
+ "addl $8,%1\n"
+ "addl $8,%2\n"
+ "addl $16,%3\n"
+
+ /* central runs */
+ "shrl $2,%4\n"
+ "jz 1f\n"
+ ASM_JUMP_ALIGN
+ "0:\n"
+
+ /* set the current, current_pre, current_next registers */
+ "movq -8(%1),%%mm0\n"
+ "movq (%1),%%mm7\n"
+ "movq 8(%1),%%mm1\n"
+ "psrlq $48,%%mm0\n"
+ "psllq $48,%%mm1\n"
+ "movq %%mm7,%%mm2\n"
+ "movq %%mm7,%%mm3\n"
+ "psllq $16,%%mm2\n"
+ "psrlq $16,%%mm3\n"
+ "por %%mm2,%%mm0\n"
+ "por %%mm3,%%mm1\n"
+
+ /* current_upper */
+ "movq (%0),%%mm6\n"
+
+ /* compute the upper-left pixel for dst0 on %%mm2 */
+ /* compute the upper-right pixel for dst0 on %%mm4 */
+ "movq %%mm0,%%mm2\n"
+ "movq %%mm1,%%mm4\n"
+ "movq %%mm0,%%mm3\n"
+ "movq %%mm1,%%mm5\n"
+ "pcmpeqw %%mm6,%%mm2\n"
+ "pcmpeqw %%mm6,%%mm4\n"
+ "pcmpeqw (%2),%%mm3\n"
+ "pcmpeqw (%2),%%mm5\n"
+ "pandn %%mm2,%%mm3\n"
+ "pandn %%mm4,%%mm5\n"
+ "movq %%mm0,%%mm2\n"
+ "movq %%mm1,%%mm4\n"
+ "pcmpeqw %%mm1,%%mm2\n"
+ "pcmpeqw %%mm0,%%mm4\n"
+ "pandn %%mm3,%%mm2\n"
+ "pandn %%mm5,%%mm4\n"
+ "movq %%mm2,%%mm3\n"
+ "movq %%mm4,%%mm5\n"
+ "pand %%mm6,%%mm2\n"
+ "pand %%mm6,%%mm4\n"
+ "pandn %%mm7,%%mm3\n"
+ "pandn %%mm7,%%mm5\n"
+ "por %%mm3,%%mm2\n"
+ "por %%mm5,%%mm4\n"
+
+ /* set *dst0 */
+ "movq %%mm2,%%mm3\n"
+ "punpcklwd %%mm4,%%mm2\n"
+ "punpckhwd %%mm4,%%mm3\n"
+ "movq %%mm2,(%3)\n"
+ "movq %%mm3,8(%3)\n"
+
+ /* next */
+ "addl $8,%0\n"
+ "addl $8,%1\n"
+ "addl $8,%2\n"
+ "addl $16,%3\n"
+
+ "decl %4\n"
+ "jnz 0b\n"
+ "1:\n"
+
+ /* final run */
+ /* set the current, current_pre, current_next registers */
+ "movq -8(%1),%%mm0\n"
+ "movq (%1),%%mm7\n"
+ "pxor %%mm1,%%mm1\n" /* use a fake black out of screen */
+ "psrlq $48,%%mm0\n"
+ "psllq $48,%%mm1\n"
+ "movq %%mm7,%%mm2\n"
+ "movq %%mm7,%%mm3\n"
+ "psllq $16,%%mm2\n"
+ "psrlq $16,%%mm3\n"
+ "por %%mm2,%%mm0\n"
+ "por %%mm3,%%mm1\n"
+
+ /* current_upper */
+ "movq (%0),%%mm6\n"
+
+ /* compute the upper-left pixel for dst0 on %%mm2 */
+ /* compute the upper-right pixel for dst0 on %%mm4 */
+ "movq %%mm0,%%mm2\n"
+ "movq %%mm1,%%mm4\n"
+ "movq %%mm0,%%mm3\n"
+ "movq %%mm1,%%mm5\n"
+ "pcmpeqw %%mm6,%%mm2\n"
+ "pcmpeqw %%mm6,%%mm4\n"
+ "pcmpeqw (%2),%%mm3\n"
+ "pcmpeqw (%2),%%mm5\n"
+ "pandn %%mm2,%%mm3\n"
+ "pandn %%mm4,%%mm5\n"
+ "movq %%mm0,%%mm2\n"
+ "movq %%mm1,%%mm4\n"
+ "pcmpeqw %%mm1,%%mm2\n"
+ "pcmpeqw %%mm0,%%mm4\n"
+ "pandn %%mm3,%%mm2\n"
+ "pandn %%mm5,%%mm4\n"
+ "movq %%mm2,%%mm3\n"
+ "movq %%mm4,%%mm5\n"
+ "pand %%mm6,%%mm2\n"
+ "pand %%mm6,%%mm4\n"
+ "pandn %%mm7,%%mm3\n"
+ "pandn %%mm7,%%mm5\n"
+ "por %%mm3,%%mm2\n"
+ "por %%mm5,%%mm4\n"
+
+ /* set *dst0 */
+ "movq %%mm2,%%mm3\n"
+ "punpcklwd %%mm4,%%mm2\n"
+ "punpckhwd %%mm4,%%mm3\n"
+ "movq %%mm2,(%3)\n"
+ "movq %%mm3,8(%3)\n"
+ "emms\n"
+
+ : "+r" (src0), "+r" (src1), "+r" (src2), "+r" (dst), "+r" (count)
+ :
+ : "cc"
+ );
#else
__asm {
mov eax, src0;
mov ecx, src2;
mov edx, dst;
mov esi, count;
-
+
/* first run */
/* set the current, current_pre, current_next registers */
pxor mm0,mm0; /* use a fake black out of screen */
add ebx,8;
add ecx,8;
add edx,16;
-
+
dec esi;
jnz label0;
label1:
#ifdef __GNUC__
__asm__ __volatile__(
- /* first run */
- /* set the current, current_pre, current_next registers */
- "pxor %%mm0,%%mm0\n" /* use a fake black out of screen */
- "movq 0(%1),%%mm7\n"
- "movq 8(%1),%%mm1\n"
- "psrlq $32,%%mm0\n"
- "psllq $32,%%mm1\n"
- "movq %%mm7,%%mm2\n"
- "movq %%mm7,%%mm3\n"
- "psllq $32,%%mm2\n"
- "psrlq $32,%%mm3\n"
- "por %%mm2,%%mm0\n"
- "por %%mm3,%%mm1\n"
-
- /* current_upper */
- "movq (%0),%%mm6\n"
-
- /* compute the upper-left pixel for dst0 on %%mm2 */
- /* compute the upper-right pixel for dst0 on %%mm4 */
- "movq %%mm0,%%mm2\n"
- "movq %%mm1,%%mm4\n"
- "movq %%mm0,%%mm3\n"
- "movq %%mm1,%%mm5\n"
- "pcmpeqd %%mm6,%%mm2\n"
- "pcmpeqd %%mm6,%%mm4\n"
- "pcmpeqd (%2),%%mm3\n"
- "pcmpeqd (%2),%%mm5\n"
- "pandn %%mm2,%%mm3\n"
- "pandn %%mm4,%%mm5\n"
- "movq %%mm0,%%mm2\n"
- "movq %%mm1,%%mm4\n"
- "pcmpeqd %%mm1,%%mm2\n"
- "pcmpeqd %%mm0,%%mm4\n"
- "pandn %%mm3,%%mm2\n"
- "pandn %%mm5,%%mm4\n"
- "movq %%mm2,%%mm3\n"
- "movq %%mm4,%%mm5\n"
- "pand %%mm6,%%mm2\n"
- "pand %%mm6,%%mm4\n"
- "pandn %%mm7,%%mm3\n"
- "pandn %%mm7,%%mm5\n"
- "por %%mm3,%%mm2\n"
- "por %%mm5,%%mm4\n"
-
- /* set *dst0 */
- "movq %%mm2,%%mm3\n"
- "punpckldq %%mm4,%%mm2\n"
- "punpckhdq %%mm4,%%mm3\n"
- "movq %%mm2,(%3)\n"
- "movq %%mm3,8(%3)\n"
-
- /* next */
- "addl $8,%0\n"
- "addl $8,%1\n"
- "addl $8,%2\n"
- "addl $16,%3\n"
-
- /* central runs */
- "shrl $1,%4\n"
- "jz 1f\n"
- ASM_JUMP_ALIGN
- "0:\n"
-
- /* set the current, current_pre, current_next registers */
- "movq -8(%1),%%mm0\n"
- "movq (%1),%%mm7\n"
- "movq 8(%1),%%mm1\n"
- "psrlq $32,%%mm0\n"
- "psllq $32,%%mm1\n"
- "movq %%mm7,%%mm2\n"
- "movq %%mm7,%%mm3\n"
- "psllq $32,%%mm2\n"
- "psrlq $32,%%mm3\n"
- "por %%mm2,%%mm0\n"
- "por %%mm3,%%mm1\n"
-
- /* current_upper */
- "movq (%0),%%mm6\n"
-
- /* compute the upper-left pixel for dst0 on %%mm2 */
- /* compute the upper-right pixel for dst0 on %%mm4 */
- "movq %%mm0,%%mm2\n"
- "movq %%mm1,%%mm4\n"
- "movq %%mm0,%%mm3\n"
- "movq %%mm1,%%mm5\n"
- "pcmpeqd %%mm6,%%mm2\n"
- "pcmpeqd %%mm6,%%mm4\n"
- "pcmpeqd (%2),%%mm3\n"
- "pcmpeqd (%2),%%mm5\n"
- "pandn %%mm2,%%mm3\n"
- "pandn %%mm4,%%mm5\n"
- "movq %%mm0,%%mm2\n"
- "movq %%mm1,%%mm4\n"
- "pcmpeqd %%mm1,%%mm2\n"
- "pcmpeqd %%mm0,%%mm4\n"
- "pandn %%mm3,%%mm2\n"
- "pandn %%mm5,%%mm4\n"
- "movq %%mm2,%%mm3\n"
- "movq %%mm4,%%mm5\n"
- "pand %%mm6,%%mm2\n"
- "pand %%mm6,%%mm4\n"
- "pandn %%mm7,%%mm3\n"
- "pandn %%mm7,%%mm5\n"
- "por %%mm3,%%mm2\n"
- "por %%mm5,%%mm4\n"
-
- /* set *dst0 */
- "movq %%mm2,%%mm3\n"
- "punpckldq %%mm4,%%mm2\n"
- "punpckhdq %%mm4,%%mm3\n"
- "movq %%mm2,(%3)\n"
- "movq %%mm3,8(%3)\n"
-
- /* next */
- "addl $8,%0\n"
- "addl $8,%1\n"
- "addl $8,%2\n"
- "addl $16,%3\n"
-
- "decl %4\n"
- "jnz 0b\n"
- "1:\n"
-
- /* final run */
- /* set the current, current_pre, current_next registers */
- "movq -8(%1),%%mm0\n"
- "movq (%1),%%mm7\n"
- "pxor %%mm1,%%mm1\n" /* use a fake black out of screen */
- "psrlq $32,%%mm0\n"
- "psllq $32,%%mm1\n"
- "movq %%mm7,%%mm2\n"
- "movq %%mm7,%%mm3\n"
- "psllq $32,%%mm2\n"
- "psrlq $32,%%mm3\n"
- "por %%mm2,%%mm0\n"
- "por %%mm3,%%mm1\n"
-
- /* current_upper */
- "movq (%0),%%mm6\n"
-
- /* compute the upper-left pixel for dst0 on %%mm2 */
- /* compute the upper-right pixel for dst0 on %%mm4 */
- "movq %%mm0,%%mm2\n"
- "movq %%mm1,%%mm4\n"
- "movq %%mm0,%%mm3\n"
- "movq %%mm1,%%mm5\n"
- "pcmpeqd %%mm6,%%mm2\n"
- "pcmpeqd %%mm6,%%mm4\n"
- "pcmpeqd (%2),%%mm3\n"
- "pcmpeqd (%2),%%mm5\n"
- "pandn %%mm2,%%mm3\n"
- "pandn %%mm4,%%mm5\n"
- "movq %%mm0,%%mm2\n"
- "movq %%mm1,%%mm4\n"
- "pcmpeqd %%mm1,%%mm2\n"
- "pcmpeqd %%mm0,%%mm4\n"
- "pandn %%mm3,%%mm2\n"
- "pandn %%mm5,%%mm4\n"
- "movq %%mm2,%%mm3\n"
- "movq %%mm4,%%mm5\n"
- "pand %%mm6,%%mm2\n"
- "pand %%mm6,%%mm4\n"
- "pandn %%mm7,%%mm3\n"
- "pandn %%mm7,%%mm5\n"
- "por %%mm3,%%mm2\n"
- "por %%mm5,%%mm4\n"
-
- /* set *dst0 */
- "movq %%mm2,%%mm3\n"
- "punpckldq %%mm4,%%mm2\n"
- "punpckhdq %%mm4,%%mm3\n"
- "movq %%mm2,(%3)\n"
- "movq %%mm3,8(%3)\n"
- "emms\n"
-
- : "+r" (src0), "+r" (src1), "+r" (src2), "+r" (dst), "+r" (count)
- :
- : "cc"
- );
+ /* first run */
+ /* set the current, current_pre, current_next registers */
+ "pxor %%mm0,%%mm0\n" /* use a fake black out of screen */
+ "movq 0(%1),%%mm7\n"
+ "movq 8(%1),%%mm1\n"
+ "psrlq $32,%%mm0\n"
+ "psllq $32,%%mm1\n"
+ "movq %%mm7,%%mm2\n"
+ "movq %%mm7,%%mm3\n"
+ "psllq $32,%%mm2\n"
+ "psrlq $32,%%mm3\n"
+ "por %%mm2,%%mm0\n"
+ "por %%mm3,%%mm1\n"
+
+ /* current_upper */
+ "movq (%0),%%mm6\n"
+
+ /* compute the upper-left pixel for dst0 on %%mm2 */
+ /* compute the upper-right pixel for dst0 on %%mm4 */
+ "movq %%mm0,%%mm2\n"
+ "movq %%mm1,%%mm4\n"
+ "movq %%mm0,%%mm3\n"
+ "movq %%mm1,%%mm5\n"
+ "pcmpeqd %%mm6,%%mm2\n"
+ "pcmpeqd %%mm6,%%mm4\n"
+ "pcmpeqd (%2),%%mm3\n"
+ "pcmpeqd (%2),%%mm5\n"
+ "pandn %%mm2,%%mm3\n"
+ "pandn %%mm4,%%mm5\n"
+ "movq %%mm0,%%mm2\n"
+ "movq %%mm1,%%mm4\n"
+ "pcmpeqd %%mm1,%%mm2\n"
+ "pcmpeqd %%mm0,%%mm4\n"
+ "pandn %%mm3,%%mm2\n"
+ "pandn %%mm5,%%mm4\n"
+ "movq %%mm2,%%mm3\n"
+ "movq %%mm4,%%mm5\n"
+ "pand %%mm6,%%mm2\n"
+ "pand %%mm6,%%mm4\n"
+ "pandn %%mm7,%%mm3\n"
+ "pandn %%mm7,%%mm5\n"
+ "por %%mm3,%%mm2\n"
+ "por %%mm5,%%mm4\n"
+
+ /* set *dst0 */
+ "movq %%mm2,%%mm3\n"
+ "punpckldq %%mm4,%%mm2\n"
+ "punpckhdq %%mm4,%%mm3\n"
+ "movq %%mm2,(%3)\n"
+ "movq %%mm3,8(%3)\n"
+
+ /* next */
+ "addl $8,%0\n"
+ "addl $8,%1\n"
+ "addl $8,%2\n"
+ "addl $16,%3\n"
+
+ /* central runs */
+ "shrl $1,%4\n"
+ "jz 1f\n"
+ ASM_JUMP_ALIGN
+ "0:\n"
+
+ /* set the current, current_pre, current_next registers */
+ "movq -8(%1),%%mm0\n"
+ "movq (%1),%%mm7\n"
+ "movq 8(%1),%%mm1\n"
+ "psrlq $32,%%mm0\n"
+ "psllq $32,%%mm1\n"
+ "movq %%mm7,%%mm2\n"
+ "movq %%mm7,%%mm3\n"
+ "psllq $32,%%mm2\n"
+ "psrlq $32,%%mm3\n"
+ "por %%mm2,%%mm0\n"
+ "por %%mm3,%%mm1\n"
+
+ /* current_upper */
+ "movq (%0),%%mm6\n"
+
+ /* compute the upper-left pixel for dst0 on %%mm2 */
+ /* compute the upper-right pixel for dst0 on %%mm4 */
+ "movq %%mm0,%%mm2\n"
+ "movq %%mm1,%%mm4\n"
+ "movq %%mm0,%%mm3\n"
+ "movq %%mm1,%%mm5\n"
+ "pcmpeqd %%mm6,%%mm2\n"
+ "pcmpeqd %%mm6,%%mm4\n"
+ "pcmpeqd (%2),%%mm3\n"
+ "pcmpeqd (%2),%%mm5\n"
+ "pandn %%mm2,%%mm3\n"
+ "pandn %%mm4,%%mm5\n"
+ "movq %%mm0,%%mm2\n"
+ "movq %%mm1,%%mm4\n"
+ "pcmpeqd %%mm1,%%mm2\n"
+ "pcmpeqd %%mm0,%%mm4\n"
+ "pandn %%mm3,%%mm2\n"
+ "pandn %%mm5,%%mm4\n"
+ "movq %%mm2,%%mm3\n"
+ "movq %%mm4,%%mm5\n"
+ "pand %%mm6,%%mm2\n"
+ "pand %%mm6,%%mm4\n"
+ "pandn %%mm7,%%mm3\n"
+ "pandn %%mm7,%%mm5\n"
+ "por %%mm3,%%mm2\n"
+ "por %%mm5,%%mm4\n"
+
+ /* set *dst0 */
+ "movq %%mm2,%%mm3\n"
+ "punpckldq %%mm4,%%mm2\n"
+ "punpckhdq %%mm4,%%mm3\n"
+ "movq %%mm2,(%3)\n"
+ "movq %%mm3,8(%3)\n"
+
+ /* next */
+ "addl $8,%0\n"
+ "addl $8,%1\n"
+ "addl $8,%2\n"
+ "addl $16,%3\n"
+
+ "decl %4\n"
+ "jnz 0b\n"
+ "1:\n"
+
+ /* final run */
+ /* set the current, current_pre, current_next registers */
+ "movq -8(%1),%%mm0\n"
+ "movq (%1),%%mm7\n"
+ "pxor %%mm1,%%mm1\n" /* use a fake black out of screen */
+ "psrlq $32,%%mm0\n"
+ "psllq $32,%%mm1\n"
+ "movq %%mm7,%%mm2\n"
+ "movq %%mm7,%%mm3\n"
+ "psllq $32,%%mm2\n"
+ "psrlq $32,%%mm3\n"
+ "por %%mm2,%%mm0\n"
+ "por %%mm3,%%mm1\n"
+
+ /* current_upper */
+ "movq (%0),%%mm6\n"
+
+ /* compute the upper-left pixel for dst0 on %%mm2 */
+ /* compute the upper-right pixel for dst0 on %%mm4 */
+ "movq %%mm0,%%mm2\n"
+ "movq %%mm1,%%mm4\n"
+ "movq %%mm0,%%mm3\n"
+ "movq %%mm1,%%mm5\n"
+ "pcmpeqd %%mm6,%%mm2\n"
+ "pcmpeqd %%mm6,%%mm4\n"
+ "pcmpeqd (%2),%%mm3\n"
+ "pcmpeqd (%2),%%mm5\n"
+ "pandn %%mm2,%%mm3\n"
+ "pandn %%mm4,%%mm5\n"
+ "movq %%mm0,%%mm2\n"
+ "movq %%mm1,%%mm4\n"
+ "pcmpeqd %%mm1,%%mm2\n"
+ "pcmpeqd %%mm0,%%mm4\n"
+ "pandn %%mm3,%%mm2\n"
+ "pandn %%mm5,%%mm4\n"
+ "movq %%mm2,%%mm3\n"
+ "movq %%mm4,%%mm5\n"
+ "pand %%mm6,%%mm2\n"
+ "pand %%mm6,%%mm4\n"
+ "pandn %%mm7,%%mm3\n"
+ "pandn %%mm7,%%mm5\n"
+ "por %%mm3,%%mm2\n"
+ "por %%mm5,%%mm4\n"
+
+ /* set *dst0 */
+ "movq %%mm2,%%mm3\n"
+ "punpckldq %%mm4,%%mm2\n"
+ "punpckhdq %%mm4,%%mm3\n"
+ "movq %%mm2,(%3)\n"
+ "movq %%mm3,8(%3)\n"
+ "emms\n"
+
+ : "+r" (src0), "+r" (src1), "+r" (src2), "+r" (dst), "+r" (count)
+ :
+ : "cc"
+ );
#else
__asm {
mov eax, src0;
mov ecx, src2;
mov edx, dst;
mov esi, count;
-
+
/* first run */
/* set the current, current_pre, current_next registers */
pxor mm0,mm0;
shr esi,1;
jz label1;
label0:
-
+
/* set the current, current_pre, current_next registers */
movq mm0,qword ptr [ebx-8];
movq mm7,qword ptr [ebx];
dec esi;
jnz label0;
label1:
-
+
/* final run */
/* set the current, current_pre, current_next registers */
movq mm0,qword ptr [ebx-8];
#endif
void AdMame2x(u8 *srcPtr, u32 srcPitch, /* u8 deltaPtr, */
- u8 *dstPtr, u32 dstPitch, int width, int height)
+ u8 *dstPtr, u32 dstPitch, int width, int height)
{
u16 *dst0 = (u16 *)dstPtr;
u16 *dst1 = dst0 + (dstPitch/2);
-
+
u16 *src0 = (u16 *)srcPtr;
u16 *src1 = src0 + (srcPitch/2);
u16 *src2 = src1 + (srcPitch/2);
if(cpu_mmx) {
internal_scale2x_16_mmx(dst0, dst1, src0, src0, src1, width);
- {
+ {
int count = height;
count -= 2;
}
void AdMame2x32(u8 *srcPtr, u32 srcPitch, /* u8 deltaPtr, */
- u8 *dstPtr, u32 dstPitch, int width, int height)
+ u8 *dstPtr, u32 dstPitch, int width, int height)
{
u32 *dst0 = (u32 *)dstPtr;
u32 *dst1 = dst0 + (dstPitch/4);
-
+
u32 *src0 = (u32 *)srcPtr;
u32 *src1 = src0 + (srcPitch/4);
u32 *src2 = src1 + (srcPitch/4);
#if defined(MMX) && (defined(X86_ASSEMBLY) || defined(X86_MSVC_ASSEMBLY))
if(cpu_mmx) {
internal_scale2x_32_mmx(dst0, dst1, src0, src0, src1, width);
-
+
{
int count = height;
}
static _inline int GetResult(uint32 A, uint32 B, uint32 C, uint32 D)
-{
+{
const bool ac = (A==C);
const bool bc = (B==C);
const int x1 = ac;
}
static void internal_scale2x_32_def(u32* dst0,
- u32* dst1,
- const u32* src0,
- const u32* src1,
- const u32* src2,
- unsigned count) {
+ u32* dst1,
+ const u32* src0,
+ const u32* src1,
+ const u32* src2,
+ unsigned count) {
/* first pixel */
dst0[0] = src1[0];
dst1[0] = src1[0];
/* always do the first and last run */
count -= 2*4;
-#ifdef __GNUC__
+#ifdef __GNUC__
__asm__ __volatile__(
- /* first run */
- /* set the current, current_pre, current_next registers */
- "pxor %%mm0,%%mm0\n" /* use a fake black out of screen */
- "movq 0(%1),%%mm7\n"
- "movq 8(%1),%%mm1\n"
- "psrlq $48,%%mm0\n"
- "psllq $48,%%mm1\n"
- "movq %%mm7,%%mm2\n"
- "movq %%mm7,%%mm3\n"
- "psllq $16,%%mm2\n"
- "psrlq $16,%%mm3\n"
- "por %%mm2,%%mm0\n"
- "por %%mm3,%%mm1\n"
-
- /* current_upper */
- "movq (%0),%%mm6\n"
-
- /* compute the upper-left pixel for dst0 on %%mm2 */
- /* compute the upper-right pixel for dst0 on %%mm4 */
- "movq %%mm0,%%mm2\n"
- "movq %%mm1,%%mm4\n"
- "movq %%mm0,%%mm3\n"
- "movq %%mm1,%%mm5\n"
- "pcmpeqw %%mm6,%%mm2\n"
- "pcmpeqw %%mm6,%%mm4\n"
- "pcmpeqw (%2),%%mm3\n"
- "pcmpeqw (%2),%%mm5\n"
- "pandn %%mm2,%%mm3\n"
- "pandn %%mm4,%%mm5\n"
- "movq %%mm0,%%mm2\n"
- "movq %%mm1,%%mm4\n"
- "pcmpeqw %%mm1,%%mm2\n"
- "pcmpeqw %%mm0,%%mm4\n"
- "pandn %%mm3,%%mm2\n"
- "pandn %%mm5,%%mm4\n"
- "movq %%mm2,%%mm3\n"
- "movq %%mm4,%%mm5\n"
- "pand %%mm6,%%mm2\n"
- "pand %%mm6,%%mm4\n"
- "pandn %%mm7,%%mm3\n"
- "pandn %%mm7,%%mm5\n"
- "por %%mm3,%%mm2\n"
- "por %%mm5,%%mm4\n"
-
- /* set *dst0 */
- "movq %%mm2,%%mm3\n"
- "punpcklwd %%mm4,%%mm2\n"
- "punpckhwd %%mm4,%%mm3\n"
- "movq %%mm2,(%3)\n"
- "movq %%mm3,8(%3)\n"
-
- /* next */
- "addl $8,%0\n"
- "addl $8,%1\n"
- "addl $8,%2\n"
- "addl $16,%3\n"
-
- /* central runs */
- "shrl $2,%4\n"
- "jz 1f\n"
- ASM_JUMP_ALIGN
- "0:\n"
-
- /* set the current, current_pre, current_next registers */
- "movq -8(%1),%%mm0\n"
- "movq (%1),%%mm7\n"
- "movq 8(%1),%%mm1\n"
- "psrlq $48,%%mm0\n"
- "psllq $48,%%mm1\n"
- "movq %%mm7,%%mm2\n"
- "movq %%mm7,%%mm3\n"
- "psllq $16,%%mm2\n"
- "psrlq $16,%%mm3\n"
- "por %%mm2,%%mm0\n"
- "por %%mm3,%%mm1\n"
-
- /* current_upper */
- "movq (%0),%%mm6\n"
-
- /* compute the upper-left pixel for dst0 on %%mm2 */
- /* compute the upper-right pixel for dst0 on %%mm4 */
- "movq %%mm0,%%mm2\n"
- "movq %%mm1,%%mm4\n"
- "movq %%mm0,%%mm3\n"
- "movq %%mm1,%%mm5\n"
- "pcmpeqw %%mm6,%%mm2\n"
- "pcmpeqw %%mm6,%%mm4\n"
- "pcmpeqw (%2),%%mm3\n"
- "pcmpeqw (%2),%%mm5\n"
- "pandn %%mm2,%%mm3\n"
- "pandn %%mm4,%%mm5\n"
- "movq %%mm0,%%mm2\n"
- "movq %%mm1,%%mm4\n"
- "pcmpeqw %%mm1,%%mm2\n"
- "pcmpeqw %%mm0,%%mm4\n"
- "pandn %%mm3,%%mm2\n"
- "pandn %%mm5,%%mm4\n"
- "movq %%mm2,%%mm3\n"
- "movq %%mm4,%%mm5\n"
- "pand %%mm6,%%mm2\n"
- "pand %%mm6,%%mm4\n"
- "pandn %%mm7,%%mm3\n"
- "pandn %%mm7,%%mm5\n"
- "por %%mm3,%%mm2\n"
- "por %%mm5,%%mm4\n"
-
- /* set *dst0 */
- "movq %%mm2,%%mm3\n"
- "punpcklwd %%mm4,%%mm2\n"
- "punpckhwd %%mm4,%%mm3\n"
- "movq %%mm2,(%3)\n"
- "movq %%mm3,8(%3)\n"
-
- /* next */
- "addl $8,%0\n"
- "addl $8,%1\n"
- "addl $8,%2\n"
- "addl $16,%3\n"
-
- "decl %4\n"
- "jnz 0b\n"
- "1:\n"
-
- /* final run */
- /* set the current, current_pre, current_next registers */
- "movq -8(%1),%%mm0\n"
- "movq (%1),%%mm7\n"
- "pxor %%mm1,%%mm1\n" /* use a fake black out of screen */
- "psrlq $48,%%mm0\n"
- "psllq $48,%%mm1\n"
- "movq %%mm7,%%mm2\n"
- "movq %%mm7,%%mm3\n"
- "psllq $16,%%mm2\n"
- "psrlq $16,%%mm3\n"
- "por %%mm2,%%mm0\n"
- "por %%mm3,%%mm1\n"
-
- /* current_upper */
- "movq (%0),%%mm6\n"
-
- /* compute the upper-left pixel for dst0 on %%mm2 */
- /* compute the upper-right pixel for dst0 on %%mm4 */
- "movq %%mm0,%%mm2\n"
- "movq %%mm1,%%mm4\n"
- "movq %%mm0,%%mm3\n"
- "movq %%mm1,%%mm5\n"
- "pcmpeqw %%mm6,%%mm2\n"
- "pcmpeqw %%mm6,%%mm4\n"
- "pcmpeqw (%2),%%mm3\n"
- "pcmpeqw (%2),%%mm5\n"
- "pandn %%mm2,%%mm3\n"
- "pandn %%mm4,%%mm5\n"
- "movq %%mm0,%%mm2\n"
- "movq %%mm1,%%mm4\n"
- "pcmpeqw %%mm1,%%mm2\n"
- "pcmpeqw %%mm0,%%mm4\n"
- "pandn %%mm3,%%mm2\n"
- "pandn %%mm5,%%mm4\n"
- "movq %%mm2,%%mm3\n"
- "movq %%mm4,%%mm5\n"
- "pand %%mm6,%%mm2\n"
- "pand %%mm6,%%mm4\n"
- "pandn %%mm7,%%mm3\n"
- "pandn %%mm7,%%mm5\n"
- "por %%mm3,%%mm2\n"
- "por %%mm5,%%mm4\n"
-
- /* set *dst0 */
- "movq %%mm2,%%mm3\n"
- "punpcklwd %%mm4,%%mm2\n"
- "punpckhwd %%mm4,%%mm3\n"
- "movq %%mm2,(%3)\n"
- "movq %%mm3,8(%3)\n"
- "emms\n"
-
- : "+r" (src0), "+r" (src1), "+r" (src2), "+r" (dst), "+r" (count)
- :
- : "cc"
- );
+ /* first run */
+ /* set the current, current_pre, current_next registers */
+ "pxor %%mm0,%%mm0\n" /* use a fake black out of screen */
+ "movq 0(%1),%%mm7\n"
+ "movq 8(%1),%%mm1\n"
+ "psrlq $48,%%mm0\n"
+ "psllq $48,%%mm1\n"
+ "movq %%mm7,%%mm2\n"
+ "movq %%mm7,%%mm3\n"
+ "psllq $16,%%mm2\n"
+ "psrlq $16,%%mm3\n"
+ "por %%mm2,%%mm0\n"
+ "por %%mm3,%%mm1\n"
+
+ /* current_upper */
+ "movq (%0),%%mm6\n"
+
+ /* compute the upper-left pixel for dst0 on %%mm2 */
+ /* compute the upper-right pixel for dst0 on %%mm4 */
+ "movq %%mm0,%%mm2\n"
+ "movq %%mm1,%%mm4\n"
+ "movq %%mm0,%%mm3\n"
+ "movq %%mm1,%%mm5\n"
+ "pcmpeqw %%mm6,%%mm2\n"
+ "pcmpeqw %%mm6,%%mm4\n"
+ "pcmpeqw (%2),%%mm3\n"
+ "pcmpeqw (%2),%%mm5\n"
+ "pandn %%mm2,%%mm3\n"
+ "pandn %%mm4,%%mm5\n"
+ "movq %%mm0,%%mm2\n"
+ "movq %%mm1,%%mm4\n"
+ "pcmpeqw %%mm1,%%mm2\n"
+ "pcmpeqw %%mm0,%%mm4\n"
+ "pandn %%mm3,%%mm2\n"
+ "pandn %%mm5,%%mm4\n"
+ "movq %%mm2,%%mm3\n"
+ "movq %%mm4,%%mm5\n"
+ "pand %%mm6,%%mm2\n"
+ "pand %%mm6,%%mm4\n"
+ "pandn %%mm7,%%mm3\n"
+ "pandn %%mm7,%%mm5\n"
+ "por %%mm3,%%mm2\n"
+ "por %%mm5,%%mm4\n"
+
+ /* set *dst0 */
+ "movq %%mm2,%%mm3\n"
+ "punpcklwd %%mm4,%%mm2\n"
+ "punpckhwd %%mm4,%%mm3\n"
+ "movq %%mm2,(%3)\n"
+ "movq %%mm3,8(%3)\n"
+
+ /* next */
+ "addl $8,%0\n"
+ "addl $8,%1\n"
+ "addl $8,%2\n"
+ "addl $16,%3\n"
+
+ /* central runs */
+ "shrl $2,%4\n"
+ "jz 1f\n"
+ ASM_JUMP_ALIGN
+ "0:\n"
+
+ /* set the current, current_pre, current_next registers */
+ "movq -8(%1),%%mm0\n"
+ "movq (%1),%%mm7\n"
+ "movq 8(%1),%%mm1\n"
+ "psrlq $48,%%mm0\n"
+ "psllq $48,%%mm1\n"
+ "movq %%mm7,%%mm2\n"
+ "movq %%mm7,%%mm3\n"
+ "psllq $16,%%mm2\n"
+ "psrlq $16,%%mm3\n"
+ "por %%mm2,%%mm0\n"
+ "por %%mm3,%%mm1\n"
+
+ /* current_upper */
+ "movq (%0),%%mm6\n"
+
+ /* compute the upper-left pixel for dst0 on %%mm2 */
+ /* compute the upper-right pixel for dst0 on %%mm4 */
+ "movq %%mm0,%%mm2\n"
+ "movq %%mm1,%%mm4\n"
+ "movq %%mm0,%%mm3\n"
+ "movq %%mm1,%%mm5\n"
+ "pcmpeqw %%mm6,%%mm2\n"
+ "pcmpeqw %%mm6,%%mm4\n"
+ "pcmpeqw (%2),%%mm3\n"
+ "pcmpeqw (%2),%%mm5\n"
+ "pandn %%mm2,%%mm3\n"
+ "pandn %%mm4,%%mm5\n"
+ "movq %%mm0,%%mm2\n"
+ "movq %%mm1,%%mm4\n"
+ "pcmpeqw %%mm1,%%mm2\n"
+ "pcmpeqw %%mm0,%%mm4\n"
+ "pandn %%mm3,%%mm2\n"
+ "pandn %%mm5,%%mm4\n"
+ "movq %%mm2,%%mm3\n"
+ "movq %%mm4,%%mm5\n"
+ "pand %%mm6,%%mm2\n"
+ "pand %%mm6,%%mm4\n"
+ "pandn %%mm7,%%mm3\n"
+ "pandn %%mm7,%%mm5\n"
+ "por %%mm3,%%mm2\n"
+ "por %%mm5,%%mm4\n"
+
+ /* set *dst0 */
+ "movq %%mm2,%%mm3\n"
+ "punpcklwd %%mm4,%%mm2\n"
+ "punpckhwd %%mm4,%%mm3\n"
+ "movq %%mm2,(%3)\n"
+ "movq %%mm3,8(%3)\n"
+
+ /* next */
+ "addl $8,%0\n"
+ "addl $8,%1\n"
+ "addl $8,%2\n"
+ "addl $16,%3\n"
+
+ "decl %4\n"
+ "jnz 0b\n"
+ "1:\n"
+
+ /* final run */
+ /* set the current, current_pre, current_next registers */
+ "movq -8(%1),%%mm0\n"
+ "movq (%1),%%mm7\n"
+ "pxor %%mm1,%%mm1\n" /* use a fake black out of screen */
+ "psrlq $48,%%mm0\n"
+ "psllq $48,%%mm1\n"
+ "movq %%mm7,%%mm2\n"
+ "movq %%mm7,%%mm3\n"
+ "psllq $16,%%mm2\n"
+ "psrlq $16,%%mm3\n"
+ "por %%mm2,%%mm0\n"
+ "por %%mm3,%%mm1\n"
+
+ /* current_upper */
+ "movq (%0),%%mm6\n"
+
+ /* compute the upper-left pixel for dst0 on %%mm2 */
+ /* compute the upper-right pixel for dst0 on %%mm4 */
+ "movq %%mm0,%%mm2\n"
+ "movq %%mm1,%%mm4\n"
+ "movq %%mm0,%%mm3\n"
+ "movq %%mm1,%%mm5\n"
+ "pcmpeqw %%mm6,%%mm2\n"
+ "pcmpeqw %%mm6,%%mm4\n"
+ "pcmpeqw (%2),%%mm3\n"
+ "pcmpeqw (%2),%%mm5\n"
+ "pandn %%mm2,%%mm3\n"
+ "pandn %%mm4,%%mm5\n"
+ "movq %%mm0,%%mm2\n"
+ "movq %%mm1,%%mm4\n"
+ "pcmpeqw %%mm1,%%mm2\n"
+ "pcmpeqw %%mm0,%%mm4\n"
+ "pandn %%mm3,%%mm2\n"
+ "pandn %%mm5,%%mm4\n"
+ "movq %%mm2,%%mm3\n"
+ "movq %%mm4,%%mm5\n"
+ "pand %%mm6,%%mm2\n"
+ "pand %%mm6,%%mm4\n"
+ "pandn %%mm7,%%mm3\n"
+ "pandn %%mm7,%%mm5\n"
+ "por %%mm3,%%mm2\n"
+ "por %%mm5,%%mm4\n"
+
+ /* set *dst0 */
+ "movq %%mm2,%%mm3\n"
+ "punpcklwd %%mm4,%%mm2\n"
+ "punpckhwd %%mm4,%%mm3\n"
+ "movq %%mm2,(%3)\n"
+ "movq %%mm3,8(%3)\n"
+ "emms\n"
+
+ : "+r" (src0), "+r" (src1), "+r" (src2), "+r" (dst), "+r" (count)
+ :
+ : "cc"
+ );
#else
__asm {
mov eax, src0;
mov ecx, src2;
mov edx, dst;
mov esi, count;
-
+
/* first run */
/* set the current, current_pre, current_next registers */
pxor mm0,mm0; /* use a fake black out of screen */
add ebx,8;
add ecx,8;
add edx,16;
-
+
dec esi;
jnz label0;
label1:
#ifdef __GNUC__
__asm__ __volatile__(
- /* first run */
- /* set the current, current_pre, current_next registers */
- "pxor %%mm0,%%mm0\n" /* use a fake black out of screen */
- "movq 0(%1),%%mm7\n"
- "movq 8(%1),%%mm1\n"
- "psrlq $32,%%mm0\n"
- "psllq $32,%%mm1\n"
- "movq %%mm7,%%mm2\n"
- "movq %%mm7,%%mm3\n"
- "psllq $32,%%mm2\n"
- "psrlq $32,%%mm3\n"
- "por %%mm2,%%mm0\n"
- "por %%mm3,%%mm1\n"
-
- /* current_upper */
- "movq (%0),%%mm6\n"
-
- /* compute the upper-left pixel for dst0 on %%mm2 */
- /* compute the upper-right pixel for dst0 on %%mm4 */
- "movq %%mm0,%%mm2\n"
- "movq %%mm1,%%mm4\n"
- "movq %%mm0,%%mm3\n"
- "movq %%mm1,%%mm5\n"
- "pcmpeqd %%mm6,%%mm2\n"
- "pcmpeqd %%mm6,%%mm4\n"
- "pcmpeqd (%2),%%mm3\n"
- "pcmpeqd (%2),%%mm5\n"
- "pandn %%mm2,%%mm3\n"
- "pandn %%mm4,%%mm5\n"
- "movq %%mm0,%%mm2\n"
- "movq %%mm1,%%mm4\n"
- "pcmpeqd %%mm1,%%mm2\n"
- "pcmpeqd %%mm0,%%mm4\n"
- "pandn %%mm3,%%mm2\n"
- "pandn %%mm5,%%mm4\n"
- "movq %%mm2,%%mm3\n"
- "movq %%mm4,%%mm5\n"
- "pand %%mm6,%%mm2\n"
- "pand %%mm6,%%mm4\n"
- "pandn %%mm7,%%mm3\n"
- "pandn %%mm7,%%mm5\n"
- "por %%mm3,%%mm2\n"
- "por %%mm5,%%mm4\n"
-
- /* set *dst0 */
- "movq %%mm2,%%mm3\n"
- "punpckldq %%mm4,%%mm2\n"
- "punpckhdq %%mm4,%%mm3\n"
- "movq %%mm2,(%3)\n"
- "movq %%mm3,8(%3)\n"
-
- /* next */
- "addl $8,%0\n"
- "addl $8,%1\n"
- "addl $8,%2\n"
- "addl $16,%3\n"
-
- /* central runs */
- "shrl $1,%4\n"
- "jz 1f\n"
- ASM_JUMP_ALIGN
- "0:\n"
-
- /* set the current, current_pre, current_next registers */
- "movq -8(%1),%%mm0\n"
- "movq (%1),%%mm7\n"
- "movq 8(%1),%%mm1\n"
- "psrlq $32,%%mm0\n"
- "psllq $32,%%mm1\n"
- "movq %%mm7,%%mm2\n"
- "movq %%mm7,%%mm3\n"
- "psllq $32,%%mm2\n"
- "psrlq $32,%%mm3\n"
- "por %%mm2,%%mm0\n"
- "por %%mm3,%%mm1\n"
-
- /* current_upper */
- "movq (%0),%%mm6\n"
-
- /* compute the upper-left pixel for dst0 on %%mm2 */
- /* compute the upper-right pixel for dst0 on %%mm4 */
- "movq %%mm0,%%mm2\n"
- "movq %%mm1,%%mm4\n"
- "movq %%mm0,%%mm3\n"
- "movq %%mm1,%%mm5\n"
- "pcmpeqd %%mm6,%%mm2\n"
- "pcmpeqd %%mm6,%%mm4\n"
- "pcmpeqd (%2),%%mm3\n"
- "pcmpeqd (%2),%%mm5\n"
- "pandn %%mm2,%%mm3\n"
- "pandn %%mm4,%%mm5\n"
- "movq %%mm0,%%mm2\n"
- "movq %%mm1,%%mm4\n"
- "pcmpeqd %%mm1,%%mm2\n"
- "pcmpeqd %%mm0,%%mm4\n"
- "pandn %%mm3,%%mm2\n"
- "pandn %%mm5,%%mm4\n"
- "movq %%mm2,%%mm3\n"
- "movq %%mm4,%%mm5\n"
- "pand %%mm6,%%mm2\n"
- "pand %%mm6,%%mm4\n"
- "pandn %%mm7,%%mm3\n"
- "pandn %%mm7,%%mm5\n"
- "por %%mm3,%%mm2\n"
- "por %%mm5,%%mm4\n"
-
- /* set *dst0 */
- "movq %%mm2,%%mm3\n"
- "punpckldq %%mm4,%%mm2\n"
- "punpckhdq %%mm4,%%mm3\n"
- "movq %%mm2,(%3)\n"
- "movq %%mm3,8(%3)\n"
-
- /* next */
- "addl $8,%0\n"
- "addl $8,%1\n"
- "addl $8,%2\n"
- "addl $16,%3\n"
-
- "decl %4\n"
- "jnz 0b\n"
- "1:\n"
-
- /* final run */
- /* set the current, current_pre, current_next registers */
- "movq -8(%1),%%mm0\n"
- "movq (%1),%%mm7\n"
- "pxor %%mm1,%%mm1\n" /* use a fake black out of screen */
- "psrlq $32,%%mm0\n"
- "psllq $32,%%mm1\n"
- "movq %%mm7,%%mm2\n"
- "movq %%mm7,%%mm3\n"
- "psllq $32,%%mm2\n"
- "psrlq $32,%%mm3\n"
- "por %%mm2,%%mm0\n"
- "por %%mm3,%%mm1\n"
-
- /* current_upper */
- "movq (%0),%%mm6\n"
-
- /* compute the upper-left pixel for dst0 on %%mm2 */
- /* compute the upper-right pixel for dst0 on %%mm4 */
- "movq %%mm0,%%mm2\n"
- "movq %%mm1,%%mm4\n"
- "movq %%mm0,%%mm3\n"
- "movq %%mm1,%%mm5\n"
- "pcmpeqd %%mm6,%%mm2\n"
- "pcmpeqd %%mm6,%%mm4\n"
- "pcmpeqd (%2),%%mm3\n"
- "pcmpeqd (%2),%%mm5\n"
- "pandn %%mm2,%%mm3\n"
- "pandn %%mm4,%%mm5\n"
- "movq %%mm0,%%mm2\n"
- "movq %%mm1,%%mm4\n"
- "pcmpeqd %%mm1,%%mm2\n"
- "pcmpeqd %%mm0,%%mm4\n"
- "pandn %%mm3,%%mm2\n"
- "pandn %%mm5,%%mm4\n"
- "movq %%mm2,%%mm3\n"
- "movq %%mm4,%%mm5\n"
- "pand %%mm6,%%mm2\n"
- "pand %%mm6,%%mm4\n"
- "pandn %%mm7,%%mm3\n"
- "pandn %%mm7,%%mm5\n"
- "por %%mm3,%%mm2\n"
- "por %%mm5,%%mm4\n"
-
- /* set *dst0 */
- "movq %%mm2,%%mm3\n"
- "punpckldq %%mm4,%%mm2\n"
- "punpckhdq %%mm4,%%mm3\n"
- "movq %%mm2,(%3)\n"
- "movq %%mm3,8(%3)\n"
- "emms\n"
-
- : "+r" (src0), "+r" (src1), "+r" (src2), "+r" (dst), "+r" (count)
- :
- : "cc"
- );
+ /* first run */
+ /* set the current, current_pre, current_next registers */
+ "pxor %%mm0,%%mm0\n" /* use a fake black out of screen */
+ "movq 0(%1),%%mm7\n"
+ "movq 8(%1),%%mm1\n"
+ "psrlq $32,%%mm0\n"
+ "psllq $32,%%mm1\n"
+ "movq %%mm7,%%mm2\n"
+ "movq %%mm7,%%mm3\n"
+ "psllq $32,%%mm2\n"
+ "psrlq $32,%%mm3\n"
+ "por %%mm2,%%mm0\n"
+ "por %%mm3,%%mm1\n"
+
+ /* current_upper */
+ "movq (%0),%%mm6\n"
+
+ /* compute the upper-left pixel for dst0 on %%mm2 */
+ /* compute the upper-right pixel for dst0 on %%mm4 */
+ "movq %%mm0,%%mm2\n"
+ "movq %%mm1,%%mm4\n"
+ "movq %%mm0,%%mm3\n"
+ "movq %%mm1,%%mm5\n"
+ "pcmpeqd %%mm6,%%mm2\n"
+ "pcmpeqd %%mm6,%%mm4\n"
+ "pcmpeqd (%2),%%mm3\n"
+ "pcmpeqd (%2),%%mm5\n"
+ "pandn %%mm2,%%mm3\n"
+ "pandn %%mm4,%%mm5\n"
+ "movq %%mm0,%%mm2\n"
+ "movq %%mm1,%%mm4\n"
+ "pcmpeqd %%mm1,%%mm2\n"
+ "pcmpeqd %%mm0,%%mm4\n"
+ "pandn %%mm3,%%mm2\n"
+ "pandn %%mm5,%%mm4\n"
+ "movq %%mm2,%%mm3\n"
+ "movq %%mm4,%%mm5\n"
+ "pand %%mm6,%%mm2\n"
+ "pand %%mm6,%%mm4\n"
+ "pandn %%mm7,%%mm3\n"
+ "pandn %%mm7,%%mm5\n"
+ "por %%mm3,%%mm2\n"
+ "por %%mm5,%%mm4\n"
+
+ /* set *dst0 */
+ "movq %%mm2,%%mm3\n"
+ "punpckldq %%mm4,%%mm2\n"
+ "punpckhdq %%mm4,%%mm3\n"
+ "movq %%mm2,(%3)\n"
+ "movq %%mm3,8(%3)\n"
+
+ /* next */
+ "addl $8,%0\n"
+ "addl $8,%1\n"
+ "addl $8,%2\n"
+ "addl $16,%3\n"
+
+ /* central runs */
+ "shrl $1,%4\n"
+ "jz 1f\n"
+ ASM_JUMP_ALIGN
+ "0:\n"
+
+ /* set the current, current_pre, current_next registers */
+ "movq -8(%1),%%mm0\n"
+ "movq (%1),%%mm7\n"
+ "movq 8(%1),%%mm1\n"
+ "psrlq $32,%%mm0\n"
+ "psllq $32,%%mm1\n"
+ "movq %%mm7,%%mm2\n"
+ "movq %%mm7,%%mm3\n"
+ "psllq $32,%%mm2\n"
+ "psrlq $32,%%mm3\n"
+ "por %%mm2,%%mm0\n"
+ "por %%mm3,%%mm1\n"
+
+ /* current_upper */
+ "movq (%0),%%mm6\n"
+
+ /* compute the upper-left pixel for dst0 on %%mm2 */
+ /* compute the upper-right pixel for dst0 on %%mm4 */
+ "movq %%mm0,%%mm2\n"
+ "movq %%mm1,%%mm4\n"
+ "movq %%mm0,%%mm3\n"
+ "movq %%mm1,%%mm5\n"
+ "pcmpeqd %%mm6,%%mm2\n"
+ "pcmpeqd %%mm6,%%mm4\n"
+ "pcmpeqd (%2),%%mm3\n"
+ "pcmpeqd (%2),%%mm5\n"
+ "pandn %%mm2,%%mm3\n"
+ "pandn %%mm4,%%mm5\n"
+ "movq %%mm0,%%mm2\n"
+ "movq %%mm1,%%mm4\n"
+ "pcmpeqd %%mm1,%%mm2\n"
+ "pcmpeqd %%mm0,%%mm4\n"
+ "pandn %%mm3,%%mm2\n"
+ "pandn %%mm5,%%mm4\n"
+ "movq %%mm2,%%mm3\n"
+ "movq %%mm4,%%mm5\n"
+ "pand %%mm6,%%mm2\n"
+ "pand %%mm6,%%mm4\n"
+ "pandn %%mm7,%%mm3\n"
+ "pandn %%mm7,%%mm5\n"
+ "por %%mm3,%%mm2\n"
+ "por %%mm5,%%mm4\n"
+
+ /* set *dst0 */
+ "movq %%mm2,%%mm3\n"
+ "punpckldq %%mm4,%%mm2\n"
+ "punpckhdq %%mm4,%%mm3\n"
+ "movq %%mm2,(%3)\n"
+ "movq %%mm3,8(%3)\n"
+
+ /* next */
+ "addl $8,%0\n"
+ "addl $8,%1\n"
+ "addl $8,%2\n"
+ "addl $16,%3\n"
+
+ "decl %4\n"
+ "jnz 0b\n"
+ "1:\n"
+
+ /* final run */
+ /* set the current, current_pre, current_next registers */
+ "movq -8(%1),%%mm0\n"
+ "movq (%1),%%mm7\n"
+ "pxor %%mm1,%%mm1\n" /* use a fake black out of screen */
+ "psrlq $32,%%mm0\n"
+ "psllq $32,%%mm1\n"
+ "movq %%mm7,%%mm2\n"
+ "movq %%mm7,%%mm3\n"
+ "psllq $32,%%mm2\n"
+ "psrlq $32,%%mm3\n"
+ "por %%mm2,%%mm0\n"
+ "por %%mm3,%%mm1\n"
+
+ /* current_upper */
+ "movq (%0),%%mm6\n"
+
+ /* compute the upper-left pixel for dst0 on %%mm2 */
+ /* compute the upper-right pixel for dst0 on %%mm4 */
+ "movq %%mm0,%%mm2\n"
+ "movq %%mm1,%%mm4\n"
+ "movq %%mm0,%%mm3\n"
+ "movq %%mm1,%%mm5\n"
+ "pcmpeqd %%mm6,%%mm2\n"
+ "pcmpeqd %%mm6,%%mm4\n"
+ "pcmpeqd (%2),%%mm3\n"
+ "pcmpeqd (%2),%%mm5\n"
+ "pandn %%mm2,%%mm3\n"
+ "pandn %%mm4,%%mm5\n"
+ "movq %%mm0,%%mm2\n"
+ "movq %%mm1,%%mm4\n"
+ "pcmpeqd %%mm1,%%mm2\n"
+ "pcmpeqd %%mm0,%%mm4\n"
+ "pandn %%mm3,%%mm2\n"
+ "pandn %%mm5,%%mm4\n"
+ "movq %%mm2,%%mm3\n"
+ "movq %%mm4,%%mm5\n"
+ "pand %%mm6,%%mm2\n"
+ "pand %%mm6,%%mm4\n"
+ "pandn %%mm7,%%mm3\n"
+ "pandn %%mm7,%%mm5\n"
+ "por %%mm3,%%mm2\n"
+ "por %%mm5,%%mm4\n"
+
+ /* set *dst0 */
+ "movq %%mm2,%%mm3\n"
+ "punpckldq %%mm4,%%mm2\n"
+ "punpckhdq %%mm4,%%mm3\n"
+ "movq %%mm2,(%3)\n"
+ "movq %%mm3,8(%3)\n"
+ "emms\n"
+
+ : "+r" (src0), "+r" (src1), "+r" (src2), "+r" (dst), "+r" (count)
+ :
+ : "cc"
+ );
#else
__asm {
mov eax, src0;
mov ecx, src2;
mov edx, dst;
mov esi, count;
-
+
/* first run */
/* set the current, current_pre, current_next registers */
pxor mm0,mm0;
shr esi,1;
jz label1;
label0:
-
+
/* set the current, current_pre, current_next registers */
movq mm0,qword ptr [ebx-8];
movq mm7,qword ptr [ebx];
dec esi;
jnz label0;
label1:
-
+
/* final run */
/* set the current, current_pre, current_next registers */
movq mm0,qword ptr [ebx-8];
#endif
void AdMame2x(u8 *srcPtr, u32 srcPitch, /* u8 deltaPtr, */
- u8 *dstPtr, u32 dstPitch, int width, int height)
+ u8 *dstPtr, u32 dstPitch, int width, int height)
{
u16 *dst0 = (u16 *)dstPtr;
u16 *dst1 = dst0 + (dstPitch/2);
-
+
u16 *src0 = (u16 *)srcPtr;
u16 *src1 = src0 + (srcPitch/2);
u16 *src2 = src1 + (srcPitch/2);
if(cpu_mmx) {
internal_scale2x_16_mmx(dst0, dst1, src0, src0, src1, width);
- {
+ {
int count = height;
count -= 2;
}
void AdMame2x32(u8 *srcPtr, u32 srcPitch, /* u8 deltaPtr, */
- u8 *dstPtr, u32 dstPitch, int width, int height)
+ u8 *dstPtr, u32 dstPitch, int width, int height)
{
u32 *dst0 = (u32 *)dstPtr;
u32 *dst1 = dst0 + (dstPitch/4);
-
+
u32 *src0 = (u32 *)srcPtr;
u32 *src1 = src0 + (srcPitch/4);
u32 *src2 = src1 + (srcPitch/4);
#ifdef MMX
if(cpu_mmx) {
internal_scale2x_32_mmx(dst0, dst1, src0, src0, src1, width);
-
+
{
int count = height;
} else {
xx1 = 2;
xx2 = 5;
- xx3 = 7;
+ xx3 = 7;
}
pal_noise_mask = (1 << (currprefs.gfx_filter_noise * 7 / 100)) - 1;
scanlinelevel = 128 - currprefs.gfx_filter_scanlines * 128 / 100;
src = src + pitchs * ys + xs - 2;
trg = trg + pitcht * yt + xt;
if (width < 8) {
- wstart = width;
- wfast = 0;
- wend = 0;
+ wstart = width;
+ wfast = 0;
+ wend = 0;
} else {
- /* alignment: 8 pixels*/
- wstart = (unsigned int)(8 - ((unsigned long)trg & 7));
- wfast = (width - wstart) >> 3; /* fast loop for 8 pixel segments*/
- wend = (width - wstart) & 0x07; /* do not forget the rest*/
+ /* alignment: 8 pixels*/
+ wstart = (unsigned int)(8 - ((unsigned long)trg & 7));
+ wfast = (width - wstart) >> 3; /* fast loop for 8 pixel segments*/
+ wend = (width - wstart) & 0x07; /* do not forget the rest*/
}
wint = width + 5;
lineptr0 = line_yuv_0;
tmpsrc = src - pitchs;
line = lineptr0;
for (x = 0; x < wint; x++) {
- uae_u32 cl0, cl1, cl2, cl3;
-
- cl0 = tmpsrc[0];
- cl1 = tmpsrc[xx1];
- cl2 = tmpsrc[xx2];
- cl3 = tmpsrc[xx3];
- line[0] = 0;
- line[1] = zcb(cl0) + zcb(cl1) + zcb(cl2) + zcb(cl3);
- line[2] = zcr(cl0) + zcr(cl1) + zcr(cl2) + zcr(cl3);
- tmpsrc++;
- line += 3;
+ uae_u32 cl0, cl1, cl2, cl3;
+
+ cl0 = tmpsrc[0];
+ cl1 = tmpsrc[xx1];
+ cl2 = tmpsrc[xx2];
+ cl3 = tmpsrc[xx3];
+ line[0] = 0;
+ line[1] = zcb(cl0) + zcb(cl1) + zcb(cl2) + zcb(cl3);
+ line[2] = zcr(cl0) + zcr(cl1) + zcr(cl2) + zcr(cl3);
+ tmpsrc++;
+ line += 3;
}
for (y = 0; y < height; y++) {
randomshift = rand() & 15;
randomoffset = rand() & 2047;
- tmpsrc = src;
- tmptrg = trg;
+ tmpsrc = src;
+ tmptrg = trg;
- line = lineptr0;
- lineptr0 = lineptr1;
- lineptr1 = line;
+ line = lineptr0;
+ lineptr0 = lineptr1;
+ lineptr1 = line;
- tmpsrc = src;
- line = lineptr0;
- for (x = 0; x < wint; x++) {
+ tmpsrc = src;
+ line = lineptr0;
+ for (x = 0; x < wint; x++) {
int r = (randomtable[randomoffset++] >> randomshift) & pal_noise_mask;
- uae_u32 cl0, cl1, cl2, cl3;
- cl0 = tmpsrc[0];
- cl1 = tmpsrc[xx1];
- cl2 = tmpsrc[xx2];
- cl3 = tmpsrc[xx3];
+ uae_u32 cl0, cl1, cl2, cl3;
+ cl0 = tmpsrc[0];
+ cl1 = tmpsrc[xx1];
+ cl2 = tmpsrc[xx2];
+ cl3 = tmpsrc[xx3];
line[0] = (zyl(cl1) + zyh(cl2) * (scn - r) / 128 + zyl(cl3)) / 256; /* 1/4 + 1/2 + 1/4 */
- line[1] = zcb(cl0) + zcb(cl1) + zcb(cl2) + zcb(cl3);
- line[2] = zcr(cl0) + zcr(cl1) + zcr(cl2) + zcr(cl3);
- tmpsrc++;
- line += 3;
- }
-
- line = lineptr0;
- linepre = lineptr1;
- for (x = 0; x < (wfast << 3) + wend + wstart; x++) {
-
- l = line[0];
- u = (line[1] + linepre[1]) / 8;
- v = (line[2] + linepre[2]) / 8;
- line += 3;
- linepre += 3;
-
- red = (v + l) / 256;
- blu = (u + l) / 256;
- grn = (l * 256 - 50 * u - 130 * v) / (256 * 256);
- *tmptrg++ = predc[red] | pgrec[grn] | pbluc[blu];
- }
-
- src += pitchs;
- trg += pitcht;
+ line[1] = zcb(cl0) + zcb(cl1) + zcb(cl2) + zcb(cl3);
+ line[2] = zcr(cl0) + zcr(cl1) + zcr(cl2) + zcr(cl3);
+ tmpsrc++;
+ line += 3;
+ }
+
+ line = lineptr0;
+ linepre = lineptr1;
+ for (x = 0; x < (wfast << 3) + wend + wstart; x++) {
+
+ l = line[0];
+ u = (line[1] + linepre[1]) / 8;
+ v = (line[2] + linepre[2]) / 8;
+ line += 3;
+ linepre += 3;
+
+ red = (v + l) / 256;
+ blu = (u + l) / 256;
+ grn = (l * 256 - 50 * u - 130 * v) / (256 * 256);
+ *tmptrg++ = predc[red] | pgrec[grn] | pbluc[blu];
+ }
+
+ src += pitchs;
+ trg += pitcht;
}
}
#endif
src = src + pitchs * ys + xs - 2;
trg = trg + pitcht * yt + xt;
if (width < 8) {
- wstart = width;
- wfast = 0;
- wend = 0;
+ wstart = width;
+ wfast = 0;
+ wend = 0;
} else {
- /* alignment: 8 pixels*/
- wstart = (unsigned int)(8 - ((unsigned long)trg & 7));
- wfast = (width - wstart) >> 3; /* fast loop for 8 pixel segments*/
- wend = (width - wstart) & 0x07; /* do not forget the rest*/
+ /* alignment: 8 pixels*/
+ wstart = (unsigned int)(8 - ((unsigned long)trg & 7));
+ wfast = (width - wstart) >> 3; /* fast loop for 8 pixel segments*/
+ wend = (width - wstart) & 0x07; /* do not forget the rest*/
}
wint = width + 5;
lineptr0 = line_yuv_0;
tmpsrc = src - pitchs;
line = lineptr0;
for (x = 0; x < wint; x++) {
- uae_u32 cl0, cl1, cl2, cl3;
-
- cl0 = tmpsrc[0];
- cl1 = tmpsrc[xx1];
- cl2 = tmpsrc[xx2];
- cl3 = tmpsrc[xx3];
- line[0] = 0;
- line[1] = zcbRGB(cl0) + zcbRGB(cl1) + zcbRGB(cl2) + zcbRGB(cl3);
- line[2] = zcrRGB(cl0) + zcrRGB(cl1) + zcrRGB(cl2) + zcrRGB(cl3);
- tmpsrc++;
- line += 3;
+ uae_u32 cl0, cl1, cl2, cl3;
+
+ cl0 = tmpsrc[0];
+ cl1 = tmpsrc[xx1];
+ cl2 = tmpsrc[xx2];
+ cl3 = tmpsrc[xx3];
+ line[0] = 0;
+ line[1] = zcbRGB(cl0) + zcbRGB(cl1) + zcbRGB(cl2) + zcbRGB(cl3);
+ line[2] = zcrRGB(cl0) + zcrRGB(cl1) + zcrRGB(cl2) + zcrRGB(cl3);
+ tmpsrc++;
+ line += 3;
}
for (y = 0; y < height; y++) {
randomshift = rand() & 15;
randomoffset = rand() & 2047;
- tmpsrc = src;
- tmptrg = trg;
+ tmpsrc = src;
+ tmptrg = trg;
- line = lineptr0;
- lineptr0 = lineptr1;
- lineptr1 = line;
+ line = lineptr0;
+ lineptr0 = lineptr1;
+ lineptr1 = line;
- tmpsrc = src;
- line = lineptr0;
- for (x = 0; x < wint; x++) {
+ tmpsrc = src;
+ line = lineptr0;
+ for (x = 0; x < wint; x++) {
int r = (randomtable[randomoffset++] >> randomshift) & pal_noise_mask;
- uae_u32 cl0, cl1, cl2, cl3;
- cl0 = tmpsrc[0];
- cl1 = tmpsrc[xx1];
- cl2 = tmpsrc[xx2];
- cl3 = tmpsrc[xx3];
+ uae_u32 cl0, cl1, cl2, cl3;
+ cl0 = tmpsrc[0];
+ cl1 = tmpsrc[xx1];
+ cl2 = tmpsrc[xx2];
+ cl3 = tmpsrc[xx3];
line[0] = (zylRGB(cl1) + zyhRGB(cl2) * (scn - r) / 128 + zylRGB(cl3)) / 256; /* 1/4 + 1/2 + 1/4 */
- line[1] = zcbRGB(cl0) + zcbRGB(cl1) + zcbRGB(cl2) + zcbRGB(cl3);
- line[2] = zcrRGB(cl0) + zcrRGB(cl1) + zcrRGB(cl2) + zcrRGB(cl3);
- tmpsrc++;
- line += 3;
- }
-
- line = lineptr0;
- linepre = lineptr1;
- for (x = 0; x < (wfast << 3) + wend + wstart; x++) {
-
- l = line[0];
- u = (line[1] + linepre[1]) / 8;
- v = (line[2] + linepre[2]) / 8;
- line += 3;
- linepre += 3;
-
- red = (v + l) / 256;
- blu = (u + l) / 256;
- grn = (l * 256 - 50 * u - 130 * v) / (256 * 256);
- *tmptrg++ = predc[red] | pgrec[grn] | pbluc[blu];
- }
-
- src += pitchs;
- trg += pitcht;
+ line[1] = zcbRGB(cl0) + zcbRGB(cl1) + zcbRGB(cl2) + zcbRGB(cl3);
+ line[2] = zcrRGB(cl0) + zcrRGB(cl1) + zcrRGB(cl2) + zcrRGB(cl3);
+ tmpsrc++;
+ line += 3;
+ }
+
+ line = lineptr0;
+ linepre = lineptr1;
+ for (x = 0; x < (wfast << 3) + wend + wstart; x++) {
+
+ l = line[0];
+ u = (line[1] + linepre[1]) / 8;
+ v = (line[2] + linepre[2]) / 8;
+ line += 3;
+ linepre += 3;
+
+ red = (v + l) / 256;
+ blu = (u + l) / 256;
+ grn = (l * 256 - 50 * u - 130 * v) / (256 * 256);
+ *tmptrg++ = predc[red] | pgrec[grn] | pbluc[blu];
+ }
+
+ src += pitchs;
+ trg += pitcht;
}
}
src = src + pitchs * ys + xs - 2;
trg = trg + pitcht * yt + xt;
if (width < 8) {
- wstart = width;
- wfast = 0;
- wend = 0;
+ wstart = width;
+ wfast = 0;
+ wend = 0;
} else {
- /* alignment: 8 pixels*/
- wstart = (unsigned int)(8 - ((unsigned long)trg & 7));
- wfast = (width - wstart) >> 3; /* fast loop for 8 pixel segments*/
- wend = (width - wstart) & 0x07; /* do not forget the rest*/
+ /* alignment: 8 pixels*/
+ wstart = (unsigned int)(8 - ((unsigned long)trg & 7));
+ wfast = (width - wstart) >> 3; /* fast loop for 8 pixel segments*/
+ wend = (width - wstart) & 0x07; /* do not forget the rest*/
}
wint = width + 5;
lineptr0 = line_yuv_0;
tmpsrc = src - pitchs;
line = lineptr0;
for (x = 0; x < wint; x++) {
- uae_u32 cl0, cl1, cl2, cl3;
-
- cl0 = tmpsrc[0];
- cl1 = tmpsrc[xx1];
- cl2 = tmpsrc[xx2];
- cl3 = tmpsrc[xx3];
- line[0] = 0;
- line[1] = zcbRGB(cl0) + zcbRGB(cl1) + zcbRGB(cl2) + zcbRGB(cl3);
- line[2] = zcrRGB(cl0) + zcrRGB(cl1) + zcrRGB(cl2) + zcrRGB(cl3);
- tmpsrc++;
- line += 3;
+ uae_u32 cl0, cl1, cl2, cl3;
+
+ cl0 = tmpsrc[0];
+ cl1 = tmpsrc[xx1];
+ cl2 = tmpsrc[xx2];
+ cl3 = tmpsrc[xx3];
+ line[0] = 0;
+ line[1] = zcbRGB(cl0) + zcbRGB(cl1) + zcbRGB(cl2) + zcbRGB(cl3);
+ line[2] = zcrRGB(cl0) + zcrRGB(cl1) + zcrRGB(cl2) + zcrRGB(cl3);
+ tmpsrc++;
+ line += 3;
}
for (y = 0; y < height; y++) {
randomshift = rand() & 15;
randomoffset = rand() & 2047;
- tmpsrc = src;
- tmptrg = trg;
+ tmpsrc = src;
+ tmptrg = trg;
- line = lineptr0;
- lineptr0 = lineptr1;
- lineptr1 = line;
+ line = lineptr0;
+ lineptr0 = lineptr1;
+ lineptr1 = line;
- tmpsrc = src;
- line = lineptr0;
- for (x = 0; x < wint; x++) {
+ tmpsrc = src;
+ line = lineptr0;
+ for (x = 0; x < wint; x++) {
int r = (randomtable[randomoffset++] >> randomshift) & pal_noise_mask;
- uae_u32 cl0, cl1, cl2, cl3;
- cl0 = tmpsrc[0];
- cl1 = tmpsrc[xx1];
- cl2 = tmpsrc[xx2];
- cl3 = tmpsrc[xx3];
+ uae_u32 cl0, cl1, cl2, cl3;
+ cl0 = tmpsrc[0];
+ cl1 = tmpsrc[xx1];
+ cl2 = tmpsrc[xx2];
+ cl3 = tmpsrc[xx3];
line[0] = (zylRGB(cl1) + zyhRGB(cl2) * (scn - r) / 128 + zylRGB(cl3)) / 256; /* 1/4 + 1/2 + 1/4 */
- line[1] = zcbRGB(cl0) + zcbRGB(cl1) + zcbRGB(cl2) + zcbRGB(cl3);
- line[2] = zcrRGB(cl0) + zcrRGB(cl1) + zcrRGB(cl2) + zcrRGB(cl3);
- tmpsrc++;
- line += 3;
- }
-
- line = lineptr0;
- linepre = lineptr1;
- for (x = 0; x < (wfast << 3) + wend + wstart; x++) {
-
- l = line[0];
- u = (line[1] + linepre[1]) / 8;
- v = (line[2] + linepre[2]) / 8;
- line += 3;
- linepre += 3;
-
- red = (v + l) / 256;
- blu = (u + l) / 256;
- grn = (l * 256 - 50 * u - 130 * v) / (256 * 256);
- *tmptrg++ = predc[red] | pgrec[grn] | pbluc[blu];
- }
-
- src += pitchs;
- trg += pitcht;
+ line[1] = zcbRGB(cl0) + zcbRGB(cl1) + zcbRGB(cl2) + zcbRGB(cl3);
+ line[2] = zcrRGB(cl0) + zcrRGB(cl1) + zcrRGB(cl2) + zcrRGB(cl3);
+ tmpsrc++;
+ line += 3;
+ }
+
+ line = lineptr0;
+ linepre = lineptr1;
+ for (x = 0; x < (wfast << 3) + wend + wstart; x++) {
+
+ l = line[0];
+ u = (line[1] + linepre[1]) / 8;
+ v = (line[2] + linepre[2]) / 8;
+ line += 3;
+ linepre += 3;
+
+ red = (v + l) / 256;
+ blu = (u + l) / 256;
+ grn = (l * 256 - 50 * u - 130 * v) / (256 * 256);
+ *tmptrg++ = predc[red] | pgrec[grn] | pbluc[blu];
+ }
+
+ src += pitchs;
+ trg += pitcht;
}
}
static void namesplit (char *s)
{
int l;
-
+
l = strlen (s) - 1;
while (l >= 0) {
if (s[l] == '.')
EmptyClipboard ();
hg = GlobalAlloc (GMEM_MOVEABLE | GMEM_DDESHARE, bi->bmiHeader.biSize + bi->bmiHeader.biSizeImage);
if (hg) {
- dib = GlobalLock (hg);
+ dib = GlobalLock (hg);
if (dib) {
memcpy (dib, &bi->bmiHeader, bi->bmiHeader.biSize);
memcpy (dib + bi->bmiHeader.biSize, bmp, bi->bmiHeader.biSizeImage);
}
- GlobalUnlock (hg);
- if (SetClipboardData (CF_DIB, hg))
+ GlobalUnlock (hg);
+ if (SetClipboardData (CF_DIB, hg))
v = 1;
}
CloseClipboard ();
return v;
}
-static HDC surface_dc, offscreen_dc;
+static HDC surface_dc, offscreen_dc;
static BITMAPINFO bi; // bitmap info
static LPVOID lpvBits = NULL; // pointer to bitmap bits array
static HBITMAP offscreen_bitmap;
void screenshot_free(void)
{
if (surface_dc)
- releasehdc (surface_dc);
+ releasehdc (surface_dc);
surface_dc = NULL;
if(offscreen_dc)
DeleteDC(offscreen_dc);
// need a HBITMAP to convert it to a DIB
if((offscreen_bitmap = CreateCompatibleBitmap(surface_dc, width, height)) == NULL)
- goto oops; // error
-
+ goto oops; // error
+
// The bitmap is empty, so let's copy the contents of the surface to it.
// For that we need to select it into a device context.
if((offscreen_dc = CreateCompatibleDC(surface_dc)) == NULL)
- goto oops; // error
+ goto oops; // error
// select offscreen_bitmap into offscreen_dc
hgdiobj = SelectObject(offscreen_dc, offscreen_bitmap);
// de-select offscreen_bitmap
SelectObject(offscreen_dc, hgdiobj);
-
+
ZeroMemory(&bi, sizeof(bi));
bi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
bi.bmiHeader.biWidth = width;
}
png_init_io(png_ptr, fp);
- png_set_filter(png_ptr, 0, PNG_FILTER_NONE);
+ png_set_filter(png_ptr, 0, PNG_FILTER_NONE);
png_set_IHDR(png_ptr, info_ptr,
w, h, 8, PNG_COLOR_TYPE_RGB,
PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
{
static int recursive;
FILE *fp = NULL;
-
+
HBITMAP offscreen_bitmap = NULL; // bitmap that is converted to a DIB
HDC offscreen_dc = NULL; // offscreen DC that we can select offscreen bitmap into
if(recursive)
- return;
-
+ return;
+
recursive++;
if (!screenshot_prepared || doprepare) {
- if (!screenshot_prepare())
+ if (!screenshot_prepare())
goto oops;
}
if (mode == 0) {
- toclipboard (&bi, lpvBits);
+ toclipboard (&bi, lpvBits);
} else {
- char filename[MAX_DPATH];
- char path[MAX_DPATH];
- char name[MAX_DPATH];
- char underline[] = "_";
- int number = 0;
-
- fetch_path ("ScreenshotPath", path, sizeof (path));
+ char filename[MAX_DPATH];
+ char path[MAX_DPATH];
+ char name[MAX_DPATH];
+ char underline[] = "_";
+ int number = 0;
+
+ fetch_path ("ScreenshotPath", path, sizeof (path));
CreateDirectory (path, NULL);
name[0] = 0;
if (currprefs.dfxtype[0] >= 0)
if (!name[0])
underline[0] = 0;
namesplit (name);
-
+
while(++number < 1000) // limit 999 iterations / screenshots
{
sprintf(filename, "%s%s%s%03d.%s", path, name, underline, number, screenshotmode ? "png" : "bmp");
fp = NULL;
if (!ok)
goto oops;
- write_log("Screenshot saved as \"%s\"\n", filename);
+ write_log ("Screenshot saved as \"%s\"\n", filename);
break;
}
fclose (fp);
fp = NULL;
}
}
-
+
oops:
if(fp)
- fclose(fp);
-
+ fclose(fp);
+
if (doprepare)
- screenshot_free();
+ screenshot_free();
recursive--;
}
#include "sysconfig.h"
#include "sysdeps.h"
-
+
#include "options.h"
#include "uae.h"
#include "memory.h"
serper = w;
if (w & 0x8000) {
- if (!warned) {
- write_log("SERIAL: program uses 9bit mode PC=%x\n", M68K_GETPC);
+ if (!warned) {
+ write_log ("SERIAL: program uses 9bit mode PC=%x\n", M68K_GETPC);
warned++;
- }
- ninebit = 1;
+ }
+ ninebit = 1;
}
w &= 0x7fff;
return;
if (data_in_serdatr) {
- /* probably not needed but there may be programs that expect OVRUNs.. */
+ /* probably not needed but there may be programs that expect OVRUNs.. */
gettimeofday (&tv, NULL);
if (tv.tv_sec > lastchartime) {
ovrun = 1;
}
}
} else {
- if (!readser (&recdata))
+ if (!readser (&recdata))
return;
serdatr = recdata;
- serdatr |= 0x100;
+ serdatr |= 0x100;
}
gettimeofday (&tv, NULL);
lastchartime = tv.tv_sec + 5;
writeser (serdatshift);
#endif
data_in_serdat = 0;
- INTREQ_f (0x8000 | 0x0001);
+ INTREQ_f (0x8000 | 0x0001);
#if SERIALDEBUG > 2
write_log ("SERIAL: send %04.4X (%c)\n", serdatshift, dochar (serdatshift));
#endif
}
-}
+}
void serial_hsynchandler (void)
{
write_log ("SERIAL: program wrote to SERDAT but old byte wasn't fetched yet\n");
}
#endif
-
+
if (seriallog)
console_out("%c", dochar (w));
if (ovrun)
serdatr |= 0x8000;
#if SERIALDEBUG > 2
- write_log( "SERIAL: read 0x%04.4x (%c) %x\n", serdatr, dochar (serdatr), m68k_getpc());
+ write_log ( "SERIAL: read 0x%04.4x (%c) %x\n", serdatr, dochar (serdatr), m68k_getpc ());
#endif
ovrun = 0;
data_in_serdatr = 0;
void serial_check_irq (void)
{
if (data_in_serdatr)
- INTREQ_0 (0x8000 | 0x0800);
+ INTREQ_0 (0x8000 | 0x0800);
}
void serial_dtr_on(void)
{
#if SERIALHSDEBUG > 0
- write_log( "SERIAL: DTR on\n" );
+ write_log ( "SERIAL: DTR on\n" );
#endif
dtr = 1;
if (currprefs.serial_demand)
void serial_dtr_off(void)
{
#if SERIALHSDEBUG > 0
- write_log( "SERIAL: DTR off\n" );
+ write_log ( "SERIAL: DTR off\n" );
#endif
dtr = 0;
#ifdef SERIAL_PORT
static void serial_status_debug(char *s)
{
#if SERIALHSDEBUG > 1
- write_log("%s: DTR=%d RTS=%d CD=%d CTS=%d DSR=%d\n", s,
+ write_log ("%s: DTR=%d RTS=%d CD=%d CTS=%d DSR=%d\n", s,
(oldserbits & 0x80) ? 0 : 1, (oldserbits & 0x40) ? 0 : 1,
(oldserbits & 0x20) ? 0 : 1, (oldserbits & 0x10) ? 0 : 1, (oldserbits & 0x08) ? 0 : 1);
#endif
if (!(serbits & 0x20)) {
serbits |= 0x20;
#if SERIALHSDEBUG > 0
- write_log( "SERIAL: CD off\n" );
+ write_log ( "SERIAL: CD off\n" );
#endif
}
} else {
if (serbits & 0x20) {
serbits &= ~0x20;
#if SERIALHSDEBUG > 0
- write_log( "SERIAL: CD on\n" );
+ write_log ( "SERIAL: CD on\n" );
#endif
}
}
if (!(status & TIOCM_DSR)) {
- if (!(serbits & 0x08)) {
+ if (!(serbits & 0x08)) {
serbits |= 0x08;
#if SERIALHSDEBUG > 0
- write_log( "SERIAL: DSR off\n" );
+ write_log ( "SERIAL: DSR off\n" );
#endif
- }
+ }
} else {
- if (serbits & 0x08) {
+ if (serbits & 0x08) {
serbits &= ~0x08;
#if SERIALHSDEBUG > 0
- write_log( "SERIAL: DSR on\n" );
+ write_log ( "SERIAL: DSR on\n" );
#endif
}
}
if (!(status & TIOCM_CTS)) {
- if (!(serbits & 0x10)) {
+ if (!(serbits & 0x10)) {
serbits |= 0x10;
#if SERIALHSDEBUG > 0
- write_log( "SERIAL: CTS off\n" );
+ write_log ( "SERIAL: CTS off\n" );
#endif
- }
+ }
} else {
- if (serbits & 0x10) {
+ if (serbits & 0x10) {
serbits &= ~0x10;
#if SERIALHSDEBUG > 0
- write_log( "SERIAL: CTS on\n" );
+ write_log ( "SERIAL: CTS on\n" );
#endif
}
}
write_log ("SERIAL: RTS cleared\n");
#endif
} else {
- setserstat (TIOCM_RTS, 1);
+ setserstat (TIOCM_RTS, 1);
#if SERIALHSDEBUG > 0
write_log ("SERIAL: RTS set\n");
#endif
#if 0 /* CIA io-pins can be read even when set to output.. */
if ((newstate & 0x20) != (oldserbits & 0x20) && (dir & 0x20))
- write_log ("SERIAL: warning, program tries to use CD as an output!\n");
+ write_log ("SERIAL: warning, program tries to use CD as an output!\n");
if ((newstate & 0x10) != (oldserbits & 0x10) && (dir & 0x10))
- write_log ("SERIAL: warning, program tries to use CTS as an output!\n");
+ write_log ("SERIAL: warning, program tries to use CTS as an output!\n");
if ((newstate & 0x08) != (oldserbits & 0x08) && (dir & 0x08))
- write_log ("SERIAL: warning, program tries to use DSR as an output!\n");
+ write_log ("SERIAL: warning, program tries to use DSR as an output!\n");
#endif
if (logcnt > 0) {
return;
serper = 0;
if(!openser(currprefs.sername)) {
- write_log("SERIAL: Could not open device %s\n", currprefs.sername);
- return;
+ write_log ("SERIAL: Could not open device %s\n", currprefs.sername);
+ return;
}
serdev = 1;
#endif
char *wu;
FILE *f;
uae_u8 *b, *p1, *p2, *p3, *cfgbuf, *databuf;
- int size, size2, i, num, offset;
+ int size, size2, i, num, offset;
if (argc < 4) {
printf("Usage: sfhelper.exe <winuae.exe> <config file> <file1> [<file2>..]");
if (!strcmp (p1, "_DATA_STARTS_HERE"))
databuf = p1;
}
- p1++;
+ p1++;
if (cfgbuf && databuf)
break;
}
#include <float.h>
-#include "sysconfig.h"
+#include "sysconfig.h"
#include "sysdeps.h"
#include "sys/mman.h"
#include "include/memory.h"
natmem_offset = addr;
break;
}
- addr += 0x01000000;
+ addr += 0x01000000;
}
if (natmem_offset) {
- write_log( "NATMEM: Our special area is 0x%x\n", natmem_offset);
+ write_log ( "NATMEM: Our special area is 0x%x\n", natmem_offset);
} else {
canbang = 0;
}
int mprotect(void *addr, size_t len, int prot)
{
int result = 0;
-
+
return result;
}
int result = -1;
if( ( key == IPC_PRIVATE ) || ( ( shmflg & IPC_CREAT ) && ( find_shmkey( key ) == -1) ) ) {
- write_log( "shmget of size %d for %s\n", size, name );
+ write_log ( "shmget of size %d for %s\n", size, name );
if( ( result = get_next_shmkey() ) != -1 ) {
HANDLE h = CreateFileMapping (NULL, 0, PAGE_READWRITE, 0, size, NULL);
if (h == NULL)
}
void *shmat(int shmid, LPVOID shmaddr, int shmflg)
-{
+{
struct shmid_ds *shm = &shmids[shmid];
if(shm->addr == shmaddr )
int i;
if (shmaddr == (void*)0xffffffff)
return 0;
- write_log("shmdt: %08.8X\n", shmaddr);
+ write_log ("shmdt: %08.8X\n", shmaddr);
if (UnmapViewOfFile ((LPCVOID)shmaddr) == FALSE) {
win32_error("UnmapViewOfFile %08.8X", shmaddr);
return 0;
}
for( i = 0; i < MAX_SHMID; i++ ) {
- struct shmid_ds *shm = &shmids[i];
+ struct shmid_ds *shm = &shmids[i];
if (shm->addr == shmaddr) {
shm->addr = (void*)0xffffffff;
}
static void resume_audio_ds (void)
{
HRESULT hr;
-
+
clearbuffer ();
hr = IDirectSoundBuffer_Play (lpDSBsecondary, 0, 0, DSBPLAY_LOOPING);
if (hr != DS_OK)
WAVEFORMATEX wavfmt;
int minfreq, maxfreq;
int freq = sounddata_frequency;
-
+
hr = DirectSoundCreate (&sound_device_guid[devicenum], &lpDS, NULL);
if (hr != DS_OK) {
- write_log ("SOUND: DirectSoundCreate() failure: %s\n", DXError (hr));
- return 0;
+ write_log ("SOUND: DirectSoundCreate() failure: %s\n", DXError (hr));
+ return 0;
}
memset (&DSCaps, 0, sizeof (DSCaps));
DSCaps.dwSize = sizeof(DSCaps);
if (minfreq > freq) {
freq = minfreq;
sounddata_frequency = freq;
- write_log("SOUND: minimum supported frequency: %d\n", minfreq);
+ write_log ("SOUND: minimum supported frequency: %d\n", minfreq);
}
if (maxfreq < freq) {
freq = maxfreq;
sounddata_frequency = freq;
- write_log("SOUND: maximum supported frequency: %d\n", maxfreq);
+ write_log ("SOUND: maximum supported frequency: %d\n", maxfreq);
}
} else {
- write_log("SOUND: ignored weird min (%d) or max (%d) sample rate\n", minfreq, maxfreq);
+ write_log ("SOUND: ignored weird min (%d) or max (%d) sample rate\n", minfreq, maxfreq);
}
-
+
memset (&sound_buffer, 0, sizeof (sound_buffer));
sound_buffer.dwSize = sizeof (sound_buffer);
sound_buffer.dwFlags = DSBCAPS_PRIMARYBUFFER | DSBCAPS_GETCURRENTPOSITION2;
hr = IDirectSound_CreateSoundBuffer (lpDS, &sound_buffer, &lpDSBprimary, NULL);
if( hr != DS_OK ) {
- write_log ("SOUND: Primary CreateSoundBuffer() failure: %s\n", DXError (hr));
+ write_log ("SOUND: Primary CreateSoundBuffer() failure: %s\n", DXError (hr));
goto error;
}
hr = IDirectSound_SetCooperativeLevel (lpDS, hwnd, DSSCL_PRIORITY);
if (hr != DS_OK) {
- write_log ("SOUND: Can't set cooperativelevel: %s\n", DXError (hr));
- goto error;
+ write_log ("SOUND: Can't set cooperativelevel: %s\n", DXError (hr));
+ goto error;
}
dsoundbuf = sounddata_bufsize;
if (dsoundbuf < DSBSIZE_MIN)
- dsoundbuf = DSBSIZE_MIN;
+ dsoundbuf = DSBSIZE_MIN;
if (dsoundbuf > DSBSIZE_MAX)
- dsoundbuf = DSBSIZE_MAX;
+ dsoundbuf = DSBSIZE_MAX;
memset (&sound_buffer, 0, sizeof (sound_buffer));
sound_buffer.dwSize = sizeof (sound_buffer);
hr = IDirectSound_CreateSoundBuffer( lpDS, &sound_buffer, &lpDSBsecondary, NULL );
if (hr != DS_OK) {
- write_log ("SOUND: Secondary CreateSoundBuffer() failure: %s\n", DXError (hr));
- goto error;
+ write_log ("SOUND: Secondary CreateSoundBuffer() failure: %s\n", DXError (hr));
+ goto error;
}
hr = IDirectSoundBuffer_SetFormat (lpDSBprimary, &wavfmt);
if( hr != DS_OK ) {
- write_log ("SOUND: Primary SetFormat() failure: %s\n", DXError (hr));
- goto error;
+ write_log ("SOUND: Primary SetFormat() failure: %s\n", DXError (hr));
+ goto error;
}
-
+
clearbuffer ();
return 1;
HWND hwndFound; // this is what is returned to the caller
char pszNewWindowTitle[MY_BUFSIZE]; // contains fabricated WindowTitle
char pszOldWindowTitle[MY_BUFSIZE]; // contains original WindowTitle
-
+
// fetch current window title
-
+
GetConsoleTitle(pszOldWindowTitle, MY_BUFSIZE);
-
+
// format a "unique" NewWindowTitle
-
+
wsprintf(pszNewWindowTitle,"%d/%d",
- GetTickCount(),
- GetCurrentProcessId());
-
+ GetTickCount(),
+ GetCurrentProcessId());
+
// change current window title
-
+
SetConsoleTitle(pszNewWindowTitle);
-
+
// ensure window title has been updated
-
+
Sleep(40);
-
+
// look for NewWindowTitle
-
+
hwndFound=FindWindow(NULL, pszNewWindowTitle);
-
+
// restore original window title
-
+
SetConsoleTitle(pszOldWindowTitle);
-
+
return(hwndFound);
}
return 0;
} else {
WaitForSingleObject (timehandle, ms);
- ResetEvent (timehandle);
+ ResetEvent (timehandle);
timeKillEvent (TimerEvent);
}
return 1;
}
static void runtest(void)
-{
+{
int pos, spos, expected, len, freqdiff;
int lastpos, minpos, maxpos;
int mult = sounddata_stereo ? 4 : 2;
write_log2 ("position granularity: minimum %d, maximum %d samples\n", minpos, maxpos);
len = 200;
while (len <= 1400) {
- pause_audio_ds ();
- resume_audio_ds ();
+ pause_audio_ds ();
+ resume_audio_ds ();
while (pos > 1000)
pos = getpos();
while (pos < 1000)
write_log2("real calculated frequency: %d\n",
sounddata_frequency - freqdiff);
pause_audio_ds ();
-}
+}
static int selectdevice (void)
{
}
if(!OpenThreadToken(GetCurrentThread(), TOKEN_QUERY, TRUE,
- &hAccessToken )) {
- if(GetLastError() != ERROR_NO_TOKEN)
- return 1;
- //
- // retry against process token if no thread token exists
- //
- if(!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY,
- &hAccessToken))
- return 1;
+ &hAccessToken )) {
+ if(GetLastError() != ERROR_NO_TOKEN)
+ return 1;
+ //
+ // retry against process token if no thread token exists
+ //
+ if(!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY,
+ &hAccessToken))
+ return 1;
}
bSuccess = GetTokenInformation(hAccessToken,TokenGroups,InfoBuffer,
- 1024, &dwInfoBufferSize);
+ 1024, &dwInfoBufferSize);
CloseHandle(hAccessToken);
if(!bSuccess )
- return 1;
+ return 1;
if(!AllocateAndInitializeSid(&siaNtAuthority, 2,
- SECURITY_BUILTIN_DOMAIN_RID,
- DOMAIN_ALIAS_RID_ADMINS,
- 0, 0, 0, 0, 0, 0,
- &psidAdministrators))
- return 1;
+ SECURITY_BUILTIN_DOMAIN_RID,
+ DOMAIN_ALIAS_RID_ADMINS,
+ 0, 0, 0, 0, 0, 0,
+ &psidAdministrators))
+ return 1;
// assume that we don't find the admin SID.
bSuccess = FALSE;
for(x=0;x<ptgGroups->GroupCount;x++)
{
- if( EqualSid(psidAdministrators, ptgGroups->Groups[x].Sid) )
- {
- bSuccess = TRUE;
- break;
- }
+ if( EqualSid(psidAdministrators, ptgGroups->Groups[x].Sid) )
+ {
+ bSuccess = TRUE;
+ break;
+ }
}
FreeSid(psidAdministrators);
devicenum = selectdevice ();
i = 0;
while (srates[i]) {
- sounddata_frequency = srates[i];
+ sounddata_frequency = srates[i];
if (open_audio_ds ()) {
if (!timebegin ()) {
printf ("no MM timer, exiting..\n");
- /*
+ /*
* UAE - The Un*x Amiga Emulator
- *
+ *
* Win32 sound interface (DirectSound)
*
* Copyright 1997 Mathias Ortmann
void update_sound (int freq)
{
if (freq < 0)
- freq = lastfreq;
+ freq = lastfreq;
lastfreq = freq;
if (have_sound) {
if (isvsync() || currprefs.chipset_refreshrate) {
waiting_for_buffer = 0;
hr = IDirectSoundBuffer_Stop (lpDSBsecondary);
if (FAILED(hr))
- write_log("SOUND: DirectSoundBuffer_Stop failed, %s\n", DXError(hr));
+ write_log ("SOUND: DirectSoundBuffer_Stop failed, %s\n", DXError(hr));
hr = IDirectSoundBuffer_SetCurrentPosition (lpDSBsecondary, 0);
if (FAILED(hr))
- write_log("SOUND: DirectSoundBuffer_SetCurretPosition failed, %s\n", DXError(hr));
+ write_log ("SOUND: DirectSoundBuffer_SetCurretPosition failed, %s\n", DXError(hr));
cleardsbuffer ();
}
LONG vol = DSBVOLUME_MIN;
if (currprefs.sound_volume < 100 && !mute)
- vol = (LONG)((DSBVOLUME_MIN / 2) + (-DSBVOLUME_MIN / 2) * log (1 + (2.718281828 - 1) * (1 - currprefs.sound_volume / 100.0)));
+ vol = (LONG)((DSBVOLUME_MIN / 2) + (-DSBVOLUME_MIN / 2) * log (1 + (2.718281828 - 1) * (1 - currprefs.sound_volume / 100.0)));
hr = IDirectSoundBuffer_SetVolume (lpDSBsecondary, vol);
if (FAILED(hr))
- write_log ("SOUND: SetVolume(%d) failed: %s\n", vol, DXError (hr));
+ write_log ("SOUND: SetVolume(%d) failed: %s\n", vol, DXError (hr));
setvolume_ahi (vol);
}
const static GUID KSDATAFORMAT_SUBTYPE_PCM = {0x00000001,0x0000,0x0010,
{0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71}};
#define KSAUDIO_SPEAKER_QUAD_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
- SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT)
+ SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT)
struct dsaudiomodes {
int ch;
supportedmodes[1].ksmode = 0;
if (FAILED(IDirectSound8_GetSpeakerConfig(lpDS, &speakerconfig)))
speakerconfig = DSSPEAKER_STEREO;
-
+
memset (&wavfmt, 0, sizeof (WAVEFORMATEXTENSIBLE));
wavfmt.Format.nSamplesPerSec = freq;
wavfmt.Format.wBitsPerSample = 16;
wavfmt.Samples.wValidBitsPerSample = 16;
for (ch = 4; ch <= 6; ch+= 2) {
wavfmt.Format.nChannels = ch;
- wavfmt.Format.nBlockAlign = wavfmt.Format.wBitsPerSample / 8 * wavfmt.Format.nChannels;
- wavfmt.Format.nAvgBytesPerSec = wavfmt.Format.nBlockAlign * wavfmt.Format.nSamplesPerSec;
+ wavfmt.Format.nBlockAlign = wavfmt.Format.wBitsPerSample / 8 * wavfmt.Format.nChannels;
+ wavfmt.Format.nAvgBytesPerSec = wavfmt.Format.nBlockAlign * wavfmt.Format.nSamplesPerSec;
if (ch == 6) {
rn[0] = KSAUDIO_SPEAKER_5POINT1;
rn[1] = KSAUDIO_SPEAKER_5POINT1_SURROUND;
rn[1] = KSAUDIO_SPEAKER_QUAD_SURROUND;
rn[2] = KSAUDIO_SPEAKER_SURROUND;
rn[3] = 0;
- }
+ }
skip = sound_mode_skip;
for (round = 0; rn[round]; round++) {
if (skip > 0 && rn[round + 1] != 0) {
}
}
}
- write_log("SOUND: %08.8X ", speakerconfig);
+ write_log ("SOUND: %08.8X ", speakerconfig);
for (i = 0; i < mode; i++)
- write_log("%d:%08.8X ", supportedmodes[i].ch, supportedmodes[i].ksmode);
- write_log("\n");
+ write_log ("%d:%08.8X ", supportedmodes[i].ch, supportedmodes[i].ksmode);
+ write_log ("\n");
}
static int open_audio_ds (int size)
snd_configsize = size;
sndbufsize = size / 32;
if (sndbufsize > SND_MAX_BUFFER)
- sndbufsize = SND_MAX_BUFFER;
+ sndbufsize = SND_MAX_BUFFER;
max_sndbufsize = size * 4;
if (max_sndbufsize > SND_MAX_BUFFER2)
- max_sndbufsize = SND_MAX_BUFFER2;
+ max_sndbufsize = SND_MAX_BUFFER2;
dsoundbuf = max_sndbufsize * 2;
if (dsoundbuf < DSBSIZE_MIN)
- dsoundbuf = DSBSIZE_MIN;
+ dsoundbuf = DSBSIZE_MIN;
if (dsoundbuf > DSBSIZE_MAX)
- dsoundbuf = DSBSIZE_MAX;
+ dsoundbuf = DSBSIZE_MAX;
if (max_sndbufsize * 2 > dsoundbuf)
- max_sndbufsize = dsoundbuf / 2;
+ max_sndbufsize = dsoundbuf / 2;
recalc_offsets();
hr = DirectSoundCreate8 (&sound_device_guid[currprefs.win32_soundcard], &lpDS, NULL);
if (FAILED(hr)) {
- write_log ("SOUND: DirectSoundCreate8() failure: %s\n", DXError (hr));
- return 0;
+ write_log ("SOUND: DirectSoundCreate8() failure: %s\n", DXError (hr));
+ return 0;
}
hr = IDirectSound_SetCooperativeLevel (lpDS, hMainWnd, DSSCL_PRIORITY);
if (FAILED(hr)) {
- write_log ("SOUND: Can't set cooperativelevel: %s\n", DXError (hr));
- goto error;
+ write_log ("SOUND: Can't set cooperativelevel: %s\n", DXError (hr));
+ goto error;
}
memset (&DSCaps, 0, sizeof (DSCaps));
if (minfreq > freq && freq < 22050) {
freq = minfreq;
changed_prefs.sound_freq = currprefs.sound_freq = freq;
- write_log("SOUND: minimum supported frequency: %d\n", minfreq);
+ write_log ("SOUND: minimum supported frequency: %d\n", minfreq);
}
if (maxfreq < freq && freq > 44100) {
freq = maxfreq;
changed_prefs.sound_freq = currprefs.sound_freq = freq;
- write_log("SOUND: maximum supported frequency: %d\n", maxfreq);
+ write_log ("SOUND: maximum supported frequency: %d\n", maxfreq);
}
}
fillsupportedmodes(freq);
for (round = 0; supportedmodes[round].ch; round++) {
- DWORD ksmode = 0;
-
+ DWORD ksmode = 0;
+
pdsb = NULL;
memset (&wavfmt, 0, sizeof (WAVEFORMATEXTENSIBLE));
- wavfmt.Format.nChannels = ch;
+ wavfmt.Format.nChannels = ch;
wavfmt.Format.nSamplesPerSec = freq;
wavfmt.Format.wBitsPerSample = 16;
if (supportedmodes[round].ch != ch)
hr = IDirectSound_CreateSoundBuffer(lpDS, &sound_buffer, &pdsb, NULL);
if (SUCCEEDED(hr))
break;
- if (sound_buffer.dwFlags & DSBCAPS_LOCHARDWARE) {
+ if (sound_buffer.dwFlags & DSBCAPS_LOCHARDWARE) {
HRESULT hr2 = hr;
sound_buffer.dwFlags &= ~DSBCAPS_LOCHARDWARE;
sound_buffer.dwFlags |= DSBCAPS_LOCSOFTWARE;
hr = IDirectSound_CreateSoundBuffer(lpDS, &sound_buffer, &pdsb, NULL);
if (SUCCEEDED(hr)) {
- write_log("SOUND: Couldn't use hardware buffer (switched to software): %s\n", DXError (hr2));
+ write_log ("SOUND: Couldn't use hardware buffer (switched to software): %s\n", DXError (hr2));
break;
}
}
goto error;
hr = IDirectSound_QueryInterface(pdsb, &IID_IDirectSoundBuffer8, (LPVOID*)&lpDSBsecondary);
if (FAILED(hr)) {
- write_log ("SOUND: Secondary QueryInterface() failure: %s\n", DXError (hr));
+ write_log ("SOUND: Secondary QueryInterface() failure: %s\n", DXError (hr));
goto error;
}
IDirectSound_Release(pdsb);
return;
hr = IDirectSoundBuffer_GetCurrentPosition (lpDSBsecondary, &playpos, &safed);
if (FAILED(hr)) {
- write_log("SOUND: DirectSoundBuffer_GetCurrentPosition failed, %s\n", DXError(hr));
+ write_log ("SOUND: DirectSoundBuffer_GetCurrentPosition failed, %s\n", DXError(hr));
return;
}
writepos = playpos + snd_writeoffset;
if (!waiting_for_buffer)
return;
if (savestate_state)
- return;
+ return;
if (waiting_for_buffer == 1) {
hr = IDirectSoundBuffer_Play (lpDSBsecondary, 0, 0, DSBPLAY_LOOPING);
sleep_millis(1);
counter--;
if (counter < 0) {
- write_log("SOUND: stuck?!?!\n");
+ write_log ("SOUND: stuck?!?!\n");
break;
}
}
- write_log("SOUND: %d = (%d - %d)\n", safedist - playpos, safedist, playpos);
+ write_log ("SOUND: %d = (%d - %d)\n", safedist - playpos, safedist, playpos);
recalc_offsets();
safedist -= playpos;
if (safedist < 64)
#endif
waiting_for_buffer = -1;
restart_sound_buffer();
- write_log("SOUND: bs=%d w=%d max=%d tof=%d tuf=%d\n",
+ write_log ("SOUND: bs=%d w=%d max=%d tof=%d tuf=%d\n",
sndbufsize, snd_writeoffset,
snd_maxoffset, snd_totalmaxoffset_of, snd_totalmaxoffset_uf);
tfprev = timeframes + 10;
statuscnt = SND_STATUSCNT;
restart_sound_buffer();
diff = snd_writeoffset;
- write_log("SOUND: underflow (%d %d)\n", diff, snd_totalmaxoffset_of);
+ write_log ("SOUND: underflow (%d %d)\n", diff, snd_totalmaxoffset_of);
break;
}
return;
if (FAILED(hr)) {
write_log ("SOUND: lock failed: %s (%d %d)\n", DXError (hr), writepos, sndbufsize);
- return;
+ return;
}
memcpy (b1, sndbuffer, s1);
if (b2)
- memcpy (b2, (uae_u8*)sndbuffer + s1, s2);
+ memcpy (b2, (uae_u8*)sndbuffer + s1, s2);
IDirectSoundBuffer_Unlock (lpDSBsecondary, b1, s1, b2, s2);
vdiff = diff - snd_writeoffset;
write_log ("b=%4d,%5d,%5d,%5d d=%5d vd=%5.0f s=%+02.1f\n",
sndbufsize, snd_configsize, max_sndbufsize, dsoundbuf, diff, vdiff, skipmode);
tfprev = timeframes;
- if (!avioutput_audio)
+ if (!avioutput_audio)
sound_setadjust (skipmode);
- gui_data.sndbuf = vdiff * 1000 / (snd_maxoffset - snd_writeoffset);
+ gui_data.sndbuf = vdiff * 1000 / (snd_maxoffset - snd_writeoffset);
}
writepos += sndbufsize;
#endif
#ifdef AVIOUTPUT
if (avioutput_audio)
- AVIOutput_WriteAudio ((uae_u8*)sndbuffer, sndbufsize);
+ AVIOutput_WriteAudio ((uae_u8*)sndbuffer, sndbufsize);
if (avioutput_enabled && (!avioutput_framelimiter || avioutput_nosoundoutput))
return;
#endif
char **enumerate_sound_devices (int *total)
{
if (!num_sound_devices)
- DirectSoundEnumerate ((LPDSENUMCALLBACK)DSEnumProc, 0);
+ DirectSoundEnumerate ((LPDSENUMCALLBACK)DSEnumProc, 0);
if (total)
*total = num_sound_devices;
if (currprefs.win32_soundcard >= num_sound_devices)
}
#include <mmdeviceapi.h>
-#include <endpointvolume.h>
+#include <endpointvolume.h>
/*
Based on
static int setget_master_volume_vista(int setvolume, int *volume, int *mute)
{
IMMDeviceEnumerator *deviceEnumerator = NULL;
- IMMDevice *defaultDevice = NULL;
+ IMMDevice *defaultDevice = NULL;
IAudioEndpointVolume *endpointVolume = NULL;
HRESULT hr;
int ok = 0;
ok++;
}
}
- endpointVolume->lpVtbl->Release(endpointVolume);
+ endpointVolume->lpVtbl->Release(endpointVolume);
}
defaultDevice->lpVtbl->Release(defaultDevice);
}
if (err == MMSYSERR_NOERROR)
return;
if (mciGetErrorString(err, es, sizeof es))
- write_log("MCIErr: %s: %d = '%s'\n", str, err, es);
+ write_log ("MCIErr: %s: %d = '%s'\n", str, err, es);
else
- write_log("%s, errcode=%d\n", str, err);
+ write_log ("%s, errcode=%d\n", str, err);
}
/* from http://www.codeproject.com/audio/mixerSetControlDetails.asp */
static int setget_master_volume_xp(int setvolume, int *volume, int *mute)
ml.dwComponentType = MIXERLINE_COMPONENTTYPE_DST_DIGITAL;
result = mixerGetLineInfo((HMIXEROBJ) hMixer, &ml, MIXER_GETLINEINFOF_COMPONENTTYPE);
}
- if (result == MMSYSERR_NOERROR) {
+ if (result == MMSYSERR_NOERROR) {
mlc.cbStruct = sizeof(MIXERLINECONTROLS);
mlc.dwLineID = ml.dwLineID;
mlc.dwControlType = MIXERCONTROL_CONTROLTYPE_VOLUME;
mcb.fValue = 0;
mcd.cbDetails = sizeof(MIXERCONTROLDETAILS_BOOLEAN);
if (setvolume) {
- mcb.fValue = *mute;
+ mcb.fValue = *mute;
result = mixerSetControlDetails((HMIXEROBJ) hMixer, &mcd, MIXER_SETCONTROLDETAILSF_VALUE);
} else {
result = mixerGetControlDetails((HMIXEROBJ) hMixer, &mcd, MIXER_GETCONTROLDETAILSF_VALUE);
-/*
+/*
* UAE - The Un*x Amiga Emulator
- *
+ *
* Support for Linux/USS sound
- *
+ *
* Copyright 1997 Bernd Schmidt
*/
- /*
+ /*
* UAE - The Un*x Amiga Emulator
- *
+ *
* Miscellaneous machine dependent support functions and definitions
*
* Copyright 1996 Bernd Schmidt
int i, ratecnt = 5;
LARGE_INTEGER freq;
int qpc_avail = 0;
- int mmx = 0;
+ int mmx = 0;
rpt_available = no_rdtsc > 0 ? 0 : 1;
#ifdef X86_MSVC_ASSEMBLY
__try
{
- __asm
+ __asm
{
rdtsc
}
}
__try
{
- __asm
+ __asm
{
mov eax,1
cpuid
qpcdivisor++;
qpc_avail = -1;
}
- write_log("CLOCKFREQ: QPF %.2fMHz (%.2fMHz, DIV=%d)\n", freq.QuadPart / 1000000.0,
+ write_log ("CLOCKFREQ: QPF %.2fMHz (%.2fMHz, DIV=%d)\n", freq.QuadPart / 1000000.0,
qpfrate / 1000000.0, 1 << qpcdivisor);
if (SystemInfo.dwNumberOfProcessors > 1 && no_rdtsc >= 0)
rpt_available = 0; /* RDTSC can be weird in SMP-systems */
} else {
- write_log("CLOCKREQ: QPF not supported\n");
+ write_log ("CLOCKREQ: QPF not supported\n");
}
if (!rpt_available && !qpc_avail) {
clockrate = win32_read_processor_time();
sleep_millis (500);
clockrate = (win32_read_processor_time() - clockrate) * 2;
- write_log("CLOCKFREQ: RDTSC %.2fMHz (busy) / %.2fMHz (idle)\n",
+ write_log ("CLOCKFREQ: RDTSC %.2fMHz (busy) / %.2fMHz (idle)\n",
clockrate / 1000000.0, clockrateidle / 1000000.0);
clkdiv = (double)clockrate / (double)clockrateidle;
clockrate >>= 6;
write_log ("%1.2fms ", rate1 / clockrate1000);
ratea1 += rate1;
}
- write_log("\n");
+ write_log ("\n");
timeend ();
sleep_millis (50);
}
write_log ("%1.2fms ", rate2 / clockrate1000);
ratea2 += rate2;
}
- write_log("\n");
+ write_log ("\n");
}
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_NORMAL);
sleep_millis (2);
timermode = ot;
if (timermode != 0)
- timeend();
+ timeend();
focus = 1;
pri = &priorities[currprefs.win32_inactive_priority];
recursive--;
return 0;
}
- break;
+ break;
case WM_ACTIVATE:
if (recursive)
return 0;
}
}
recursive--;
- return 0;
+ return 0;
case WM_ACTIVATEAPP:
{
}
manual_palette_refresh_needed = 1;
recursive--;
- return 0;
+ return 0;
}
case WM_PALETTECHANGED:
case WM_DROPFILES:
dragdrop (hWnd, (HDROP)wParam, &changed_prefs, -1);
break;
-
+
case WM_TIMER:
#ifdef PARALLEL_PORT
finishjob ();
case 0xff: // WM_INPUT:
handle_rawinput (lParam);
break;
-
+
case WM_NOTIFY:
{
LPNMHDR nm = (LPNMHDR)lParam;
case NM_CLICK:
case NM_RCLICK:
{
- LPNMMOUSE lpnm = (LPNMMOUSE) lParam;
+ LPNMMOUSE lpnm = (LPNMMOUSE) lParam;
int num = (int)lpnm->dwItemSpec;
if (num >= 7 && num <= 10) {
num -= 7;
}
}
break;
-
+
case WM_USER + 1: /* Systray icon */
switch (lParam)
{
RECT rc2;
if (GetWindowRect(hMainWnd, &rc2)) {
DWORD left = rc2.left - win_x_diff;
- DWORD top = rc2.top - win_y_diff;
+ DWORD top = rc2.top - win_y_diff;
if (amigawin_rect.left & 3) {
MoveWindow (hMainWnd, rc2.left + 4 - amigawin_rect.left % 4, rc2.top,
rc2.right - rc2.left, rc2.bottom - rc2.top, TRUE);
g_dwBackgroundColor = RGB(10, 0, 10);
hDC = GetDC (NULL);
- if (GetDeviceCaps (hDC, NUMCOLORS) != -1)
+ if (GetDeviceCaps (hDC, NUMCOLORS) != -1)
g_dwBackgroundColor = RGB (255, 0, 255);
ReleaseDC (NULL, hDC);
wc.lpszClassName = "PCsuxRox";
if (!RegisterClass (&wc))
return 0;
-
+
wc.style = CS_BYTEALIGNCLIENT | CS_BYTEALIGNWINDOW;
wc.lpfnWndProc = HiddenWindowProc;
wc.cbClsExtra = 0;
wc.lpszClassName = "Useless";
if (!RegisterClass (&wc))
return 0;
-
+
hHiddenWnd = CreateWindowEx (0,
"Useless", "You don't see me",
WS_POPUP,
0, 0,
- 1, 1,
+ 1, 1,
NULL, NULL, 0, NULL);
if (!hHiddenWnd)
return 0;
{
if (hRichEdit)
FreeLibrary(hRichEdit);
-
+
if (hHtmlHelp)
FreeLibrary(hHtmlHelp);
char *dllname;
if (language <= 0) {
- /* new user-specific Windows ME/2K/XP method to get UI language */
+ /* new user-specific Windows ME/2K/XP method to get UI language */
pGetUserDefaultUILanguage = (PGETUSERDEFAULTUILANGUAGE)GetProcAddress(
GetModuleHandle("kernel32.dll"), "GetUserDefaultUILanguage");
language = GetUserDefaultLangID();
static void pritransla (void)
{
int i;
-
+
for (i = 0; priorities[i].id; i++) {
char tmp[MAX_DPATH];
WIN32GUI_LoadUIString (priorities[i].id, tmp, sizeof (tmp));
if (hWinUAEKey) {
DWORD regkeytype;
DWORD regkeysize = sizeof(langid);
- RegQueryValueEx (hWinUAEKey, "Language", 0, ®keytype, (LPBYTE)&langid, ®keysize);
+ RegQueryValueEx (hWinUAEKey, "Language", 0, ®keytype, (LPBYTE)&langid, ®keysize);
}
hUIDLL = language_load(langid);
pritransla ();
/* Determine our processor speed and capabilities */
if (!figure_processor_speed())
return 0;
-
+
/* Make sure we do an InitCommonControls() to get some advanced controls */
InitCommonControls();
-
+
hRichEdit = LoadLibrary ("RICHED32.DLL");
-
+
return result;
}
return;
}
if (first == 1) {
- write_log("Log (%s): '%s%s'\n", currprefs.win32_logfile ? "enabled" : "disabled",
+ write_log ("Log (%s): '%s%s'\n", currprefs.win32_logfile ? "enabled" : "disabled",
start_path_data, LOG_NORMAL);
if (debugfile)
log_close (debugfile);
static const char *obsolete[] = {
"killwinkeys", "sound_force_primary", "iconified_highpriority",
"sound_sync", "sound_tweak", "directx6", "sound_style",
- "file_path", "iconified_nospeed", "activepriority",
+ "file_path", "iconified_nospeed", "activepriority",
0
};
strcat (path, "\\*.*");
h = FindFirstFile(path, &fd);
if (h != INVALID_HANDLE_VALUE) {
- for (i = 0; i < 3; i++) {
+ for (i = 0; i < 3; i++) {
if (!FindNextFile (h, &fd))
- break;
- }
+ break;
+ }
FindClose(h);
}
if (i == 3)
}
}
}
- break;
+ break;
case 1:
{
- char tmp2[MAX_DPATH];
+ char tmp2[MAX_DPATH];
strcpy (tmp2, start_path_new1);
strcat (tmp2, "..\\system\\rom");
if (isfilesindir(tmp2))
- strcpy (tmp, tmp2);
+ strcpy (tmp, tmp2);
}
- break;
+ break;
case 2:
{
char tmp2[MAX_DPATH];
strcpy (tmp2, start_path_new2);
strcat (tmp2, "system\\rom");
if (isfilesindir(tmp2))
- strcpy (tmp, tmp2);
+ strcpy (tmp, tmp2);
}
break;
case 3:
strcpy (tmp2, start_path_af);
strcat (tmp2, "..\\shared\\rom");
if (isfilesindir(tmp2))
- strcpy (tmp, tmp2);
+ strcpy (tmp, tmp2);
}
break;
default:
- return -1;
+ return -1;
}
if (isfilesindir(tmp)) {
strcpy (out, tmp);
- fixtrailing (out);
+ fixtrailing (out);
}
return out[0] ? 1 : 0;
}
{
char tmp[10];
int i;
-
+
i = 0;
while (**vs >= '0' && **vs <= '9') {
if (i >= sizeof (tmp))
if (RegSetValueEx (hWinUAEKey, "ROMCheckVersion", 0, REG_SZ, (CONST BYTE *)VersionStr, strlen (VersionStr) + 1) == ERROR_SUCCESS)
forceroms = 1;
}
-
+
size = sizeof (quickstart);
dwType = REG_DWORD;
RegQueryValueEx(hWinUAEKey, "QuickStartMode", 0, &dwType, (LPBYTE)&quickstart, &size);
if (!hWinUAEKey)
break;
- if (GetModuleFileName(NULL, tmp1, sizeof tmp1) == 0)
+ if (GetModuleFileName(NULL, tmp1, sizeof tmp1) == 0)
break;
h = CreateFile(tmp1, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (h == INVALID_HANDLE_VALUE)
size = sizeof data;
if (hWinUAEKey && RegQueryValueEx(hWinUAEKey, "Beta_Just_Shut_Up", 0, &dwType, (LPBYTE)&data, &size) == ERROR_SUCCESS) {
if (data == 68000) {
- write_log("I was told to shut up :(\n");
+ write_log ("I was told to shut up :(\n");
return 1;
}
}
int os_winnt, os_winnt_admin, os_64bit, os_vista, os_winxp;
-static int isadminpriv (void)
+static int isadminpriv (void)
{
DWORD i, dwSize = 0, dwResult = 0;
HANDLE hToken;
PSID pSID = (PSID)&sidBuffer;
SID_IDENTIFIER_AUTHORITY SIDAuth = SECURITY_NT_AUTHORITY;
int isadmin = 0;
-
+
// Open a handle to the access token for the calling process.
if (!OpenProcessToken( GetCurrentProcess(), TOKEN_QUERY, &hToken)) {
write_log ("OpenProcessToken Error %u\n", GetLastError());
if(!GetTokenInformation(hToken, TokenGroups, NULL, dwSize, &dwSize)) {
dwResult = GetLastError();
if(dwResult != ERROR_INSUFFICIENT_BUFFER) {
- write_log("GetTokenInformation Error %u\n", dwResult);
+ write_log ("GetTokenInformation Error %u\n", dwResult);
return FALSE;
}
}
DOMAIN_ALIAS_RID_ADMINS,
0, 0, 0, 0, 0, 0,
&pSID)) {
- write_log( "AllocateAndInitializeSid Error %u\n", GetLastError() );
+ write_log ( "AllocateAndInitializeSid Error %u\n", GetLastError() );
return FALSE;
}
if (EqualSid(pSID, pGroupInfo->Groups[i].Sid))
isadmin = 1;
}
-
+
if (pSID)
FreeSid(pSID);
if (pGroupInfo)
pSHGetSpecialFolderPath = (SHGETSPECIALFOLDERPATH)GetProcAddress(
GetModuleHandle("shell32.dll"), "SHGetSpecialFolderPathA");
if (pSHGetFolderPath)
- ok = SUCCEEDED(pSHGetFolderPath(NULL, CSIDL_COMMON_DOCUMENTS, NULL, 0, tmp));
+ ok = SUCCEEDED(pSHGetFolderPath(NULL, CSIDL_COMMON_DOCUMENTS, NULL, 0, tmp));
else if (pSHGetSpecialFolderPath)
- ok = pSHGetSpecialFolderPath(NULL, tmp, CSIDL_COMMON_DOCUMENTS, 0);
+ ok = pSHGetSpecialFolderPath(NULL, tmp, CSIDL_COMMON_DOCUMENTS, 0);
if (ok) {
- fixtrailing(tmp);
- strcpy (tmp2, tmp);
- strcat (tmp2, "Amiga Files");
- strcpy (tmp, tmp2);
- strcat(tmp, "\\WinUAE");
+ fixtrailing(tmp);
+ strcpy (tmp2, tmp);
+ strcat (tmp2, "Amiga Files");
+ strcpy (tmp, tmp2);
+ strcat(tmp, "\\WinUAE");
if (remove) {
if (GetFileAttributes(tmp) != INVALID_FILE_ATTRIBUTES) {
RemoveDirectory(tmp);
KEY_WRITE | KEY_READ, NULL, &key, &dispo) == ERROR_SUCCESS)
{
DWORD size = sizeof (prevpath);
- DWORD dwType = REG_SZ;
+ DWORD dwType = REG_SZ;
if (RegQueryValueEx (key, "PathMode", 0, &dwType, (LPBYTE)&prevpath, &size) != ERROR_SUCCESS)
prevpath[0] = 0;
RegCloseKey(key);
strcpy (tmp, start_path_exe);
strcat (tmp, "roms");
if (isfilesindir(tmp)) {
- strcpy (xstart_path_uae, start_path_exe);
+ strcpy (xstart_path_uae, start_path_exe);
}
strcpy (tmp, start_path_exe);
strcat (tmp, "configurations");
if (isfilesindir(tmp)) {
- strcpy (xstart_path_uae, start_path_exe);
+ strcpy (xstart_path_uae, start_path_exe);
}
strcpy (tmp, start_path_exe);
static LONG WINAPI WIN32_ExceptionFilter( struct _EXCEPTION_POINTERS * pExceptionPointers, DWORD ec)
{
- write_log("EVALEXCEPTION!\n");
+ write_log ("EVALEXCEPTION!\n");
return EXCEPTION_EXECUTE_HANDLER;
}
#else
if ((p >= (void*)regs.pc_p && p < (void*)(regs.pc_p + 32))
|| (p >= (void*)prevpc && p < (void*)(prevpc + 32))) {
int got = 0;
- uaecptr opc = m68k_getpc(®s);
+ uaecptr opc = m68k_getpc (®s);
void *ps = get_real_address (0);
m68k_dumpstate (0, 0);
efix (&ctx->Eax, p, ps, &got);
if (err == ERROR_MOD_NOT_FOUND || err == ERROR_DLL_NOT_FOUND)
return;
- write_log("%s failed to open %d\n", s, err);
+ write_log ("%s failed to open %d\n", s, err);
}
HMODULE WIN32_LoadLibrary (const char *name)
HANDLE thread;
thread = GetCurrentThread();
- original_affinity = SetThreadAffinityMask(thread, 1);
+ original_affinity = SetThreadAffinityMask(thread, 1);
#if 0
CHANGEWINDOWMESSAGEFILTER pChangeWindowMessageFilter;
pChangeWindowMessageFilter = (CHANGEWINDOWMESSAGEFILTER)GetProcAddress(
-/*
+/*
* UAE - The Un*x Amiga Emulator
- *
+ *
* Win32-specific header file
- *
+ *
* (c) 1997-1999 Mathias Ortmann
* (c) 1998-2001 Brian King
*/
#define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100)
#define GETBDD(x) ((x) % 100)
-#define WINUAEBETA 1
+#define WINUAEBETA 2
#define WINUAEPUBLICBETA 1
-#define WINUAEDATE MAKEBD(2007, 8, 19)
+#define WINUAEDATE MAKEBD(2007, 9, 2)
#define WINUAEEXTRA ""
#define WINUAEREV ""
#include "zfile.h"
typedef UINT32 (WINAPI * CreateObjectFunc)(
- const GUID *clsID,
- const GUID *interfaceID,
+ const GUID *clsID,
+ const GUID *interfaceID,
void **outObject);
DEFINE_GUID (IID_IInArchive, 0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00);
DEFINE_GUID (CLSID_CFormat7z, 0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x05, 0x00, 0x00);
STDMETHOD(Open)(IInStream *stream, const UINT64 *maxCheckStartPosition,
- IArchiveOpenCallback *openArchiveCallback) PURE;
-STDMETHOD(Close)(void) PURE;
-STDMETHOD(GetNumberOfItems)(UINT32 *numItems) PURE;
+ IArchiveOpenCallback *openArchiveCallback) PURE;
+STDMETHOD(Close)(void) PURE;
+STDMETHOD(GetNumberOfItems)(UINT32 *numItems) PURE;
STDMETHOD(GetProperty)(UINT32 index, PROPID propID, PROPVARIANT *value) PURE;
-STDMETHOD(Extract)(const UINT32* indices, UINT32 numItems,
+STDMETHOD(Extract)(const UINT32* indices, UINT32 numItems,
INT32 testMode, IArchiveExtractCallback *extractCallback) PURE;
STDMETHOD(GetArchiveProperty)(PROPID propID, PROPVARIANT *value) PURE;
-STDMETHOD(GetNumberOfProperties)(UINT32 *numProperties) PURE;
-STDMETHOD(GetPropertyInfo)(UINT32 index,
+STDMETHOD(GetNumberOfProperties)(UINT32 *numProperties) PURE;
+STDMETHOD(GetPropertyInfo)(UINT32 index,
BSTR *name, PROPID *propID, VARTYPE *varType) PURE;
-STDMETHOD(GetNumberOfArchiveProperties)(UINT32 *numProperties) PURE;
-STDMETHOD(GetArchivePropertyInfo)(UINT32 index,
+STDMETHOD(GetNumberOfArchiveProperties)(UINT32 *numProperties) PURE;
+STDMETHOD(GetArchivePropertyInfo)(UINT32 index,
BSTR *name, PROPID *propID, VARTYPE *varType) PURE;
void test7z (void)
HMODULE lib;
CreateObjectFunc createObjectFunc;
void *archive;
-
+
lib = LoadLibrary ("7z.dll");
if (!lib)
return;
return;
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Sleep (ms);
} else {
WaitForSingleObject (timehandle, ms);
- ResetEvent (timehandle);
+ ResetEvent (timehandle);
timeKillEvent (TimerEvent);
}
}
uae_u32 foo, bar;
__asm
{
- rdtsc
- mov foo, eax
- mov bar, edx
+ rdtsc
+ mov foo, eax
+ mov bar, edx
}
return ((uae_u64)bar << 32) | foo;
}
int i, ratecnt = 6;
LARGE_INTEGER freq;
int qpc_avail = 0;
- int mmx = 0;
+ int mmx = 0;
rpt_available = 1;
__try
{
- __asm
+ __asm
{
rdtsc
}
}
__try
{
- __asm
+ __asm
{
mov eax,1
cpuid
if (QueryPerformanceFrequency(&freq)) {
qpc_avail = 1;
- write_log("CLOCKFREQ: QPF %.2fMHz\n", freq.QuadPart / 1000000.0);
+ write_log ("CLOCKFREQ: QPF %.2fMHz\n", freq.QuadPart / 1000000.0);
qpfrate = freq.QuadPart;
/* we don't want 32-bit overflow */
if (qpfrate > 100000000) {
qpc_avail = -1;
}
} else {
- write_log("CLOCKREQ: QPF not supported\n");
+ write_log ("CLOCKREQ: QPF not supported\n");
}
if (!rpt_available && !qpc_avail)
clockrate = win32_read_processor_time();
sleep_millis (500);
clockrate = (win32_read_processor_time() - clockrate) * 2;
- write_log("CLOCKFREQ: RDTSC %.2fMHz (busy) / %.2fMHz (idle)\n",
+ write_log ("CLOCKFREQ: RDTSC %.2fMHz (busy) / %.2fMHz (idle)\n",
clockrate / 1000000.0, clockrateidle / 1000000.0);
clkdiv = (double)clockrate / (double)clockrateidle;
clockrate >>= 6;
clockrate = qpfrate;
clockrate1000 = clockrate / 1000.0;
if (dummythread_die < 0) {
- dummythread_die = 0;
+ dummythread_die = 0;
_beginthread(&dummythread, 0, 0);
}
if (!qpc_avail)
write_log ("%1.2fms ", rate1 / clockrate1000);
ratea1 += rate1;
}
- write_log("\n");
+ write_log ("\n");
timeend ();
sleep_millis (50);
}
write_log ("%1.2fms ", rate2 / clockrate1000);
ratea2 += rate2;
}
- write_log("\n");
+ write_log ("\n");
}
SetThreadPriority ( GetCurrentThread(), THREAD_PRIORITY_NORMAL);
dummythread_die = 1;
-
+
if (clkdiv >= 0.90 && clkdiv <= 1.10 && rpt_available) {
limit = 2.5;
if ((ratea2 / ratecnt) < limit * clockrate1000) { /* regular Sleep() is ok */
if (first == 1) {
if (debugfile)
fclose (debugfile);
- debugfile = 0;
+ debugfile = 0;
}
if( currprefs.win32_logfile ) {
sprintf( debugfilename, "%s\\winuaelog.txt", start_path );
{
char **argv, *posn;
int argc;
-
+
hInst = hInstance;
argc = __argc; argv = __argv;
start_path = xmalloc( MAX_DPATH );
GetModuleFileName( NULL, start_path, MAX_DPATH );
if( ( posn = strrchr( start_path, '\\' ) ) )
- *posn = 0;
+ *posn = 0;
real_main (argc, argv);
if (mm_timerres && timermode == 0)
timeend ();
DirectDrawState.temporary.desc.dwWidth = dst_width;
DirectDrawState.temporary.desc.dwHeight = dst_height;
if (DirectDraw_GetPrimaryPixelFormat (&DirectDrawState.temporary.desc.ddpfPixelFormat))
- DirectDrawState.temporary.desc.dwFlags |= DDSD_PIXELFORMAT;
- ddrval = IDirectDraw7_CreateSurface (DirectDrawState.directdraw.dd,
- &DirectDrawState.temporary.desc,
- &DirectDrawState.temporary.surface,
- NULL);
+ DirectDrawState.temporary.desc.dwFlags |= DDSD_PIXELFORMAT;
+ ddrval = IDirectDraw7_CreateSurface (DirectDrawState.directdraw.dd,
+ &DirectDrawState.temporary.desc,
+ &DirectDrawState.temporary.surface,
+ NULL);
if (FAILED(ddrval)) {
write_log ("DDRAW: failed to create temp surface\n%s\n", DXError (ddrval));
tempsurf = 0;
ah -= (int)(-v * 4.0 / 10);
if (aw * scale > dst_width)
- aw = dst_width / scale;
+ aw = dst_width / scale;
if (ah * scale > dst_height)
- ah = dst_height / scale;
+ ah = dst_height / scale;
if (ah < 16)
return;
return;
}
}
- dptr = (uae_u8*)desc.lpSurface;
+ dptr = (uae_u8*)desc.lpSurface;
pitch = desc.lPitch;
} else {
if (!DirectDraw_SurfaceLock (lockable_surface))
if (usedfilter->type == UAE_FILTER_SCALE2X ) { /* 16+32/2X */
- if (amiga_depth == 16 && dst_depth == 16) {
+ if (amiga_depth == 16 && dst_depth == 16) {
AdMame2x (sptr, gfxvidinfo.rowbytes, dptr, pitch, aw, ah);
ok = 1;
} else if (amiga_depth == 32 && dst_depth == 32) {
#if 0
} else if (usedfilter->type == UAE_FILTER_HQ) { /* 32/2X+3X+4X */
- int hqsrcpitch = gfxvidinfo.rowbytes - aw * amiga_depth / 8;
+ int hqsrcpitch = gfxvidinfo.rowbytes - aw * amiga_depth / 8;
int hqdstpitch = pitch - aw * scale * dst_depth / 8;
int hqdstpitch2 = pitch * scale - aw * scale * dst_depth / 8;
if (scale == 2) {
hq3x_16 (sptr, dptr, aw, ah, hqdstpitch, hqsrcpitch, hqdstpitch2);
ok = 1;
} else if (amiga_depth == 16 && dst_depth == 32) {
- hq3x_32 (sptr, dptr, aw, ah, hqdstpitch, hqsrcpitch, hqdstpitch2);
+ hq3x_32 (sptr, dptr, aw, ah, hqdstpitch, hqsrcpitch, hqdstpitch2);
ok = 1;
}
} else if (scale == 4) {
} else if (usedfilter->type == UAE_FILTER_SUPER2XSAI) { /* 16/2X */
if (scale == 2 && amiga_depth == 16 && dst_depth == 16) {
- Super2xSaI (sptr, gfxvidinfo.rowbytes, dptr, pitch, aw, ah);
+ Super2xSaI (sptr, gfxvidinfo.rowbytes, dptr, pitch, aw, ah);
ok = 1;
}
} else if (usedfilter->type == UAE_FILTER_PAL) { /* 16/32/1X */
- if (amiga_depth == 32 && dst_depth == 32) {
+ if (amiga_depth == 32 && dst_depth == 32) {
PAL_1x1_32((uae_u32*)sptr, gfxvidinfo.rowbytes, (uae_u32*)dptr, pitch, aw, ah);
ok = 1;
} else if (amiga_depth == 16 && dst_depth == 16) {
}
if (ok == 0 && currprefs.gfx_filter) {
- usedfilter = &uaefilters[0];
- changed_prefs.gfx_filter = usedfilter->type;
+ usedfilter = &uaefilters[0];
+ changed_prefs.gfx_filter = usedfilter->type;
}
if (temp_needed) {
- IDirectDrawSurface7_Unlock (dds, NULL);
+ IDirectDrawSurface7_Unlock (dds, NULL);
DirectDraw_Blt (DirectDraw_GetLockableType(), &dr, temporary_surface, &sr, 0, NULL);
} else {
DirectDraw_SurfaceUnlock ();
uae_u8 *dptr;
if (!DirectDraw_SurfaceLock (lockable_surface))
- return;
+ return;
dptr = DirectDraw_GetSurfacePointer ();
pitch = DirectDraw_GetSurfacePitch();
for (y = 0; y < dst_height; y++)
goto oops;
if (dxfullscreen) {
- write_log( "set_ddraw: Trying %dx%d, bits=%d, refreshrate=%d\n", width, height, bits, freq );
+ write_log ( "set_ddraw: Trying %dx%d, bits=%d, refreshrate=%d\n", width, height, bits, freq );
ddrval = DirectDraw_SetDisplayMode (width, height, bits, freq);
if (FAILED(ddrval)) {
write_log ("set_ddraw: failed, trying without forced refresh rate\n");
ddrval = DirectDraw_SetDisplayMode (width, height, bits, 0);
if (FAILED(ddrval)) {
- write_log( "set_ddraw: Couldn't SetDisplayMode()\n" );
+ write_log ( "set_ddraw: Couldn't SetDisplayMode()\n" );
goto oops;
}
}
ddrval = DirectDraw_GetDisplayMode();
if (FAILED(ddrval)) {
- write_log( "set_ddraw: Couldn't GetDisplayMode()\n" );
+ write_log ( "set_ddraw: Couldn't GetDisplayMode()\n" );
goto oops;
}
}
if (dd) {
ddrval = DirectDraw_CreateClipper();
if (FAILED(ddrval)) {
- write_log( "set_ddraw: No clipping support\n" );
+ write_log ( "set_ddraw: No clipping support\n" );
goto oops;
}
ddrval = DirectDraw_CreateSurface (width, height);
if (FAILED(ddrval)) {
- write_log( "set_ddraw: Couldn't CreateSurface() for primary because %s.\n", DXError( ddrval ) );
+ write_log ( "set_ddraw: Couldn't CreateSurface() for primary because %s.\n", DXError( ddrval ) );
goto oops;
}
if (DirectDraw_GetPrimaryBitCount() != (unsigned)bits && overlay) {
ddrval = DirectDraw_CreateOverlaySurface (width, height, bits, 0);
if(FAILED(ddrval))
{
- write_log( "set_ddraw: Couldn't CreateOverlaySurface(%d,%d,%d) because %s.\n", width, height, bits, DXError( ddrval ) );
+ write_log ( "set_ddraw: Couldn't CreateOverlaySurface(%d,%d,%d) because %s.\n", width, height, bits, DXError( ddrval ) );
goto oops2;
}
} else {
if (!DirectDraw_DetermineLocking (dxfullscreen))
{
- write_log( "set_ddraw: Couldn't determine locking.\n" );
+ write_log ( "set_ddraw: Couldn't determine locking.\n" );
goto oops;
}
ddrval = DirectDraw_SetClipper (hAmigaWnd);
if (FAILED(ddrval)) {
- write_log( "set_ddraw: Couldn't SetHWnd()\n" );
+ write_log ( "set_ddraw: Couldn't SetHWnd()\n" );
goto oops;
}
ddrval = DirectDraw_CreatePalette (currentmode->pal);
if (FAILED(ddrval))
{
- write_log( "set_ddraw: Couldn't CreatePalette()\n" );
+ write_log ( "set_ddraw: Couldn't CreatePalette()\n" );
goto oops;
}
}
pw = DisplayModes[i].res.width;
idx++;
}
- DisplayModes[i].residx = idx;
+ DisplayModes[i].residx = idx;
}
}
j = 0;
while (DisplayModes[i].refresh[j] > 0) {
if (j > 0)
- write_log(",");
+ write_log (",");
write_log ("%d", DisplayModes[i].refresh[j]);
j++;
}
- write_log(")\n");
+ write_log (")\n");
i++;
}
}
if (guid == 0) {
POINT pt = { 0, 0 };
md->primary = 1;
- lpmi.cbSize = sizeof (lpmi);
+ lpmi.cbSize = sizeof (lpmi);
GetMonitorInfo(MonitorFromPoint(pt, MONITOR_DEFAULTTOPRIMARY), (LPMONITORINFO)&lpmi);
md->rect = lpmi.rcMonitor;
} else {
: *ppixbits == 24 ? RGBMASK_24BIT
: RGBMASK_32BIT);
int pass, i = 0, index = 0;
-
+
for (pass = 0; pass < 2; pass++) {
struct PicassoResolution *dm;
uae_u32 mask = (pass == 0
relock = TRUE;
unlockscr();
}
- DX_Blit (p96_double_buffer_firstx, p96_double_buffer_first,
- p96_double_buffer_firstx, p96_double_buffer_first,
+ DX_Blit (p96_double_buffer_firstx, p96_double_buffer_first,
+ p96_double_buffer_firstx, p96_double_buffer_first,
p96_double_buffer_lastx - p96_double_buffer_firstx + 1,
- p96_double_buffer_last - p96_double_buffer_first + 1,
+ p96_double_buffer_last - p96_double_buffer_first + 1,
BLIT_SRC);
if (relock) {
lockscr();
c |= currprefs.win32_borderless != changed_prefs.win32_borderless ? 1 : 0;
c |= currprefs.win32_no_overlay != changed_prefs.win32_no_overlay ? 2 : 0;
- if (display_change_requested || c)
+ if (display_change_requested || c)
{
cfgfile_configuration_change(1);
if (display_change_requested)
currprefs.win32_borderless = changed_prefs.win32_borderless;
currprefs.win32_no_overlay = changed_prefs.win32_no_overlay;
- inputdevice_unacquire ();
+ inputdevice_unacquire ();
if (c & 2) {
close_windows ();
graphics_init ();
}
- init_custom ();
+ init_custom ();
if (c & 4) {
pause_sound ();
resume_sound ();
}
- inputdevice_acquire ();
+ inputdevice_acquire ();
return 1;
}
closeprinter ();
#endif
}
- if (strcmp (currprefs.sername, changed_prefs.sername) ||
+ if (strcmp (currprefs.sername, changed_prefs.sername) ||
currprefs.serial_hwctsrts != changed_prefs.serial_hwctsrts ||
currprefs.serial_direct != changed_prefs.serial_direct ||
currprefs.serial_demand != changed_prefs.serial_demand) {
if( picasso96_state.RGBFormat != RGBFB_CHUNKY )
return;
- if (picasso_vidinfo.pixbytes != 1)
+ if (picasso_vidinfo.pixbytes != 1)
{
/* write_log ("DX Setpalette emulation\n"); */
/* This is the case when we're emulating a 256 color display. */
- while (count-- > 0)
+ while (count-- > 0)
{
int r = picasso96_state.CLUT[start].Red;
int g = picasso96_state.CLUT[start].Green;
void DX_Invalidate (int x, int y, int width, int height)
{
int last, lastx;
-
+
if (y < 0 || height < 0) {
y = 0;
height = picasso_vidinfo.height;
height = currentmode->current_height;
}
if (DirectDraw_GetLockableType() == secondary_surface) {
- BOOL relock = FALSE;
- if (DirectDraw_IsLocked()) {
+ BOOL relock = FALSE;
+ if (DirectDraw_IsLocked()) {
relock = TRUE;
unlockscr();
}
return result;
#if 0
int r,g,b;
- write_log( "DX_Blit() called to fill with color of 0x%x, rgbtype of 0x%x\n", color, pixelformat );
+ write_log ( "DX_Blit() called to fill with color of 0x%x, rgbtype of 0x%x\n", color, pixelformat );
switch( pixelformat )
{
b = color & 0xFF000000 >> 24;
break;
default:
- write_log( "Uknown 0x%x pixel-format\n", pixelformat );
+ write_log ( "Uknown 0x%x pixel-format\n", pixelformat );
break;
}
result = RGB(r,g,b);
- write_log( "R = 0x%02x, G = 0x%02x, B = 0x%02x - result = 0x%08x\n", r, g, b, result );
+ write_log ( "R = 0x%02x, G = 0x%02x, B = 0x%02x - result = 0x%08x\n", r, g, b, result );
return result;
#endif
}
/* We've colour-filled the visible, but still need to colour-fill the offscreen */
hr = DirectDraw_Blt(secondary_surface, &srcrect, invalid_surface, NULL, DDBLT_WAIT | DDBLT_COLORFILL, &ddbltfx);
if (FAILED(hr)) {
- write_log("DX_Fill2(%dx%d %d%d): %s\n", dstx, dsty, width, height, DXError(hr));
+ write_log ("DX_Fill2(%dx%d %d%d): %s\n", dstx, dsty, width, height, DXError(hr));
result = 0;
}
}
} else {
- write_log("DX_Fill(%dx%d %d%d): %s\n", dstx, dsty, width, height, DXError(hr));
+ write_log ("DX_Fill(%dx%d %d%d): %s\n", dstx, dsty, width, height, DXError(hr));
}
return result;
}
/* Set up our destination rectangle, and adjust for blit to windowed display (if necessary ) */
SetRect(&dstrect, dstx, dsty, dstx + width, dsty + height);
-
+
centerrect(&dstrect);
/* Render our blit within the primary surface */
result = DirectDraw_Blt(primary_surface, &dstrect, DirectDraw_GetLockableType(), &srcrect, DDBLT_WAIT | DDBLT_ROP, &fx);
if (FAILED(result)) {
- write_log("DX_Blit1(%d,%d,%d,%d) failed: %s\n", srcx, srcy, width, height, DXError(result));
+ write_log ("DX_Blit1(%d,%d,%d,%d) failed: %s\n", srcx, srcy, width, height, DXError(result));
return 0;
} else if(DirectDraw_GetLockableType() == secondary_surface) {
/* We've just blitted from the offscreen to the visible, but still need to blit from offscreen to offscreen
SetRect(&dstrect, dstx, dsty, dstx + width, dsty + height);
result = DirectDraw_Blt(secondary_surface, &dstrect, secondary_surface, &srcrect, DDBLT_WAIT | DDBLT_ROP, &fx);
if (FAILED(result)) {
- write_log("DX_Blit2(%d,%d,%d,%d) failed: %s\n", srcx, srcy, width, height, DXError(result));
+ write_log ("DX_Blit2(%d,%d,%d,%d) failed: %s\n", srcx, srcy, width, height, DXError(result));
}
}
}
rc.left = 1;
else
rc.left = stored_x;
-
+
if (stored_y > GetSystemMetrics (SM_CYVIRTUALSCREEN))
rc.top = 1;
else
currentmode->native_depth = 0;
tmp_depth = currentmode->current_depth;
- write_log("W=%d H=%d B=%d CT=%d\n",
+ write_log ("W=%d H=%d B=%d CT=%d\n",
DirectDraw_CurrentWidth (), DirectDraw_CurrentHeight (), DirectDraw_GetSurfaceBitCount (), colortype);
if (currentmode->current_depth < 15 && (currprefs.chipset_mask & CSMASK_AGA) && isfullscreen () > 0 && !WIN32GFX_IsPicassoScreen()) {
modefallback (DM_OVERLAY);
updatemodes ();
}
-
+
if (colortype == RGBFB_NONE) {
fs_warning = IDS_UNSUPPORTEDSCREENMODE_1;
} else if (colortype == RGBFB_CLUT && DirectDraw_GetSurfaceBitCount() != 8) {
flags = DirectDraw_GetPixelFormatFlags();
DirectDraw_SurfaceUnlock();
if (flags & (DDPF_RGB | DDPF_PALETTEINDEXED8 | DDPF_RGBTOYUV)) {
- write_log("%s mode (bits: %d, pixbytes: %d)\n", currentmode->flags & DM_DX_FULLSCREEN ? "Full screen" : "Window",
+ write_log ("%s mode (bits: %d, pixbytes: %d)\n", currentmode->flags & DM_DX_FULLSCREEN ? "Full screen" : "Window",
DirectDraw_GetSurfaceBitCount(), currentmode->current_depth >> 3);
} else {
char szMessage[MAX_DPATH];
// we create a single-line drag image, then
// append it to the bottom of the complete drag image
hOneImageList = ListView_CreateDragImage(hListView, iPos, &p);
- hTempImageList = ImageList_Merge(hDragImageList,
+ hTempImageList = ImageList_Merge(hDragImageList,
0, hOneImageList, 0, 0, iHeight);
ImageList_Destroy(hDragImageList);
ImageList_Destroy(hOneImageList);
(*draggeditems)[cnt++] = iPos;
iPos = ListView_GetNextItem(hListView, iPos, LVNI_SELECTED);
}
- (*draggeditems)[cnt] = -1;
+ (*draggeditems)[cnt] = -1;
return lvhti.iItem;
}
static int drag_move (HWND hWnd, LPARAM lParam)
strcpy (tmp, path);
rd = scan_arcadia_rom (tmp, 0);
if (rd)
- return rd;
+ return rd;
rd = getromdatabypath(path);
if (rd && rd->crc32 == 0xffffffff)
return rd;
sprintf(tmp2, ":ROM%03d", rd->id);
}
if (RegSetValueEx (fkey, tmp1, 0, REG_SZ, (CONST BYTE *)tmp2, strlen (tmp2) + 1) != ERROR_SUCCESS)
- return 0;
+ return 0;
return 1;
}
ext++;
if (!stricmp (ext, "rom") || !stricmp (ext, "adf") || !stricmp (ext, "key")
- || !stricmp (ext, "a500") || !stricmp (ext, "a1200") || !stricmp (ext, "a4000"))
+ || !stricmp (ext, "a500") || !stricmp (ext, "a1200") || !stricmp (ext, "a4000"))
return 1;
for (i = 0; uae_archive_extensions[i]; i++) {
if (!stricmp (ext, uae_archive_extensions[i]))
static int listrom (int *roms)
{
int i;
-
+
i = 0;
while (roms[i] >= 0) {
struct romdata *rd = getromdatabyid (roms[i]);
strcat (avail, "\n");
strcat (unavail, "\n");
p1 = "A500 Boot ROM 1.2\0A500 Boot ROM 1.3\0A500+\0A600\0A1000\0A1200\0A3000\0A4000\0\nCD32\0CDTV\0Arcadia Multi Select\0High end WinUAE\0\nA590/A2091 SCSI Boot ROM\0\0";
-
+
p = malloc (100000);
if (!p)
return;
strcat (p, p1); strcat (p, ": ");
if (listrom (rp))
ok = 1;
- while(*rp++ != -1);
- if (*rp != -1) {
+ while(*rp++ != -1);
+ if (*rp != -1) {
if (ok) {
ok = 0;
if (listrom (rp))
}
while(*rp++ != -1);
}
- rp++;
+ rp++;
if (ok)
strcat (p, avail); else strcat (p, unavail);
p1 = p2;
WIN32_FIND_DATA find_data;
HANDLE handle;
int ret;
-
+
if (!pathp)
return 0;
GetFullPathName(pathp, MAX_DPATH, path, NULL);
ret = 0;
handle = FindFirstFile (buf, &find_data);
if (handle == INVALID_HANDLE_VALUE)
- return 0;
+ return 0;
for (;;) {
- char tmppath[MAX_DPATH];
- strcpy (tmppath, path);
- strcat (tmppath, find_data.cFileName);
- if (!(find_data.dwFileAttributes & (FILE_ATTRIBUTE_DIRECTORY |FILE_ATTRIBUTE_SYSTEM)) && find_data.nFileSizeLow < 10000000) {
+ char tmppath[MAX_DPATH];
+ strcpy (tmppath, path);
+ strcat (tmppath, find_data.cFileName);
+ if (!(find_data.dwFileAttributes & (FILE_ATTRIBUTE_DIRECTORY |FILE_ATTRIBUTE_SYSTEM)) && find_data.nFileSizeLow < 10000000) {
if (scan_rom (tmppath, fkey))
- ret = 1;
+ ret = 1;
}
if (FindNextFile (handle, &find_data) == 0) {
FindClose (handle);
for (;;) {
keys = get_keyring();
fetch_path("KickstartPath", path, sizeof path);
- scan_roms_3 (fkey, paths, 0, path);
+ scan_roms_3 (fkey, paths, 0, path);
for(i = 0; ;i++) {
ret = get_rom_path(path, i);
if (ret < 0)
xfree(paths[i]);
RegCreateKeyEx(hWinUAEKey , "DetectedROMs", 0, NULL, REG_OPTION_NON_VOLATILE,
- KEY_READ | KEY_WRITE, NULL, &fkey, NULL);
+ KEY_READ | KEY_WRITE, NULL, &fkey, NULL);
if (fkey) {
- id = 1;
- for (;;) {
+ id = 1;
+ for (;;) {
struct romdata *rd = getromdatabyid(id);
if (!rd)
- break;
+ break;
if (rd->crc32 == 0xffffffff)
- addrom(fkey, rd, NULL);
+ addrom(fkey, rd, NULL);
id++;
}
RegCloseKey(fkey);
DWORD ct, ct2, size;
char tmp1[MAX_DPATH], tmp2[MAX_DPATH];
char fname[MAX_DPATH];
-
+
strcpy (fname, filename);
if (!zfile_exists (fname)) {
fetch_configurationpath (fname, sizeof (fname));
buf[0] = 0;
bi.hwndOwner = hDlg;
- bi.pidlRoot = NULL;
+ bi.pidlRoot = NULL;
bi.pszDisplayName = buf;
- bi.lpszTitle = "Select folder";
- bi.ulFlags = 0;
- bi.lpfn = NULL;
- bi.lParam = 0;
-
- // Browse for a folder and return its PIDL.
- pidlBrowse = SHBrowseForFolder(&bi);
- if (pidlBrowse != NULL) {
+ bi.lpszTitle = "Select folder";
+ bi.ulFlags = 0;
+ bi.lpfn = NULL;
+ bi.lParam = 0;
+
+ // Browse for a folder and return its PIDL.
+ pidlBrowse = SHBrowseForFolder(&bi);
+ if (pidlBrowse != NULL) {
if (SHGetPathFromIDList(pidlBrowse, buf)) {
strcpy (path, buf);
return 1;
char szTitle[MAX_DPATH] = { 0 };
char szFormat[MAX_DPATH];
char szFilter[MAX_DPATH] = { 0 };
-
+
memset (&openFileName, 0, sizeof (OPENFILENAME));
-
+
strncpy (init_path, start_path_data, MAX_DPATH);
switch (flag)
{
case 16:
fetch_path ("InputPath", init_path, sizeof (init_path));
break;
-
+
}
openFileName.lStructSize = os_winnt ? sizeof (OPENFILENAME) : OPENFILENAME_SIZE_VERSION_400;
openFileName.hwndOwner = hDlg;
openFileName.hInstance = hInst;
-
+
switch (flag) {
case 0:
WIN32GUI_LoadUIString(IDS_SELECTADF, szTitle, MAX_DPATH);
sprintf (full_path, "%s\\%s", full_path2, nextp);
nextp += strlen (nextp) + 1;
}
- switch (wParam)
+ switch (wParam)
{
case IDC_PATH_NAME:
case IDC_PATH_FILESYS:
/* 8 */ 0x02000000, /* 32-meg */
/* 9 */ 0x04000000, /* 64-meg */
/* 10*/ 0x08000000, //128 Meg
-/* 11*/ 0x10000000, //256 Meg
+/* 11*/ 0x10000000, //256 Meg
/* 12*/ 0x20000000, //512 Meg The correct size is set in mman.c
/* 13*/ 0x40000000, //1GB
/* 14*/ 0x00180000, //1.5MB
int level = 0, i;
char path[MAX_DPATH], name[MAX_DPATH];
struct ConfigStruct *cs;
-
+
if (oldconfig) {
strcpy (path, oldconfig->Path);
strcpy (name, oldconfig->Name);
DiskSelection(hDlg, IDC_LOAD, 4, &workprefs, 0);
EnableWindow(GetDlgItem (hDlg, IDC_VIEWINFO), workprefs.info[0]);
break;
-
+
case CONFIG_SAVE:
if (strlen (name) == 0 || strcmp (name, ".uae") == 0) {
char szMessage[MAX_DPATH];
cfgfile_save (&workprefs, path, configtypepanel);
}
break;
-
+
case CONFIG_LOAD:
if (strlen (name) == 0) {
char szMessage[MAX_DPATH];
static INT_PTR CALLBACK InfoSettingsProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
static int recursive = 0;
-
- switch (msg)
+
+ switch (msg)
{
case WM_INITDIALOG:
recursive++;
SetDlgItemText (hDlg, IDC_PATH_NAME, workprefs.info);
recursive--;
return TRUE;
-
+
case WM_COMMAND:
if (recursive)
break;
recursive++;
-
- switch(wParam)
+
+ switch(wParam)
{
case IDC_SELECTOR:
DiskSelection (hDlg, IDC_PATH_NAME, 8, &workprefs, 0);
EndDialog (hDlg, 0);
break;
}
-
+
GetDlgItemText(hDlg, IDC_PATH_NAME, workprefs.info, sizeof workprefs.info);
recursive--;
break;
case WM_USER:
break;
-
+
case WM_COMMAND:
{
recursive++;
break;
}
}
-
+
return FALSE;
}
char *url;
} urlinfo;
-static urlinfo urls[] =
+static urlinfo urls[] =
{
{IDC_CLOANTOHOME, FALSE, "Cloanto's Amiga Forever", "http://www.amigaforever.com/"},
{IDC_AMIGAHOME, FALSE, "Amiga Inc.", "http://www.amiga.com"},
- {IDC_PICASSOHOME, FALSE, "Picasso96 Home Page", "http://www.picasso96.cogito.de/"},
+ {IDC_PICASSOHOME, FALSE, "Picasso96 Home Page", "http://www.picasso96.cogito.de/"},
{IDC_UAEHOME, FALSE, "UAE Home Page", "http://uae.coresystems.de/"},
{IDC_WINUAEHOME, FALSE, "WinUAE Home Page", "http://www.winuae.net/"},
{IDC_AIABHOME, FALSE, "AIAB", "http://www.amigainabox.co.uk/"},
POINT point;
point.x = LOWORD (lParam);
point.y = HIWORD (lParam);
-
- for (i = 0; urls[i].id >= 0; i++)
+
+ for (i = 0; urls[i].id >= 0; i++)
{
RECT rect;
GetWindowRect(GetDlgItem(hDlg, urls[i].id), &rect);
ScreenToClient(hDlg, (POINT*)&rect);
ScreenToClient(hDlg, (POINT*)&rect.right);
- if(PtInRect(&rect, point))
+ if(PtInRect(&rect, point))
{
if(msg == WM_LBUTTONDOWN)
{
currentpage = PATHS_ID;
ShowWindow (GetDlgItem (hDlg, IDC_RESETREGISTRY), FALSE);
numtypes = 0;
- SendDlgItemMessage (hDlg, IDC_PATHS_DEFAULTTYPE, CB_RESETCONTENT, 0, 0L);
+ SendDlgItemMessage (hDlg, IDC_PATHS_DEFAULTTYPE, CB_RESETCONTENT, 0, 0L);
if (af_path_2005 & 1) {
WIN32GUI_LoadUIString(IDS_DEFAULT_AF2005, tmp, sizeof tmp);
SendDlgItemMessage (hDlg, IDC_PATHS_DEFAULTTYPE, CB_ADDSTRING, 0, (LPARAM)tmp);
selpath = numtypes;
ptypes[numtypes++] = PATH_TYPE_OLDAF;
}
- WIN32GUI_LoadUIString(IDS_DEFAULT_WINUAE, tmp, sizeof tmp);
- SendDlgItemMessage (hDlg, IDC_PATHS_DEFAULTTYPE, CB_ADDSTRING, 0, (LPARAM)tmp);
- if (path_type == 0)
+ WIN32GUI_LoadUIString(IDS_DEFAULT_WINUAE, tmp, sizeof tmp);
+ SendDlgItemMessage (hDlg, IDC_PATHS_DEFAULTTYPE, CB_ADDSTRING, 0, (LPARAM)tmp);
+ if (path_type == 0)
selpath = numtypes;
ptypes[numtypes++] = 0;
- SendDlgItemMessage (hDlg, IDC_PATHS_DEFAULTTYPE, CB_SETCURSEL, selpath, 0);
+ SendDlgItemMessage (hDlg, IDC_PATHS_DEFAULTTYPE, CB_SETCURSEL, selpath, 0);
EnableWindow(GetDlgItem (hDlg, IDC_PATHS_DEFAULTTYPE), numtypes > 0 ? TRUE : FALSE);
values_to_pathsdialog (hDlg);
recursive--;
case IDC_PATHS_ROMS:
fetch_path ("KickstartPath", tmp, sizeof (tmp));
if (DirectorySelection (hDlg, 0, tmp)) {
- load_keyring(&workprefs, NULL);
+ load_keyring(&workprefs, NULL);
set_path ("KickstartPath", tmp);
- if (!scan_roms ())
+ if (!scan_roms ())
gui_message_id (IDS_ROMSCANNOROMS);
values_to_pathsdialog (hDlg);
}
GetWindowText (GetDlgItem (hDlg, IDC_PATHS_AVIOUTPUT), tmp, sizeof (tmp));
set_path ("VideoPath", tmp);
break;
- case IDC_PATHS_DEFAULT:
+ case IDC_PATHS_DEFAULT:
val = SendDlgItemMessage (hDlg, IDC_PATHS_DEFAULTTYPE, CB_GETCURSEL, 0, 0L);
if (val != CB_ERR && val >= 0 && val < numtypes) {
val = ptypes[val];
{
ew (guiDlg, IDC_RESETAMIGA, FALSE);
workprefs.nr_floppies = quickstart_floppy;
- quickstart_ok = build_in_prefs (&workprefs, quickstart_model, quickstart_conf, quickstart_compa, romcheck);
+ quickstart_ok = built_in_prefs (&workprefs, quickstart_model, quickstart_conf, quickstart_compa, romcheck);
enable_for_quickstart (hDlg);
addfloppytype (hDlg, 0);
addfloppytype (hDlg, 1);
if (quickstart_conf >= i)
quickstart_conf = 0;
SendDlgItemMessage (hDlg, IDC_QUICKSTART_CONFIGURATION, CB_SETCURSEL, quickstart_conf, 0);
-
+
if (quickstart_compa >= amodels[quickstart_model].compalevels)
quickstart_compa = 1;
if (quickstart_compa >= amodels[quickstart_model].compalevels)
currentpage = ABOUT_ID;
init_aboutdlg (hDlg);
break;
-
+
case WM_COMMAND:
- if (wParam == IDC_CONTRIBUTORS)
+ if (wParam == IDC_CONTRIBUTORS)
DisplayContributors (hDlg);
break;
case WM_SETCURSOR:
url_handler( hDlg, msg, wParam, lParam );
break;
}
-
+
return FALSE;
}
int i, j, freq, tmp;
char hz[20], hz2[20], txt[100];
LRESULT index;
-
+
i = 0; index = 0;
while ((freq = DisplayModes[dmode].refresh[i]) > 0 && index < MAX_REFRESH_RATES) {
storedrefreshrates[index++] = freq;
if (p96)
return fs * 2 + vsync;
if (fs == 2)
- return 3;
+ return 3;
if (!vsync)
return fs;
if (fs == 1 && vsync)
workprefs.gfx_xcenter = (IsDlgButtonChecked (hDlg, IDC_XCENTER) ? 2 : 0 ); /* Smart centering */
workprefs.gfx_ycenter = (IsDlgButtonChecked (hDlg, IDC_YCENTER) ? 2 : 0 ); /* Smart centering */
- if (msg == WM_COMMAND && HIWORD (wParam) == CBN_SELCHANGE)
+ if (msg == WM_COMMAND && HIWORD (wParam) == CBN_SELCHANGE)
{
if (LOWORD (wParam) == IDC_DISPLAYSELECT) {
posn = SendDlgItemMessage (hDlg, IDC_DISPLAYSELECT, CB_GETCURSEL, 0, 0);
{
static int recursive = 0;
- switch (msg)
+ switch (msg)
{
case WM_INITDIALOG:
pages[DISPLAY_ID] = hDlg;
init_da(hDlg);
update_da();
}
- handle_da (hDlg);
- values_from_displaydlg (hDlg, msg, wParam, lParam);
- enable_for_displaydlg (hDlg);
+ handle_da (hDlg);
+ values_from_displaydlg (hDlg, msg, wParam, lParam);
+ enable_for_displaydlg (hDlg);
recursive--;
break;
else if (workprefs.produce_sound >= 2)
workprefs.produce_sound = 2;
}
- n = SendDlgItemMessage (hDlg, IDC_CS_EXT, CB_GETCURSEL, 0, 0);
+ n = SendDlgItemMessage (hDlg, IDC_CS_EXT, CB_GETCURSEL, 0, 0);
if (n != CB_ERR) {
workprefs.cs_compatible = n;
- build_in_chipset_prefs (&workprefs);
+ built_in_chipset_prefs (&workprefs);
}
}
txt[0] = 0;
if (workprefs.cs_agnusrev >= 0) {
rev = workprefs.cs_agnusrev;
- sprintf (txt, "%02.2X", rev);
+ sprintf (txt, "%02.2X", rev);
} else if (workprefs.cs_compatible) {
rev = 0;
if (workprefs.ntscmode)
txt[0] = 0;
if (workprefs.cs_deniserev >= 0) {
rev = workprefs.cs_deniserev;
- sprintf (txt, "%01.1X", rev);
+ sprintf (txt, "%01.1X", rev);
} else if (workprefs.cs_compatible) {
rev = 0xf;
if (workprefs.chipset_mask & CSMASK_ECS_DENISE)
rev = 0xc;
if (workprefs.chipset_mask & CSMASK_AGA)
rev = 0x8;
- sprintf (txt, "%01.1X", rev);
+ sprintf (txt, "%01.1X", rev);
}
SetDlgItemText(hDlg, IDC_CS_DENISEREV, txt);
}
workprefs.cs_a4091 = IsDlgButtonChecked (hDlg, IDC_CS_A4091) ? 1 : 0;
#if 0
if (msg == WM_COMMAND && LOWORD(wParam) == IDC_CS_SCSIMODE)
- workprefs.scsi = IsDlgButtonChecked (hDlg, IDC_CS_SCSIMODE) ? 2 : 0;
+ workprefs.scsi = IsDlgButtonChecked (hDlg, IDC_CS_SCSIMODE) ? 2 : 0;
#endif
workprefs.cs_cdtvscsi = IsDlgButtonChecked (hDlg, IDC_CS_CDTVSCSI) ? 1 : 0;
workprefs.cs_pcmcia = IsDlgButtonChecked (hDlg, IDC_CS_PCMCIA) ? 1 : 0;
getromfile (hDlg, IDC_ROMFILE, workprefs.romfile, sizeof (workprefs.romfile));
getromfile (hDlg, IDC_ROMFILE2, workprefs.romextfile, sizeof (workprefs.romextfile));
getromfile (hDlg, IDC_CARTFILE, workprefs.cartfile, sizeof (workprefs.cartfile));
- ew (hDlg, IDC_HRTMON, workprefs.cartfile[0] ? FALSE : TRUE);
- //CheckDlgButton(hDlg, IDC_HRTMON, workprefs.cart_internal == 1 ? TRUE : FALSE);
}
static void values_to_kickstartdlg (HWND hDlg)
scan_roms ();
if (fkey)
RegCloseKey (fkey);
- ew (hDlg, IDC_HRTMON, full_property_sheet);
-
}
static INT_PTR CALLBACK KickstartDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
static int recursive;
char tmp[MAX_DPATH];
- switch( msg )
+ switch( msg )
{
case WM_INITDIALOG:
pages[KICKSTART_ID] = hDlg;
DiskSelection(hDlg, IDC_ROMFILE2, 6, &workprefs, 0);
values_to_kickstartdlg (hDlg);
break;
-
+
case IDC_FLASHCHOOSER:
DiskSelection(hDlg, IDC_FLASHFILE, 11, &workprefs, 0);
values_to_kickstartdlg (hDlg);
workprefs.cart_internal = IsDlgButtonChecked(hDlg, IDC_HRTMON) ? 1 : 0;
ew (hDlg, IDC_CARTFILE, workprefs.cart_internal == 1 ? FALSE : TRUE);
break;
-#endif
+#endif
}
recursive--;
break;
if (hWinUAEKey) {
DWORD regkeytype;
DWORD regkeysize = sizeof(langid);
- RegQueryValueEx (hWinUAEKey, "Language", 0, ®keytype, (LPBYTE)&langid, ®keysize);
+ RegQueryValueEx (hWinUAEKey, "Language", 0, ®keytype, (LPBYTE)&langid, ®keysize);
}
SendDlgItemMessage (hDlg, IDC_LANGUAGE, CB_RESETCONTENT, 0, 0);
SendDlgItemMessage (hDlg, IDC_LANGUAGE, CB_ADDSTRING, 0, (LPARAM)"Autodetect");
SendDlgItemMessage (hDlg, IDC_STATE_RATE, CB_ADDSTRING, 0, (LPARAM)"20");
SendDlgItemMessage (hDlg, IDC_STATE_RATE, CB_ADDSTRING, 0, (LPARAM)"30");
sprintf (txt, "%d", workprefs.statecapturerate / 50);
- SendDlgItemMessage( hDlg, IDC_STATE_RATE, WM_SETTEXT, 0, (LPARAM)txt);
+ SendDlgItemMessage( hDlg, IDC_STATE_RATE, WM_SETTEXT, 0, (LPARAM)txt);
SendDlgItemMessage (hDlg, IDC_STATE_BUFFERSIZE, CB_RESETCONTENT, 0, 0);
SendDlgItemMessage (hDlg, IDC_STATE_BUFFERSIZE, CB_ADDSTRING, 0, (LPARAM)"5");
SendDlgItemMessage (hDlg, IDC_STATE_BUFFERSIZE, CB_ADDSTRING, 0, (LPARAM)"50");
SendDlgItemMessage (hDlg, IDC_STATE_BUFFERSIZE, CB_ADDSTRING, 0, (LPARAM)"100");
sprintf (txt, "%d", workprefs.statecapturebuffersize / (1024 * 1024));
- SendDlgItemMessage( hDlg, IDC_STATE_BUFFERSIZE, WM_SETTEXT, 0, (LPARAM)txt);
+ SendDlgItemMessage( hDlg, IDC_STATE_BUFFERSIZE, WM_SETTEXT, 0, (LPARAM)txt);
misc_scsi(hDlg);
misc_lang(hDlg);
char txt[100];
int v;
static int recursive;
-
+
if (recursive)
return FALSE;
recursive++;
- switch (msg)
+ switch (msg)
{
case WM_USER:
switch(wParam)
{
case IDC_DOSAVESTATE:
- if (DiskSelection(hDlg, wParam, 9, &workprefs, 0))
+ if (DiskSelection(hDlg, wParam, 9, &workprefs, 0))
save_state (savestate_fname, "Description!");
break;
case IDC_DOLOADSTATE:
{
int newcpu, newfpu, newtrust, oldcache, jitena;
static int cachesize_prev, comptrust_prev, compforce_prev;
-
+
workprefs.cpu_compatible = workprefs.cpu_cycle_exact | (IsDlgButtonChecked (hDlg, IDC_COMPATIBLE) ? 1 : 0);
workprefs.fpu_strict = IsDlgButtonChecked (hDlg, IDC_COMPATIBLE_FPU) ? 1 : 0;
workprefs.address_space_24 = IsDlgButtonChecked (hDlg, IDC_COMPATIBLE24) ? 1 : 0;
workprefs.m68k_speed = IsDlgButtonChecked (hDlg, IDC_CS_HOST) ? -1
: IsDlgButtonChecked (hDlg, IDC_CS_68000) ? 0
: SendMessage (GetDlgItem (hDlg, IDC_SPEED), TBM_GETPOS, 0, 0) * CYCLE_UNIT;
-
+
newcpu = IsDlgButtonChecked (hDlg, IDC_CPU0) ? 68000
: IsDlgButtonChecked (hDlg, IDC_CPU1) ? 68010
: IsDlgButtonChecked (hDlg, IDC_CPU2) ? 68020
jitena = IsDlgButtonChecked (hDlg, IDC_JITENABLE) ? 1 : 0;
workprefs.cachesize = SendMessage(GetDlgItem(hDlg, IDC_CACHE), TBM_GETPOS, 0, 0) * 1024;
if (!jitena) {
- cachesize_prev = workprefs.cachesize;
+ cachesize_prev = workprefs.cachesize;
comptrust_prev = workprefs.comptrustbyte;
compforce_prev = workprefs.compforcesettings;
workprefs.cachesize = 0;
}
SendDlgItemMessage (hDlg, IDC_SOUNDSTEREOMIX, CB_SETCURSEL,
workprefs.sound_mixed_stereo_delay > 0 ? workprefs.sound_mixed_stereo_delay : 0, 0);
-
+
SendDlgItemMessage(hDlg, IDC_SOUNDINTERPOLATION, CB_RESETCONTENT, 0, 0);
WIN32GUI_LoadUIString (IDS_SOUND_INTERPOL_DISABLED, txt, sizeof (txt));
SendDlgItemMessage(hDlg, IDC_SOUNDINTERPOLATION, CB_ADDSTRING, 0, (LPARAM)txt);
i++;
}
sprintf (txt, "%d", workprefs.sound_freq);
- SendDlgItemMessage(hDlg, IDC_SOUNDFREQ, WM_SETTEXT, 0, (LPARAM)txt);
+ SendDlgItemMessage(hDlg, IDC_SOUNDFREQ, WM_SETTEXT, 0, (LPARAM)txt);
switch (workprefs.produce_sound) {
case 0: which_button = IDC_SOUND0; break;
switch (msg) {
case WM_INITDIALOG:
{
- if (archivehd < 0) {
- if (my_existsfile(current_fsvdlg.rootdir))
- archivehd = 1;
- else if (my_existsdir(current_fsvdlg.rootdir))
- archivehd = 0;
- }
+ archivehd = -1;
+ if (my_existsfile(current_fsvdlg.rootdir))
+ archivehd = 1;
+ else if (my_existsdir(current_fsvdlg.rootdir))
+ archivehd = 0;
recursive++;
SetDlgItemText (hDlg, IDC_VOLUME_NAME, current_fsvdlg.volume);
SetDlgItemText (hDlg, IDC_VOLUME_DEVICE, current_fsvdlg.device);
if (HIWORD (wParam) == BN_CLICKED) {
switch (LOWORD (wParam))
{
- case IDC_SELECTOR:
- {
+ case IDC_FS_SELECT_EJECT:
+ SetDlgItemText (hDlg, IDC_PATH_NAME, "");
+ SetDlgItemText (hDlg, IDC_VOLUME_NAME, "");
+ CheckDlgButton (hDlg, IDC_RW, FALSE);
+ ew (hDlg, IDC_RW, FALSE);
+ archivehd = -1;
+ break;
+ case IDC_FS_SELECT_FILE:
strcpy (directory_path, current_fsvdlg.rootdir);
- if (archivehd) {
- if (DiskSelection(hDlg, 0, 14, &workprefs, directory_path))
- SetDlgItemText (hDlg, IDC_PATH_NAME, directory_path);
- } else {
- WIN32GUI_LoadUIString(IDS_SELECTFILESYSROOT, szTitle, MAX_DPATH);
- browse_info.hwndOwner = hDlg;
- browse_info.pidlRoot = NULL;
- browse_info.pszDisplayName = directory_path;
- browse_info.lpszTitle = "";
- browse_info.ulFlags = BIF_DONTGOBELOWDOMAIN | BIF_RETURNONLYFSDIRS;
- browse_info.lpfn = NULL;
- browse_info.iImage = 0;
- if ((browse = SHBrowseForFolder (&browse_info)) != NULL) {
- SHGetPathFromIDList (browse, directory_path);
- SetDlgItemText (hDlg, IDC_PATH_NAME, directory_path);
- }
+ if (DiskSelection(hDlg, 0, 14, &workprefs, directory_path)) {
+ char *s = filesys_createvolname (NULL, directory_path, "Harddrive");
+ SetDlgItemText (hDlg, IDC_PATH_NAME, directory_path);
+ SetDlgItemText (hDlg, IDC_VOLUME_NAME, s);
+ xfree (s);
+ CheckDlgButton (hDlg, IDC_RW, FALSE);
+ ew (hDlg, IDC_RW, FALSE);
+ archivehd = 1;
}
- }
break;
- case IDOK:
- {
-#if 0
- if(!my_existsfile(current_fsvdlg.rootdir) && !my_existsdir(current_fsvdlg.rootdir)) {
- char szMessage[MAX_DPATH];
- char szTitle[MAX_DPATH];
- WIN32GUI_LoadUIString(IDS_MUSTSELECTPATH, szMessage, MAX_DPATH);
- WIN32GUI_LoadUIString(IDS_SETTINGSERROR, szTitle, MAX_DPATH);
- MessageBox(hDlg, szMessage, szTitle,
- MB_OK | MB_ICONERROR | MB_APPLMODAL | MB_SETFOREGROUND);
- break;
+ case IDC_FS_SELECT_DIR:
+ strcpy (directory_path, current_fsvdlg.rootdir);
+ WIN32GUI_LoadUIString(IDS_SELECTFILESYSROOT, szTitle, MAX_DPATH);
+ browse_info.hwndOwner = hDlg;
+ browse_info.pidlRoot = NULL;
+ browse_info.pszDisplayName = directory_path;
+ browse_info.lpszTitle = "";
+ browse_info.ulFlags = BIF_DONTGOBELOWDOMAIN | BIF_RETURNONLYFSDIRS;
+ browse_info.lpfn = NULL;
+ browse_info.iImage = 0;
+ if ((browse = SHBrowseForFolder (&browse_info)) != NULL) {
+ SHGetPathFromIDList (browse, directory_path);
+ SetDlgItemText (hDlg, IDC_PATH_NAME, directory_path);
+ ew (hDlg, IDC_RW, TRUE);
+ archivehd = 0;
}
-#endif
+ break;
+ case IDOK:
EndDialog (hDlg, 1);
- }
break;
case IDCANCEL:
EndDialog (hDlg, 0);
DiskSelection (hDlg, IDC_PATH_FILESYS, 12, &workprefs, 0);
break;
case IDOK:
- if(strlen(current_hfdlg.filename) == 0 )
+ if(strlen(current_hfdlg.filename) == 0 )
{
char szMessage[MAX_DPATH];
char szTitle[MAX_DPATH];
case IDCANCEL:
EndDialog (hDlg, 0);
break;
- case IDC_HARDDRIVE_IMAGE:
+ case IDC_HARDDRIVE_IMAGE:
if (posn != CB_ERR)
harddrive_to_hdf(hDlg, &workprefs, posn);
break;
}
current_hfdlg.rw = !uci->readonly;
current_hfdlg.bootpri = uci->bootpri;
- if (CustomDialogBox(IDD_HARDFILE, hDlg, HardfileSettingsProc))
+ if (CustomDialogBox(IDD_HARDFILE, hDlg, HardfileSettingsProc))
{
int result = add_filesys_config (&workprefs, entry, current_hfdlg.devicename, 0, current_hfdlg.filename,
! current_hfdlg.rw, current_hfdlg.sectors, current_hfdlg.surfaces,
current_hfdlg.rw = !uci->readonly;
strncpy (current_hfdlg.filename, uci->rootdir, (sizeof current_hfdlg.filename) - 1);
current_hfdlg.filename[(sizeof current_hfdlg.filename) - 1] = '\0';
- if (CustomDialogBox(IDD_HARDDRIVE, hDlg, HarddriveSettingsProc))
+ if (CustomDialogBox(IDD_HARDDRIVE, hDlg, HarddriveSettingsProc))
{
int result = add_filesys_config (&workprefs, entry, 0, 0, current_hfdlg.filename,
! current_hfdlg.rw, 0, 0,
archivehd = -1;
if (CustomDialogBox(IDD_FILESYS, hDlg, VolumeSettingsProc)) {
int result = add_filesys_config (&workprefs, entry, current_fsvdlg.device, current_fsvdlg.volume,
- current_fsvdlg.rootdir, ! current_fsvdlg.rw, 0, 0, 0, 0, current_fsvdlg.bootpri, 0, 0, 0);
+ current_fsvdlg.rootdir, !current_fsvdlg.rw, 0, 0, 0, 0, current_fsvdlg.bootpri, 0, 0, 0);
+ filesys_insert (entry, current_fsvdlg.volume, current_fsvdlg.rootdir, !current_fsvdlg.rw, 0);
}
}
}
pages[HARDDISK_ID] = hDlg;
currentpage = HARDDISK_ID;
EnableWindow (GetDlgItem(hDlg, IDC_NEW_HD), os_winnt && os_winnt_admin > 1 ? TRUE : FALSE);
-
+
case WM_USER:
CheckDlgButton (hDlg, IDC_MAPDRIVES, workprefs.win32_automount_drives);
CheckDlgButton (hDlg, IDC_MAPDRIVES_NET, workprefs.win32_automount_netdrives);
break;
}
break;
-
+
case WM_NOTIFY:
if (((LPNMHDR) lParam)->idFrom == IDC_VOLUMELIST)
harddiskdlg_volume_notify (hDlg, (NM_LISTVIEW *) lParam);
default:
return FALSE;
}
-
+
return FALSE;
}
TOOLINFO ti;
int id;
char tmp[100];
-
+
if (currentpage == QUICKSTART_ID)
id = floppybuttonsq[num][0];
else
return;
sprintf (tmp, "CRC=%08.8X", crc32);
ti.lpszText = tmp;
- SendMessage (ToolTipHWND, TTM_ADDTOOL, 0, (LPARAM) (LPTOOLINFO) &ti);
+ SendMessage (ToolTipHWND, TTM_ADDTOOL, 0, (LPARAM) (LPTOOLINFO) &ti);
}
static void addfloppyhistory_2 (HWND hDlg, HKEY fkey, int n, int f_text)
break;
i++;
strcpy (tmppath, s);
- p = tmppath + strlen(tmppath) - 1;
+ p = tmppath + strlen(tmppath) - 1;
for (j = 0; uae_archive_extensions[j]; j++) {
p2 = strstr (tmppath, uae_archive_extensions[j]);
if (p2) {
break;
}
}
- while (p > tmppath) {
+ while (p > tmppath) {
if (*p == '\\' || *p == '/')
- break;
+ break;
p--;
}
strcpy (tmpname, p + 1);
{
int f_type = floppybuttons[n][3];
LRESULT val = SendDlgItemMessage (hDlg, f_type, CB_GETCURSEL, 0, 0L);
-
+
if (val != CB_ERR && workprefs.dfxtype[n] != val - 1) {
workprefs.dfxtype[n] = (int)val - 1;
addfloppytype (hDlg, n);
p1 = strstr(tmp, " { ");
p2 = strstr(tmp, " }");
if (p1 && p2 && p2 > p1) {
- *p1 = 0;
- memset (out, 0, maxlen);
- memcpy (out, p1 + 3, p2 - p1 - 3);
- strcat (out, tmp);
+ *p1 = 0;
+ memset (out, 0, maxlen);
+ memcpy (out, p1 + 3, p2 - p1 - 3);
+ strcat (out, tmp);
}
xfree (tmp);
i = 0;
static void addallfloppies (HWND hDlg)
{
int i;
-
+
for (i = 0; i < 4; i++)
addfloppytype (hDlg, i);
addfloppyhistory (hDlg);
int i;
static char diskname[40] = { "empty" };
- switch (msg)
+ switch (msg)
{
case WM_INITDIALOG:
{
addallfloppies (hDlg);
recursive--;
break;
-
+
case WM_COMMAND:
if (recursive > 0)
break;
case IDC_DF0TEXTQ:
getfloppyname (hDlg, 0);
addfloppytype (hDlg, 0);
- addfloppyhistory (hDlg);
+ addfloppyhistory (hDlg);
break;
case IDC_DF1TEXT:
case IDC_DF1TEXTQ:
getfloppyname (hDlg, 1);
addfloppytype (hDlg, 1);
- addfloppyhistory (hDlg);
+ addfloppyhistory (hDlg);
break;
case IDC_DF2TEXT:
getfloppyname (hDlg, 2);
addfloppytype (hDlg, 2);
- addfloppyhistory (hDlg);
+ addfloppyhistory (hDlg);
break;
case IDC_DF3TEXT:
getfloppyname (hDlg, 3);
addfloppytype (hDlg, 3);
- addfloppyhistory (hDlg);
+ addfloppyhistory (hDlg);
break;
case IDC_DF0TYPE:
getfloppytype (hDlg, 0);
case IDC_DF1ENABLE:
case IDC_DF1QENABLE:
getfloppytypeq (hDlg, 1);
- break;
+ break;
case IDC_DF2ENABLE:
getfloppytypeq (hDlg, 2);
break;
{ FALT|FVIRTKEY, '6', 10006 }, { FALT|FVIRTKEY, '7', 10007 }, { FALT|FVIRTKEY, '8', 10008 }, { FALT|FVIRTKEY, '9', 10009 }, { FALT|FVIRTKEY, '0', 10010 },
{ FALT|FSHIFT|FVIRTKEY, '1', 10011 }, { FALT|FSHIFT|FVIRTKEY, '2', 10012 }, { FALT|FSHIFT|FVIRTKEY, '3', 10013 }, { FALT|FSHIFT|FVIRTKEY, '4', 10014 }, { FALT|FSHIFT|FVIRTKEY, '5', 10015 },
{ FALT|FSHIFT|FVIRTKEY, '6', 10016 }, { FALT|FSHIFT|FVIRTKEY, '7', 10017 }, { FALT|FSHIFT|FVIRTKEY, '8', 10018 }, { FALT|FSHIFT|FVIRTKEY, '9', 10019 }, { FALT|FSHIFT|FVIRTKEY, '0', 10020 },
- { FVIRTKEY, VK_UP, 10101 }, { FVIRTKEY, VK_DOWN, 10102 }, { FVIRTKEY, VK_RIGHT, 10104 },
+ { FVIRTKEY, VK_UP, 10101 }, { FVIRTKEY, VK_DOWN, 10102 }, { FVIRTKEY, VK_RIGHT, 10104 },
{ FVIRTKEY|FSHIFT, VK_UP, IDC_UP }, { FVIRTKEY|FSHIFT, VK_DOWN, IDC_DOWN },
{ FVIRTKEY|FCONTROL, '1', 10201 }, { FVIRTKEY|FCONTROL, '2', 10202 }, { FVIRTKEY|FCONTROL, '3', 10203 }, { FVIRTKEY|FCONTROL, '4', 10204 },
{ FVIRTKEY|FCONTROL|FSHIFT, '1', 10205 }, { FVIRTKEY|FCONTROL|FSHIFT, '2', 10206 }, { FVIRTKEY|FCONTROL|FSHIFT, '3', 10207 }, { FVIRTKEY|FCONTROL|FSHIFT, '4', 10208 },
static int entry;
char tmp[MAX_DPATH];
- switch (msg)
+ switch (msg)
{
case WM_INITDIALOG:
pages[DISK_ID] = hDlg;
addswapperfile (hDlg, entry);
}
break;
-
+
case IDC_DISKLISTINSERT:
if (entry >= 0) {
if (getfloppybox (hDlg, IDC_DISKTEXT, tmp, sizeof (tmp))) {
strcpy (workprefs.dfxlist[entry], tmp);
- addfloppyhistory (hDlg);
+ addfloppyhistory (hDlg);
InitializeListView (hDlg);
swapperhili (hDlg, entry);
} else {
addswapperfile (hDlg, entry);
}
}
- break;
+ break;
case IDC_DISKLISTREMOVE:
if (entry >= 0) {
break;
}
case WM_NOTIFY:
- if (((LPNMHDR) lParam)->idFrom == IDC_DISKLIST)
+ if (((LPNMHDR) lParam)->idFrom == IDC_DISKLIST)
{
int dblclick = 0, button = 0, col;
HWND list;
NM_LISTVIEW *nmlistview;
nmlistview = (NM_LISTVIEW *) lParam;
cachedlist = list = nmlistview->hdr.hwndFrom;
- switch (nmlistview->hdr.code)
+ switch (nmlistview->hdr.code)
{
case LVN_BEGINDRAG:
drag_start (hDlg, cachedlist, lParam);
break;
case NM_RDBLCLK:
case NM_DBLCLK:
- dblclick = 1;
+ dblclick = 1;
/* fall-through here too */
case NM_RCLICK:
if (nmlistview->hdr.code == NM_RCLICK || nmlistview->hdr.code == NM_RDBLCLK)
{
int i, j;
char tmp[MAX_DPATH], tmp2[MAX_DPATH];
-
+
enable_for_portsdlg (hDlg);
if (joy0previous < 0)
joy0previous = inputdevice_get_device_total (IDTYPE_JOYSTICK) + 1;
vv += JSEM_KBDLAYOUT;
}
*port = vv;
-}
+}
static void values_from_portsdlg (HWND hDlg)
{
item = SendDlgItemMessage (hDlg, IDC_SERIAL, CB_GETCURSEL, 0, 0L);
if (item != CB_ERR && item > 0) {
- workprefs.use_serial = 1;
+ workprefs.use_serial = 1;
strcpy (workprefs.sername, comports[item - 1].dev);
} else {
- workprefs.use_serial = 0;
- workprefs.sername[0] = 0;
+ workprefs.use_serial = 0;
+ workprefs.sername[0] = 0;
}
workprefs.serial_demand = 0;
if (IsDlgButtonChecked (hDlg, IDC_SER_SHARED))
// Warn the user that their printer-port selection is not valid on this machine
char szMessage[MAX_DPATH];
WIN32GUI_LoadUIString(IDS_INVALIDPRTPORT, szMessage, MAX_DPATH);
- pre_gui_message (szMessage);
+ pre_gui_message (szMessage);
// Disable the invalid parallel-port selection
workprefs.prtname[0] = 0;
result = 0;
CheckDlgButton(hDlg, IDC_PSPRINTER, workprefs.parallel_postscript_emulation);
CheckDlgButton(hDlg, IDC_PSPRINTERDETECT, workprefs.parallel_postscript_detection);
SetDlgItemText(hDlg, IDC_PS_PARAMS, workprefs.ghostscript_parameters);
-
+
SendDlgItemMessage(hDlg, IDC_PRINTERLIST, CB_SETCURSEL, result, 0);
SendDlgItemMessage(hDlg, IDC_MIDIOUTLIST, CB_SETCURSEL, workprefs.win32_midioutdev + 2, 0);
if (!bNoMidiIn && workprefs.win32_midiindev >= 0)
else
SendDlgItemMessage(hDlg, IDC_MIDIINLIST, CB_SETCURSEL, 0, 0);
ew (hDlg, IDC_MIDIINLIST, workprefs.win32_midioutdev < -1 ? FALSE : TRUE);
-
+
CheckDlgButton(hDlg, IDC_UAESERIAL, workprefs.uaeserial);
CheckDlgButton(hDlg, IDC_SER_SHARED, workprefs.serial_demand);
CheckDlgButton(hDlg, IDC_SER_CTSRTS, workprefs.serial_hwctsrts);
CheckDlgButton(hDlg, IDC_SER_DIRECT, workprefs.serial_direct);
-
+
if(!workprefs.sername[0]) {
SendDlgItemMessage (hDlg, IDC_SERIAL, CB_SETCURSEL, 0, 0L);
workprefs.use_serial = 0;
WIN32GUI_LoadUIString(IDS_INVALIDCOMPORT, szMessage, MAX_DPATH);
pre_gui_message (szMessage);
// Select "none" as the COM-port
- SendDlgItemMessage(hDlg, IDC_SERIAL, CB_SETCURSEL, 0L, 0L);
+ SendDlgItemMessage(hDlg, IDC_SERIAL, CB_SETCURSEL, 0L, 0L);
// Disable the chosen serial-port selection
workprefs.sername[0] = 0;
workprefs.use_serial = 0;
SendDlgItemMessage (hDlg, IDC_SERIAL, CB_RESETCONTENT, 0, 0L);
SendDlgItemMessage (hDlg, IDC_SERIAL, CB_ADDSTRING, 0, (LPARAM)szNone);
for (port = 0; port < MAX_SERIAL_PORTS && comports[port].name; port++) {
- SendDlgItemMessage(hDlg, IDC_SERIAL, CB_ADDSTRING, 0, (LPARAM)comports[port].name);
+ SendDlgItemMessage(hDlg, IDC_SERIAL, CB_ADDSTRING, 0, (LPARAM)comports[port].name);
}
SendDlgItemMessage (hDlg, IDC_PRINTERLIST, CB_RESETCONTENT, 0, 0L);
static int recursive = 0;
int temp;
- switch (msg)
+ switch (msg)
{
case WM_INITDIALOG:
recursive++;
values_to_portsdlg(hDlg);
updatejoyport(hDlg);
recursive--;
- break;
+ break;
case WM_USER:
recursive++;
enable_for_portsdlg (hDlg);
case IDOK:
stringboxdialogactive = -1;
DestroyWindow (hDlg);
- return TRUE;
+ return TRUE;
case IDCANCEL:
stringboxdialogactive = 0;
DestroyWindow (hDlg);
}
break;
}
- return DefWindowProc(hDlg, msg, wParam, lParam);
+ return DefWindowProc(hDlg, msg, wParam, lParam);
}
static int askinputcustom(HWND hDlg, char *custom, int maxlen)
int flags;
custom1[0] = 0;
inputdevice_get_mapped_name (input_selected_device, input_selected_widget,
- &flags, 0, custom1, input_selected_sub_num);
+ &flags, 0, custom1, input_selected_sub_num);
if (strlen(custom1) > 0 || newcustom) {
if (askinputcustom(hDlg, custom1, sizeof custom1)) {
inputdevice_set_mapping (input_selected_device, input_selected_widget,
int items = 0, entry = 0;
static int recursive;
- switch (msg)
+ switch (msg)
{
case WM_INITDIALOG:
pages[INPUT_ID] = hDlg;
inputdevice_config_change ();
input_selected_widget = -1;
init_inputdlg(hDlg);
-
+
case WM_USER:
recursive++;
enable_for_inputdlg (hDlg);
recursive--;
break;
case WM_NOTIFY:
- if (((LPNMHDR) lParam)->idFrom == IDC_INPUTLIST)
+ if (((LPNMHDR) lParam)->idFrom == IDC_INPUTLIST)
{
int row;
nmlistview = (NM_LISTVIEW *) lParam;
list = nmlistview->hdr.hwndFrom;
- switch (nmlistview->hdr.code)
+ switch (nmlistview->hdr.code)
{
case NM_DBLCLK:
dblclick = 1;
int idx = SendDlgItemMessage (hDlg, IDC_FILTERXTRA, CB_GETCURSEL, 0, 0L);
if (idx == CB_ERR)
idx = -1;
- SendDlgItemMessage (hDlg, IDC_FILTERXTRA, CB_RESETCONTENT, 0, 0L);
+ SendDlgItemMessage (hDlg, IDC_FILTERXTRA, CB_RESETCONTENT, 0, 0L);
for (i = 0; filter_extra[i].label; i++) {
if (filter_selected == &filter_extra[i] && idx < 0)
idx2 = i;
SendDlgItemMessage (hDlg, IDC_FILTERHZMULT, CB_RESETCONTENT, 0, 0L);
SendDlgItemMessage (hDlg, IDC_FILTERVZMULT, CB_RESETCONTENT, 0, 0L);
for (i = 0; filtermultnames[i]; i++) {
- SendDlgItemMessage (hDlg, IDC_FILTERHZMULT, CB_ADDSTRING, 0, (LPARAM)filtermultnames[i]);
- SendDlgItemMessage (hDlg, IDC_FILTERVZMULT, CB_ADDSTRING, 0, (LPARAM)filtermultnames[i]);
+ SendDlgItemMessage (hDlg, IDC_FILTERHZMULT, CB_ADDSTRING, 0, (LPARAM)filtermultnames[i]);
+ SendDlgItemMessage (hDlg, IDC_FILTERVZMULT, CB_ADDSTRING, 0, (LPARAM)filtermultnames[i]);
}
SendDlgItemMessage (hDlg, IDC_FILTERHZMULT, CB_SETCURSEL, 0, 0);
SendDlgItemMessage (hDlg, IDC_FILTERVZMULT, CB_SETCURSEL, 0, 0);
for (i = 0; filtermultnames[i]; i++) {
if (filtermults[i] == workprefs.gfx_filter_horiz_zoom_mult)
- SendDlgItemMessage (hDlg, IDC_FILTERHZMULT, CB_SETCURSEL, i, 0);
+ SendDlgItemMessage (hDlg, IDC_FILTERHZMULT, CB_SETCURSEL, i, 0);
if (filtermults[i] == workprefs.gfx_filter_vert_zoom_mult)
- SendDlgItemMessage (hDlg, IDC_FILTERVZMULT, CB_SETCURSEL, i, 0);
+ SendDlgItemMessage (hDlg, IDC_FILTERVZMULT, CB_SETCURSEL, i, 0);
}
SendDlgItemMessage (hDlg, IDC_FILTERSLR, CB_RESETCONTENT, 0, 0L);
i++;
}
SendDlgItemMessage (hDlg, IDC_FILTERSLR, CB_SETCURSEL, j, 0);
-
+
j = 0;
SendDlgItemMessage (hDlg, IDC_FILTERPRESETS, CB_RESETCONTENT, 0, 0L);
SendDlgItemMessage (hDlg, IDC_FILTERPRESETS, CB_ADDSTRING, 0, (LPARAM)"");
RegCloseKey (fkey);
}
}
-
+
SendDlgItemMessage (hDlg, IDC_FILTERHZ, TBM_SETPOS, TRUE, workprefs.gfx_filter_horiz_zoom);
SendDlgItemMessage (hDlg, IDC_FILTERVZ, TBM_SETPOS, TRUE, workprefs.gfx_filter_vert_zoom);
SendDlgItemMessage (hDlg, IDC_FILTERHO, TBM_SETPOS, TRUE, workprefs.gfx_filter_horiz_offset);
} else if (wParam == IDC_FILTERPRESETLOAD) {
char *s = tmp2;
char *t;
-
+
load = 1;
strcat (s, ",");
t = strchr (s, ',');
static int recursive;
LRESULT item;
- switch (msg)
+ switch (msg)
{
case WM_INITDIALOG:
#if WINUAEBETA == 0
pages[HW3D_ID] = hDlg;
currentpage = HW3D_ID;
enable_for_hw3ddlg (hDlg);
-
+
case WM_USER:
if(recursive > 0)
break;
static void values_to_avioutputdlg(HWND hDlg)
{
char tmpstr[256];
-
+
updatewinfsmode (&workprefs);
SetDlgItemText(hDlg, IDC_AVIOUTPUT_FILETEXT, avioutput_filename);
-
+
sprintf(tmpstr, "%d fps", avioutput_fps);
SendMessage(GetDlgItem(hDlg, IDC_AVIOUTPUT_FPS_STATIC), WM_SETTEXT, (WPARAM) 0, (LPARAM) tmpstr);
-
+
sprintf(tmpstr, "Actual: %d x %d", workprefs.gfx_size.width, workprefs.gfx_size.height);
SendMessage(GetDlgItem(hDlg, IDC_AVIOUTPUT_DIMENSIONS_STATIC), WM_SETTEXT, (WPARAM) 0, (LPARAM) tmpstr);
-
+
switch(avioutput_fps)
{
case VBLANK_HZ_PAL:
CheckRadioButton(hDlg, IDC_AVIOUTPUT_PAL, IDC_AVIOUTPUT_NTSC, IDC_AVIOUTPUT_PAL);
break;
-
+
case VBLANK_HZ_NTSC:
CheckRadioButton(hDlg, IDC_AVIOUTPUT_PAL, IDC_AVIOUTPUT_NTSC, IDC_AVIOUTPUT_NTSC);
break;
-
+
default:
CheckDlgButton(hDlg, IDC_AVIOUTPUT_PAL, BST_UNCHECKED);
CheckDlgButton(hDlg, IDC_AVIOUTPUT_NTSC, BST_UNCHECKED);
break;
}
-
+
CheckDlgButton (hDlg, IDC_AVIOUTPUT_FRAMELIMITER, avioutput_framelimiter ? FALSE : TRUE);
CheckDlgButton (hDlg, IDC_AVIOUTPUT_NOSOUNDOUTPUT, avioutput_nosoundoutput ? TRUE : FALSE);
CheckDlgButton (hDlg, IDC_AVIOUTPUT_ACTIVATED, avioutput_requested ? BST_CHECKED : BST_UNCHECKED);
#if defined (PROWIZARD)
ew (hDlg, IDC_PROWIZARD, TRUE);
if (full_property_sheet)
- ew (hDlg, IDC_PROWIZARD, FALSE);
+ ew (hDlg, IDC_PROWIZARD, FALSE);
#endif
ew (hDlg, IDC_SCREENSHOT, full_property_sheet ? FALSE : TRUE);
ew (hDlg, IDC_AVIOUTPUT_NTSC, TRUE);
ew (hDlg, IDC_AVIOUTPUT_FPS, TRUE);
ew (hDlg, IDC_AVIOUTPUT_FILE, TRUE);
-
+
if(workprefs.produce_sound < 2) {
ew (hDlg, IDC_AVIOUTPUT_AUDIO, FALSE);
ew (hDlg, IDC_AVIOUTPUT_AUDIO_STATIC, FALSE);
WIN32GUI_LoadUIString (IDS_AVIOUTPUT_NOCODEC, tmp, sizeof tmp);
}
SetWindowText(GetDlgItem(hDlg, IDC_AVIOUTPUT_AUDIO_STATIC), tmp);
-
+
if (avioutput_audio != AVIAUDIO_WAV)
avioutput_video = AVIOutput_GetVideoCodec(tmp, sizeof tmp);
if(!avioutput_video) {
{
static int recursive = 0;
char tmp[1000];
-
+
switch(msg)
{
case WM_INITDIALOG:
SendDlgItemMessage(hDlg, IDC_AVIOUTPUT_FPS, TBM_SETPOS, TRUE, avioutput_fps);
SendMessage(hDlg, WM_HSCROLL, (WPARAM) NULL, (LPARAM) NULL);
if (!avioutput_filename[0]) {
- fetch_path ("VideoPath", avioutput_filename, sizeof (avioutput_filename));
- strcat (avioutput_filename, "output.avi");
+ fetch_path ("VideoPath", avioutput_filename, sizeof (avioutput_filename));
+ strcat (avioutput_filename, "output.avi");
}
-
+
case WM_USER:
recursive++;
values_to_avioutputdlg(hDlg);
enable_for_avioutputdlg(hDlg);
recursive--;
return TRUE;
-
+
case WM_HSCROLL:
{
recursive++;
recursive--;
return TRUE;
}
-
+
case WM_COMMAND:
if(recursive > 0)
- break;
-
+ break;
+
recursive++;
-
+
switch(wParam)
{
case IDC_SCREENSHOT:
screenshot(1, 0);
break;
-
+
case IDC_AVIOUTPUT_PAL:
SendDlgItemMessage(hDlg, IDC_AVIOUTPUT_FPS, TBM_SETPOS, TRUE, VBLANK_HZ_PAL);
SendMessage(hDlg, WM_HSCROLL, (WPARAM) NULL, (LPARAM) NULL);
break;
-
+
case IDC_AVIOUTPUT_NTSC:
SendDlgItemMessage(hDlg, IDC_AVIOUTPUT_FPS, TBM_SETPOS, TRUE, VBLANK_HZ_NTSC);
SendMessage(hDlg, WM_HSCROLL, (WPARAM) NULL, (LPARAM) NULL);
break;
-
+
case IDC_AVIOUTPUT_AUDIO:
{
if (avioutput_enabled)
- AVIOutput_End ();
+ AVIOutput_End ();
if(IsDlgButtonChecked(hDlg, IDC_AVIOUTPUT_AUDIO) == BST_CHECKED) {
avioutput_audio = AVIOutput_ChooseAudioCodec(hDlg, tmp, sizeof tmp);
enable_for_avioutputdlg(hDlg);
} else {
avioutput_audio = 0;
- }
+ }
break;
}
-
+
case IDC_AVIOUTPUT_VIDEO:
{
if (avioutput_enabled)
- AVIOutput_End ();
+ AVIOutput_End ();
if(IsDlgButtonChecked(hDlg, IDC_AVIOUTPUT_VIDEO) == BST_CHECKED) {
avioutput_video = AVIOutput_ChooseVideoCodec(hDlg, tmp, sizeof tmp);
- if (avioutput_audio = AVIAUDIO_WAV)
+ if (avioutput_audio = AVIAUDIO_WAV)
avioutput_audio = 0;
enable_for_avioutputdlg(hDlg);
} else {
enable_for_avioutputdlg(hDlg);
break;
}
-
+
case IDC_AVIOUTPUT_FILE:
{
OPENFILENAME ofn;
-
+
ZeroMemory(&ofn, sizeof(OPENFILENAME));
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = hDlg;
ofn.lpTemplateName = NULL;
ofn.lCustData = 0;
ofn.lpstrFilter = "Video Clip (*.avi)\0*.avi\0Wave Sound (*.wav)\0";
-
+
if(!GetSaveFileName(&ofn))
break;
if (ofn.nFilterIndex == 2) {
- avioutput_audio = AVIAUDIO_WAV;
- avioutput_video = 0;
- if (strlen (avioutput_filename) > 4 && !stricmp (avioutput_filename + strlen (avioutput_filename) - 4, ".avi"))
+ avioutput_audio = AVIAUDIO_WAV;
+ avioutput_video = 0;
+ if (strlen (avioutput_filename) > 4 && !stricmp (avioutput_filename + strlen (avioutput_filename) - 4, ".avi"))
strcpy (avioutput_filename + strlen (avioutput_filename) - 4, ".wav");
}
break;
}
-
+
}
-
+
values_from_avioutputdlg(hDlg, msg, wParam, lParam);
values_to_avioutputdlg(hDlg);
enable_for_avioutputdlg(hDlg);
-
+
recursive--;
-
+
return TRUE;
}
return FALSE;
GetWindowRect (owner, &rcOwner);
GetWindowRect (hDlg, &rcDlg);
CopyRect (&rc, &rcOwner);
- OffsetRect(&rcDlg, -rcDlg.left, -rcDlg.top);
- OffsetRect(&rc, -rc.left, -rc.top);
+ OffsetRect(&rcDlg, -rcDlg.left, -rcDlg.top);
+ OffsetRect(&rc, -rc.left, -rc.top);
OffsetRect(&rc, -rcDlg.right, -rcDlg.bottom);
x = rcOwner.left + (rc.right / 2);
y = rcOwner.top + (rc.bottom / 2);
RECT r, r2;
int ret = 0;
DWORD flags;
-
+
DragQueryPoint (hd, &pt);
pt.y += GetSystemMetrics (SM_CYMENU) + GetSystemMetrics (SM_CYBORDER);
cnt = DragQueryFile (hd, 0xffffffff, NULL, 0);
int type = -1;
DragQueryFile (hd, i, file, sizeof (file));
- flags = GetFileAttributes(file);
+ flags = GetFileAttributes(file);
if (flags & FILE_ATTRIBUTE_DIRECTORY)
type = ZFILE_HDF;
if (type < 0) {
}
}
+ if (currentpage < 0 && i == 0) {
+ if (filesys_insert (-1, NULL, file, 0, 0))
+ continue;
+ }
+
switch (type)
{
- case ZFILE_DISKIMAGE:
- if (currentpage == DISK_ID) {
+ case ZFILE_DISKIMAGE:
+ if (currentpage == DISK_ID) {
list = 0;
while (list < MAX_SPARE_DRIVES) {
- if (!strcasecmp (prefs->dfxlist[list], file))
+ if (!strcasecmp (prefs->dfxlist[list], file))
break;
list++;
}
if (list == MAX_SPARE_DRIVES) {
- list = 0;
- while (list < MAX_SPARE_DRIVES) {
+ list = 0;
+ while (list < MAX_SPARE_DRIVES) {
if (!prefs->dfxlist[list][0]) {
- strcpy (prefs->dfxlist[list], file);
- break;
+ strcpy (prefs->dfxlist[list], file);
+ break;
}
list++;
}
disk_insert (drv, workprefs.df[drv]);
drv++;
if (drv >= (currentpage == QUICKSTART_ID ? 2 : 4))
- drv = 0;
+ drv = 0;
if (workprefs.dfxtype[drv] < 0)
- drv = 0;
+ drv = 0;
if (drv == firstdrv)
- i = cnt;
+ i = cnt;
}
break;
case ZFILE_ROM:
- if (rd) {
+ if (rd) {
if (rd->type == ROMTYPE_KICK || rd->type == ROMTYPE_KICKCD32)
- strcpy (prefs->romfile, file);
+ strcpy (prefs->romfile, file);
if (rd->type == ROMTYPE_EXTCD32 || rd->type == ROMTYPE_EXTCDTV)
- strcpy (prefs->romextfile, file);
+ strcpy (prefs->romextfile, file);
if (rd->type == ROMTYPE_AR)
- strcpy (prefs->cartfile, file);
+ strcpy (prefs->cartfile, file);
} else {
strcpy (prefs->romfile, file);
}
case ZFILE_HDF:
if (flags & FILE_ATTRIBUTE_DIRECTORY) {
if (!full_property_sheet && currentpage < 0)
- filesys_insert(-1, NULL, file, 0, 0);
+ filesys_insert (-1, NULL, file, 0, 0);
else
add_filesys_config (&workprefs, -1, NULL, "", file, 0,
0, 0, 0, 0, 0, NULL, 0, 0);
}
break;
case ZFILE_NVR:
- strcpy (prefs->flashfile, file);
+ strcpy (prefs->flashfile, file);
break;
case ZFILE_CONFIGURATION:
- if (target_cfgfile_load (&workprefs, file, 0, 0)) {
+ if (target_cfgfile_load (&workprefs, file, 0, 0)) {
if (full_property_sheet) {
- inputdevice_updateconfig (&workprefs);
- if (!workprefs.start_gui)
+ inputdevice_updateconfig (&workprefs);
+ if (!workprefs.start_gui)
ret = 1;
} else {
- uae_restart (workprefs.start_gui, file);
- ret = 1;
+ uae_restart (workprefs.start_gui, file);
+ ret = 1;
}
}
break;
case ZFILE_STATEFILE:
- savestate_state = STATE_DORESTORE;
- strcpy (savestate_fname, file);
- ret = 1;
+ savestate_state = STATE_DORESTORE;
+ strcpy (savestate_fname, file);
+ ret = 1;
break;
default:
if (currentpage < 0 && !full_property_sheet) {
- filesys_insert(-1, NULL, file, 0, 0);
+ filesys_insert (-1, NULL, file, 0, 0);
} else if (currentpage == HARDDISK_ID) {
add_filesys_config (&workprefs, -1, NULL, "", file, 0,
0, 0, 0, 0, 0, NULL, 0, 0);
} else {
rd = scan_arcadia_rom (file, 0);
- if (rd) {
+ if (rd) {
if (rd->type == ROMTYPE_ARCADIABIOS)
strcpy (prefs->romextfile, file);
else if (rd->type == ROMTYPE_ARCADIAGAME)
quit_program = 1;
regs.spcflags |= SPCFLAG_BRK;
}
- }
+ }
return TRUE;
case WM_INITDIALOG:
guiDlg = hDlg;
hAccelTable = NULL;
DragAcceptFiles(hwnd, TRUE);
if (first)
- write_log("Entering GUI idle loop\n");
+ write_log ("Entering GUI idle loop\n");
scaleresource_setmaxsize(800, 600);
tres = scaleresource(panelresource, hwnd);
dhwnd = CreateDialogIndirect (tres->inst, tres->resource, hwnd, DialogProc);
DispatchMessage (&msg);
}
if (dialogreturn >= 0)
- break;
+ break;
}
psresult = dialogreturn;
}
int gui_init (void)
{
int ret;
-
+
read_rom_list();
for (;;) {
ret = GetSettings(1, currprefs.win32_notaskbarbutton ? hHiddenWnd : NULL);
void gui_exit (void)
{
int i;
-
+
for (i = 0; i < C_PAGES; i++) {
if (ppage[i].accel)
DestroyAcceleratorTable (ppage[i].accel);
break;
j--;
}
- tt = dfx[led - 1];
+ tt = dfx[led - 1];
tt[0] = 0;
if (strlen (p + j) > 0)
sprintf (tt, "%s (CRC=%08.8X)", p + j, gui_data.crc32[led - 1]);
va_start (parms, format);
vsprintf( msg, format, parms );
va_end (parms);
- write_log( msg );
+ write_log ( msg );
if (msg[strlen(msg)-1]!='\n')
- write_log("\n");
+ write_log ("\n");
WIN32GUI_LoadUIString (IDS_ERRORTITLE, szTitle, MAX_DPATH);
if (flipflop)
ShowWindow (hAmigaWnd, SW_MINIMIZE);
- write_log(msg);
+ write_log (msg);
if (msg[strlen(msg) - 1] != '\n')
- write_log("\n");
+ write_log ("\n");
WIN32GUI_LoadUIString (IDS_ERRORTITLE, szTitle, MAX_DPATH);
if (!MessageBox (hwnd, msg, szTitle, flags))
- write_log("MessageBox(%s) failed, err=%d\n", msg, GetLastError());
+ write_log ("MessageBox(%s) failed, err=%d\n", msg, GetLastError());
if (flipflop)
ShowWindow (hAmigaWnd, SW_RESTORE);
va_end (parms);
write_log (msg);
if (msg[strlen(msg)-1]!='\n')
- write_log("\n");
+ write_log ("\n");
WIN32GUI_LoadUIString (IDS_ERRORTITLE, szTitle, MAX_DPATH);
strcat (szTitle, BetaStr);
static BYTE *todword(BYTE *p)
{
while ((LONG_PTR)p & 3)
- p++;
+ p++;
return p;
}
Name="VCCLCompilerTool"
AdditionalOptions=""
Optimization="0"
- AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep"
+ AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep,..\..\prowizard\include"
PreprocessorDefinitions="WINVER=0x0500,_DEBUG,WIN32_IE=0x0500"
GeneratePreprocessedFile="0"
KeepComments="false"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
WholeProgramOptimization="false"
- AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep"
+ AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep,..\..\prowizard\include"
PreprocessorDefinitions="WINVER=0x0500;NDEBUG;_WIN32_IE=0x0500"
StringPooling="true"
ExceptionHandling="0"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
WholeProgramOptimization="true"
- AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep"
+ AdditionalIncludeDirectories="..\..\include,..\..,..\,..\resources,..\osdep,..\sounddep,..\..\prowizard\include"
PreprocessorDefinitions="WINVER=0x0500;NDEBUG;_WIN32_IE=0x0500"
StringPooling="true"
ExceptionHandling="0"
>
</File>
<Filter
- Name="rips"
+ Name="rippers"
>
<File
RelativePath="..\..\prowizard\rippers\AC1D_packer.c"
RelativePath="..\..\prowizard\rippers\Newtron.c"
>
</File>
+ <File
+ RelativePath="..\..\prowizard\rippers\NewtronOld.c"
+ >
+ </File>
<File
RelativePath="..\..\prowizard\rippers\NoiseFromHeaven.c"
>
RelativePath="..\..\prowizard\rippers\NoiseRunner.c"
>
</File>
+ <File
+ RelativePath="..\..\prowizard\rippers\NovoTrade.c"
+ >
+ </File>
<File
RelativePath="..\..\prowizard\rippers\PhaPacker.c"
>
RelativePath="..\..\prowizard\rippers\Prorunner20.c"
>
</File>
- <File
- RelativePath="..\..\prowizard\rippers\ptktable.h"
- >
- </File>
<File
RelativePath="..\..\prowizard\rippers\QuadraComposer.c"
>
RelativePath="..\..\prowizard\rippers\SGT-Packer.c"
>
</File>
+ <File
+ RelativePath="..\..\prowizard\rippers\skizzo.c"
+ >
+ </File>
<File
RelativePath="..\..\prowizard\rippers\SkytPacker.c"
>
RelativePath="..\..\prowizard\rippers\StimPacker.c"
>
</File>
+ <File
+ RelativePath="..\..\prowizard\rippers\StoneArtsPlayer.c"
+ >
+ </File>
<File
RelativePath="..\..\prowizard\rippers\StoneCracker270.c"
>
RelativePath="..\..\prowizard\rippers\TimeCruncher17.c"
>
</File>
+ <File
+ RelativePath="..\..\prowizard\rippers\TitanicsPlayer.c"
+ >
+ </File>
<File
RelativePath="..\..\prowizard\rippers\TMK.c"
>
+Beta 2:
+
+- 4-channel stereo mixing fixed (broke in b1)
+- Pro-Wizard updated (1.62)
+- directory filesystem ACTION_INHIBIT fixed (didn't really do much
+ and if it rarely did, result was infinite loop)
+- directory filesystem ACTION_EXAMINE_ALL implemented (more optimal
+ but also more complex way to read directory listing). Bugs possible,
+ please test it by running all kinds of new utilities. eac_MatchString
+ confirmed working, eac_MatchFunc not tested (no test program found)
+ Full logging currently enabled.
+- some removable directory drive fixes
+- Harddrives GUI can be used to eject and insert directory harddrives
+ on the fly (device name ignored)
+
Beta 1:
- ROM scan now always scans all detected ROM paths (skips duplicate
only drives that were empty when emulation was started will be
remounted. (It is quite bad idea to remove OS/boot drive..)
- weird things can happen if files are open when changing drive
+ - volume name is automatically generated from directory or file name
+ - very useful when installing software, just drag and drop
+ installation package (lha-archive for example) and run it.
+ No need for temporarily locations or worry about losing flags or
+ file comments.
+ - overrides normal (executables -> floppy drive, configuration file
+ -> restart emulation etc..) drag and drop function if GUI is not
+ active and dropped file/directory gets accepted by filesystem.
- CPU emulation and other cleanups (Bernd Schmidt!)
- X-Power Professional 500 v1.3 supported
- Nordic Power v1.5 supported
GETCONSOLEWINDOW pGetConsoleWindow;
/* Windows 2000 or newer only */
pGetConsoleWindow = (GETCONSOLEWINDOW)GetProcAddress(
- GetModuleHandle("kernel32.dll"), "GetConsoleWindow");
+ GetModuleHandle("kernel32.dll"), "GetConsoleWindow");
if (pGetConsoleWindow)
return pGetConsoleWindow();
return NULL;
return;
hwnd = myGetConsoleWindow();
if (hwnd && hWinUAEKey) {
- int newpos = 1;
- LONG x, y, w, h;
+ int newpos = 1;
+ LONG x, y, w, h;
DWORD regkeytype;
DWORD regkeysize = sizeof(LONG);
- if (RegQueryValueEx (hWinUAEKey, "LoggerPosX", 0, ®keytype, (LPBYTE)&x, ®keysize) != ERROR_SUCCESS)
+ if (RegQueryValueEx (hWinUAEKey, "LoggerPosX", 0, ®keytype, (LPBYTE)&x, ®keysize) != ERROR_SUCCESS)
newpos = 0;
if (RegQueryValueEx (hWinUAEKey, "LoggerPosY", 0, ®keytype, (LPBYTE)&y, ®keysize) != ERROR_SUCCESS)
newpos = 0;
rc.bottom = y + h;
if (MonitorFromRect (&rc, MONITOR_DEFAULTTONULL) != NULL) {
SetForegroundWindow(hwnd);
- SetWindowPos(hwnd, HWND_TOP, x, y, w, h, SWP_NOACTIVATE);
+ SetWindowPos(hwnd, HWND_TOP, x, y, w, h, SWP_NOACTIVATE);
}
}
void *log_open(const char *name, int append, int bootlog)
{
FILE *f;
-
+
f = fopen(name, append ? "a" : "wt");
bootlogmode = bootlog;
if (!cs_init)
#include "picasso96.h"
#ifdef JIT
-int have_done_picasso=0; /* For the JIT compiler */
-int picasso_is_special=PIC_WRITE; /* ditto */
-int picasso_is_special_read=PIC_READ; /* ditto */
+int have_done_picasso = 0; /* For the JIT compiler */
+int picasso_is_special = PIC_WRITE; /* ditto */
+int picasso_is_special_read = PIC_READ; /* ditto */
#endif
#ifdef PICASSO96
#define P96TRACING_ENABLED 0
#if P96TRACING_ENABLED
-#define P96TRACE(x) do { write_log x; } while(0)
+#define P96TRACE(x) do { write_log ("P96: "); write_log x; } while(0)
#else
-#define P96TRACE(x)
+#define P96TRACE(x) do { } while(0)
#endif
static uae_u32 gfxmem_lget (uaecptr) REGPARAM;
struct picasso96_state_struct picasso96_state;
struct picasso_vidbuf_description picasso_vidinfo;
-/* These are the maximum resolutions... They are filled in by GetSupportedResolutions() */
+/* These are the maximum resolutions. They are filled in by GetSupportedResolutions() */
/* have to fill this in, otherwise problems occur
* @@@ ??? what problems?
*/
uaecptr memp = get_long (amigamemptr + PSSO_RenderInfo_Memory);
if (valid_address (memp, PSSO_RenderInfo_sizeof)) {
- ri->AMemory=memp;
+ ri->AMemory = memp;
ri->Memory = get_real_address (memp);
ri->BytesPerRow = get_word (amigamemptr + PSSO_RenderInfo_BytesPerRow);
ri->RGBFormat = get_long (amigamemptr + PSSO_RenderInfo_RGBFormat);
return 1;
}
- write_log ("ERROR - Invalid RenderInfo memory area...\n");
+ write_log ("ERROR - Invalid RenderInfo memory area.\n");
return 0;
}
static int CopyPatternStructureA2U (uaecptr amigamemptr, struct Pattern *pattern)
{
uaecptr memp = get_long (amigamemptr + PSSO_Pattern_Memory);
+
if (valid_address (memp, PSSO_Pattern_sizeof)) {
pattern->Memory = get_real_address (memp);
pattern->XOffset = get_word (amigamemptr + PSSO_Pattern_XOffset);
pattern->DrawMode = get_byte (amigamemptr + PSSO_Pattern_DrawMode);
return 1;
}
- write_log ("ERROR - Invalid Pattern memory area...\n");
+ write_log ("ERROR - Invalid Pattern memory area.\n");
return 0;
}
tmpl->BgPen = get_long (amigamemptr + PSSO_Template_BgPen);
return 1;
}
- write_log ("ERROR - Invalid Template memory area...\n");
+ write_log ("ERROR - Invalid Template memory area.\n");
return 0;
}
char *uaememptr = 0;
int i;
- uaememptr = gfxmem_xlate (amigamemptr); /* I know that amigamemptr is inside my gfxmem chunk, so I can just do the xlate() */
- memset (uaememptr, 0, PSSO_LibResolution_sizeof); /* zero out our LibResolution structure */
+ /* I know that amigamemptr is inside my gfxmem chunk, so I can just do the xlate() */
+ uaememptr = gfxmem_xlate (amigamemptr);
+
+ /* zero out our LibResolution structure */
+ memset (uaememptr, 0, PSSO_LibResolution_sizeof);
+
strcpy (uaememptr + PSSO_LibResolution_P96ID, libres->P96ID);
put_long (amigamemptr + PSSO_LibResolution_DisplayID, libres->DisplayID);
put_word (amigamemptr + PSSO_LibResolution_Width, libres->Width);
* filled rectangle in the frame buffer; it can be used as a memcpy source if
* there is no OS specific function to fill the rectangle.
*/
-
static void do_fillrect (uae_u8 *src, int x, int y, int width, int height,
uae_u32 pen, int Bpp, RGBFTYPE rgbtype)
{
* must do it by hand using the data in the save area, pointed to by
* srcp.
*/
-
static void do_blit (struct RenderInfo *ri, int Bpp, int srcx, int srcy,
int dstx, int dsty, int width, int height,
BLIT_OPCODE opcode, int can_do_blit)
have_done_picasso=1;
#endif
- /* Make sure that the first time we show a Picasso video mode, we don't blit any crap.
- * We can do this by checking if we have an Address yet. */
+ /* Make sure that the first time we show a Picasso video mode, we don't
+ * blit any crap. We can do this by checking if we have an Address yet. */
if (picasso96_state.Address) {
unsigned int width, height;
/* blit the stuff from our static frame-buffer to the gfx-card */
}
if (mask == 0xFF || Bpp > 1) {
- if( opcode == BLIT_SRC ) {
+ if (opcode == BLIT_SRC) {
/* handle normal case efficiently */
if (ri->Memory == dstri->Memory && dsty == srcy) {
unsigned long i;
for (y = 0; y < height; y++) {
int bound = src + total_width - 4;
//copy now the longs
- for( src2_32 = src, dst2_32 = dst; src2_32 < bound; src2_32++, dst2_32++ ) {
- switch( opcode ) {
+ for (src2_32 = src, dst2_32 = dst; src2_32 < bound; src2_32++, dst2_32++) {
+ switch (opcode) {
case BLIT_FALSE:
*dst2_32 = 0;
break;
*dst2_32 = ~(*src2_32 ^ *dst2_32);
break;
case BLIT_DST:
- write_log( "do_blitrect_frame_buffer shouldn't get BLIT_DST!\n");
+ write_log ("ERROR - do_blitrect_frame_buffer shouldn't get BLIT_DST!\n");
break;
case BLIT_NOTONLYSRC:
*dst2_32 = ~(*src2_32) | *dst2_32;
break;
case BLIT_SRC:
- write_log( "do_blitrect_frame_buffer shouldn't get BLIT_SRC!\n");
+ write_log ("ERROR - do_blitrect_frame_buffer shouldn't get BLIT_SRC!\n");
break;
case BLIT_NOTONLYDST:
*dst2_32 = ~(*dst2_32) | *src2_32;
}
break;
case BLIT_LAST:
- write_log( "do_blitrect_frame_buffer shouldn't get BLIT_LAST!\n");
+ write_log ("ERROR - do_blitrect_frame_buffer shouldn't get BLIT_LAST!\n");
break;
} /* switch opcode */
} // for end
//now copy the rest few bytes
- for (src2 = src2_32, dst2 = dst2_32; src2 < src + total_width; src2++, dst2++ ) {
- switch( opcode ) {
+ for (src2 = src2_32, dst2 = dst2_32; src2 < src + total_width; src2++, dst2++) {
+ switch (opcode) {
case BLIT_FALSE:
*dst2 = 0;
break;
*dst2 = ~(*src2 ^ *dst2);
break;
case BLIT_DST:
- write_log( "do_blitrect_frame_buffer shouldn't get BLIT_DST!\n");
+ write_log ("ERROR - do_blitrect_frame_buffer shouldn't get BLIT_DST!\n");
break;
case BLIT_NOTONLYSRC:
*dst2 = ~(*src2) | *dst2;
break;
case BLIT_SRC:
- write_log( "do_blitrect_frame_buffer shouldn't get BLIT_SRC!\n");
+ write_log ("ERROR - do_blitrect_frame_buffer shouldn't get BLIT_SRC!\n");
break;
case BLIT_NOTONLYDST:
*dst2 = ~(*dst2) | *src2;
*dst2 = 0xFF;
break;
case BLIT_LAST:
- write_log( "do_blitrect_frame_buffer shouldn't get BLIT_LAST!\n");
+ write_log ("ERROR - do_blitrect_frame_buffer shouldn't get BLIT_LAST!\n");
break;
case 30: //code for swap source with dest in long
{
int ModeInfoStructureCount = 1, LibResolutionStructureCount = 0;
uaecptr amigamemptr = 0;
uaecptr AmigaBoardInfo = m68k_areg (regs, 2);
+
put_word (AmigaBoardInfo + PSSO_BoardInfo_BitsPerCannon, DX_BitsPerCannon ());
put_word (AmigaBoardInfo + PSSO_BoardInfo_RGBFormats, picasso96_pixel_format);
put_word (AmigaBoardInfo + PSSO_BoardInfo_SoftSpriteFlags, picasso96_pixel_format);
&& DisplayModes[i].res.height == DisplayModes[j].res.height);
amigamemptr = gfxmem_start + allocated_gfxmem - 16384 + (PSSO_LibResolution_sizeof * LibResolutionStructureCount++);
+
CopyLibResolutionStructureU2A (&res, amigamemptr);
DumpLibResolutionStructure (amigamemptr);
+
AmigaListAddTail (AmigaBoardInfo + PSSO_BoardInfo_ResolutionsList, amigamemptr);
}
*/
uae_u32 picasso_SetColorArray (void)
{
- /* Fill in some static UAE related structure about this new CLUT setting
- * We need this for CLUT-based displays, and for mapping CLUT to hi/true colour */
+ /* Fill in some static UAE related structure about this new CLUT setting.
+ * We need this for CLUT-based displays, and for mapping CLUT to hi/true
+ * colour */
+ uaecptr boardinfo = m68k_areg (regs, 0);
uae_u16 start = m68k_dreg (regs, 0);
uae_u16 count = m68k_dreg (regs, 1);
- int i;
- uaecptr boardinfo = m68k_areg (regs, 0);
uaecptr clut = boardinfo + PSSO_BoardInfo_CLUT + start * 3;
int changed = 0;
+ int i;
for (i = start; i < start + count; i++) {
int r = get_byte (clut);
picasso96_state.CLUT[i].Red = r;
picasso96_state.CLUT[i].Green = g;
picasso96_state.CLUT[i].Blue = b;
+
clut += 3;
}
if (changed) {
if (start + count > last_color_changed)
last_color_changed = start + count;
}
- /*write_log ("SetColorArray(%d,%d)\n", start, count); */
return 1;
}
picasso96_state.GC_Depth = get_byte (modeinfo + PSSO_ModeInfo_Depth);
picasso96_state.GC_Flags = get_byte (modeinfo + PSSO_ModeInfo_Flags);
- P96TRACE (("SetGC(%d,%d,%d)\n", picasso96_state.Width, picasso96_state.Height, picasso96_state.GC_Depth));
+ P96TRACE (("SetGC(%d,%d,%d)\n", picasso96_state.Width, picasso96_state.Height,
+ picasso96_state.GC_Depth));
set_gc_called = 1; /* @@@ when do we need to reset this? */
init_picasso_screen ();
wgfx_flushline ();
if (CopyRenderInfoStructureA2U (renderinfo, &ri)) {
- P96TRACE(("InvertRect %dbpp 0x%lx\n", Bpp, (long)mask));
+ P96TRACE (("InvertRect %dbpp 0x%lx\n", Bpp, (long)mask));
if (mask != 0xFF && Bpp > 1)
mask = 0xFF;
if (mask == 0xFF)
do_invertrect (&ri, Bpp, X, Y, Width, Height);
else
- do_blit( &ri, Bpp, X, Y, X, Y, Width, Height, BLIT_SRC, 0);
+ do_blit (&ri, Bpp, X, Y, X, Y, Width, Height, BLIT_SRC, 0);
}
result = 1;
}
memcpy (dst, src, Width * Bpp);
} else {
for (lines = 0; lines < (Height - 1); lines++, dst += ri->BytesPerRow)
- memset( dst, Pen, Width );
+ memset (dst, Pen, Width);
}
}
if (Width == 1) {
for (i = 0; i < Height; i++) {
- if( Bpp == 4 )
+ if (Bpp == 4)
gfxmem_lput (addr + (i * picasso96_state.BytesPerRow), Pen);
else if (Bpp == 2)
gfxmem_wput (addr + (i * picasso96_state.BytesPerRow), Pen);
else if (Bpp == 2)
gfxmem_wput (addr + (i*Bpp), Pen);
else
- gfxmem_bput( addr + (i*Bpp), Pen );
+ gfxmem_bput (addr + (i*Bpp), Pen);
}
}
return 1;
} else {
/* We get here only if Mask != 0xFF */
if (Bpp != 1) {
- write_log( "WARNING - FillRect() has unhandled mask 0x%x with Bpp %d. Using fall-back routine.\n", Mask, Bpp);
+ write_log ("WARNING - FillRect() has unhandled mask 0x%x with Bpp %d. Using fall-back routine.\n", Mask, Bpp);
} else {
Pen &= Mask;
Mask = ~Mask;
/*
-* BlitRect() is a generic (any chunky pixel format) rectangle copier
-* NOTE: If dstri is NULL, then we're only dealing with one RenderInfo area, and called from picasso_BlitRect()
-*
-* OpCodes:
-* 0 = FALSE: dst = 0
-* 1 = NOR: dst = ~(src | dst)
-* 2 = ONLYDST: dst = dst & ~src
-* 3 = NOTSRC: dst = ~src
-* 4 = ONLYSRC: dst = src & ~dst
-* 5 = NOTDST: dst = ~dst
-* 6 = EOR: dst = src^dst
-* 7 = NAND: dst = ~(src & dst)
-* 8 = AND: dst = (src & dst)
-* 9 = NEOR: dst = ~(src ^ dst)
-*10 = DST: dst = dst
-*11 = NOTONLYSRC: dst = ~src | dst
-*12 = SRC: dst = src
-*13 = NOTONLYDST: dst = ~dst | src
-*14 = OR: dst = src | dst
-*15 = TRUE: dst = 0xFF
-*/
+ * BlitRect() is a generic (any chunky pixel format) rectangle copier
+ * NOTE: If dstri is NULL, then we're only dealing with one RenderInfo area, and called from picasso_BlitRect()
+ *
+ * OpCodes:
+ * 0 = FALSE: dst = 0
+ * 1 = NOR: dst = ~(src | dst)
+ * 2 = ONLYDST: dst = dst & ~src
+ * 3 = NOTSRC: dst = ~src
+ * 4 = ONLYSRC: dst = src & ~dst
+ * 5 = NOTDST: dst = ~dst
+ * 6 = EOR: dst = src^dst
+ * 7 = NAND: dst = ~(src & dst)
+ * 8 = AND: dst = (src & dst)
+ * 9 = NEOR: dst = ~(src ^ dst)
+ * 10 = DST: dst = dst
+ * 11 = NOTONLYSRC: dst = ~src | dst
+ * 12 = SRC: dst = src
+ * 13 = NOTONLYDST: dst = ~dst | src
+ * 14 = OR: dst = src | dst
+ * 15 = TRUE: dst = 0xFF
+ */
struct blitdata
{
struct RenderInfo ri_struct;
BLIT_OPCODE opcode;
} blitrectdata;
-STATIC_INLINE int BlitRectHelper( void )
+STATIC_INLINE int BlitRectHelper (void)
{
- struct RenderInfo *ri = blitrectdata.ri;
+ struct RenderInfo *ri = blitrectdata.ri;
struct RenderInfo *dstri = blitrectdata.dstri;
- unsigned long srcx = blitrectdata.srcx;
- unsigned long srcy = blitrectdata.srcy;
- unsigned long dstx = blitrectdata.dstx;
- unsigned long dsty = blitrectdata.dsty;
- unsigned long width = blitrectdata.width;
+ unsigned long srcx = blitrectdata.srcx;
+ unsigned long srcy = blitrectdata.srcy;
+ unsigned long dstx = blitrectdata.dstx;
+ unsigned long dsty = blitrectdata.dsty;
+ unsigned long width = blitrectdata.width;
unsigned long height = blitrectdata.height;
uae_u8 mask = blitrectdata.mask;
BLIT_OPCODE opcode = blitrectdata.opcode;
int can_do_visible_blit = 0;
if (opcode == BLIT_DST) {
- write_log( "WARNING: BlitRect() being called with opcode of BLIT_DST\n" );
+ write_log ("WARNING: BlitRect() being called with opcode of BLIT_DST\n");
return 1;
}
} else
do_blit (dstri, Bpp, dstx, dsty, dstx, dsty, width, height, opcode, 0);
- P96TRACE(("Did do_blit 1 in BlitRect()\n"));
+ P96TRACE (("Did do_blit 1 in BlitRect()\n"));
} else {
- P96TRACE(("Did not do_blit 1 in BlitRect()\n"));
+ P96TRACE (("Did not do_blit 1 in BlitRect()\n"));
}
return 1;
STATIC_INLINE int BlitRect (uaecptr ri, uaecptr dstri,
unsigned long srcx, unsigned long srcy, unsigned long dstx, unsigned long dsty,
- unsigned long width, unsigned long height, uae_u8 mask, BLIT_OPCODE opcode )
+ unsigned long width, unsigned long height, uae_u8 mask, BLIT_OPCODE opcode)
{
/* Set up the params */
- CopyRenderInfoStructureA2U( ri, &blitrectdata.ri_struct );
+ CopyRenderInfoStructureA2U (ri, &blitrectdata.ri_struct);
blitrectdata.ri = &blitrectdata.ri_struct;
if (dstri) {
- CopyRenderInfoStructureA2U( dstri, &blitrectdata.dstri_struct );
+ CopyRenderInfoStructureA2U (dstri, &blitrectdata.dstri_struct);
blitrectdata.dstri = &blitrectdata.dstri_struct;
} else
blitrectdata.dstri = NULL;
wgfx_flushline ();
- P96TRACE(("BlitRect(%d, %d, %d, %d, %d, %d, 0x%x)\n", srcx, srcy, dstx, dsty, width, height, Mask));
+ P96TRACE (("BlitRect(%d, %d, %d, %d, %d, %d, 0x%x)\n", srcx, srcy, dstx, dsty, width, height, Mask));
result = BlitRect (renderinfo, (uaecptr)NULL, srcx, srcy, dstx, dsty, width, height, Mask, BLIT_SRC);
return result;
uae_u32 result = 0;
#ifdef JIT
- special_mem|=picasso_is_special_read|picasso_is_special;
+ special_mem |= picasso_is_special_read|picasso_is_special;
#endif
wgfx_flushline ();
unsigned long Y = (uae_u16)m68k_dreg (regs, 1);
unsigned long W = (uae_u16)m68k_dreg (regs, 2);
unsigned long H = (uae_u16)m68k_dreg (regs, 3);
- uae_u8 Mask = (uae_u8) m68k_dreg (regs, 4);
+ uae_u8 Mask = (uae_u8) m68k_dreg (regs, 4);
uae_u32 RGBFmt = m68k_dreg (regs, 7);
uae_u8 Bpp = GetBytesPerPixel (RGBFmt);
int inversion = 0;
pattern.DrawMode &= 0x03;
if (Mask != 0xFF) {
- if( Bpp > 1 )
+ if (Bpp > 1)
Mask = 0xFF;
- if( pattern.DrawMode == COMP)
+ if (pattern.DrawMode == COMP)
write_log ("WARNING - BlitPattern() has unhandled mask 0x%x with COMP DrawMode. Using fall-back routine.\n", Mask);
else
result = 1;
if (result) {
# ifdef P96TRACING_ENABLED
- DumpPattern(&pattern);
+ DumpPattern (&pattern);
# endif
ysize_mask = (1 << pattern.Size) - 1;
xshift = pattern.XOffset & 15;
uae_u32 result = 0;
#ifdef JIT
- special_mem|=picasso_is_special_read|picasso_is_special;
+ special_mem |= picasso_is_special_read|picasso_is_special;
#endif
wgfx_flushline ();
bitoffset = tmp.XOffset % 8;
-# if defined( P96TRACING_ENABLED ) && ( P96TRACING_LEVEL > 0 )
+# if defined (P96TRACING_ENABLED) && (P96TRACING_LEVEL > 0)
DumpTemplate(&tmp, W, H);
# endif
uae_u32 result = 0;
#ifdef JIT
- special_mem|=picasso_is_special_read|picasso_is_special;
+ special_mem |= picasso_is_special_read|picasso_is_special;
#endif
wgfx_flushline ();
PlanarToDirect (&local_ri, &local_bm, srcx, srcy, dstx, dsty, width, height, Mask, &local_cim);
if (renderinfo_is_current_screen (&local_ri))
- do_blit( &local_ri, GetBytesPerPixel( local_ri.RGBFormat ), dstx, dsty, dstx, dsty, width, height, BLIT_SRC, 0);
+ do_blit (&local_ri, GetBytesPerPixel (local_ri.RGBFormat), dstx, dsty, dstx, dsty, width, height, BLIT_SRC, 0);
result = 1;
}
return result;
uae_u32 *m;
#ifdef JIT
- special_mem|=picasso_is_special_read;
+ special_mem |= picasso_is_special_read;
#endif
- addr -= gfxmem_start & gfxmem_mask;
+ addr -= gfxmem_start;
addr &= gfxmem_mask;
m = (uae_u32 *) (gfxmemory + addr);
return do_get_mem_long (m);
uae_u16 *m;
#ifdef JIT
- special_mem|=picasso_is_special_read;
+ special_mem |= picasso_is_special_read;
#endif
- addr -= gfxmem_start & gfxmem_mask;
+ addr -= gfxmem_start;
addr &= gfxmem_mask;
m = (uae_u16 *) (gfxmemory + addr);
return do_get_mem_word (m);
static uae_u32 REGPARAM2 gfxmem_bget (uaecptr addr)
{
#ifdef JIT
- special_mem|=picasso_is_special_read;
+ special_mem |= picasso_is_special_read;
#endif
- addr -= gfxmem_start & gfxmem_mask;
+ addr -= gfxmem_start;
addr &= gfxmem_mask;
return gfxmemory[addr];
}
uae_u32 *m;
#ifdef JIT
- special_mem|=picasso_is_special;
+ special_mem |= picasso_is_special;
#endif
- addr -= gfxmem_start & gfxmem_mask;
+ addr -= gfxmem_start;
addr &= gfxmem_mask;
m = (uae_u32 *) (gfxmemory + addr);
do_put_mem_long (m, l);
{
uae_u16 *m;
#ifdef JIT
- special_mem|=picasso_is_special;
+ special_mem |= picasso_is_special;
#endif
- addr -= gfxmem_start & gfxmem_mask;
+ addr -= gfxmem_start;
addr &= gfxmem_mask;
m = (uae_u16 *) (gfxmemory + addr);
do_put_mem_word (m, (uae_u16) w);
static void REGPARAM2 gfxmem_bput (uaecptr addr, uae_u32 b)
{
#ifdef JIT
- special_mem|=picasso_is_special;
+ special_mem |= picasso_is_special;
#endif
- addr -= gfxmem_start & gfxmem_mask;
+ addr -= gfxmem_start;
addr &= gfxmem_mask;
gfxmemory[addr] = b;
extern short testCRND ( void );
extern short testDefjam32 ( void );
extern short testDefjam32pro ( void );
+extern short testDefjamCruncher32t (void);
extern short testDoubleAction10 ( void );
extern short testDragpack100 ( void );
extern short testDragpack252 ( void );
extern short testMP_withID ( void );
extern short testMUGICIAN ( void );
extern short testNewtron ( void );
+extern short testNewtronOld ( void );
extern short testNFH ( void );
extern short testNoiserunner ( void );
extern short testNoisepacker1 ( void );
extern short testNoisepacker2 ( void );
extern short testNoisepacker3 ( void );
+extern short testNovoTrade ( void );
extern short testP40A ( void );
extern short testP41A ( void );
extern short testP50A ( void );
/*extern short testPTK ( void );*/
extern short testQuadraComposer ( void );
extern short testSGT ( void );
+extern short testSkizzo ( void );
extern short testSKYT ( void );
extern short testSoundFX13 ( void );
extern short testSoundTracker ( void );
extern short testSTARPACK ( void );
extern short testSTK26 ( void );
extern short testSTIM ( void );
+extern short testStoneArtsPlayer ( void );
extern short testTheDarkDemon ( void );
+extern short testTitanicsPlayer ( void );
extern short testTMK ( void );
extern short testTP1 ( void );
extern short testTP2 ( void );
extern short testTP3 ( void );
-extern short testTreasure ( void );
extern short testUNIC_noID ( void );
extern short testUNIC_withID ( void );
extern short testUNIC_withemptyID ( void );
extern void Rip_MP_noID ( void );
extern void Rip_MP_withID ( void );
extern void Rip_Newtron ( void );
+extern void Rip_NewtronOld ( void );
extern void Rip_NFH ( void );
extern void Rip_Noisepacker1 ( void );
extern void Rip_Noisepacker2 ( void );
extern void Rip_Noisepacker3 ( void );
extern void Rip_Noiserunner ( void );
+extern void Rip_NovoTrade ( void);
extern void Rip_P22A ( void );
extern void Rip_P30A ( void );
extern void Rip_P40A ( void );
/*extern void Rip_PTK ( void );*/
extern void Rip_QuadraComposer ( void );
extern void Rip_SGT ( void );
+extern void Rip_Skizzo ( void );
extern void Rip_SKYT ( void );
extern void Rip_SoundFX13 ( void );
extern void Rip_SoundTracker ( void );
/*extern void Rip_StarTrekker ( void );*/
extern void Rip_STK26 ( void );
extern void Rip_STIM ( void );
+extern void Rip_StoneArtsPlayer ( void );
extern void Rip_TheDarkDemon ( void );
+extern void Rip_TitanicsPlayer ( void );
extern void Rip_TMK ( void );
extern void Rip_TP1 ( void );
extern void Rip_TP2 ( void );
extern void Rip_TP3 ( void );
-extern void Rip_Treasure ( void );
extern void Rip_PRUN2 ( void );
extern void Rip_PRUN1 ( void );
extern void Rip_UNIC_withID ( void );
extern void Depack_KSM ( void );
extern void Depack_MP ( void );
extern void Depack_Newtron ( void );
+extern void Depack_NewtronOld ( void );
extern void Depack_NFH ( void );
extern void Depack_Noiserunner ( void );
extern void Depack_Noisepacker1 ( void );
extern void Depack_Noisepacker2 ( void );
extern void Depack_Noisepacker3 ( void );
+extern void Depack_NovoTrade ( void );
extern void Depack_P22 ( void );
extern void Depack_P30 ( void );
extern void Depack_P40 ( void );
extern void Depack_PRUN2 ( void );
extern void Depack_QuadraComposer ( void );
extern void Depack_SGT ( void );
+extern void Depack_Skizzo ( void );
extern void Depack_SKYT ( void );
extern void Depack_STARPACK ( void );
extern void Depack_STK26 ( void );
extern void Depack_STIM ( void );
+extern void Depack_StoneArtsPlayer ( void );
extern void Depack_TheDarkDemon ( void );
+extern void Depack_TitanicsPlayer ( void );
extern void Depack_TMK ( void );
extern void Depack_TP1 ( void );
extern void Depack_TP2 ( void );
extern void Depack_TP3 ( void );
-extern void Depack_Treasure ( void );
extern void Depack_UNIC ( void );
extern void Depack_UNIC2 ( void );
extern void Depack_WN ( void );
extern short test_smps ( long, long, long, Uchar, Uchar );
extern long PWGetFileSize ( char * );
extern FILE * PW_fopen ( char *, char * );
-extern void fillPTKtable ( Uchar [37][2] );
+extern void fillPTKtable ( Uchar[37][2] );
/* globals */
/* Some say it's badly coding when using Globals ... sure it is, now what's the solution ? */
extern char Extensions[_KNOWN_FORMATS+1][33];
extern Uchar CONVERT;
extern Uchar Amiga_EXE_Header;
+
+extern void write_log (const char *, ...);
\ No newline at end of file
#include <sys/stat.h>
/*#include <gtk/gtk.h>*/
#ifdef DOS
-#include <winsock.h>
+#include <winsock2.h>
+#endif
+#ifdef DMALLOC
+#include "dmalloc.h"
#endif
}
#endif
-#define _KNOWN_FORMATS 130
+#define _KNOWN_FORMATS 135
#define _TYPES_FILENAME "_types_"
#define _TYPES_LINE_LENGHT 256
#define MINIMAL_FILE_LENGHT 64
GNUPacker12,
CrunchmaniaSimple,
dmu,
+ TitanicsPlayer,
+ NewtronOld,
+ NovoTrade,
+ Skizzo,
+ StoneArtsPlayer,
};
-#include "../rippers/globals.h"
-#include "../rippers/extern.h"
-
-extern void write_log (const char *, ...);
+#include "globals.h"
+#include "extern.h"
/*
* at now, when this fonction is called, no global var has been used ...
types_file = fopen ( _TYPES_FILENAME , "rb" );
if ( types_file == NULL )
{
- write_log ( "!!! couldn't find \"%s\" file !. Default extension used.\n"
+ printf ( "!!! couldn't find \"%s\" file !. Default extension used.\n"
, _TYPES_FILENAME );
Support_Types_FileDefault ();
return;
continue;
if ( sizeof ( read_line ) < 2 )
{
- write_log ( "!!! Damaged \"%s\" file at non-commented line %ld\n"
+ printf ( "!!! Damaged \"%s\" file at non-commented line %ld\n"
, _TYPES_FILENAME , PW_i+1 );
PW_i = 99999l;
break;
Extensions[PW_i][cpt] = read_line[cpt];
cpt += 1;
}
- /*write_log ( "[%ld]%ld:%s," , PW_i,ftell (types_file),read_line );*/
+ /*printf ( "[%ld]%ld:%s," , PW_i,ftell (types_file),read_line );*/
PW_i += 1;
if ( PW_i == _KNOWN_FORMATS )
break;
if ( PW_i != _KNOWN_FORMATS )
{
- write_log ( "!!! Damaged \"%s\" file. Missing up %ld extensions definitions\n"
+ printf ( "!!! Damaged \"%s\" file. Missing up %ld extensions definitions\n"
, _TYPES_FILENAME , _KNOWN_FORMATS-(PW_i+1));
Support_Types_FileDefault ();
return;
strcpy ( Extensions[127], "GNUPacker12" );
strcpy ( Extensions[128], "CrunchmaniaSimple" );
strcpy ( Extensions[129], "dmu" );
- strcpy ( Extensions[130], "---" );
+ strcpy ( Extensions[130], "TitanicsPlayer" );
+ strcpy ( Extensions[131], "NewtronOld" );
+ strcpy ( Extensions[132], "NovoTrade" );
+ strcpy ( Extensions[133], "Skizzo" );
+ strcpy ( Extensions[134], "StoneArtsPlayer" );
+ strcpy ( Extensions[135], "---" );
}
+
+
/*
* saving what's found. Mainly music file here.
* PW_Start_Address & OutputSize are global .. not everybody likes
sprintf ( OutName_final , "%ld.%s" , Cpt_Filename , Extensions[FMT_EXT] );
write_log ( " saving in file \"%s\" ... " , OutName_final );
Cpt_Filename += 1;
- PW_out = moduleripper2_fopen ( OutName_final , "w+b", format_to_save);
+ PW_out = moduleripper2_fopen ( OutName_final , "w+b", format_to_save, PW_Start_Address, OutputSize);
+ //PW_out = PW_fopen ( OutName_final , "w+b" );
if (!PW_out)
return;
fwrite ( &in_data[PW_Start_Address] , OutputSize , 1 , PW_out );
{
write_log ( " converting to Protracker ... " );
}
- fflush ( stdout );
+ //fflush ( stdout );
Save_Status = GOOD;
}
sprintf ( OutName_final , "%ld.%s" , Cpt_Filename , Extensions[FMT_EXT] );
write_log ( " saving in file \"%s\" ... " , OutName_final );
Cpt_Filename += 1;
- PW_out = moduleripper2_fopen ( OutName_final , "w+b", format_to_save );
- if (!PW_out)
- return;
+// PW_out = PW_fopen ( OutName_final , "w+b" );
+ PW_out = moduleripper2_fopen ( OutName_final , "w+b", format_to_save, PW_Start_Address, OutputSize );
fwrite ( Header_Block , Block_Size , 1 , PW_out );
fwrite ( &in_data[PW_Start_Address] , OutputSize , 1 , PW_out );
fclose ( PW_out );
write_log ( " Header of this file was missing and has been rebuilt !\n" );
if ( FMT_EXT == DragPack252)
write_log ( " WARNING !: it's a fake header since in this case !!\n" );
- fflush ( stdout );
+ //fflush ( stdout );
Amiga_EXE_Header = GOOD;
Save_Status = GOOD;
}
}
}
+/* writing craps in converted MODs */
+void Crap15 ( char *Format , Uchar Delta , Uchar Pack , FILE *out )
+{
+ fseek ( out , 260 , SEEK_SET );
+ fprintf ( out , "[ Converted with ]" );
+ fseek ( out , 290 , SEEK_SET );
+ fprintf ( out , "[ ProWizard for PC ]" );
+ fseek ( out , 320 , SEEK_SET );
+ fprintf ( out , "[ written by Asle! ]" );
+
+ fseek ( out , 380 , SEEK_SET );
+ fprintf ( out , "[ Original Format: ]" );
+ fseek ( out , 410 , SEEK_SET );
+ fprintf ( out , "[%s]" , Format );
+}
+
/*
* Special version of Test() for cruncher data (Ice! etc...)
* only one file and not hundreds ...
/* e.g. addressing of unassigned data */
if ( ( (long)PW_i + Pack_addy ) > PW_in_size )
{
-/*write_log ( "#0\n" );*/
+/*printf ( "#0\n" );*/
return BAD;
}
if ( (PW_k <= 2) || (PW_l <= 2) )
{
-/*write_log ( "#1\n" );*/
+/*printf ( "#1\n" );*/
return BAD;
}
if ( PW_l > 0x989680 ) /* 10 mb */
{
-/*write_log ( "#2\n" );*/
+/*printf ( "#2\n" );*/
return BAD;
}
if ( PW_k <= PW_l )
{
-/*write_log ( "#3\n" );*/
+/*printf ( "#3\n" );*/
return BAD;
}
if ( PW_k > 0x989689 ) /* 10 Megs ! */
{
-/*write_log ( "#4\n" );*/
+/*printf ( "#4\n" );*/
return BAD;
}
OutputSize = PW_l + Header_Size;
}
- /* write_log ( "\b\b\b\b\b\b\b\b%s file found at %ld !. its size is : %ld\n" , Packer_Name , PW_Start_Address , OutputSize );*/
+ /* printf ( "\b\b\b\b\b\b\b\b%s file found at %ld !. its size is : %ld\n" , Packer_Name , PW_Start_Address , OutputSize );*/
/* OutName[1] = Extensions[Packer_Extension_Define][0];
OutName[2] = Extensions[Packer_Extension_Define][1];
OutName[3] = Extensions[Packer_Extension_Define][2];*/
/* yet again on Xigh's suggestion. How to handle 'correctly' a file size */
-long GetFileSizeX (char * infile)
+long PWGetFileSize (char * infile)
{
long i;
struct stat *Stat;
#if 0
/* Same as fopen() but saves a lot of tests, done only here. */
/* Done to check if the output file could be created */
-FILE * PW_fopen (char *filename, char *fopenargs)
+FILE * PW_fopen (char *filename, char fopenargs[3] )
{
FILE *local_out;
local_out = fopen (filename, fopenargs);
if (local_out == NULL)
{
- write_log ("!!couldn't create the file \"%s\"!\nexiting...",filename);
+ printf ("!!couldn't create the file \"%s\"!\nexiting...",filename);
exit (-1);
}
return local_out;
}
-#endif
+#endif
FILE * PW_fopen (char *filename, char *fopenargs)
{
return moduleripper_fopen (filename, fopenargs);
-#include "../rippers/globals.h"
-#include "../rippers/extern.h"
+#include "globals.h"
+#include "extern.h"
/*
/*
* Pro-Wizard_1.c
*
- * 1997-2006 (c) Sylvain "Asle" Chipaux
+ * 1997-2007 (c) Sylvain "Asle" Chipaux
*
*/
-#include "rippers/globals.h"
-#include "rippers/extern.h"
-#include "rippers/vars.h"
+#include "include/globals.h"
+#include "include/extern.h"
+#include "include/vars.h"
#if 0
in_data = in_data_p;
PW_in_size = PW_in_size_p;
#if 0
- printf ( "\n\n-<([ Pro-Wizard v1.61a ])>-\n\n" );
+ printf ( "\n\n-<([ Pro-Wizard v1.62 ])>-\n\n" );
if ( ac != 2 )
{
}
}
+ /* -GD- Skizzo*/
+ if ( (in_data[PW_i] == 0x2D) &&
+ (in_data[PW_i+1] == 'G') &&
+ (in_data[PW_i+2] == 'D') &&
+ (in_data[PW_i+3] == 0x2D) )
+ {
+ if ( testSkizzo() != BAD )
+ {
+ Rip_Skizzo ();
+ Depack_Skizzo ();
+ continue;
+ }
+ }
+
/* Max Packer 1.2 */
if ((in_data[PW_i] == 0x28) &&
(in_data[PW_i+1] == 0x3C) &&
/* The player 6.0a (packed samples)? */
if ( testP60A_pack() != BAD )
{
+ printf ( "\b\b\b\b\b\b\b\bThe Player 6.0A with PACKED samples found at %ld ... cant rip it!\n" , PW_Start_Address );
/*Rip_P60A ();*/
/*Depack_P60A ();*/
continue;
/* The player 6.1a (packed samples)? */
if ( testP61A_pack() != BAD )
{
+ printf ( "\b\b\b\b\b\b\b\bThe Player 6.1A with PACKED samples found at %ld ... cant rip it!\n" , PW_Start_Address );
/*Rip_P61A ();*/
/*Depack_P61A ();*/
continue;
Depack_Newtron ();
continue;
}
+
+ /* Newtron Old */
+ if ( testNewtronOld() != BAD )
+ {
+ Rip_NewtronOld ();
+ Depack_NewtronOld ();
+ continue;
+ }
+
+ /* Titanics Packer ? */
+ if ( testTitanicsPlayer() != BAD )
+ {
+ Rip_TitanicsPlayer ();
+ Depack_TitanicsPlayer ();
+ continue;
+ }
}
if ( (in_data[PW_i+1] == 0xFA) &&
(in_data[PW_i+2] == 0x02) &&
(in_data[PW_i+3] == 0x8C) &&
- (in_data[PW_i+4] == 0x4B) &&
- (in_data[PW_i+5] == 0xF9) &&
- (in_data[PW_i+6] == 0x00))
+ ((in_data[PW_i+4] == 0x4B) || (in_data[PW_i+4] == 0x9B))&&
+ ((in_data[PW_i+5] == 0xF9) || (in_data[PW_i+5] == 0xCD))&&
+ ((in_data[PW_i+6] == 0x00) || (in_data[PW_i+6] == 0x4E)))
{
if ( testDefjam32() == BAD )
break;
Rip_BSIFutureComposer ();
break;
}
- /* "Fuck" : ID of Noise From Heaven chiptunes */
+ /* "Fuck" : ID of Noise From Heaven chiptunes */
if ( (in_data[PW_i+1] == 'u') &&
(in_data[PW_i+2] == 'c') &&
(in_data[PW_i+3] == 'k') )
if ( testNFH() == BAD )
break;
Rip_NFH ();
- Depack_NFH ();
+ Depack_NFH ();
+ break;
+ }
+ /* "FAST" : ID of Stone Arts Player */
+ if ( (in_data[PW_i+1] == 'A') &&
+ (in_data[PW_i+2] == 'S') &&
+ (in_data[PW_i+3] == 'T') )
+ {
+ if ( testStoneArtsPlayer() == BAD )
+ break;
+ Rip_StoneArtsPlayer ();
+ Depack_StoneArtsPlayer ();
break;
}
#ifdef INCLUDEALL
}
}
+ /*if ( (in_data[PW_i+1] == 'O') &&
+ (in_data[PW_i+2] == 'D') &&
+ (in_data[PW_i+3] == 'U') )
+ {*/
+ /* NovoTrade */
+ /*if ( testNovoTrade() != BAD )
+ {
+ Rip_NovoTrade ();
+ Depack_NovoTrade ();
+ break;
+ }
+ }*/
+
if ( (in_data[PW_i+1] == 'T') &&
(in_data[PW_i+2] == 'N') &&
(in_data[PW_i+3] == 0x00) )
(in_data[PW_i+2] == '2') &&
(in_data[PW_i+3] == '0') )
{
- write_log ( "PowerPacker ID (PP20) found at %ld ... cant rip it!\n" , PW_i );
+ printf ( "PowerPacker ID (PP20) found at %ld ... cant rip it!\n" , PW_i );
break;
}
#endif
Rip_Tetrapack_2_1 ();
break;
}
+
+ /* Defjam Cruncher 3.2T */
+ if ( (in_data[PW_i+1] == 0x00) &&
+ (in_data[PW_i+2] == 0x43) &&
+ (in_data[PW_i+3] == 0xFA) &&
+ (in_data[PW_i+4] == 0x02) &&
+ (in_data[PW_i+5] == 0x8C) &&
+ (in_data[PW_i+6] == 0x4B) &&
+ (in_data[PW_i+7] == 0xF9) &&
+ (in_data[PW_i+8] == 0x00) &&
+ (in_data[PW_i+9] == 0xDF) &&
+ (in_data[PW_i+10] == 0xF1))
+ {
+ if ( testDefjam32t() == BAD )
+ break;
+ Rip_Defjam32 ();
+ break;
+ }
#endif
break;
+ case 0x80:
+ /* Viruz2 8000 */
+/* if ( (in_data[PW_i+1] == 0x00) &&
+ (in_data[PW_i+2] == 0x00) &&
+ (in_data[PW_i+3] == 0x00) &&
+ ((in_data[PW_i+6] == 0x00) || (in_data[PW_i+8] == 0x01)) &&
+ (in_data[PW_i+7] == 0x00) &&
+ (in_data[PW_i+8] == 0x01) &&
+ (in_data[PW_i+9] == 0x00) &&
+ (in_data[PW_i+10] == 0x00) &&
+ (in_data[PW_i+11] == 0x00) &&
+ (in_data[PW_i+12] == 0x00) &&
+ (in_data[PW_i+13] == 0x00) &&
+ (in_data[PW_i+14] == 0x00) &&
+ (in_data[PW_i+16] == 0xAB) &&
+ (in_data[PW_i+17] == 0x05) &&
+ (in_data[PW_i+18] == 0x00) &&
+ (in_data[PW_i+19] == 0x04) &&
+ (in_data[PW_i+20] == 0x04) &&
+ (in_data[PW_i+21] == 0x08) )
+ {
+ if ( testViruz2_80 () == BAD )
+ break;
+ continue;
+ }*/
+ break;
case 0xAC:
/* AC1D packer ?!? */
}
break;
+ case 0xE0:
+
+/* if ( (in_data[PW_i+1] == 0x01) &&
+ (in_data[PW_i+2] == 0x00) &&
+ (in_data[PW_i+3] == 0x00) &&
+ (in_data[PW_i+7] == 0x00) &&
+ (in_data[PW_i+8] == 0x01) &&
+ (in_data[PW_i+9] == 0x00) &&
+ (in_data[PW_i+10] == 0x00) &&
+ (in_data[PW_i+11] == 0x00) &&
+ (in_data[PW_i+12] == 0x00) )
+ {
+ if ( testViruz2_E0 () == BAD )
+ break;
+ continue;
+ }*/
+ break;
+
default: /* do nothing ... save continuing :) */
break;
} /* end of switch */
}
-
#if 0
free ( in_data );
printf ( "\n" );
- printf ( " 1997-2005 (c) Sylvain \"Asle\" Chipaux (asle@free.fr)\n\n");
+ printf ( " 1997-2007 (c) Sylvain \"Asle\" Chipaux (asle@free.fr)\n\n");
+/* getchar();*/
exit ( 0 );
#endif
return 0;
(in_data[PW_Start_Address+6] != 0x00 ) ||
(in_data[PW_Start_Address+7] != 0xDF ) ||
(in_data[PW_Start_Address+8] != 0xF1 ) ||
- (in_data[PW_Start_Address+9] != 0x80 ) ||
(in_data[PW_Start_Address+10] != 0x41 ) ||
(in_data[PW_Start_Address+11] != 0xFA ) ||
(in_data[PW_Start_Address+12] != 0x00 ) ||
}
if ( Save_Status == GOOD )
- PW_i += (OutputSize - 173); /* 171 should do but call it "just to be sure" :) */
+ PW_i += 173; /* 171 should do but call it "just to be sure" :) */
}
void Rip_ByteKiller30 ( void )
}
if ( Save_Status == GOOD )
- PW_i += (OutputSize - 36); /* 32 should do but call it "just to be sure" :) */
+ PW_i += 36; /* 32 should do but call it "just to be sure" :) */
}
}
if ( Save_Status == GOOD )
- PW_i += (OutputSize - 54); /* 51 should do but call it "just to be sure" :) */
+ PW_i += 54; /* 51 should do but call it "just to be sure" :) */
}
/* testDefjam32() */
/* testDefjam32pro() */
+/* testDefjam32t() */
/* Rip_Defjam32() */
#include "globals.h"
}
+short testDefjam32t ( void )
+{
+
+ PW_Start_Address = PW_i;
+
+ if ( (in_data[PW_Start_Address+12] != 0x28 ) ||
+ (in_data[PW_Start_Address+13] != 0x7A ) ||
+ (in_data[PW_Start_Address+14] != 0x01 ) ||
+ (in_data[PW_Start_Address+15] != 0x54 ) ||
+ (in_data[PW_Start_Address+16] != 0x20 ) ||
+ (in_data[PW_Start_Address+17] != 0x4C ) ||
+ (in_data[PW_Start_Address+18] != 0xD1 ) ||
+ (in_data[PW_Start_Address+19] != 0xFC ) )
+ {
+ /* should be enough :))) */
+/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
+ return BAD;
+
+ }
+
+
+ /* packed size */
+ PW_l = ( (in_data[PW_Start_Address+20]*256*256*256) +
+ (in_data[PW_Start_Address+21]*256*256) +
+ (in_data[PW_Start_Address+22]*256) +
+ in_data[PW_Start_Address+23] );
+
+ PW_l += 692;
+
+ if ( PW_i >= 32 )
+ {
+ if ( (in_data[PW_Start_Address-32] != 0x00 ) ||
+ (in_data[PW_Start_Address-31] != 0x00 ) ||
+ (in_data[PW_Start_Address-30] != 0x03 ) ||
+ (in_data[PW_Start_Address-29] != 0xF3 ) ||
+ (in_data[PW_Start_Address-28] != 0x00 ) ||
+ (in_data[PW_Start_Address-27] != 0x00 ) ||
+ (in_data[PW_Start_Address-26] != 0x00 ) ||
+ (in_data[PW_Start_Address-25] != 0x00 ) ||
+ (in_data[PW_Start_Address-24] != 0x00 ) ||
+ (in_data[PW_Start_Address-23] != 0x00 ) ||
+ (in_data[PW_Start_Address-22] != 0x00 ) ||
+ (in_data[PW_Start_Address-21] != 0x01 ) ||
+ (in_data[PW_Start_Address-20] != 0x00 ) ||
+ (in_data[PW_Start_Address-19] != 0x00 ) ||
+ (in_data[PW_Start_Address-18] != 0x00 ) ||
+ (in_data[PW_Start_Address-17] != 0x00 ) )
+ {
+ Amiga_EXE_Header = BAD;
+ }
+ else
+ Amiga_EXE_Header = GOOD;
+ }
+ else
+ Amiga_EXE_Header = BAD;
+
+
+ return GOOD;
+ /* PW_l is the size of the pack */
+}
+
+
void Rip_Defjam32 ( void )
{
/* PW_l is still the whole size */
in_data[PW_Start_Address+OutputSize-2] = 0x03;
in_data[PW_Start_Address+OutputSize-1] = 0xF2;
- Save_Rip_Special ( "Defjam Cruncher 3.2 / pro Exe-file", Defjam_32, Amiga_EXE_Header_Block , 32 );
+ Save_Rip_Special ( "Defjam Cruncher 3.2 / pro / t Exe-file", Defjam_32, Amiga_EXE_Header_Block , 32 );
free ( Amiga_EXE_Header_Block );
}
else
{
PW_Start_Address -= 32;
- Save_Rip ( "Defjam Cruncher 3.2 / pro Exe-file", Defjam_32 );
+ Save_Rip ( "Defjam Cruncher 3.2 / pro / t Exe-file", Defjam_32 );
}
if ( Save_Status == GOOD )
{
samp = (in_data[Where]>>4)&0x0f;
if ( samp & 0x08 ) samp -= 0x10;
- Whatever[k] = (Whatever[k-1] + samp); k++;
+ Whatever[k++] = (Whatever[k-1] + samp);
samp = in_data[Where] & 0x0f;
if ( samp & 0x08 ) samp -= 0x10;
- Whatever[k] = (Whatever[k-1] + samp); k++;
+ Whatever[k++] = (Whatever[k-1] + samp);
Where += 1;
}
Where -= 1;
Save_Rip ( "Module Protector Packed music", Module_protector );
if ( Save_Status == GOOD )
- PW_i += (OutputSize - 5); /* 4 should do but call it "just to be sure" :) */
+ PW_i += 3; /* 4 should do but call it "just to be sure" :) */
}
/*
- * newtron.c ... 9 mar 2003
+ * newtron.c ... 9 mar 2003/21 jan 2007
*/
/* testNewtron() */
/* Rip_Newtron() */
}
/*
- * newtron.c 2003 (c) Asle / ReDoX
+ * newtron.c 2003-2007 (c) Asle / ReDoX
*
* Converts Newtron packed MODs back to PTK MODs
*
* Last update: 09 mar 2003
+ * fixed again : 21 jan 2007
*/
void Depack_Newtron ( void )
/* title */
fwrite ( Whatever , 20 , 1 , out );
- Where = 4;
+ Where += 4;
for ( i=0 ; i<31 ; i++ )
{
/*printf ( "Whole sample size : %ld\n" , Total_Sample_Size );*/
/* pattern table lenght & Ntk byte */
- fwrite ( &in_data[0] , 1 , 1 , out );
+ fwrite ( &in_data[PW_Start_Address] , 1 , 1 , out );
Whatever[0] = 0x7f;
fwrite ( &Whatever[0] , 1 , 1 , out );
--- /dev/null
+/*
+ * newtronold.c ... 21 jan 2007
+*/
+/* testNewtronOld() */
+/* Rip_NewtronOld() */
+/* Depack_NewtronOld() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+short testNewtronOld ( void )
+{
+ /* test #1 */
+ if ( (PW_i < 11) || ((PW_i+6+1+1024+2)>PW_in_size))
+ {
+ return BAD;
+ }
+
+ /* test #1.5 */
+ PW_Start_Address = PW_i-11;
+ if ( in_data[PW_Start_Address+2] != 0x00 )
+ {
+ return BAD;
+ }
+
+ /* test #2 */
+ PW_l=(in_data[PW_Start_Address]*256)+in_data[PW_Start_Address+1]+8;
+ PW_l = (PW_l/8)-1;
+ PW_WholeSampleSize = 0;
+ for ( PW_j=0 ; PW_j<PW_l ; PW_j+=1 )
+ {
+ /* size */
+ PW_k = (((in_data[PW_Start_Address+8+8*PW_j]*256)+in_data[PW_Start_Address+9+8*PW_j])*2);
+ /* loop start */
+ PW_m = (((in_data[PW_Start_Address+12+8*PW_j]*256)+in_data[PW_Start_Address+13+8*PW_j])*2);
+ /* loop size */
+ PW_n = (((in_data[PW_Start_Address+14+8*PW_j]*256)+in_data[PW_Start_Address+15+8*PW_j])*2);
+ PW_WholeSampleSize += PW_k;
+
+ if ( test_smps(PW_k, PW_m, PW_n, in_data[PW_Start_Address+11+8*PW_j], in_data[PW_Start_Address+10+8*PW_j] ) == BAD )
+ {
+ /*printf ( "#2 (start:%ld),(siz:%ld)(loopstart:%ld)(lsiz:%ld)(vol:%d)(fine:%d)(where:%ld)(PW_j:%ld)\n"
+ ,PW_Start_Address,PW_k,PW_m,PW_n, in_data[PW_Start_Address+11+8*PW_j], in_data[PW_Start_Address+10+8*PW_j]
+ ,PW_j*8+8+PW_Start_Address,PW_j );*/
+ return BAD;
+ }
+ if ( (PW_k==0) && (PW_m==0) && (PW_n==0))
+ return BAD;
+ }
+
+ if ( PW_WholeSampleSize <= 2 )
+ {
+ /*printf( "#3\n" );*/
+ return BAD;
+ }
+
+ /* test #4 */
+ PW_l = in_data[PW_Start_Address+3];
+ if ( (PW_l > 0x7f) || (PW_l == 0x00) )
+ {
+ /*printf( "#4 (start:%ld)(indata[0]:%x)\n",PW_Start_Address,in_data[PW_Start_Address] );*/
+ return BAD;
+ }
+
+ /* test #5 */
+ /* PW_l is the size of the patternlist */
+ PW_k = (in_data[PW_Start_Address]*256)+in_data[PW_Start_Address+1]+8;
+ /* PW_k is the patternlist addy */
+ if (((PW_k/8)*8) != PW_k)
+ {
+ /*printf( "#5.0\n" );*/
+ return BAD;
+ }
+
+ PW_m = 0;
+ for ( PW_j=0 ; PW_j<PW_l ; PW_j++ )
+ {
+ if ( in_data[PW_Start_Address+PW_k+PW_j] > PW_m )
+ PW_m = in_data[PW_Start_Address+PW_k+PW_j];
+ if ( in_data[PW_Start_Address+PW_k+PW_j] > 0x7f )
+ {
+ /*printf( "#5.1 (PW_l:%lx)(PW_k:%lx)(Where:%ld)(val:%x)\n",PW_l,PW_k,PW_Start_Address+PW_k+PW_j,in_data[PW_Start_Address+PW_k+PW_j]);*/
+ return BAD;
+ }
+ }
+ PW_m += 1;
+
+ /* #6 */
+ /* PW_l is the size of the patternlist */
+ /* PW_m contains the number of pattern saved */
+ if ( ((PW_m*1024) + PW_k + PW_l + PW_Start_Address) > PW_in_size)
+ {
+ return BAD;
+ }
+
+ /* test #7 ptk notes .. gosh ! (testing all patterns !) */
+ /* PW_k is the patternlist addy */
+ /* PW_l is the size of the patternlist */
+ /* PW_m contains the number of pattern saved */
+ /* PW_WholeSampleSize is the whole sample size */
+ PW_k += PW_l;
+ /* PW_k is now the pat data addy */
+ for ( PW_j=0 ; PW_j<(256*PW_m) ; PW_j++ )
+ {
+ PW_l = in_data[PW_Start_Address+PW_k+PW_j*4];
+ if ( PW_l > 19 ) /* 0x13 */
+ {
+ /*printf( "#7,0\n" );*/
+ return BAD;
+ }
+ PW_n = in_data[PW_Start_Address+PW_k+PW_j*4]&0x0f;
+ PW_n *= 256;
+ PW_n += in_data[PW_Start_Address+PW_k+1+PW_j*4];
+ if ( (PW_n > 0) && (PW_n<0x71) )
+ {
+ /*printf ( "#7,1 (Start:%ld)(where:%ld)(note:%ld)\n" , PW_Start_Address,PW_Start_Address+PW_k+PW_j*4, PW_WholeSampleSize );*/
+ return BAD;
+ }
+ }
+
+ return GOOD;
+}
+
+
+
+void Rip_NewtronOld ( void )
+{
+ /* PW_WholeSampleSize is the whole sample size :) */
+ /* PW_m contains the number of pattern saved */
+ /* PW_k is the pat data addy */
+
+ OutputSize = PW_k + PW_WholeSampleSize + (PW_m*1024);
+
+ CONVERT = GOOD;
+ Save_Rip ( "Newtron module Old", NewtronOld );
+
+ if ( Save_Status == GOOD )
+ PW_i += 11;
+}
+
+/*
+ * newtronold.c 2007 (c) Asle / ReDoX
+ *
+ * Converts Newtron Old packed MODs back to PTK MODs
+ *
+*/
+
+void Depack_NewtronOld ( void )
+{
+ Uchar *Whatever;
+ long i=0,j=0;
+ long Total_Sample_Size=0;
+ long Where = PW_Start_Address;
+ long patlistaddy=0;
+ Uchar patsize = 0;
+ Uchar max=0x00;
+ FILE *out;
+
+ if ( Save_Status == BAD )
+ return;
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_fopen ( Depacked_OutName , "w+b" );
+
+ Whatever = (Uchar *) malloc (130);
+ BZERO ( Whatever , 130 );
+
+ /* title */
+ fwrite ( Whatever , 20 , 1 , out );
+
+ /* size of header */
+ patlistaddy = (in_data[Where]*256)+in_data[Where+1]+8;
+ /* nbr of samples */
+ j = (patlistaddy/8)-1;
+
+ Where += 8;
+
+ for ( i=0 ; i<j ; i++ )
+ {
+ /*sample name*/
+ fwrite ( Whatever , 22 , 1 , out );
+
+ Total_Sample_Size += (((in_data[Where]*256)+in_data[Where+1])*2);
+ fwrite ( &in_data[Where] , 8 , 1 , out );
+ Where += 8;
+ }
+ Whatever[29] = 0x01;
+ while (i++<31)
+ fwrite (&Whatever[0],30,1,out);
+ /*printf ( "Whole sample size : %ld\n" , Total_Sample_Size );*/
+
+ /* pattern table lenght & Ntk byte */
+ patsize = in_data[PW_Start_Address+3];
+ fwrite ( &patsize , 1 , 1 , out );
+ Whatever[0] = 0x7f;
+ fwrite ( &Whatever[0] , 1 , 1 , out );
+
+ Where = patlistaddy+PW_Start_Address;
+ BZERO ( Whatever , 130 );
+ for ( i=0 ; i<patsize ; i++ )
+ {
+ if ( in_data[Where+i] > max )
+ max = in_data[Where+i];
+ Whatever[i] = in_data[Where+i];
+ }
+ fwrite ( &Whatever[0] , 128 , 1 , out );
+ Where += patsize;
+ /*printf ( "Number of pattern : %d\n" , Max+1 );*/
+
+ Whatever[0] = 'M';
+ Whatever[1] = '.';
+ Whatever[2] = 'K';
+ Whatever[3] = '.';
+ fwrite ( Whatever , 4 , 1 , out );
+
+ /* pattern data */
+ i = (max+1)*1024;
+ fwrite ( &in_data[Where] , i , 1 , out );
+ Where += i;
+ free ( Whatever );
+
+ /* sample data */
+ fwrite ( &in_data[Where] , Total_Sample_Size , 1 , out );
+
+ Crap ( " Newtron old " , BAD , BAD , out );
+
+ fflush ( out );
+ fclose ( out );
+
+ printf ( "done\n" );
+ return; /* useless ... but */
+}
--- /dev/null
+/* (5th of may 2007)
+*/
+/* testNovoTrade() */
+/* Rip_NovoTrade() */
+/* Depack_NovoTrade() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+short testNovoTrade ( void )
+{
+ /* test #1 */
+ PW_Start_Address = PW_i;
+ if ((PW_i + 38) > PW_in_size)
+ {
+ /*printf ("[1] PW_Start_Address : %ld\n", PW_Start_Address);*/
+ return BAD;
+ }
+ PW_j = (in_data[PW_Start_Address+20]*256)+in_data[PW_Start_Address+21] + 4;
+ if ((PW_i + PW_j + 4) > PW_in_size)
+ {
+ /*printf ("[2] PW_Start_Address : %ld\n", PW_Start_Address);*/
+ return BAD;
+ }
+ PW_k = (in_data[PW_Start_Address+28]*256)+in_data[PW_Start_Address+29] + PW_j + 4;
+ if ((PW_i + PW_k + 2) > PW_in_size)
+ {
+ /*printf ("[3] PW_Start_Address : %ld\n", PW_Start_Address);*/
+ return BAD;
+ }
+ /* PW_j is on "BODY" tag */
+ /* PW_k is on "SAMP" tag */
+
+ /* test #2 let's verify */
+ if ( (in_data[PW_Start_Address+PW_j] != 'B') &&
+ (in_data[PW_Start_Address+PW_j+1] != 'O') &&
+ (in_data[PW_Start_Address+PW_j+2] != 'D') &&
+ (in_data[PW_Start_Address+PW_j+3] != 'Y'))
+ {
+ /*printf ("[4] PW_Start_Address : %ld\n", PW_Start_Address);*/
+ return BAD;
+ }
+ if ( (in_data[PW_Start_Address+PW_k] != 'S') &&
+ (in_data[PW_Start_Address+PW_k+1] != 'A') &&
+ (in_data[PW_Start_Address+PW_k+2] != 'M') &&
+ (in_data[PW_Start_Address+PW_k+3] != 'P'))
+ {
+ /*printf ("[5] (start)%ld, (BODY)%lx, (at)%lx\n", PW_Start_Address,PW_j,PW_k);*/
+ return BAD;
+ }
+
+ /* no much but should be enough :) */
+ return GOOD;
+}
+
+
+void Rip_NovoTrade ( void )
+{
+ /* get nbr sample */
+ PW_j = (in_data[PW_Start_Address+22]*256)+in_data[PW_Start_Address+23];
+ /* get BODY addy */
+ PW_m = (in_data[PW_Start_Address+20]*256)+in_data[PW_Start_Address+21] + 4;
+ /* get SAMP addy */
+ PW_k = (in_data[PW_Start_Address+28]*256)+in_data[PW_Start_Address+29] + PW_m + 4;
+ PW_WholeSampleSize = 0;
+ for ( PW_l=0 ; PW_l<PW_j ; PW_l++ )
+ PW_WholeSampleSize += ((in_data[32+(PW_l*8)]*256)+in_data[33+(PW_l*8)])*2;
+
+ OutputSize = PW_WholeSampleSize + PW_k + 4;
+
+ CONVERT = GOOD;
+ Save_Rip ( "NovoTrade Packed music", NovoTrade );
+
+ if ( Save_Status == GOOD )
+ PW_i += 1;
+}
+
+
+/*
+ * NovoTrade.c 2007 (c) Asle / ReDoX
+ *
+ * 20070505 : doesn't convert pattern data
+*/
+void Depack_NovoTrade ( void )
+{
+ Uchar *Whatever;
+ long i=0,k=0;
+ Ushort Pattern_Addresses_Table[128];
+ short BODYaddy, SAMPaddy, nbr_sample, siz_patlist, nbr_patstored;
+ long Total_Sample_Size=0;
+ long Where = PW_Start_Address;
+ FILE *out;/*,*DEBUG;*/
+
+ /*DEBUG = fopen("DEBUG.txt","w+b");*/
+
+ if ( Save_Status == BAD )
+ return;
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_fopen ( Depacked_OutName , "w+b" );
+
+ Where += 4;
+ /* title */
+ Whatever = (Uchar *) malloc (2048);
+ BZERO ( Whatever , 2048 );
+ fwrite ( &in_data[Where], 16, 1, out );
+ fwrite ( Whatever, 4, 1, out);
+ Where += 16;
+
+ /* get 'BODY' addy */
+ BODYaddy = (in_data[Where]*256)+in_data[Where+1] + 4;
+ Where += 2;
+ /*printf ( "addy of 'BODY' : %ld\n" , k );*/
+
+ /* number of sample */
+ nbr_sample = (in_data[Where]*256)+in_data[Where+1];
+ Where += 2;
+
+ /* size of the pattern list */
+ siz_patlist = (in_data[Where]*256)+in_data[Where+1];
+ Where += 2;
+
+ /* number of pattern stored */
+ nbr_patstored = (in_data[Where]*256)+in_data[Where+1];
+ Where += 2;
+
+ /* get 'SAMP' addy */
+ SAMPaddy = (in_data[Where]*256)+in_data[Where+1] + BODYaddy + 4;
+ Where += 2;
+
+ /* sample header */
+ BZERO ( Whatever, 2048 );
+ for ( i=0 ; i<nbr_sample ; i++ )
+ {
+ /* in_data[Where] is the sample ref */
+ /* volume */
+ Whatever[25+(in_data[Where]*30)] = in_data[Where+1];
+ /* size */
+ Whatever[22+(in_data[Where]*30)] = in_data[Where+2];
+ Whatever[23+(in_data[Where]*30)] = in_data[Where+3];
+ Total_Sample_Size += ((in_data[Where+2]*256)+in_data[Where+3])*2;
+ /* loop start */
+ Whatever[26+(in_data[Where]*30)] = in_data[Where+4];
+ Whatever[27+(in_data[Where]*30)] = in_data[Where+5];
+ /* loop size */
+ Whatever[28+(in_data[Where]*30)] = in_data[Where+6];
+ Whatever[29+(in_data[Where]*30)] = in_data[Where+7];
+ Where += 8;
+ }
+ fwrite ( Whatever , 930 , 1 , out );
+
+ /* pattern list now */
+ /* Where is on it */
+ BZERO ( Whatever, 2048 );
+ for ( i=2; i<siz_patlist+2; i++ )
+ {
+ Whatever[i] = in_data[Where+1];
+ Where += 2;
+ }
+ Whatever[0] = (Uchar)siz_patlist;
+ Whatever[1] = 0x7F;
+ fwrite ( Whatever , 130 , 1 , out );
+
+ /* pattern addresses now */
+ /* Where is on it */
+ BZERO ( Pattern_Addresses_Table , 128*2 );
+ for ( i=0; i<nbr_patstored; i++ )
+ {
+ Pattern_Addresses_Table[i] = (in_data[Where]*256)+in_data[Where+1];
+ Where += 2;
+ }
+
+ /* PTK's tag now*/
+ Whatever[0] = 'M';
+ Whatever[1] = '.';
+ Whatever[2] = 'K';
+ Whatever[3] = '.';
+ fwrite ( Whatever , 4 , 1 , out );
+
+/*fprintf(DEBUG,"BODYaddy : %d\n",BODYaddy);
+fprintf(DEBUG,"SAMPaddy : %d\n",SAMPaddy);
+fprintf(DEBUG,"nbr_sample : %d\n",nbr_sample);
+fprintf(DEBUG,"siz_patlist : %d\n",siz_patlist);
+fprintf(DEBUG,"nbr_patstored : %d\n\n",nbr_patstored);*/
+
+ /* pattern data now ... *gee* */
+ Where += 4;
+ for ( i=0 ; i<nbr_patstored ; i++ )
+/* for ( i=0 ; i<2 ; i++ )*/
+ {
+/*fprintf(DEBUG,"\n-------pat %ld----\n",i);*/
+ Where = BODYaddy + 4 + Pattern_Addresses_Table[i];
+/*fprintf(DEBUG,"@ in file : %ld\n",Where);*/
+ for ( k=0; k<1024; k++ )
+ {
+ if (in_data[Where+1] == 0x80)
+ {
+/*fprintf(DEBUG,"[%-4ld] %2x-%2x <-- end of pattern\n",k,in_data[Where],in_data[Where+1]);/*
+ /* pattern ends */
+ Where += 2;
+ k += 1;
+ break;
+ }
+ if (in_data[Where+1] == 0x01)
+ {
+/*fprintf(DEBUG,"[%-4ld] %2x-%2x <-- ?!? unknown case\n",k,in_data[Where],in_data[Where+1]);*/
+ /* pattern ends */
+ Where += 2;
+ k += 1;
+ break;
+ }
+ if ((in_data[Where] == 0x00) && (in_data[Where+1]<=0x70))
+ {
+/*fprintf(DEBUG,"[%-4ld] %2x-%2x <-- bypass %ld notes\n",k,in_data[Where],in_data[Where+1],in_data[Where+1]+1);*/
+ /* bypass notes .. guess */
+ k += (in_data[Where+1]+1)-1;
+ Where += 2;
+ continue;
+ }
+/*fprintf(DEBUG,"[%-4ld] %2x-%2x-%2x-%2x\n",k,in_data[Where],in_data[Where+1],in_data[Where+2],in_data[Where+3]);*/
+ Whatever[k*4] = in_data[Where];
+ Whatever[k*4+1] = in_data[Where+1];
+ Whatever[k*4+2] = in_data[Where+2];
+ Whatever[k*4+3] = in_data[Where+3];
+ k += 3;
+ Where += 4;
+ }
+/*fprintf(DEBUG,"\nEND OF LOOP ?!?\n");*/
+/* fwrite ( Whatever , 1024 , 1 , out );*/
+ }
+ free ( Whatever );
+
+
+ Where = PW_Start_Address + SAMPaddy;
+ fwrite ( &in_data[Where] , Total_Sample_Size , 1 , out );
+
+ Crap ( " NovoTrade Packer " , BAD , BAD , out );
+
+/* fflush ( DEBUG );*/
+/* fclose ( DEBUG );*/
+ fflush ( out );
+ fclose ( out );
+
+ printf ( "done\n" );
+ return; /* useless ... but */
+
+}
PW_n = (((in_data[PW_Start_Address+48+30*PW_j]*256)+in_data[PW_Start_Address+49+30*PW_j])*2);
PW_WholeSampleSize += PW_k;
- if ( test_smps(PW_k, PW_m, PW_n, in_data[PW_Start_Address+45+30*PW_j], in_data[PW_Start_Address+44+30*PW_j] ) == BAD )
+ if ( test_smps(PW_k, PW_m/2, PW_n, in_data[PW_Start_Address+45+30*PW_j], in_data[PW_Start_Address+44+30*PW_j] ) == BAD )
{
/* printf ("#2 (start:%ld)(siz:%ld)(lstart:%ld)(lsiz:%ld)(vol:%d)(fine:%d)(Where:%ld)\n"
,PW_Start_Address,PW_k,PW_m,PW_n
/* test 2 */
PW_Start_Address = PW_i-1080;
- if ( in_data[PW_Start_Address+951] != 0x7f )
+ if ( (in_data[PW_Start_Address+951] != 0x7f) && (in_data[PW_Start_Address+951] != 0x00) )
{
return BAD;
}
/*
* SGT-Packer.c 2006 (c) Asle
- * ! STILL UNDER DEV !
+ *
*/
void Depack_SGT ( void )
--- /dev/null
+/* testStoneArtsPlayer() */
+/* Rip_StoneArtsPlayer() */
+/* Depack_StoneArtsPlayer() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+short testStoneArtsPlayer ( void )
+{
+ /* test 1 */
+ if ( PW_i < 1080 )
+ {
+ return BAD;
+ }
+
+ /* test 2 - ntk byte */
+ PW_Start_Address = PW_i-1080;
+ if ( (in_data[PW_Start_Address+951] != 0x7f) && (in_data[PW_Start_Address+951] != 0x00) )
+ {
+ return BAD;
+ }
+
+ /* test 3 - patternlist size */
+ if ( in_data[PW_Start_Address+950] > 0x7f )
+ {
+ return BAD;
+ }
+
+ for ( PW_k=0 ; PW_k<31 ; PW_k++ )
+ {
+ /* size */
+ PW_j = (((in_data[PW_Start_Address+42+PW_k*30]*256)+in_data[PW_Start_Address+43+PW_k*30])*2);
+ /* loop start */
+ PW_m = (((in_data[PW_Start_Address+46+PW_k*30]*256)+in_data[PW_Start_Address+47+PW_k*30])*2);
+ /* loop size */
+ PW_n = (((in_data[PW_Start_Address+48+PW_k*30]*256)+in_data[PW_Start_Address+49+PW_k*30])*2);
+
+ if ( test_smps(PW_j*2, PW_m, PW_n, in_data[PW_Start_Address+45+30*PW_k], in_data[PW_Start_Address+44+30*PW_k] ) == BAD )
+ {
+ /*printf ( "start : %ld\n", PW_Start_Address );*/
+ return BAD;
+ }
+
+ PW_WholeSampleSize += PW_j;
+ }
+
+ return GOOD;
+}
+
+
+
+void Rip_StoneArtsPlayer ( void )
+{
+ /* PW_WholeSampleSize is already the whole sample size */
+ PW_l=0;
+ for ( PW_k=0 ; PW_k<128 ; PW_k++ )
+ if ( in_data[PW_Start_Address+952+PW_k] > PW_l )
+ PW_l = in_data[PW_Start_Address+952+PW_k];
+ PW_l += 1;
+ OutputSize = (PW_l*1024) + 1084 + PW_WholeSampleSize;
+
+ CONVERT = GOOD;
+ Save_Rip ( "Stone Arts Player module", StoneArtsPlayer );
+
+ if ( Save_Status == GOOD )
+ PW_i += 1082; /* 1080 could be enough */
+}
+
+
+
+/*
+ * StoneArtsPlayer.c 2007 (c) Asle
+ *
+ * Converts MODs converted with Stone Arts Player
+ *
+ * example module provided by Muerto ;)
+*/
+void Depack_StoneArtsPlayer ( void )
+{
+ Uchar *Whatever;
+ Uchar poss[37][2];
+ Uchar Max=0x00;
+ long WholeSampleSize=0;
+ long i=0,j=0;
+ long Where=PW_Start_Address;
+ FILE *out;
+
+ fillPTKtable(poss);
+
+ if ( Save_Status == BAD )
+ return;
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_fopen ( Depacked_OutName , "w+b" );
+
+ /* read and write whole header */
+ fwrite ( &in_data[Where] , 950 , 1 , out );
+
+ /* get whole sample size */
+ for ( i=0 ; i<31 ; i++ )
+ {
+ WholeSampleSize += (((in_data[Where+42+i*30]*256)+in_data[Where+43+i*30])*2);
+ }
+ /*printf ( "Whole sanple size : %ld\n" , WholeSampleSize );*/
+
+ /* read and write size of pattern list */
+ /* read and write ntk byte and pattern list */
+ fwrite ( &in_data[Where+950] , 130 , 1 , out );
+ Where += 952;
+
+ /* write ID */
+ Whatever = (Uchar *) malloc (4);
+ Whatever[0] = 'M';
+ Whatever[1] = '.';
+ Whatever[2] = 'K';
+ Whatever[3] = '.';
+ fwrite ( Whatever , 4 , 1 , out );
+
+ /* get number of pattern */
+ Max = 0x00;
+ for ( i=0 ; i<128 ; i++ )
+ {
+ if ( in_data[Where+i] > Max )
+ Max = in_data[Where+i];
+ }
+ /*printf ( "Number of pattern : %d\n" , Max );*/
+
+ /* pattern data */
+ Where = PW_Start_Address + 1084;
+ for ( i=0 ; i<=Max ; i++ )
+ {
+ for ( j=0 ; j<256 ; j++ )
+ {
+ Whatever[0] = in_data[Where];
+ Whatever[2] = in_data[Where+2];
+ Whatever[3] = in_data[Where+3];
+ Whatever[0] |= poss[in_data[Where+1]/2][0];
+ Whatever[1] = poss[in_data[Where+1]/2][1];
+ fwrite ( Whatever , 4 , 1 , out );
+ Where += 4;
+ }
+ }
+ free ( Whatever );
+
+
+ /* sample data */
+ fwrite ( &in_data[Where] , WholeSampleSize , 1 , out );
+
+
+ /* crap */
+ Crap ( "Stone Arts Player " , BAD , BAD , out );
+
+ fflush ( out );
+ fclose ( out );
+
+ printf ( "done\n" );
+ return; /* useless ... but */
+}
+
Save_Rip ( "The Player 6.1A module", P61A );
if ( Save_Status == GOOD )
- PW_i += (OutputSize - 12); /* 7 should do but call it "just to be sure" :) */
+ PW_i += 12; /* 7 should do but call it "just to be sure" :) */
}
--- /dev/null
+/* testTitanicsPlayer() */
+/* Rip_TitanicsPlayer() */
+/* Depack_TitanicsPlayer() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+short testTitanicsPlayer ( void )
+{
+ if ( PW_i < 7 )
+ return BAD;
+ PW_Start_Address = PW_i-7;
+
+ /* test samples */
+ PW_n = PW_WholeSampleSize = 0;
+ for ( PW_k=0 ; PW_k<15 ; PW_k++ )
+ {
+ if ( in_data[PW_Start_Address+7+PW_k*12] > 0x40 )
+ {
+ /*printf ("#1 : (start : %ld)\n",PW_Start_Address);*/
+ return BAD;
+ }
+ if ( in_data[PW_Start_Address+6+PW_k*12] != 0x00 )
+ {
+ /*printf ("#1.1 : (start : %ld)\n",PW_Start_Address);*/
+ return BAD;
+ }
+
+ PW_o = ((in_data[PW_Start_Address+PW_k*12]*256*256*256) +
+ (in_data[PW_Start_Address+1+PW_k*12]*256*256)+
+ (in_data[PW_Start_Address+2+PW_k*12]*256)+
+ in_data[PW_Start_Address+3+PW_k*12]);
+ if ((PW_o > PW_in_size) || ((PW_o < 180) && (PW_o != 0)))
+ {
+ /*printf ("#1.2 : (start : %ld)(PW_o:%ld)(sample:%ld)\n",PW_Start_Address,PW_o,PW_k);*/
+ return BAD;
+ }
+
+ /* size */
+ PW_j = (in_data[PW_Start_Address+4+PW_k*12]*256) + in_data[PW_Start_Address+5+PW_k*12];
+ /* loop start */
+ PW_l = (in_data[PW_Start_Address+8+PW_k*12]*256) + in_data[PW_Start_Address+9+PW_k*12];
+ /* loop size */
+ PW_m = (in_data[PW_Start_Address+10+PW_k*12]*256) + in_data[PW_Start_Address+11+PW_k*12];
+ if ( (PW_l>PW_j) || (PW_m>PW_j+1) || (PW_j>32768))
+ {
+ /*printf ("#2 : (start : %ld) (smpsize:%ld)(loopstart:%ld)(loopsiz:%ld)\n",PW_Start_Address,PW_j,PW_l,PW_m);*/
+ return BAD;
+ }
+ if ( PW_m == 0 )
+ {
+ /*printf ("#3 : (start : %ld)\n",PW_Start_Address);*/
+ return BAD;
+ }
+ if ( (PW_j == 0) && ((PW_l != 0) || (PW_m != 1) ))
+ {
+ /*printf ("#4 : (start : %ld)\n",PW_Start_Address);*/
+ return BAD;
+ }
+ PW_WholeSampleSize += PW_j;
+ }
+ if (PW_WholeSampleSize < 2)
+ {
+ /*printf ("#4.5 : (start : %ld)\n",PW_Start_Address);*/
+ return BAD;
+ }
+
+ /* test pattern addresses */
+ PW_o=BAD;
+ PW_l = 0;
+ for ( PW_k=0 ; PW_k<256; PW_k += 2 )
+ {
+ /*printf ("%x - ",in_data[PW_Start_Address+PW_k+188]);*/
+ if ( (in_data[PW_Start_Address+PW_k+180] == 0xFF) && (in_data[PW_Start_Address+PW_k+181] == 0xFF) )
+ {
+ PW_o = GOOD;
+ break;
+ }
+ PW_j = ((in_data[PW_Start_Address+PW_k+180]*256)+
+ in_data[PW_Start_Address+PW_k+181]);
+ if (PW_j < 180)
+ {
+ /*printf ("#5 : (start : %ld)(PW_j:%ld)(PW_k:%ld)\n",PW_Start_Address,PW_j,PW_k);*/
+ return BAD;
+ }
+ if (PW_j>PW_l)
+ PW_l = PW_j;
+ }
+ if (PW_o == BAD)
+ {
+ /*printf ("#6 : (start : %ld)\n",PW_Start_Address);*/
+ return BAD;
+ }
+
+ /* PW_l is the max addy of the pattern addies */
+ return GOOD;
+}
+
+
+/* With the help of Xigh :) .. thx */
+int cmplong(const void * a, const void * b)
+{
+ long * aa = (long *) a;
+ long * bb = (long *) b;
+ if (*aa == *bb)
+ return 0;
+ if(*aa > *bb)
+ return +1;
+ return -1;
+}
+
+
+void Rip_TitanicsPlayer ( void )
+{
+ /* retrieve highest smp addy */
+ PW_j = 0;PW_n=0;
+ for ( PW_k=0 ; PW_k<15 ; PW_k++ )
+ {
+ PW_o = ((in_data[PW_Start_Address+PW_k*12]*256*256*256) +
+ (in_data[PW_Start_Address+1+PW_k*12]*256*256)+
+ (in_data[PW_Start_Address+2+PW_k*12]*256)+
+ in_data[PW_Start_Address+3+PW_k*12]);
+ if ( PW_o > PW_n)
+ {
+ PW_n = PW_o;
+ PW_j = PW_k;
+ }
+ }
+ /* PW_n is the highest smp addy ; PW_j is its ref */
+ OutputSize = PW_n + (((in_data[PW_Start_Address+PW_j*12+4]*256)+in_data[PW_Start_Address+PW_j*12+5])*2);
+
+ CONVERT = GOOD;
+ Save_Rip ( "Titanics Player module", TitanicsPlayer );
+
+ if ( Save_Status == GOOD )
+ PW_i += 180; /* after smp desc */
+}
+
+
+/*
+ * TitanicsPlayer.c 2007 (c) Sylvain "Asle" Chipaux
+ *
+*/
+
+#define ON 1
+#define OFF 2
+
+void Depack_TitanicsPlayer ( void )
+{
+ Uchar *Whatever;
+ Uchar c1=0x00,c2=0x00,c3=0x00,c4=0x00;
+ long Pat_Addresses[128];
+ long Pat_Addresses_ord[128];
+ long Pat_Addresses_final[128];
+ long Max=0l;
+ Uchar poss[37][2];
+ Uchar PatPos;
+ long Where=PW_Start_Address;
+ long SmpAddresses[15];
+ long SampleSizes[15];
+ unsigned long i=0,j=0,k=0,l;
+ FILE *out;
+
+ if ( Save_Status == BAD )
+ return;
+
+ BZERO ( Pat_Addresses , 128 );
+ BZERO ( Pat_Addresses_ord , 128 );
+ BZERO ( Pat_Addresses_final , 128 );
+
+ fillPTKtable(poss);
+
+ sprintf ( Depacked_OutName , "%ld.stk" , Cpt_Filename-1 );
+ out = PW_fopen ( Depacked_OutName , "w+b" );
+
+ /* title */
+ Whatever = (Uchar *) malloc ( 2048 );
+ BZERO ( Whatever , 2048 );
+ fwrite ( &Whatever[0] , 20 , 1 , out );
+
+ /* read and write whole header */
+ /*printf ( "Converting sample headers ... " );*/
+ for ( i=0 ; i<15 ; i++ ) /* only 15 samples */
+ {
+ /* retrieve addresses of samples */
+ SmpAddresses[i] = ((in_data[Where]*256*256*256)+
+ (in_data[Where+1]*256*256)+
+ (in_data[Where+2]*256)+
+ (in_data[Where+3]));
+
+ /* write name */
+ fwrite ( &Whatever[0] , 22 , 1 , out );
+ /* size */
+ k = (in_data[Where+4] * 256) + in_data[Where+5];
+ k *= 2;
+ SampleSizes[i] = k;
+ fwrite ( &in_data[Where+4] , 1 , 1 , out );
+ fwrite ( &in_data[Where+5] , 1 , 1 , out );
+ /* finetune */
+ fwrite ( &in_data[Where+6] , 1 , 1 , out );
+ /* volume */
+ fwrite ( &in_data[Where+7] , 1 , 1 , out);
+ /* loop start */
+ fwrite ( &in_data[Where+8] , 1 , 1 , out );
+ fwrite ( &in_data[Where+9] , 1 , 1 , out );
+ fwrite ( &in_data[Where+10] , 1 , 1 , out );
+ fwrite ( &in_data[Where+11] , 1 , 1 , out );
+
+ Where += 12;
+ }
+ /*printf ( "ok\n" );*/
+
+ /* pattern list */
+ /*printf ( "creating the pattern list ... " );*/
+ for ( PatPos=0x00 ; PatPos<128 ; PatPos++ )
+ {
+ if ( in_data[Where+PatPos*2] == 0xFF )
+ break;
+ Pat_Addresses_ord[PatPos] = Pat_Addresses[PatPos] = (in_data[Where+PatPos*2]*256)+in_data[Where+PatPos*2+1];
+ }
+
+ /* write patpos */
+ fwrite ( &PatPos , 1 , 1 , out );
+
+ /* restart byte */
+ c1 = 0x00;
+ fwrite ( &c1 , 1 , 1 , out );
+
+ /* With the help of Xigh :) .. thx */
+ qsort (Pat_Addresses_ord,PatPos,sizeof(long),cmplong);
+ j=0;
+ for (i=0;i<PatPos;i++)
+ {
+ Pat_Addresses_final[j++] = Pat_Addresses_ord[i];
+ while ((Pat_Addresses_ord[i+1] == Pat_Addresses_ord[i]) && (i<PatPos))
+ i += 1;
+ }
+
+ /* write pattern list */
+ for (i=0;i<PatPos;i++)
+ {
+ for (j=0;Pat_Addresses[i]!=Pat_Addresses_final[j];j++);
+ Whatever[i] = j;
+ if (j>Max)
+ Max = j;
+ }
+ fwrite ( Whatever , 128 , 1 , out );
+ /*printf ( "ok\n" );*/
+
+ /* pattern data */
+ for (i=0;i<=Max;i++)
+ {
+ k = 0;
+ /*printf ("Where : %ld\n",Where);*/
+ Where = Pat_Addresses_final[i] + PW_Start_Address;
+ BZERO (Whatever,2048);
+ do
+ {
+ /* k is row nbr */
+ c1 = (((in_data[Where+1]>>6)&0x03)*4); /* voice */
+
+ /* no note ... */
+ if ((in_data[Where+1]&0x3f)<=36)
+ {
+ Whatever[(k*16)+c1] = poss[in_data[Where+1]&0x3f][0];
+ Whatever[(k*16)+c1+1] = poss[in_data[Where+1]&0x3F][1];
+ }
+ Whatever[(k*16)+c1+2] = in_data[Where+2];
+ Whatever[(k*16)+c1+3] = in_data[Where+3];
+ Where += 4;
+
+ if ((in_data[Where]&0x7f) != 0x00)
+ k += (in_data[Where]&0x7f);
+ if (k > 1024)
+ {
+ /*printf ("pat %ld too big\n",i);*/
+ break;
+ }
+ }while ((in_data[Where-4] & 0x80) != 0x80); /* pattern break it seems */
+ fwrite (&Whatever[0],1024,1,out);
+ }
+ Where -= 4;
+ /* Where is now on the first smp */
+
+ free ( Whatever );
+ /*printf ( " ok\n" );*/
+ /*fflush ( stdout );*/
+
+
+ /* sample data */
+ /*printf ( "Saving sample data ... " );*/
+ for (i=0; i<15; i++)
+ {
+ if ( SmpAddresses[i] != 0 )
+ fwrite ( &in_data[PW_Start_Address+SmpAddresses[i]], SampleSizes[i], 1, out);
+ }
+
+ /* crap */
+ Crap15 ( " Titanics Player " , BAD , BAD , out );
+
+ fflush ( out );
+ fclose ( out );
+
+ printf ( "done\n" );
+ return; /* useless ... but */
+}
-void Rip_TP3 ( void )
+void Rip_Tre( void )
{
/* PW_j is the size of the pattern list */
/* PW_l is the number of sample */
--- /dev/null
+/* Viruz2 - made by kb_ Farbrausch */
+/* 06-05-2007 - test version by Muerto - mostly asle :D*/
+/* 08-05-2007 - Saved the first V2m mod!! - BUT phoemes not incluted.. yet!*/
+/* testV2 */
+
+/* This is an ongoing dev version made by Muerto - not part of PW4PC package */
+
+#include "globals.h"
+#include "extern.h"
+
+/* void testViruz2_60 (void)*/
+short testViruz2_60 ()
+{
+ PW_Start_Address = PW_i; /* bypass the 20 bytes already tested */
+
+ for (PW_j = PW_Start_Address+20; PW_j<(PW_in_size-12); PW_j++)
+ {
+ /* PW_in_size if the size of the input file */
+
+ if ((in_data[PW_j+1] == 0x00) &&
+ (in_data[PW_j+2] == 0x00) &&
+ (in_data[PW_j+3] == 0x00) &&
+ ((in_data[PW_j+4] == 0x01) || (in_data[PW_j+4] == 0x1F)) &&
+ (in_data[PW_j+5] == 0x00) &&
+ (in_data[PW_j+6] == 0x00) &&
+ (in_data[PW_j+7] == 0x00) &&
+ ((in_data[PW_j+8] == 0x08) || (in_data[PW_j+8] == 0x26)) &&
+ (in_data[PW_j+9] == 0x00) &&
+ (in_data[PW_j+10] == 0x00) &&
+ (in_data[PW_j+11] == 0x00) )
+ {
+ /* printf ( "\n found end tag for 6000 at %ld (%lx)\n",PW_j, PW_j ); */
+ /*OutputSize is the global PW var to store the output size, used by Save_Rip*/
+ OutputSize = (PW_j+12)-PW_Start_Address;
+ CONVERT = BAD; /* tells PW not to consider converting to PTK */
+ Save_Rip ( "Viruz 2", Viruz2 );
+ if ( Save_Status == GOOD )
+ PW_i += 1; /* to bypass the case test */
+ }
+ }
+ return GOOD;
+}
+
+short testViruz2_80 ()
+{
+ Uchar MYTEST = BAD;
+ PW_Start_Address = PW_i; /* bypass the 20 bytes already tested */
+
+ /* test 1 */
+ for (PW_j = PW_Start_Address+20; PW_j<(PW_in_size-12); PW_j++)
+ {
+ /* PW_in_size if the size of the input file */
+ /* Test before @@@ */
+ if ((in_data[PW_j] == 0x16) &&
+ (in_data[PW_j+1] == 0x00) &&
+ (in_data[PW_j+2] == 0x00) &&
+ (in_data[PW_j+3] == 0x00) &&
+ ((in_data[PW_j+8] == 0x64) || (in_data[PW_j+8] == 0x6B) || (in_data[PW_j+8] == 0x6E) || (in_data[PW_j+8] == 0x7F) || (in_data[PW_j+8] == 0x5B) || (in_data[PW_j+8] == 0x60) || (in_data[PW_j+8] == 0x19) || (in_data[PW_j+8] == 0x66) || (in_data[PW_j+8] == 0x58) || (in_data[PW_j+8] == 0x0E) || (in_data[PW_j+8] == 0x5A) ) &&
+ ((in_data[PW_j+17] == 0x00) || (in_data[PW_j+17] == 0x01) || (in_data[PW_j+17] == 0x02) || (in_data[PW_j+17] == 0x1F)) &&
+ ((in_data[PW_j+18] == 0x00) || (in_data[PW_j+18] == 0x01) || (in_data[PW_j+18] == 0x33)) &&
+ ((in_data[PW_j+19] == 0x00) || (in_data[PW_j+19] == 0x01) || (in_data[PW_j+19] == 0x02) || (in_data[PW_j+19] == 0x36)))
+
+ {
+ MYTEST = GOOD;
+ printf ("first row of test OK (where : %ld)\n",PW_j);
+ break;
+ }
+ }
+ if (MYTEST == GOOD)
+ { /* test 1 OK - proceed to test 2, then save if successful */
+ while (PW_j<(PW_in_size-12))
+ {
+ /* test after @@@ */
+ if ((in_data[PW_j] == 0xF8) &&
+ (in_data[PW_j+1] == 0x02) &&
+ (in_data[PW_j+2] == 0x00) &&
+ (in_data[PW_j+3] == 0x00) &&
+ (in_data[PW_j+4] == 0x86) &&
+ (in_data[PW_j+5] == 0x03) &&
+ (in_data[PW_j+6] == 0x00) &&
+ (in_data[PW_j+7] == 0x00) &&
+ (in_data[PW_j+8] == 0xA1) &&
+ (in_data[PW_j+9] == 0x04) &&
+ (in_data[PW_j+10] == 0x00) &&
+ (in_data[PW_j+11] == 0x00))
+
+ {
+ /* printf ( "\n found end tag for 8000 at %ld (%lx)\n",PW_j, PW_j ); */
+ /*OutputSize is the global PW var to store the output size, used by Save_Rip*/
+ OutputSize = (PW_j+12)-PW_Start_Address;
+ CONVERT = BAD; /* tells PW not to consider converting to PTK */
+ Save_Rip ( "Viruz 2", Viruz2 );
+ if ( Save_Status == GOOD )
+ PW_i += 1; /* to bypass the case test */
+ }
+ PW_j++;
+ }
+ }
+ return GOOD;
+}
+
+short testViruz2_E0 ()
+{
+ PW_Start_Address = PW_i; /* bypass the 20 bytes already tested */
+
+ for (PW_j = PW_Start_Address+20; PW_j<(PW_in_size-12); PW_j++)
+ {
+ /* PW_in_size if the size of the input file */
+
+ if ((in_data[PW_j] == 0x94) &&
+ ((in_data[PW_j+1] == 0x00) || (in_data[PW_j+1] == 0x01)) &&
+ (in_data[PW_j+2] == 0x00) &&
+ (in_data[PW_j+3] == 0x00) &&
+ ((in_data[PW_j+4] == 0x01) || (in_data[PW_j+4] == 0x78) || (in_data[PW_j+4] == 0x81) || (in_data[PW_j+4] == 0xDD)) &&
+ ((in_data[PW_j+5] == 0x00) || (in_data[PW_j+5] == 0x01)) &&
+ (in_data[PW_j+6] == 0x00) &&
+ (in_data[PW_j+7] == 0x00) &&
+ ((in_data[PW_j+8] == 0x08) || (in_data[PW_j+8] == 0xC2) || (in_data[PW_j+8] == 0x27) || (in_data[PW_j+8] == 0xC8) || (in_data[PW_j+8] == 0x01) ) &&
+ ((in_data[PW_j+9] == 0x00) || (in_data[PW_j+9] == 0x01)) &&
+ (in_data[PW_j+10] == 0x00) &&
+ (in_data[PW_j+11] == 0x00) )
+ {
+ /* printf ( "\n found end tag for E001 at %ld (%lx)\n",PW_j, PW_j ); */
+ /*OutputSize is the global PW var to store the output size, used by Save_Rip*/
+ OutputSize = (PW_j+12)-PW_Start_Address;
+ CONVERT = BAD; /* tells PW not to consider converting to PTK */
+ Save_Rip ( "Viruz 2", Viruz2 );
+ if ( Save_Status == GOOD )
+ PW_i += 1; /* to bypass the case test */
+ }
+ }
+ return GOOD;
+}
+
+/* end of func */
+
--- /dev/null
+/* (5th of may 2007)
+*/
+/* testSkizzo() */
+/* Rip_Skizzo() */
+/* Depack_Skizzo() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+short testSkizzo ( void )
+{
+ /* test #1 */
+ PW_Start_Address = PW_i-24;
+ if ((PW_i + 38) > PW_in_size)
+ {
+ /*printf ("[1] PW_Start_Address : %ld\n", PW_Start_Address);*/
+ return BAD;
+ }
+ PW_j = in_data[PW_Start_Address+22]; /* nbr of samples */
+ if ((PW_j > 31) || (PW_j==0))
+ {
+ /*printf ("[2] (nbr of samples:%ld) PW_Start_Address : %ld\n", PW_j,PW_Start_Address);*/
+ return BAD;
+ }
+
+ return GOOD;
+}
+
+
+void Rip_Skizzo ( void )
+{
+ /* PW_j is the nbr of samples */
+ /* get nbr of stored patts */
+ PW_k = in_data[PW_Start_Address+23];
+ /* get size of patlist */
+ PW_m = in_data[PW_Start_Address+20] & 0x7f;
+ PW_WholeSampleSize = 0;
+ for ( PW_l=0 ; PW_l<PW_j ; PW_l++ )
+ PW_WholeSampleSize += ((in_data[PW_Start_Address+28+(PW_l*8)]*256)+
+ in_data[PW_Start_Address+29+(PW_l*8)])*2;
+
+ OutputSize = PW_WholeSampleSize + (PW_j*8) + (PW_k*768) + PW_m + 28;
+
+ CONVERT = GOOD;
+ Save_Rip ( "Skizzo Packed music", Skizzo );
+
+ if ( Save_Status == GOOD )
+ PW_i += 1;
+}
+
+
+/*
+ * Skizzo.c 2007 (c) Asle / ReDoX
+ *
+ * 20070525 : doesn't convert pattern data
+*/
+void Depack_Skizzo ( void )
+{
+ Uchar *Whatever;
+ long i=0,k=0;
+ Ushort Pattern_Addresses_Table[128];
+ short BODYaddy, SAMPaddy, nbr_sample, siz_patlist, nbr_patstored;
+ long Total_Sample_Size=0;
+ long Where = PW_Start_Address;
+ Uchar poss[37][2];
+ FILE *out,*DEBUG;
+
+ /* filling up the possible PTK notes */
+ fillPTKtable(poss);
+
+/* DEBUG = fopen("DEBUG.txt","w+b");*/
+
+ if ( Save_Status == BAD )
+ return;
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_fopen ( Depacked_OutName , "w+b" );
+
+ /* title */
+ Whatever = (Uchar *) malloc (2048);
+ BZERO ( Whatever , 2048 );
+ /* write title */
+ fwrite ( &in_data[Where], 20, 1, out );
+ Where += 20;
+
+ /* read size of patternlist */
+ siz_patlist = in_data[Where]; /* &0x7F necessary ! */
+ Where += 2; /* with bypassing an unknown '00' */
+
+ /* read number of sample */
+ nbr_sample = in_data[Where];
+ Where += 1;
+
+ /* read nbr of pattern saved */
+ nbr_patstored = in_data[Where];
+ Where += 5; /* bypassing '-GD-' too */
+
+ /* sample header */
+ BZERO ( Whatever, 2048 );
+ for ( i=0 ; i<nbr_sample ; i++ )
+ {
+ /* size */
+ Whatever[22+(i*30)] = in_data[Where];
+ Whatever[23+(i*30)] = in_data[Where+1];
+ Total_Sample_Size += ((in_data[Where]*256)+in_data[Where+1])*2;
+ /* finetune */
+ Whatever[24+(i*30)] = in_data[Where+2];
+ /* volume */
+ Whatever[25+(i*30)] = in_data[Where+3];
+ /* loop start */
+ Whatever[26+(i*30)] = in_data[Where+4];
+ Whatever[27+(i*30)] = in_data[Where+5];
+ /* loop size */
+ Whatever[28+(i*30)] = in_data[Where+6];
+ Whatever[29+(i*30)] = in_data[Where+7];
+ Where += 8;
+ }
+ /* finally, write the PTK header */
+ fwrite ( Whatever , 930 , 1 , out );
+
+ /* pattern list now */
+ /* 'Where' is on it */
+ BZERO ( Whatever, 2048 );
+ for ( i=2; i<(siz_patlist&0x7f)+2; i++ )
+ {
+ Whatever[i] = in_data[Where];
+ Where += 1;
+ }
+ Whatever[i+1] = (nbr_patstored - 1);
+ Whatever[0] = (Uchar)(siz_patlist&0x7f);
+ Whatever[1] = 0x7F;
+ fwrite ( Whatever , 130 , 1 , out );
+
+ /* PTK's tag now*/
+ Whatever[0] = 'M';
+ Whatever[1] = '.';
+ Whatever[2] = 'K';
+ Whatever[3] = '.';
+ fwrite ( Whatever , 4 , 1 , out );
+/*
+fprintf(DEBUG,"nbr_sample : %d\n",nbr_sample);
+fprintf(DEBUG,"siz_patlist : %d\n",siz_patlist&0x7f);
+fprintf(DEBUG,"nbr_patstored : %d\n\n",nbr_patstored);
+*/
+ /* pattern data now ... */
+ for ( i=0 ; i<nbr_patstored ; i++ )
+/* for ( i=0 ; i<2 ; i++ )*/
+ {
+/*fprintf(DEBUG,"\n-------pat %ld----\n",i);
+fprintf(DEBUG,"@ in file : %ld\n",Where);*/
+ for ( k=0; k<256; k++ ) /* loop on each note for this pattern */
+ {
+/*fprintf(DEBUG,"[%-4ld] %2x-%2x-%2x\n",k,in_data[Where],in_data[Where+1],in_data[Where+2]); */
+
+ Whatever[k*4] = poss[in_data[Where]&0x7f][0];
+ /*Whatever[k*4] &= in_data[Where]&0x80;*/ /* not sure .. never seen */
+ Whatever[k*4+1] = poss[in_data[Where]&0x7f][1];
+ Whatever[k*4+2] = in_data[Where+1];
+ Whatever[k*4+3] = in_data[Where+2];
+ Where += 3;
+ }
+/*fprintf(DEBUG,"\nEND OF LOOP ?!?\n");*/
+ fwrite ( Whatever , 1024 , 1 , out );
+ }
+ free ( Whatever );
+
+
+ fwrite ( &in_data[Where] , Total_Sample_Size , 1 , out );
+
+ Crap ( " Skizzo " , BAD , BAD , out );
+
+/* fflush ( DEBUG );
+ fclose ( DEBUG );*/
+ fflush ( out );
+ fclose ( out );
+
+ printf ( "done\n" );
+ return; /* useless ... but */
+
+}
return cpu_lev;
}
-static amodes mode_from_str (const char *str)
+static amodes mode_from_str (const char *str)
{
if (strncmp (str, "Dreg", 4) == 0) return Dreg;
if (strncmp (str, "Areg", 4) == 0) return Areg;
#endif
#ifdef FILESYS
for(i = 0; i < currprefs.mountitems; i++) {
- struct mountedinfo mi;
+ struct mountedinfo mi;
int type = get_filesys_unitconfig (&currprefs, i, &mi);
if (mi.ismounted && type != FILESYS_VIRTUAL && type != FILESYS_HARDFILE && type != FILESYS_HARDFILE_RDB)
dowarn = 1;
*dst++ = v;
*dstp = dst;
}
-void save_string_func (uae_u8 **dstp, char *from)
+void save_string_func (uae_u8 **dstp, const char *from)
{
uae_u8 *dst = *dstp;
- while(from && *from)
+ while (from && *from)
*dst++ = *from++;
*dst++ = 0;
*dstp = dst;
if (flags & 1) {
zfile_fread (tmp, 1, 4, f);
src = tmp;
- *totallen = restore_u32();
+ *totallen = restore_u32 ();
*filepos = zfile_ftell (f) - 4 - 4 - 4;
len2 -= 4;
} else {
zfile_fseek (savestate_file, filepos, SEEK_SET);
zfile_fread (tmp, 1, sizeof(tmp), savestate_file);
- size = restore_u32();
- flags = restore_u32();
+ size = restore_u32 ();
+ flags = restore_u32 ();
size -= 4 + 4 + 4;
if (flags & 1) {
zfile_fread (tmp, 1, 4, savestate_file);
src = tmp;
- fullsize = restore_u32();
+ fullsize = restore_u32 ();
size -= 4;
zfile_zuncompress (memory, fullsize, savestate_file, size);
} else {
{
char *emuname, *emuversion, *description;
- restore_u32();
+ restore_u32 ();
emuname = restore_string ();
emuversion = restore_string ();
description = restore_string ();
dst = header;
save_u32 (0);
- save_string("UAE");
+ save_string ("UAE");
sprintf (tmp, "%d.%d.%d", UAEMAJOR, UAEMINOR, UAESUBREV);
save_string (tmp);
save_string (description);
#endif
dst = save_gayle(&len);
if (dst) {
- save_chunk (f, dst, len, "GAYL", 0);
+ save_chunk (f, dst, len, "GAYL", 0);
xfree(dst);
}
for (i = 0; i < 4; i++) {
BUSCR 4
PCR 4
- All:
+ All:
Clock in KHz 4 (only if bit 31 in flags)
- 4 (spare, only if bit 31 in flags)
+ 4 (spare, only if bit 31 in flags)
FPU (only if used)
FPIAR 4
Clock in KHz 4 (only if bit 31 in flags)
- 4 (spare, only if bit 31 in flags)
+ 4 (spare, only if bit 31 in flags)
MMU (when and if MMU is supported in future..)
return 0;
}
}
- write_log("SCSI command %02X, no direction specified (IN?)!\n", sd->cmd[0]);
+ write_log ("SCSI command %02X, no direction specified (IN?)!\n", sd->cmd[0]);
return -2;
}
{
struct scsi_data *sd;
if (!sys_command_open (DF_SCSI, nativeunit)) {
- write_log("SCSI: native scsi unit %d failed to open\n", nativeunit);
+ write_log ("SCSI: native scsi unit %d failed to open\n", nativeunit);
return NULL;
}
sd = (struct scsi_data*)xcalloc(sizeof (struct scsi_data), 1);
sd->buffer[sd->offset++] = b;
} else {
if (sd->offset >= 16) {
- write_log("SCSI command buffer overflow!\n");
+ write_log ("SCSI command buffer overflow!\n");
return 0;
}
sd->cmd[sd->offset++] = b;
static uae_u32 scsidev_open (void)
{
- uaecptr tmp1 = m68k_areg(regs, 1); /* IOReq */
+ uaecptr tmp1 = m68k_areg (regs, 1); /* IOReq */
uae_u32 unit = m68k_dreg (regs, 0);
struct scsidevdata *sdd;
if ((sdd = get_scsidev_data (unit)) &&
start_thread (sdd)) {
opencount++;
- put_word (m68k_areg(regs, 6)+32, get_word (m68k_areg(regs, 6)+32) + 1);
+ put_word (m68k_areg (regs, 6)+32, get_word (m68k_areg (regs, 6)+32) + 1);
put_long (tmp1 + 24, unit); /* io_Unit */
put_byte (tmp1 + 31, 0); /* io_Error */
put_byte (tmp1 + 8, 7); /* ln_type = NT_REPLYMSG */
#endif
opencount--;
- put_word (m68k_areg(regs, 6) + 32, get_word (m68k_areg(regs, 6) + 32) - 1);
+ put_word (m68k_areg (regs, 6) + 32, get_word (m68k_areg (regs, 6) + 32) - 1);
return 0;
}
#ifdef DEBUGME
printf ("scsidev: did io: sdd = 0x%x\n", sdd);
printf ("scsidev: did io: request = %08lx\n", (unsigned long)request);
- printf ("scsidev: did io: error = %d\n", (int)get_word(request+31));
+ printf ("scsidev: did io: error = %d\n", (int)get_word (request+31));
#endif
}
static uae_u32 scsidev_beginio (void)
{
- uae_u32 request = m68k_areg(regs, 1);
+ uae_u32 request = m68k_areg (regs, 1);
int unit = get_long (request + 24);
struct scsidevdata *sdd = get_scsidev_data (unit);
#ifdef DEBUGME
printf ("scsidev_begin_io: sdd = 0x%x\n", sdd);
printf ("scsidev_begin_io: request = %08lx\n", (unsigned long)request);
- printf ("scsidev_begin_io: cmd = %d\n", (int)get_word(request+28));
+ printf ("scsidev_begin_io: cmd = %d\n", (int)get_word (request+28));
#endif
put_byte (request+8, NT_MESSAGE);
#ifdef DEBUGME
printf ("scsidev_penguin: sdd = 0x%x\n", sdd);
printf ("scsidev_penguin: req = %08lx\n", (unsigned long)request);
- printf ("scsidev_penguin: cmd = %d\n", (int)get_word(request+28));
+ printf ("scsidev_penguin: cmd = %d\n", (int)get_word (request+28));
#endif
if (!request) {
printf ("scsidev_penguin: going down with 0x%x\n", sdd->sync_sem);
#endif
/* Build a struct Resident. This will set up and initialize
* the uaescsi.device */
- put_word(resaddr + 0x0, 0x4AFC);
- put_long(resaddr + 0x2, resaddr);
- put_long(resaddr + 0x6, resaddr + 0x1A); /* Continue scan here */
- put_word(resaddr + 0xA, 0x8101); /* RTF_AUTOINIT|RTF_COLDSTART; Version 1 */
- put_word(resaddr + 0xC, 0x0305); /* NT_DEVICE; pri 05 */
- put_long(resaddr + 0xE, ROM_scsidev_resname);
- put_long(resaddr + 0x12, ROM_scsidev_resid);
- put_long(resaddr + 0x16, ROM_scsidev_init); /* calls scsidev_init */
+ put_word (resaddr + 0x0, 0x4AFC);
+ put_long (resaddr + 0x2, resaddr);
+ put_long (resaddr + 0x6, resaddr + 0x1A); /* Continue scan here */
+ put_word (resaddr + 0xA, 0x8101); /* RTF_AUTOINIT|RTF_COLDSTART; Version 1 */
+ put_word (resaddr + 0xC, 0x0305); /* NT_DEVICE; pri 05 */
+ put_long (resaddr + 0xE, ROM_scsidev_resname);
+ put_long (resaddr + 0x12, ROM_scsidev_resid);
+ put_long (resaddr + 0x16, ROM_scsidev_init); /* calls scsidev_init */
resaddr += 0x1A;
return resaddr;
#define ASYNC_REQUEST_NONE 0
#define ASYNC_REQUEST_TEMP 1
-#define ASYNC_REQUEST_CHANGEINT 10
+#define ASYNC_REQUEST_CHANGEINT 10
#define ASYNC_REQUEST_FRAMEINT 11
#define ASYNC_REQUEST_PLAY 12
#define ASYNC_REQUEST_READXL 13
-#define ASYNC_REQUEST_FRAMECALL 14
+#define ASYNC_REQUEST_FRAMECALL 14
struct devstruct {
int unitnum, aunit;
return sys_command_info (mode, unitnum, di);
}
-static void io_log (char *msg, uaecptr request)
+static void io_log (const char *msg, uaecptr request)
{
if (log_scsi)
write_log ("%s: %08X %d %08X %d %d io_actual=%d io_error=%d\n",
- msg, request, get_word(request + 28), get_long(request + 40),
- get_long(request + 36), get_long(request + 44),
+ msg, request, get_word (request + 28), get_long (request + 40),
+ get_long (request + 36), get_long (request + 44),
get_long (request + 32), get_byte (request + 31));
}
return 0;
dev_close_3 (dev, pdev);
put_long (request + 24, 0);
- put_word (m68k_areg(&context->regs, 6) + 32, get_word (m68k_areg(&context->regs, 6) + 32) - 1);
+ put_word (m68k_areg (&context->regs, 6) + 32, get_word (m68k_areg (&context->regs, 6) + 32) - 1);
return 0;
}
}
dev->opencnt++;
- put_word (m68k_areg(&context->regs, 6) + 32, get_word (m68k_areg(&context->regs, 6) + 32) + 1);
+ put_word (m68k_areg (&context->regs, 6) + 32, get_word (m68k_areg (&context->regs, 6) + 32) + 1);
put_byte (ioreq + 31, 0);
put_byte (ioreq + 8, 7);
return 0;
{
int blocksize = dev->di.bytespersector;
uae_u8 *temp;
-
+
length /= blocksize;
offset /= blocksize;
while (length > 0) {
{
int blocksize = dev->di.bytespersector;
struct device_scsi_info dsi;
-
+
if (!sys_command_scsi_info(mode, dev->unitnum, &dsi))
return 20;
length /= blocksize;
* the cd.device */
if (log_scsi)
write_log ("diskdev_startup(0x%x)\n", resaddr);
- put_word(resaddr + 0x0, 0x4AFC);
- put_long(resaddr + 0x2, resaddr);
- put_long(resaddr + 0x6, resaddr + 0x1A); /* Continue scan here */
- put_word(resaddr + 0xA, 0x8101); /* RTF_AUTOINIT|RTF_COLDSTART; Version 1 */
- put_word(resaddr + 0xC, 0x0305); /* NT_DEVICE; pri 05 */
- put_long(resaddr + 0xE, ROM_diskdev_resname);
- put_long(resaddr + 0x12, ROM_diskdev_resid);
- put_long(resaddr + 0x16, ROM_diskdev_init);
+ put_word (resaddr + 0x0, 0x4AFC);
+ put_long (resaddr + 0x2, resaddr);
+ put_long (resaddr + 0x6, resaddr + 0x1A); /* Continue scan here */
+ put_word (resaddr + 0xA, 0x8101); /* RTF_AUTOINIT|RTF_COLDSTART; Version 1 */
+ put_word (resaddr + 0xC, 0x0305); /* NT_DEVICE; pri 05 */
+ put_long (resaddr + 0xE, ROM_diskdev_resname);
+ put_long (resaddr + 0x12, ROM_diskdev_resid);
+ put_long (resaddr + 0x16, ROM_diskdev_init);
resaddr += 0x1A;
return resaddr;
}
write_log ("scsidev_startup(0x%x)\n", resaddr);
/* Build a struct Resident. This will set up and initialize
* the uaescsi.device */
- put_word(resaddr + 0x0, 0x4AFC);
- put_long(resaddr + 0x2, resaddr);
- put_long(resaddr + 0x6, resaddr + 0x1A); /* Continue scan here */
- put_word(resaddr + 0xA, 0x8101); /* RTF_AUTOINIT|RTF_COLDSTART; Version 1 */
- put_word(resaddr + 0xC, 0x0305); /* NT_DEVICE; pri 05 */
- put_long(resaddr + 0xE, ROM_scsidev_resname);
- put_long(resaddr + 0x12, ROM_scsidev_resid);
- put_long(resaddr + 0x16, ROM_scsidev_init); /* calls scsidev_init */
+ put_word (resaddr + 0x0, 0x4AFC);
+ put_long (resaddr + 0x2, resaddr);
+ put_long (resaddr + 0x6, resaddr + 0x1A); /* Continue scan here */
+ put_word (resaddr + 0xA, 0x8101); /* RTF_AUTOINIT|RTF_COLDSTART; Version 1 */
+ put_word (resaddr + 0xC, 0x0305); /* NT_DEVICE; pri 05 */
+ put_long (resaddr + 0xE, ROM_scsidev_resname);
+ put_long (resaddr + 0x12, ROM_scsidev_resid);
+ put_long (resaddr + 0x16, ROM_scsidev_init); /* calls scsidev_init */
resaddr += 0x1A;
return resaddr;
return diskdev_startup (resaddr);
if (currprefs.serial_demand && !dtr) {
if (!isbaeh) {
- write_log("SERDAT: Baeh.. Your software needs SERIAL_ALWAYS to work properly.\n");
+ write_log ("SERDAT: Baeh.. Your software needs SERIAL_ALWAYS to work properly.\n");
isbaeh=1;
}
return;
#endif
#include <ctype.h>
-#include "config.h"
#include "options.h"
#include "uae.h"
#include "tui.h"
if (trap_count == MAX_TRAPS) {
write_log ("Ran out of emulator traps\n");
abort ();
- return 0;
+ return -1;
} else {
unsigned int trap_num = trap_count++;
struct Trap *trap = &traps[trap_num];
/*
* Install the server
*/
-void uaeexe_install(void)
+void uaeexe_install (void)
{
uaecptr loop;
loop = here ();
- org(UAEEXE_ORG);
+ org (UAEEXE_ORG);
calltrap (deftrap (uaeexe_server));
- dw(RTS);
- org(loop);
+ dw (RTS);
+ org (loop);
}
/*
* to launch the command asynchronously. Please note also that the
* remote cli works better if you've got the fifo-handler installed.
*/
-int uaeexe(const char *cmd)
+int uaeexe (const char *cmd)
{
struct uae_xcmd *nw;
if (!running)
goto NORUN;
- nw = (struct uae_xcmd*)malloc (sizeof *nw);
+ nw = malloc (sizeof *nw);
if (!nw)
goto NOMEM;
- nw->cmd = (char*)malloc (strlen (cmd) + 1);
+ nw->cmd = malloc (strlen (cmd) + 1);
if (!nw->cmd) {
free (nw);
goto NOMEM;
nw->prev = last;
nw->next = NULL;
- if(!first)
- first = nw;
- if(last) {
+ if (!first)
+ first = nw;
+ if (last) {
last->next = nw;
- last = nw;
+ last = nw;
} else
- last = nw;
+ last = nw;
return UAEEXE_OK;
NOMEM:
return UAEEXE_NOMEM;
NORUN:
- write_log("Remote cli is not running.\n");
+ write_log ("Remote cli is not running.\n");
return UAEEXE_NOTRUNNING;
}
/*
* returns next command to be executed
*/
-static char *get_cmd(void)
+static char *get_cmd (void)
{
struct uae_xcmd *cmd;
char *s;
- if(!first)
+ if (!first)
return NULL;
s = first->cmd;
cmd = first;
first = first->next;
- if(!first)
+ if (!first)
last = NULL;
- free(cmd);
+ free (cmd);
return s;
}
/*
* helper function
*/
-#define ARG(x) (get_long (m68k_areg (&context->regs, 7) + 4*(x+1)))
+#define ARG(x) (get_long (m68k_areg (&context->regs, 7) + 4 * (x + 1)))
static uae_u32 REGPARAM2 uaeexe_server (TrapContext *context)
{
int len;
char *cmd;
char *dst;
- if(ARG(0) && !running) {
+ if (ARG (0) && !running) {
running = 1;
- write_log("Remote CLI started.\n");
+ write_log ("Remote CLI started.\n");
}
- cmd = get_cmd();
- if(!cmd)
+ cmd = get_cmd ();
+ if (!cmd)
return 0;
- if(!ARG(0)) {
+ if (!ARG (0)) {
running = 0;
return 0;
}
- dst = (char *)get_real_address(ARG(0));
- len = ARG(1);
- strncpy(dst,cmd,len);
- write_log ("Sending '%s' to remote cli\n",cmd);
- free(cmd);
- return ARG(0);
+ dst = (char *)get_real_address (ARG (0));
+ len = ARG (1);
+ strncpy (dst, cmd, len);
+ write_log ("Sending '%s' to remote cli\n", cmd);
+ free (cmd);
+ return ARG (0);
}
return 0;
}
} else if (err != ERROR_IO_PENDING) {
- write_log ("IPC: ConnectNamedPipe failed, err=%d\n", err);
+ write_log ("IPC: ConnectNamedPipe failed, err=%d\n", err);
closeIPC();
return 0;
}
- write_log("IPC: waiting for connections\n");
+ write_log ("IPC: waiting for connections\n");
return 1;
}
connected = TRUE;
return 0;
}
- if (writepending) {
+ if (writepending) {
writepending = FALSE;
SetEvent (ol.hEvent);
memset (&ol, 0, sizeof ol);
ol.hEvent = olevent;
return 0;
- }
+ }
}
if (!readpending) {
ok = ReadFile(hipc, buffer, IPC_BUFFER_SIZE, &ret, &ol);
}
}
readpending = FALSE;
- write_log("IPC: got message '%s'\n", buffer);
+ write_log ("IPC: got message '%s'\n", buffer);
parsemessage((char*)buffer, p, (char*)outbuf, sizeof outbuf);
memset (&ol, 0, sizeof ol);
ol.hEvent = olevent;
err = GetLastError();
if (!ok && err != ERROR_IO_PENDING) {
write_log ("IPC: WriteFile() err=%d\n", err);
- resetIPC();
+ resetIPC();
return 0;
}
writepending = TRUE;
return 0;
}
-#define CREATE_NATIVE_FUNC_PTR uae_u32 (* native_func)( uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, \
- uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32)
+#define CREATE_NATIVE_FUNC_PTR uae_u32 (* native_func) (uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, \
+ uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32)
#define SET_NATIVE_FUNC(x) native_func = (uae_u32 (*)(uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32))(x)
#define CALL_NATIVE_FUNC( d1,d2,d3,d4,d5,d6,d7,a1,a2,a3,a4,a5,a6 ) if(native_func) native_func( d1,d2,d3,d4,d5,d6,d7,a1,a2,a3,a4,a5,a6 )
/* A0 - Contains a ptr to the native .obj data. This ptr is Amiga-based. */
uae_u8* object_UAM = NULL;
CREATE_NATIVE_FUNC_PTR;
- if( get_mem_bank( object_AAM ).check( object_AAM, 1 ) )
- object_UAM = get_mem_bank( object_AAM).xlateaddr( object_AAM );
+ if (get_mem_bank(object_AAM).check (object_AAM, 1))
+ object_UAM = get_mem_bank (object_AAM).xlateaddr (object_AAM);
- if( object_UAM )
- {
- SET_NATIVE_FUNC( FindFunctionInObject( object_UAM ) );
- CALL_NATIVE_FUNC( d1, d2, d3, d4, d5, d6, d7, a1, a2, a3, a4, a5, a6);
+ if (object_UAM) {
+ SET_NATIVE_FUNC (FindFunctionInObject (object_UAM));
+ CALL_NATIVE_FUNC (d1, d2, d3, d4, d5, d6, d7, a1, a2, a3, a4, a5, a6);
}
return 1;
#endif
if (mode)
return -1;
/* receive native path from lock
- * p1 = dos.library:Lock, p2 = buffer, p3 = max buffer size
+ * p1 = dos.library:Lock, p2 = buffer, p3 = max buffer size
*/
v = get_native_path (p1, tmp);
if (v)
return v;
for (i = 0; i <= strlen(tmp) && i < p3 - 1; i++) {
- put_byte (p2 + i, tmp[i]);
- put_byte (p2 + i + 1, 0);
+ put_byte (p2 + i, tmp[i]);
+ put_byte (p2 + i + 1, 0);
}
return 0;
}
#endif
case 85: return native_dos_op (ARG1, ARG2, ARG3, ARG4);
case 86:
- if (valid_address(ARG1, 1))
- write_log("DBG: %s\n", get_real_address(ARG1));
- return 1;
+ if (valid_address (ARG1, 1))
+ write_log ("DBG: %s\n", get_real_address (ARG1));
+ return 1;
}
return 0;
}
org (RTAREA_BASE + 0xFF60);
#if 0
dw (0x4eb9);
- dw ((RTAREA_BASE >> 16) | get_word(RTAREA_BASE + 36));
- dw (get_word(RTAREA_BASE + 38) + 12);
+ dw ((RTAREA_BASE >> 16) | get_word (RTAREA_BASE + 36));
+ dw (get_word (RTAREA_BASE + 38) + 12);
#endif
calltrap (define_trap (uaelib_demux, 0, ""));
dw (RTS);
static void io_log (char *msg, uaecptr request)
{
if (log_uaeserial)
- write_log ("%s: %08X %d %08.8X %d %d io_actual=%d io_error=%d\n",
- msg, request,get_word(request + 28),get_long(request + 40),get_long(request + 36),get_long(request + 44),
- get_long (request + 32), get_byte (request + 31));
+ write_log ("%s: %08X %d %08.8X %d %d io_actual=%d io_error=%d\n",
+ msg, request, get_word (request + 28), get_long (request + 40),
+ get_long (request + 36), get_long (request + 44),
+ get_long (request + 32), get_byte (request + 31));
}
static struct devstruct *getdevstruct (int uniq)
uae_u32 request = m68k_areg (&context->regs, 1);
struct devstruct *dev;
- dev = getdevstruct (get_long(request + 24));
+ dev = getdevstruct (get_long (request + 24));
if (!dev)
return 0;
if (log_uaeserial)
write_log ("%s:%d close, req=%x\n", getdevname(), dev->unit, request);
dev_close_3 (dev);
put_long (request + 24, 0);
- put_word (m68k_areg(&context->regs, 6) + 32, get_word (m68k_areg(&context->regs, 6) + 32) - 1);
+ put_word (m68k_areg (&context->regs, 6) + 32, get_word (m68k_areg (&context->regs, 6) + 32) - 1);
return 0;
}
static void resetparams(struct devstruct *dev, uaecptr req)
{
- put_long(req + io_CtlChar, 0x00001311);
- put_long(req + io_RBufLen, 1024);
- put_long(req + io_ExtFlags, 0);
- put_long(req + io_Baud, 9600);
- put_long(req + io_BrkTime, 250000);
- put_long(req + io_TermArray0, 0);
- put_long(req + io_TermArray1, 0);
- put_byte(req + io_ReadLen, 8);
- put_byte(req + io_WriteLen, 8);
- put_byte(req + io_StopBits, 1);
- put_byte(req + io_SerFlags, get_byte(req + io_SerFlags) & (SERF_XDISABLED | SERF_SHARED | SERF_7WIRE));
- put_word(req + io_Status, 0);
+ put_long (req + io_CtlChar, 0x00001311);
+ put_long (req + io_RBufLen, 1024);
+ put_long (req + io_ExtFlags, 0);
+ put_long (req + io_Baud, 9600);
+ put_long (req + io_BrkTime, 250000);
+ put_long (req + io_TermArray0, 0);
+ put_long (req + io_TermArray1, 0);
+ put_byte (req + io_ReadLen, 8);
+ put_byte (req + io_WriteLen, 8);
+ put_byte (req + io_StopBits, 1);
+ put_byte (req + io_SerFlags, get_byte (req + io_SerFlags) & (SERF_XDISABLED | SERF_SHARED | SERF_7WIRE));
+ put_word (req + io_Status, 0);
}
static int setparams(struct devstruct *dev, uaecptr req)
{
int v;
int rbuffer, baud, rbits, wbits, sbits, rtscts, parity, xonxoff;
-
+
rbuffer = get_long (req + io_RBufLen);
v = get_long (req + io_ExtFlags);
if (v) {
return 5;
}
write_log ("%s:%d BAUD=%d BUF=%d BITS=%d+%d RTSCTS=%d PAR=%d XO=%06.6X\n",
- getdevname(), dev->unit,
+ getdevname(), dev->unit,
baud, rbuffer, rbits, sbits, rtscts, parity, xonxoff);
v = uaeser_setparams (dev->sysdata, baud, rbuffer,
rbits, sbits, rtscts, parity, xonxoff);
if (v) {
- write_log("->failed\n");
+ write_log ("->failed\n");
return v;
}
return 0;
dev->unit = unit;
dev->open = 1;
dev->uniq = ++uniq;
- dev->exclusive = (get_word(ioreq + io_SerFlags) & SERF_SHARED) ? 0 : 1;
+ dev->exclusive = (get_word (ioreq + io_SerFlags) & SERF_SHARED) ? 0 : 1;
put_long (ioreq + 24, dev->uniq);
resetparams (dev, ioreq);
err = setparams (dev, ioreq);
write_log ("%s:%d open ioreq=%08.8X\n", getdevname(), unit, ioreq);
start_thread (dev);
- put_word (m68k_areg(&context->regs, 6) + 32, get_word (m68k_areg(&context->regs, 6) + 32) + 1);
+ put_word (m68k_areg (&context->regs, 6) + 32, get_word (m68k_areg (&context->regs, 6) + 32) + 1);
put_byte (ioreq + 31, 0);
put_byte (ioreq + 8, 7);
return 0;
prevar = NULL;
while (ar) {
if (ar->request == request) {
- if (prevar == NULL)
+ if (prevar == NULL)
dev->ar = ar->next;
else
prevar->next = ar->next;
return;
}
if (log_uaeserial)
- write_log ("%s:%d asyncronous request=%08.8X aborted\n", getdevname(), dev->unit, request);
+ write_log ("%s:%d asyncronous request=%08.8X aborted\n", getdevname(), dev->unit, request);
put_byte (request + 31, -2);
put_byte (request + 30, get_byte (request + 30) | 0x20);
write_comm_pipe_u32 (&dev->requests, request, 1);
}
break;
default:
- write_log("%s:%d incorrect async request %x (cmd=%d) signaled?!", getdevname(), dev->unit, request, command);
+ write_log ("%s:%d incorrect async request %x (cmd=%d) signaled?!", getdevname(), dev->unit, request, command);
break;
}
if (io_done) {
if (log_uaeserial)
write_log ("%s:%d async request %x completed\n", getdevname(), dev->unit, request);
- put_long (request + 32, io_actual);
+ put_long (request + 32, io_actual);
put_byte (request + 31, io_error);
ar->ready = 1;
write_comm_pipe_u32 (&dev->requests, request, 1);
put_long (req + io_StopBits, 1);
put_long (req + io_SerFlags, SERF_XDISABLED);
put_word (req + io_Status, 0);
-}
+}
static int dev_do_io (struct devstruct *dev, uaecptr request, int quick)
{
uae_u32 request = m68k_areg (&context->regs, 1);
uae_u8 flags = get_byte (request + 30);
int command = get_word (request + 28);
- struct devstruct *dev = getdevstruct (get_long(request + 24));
+ struct devstruct *dev = getdevstruct (get_long (request + 24));
put_byte (request + 8, NT_MESSAGE);
if (!dev) {
write_log ("device %s:%d command %d bug with IO_QUICK\n", getdevname(), dev->unit, command);
return get_byte (request + 31);
} else {
- put_byte (request + 30, get_byte (request + 30) & ~1);
+ put_byte (request + 30, get_byte (request + 30) & ~1);
write_comm_pipe_u32 (&dev->requests, request, 1);
return 0;
}
for (;;) {
uaecptr request = (uaecptr)read_comm_pipe_u32_blocking (&dev->requests);
uae_sem_wait (&change_sem);
- if (!request) {
+ if (!request) {
dev->thread_running = 0;
uae_sem_post (&dev->sync_sem);
uae_sem_post (&change_sem);
uae_ReplyMsg (request);
release_async_request (dev, request);
} else if (dev_do_io (dev, request, 0) == 0) {
- uae_ReplyMsg (request);
+ uae_ReplyMsg (request);
} else {
add_async_request (dev, request);
uaeser_trigger (dev->sysdata);
static uae_u32 REGPARAM2 dev_abortio (TrapContext *context)
{
uae_u32 request = m68k_areg (&context->regs, 1);
- struct devstruct *dev = getdevstruct (get_long(request + 24));
+ struct devstruct *dev = getdevstruct (get_long (request + 24));
if (!dev) {
put_byte (request + 31, 32);
write_log ("uaeserialdev_startup(0x%x)\n", resaddr);
/* Build a struct Resident. This will set up and initialize
* the serial.device */
- put_word(resaddr + 0x0, 0x4AFC);
- put_long(resaddr + 0x2, resaddr);
- put_long(resaddr + 0x6, resaddr + 0x1A); /* Continue scan here */
- put_word(resaddr + 0xA, 0x8101); /* RTF_AUTOINIT|RTF_COLDSTART; Version 1 */
- put_word(resaddr + 0xC, 0x0305); /* NT_DEVICE; pri 05 */
- put_long(resaddr + 0xE, ROM_uaeserialdev_resname);
- put_long(resaddr + 0x12, ROM_uaeserialdev_resid);
- put_long(resaddr + 0x16, ROM_uaeserialdev_init);
+ put_word (resaddr + 0x0, 0x4AFC);
+ put_long (resaddr + 0x2, resaddr);
+ put_long (resaddr + 0x6, resaddr + 0x1A); /* Continue scan here */
+ put_word (resaddr + 0xA, 0x8101); /* RTF_AUTOINIT|RTF_COLDSTART; Version 1 */
+ put_word (resaddr + 0xC, 0x0305); /* NT_DEVICE; pri 05 */
+ put_long (resaddr + 0xE, ROM_uaeserialdev_resname);
+ put_long (resaddr + 0x12, ROM_uaeserialdev_resid);
+ put_long (resaddr + 0x16, ROM_uaeserialdev_init);
resaddr += 0x1A;
return resaddr;
}
/* initcode */
initcode = here ();
calltrap (deftrap (dev_init)); dw (RTS);
-
+
/* Open */
openfunc = here ();
calltrap (deftrap (dev_open)); dw (RTS);
int zfile_is_ignore_ext(const char *name)
{
int i;
-
+
for (i = 0; uae_ignoreextensions[i]; i++) {
- if (strlen(name) > strlen (uae_ignoreextensions[i]) &&
- !strcasecmp (uae_ignoreextensions[i], name + strlen (name) - strlen (uae_ignoreextensions[i])))
- return 1;
+ if (strlen(name) > strlen (uae_ignoreextensions[i]) &&
+ !strcasecmp (uae_ignoreextensions[i], name + strlen (name) - strlen (uae_ignoreextensions[i])))
+ return 1;
}
return 0;
}
while (*s != 0 && *s != '/' && *s != '\\') s--;
if (s > tmp)
s++;
- write_log("loading from singlefile: '%s'\n", tmp);
+ write_log ("loading from singlefile: '%s'\n", tmp);
while (*p++);
offset = (p[0] << 24)|(p[1] << 16)|(p[2] << 8)|(p[3] << 0);
p += 4;
l->name = strdup (name);
f = fopen (name, mode);
if (!f) {
- zfile_fclose (l);
- return 0;
+ zfile_fclose (l);
+ return 0;
}
l->f = f;
return l;
if (z->data) {
if (z->seek + l1 * l2 > z->size) {
if (l1)
- l2 = (z->size - z->seek) / l1;
+ l2 = (z->size - z->seek) / l1;
else
l2 = 0;
if (l2 < 0)
if (!parent->child) {
parent->child = zn;
} else {
- struct znode *pn = parent->child;
- while (pn->sibling)
+ struct znode *pn = parent->child;
+ while (pn->sibling)
pn = pn->sibling;
pn->sibling = zn;
}
if (!sibling->sibling) {
sibling->sibling = zn;
} else {
- struct znode *pn = sibling->sibling;
- while (pn->sibling)
+ struct znode *pn = sibling->sibling;
+ while (pn->sibling)
pn = pn->sibling;
pn->sibling = zn;
}
if (!zv)
return;
if (!zvolume_list) {
- zvolume_list = zv;
+ zvolume_list = zv;
} else {
- struct zvolume *v = zvolume_list;
- while (v->next)
+ struct zvolume *v = zvolume_list;
+ while (v->next)
v = v->next;
v->next = zv;
}
char *s = zfile_getname(zv->archive);
if (strlen(path) >= strlen(s) && !memcmp (path, s, strlen(s)))
return zv;
- zv = zv->next;
+ zv = zv->next;
}
return NULL;
}
zfile_fread (header, sizeof (header), 1, zf);
zfile_fseek (zf, 0, SEEK_SET);
if (header[0] == 'P' && header[1] == 'K')
- zv = archive_directory_zip (zf);
+ zv = archive_directory_zip (zf);
if (header[0] == 'R' && header[1] == 'a' && header[2] == 'r' && header[3] == '!')
- zv = archive_directory_rar (zf);
+ zv = archive_directory_rar (zf);
if (header[0] == 'L' && header[1] == 'Z' && header[2] == 'X')
- zv = archive_directory_lzx (zf);
+ zv = archive_directory_lzx (zf);
if (header[2] == '-' && header[3] == 'l' && header[4] == 'h' && header[6] == '-')
- zv = archive_directory_lha (zf);
+ zv = archive_directory_lha (zf);
return zv;
}
zndir = get_znode(zv, tmp);
if (!zndir) {
struct zarchive_info zai = { 0 };
- zvnew = zvolume_alloc_empty (tmp);
+ zvnew = zvolume_alloc_empty (tmp);
zai.name = tmp;
zai.t = zn->mtime;
zndir = zvolume_adddir_abs(zv, &zai);
struct zfile *zf = NULL;
struct zvolume *zvnew = NULL;
- write_log("unpacking '%s'\n", path);
+ write_log ("unpacking '%s'\n", path);
zf = zfile_open_archive(path, 0);
if (!zf)
goto end;
zfile_fclose_archive(zv);
return zvnew;
end:
- write_log("unpack failed\n");
+ write_log ("unpack failed\n");
zfile_fclose_archive (zvnew);
zfile_fclose(zf);
return NULL;
if (zvdeep->archive == NULL) {
zvdeep = prepare_recursive_volume(zvdeep, zn->fullname);
if (!zvdeep) {
- write_log("failed to unpack '%s'\n", zn->fullname);
+ write_log ("failed to unpack '%s'\n", zn->fullname);
return NULL;
}
/* replace dummy empty volume with real volume */
{
struct znode *zn;
char path[MAX_DPATH];
-
+
sprintf(path, "%s%c%s", parent->fullname, FSDB_DIR_SEPARATOR, name);
zn = get_znode(parent->volume, path);
if (zn)
char tmp[MAX_DPATH];
struct zvolume *zv;
struct znode *zn;
-
+
sprintf(tmp, "%s%c%s", path, FSDB_DIR_SEPARATOR, rel);
zv = get_zvolume(tmp);
zn = get_znode(zv, tmp);
zn = &zv->root;
while (zn) {
int isok = 1;
-
+
if (!zn->isfile)
isok = 0;
if (zfile_is_ignore_ext(zn->fullname))
isok = 0;
if (isok) {
if (tmphist[0]) {
- DISK_history_add (tmphist, -1);
- tmphist[0] = 0;
- first = 0;
+ DISK_history_add (tmphist, -1);
+ tmphist[0] = 0;
+ first = 0;
}
if (first) {
if (zfile_isdiskimage (zn->fullname))
strcpy (tmphist, zn->fullname);
} else {
- strcpy (tmphist, zn->fullname);
- DISK_history_add (tmphist, -1);
- tmphist[0] = 0;
+ strcpy (tmphist, zn->fullname);
+ DISK_history_add (tmphist, -1);
+ tmphist[0] = 0;
}
select = 0;
if (!zf->zipname)
- select = 1;
+ select = 1;
if (zf->zipname && !strcasecmp (zf->zipname, zn->name))
- select = -1;
+ select = -1;
if (zf->zipname && zf->zipname[0] == '#' && atol (zf->zipname + 1) == zipcnt)
- select = -1;
+ select = -1;
if (select && !we_have_file) {
z = archive_getzfile(zn, id);
if (z) {
zn = zn->next;
}
if (first && tmphist[0])
- DISK_history_add (zfile_getname(zf), -1);
+ DISK_history_add (zfile_getname(zf), -1);
zfile_fclose_archive (zv);
if (z) {
zfile_fclose(zf);
unzCloseCurrentFile (uz);
return z;
}
-
+
/* 7Z */
#include "archivers/7z/7zCrc.h"
static void init_7z(void)
{
static int initialized;
-
+
if (initialized)
return;
initialized = 1;
ctx->archiveStream.zf = z;
res = SzArchiveOpen(&ctx->archiveStream.InStream, &ctx->db, &allocImp, &allocTempImp);
if (res != SZ_OK) {
- write_log("7Z: SzArchiveOpen %s returned %d\n", zfile_getname(z), res);
+ write_log ("7Z: SzArchiveOpen %s returned %d\n", zfile_getname(z), res);
return NULL;
}
zv = zvolume_alloc(z, ArchiveFormat7Zip, ctx);
struct SevenZContext *ctx;
ctx = zv->handle;
- res = SzExtract(&ctx->archiveStream.InStream, &ctx->db, zn->offset,
- &ctx->blockIndex, &ctx->outBuffer, &ctx->outBufferSize,
- &offset, &outSizeProcessed,
+ res = SzExtract(&ctx->archiveStream.InStream, &ctx->db, zn->offset,
+ &ctx->blockIndex, &ctx->outBuffer, &ctx->outBufferSize,
+ &offset, &outSizeProcessed,
&allocImp, &allocTempImp);
if (res == SZ_OK) {
- z = zfile_fopen_empty (zn->fullname, zn->size);
+ z = zfile_fopen_empty (zn->fullname, zn->size);
zfile_fwrite (ctx->outBuffer + offset, zn->size, 1, z);
} else {
- write_log("7Z: SzExtract %s returned %d\n", zn->fullname, res);
+ write_log ("7Z: SzExtract %s returned %d\n", zn->fullname, res);
}
return z;
}
{
z->f = fopen (z->name, "rb");
if (!z->f) {
- zfile_fclose (z);
- return 0;
+ zfile_fclose (z);
+ return 0;
}
return 1;
}
struct RARContext
{
struct RAROpenArchiveData OpenArchiveData;
- struct RARHeaderDataEx HeaderData;
+ struct RARHeaderDataEx HeaderData;
HANDLE hArcData;
};
zfile_fclose_archive(zv);
return NULL;
}
- zfile_fclose_archive(zv);
+ zfile_fclose_archive(zv);
return archive_directory_arcacc (z, ArchiveFormatRAR);
}
pRARSetCallback(rc->hArcData, RARCallbackProc, 0);
zai.name = name;
zai.size = rc->HeaderData.UnpSize;
zai.t = fromdostime(rc->HeaderData.FileTime);
- zn = zvolume_addfile_abs(zv, &zai);
+ zn = zvolume_addfile_abs(zv, &zai);
zn->offset = cnt++;
- pRARProcessFile(rc->hArcData, RAR_SKIP, NULL, NULL);
+ pRARProcessFile(rc->hArcData, RAR_SKIP, NULL, NULL);
}
pRARCloseArchive(rc->hArcData);
zftmp = zfile_fopen_empty (z->name, 0);
uae_u32 dwHighDateTime;
};
typedef void* aaHandle;
-// This struct contains file information from an archive. The caller may store
+// This struct contains file information from an archive. The caller may store
// this information for accessing this file after calls to findFirst, findNext
#define FileInArchiveInfoStringSize 1024
struct aaFileInArchiveInfo {
zai.size = size;
zn = zvolume_addfile_abs(zv, &zai);
if (zn)
- zn->f = z;
+ zn->f = z;
else
- zfile_fclose(z);
+ zfile_fclose(z);
}
static uae_u8 exeheader[]={0x00,0x00,0x03,0xf3,0x00,0x00,0x00,0x00};