bugfixes 2010.07.07

parent a6e2ea74
...@@ -224,10 +224,10 @@ static void do_samplerip (struct audio_channel_data *adp) ...@@ -224,10 +224,10 @@ static void do_samplerip (struct audio_channel_data *adp)
{ {
struct ripped_sample *rs = ripped_samples, *prev; struct ripped_sample *rs = ripped_samples, *prev;
int len = adp->len * 2; int len = adp->len * 2;
uae_u8 *smp = chipmem_bank.xlateaddr (adp->pt); uae_u8 *smp = chipmem_xlate_indirect (adp->pt);
int cnt = 0, i; int cnt = 0, i;
if (!smp || !chipmem_bank.check (adp->pt, len)) if (!smp || !chipmem_check_indirect (adp->pt, len))
return; return;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
if (smp[i] != 0) if (smp[i] != 0)
...@@ -1722,7 +1722,7 @@ void audio_hsync (int hpos) ...@@ -1722,7 +1722,7 @@ void audio_hsync (int hpos)
write_log ("%d:>5: LEN=%d PT=%08X\n", nr, cdp->wlen, cdp->pt); write_log ("%d:>5: LEN=%d PT=%08X\n", nr, cdp->wlen, cdp->pt);
#endif #endif
} }
cdp->dat2 = last_custom_value1 = chipmem_agnus_wget (cdp->pt); cdp->dat2 = last_custom_value1 = chipmem_wget_indirect (cdp->pt);
if (cdp->request_word >= 2) if (cdp->request_word >= 2)
handle2 = 1; handle2 = 1;
if (chan_ena) { if (chan_ena) {
...@@ -1977,7 +1977,7 @@ void audio_vsync (void) ...@@ -1977,7 +1977,7 @@ void audio_vsync (void)
{ {
#if SOUNDSTUFF > 0 #if SOUNDSTUFF > 0
int max, min; int max, min;
int vsync = isfullscreen () > 0 && currprefs.gfx_avsync > 0; int vsync = isfullscreen () > 0 && currprefs.gfx_avsync;
static int lastdir; static int lastdir;
if (!vsync) { if (!vsync) {
......
...@@ -4153,4 +4153,3 @@ void config_check_vsync (void) ...@@ -4153,4 +4153,3 @@ void config_check_vsync (void)
config_changed = 0; config_changed = 0;
} }
} }
...@@ -99,7 +99,7 @@ static void RethinkICRA (void) ...@@ -99,7 +99,7 @@ static void RethinkICRA (void)
{ {
if (ciaaimask & ciaaicr) { if (ciaaimask & ciaaicr) {
ciaaicr |= 0x80; ciaaicr |= 0x80;
send_interrupt (3, 3); send_interrupt (3, 2 * CYCLE_UNIT + CYCLE_UNIT / 2);
} }
} }
...@@ -107,7 +107,7 @@ static void RethinkICRB (void) ...@@ -107,7 +107,7 @@ static void RethinkICRB (void)
{ {
if (ciabimask & ciabicr) { if (ciabimask & ciabicr) {
ciabicr |= 0x80; ciabicr |= 0x80;
send_interrupt (13, 3); send_interrupt (13, 2 * CYCLE_UNIT + CYCLE_UNIT / 2);
} }
} }
...@@ -568,6 +568,7 @@ static void led_vsync (void) ...@@ -568,6 +568,7 @@ static void led_vsync (void)
if (led_old_brightness != gui_data.powerled_brightness) { if (led_old_brightness != gui_data.powerled_brightness) {
gui_data.powerled = gui_data.powerled_brightness > 127; gui_data.powerled = gui_data.powerled_brightness > 127;
gui_led (LED_POWER, gui_data.powerled); gui_led (LED_POWER, gui_data.powerled);
led_filter_audio ();
} }
led_old_brightness = gui_data.powerled_brightness; led_old_brightness = gui_data.powerled_brightness;
led_cycle = get_cycles (); led_cycle = get_cycles ();
...@@ -598,7 +599,6 @@ static void bfe001_change (void) ...@@ -598,7 +599,6 @@ static void bfe001_change (void)
calc_led (led); calc_led (led);
led = led2; led = led2;
led_old_brightness = -1; led_old_brightness = -1;
led_filter_audio ();
} }
if (currprefs.cs_ciaoverlay && (v & 1) != oldovl) { if (currprefs.cs_ciaoverlay && (v & 1) != oldovl) {
oldovl = v & 1; oldovl = v & 1;
......
...@@ -135,10 +135,6 @@ struct ev2 eventtab2[ev2_max]; ...@@ -135,10 +135,6 @@ struct ev2 eventtab2[ev2_max];
volatile frame_time_t vsynctime, vsyncmintime; volatile frame_time_t vsynctime, vsyncmintime;
#ifdef JIT
extern uae_u8* compiled_code;
#endif
int vpos; int vpos;
static int vpos_count, vpos_count_prev; static int vpos_count, vpos_count_prev;
static int lof_store; // real bit in custom registers static int lof_store; // real bit in custom registers
...@@ -2999,9 +2995,9 @@ STATIC_INLINE int GETHPOS (void) ...@@ -2999,9 +2995,9 @@ STATIC_INLINE int GETHPOS (void)
} }
// DFF006 = 0.W must be valid result // DFF006 = 0.W must be valid result but better do this only in 68000 modes (whdload black screen!)
#define HPOS_OFFSET 3 #define HPOS_OFFSET (currprefs.cpu_model < 68020 ? 3 : 0)
STATIC_INLINE uae_u16 VPOSR (void) STATIC_INLINE uae_u16 VPOSR (void)
{ {
...@@ -3087,9 +3083,11 @@ STATIC_INLINE uae_u16 VHPOSR (void) ...@@ -3087,9 +3083,11 @@ STATIC_INLINE uae_u16 VHPOSR (void)
if (vp >= maxvpos + lof_store) if (vp >= maxvpos + lof_store)
vp = 0; vp = 0;
} }
if (HPOS_OFFSET) {
hp += 1; hp += 1;
if (hp >= maxhpos) if (hp >= maxhpos)
hp -= maxhpos; hp -= maxhpos;
}
vp <<= 8; vp <<= 8;
vp |= hp; vp |= hp;
...@@ -3452,8 +3450,8 @@ void INTREQ_f (uae_u16 v) ...@@ -3452,8 +3450,8 @@ void INTREQ_f (uae_u16 v)
if (use_eventmode (v)) { if (use_eventmode (v)) {
send_intreq_do (v); send_intreq_do (v);
} else { } else {
intreq |= v; setclr (&intreq, v);
intreq_internal |= v; setclr (&intreq_internal, v);
} }
} }
...@@ -3504,6 +3502,7 @@ static void ADKCON (int hpos, uae_u16 v) ...@@ -3504,6 +3502,7 @@ static void ADKCON (int hpos, uae_u16 v)
if (currprefs.produce_sound > 0) if (currprefs.produce_sound > 0)
update_audio (); update_audio ();
DISK_update_adkcon (hpos, v);
setclr (&adkcon, v); setclr (&adkcon, v);
audio_update_adkmasks (); audio_update_adkmasks ();
DISK_update (hpos); DISK_update (hpos);
...@@ -5048,7 +5047,7 @@ static void vsync_handler (void) ...@@ -5048,7 +5047,7 @@ static void vsync_handler (void)
#endif #endif
) { ) {
#ifdef JIT #ifdef JIT
if (!compiled_code) { if (!currprefs.cachesize) {
#endif #endif
if (currprefs.m68k_speed == -1) { if (currprefs.m68k_speed == -1) {
frame_time_t curr_time = uae_gethrtime (); frame_time_t curr_time = uae_gethrtime ();
...@@ -5323,6 +5322,8 @@ void hsync_handler (void) ...@@ -5323,6 +5322,8 @@ void hsync_handler (void)
CDTV_hsync_handler (); CDTV_hsync_handler ();
#endif #endif
decide_blitter (-1); decide_blitter (-1);
DISK_hsync (maxhpos);
#ifdef CPUEMU_12 #ifdef CPUEMU_12
if (currprefs.cpu_cycle_exact || currprefs.blitter_cycle_exact) { if (currprefs.cpu_cycle_exact || currprefs.blitter_cycle_exact) {
memset (cycle_line, 0, sizeof cycle_line); memset (cycle_line, 0, sizeof cycle_line);
...@@ -5444,12 +5445,11 @@ void hsync_handler (void) ...@@ -5444,12 +5445,11 @@ void hsync_handler (void)
#endif #endif
DISK_hsync (maxhpos);
if (currprefs.produce_sound) if (currprefs.produce_sound)
audio_hsync (-1); audio_hsync (-1);
#ifdef JIT #ifdef JIT
if (compiled_code) { if (currprefs.cachesize) {
if (currprefs.m68k_speed == -1) { if (currprefs.m68k_speed == -1) {
static int count = 0; static int count = 0;
count++; count++;
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include "cia.h" #include "cia.h"
#include "xwin.h" #include "xwin.h"
#include "identify.h" #include "identify.h"
#include "audio.h"
#include "disk.h" #include "disk.h"
#include "savestate.h" #include "savestate.h"
#include "autoconf.h" #include "autoconf.h"
...@@ -46,6 +47,7 @@ static int memwatch_enabled, memwatch_triggered; ...@@ -46,6 +47,7 @@ static int memwatch_enabled, memwatch_triggered;
static uae_u16 sr_bpmask, sr_bpvalue; static uae_u16 sr_bpmask, sr_bpvalue;
int debugging; int debugging;
int exception_debugging; int exception_debugging;
int no_trace_exceptions;
int debug_copper = 0; int debug_copper = 0;
int debug_dma = 0; int debug_dma = 0;
int debug_sprite_mask = 0xff; int debug_sprite_mask = 0xff;
...@@ -175,6 +177,7 @@ static void ignore_ws (const char **c) ...@@ -175,6 +177,7 @@ static void ignore_ws (const char **c)
} }
static uae_u32 readint (const char **c); static uae_u32 readint (const char **c);
static uae_u32 readbin (const char **c);
static uae_u32 readhex (const char **c) static uae_u32 readhex (const char **c)
{ {
uae_u32 val = 0; uae_u32 val = 0;
...@@ -264,6 +267,14 @@ static int next_string (const char **c, char *out, unsigned int max, int forceup ...@@ -264,6 +267,14 @@ static int next_string (const char **c, char *out, unsigned int max, int forceup
return strlen (out); return strlen (out);
} }
int notinrom (void)
{
uaecptr pc = munge24 (m68k_getpc ());
if (pc < 0x00e00000 || pc > 0x00ffffff)
return 1;
return 0;
}
static uae_u32 lastaddr (void) static uae_u32 lastaddr (void)
{ {
if (currprefs.z3fastmem_size) if (currprefs.z3fastmem_size)
......
...@@ -55,8 +55,8 @@ static int longwritemode = 0; ...@@ -55,8 +55,8 @@ static int longwritemode = 0;
#define FLOPPY_WRITE_MAXLEN 0x3800 #define FLOPPY_WRITE_MAXLEN 0x3800
/* This works out to 350 */ /* This works out to 350 */
#define FLOPPY_GAP_LEN (FLOPPY_WRITE_LEN - 11 * 544) #define FLOPPY_GAP_LEN (FLOPPY_WRITE_LEN - 11 * 544)
/* (cycles/bitcell) << 8, normal = ((2us/280ns)<<8) = ~1830 */ /* (cycles/bitcell) << 8, normal = ((2us/280ns)<<8) = ~1829.5714 */
#define NORMAL_FLOPPY_SPEED (currprefs.ntscmode ? 1810 : 1829) #define NORMAL_FLOPPY_SPEED (currprefs.ntscmode ? 1811 : 1829)
/* max supported floppy drives, for small memory systems */ /* max supported floppy drives, for small memory systems */
#define MAX_FLOPPY_DRIVES 4 #define MAX_FLOPPY_DRIVES 4
...@@ -103,6 +103,8 @@ static uae_u16 dskbytr_val; ...@@ -103,6 +103,8 @@ static uae_u16 dskbytr_val;
static uae_u32 dskpt; static uae_u32 dskpt;
static int dma_enable, bitoffset, syncoffset; static int dma_enable, bitoffset, syncoffset;
static uae_u16 word, dsksync; static uae_u16 word, dsksync;
static unsigned long dsksync_cycles;
#define WORDSYNC_TIME 11
/* Always carried through to the next line. */ /* Always carried through to the next line. */
static unsigned int disk_hpos; static unsigned int disk_hpos;
static int disk_jitter; static int disk_jitter;
...@@ -1656,7 +1658,7 @@ static void drive_fill_bigbuf (drive * drv, int force) ...@@ -1656,7 +1658,7 @@ static void drive_fill_bigbuf (drive * drv, int force)
int base_offset = ti->type == TRACK_RAW ? 0 : 1; int base_offset = ti->type == TRACK_RAW ? 0 : 1;
drv->tracklen = ti->bitlen + 16 * base_offset; drv->tracklen = ti->bitlen + 16 * base_offset;
drv->bigmfmbuf[0] = ti->sync; drv->bigmfmbuf[0] = ti->sync;
read_floppy_data (drv->diskfile, ti, 0, drv->bigmfmbuf + base_offset, (ti->bitlen + 7) / 8); read_floppy_data (drv->diskfile, ti, 0, (uae_u8*)(drv->bigmfmbuf + base_offset), (ti->bitlen + 7) / 8);
for (i = base_offset; i < (drv->tracklen + 15) / 16; i++) { for (i = base_offset; i < (drv->tracklen + 15) / 16; i++) {
uae_u16 *mfm = drv->bigmfmbuf + i; uae_u16 *mfm = drv->bigmfmbuf + i;
uae_u8 *data = (uae_u8 *) mfm; uae_u8 *data = (uae_u8 *) mfm;
...@@ -1677,7 +1679,7 @@ static void drive_fill_bigbuf (drive * drv, int force) ...@@ -1677,7 +1679,7 @@ static void drive_fill_bigbuf (drive * drv, int force)
} }
/* Update ADF_EXT2 track header */ /* Update ADF_EXT2 track header */
static void diskfile_update (struct zfile *diskfile, trackid *ti, int len, uae_u8 type) static void diskfile_update (struct zfile *diskfile, trackid *ti, int len, image_tracktype type)
{ {
uae_u8 buf[2 + 2 + 4 + 4], *zerobuf; uae_u8 buf[2 + 2 + 4 + 4], *zerobuf;
...@@ -2236,6 +2238,16 @@ int DISK_history_add (const char *name, int idx, int type, int donotcheck) ...@@ -2236,6 +2238,16 @@ int DISK_history_add (const char *name, int idx, int type, int donotcheck)
return 0; return 0;
if (!donotcheck) { if (!donotcheck) {
if (!zfile_exists (name)) { if (!zfile_exists (name)) {
for (i = 0; i < MAX_PREVIOUS_FLOPPIES; i++) {
if (!_tcsicmp (dfxhistory[type][i], name)) {
while (i < MAX_PREVIOUS_FLOPPIES - 1) {
_tcscpy (dfxhistory[type][i], dfxhistory[type][i + 1]);
i++;
}
dfxhistory[type][MAX_PREVIOUS_FLOPPIES - 1][0] = 0;
break;
}
}
return 0; return 0;
} }
} }
...@@ -2718,13 +2730,19 @@ static void disk_doupdate_write (drive * drv, int floppybits) ...@@ -2718,13 +2730,19 @@ static void disk_doupdate_write (drive * drv, int floppybits)
} }
} }
static void update_jitter (void)
{
if (currprefs.floppy_random_bits_max > 0)
disk_jitter = ((uaerand () >> 4) % (currprefs.floppy_random_bits_max - currprefs.floppy_random_bits_min + 1)) + currprefs.floppy_random_bits_min;
else
disk_jitter = 0;
}
static void updatetrackspeed (drive *drv, unsigned int mfmpos) static void updatetrackspeed (drive *drv, unsigned int mfmpos)
{ {
if (dskdmaen < 3) { if (dskdmaen < 3) {
uae_u16 *p = drv->tracktiming; int t = drv->tracktiming[mfmpos / 8];
p += mfmpos / 8; drv->trackspeed = get_floppy_speed2 (drv) * t / 1000;
drv->trackspeed = get_floppy_speed2 (drv);
drv->trackspeed = drv->trackspeed * p[0] / 1000;
if (drv->trackspeed < 700 || drv->trackspeed > 3000) { if (drv->trackspeed < 700 || drv->trackspeed > 3000) {
static int warned; static int warned;
warned++; warned++;
...@@ -2768,6 +2786,7 @@ static void disk_doupdate_predict (drive * drv, int startcycle) ...@@ -2768,6 +2786,7 @@ static void disk_doupdate_predict (drive * drv, int startcycle)
indexhack = 0; indexhack = 0;
} }
if (dskdmaen != 3 && mfmpos == drv->skipoffset) { if (dskdmaen != 3 && mfmpos == drv->skipoffset) {
update_jitter ();
int skipcnt = disk_jitter; int skipcnt = disk_jitter;
while (skipcnt-- > 0) { while (skipcnt-- > 0) {
mfmpos++; mfmpos++;
...@@ -2884,23 +2903,22 @@ static void disk_doupdate_read (drive * drv, int floppybits) ...@@ -2884,23 +2903,22 @@ static void disk_doupdate_read (drive * drv, int floppybits)
drv->indexhack = 0; drv->indexhack = 0;
} }
if ((int)drv->mfmpos == drv->skipoffset) { if ((int)drv->mfmpos == drv->skipoffset) {
update_jitter ();
drv->mfmpos += disk_jitter; drv->mfmpos += disk_jitter;
drv->mfmpos %= drv->tracklen; drv->mfmpos %= drv->tracklen;
} }
bool dmadone = doreaddma (); doreaddma ();
if ((bitoffset & 7) == 7) { if ((bitoffset & 7) == 7) {
dskbytr_val = word & 0xff; dskbytr_val = word & 0xff;
dskbytr_val |= 0x8000; dskbytr_val |= 0x8000;
} }
if (word == dsksync) { if (word == dsksync) {
dsksync_cycles = get_cycles () + WORDSYNC_TIME * CYCLE_UNIT;
if (dskdmaen) { if (dskdmaen) {
if (disk_debug_logging && dma_enable == 0) if (disk_debug_logging && dma_enable == 0)
write_log ("Sync match, DMA started at %d PC=%08x\n", drv->mfmpos, M68K_GETPC); write_log ("Sync match, DMA started at %d PC=%08x\n", drv->mfmpos, M68K_GETPC);
dma_enable = 1; dma_enable = 1;
} }
// start DMA immediately if bitoffset is already in sync instead of waiting for next word
if (!dmadone)
doreaddma ();
if (adkcon & 0x400) if (adkcon & 0x400)
bitoffset = 15; bitoffset = 15;
} }
...@@ -2946,7 +2964,7 @@ uae_u16 DSKBYTR (unsigned int hpos) ...@@ -2946,7 +2964,7 @@ uae_u16 DSKBYTR (unsigned int hpos)
DISK_update (hpos); DISK_update (hpos);
v = dskbytr_val; v = dskbytr_val;
dskbytr_val &= ~0x8000; dskbytr_val &= ~0x8000;
if (word == dsksync) if (word == dsksync && cycles_in_range (dsksync_cycles))
v |= 0x1000; v |= 0x1000;
if (dskdmaen && dmaen (DMA_DISK)) if (dskdmaen && dmaen (DMA_DISK))
v |= 0x4000; v |= 0x4000;
...@@ -2964,7 +2982,7 @@ uae_u16 DSKBYTR (unsigned int hpos) ...@@ -2964,7 +2982,7 @@ uae_u16 DSKBYTR (unsigned int hpos)
if (!(selected & (1 << dr))) { if (!(selected & (1 << dr))) {
if (disk_debug_track < 0 || disk_debug_track == 2 * (int)drv->cyl + side) { if (disk_debug_track < 0 || disk_debug_track == 2 * (int)drv->cyl + side) {
disk_dma_debugmsg (); disk_dma_debugmsg ();
write_log ("DSKBYTR=%04.4X\n", v); write_log ("DSKBYTR=%04X\n", v);
activate_debugger (); activate_debugger ();
break; break;
} }
...@@ -3029,7 +3047,6 @@ void DISK_update (unsigned int tohpos) ...@@ -3029,7 +3047,6 @@ void DISK_update (unsigned int tohpos)
int startcycle = disk_hpos; int startcycle = disk_hpos;
int didread; int didread;
disk_jitter = ((rand () >> 4) & 3) + 1;
if (cycles <= 0) if (cycles <= 0)
return; return;
disk_hpos += cycles; disk_hpos += cycles;
...@@ -3272,6 +3289,18 @@ void DSKLEN (uae_u16 v, unsigned int hpos) ...@@ -3272,6 +3289,18 @@ void DSKLEN (uae_u16 v, unsigned int hpos)
} }
} }
void DISK_update_adkcon (unsigned int hpos, uae_u16 v)
{
uae_u16 vold = adkcon;
uae_u16 vnew = adkcon;
if (v & 0x8000)
vnew |= v & 0x7FFF;
else
vnew &= ~v;
if ((vnew & 0x400) && !(vold & 0x400))
bitoffset = 0;
}
void DSKSYNC (unsigned int hpos, uae_u16 v) void DSKSYNC (unsigned int hpos, uae_u16 v)
{ {
if (v == dsksync) if (v == dsksync)
......
...@@ -2147,7 +2147,7 @@ static void center_image (void) ...@@ -2147,7 +2147,7 @@ static void center_image (void)
int prev_y_adjust = thisframe_y_adjust; int prev_y_adjust = thisframe_y_adjust;
int tmp; int tmp;
if (currprefs.gfx_xcenter && !currprefs.gfx_filter_autoscale) { if (currprefs.gfx_xcenter && !currprefs.gfx_filter_autoscale && max_diwstop > 0) {
int w = gfxvidinfo.width; int w = gfxvidinfo.width;
if (max_diwstop - min_diwstart < w && currprefs.gfx_xcenter == 2) if (max_diwstop - min_diwstart < w && currprefs.gfx_xcenter == 2)
...@@ -2164,7 +2164,7 @@ static void center_image (void) ...@@ -2164,7 +2164,7 @@ static void center_image (void)
visible_left_border = prev_x_adjust; visible_left_border = prev_x_adjust;
} }
} else { } else {
if (beamcon0 & 0x80) { if ((beamcon0 & 0x80) && max_diwstop > 0) {
int w = gfxvidinfo.width; int w = gfxvidinfo.width;
if (max_diwstop - min_diwstart < w) if (max_diwstop - min_diwstart < w)
visible_left_border = (max_diwstop - min_diwstart - w) / 2 + min_diwstart; visible_left_border = (max_diwstop - min_diwstart - w) / 2 + min_diwstart;
......
...@@ -208,6 +208,7 @@ void driveclick_init (void) ...@@ -208,6 +208,7 @@ void driveclick_init (void)
driveclick_reset (); driveclick_reset ();
click_initialized = 1; click_initialized = 1;
} }
if (v != 5) { click_initialized= 0; wave_initialized = 0;}
} }
void driveclick_reset (void) void driveclick_reset (void)
......
...@@ -2392,11 +2392,29 @@ static int get_mouse_widget_type (unsigned int mouse, unsigned int num, char *na ...@@ -2392,11 +2392,29 @@ static int get_mouse_widget_type (unsigned int mouse, unsigned int num, char *na
return IDEV_WIDGET_NONE; return IDEV_WIDGET_NONE;
} }
static int get_mouse_flags (int num)
{
/* if (di_mouse[num].rawinput || !rawinput_enabled_mouse)
return 0;
if (di_mouse[num].catweasel)
return 0;*/
return 1;
}
static void read_mouse (void) static void read_mouse (void)
{ {
/* We handle mouse input in handle_events() */ /* We handle mouse input in handle_events() */
} }
static int get_mouse_flags (int num)
{
/* if (di_mouse[num].rawinput || !rawinput_enabled_mouse)
return 0;
if (di_mouse[num].catweasel)
return 0;*/
return 1;
}
struct inputdevice_functions inputdevicefunc_mouse = { struct inputdevice_functions inputdevicefunc_mouse = {
init_mouse, init_mouse,
close_mouse, close_mouse,
...@@ -2408,13 +2426,14 @@ struct inputdevice_functions inputdevicefunc_mouse = { ...@@ -2408,13 +2426,14 @@ struct inputdevice_functions inputdevicefunc_mouse = {
get_kb_uniquename, get_kb_uniquename,
get_mouse_widget_num, get_mouse_widget_num,
get_mouse_widget_type, get_mouse_widget_type,
get_mouse_widget_first get_mouse_widget_first,
get_mouse_flags
}; };
/* /*
* Default inputdevice config for mouse * Default inputdevice config for mouse
*/ */
int input_get_default_mouse (struct uae_input_device *uid, int num, int port) int input_get_default_mouse (struct uae_input_device *uid, int num, int port, int af)
{ {
/* Supports only one mouse for now */ /* Supports only one mouse for now */
uid[0].eventid[ID_AXIS_OFFSET + 0][0] = INPUTEVENT_MOUSE1_HORIZ; uid[0].eventid[ID_AXIS_OFFSET + 0][0] = INPUTEVENT_MOUSE1_HORIZ;
...@@ -2490,6 +2509,11 @@ static void unacquire_kb (unsigned int num) ...@@ -2490,6 +2509,11 @@ static void unacquire_kb (unsigned int num)
{ {
} }
static int get_kb_flags (int num)
{
return 0;
}
struct inputdevice_functions inputdevicefunc_keyboard = struct inputdevice_functions inputdevicefunc_keyboard =
{ {
init_kb, init_kb,
...@@ -2501,7 +2525,8 @@ struct inputdevice_functions inputdevicefunc_keyboard = ...@@ -2501,7 +2525,8 @@ struct inputdevice_functions inputdevicefunc_keyboard =
get_kb_name, get_kb_name,
get_kb_widget_num, get_kb_widget_num,
get_kb_widget_type, get_kb_widget_type,
get_kb_widget_first get_kb_widget_first,
get_kb_flags
}; };
int getcapslockstate (void) int getcapslockstate (void)
......
...@@ -132,6 +132,11 @@ static void unacquire_kb (unsigned int num) ...@@ -132,6 +132,11 @@ static void unacquire_kb (unsigned int num)
{ {
} }
static int get_kb_flags (int num)
{
return 0;
}
struct inputdevice_functions inputdevicefunc_keyboard = struct inputdevice_functions inputdevicefunc_keyboard =
{ {
init_kb, init_kb,
...@@ -144,7 +149,8 @@ struct inputdevice_functions inputdevicefunc_keyboard = ...@@ -144,7 +149,8 @@ struct inputdevice_functions inputdevicefunc_keyboard =
get_kb_uniquename, get_kb_uniquename,
get_kb_widget_num, get_kb_widget_num,
get_kb_widget_type, get_kb_widget_type,
get_kb_widget_first get_kb_widget_first,
get_kb_flags
}; };
int getcapslockstate (void) int getcapslockstate (void)
......
...@@ -487,6 +487,15 @@ static int get_mouse_widget_type (unsigned int mouse, unsigned int num, char *na ...@@ -487,6 +487,15 @@ static int get_mouse_widget_type (unsigned int mouse, unsigned int num, char *na
return IDEV_WIDGET_NONE; return IDEV_WIDGET_NONE;
} }
static int get_mouse_flags (int num)
{
/* if (di_mouse[num].rawinput || !rawinput_enabled_mouse)
return 0;
if (di_mouse[num].catweasel)
return 0;*/
return 1;
}
static void read_mouse (void) static void read_mouse (void)
{ {
gWin->UpdateMouse (); gWin->UpdateMouse ();
...@@ -502,13 +511,14 @@ struct inputdevice_functions inputdevicefunc_mouse = { ...@@ -502,13 +511,14 @@ struct inputdevice_functions inputdevicefunc_mouse = {
get_mouse_name, get_mouse_name,
get_mouse_widget_num, get_mouse_widget_num,
get_mouse_widget_type, get_mouse_widget_type,
get_mouse_widget_first get_mouse_widget_first,
get_mouse_flags
}; };
/* /*
* Default inputdevice config for BeOS mouse * Default inputdevice config for BeOS mouse
*/ */
void input_get_default_mouse (struct uae_input_device *uid) int input_get_default_mouse (struct uae_input_device *uid, int num, int port, int af)
{ {
/* Supports only one mouse */ /* Supports only one mouse */
uid[0].eventid[ID_AXIS_OFFSET + 0][0] = INPUTEVENT_MOUSE1_HORIZ; uid[0].eventid[ID_AXIS_OFFSET + 0][0] = INPUTEVENT_MOUSE1_HORIZ;
...@@ -518,6 +528,7 @@ void input_get_default_mouse (struct uae_input_device *uid) ...@@ -518,6 +528,7 @@ void input_get_default_mouse (struct uae_input_device *uid)
uid[0].eventid[ID_BUTTON_OFFSET + 1][0] = INPUTEVENT_JOY1_2ND_BUTTON; uid[0].eventid[ID_BUTTON_OFFSET + 1][0] = INPUTEVENT_JOY1_2ND_BUTTON;
uid[0].eventid[ID_BUTTON_OFFSET + 2][0] = INPUTEVENT_JOY1_3RD_BUTTON; uid[0].eventid[ID_BUTTON_OFFSET + 2][0] = INPUTEVENT_JOY1_3RD_BUTTON;
uid[0].enabled = 1; uid[0].enabled = 1;
return 0;
} }
/* /*
......
...@@ -754,6 +754,15 @@ static void read_mouse (void) ...@@ -754,6 +754,15 @@ static void read_mouse (void)
/* We handle mouse input in handle_events() */ /* We handle mouse input in handle_events() */
} }
static int get_mouse_flags (int num)
{
/* if (di_mouse[num].rawinput || !rawinput_enabled_mouse)
return 0;
if (di_mouse[num].catweasel)
return 0;*/
return 1;
}
struct inputdevice_functions inputdevicefunc_mouse = { struct inputdevice_functions inputdevicefunc_mouse = {
init_mouse, init_mouse,
close_mouse, close_mouse,
...@@ -764,7 +773,8 @@ struct inputdevice_functions inputdevicefunc_mouse = { ...@@ -764,7 +773,8 @@ struct inputdevice_functions inputdevicefunc_mouse = {
get_mouse_name, get_mouse_name,
get_mouse_widget_num, get_mouse_widget_num,
get_mouse_widget_type, get_mouse_widget_type,
get_mouse_widget_first get_mouse_widget_first,
get_mouse_flags
}; };
/* /*
...@@ -830,6 +840,11 @@ static void unacquire_kb (unsigned int num) ...@@ -830,6 +840,11 @@ static void unacquire_kb (unsigned int num)
{ {
} }
static int get_kb_flags (int num)
{
return 0;
}
struct inputdevice_functions inputdevicefunc_keyboard = struct inputdevice_functions inputdevicefunc_keyboard =
{ {
init_kb, init_kb,
...@@ -842,7 +857,8 @@ struct inputdevice_functions inputdevicefunc_keyboard = ...@@ -842,7 +857,8 @@ struct inputdevice_functions inputdevicefunc_keyboard =
get_kb_uniquename, get_kb_uniquename,
get_kb_widget_num, get_kb_widget_num,
get_kb_widget_type, get_kb_widget_type,
get_kb_widget_first get_kb_widget_first,
get_kb_flags
}; };
int getcapslockstate (void) int getcapslockstate (void)
...@@ -857,15 +873,16 @@ void setcapslockstate (int state) ...@@ -857,15 +873,16 @@ void setcapslockstate (int state)
/* /*
* Default inputdevice config for mouse * Default inputdevice config for mouse
*/ */
void input_get_default_mouse (struct uae_input_device *uid) int input_get_default_mouse (struct uae_input_device *uid, int num, int port, int af)
{ {
uid[0].eventid[ID_AXIS_OFFSET + 0][0] = INPUTEVENT_MOUSE1_HORIZ; uid[0].eventid[ID_AXIS_OFFSET + 0][0] = INPUTEVENT_MOUSE1_HORIZ;
uid[0].eventid[ID_AXIS_OFFSET + 1][0] = INPUTEVENT_MOUSE1_VERT; uid[0].eventid[ID_AXIS_OFFSET + 1][0] = INPUTEVENT_MOUSE1_VERT;
uid[0].eventid[ID_AXIS_OFFSET + 2][0] = INPUTEVENT_MOUSE1_WHEEL; uid[0].eventid[ID_AXIS_OFFSET + 2][0] = INPUTEVENT_MOUSE1_WHEEL;
uid[0].eventid[ID_BUTTON_OFFSET + 0][0] = INPUTEVENT_JOY1_FIRE_BUTTON; uid[0].eventid[ID_BUTTON_OFFSET + 0][0] = INPUTEVENT_JOY1_FIRE_BUTTON;
uid[0].eventid[ID_BUTTON_OFFSET + 1][0] = INPUTEVENT_JOY1_2ND_BUTTON; uid[0].eventid[ID_BUTTON_OFFSET + 1][0] = INPUTEVENT_JOY1_2ND_BUTTON;
uid[0].eventid[ID_BUTTON_OFFSET + 2][0] = INPUTEVENT_JOY1_3RD_BUTTON; uid[0].eventid[ID_BUTTON_OFFSET + 2][0] = INPUTEVENT_JOY1_3RD_BUTTON;
uid[0].enabled = 1; uid[0].enabled = 1;
return 0;
} }
/* /*
......
...@@ -2011,6 +2011,15 @@ static void read_mouse (void) ...@@ -2011,6 +2011,15 @@ static void read_mouse (void)
/* We handle mouse input in handle_events() */ /* We handle mouse input in handle_events() */
} }
static int get_mouse_flags (int num)
{
/* if (di_mouse[num].rawinput || !rawinput_enabled_mouse)
return 0;
if (di_mouse[num].catweasel)
return 0;*/
return 1;
}
struct inputdevice_functions inputdevicefunc_mouse = { struct inputdevice_functions inputdevicefunc_mouse = {
init_mouse, init_mouse,
close_mouse, close_mouse,
...@@ -2022,7 +2031,8 @@ struct inputdevice_functions inputdevicefunc_mouse = { ...@@ -2022,7 +2031,8 @@ struct inputdevice_functions inputdevicefunc_mouse = {
get_mouse_uniquename, get_mouse_uniquename,
get_mouse_widget_num, get_mouse_widget_num,
get_mouse_widget_type, get_mouse_widget_type,
get_mouse_widget_first get_mouse_widget_first,
get_mouse_flags
}; };
/* /*
...@@ -2063,11 +2073,13 @@ static int get_kb_widget_type (unsigned int kb, unsigned int num, char *name, ua ...@@ -2063,11 +2073,13 @@ static int get_kb_widget_type (unsigned int kb, unsigned int num, char *name, ua
static int init_kb (void) static int init_kb (void)
{ {
struct uae_input_device_kbr_default *keymap = 0; struct uae_input_device_kbr_default *keymap = 0;
write_log("********** 1\n");
inputdevice_setkeytranslation (keymap, kbmaps);
/* See if we support raw keys on this platform */ /* See if we support raw keys on this platform */
if ((keymap = get_default_raw_keymap (get_sdlgfx_type ())) != 0) { if ((keymap = get_default_raw_keymap (get_sdlgfx_type ())) != 0) {
inputdevice_setkeytranslation (keymap, kbmaps); inputdevice_setkeytranslation (keymap, kbmaps);
have_rawkeys = 1; have_rawkeys = 1;
write_log("********** 2\n");
} }
switch_keymaps (); switch_keymaps ();
...@@ -2096,6 +2108,11 @@ static void unacquire_kb (unsigned int num) ...@@ -2096,6 +2108,11 @@ static void unacquire_kb (unsigned int num)
{ {
} }
static int get_kb_flags (int num)
{
return 0;
}
struct inputdevice_functions inputdevicefunc_keyboard = struct inputdevice_functions inputdevicefunc_keyboard =
{ {
init_kb, init_kb,
...@@ -2108,7 +2125,8 @@ struct inputdevice_functions inputdevicefunc_keyboard = ...@@ -2108,7 +2125,8 @@ struct inputdevice_functions inputdevicefunc_keyboard =
get_kb_uniquename, get_kb_uniquename,
get_kb_widget_num, get_kb_widget_num,
get_kb_widget_type, get_kb_widget_type,
get_kb_widget_first get_kb_widget_first,
get_kb_flags
}; };
//static int capslockstate; //static int capslockstate;
...@@ -2129,17 +2147,28 @@ void setcapslockstate (int state) ...@@ -2129,17 +2147,28 @@ void setcapslockstate (int state)
/* /*
* Default inputdevice config for SDL mouse * Default inputdevice config for SDL mouse
*/ */
int input_get_default_mouse (struct uae_input_device *uid, int num, int port) int input_get_default_mouse (struct uae_input_device *uid, int i, int port, int af)
{ {
/* SDL supports only one mouse */ /* SDL supports only one mouse */
uid[0].eventid[ID_AXIS_OFFSET + 0][0] = INPUTEVENT_MOUSE1_HORIZ; setid (uid, i, ID_AXIS_OFFSET + 0, 0, port, port ? INPUTEVENT_MOUSE2_HORIZ : INPUTEVENT_MOUSE1_HORIZ);
uid[0].eventid[ID_AXIS_OFFSET + 1][0] = INPUTEVENT_MOUSE1_VERT; setid (uid, i, ID_AXIS_OFFSET + 1, 0, port, port ? INPUTEVENT_MOUSE2_VERT : INPUTEVENT_MOUSE1_VERT);
uid[0].eventid[ID_AXIS_OFFSET + 2][0] = INPUTEVENT_MOUSE1_WHEEL; setid (uid, i, ID_AXIS_OFFSET + 2, 0, port, port ? 0 : INPUTEVENT_MOUSE1_WHEEL);
uid[0].eventid[ID_BUTTON_OFFSET + 0][0] = INPUTEVENT_JOY1_FIRE_BUTTON; setid (uid, i, ID_BUTTON_OFFSET + 0, 0, port, port ? INPUTEVENT_JOY2_FIRE_BUTTON : INPUTEVENT_JOY1_FIRE_BUTTON, af);
uid[0].eventid[ID_BUTTON_OFFSET + 1][0] = INPUTEVENT_JOY1_2ND_BUTTON; setid (uid, i, ID_BUTTON_OFFSET + 1, 0, port, port ? INPUTEVENT_JOY2_2ND_BUTTON : INPUTEVENT_JOY1_2ND_BUTTON);
uid[0].eventid[ID_BUTTON_OFFSET + 2][0] = INPUTEVENT_JOY1_3RD_BUTTON; setid (uid, i, ID_BUTTON_OFFSET + 2, 0, port, port ? INPUTEVENT_JOY2_3RD_BUTTON : INPUTEVENT_JOY1_3RD_BUTTON);
uid[0].enabled = 1; if (port == 0) { /* map back and forward to ALT+LCUR and ALT+RCUR */
return 0; // if (isrealbutton (did, 3)) {
setid (uid, i, ID_BUTTON_OFFSET + 3, 0, port, INPUTEVENT_KEY_ALT_LEFT);
setid (uid, i, ID_BUTTON_OFFSET + 3, 1, port, INPUTEVENT_KEY_CURSOR_LEFT);
// if (isrealbutton (did, 4)) {
setid (uid, i, ID_BUTTON_OFFSET + 4, 0, port, INPUTEVENT_KEY_ALT_LEFT);
setid (uid, i, ID_BUTTON_OFFSET + 4, 1, port, INPUTEVENT_KEY_CURSOR_RIGHT);
// }
// }
}
if (i == 0)
return 1;
return 0;
} }
/* /*
......
...@@ -1624,6 +1624,15 @@ static void read_mouse (void) ...@@ -1624,6 +1624,15 @@ static void read_mouse (void)
/* We handle mouse input in handle_events() */ /* We handle mouse input in handle_events() */
} }
static int get_mouse_flags (int num)
{
/* if (di_mouse[num].rawinput || !rawinput_enabled_mouse)
return 0;
if (di_mouse[num].catweasel)
return 0;*/
return 1;
}
struct inputdevice_functions inputdevicefunc_mouse = { struct inputdevice_functions inputdevicefunc_mouse = {
init_mouse, init_mouse,
close_mouse, close_mouse,
...@@ -1634,7 +1643,8 @@ struct inputdevice_functions inputdevicefunc_mouse = { ...@@ -1634,7 +1643,8 @@ struct inputdevice_functions inputdevicefunc_mouse = {
get_mouse_name, get_mouse_name,
get_mouse_widget_num, get_mouse_widget_num,
get_mouse_widget_type, get_mouse_widget_type,
get_mouse_widget_first get_mouse_widget_first,
get_mouse_flags
}; };
/* /*
...@@ -1717,7 +1727,7 @@ static void unacquire_kb (unsigned int num) ...@@ -1717,7 +1727,7 @@ static void unacquire_kb (unsigned int num)
/* /*
* Default inputdevice config for X11 mouse * Default inputdevice config for X11 mouse
*/ */
int input_get_default_mouse (struct uae_input_device *uid, int num, int port) int input_get_default_mouse (struct uae_input_device *uid, int num, int port, int af)
{ {
/* Supports only one mouse */ /* Supports only one mouse */
uid[0].eventid[ID_AXIS_OFFSET + 0][0] = INPUTEVENT_MOUSE1_HORIZ; uid[0].eventid[ID_AXIS_OFFSET + 0][0] = INPUTEVENT_MOUSE1_HORIZ;
...@@ -1730,6 +1740,11 @@ int input_get_default_mouse (struct uae_input_device *uid, int num, int port) ...@@ -1730,6 +1740,11 @@ int input_get_default_mouse (struct uae_input_device *uid, int num, int port)
return 0; return 0;
} }
static int get_kb_flags (int num)
{
return 0;
}
struct inputdevice_functions inputdevicefunc_keyboard = struct inputdevice_functions inputdevicefunc_keyboard =
{ {
init_kb, init_kb,
...@@ -1742,7 +1757,8 @@ struct inputdevice_functions inputdevicefunc_keyboard = ...@@ -1742,7 +1757,8 @@ struct inputdevice_functions inputdevicefunc_keyboard =
get_kb_uniquename, get_kb_uniquename,
get_kb_widget_num, get_kb_widget_num,
get_kb_widget_type, get_kb_widget_type,
get_kb_widget_first get_kb_widget_first,
get_kb_flags
}; };
int getcapslockstate (void) int getcapslockstate (void)
......
...@@ -379,9 +379,9 @@ static int map_jsem_to_widget (int jsem) ...@@ -379,9 +379,9 @@ static int map_jsem_to_widget (int jsem)
{ {
int widget = 0; int widget = 0;
if (jsem >= JSEM_END) if (jsem == JSEM_END)
widget = 0; widget = 0;
else if (jsem >= JSEM_MICE) else if (jsem == JSEM_MICE)
widget = 3; widget = 3;
else if (jsem == JSEM_JOYS || jsem == JSEM_JOYS + 1 ) else if (jsem == JSEM_JOYS || jsem == JSEM_JOYS + 1 )
widget = jsem - JSEM_JOYS + 1; widget = jsem - JSEM_JOYS + 1;
...@@ -397,7 +397,7 @@ static int map_widget_to_jsem (int widget) ...@@ -397,7 +397,7 @@ static int map_widget_to_jsem (int widget)
switch (widget) { switch (widget) {
default: default:
// case 0: jsem = JSEM_NONE; break; case 0: jsem = JSEM_END; break;
case 1: jsem = JSEM_JOYS; break; case 1: jsem = JSEM_JOYS; break;
case 2: jsem = JSEM_JOYS + 1; break; case 2: jsem = JSEM_JOYS + 1; break;
case 3: jsem = JSEM_MICE; break; case 3: jsem = JSEM_MICE; break;
...@@ -413,19 +413,19 @@ static int map_widget_to_jsem (int widget) ...@@ -413,19 +413,19 @@ static int map_widget_to_jsem (int widget)
static void set_joy_state (void) static void set_joy_state (void)
{ {
int j0t = map_jsem_to_widget (changed_prefs.jports[0].id); int j0t = map_jsem_to_widget (changed_prefs.jports[0].id);
int j1t = map_jsem_to_widget (changed_prefs.jports[1].id); int j1t = map_jsem_to_widget (changed_prefs.jports[1].id);
int joy_count = inputdevice_get_device_total (IDTYPE_JOYSTICK); int joy_count = inputdevice_get_device_total (IDTYPE_JOYSTICK);
int i; int i;
if (j0t != 0 && j0t == j1t) { if (j0t != 0 && j0t == j1t) {
/* Can't happen */ /* Can't happen */
j0t++; j0t++;
j0t %= 7; j0t %= 7;
} }
for (i = 0; i < JOY_WIDGET_COUNT; i++) { for (i = 0; i < JOY_WIDGET_COUNT; i++) {
if (i == 1 && joy_count == 0) continue; if (i == 1 && joy_count == 0) continue;
if (i == 2 && joy_count <= 1) continue; if (i == 2 && joy_count <= 1) continue;
...@@ -433,36 +433,36 @@ static void set_joy_state (void) ...@@ -433,36 +433,36 @@ static void set_joy_state (void)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (joy_widget[1][i]), j1t == i); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (joy_widget[1][i]), j1t == i);
gtk_widget_set_sensitive (joy_widget[0][i], i == 0 || j1t != i); gtk_widget_set_sensitive (joy_widget[0][i], i == 0 || j1t != i);
gtk_widget_set_sensitive (joy_widget[1][i], i == 0 || j0t != i); gtk_widget_set_sensitive (joy_widget[1][i], i == 0 || j0t != i);
} }
} }
#ifdef FILESYS #ifdef FILESYS
static void set_hd_state (void) static void set_hd_state (void)
{ {
char texts[HDLIST_MAX_COLS][256]; char texts[HDLIST_MAX_COLS][256];
char *tptrs[HDLIST_MAX_COLS]; char *tptrs[HDLIST_MAX_COLS];
int nr = nr_units (); int nr = nr_units ();
int i; int i;
// UnitInfo *ui; // UnitInfo *ui;
DEBUG_LOG ("set_hd_state\n"); DEBUG_LOG ("set_hd_state\n");
for (i=0; i<HDLIST_MAX_COLS; i++) for (i=0; i<HDLIST_MAX_COLS; i++)
tptrs[i] = texts[i]; tptrs[i] = texts[i];
gtk_clist_freeze (GTK_CLIST (hdlist_widget)); gtk_clist_freeze (GTK_CLIST (hdlist_widget));
gtk_clist_clear (GTK_CLIST (hdlist_widget)); gtk_clist_clear (GTK_CLIST (hdlist_widget));
for (i = 0; i < nr; i++) { for (i = 0; i < nr; i++) {
int secspertrack, surfaces, reserved, blocksize, bootpri; int secspertrack, surfaces, reserved, blocksize, bootpri;
uae_u64 size; uae_u64 size;
int cylinders, readonly, flags; int cylinders, readonly, flags;
char *devname, *volname, *rootdir, *filesysdir; char *devname, *volname, *rootdir, *filesysdir;
int *ret; int *ret;
/* We always use currprefs.mountinfo for the GUI. The filesystem /* We always use currprefs.mountinfo for the GUI. The filesystem
code makes a private copy which is updated every reset. */ code makes a private copy which is updated every reset. */
struct mountedinfo mi; struct mountedinfo mi;
ret = get_filesys_unitconfig (&currprefs, i, &mi); ret = get_filesys_unitconfig (&currprefs, i, &mi);
/* failure = get_filesys_unit (i, /* failure = get_filesys_unit (i,
&devname, &volname, &rootdir, &readonly, &devname, &volname, &rootdir, &readonly,
&secspertrack, &surfaces, &reserved, &secspertrack, &surfaces, &reserved,
...@@ -509,7 +509,7 @@ static void set_floppy_state( void ) ...@@ -509,7 +509,7 @@ static void set_floppy_state( void )
{ {
unsigned int i; unsigned int i;
switch (currprefs.floppy_speed) { switch (currprefs.floppy_speed) {
case 0: i = 0; case 0: i = 0;
case 100: i = 1; case 100: i = 1;
case 200: i = 2; case 200: i = 2;
case 400: i = 3; case 400: i = 3;
...@@ -673,15 +673,15 @@ static int find_current_toggle (GtkWidget **widgets, int count) ...@@ -673,15 +673,15 @@ static int find_current_toggle (GtkWidget **widgets, int count)
static void joy_changed (void) static void joy_changed (void)
{ {
if (! gui_active) if (! gui_active)
return; return;
changed_prefs.jports[0].id = map_widget_to_jsem (find_current_toggle (joy_widget[0], JOY_WIDGET_COUNT)); changed_prefs.jports[0].id = map_widget_to_jsem (find_current_toggle (joy_widget[0], JOY_WIDGET_COUNT));
changed_prefs.jports[1].id = map_widget_to_jsem (find_current_toggle (joy_widget[1], JOY_WIDGET_COUNT)); changed_prefs.jports[1].id = map_widget_to_jsem (find_current_toggle (joy_widget[1], JOY_WIDGET_COUNT));
if( changed_prefs.jports[0].id != currprefs.jports[0].id || changed_prefs.jports[1].id != currprefs.jports[1].id ) if (changed_prefs.jports[0].id != currprefs.jports[0].id || changed_prefs.jports[1].id != currprefs.jports[1].id)
inputdevice_config_change(); inputdevice_config_change();
set_joy_state (); set_joy_state ();
} }
static void chipsize_changed (void) static void chipsize_changed (void)
......
...@@ -23,6 +23,7 @@ extern void DISK_check_change (void); ...@@ -23,6 +23,7 @@ extern void DISK_check_change (void);
extern struct zfile *DISK_validate_filename (const char *, int, int *, uae_u32 *); extern struct zfile *DISK_validate_filename (const char *, int, int *, uae_u32 *);
extern void DISK_handler (void); extern void DISK_handler (void);
extern void DISK_update (unsigned int hpos); extern void DISK_update (unsigned int hpos);
extern void DISK_update_adkcon (unsigned int hpos, uae_u16 v);
extern void DISK_hsync (unsigned int hpos); extern void DISK_hsync (unsigned int hpos);
extern void DISK_reset (void); extern void DISK_reset (void);
extern int disk_getwriteprotect (const char *name); extern int disk_getwriteprotect (const char *name);
......
...@@ -99,4 +99,10 @@ STATIC_INLINE int current_hpos (void) ...@@ -99,4 +99,10 @@ STATIC_INLINE int current_hpos (void)
return (get_cycles () - eventtab[ev_hsync].oldcycles) / CYCLE_UNIT; return (get_cycles () - eventtab[ev_hsync].oldcycles) / CYCLE_UNIT;
} }
STATIC_INLINE bool cycles_in_range (unsigned long endcycles)
{
signed long c = get_cycles ();
return (signed long)endcycles - c > 0;
}
#endif #endif
...@@ -23,23 +23,19 @@ STATIC_INLINE void events_schedule (void) ...@@ -23,23 +23,19 @@ STATIC_INLINE void events_schedule (void)
nextevent = currcycle + mintime; nextevent = currcycle + mintime;
} }
#ifdef JIT
extern uae_u8* compiled_code;
#endif
extern signed long pissoff; extern signed long pissoff;
STATIC_INLINE void cycles_do_special (void) STATIC_INLINE void cycles_do_special (void)
{ {
#ifdef JIT #ifdef JIT
if (compiled_code) { if (currprefs.cachesize) {
if (pissoff >= 0) if (pissoff >= 0)
pissoff = -1; pissoff = -1;
} else { } else
#endif
{
pissoff = 0; pissoff = 0;
} }
#else
pissoff = 0;
#endif
} }
STATIC_INLINE void do_extra_cycles (unsigned long cycles_to_add) STATIC_INLINE void do_extra_cycles (unsigned long cycles_to_add)
......
This diff is collapsed.
...@@ -152,14 +152,14 @@ enum aks { AKS_ENTERGUI = 0x200, AKS_SCREENSHOT_FILE, AKS_SCREENSHOT_CLIPBOARD, ...@@ -152,14 +152,14 @@ enum aks { AKS_ENTERGUI = 0x200, AKS_SCREENSHOT_FILE, AKS_SCREENSHOT_CLIPBOARD,
AKS_STATESAVEDIALOG, AKS_STATERESTOREDIALOG, AKS_STATESAVEDIALOG, AKS_STATERESTOREDIALOG,
AKS_DECREASEREFRESHRATE, AKS_DECREASEREFRESHRATE,
AKS_INCREASEREFRESHRATE, AKS_INCREASEREFRESHRATE,
AKS_GLPANLEFT,AKS_GLPANRIGHT,AKS_GLPANUP,AKS_GLPANDOWN,AKS_GLPANSCANMORE,AKS_GLPANSCANLESS, /*koko*/
AKS_ARCADIADIAGNOSTICS, AKS_ARCADIAPLY1, AKS_ARCADIAPLY2, AKS_ARCADIACOIN1, AKS_ARCADIACOIN2, AKS_ARCADIADIAGNOSTICS, AKS_ARCADIAPLY1, AKS_ARCADIAPLY2, AKS_ARCADIACOIN1, AKS_ARCADIACOIN2,
AKS_TOGGLEMOUSEGRAB, AKS_SWITCHINTERPOL, AKS_TOGGLEMOUSEGRAB, AKS_SWITCHINTERPOL,
AKS_INPUT_CONFIG_1,AKS_INPUT_CONFIG_2,AKS_INPUT_CONFIG_3,AKS_INPUT_CONFIG_4, AKS_INPUT_CONFIG_1,AKS_INPUT_CONFIG_2,AKS_INPUT_CONFIG_3,AKS_INPUT_CONFIG_4,
AKS_DISKSWAPPER_NEXT,AKS_DISKSWAPPER_PREV, AKS_DISKSWAPPER_NEXT,AKS_DISKSWAPPER_PREV,
AKS_DISKSWAPPER_INSERT0,AKS_DISKSWAPPER_INSERT1,AKS_DISKSWAPPER_INSERT2,AKS_DISKSWAPPER_INSERT3, AKS_DISKSWAPPER_INSERT0,AKS_DISKSWAPPER_INSERT1,AKS_DISKSWAPPER_INSERT2,AKS_DISKSWAPPER_INSERT3,
AKS_DISK_PREV0, AKS_DISK_PREV1, AKS_DISK_PREV2, AKS_DISK_PREV3, AKS_DISK_PREV0, AKS_DISK_PREV1, AKS_DISK_PREV2, AKS_DISK_PREV3,
AKS_DISK_NEXT0, AKS_DISK_NEXT1, AKS_DISK_NEXT2, AKS_DISK_NEXT3 AKS_DISK_NEXT0, AKS_DISK_NEXT1, AKS_DISK_NEXT2, AKS_DISK_NEXT3,
AKS_GLPANLEFT,AKS_GLPANRIGHT,AKS_GLPANUP,AKS_GLPANDOWN,AKS_GLPANSCANMORE,AKS_GLPANSCANLESS /*koko*/
}; };
extern int target_checkcapslock (int, int *); extern int target_checkcapslock (int, int *);
...@@ -329,6 +329,9 @@ extern uae_u32 REGPARAM3 get_disp_ea_000 (uae_u32 base, uae_u32 dp); ...@@ -329,6 +329,9 @@ extern uae_u32 REGPARAM3 get_disp_ea_000 (uae_u32 base, uae_u32 dp);
extern uae_u32 REGPARAM3 get_bitfield (uae_u32 src, uae_u32 bdata[2], uae_s32 offset, int width) REGPARAM; extern uae_u32 REGPARAM3 get_bitfield (uae_u32 src, uae_u32 bdata[2], uae_s32 offset, int width) REGPARAM;
extern void REGPARAM3 put_bitfield (uae_u32 dst, uae_u32 bdata[2], uae_u32 val, uae_s32 offset, int width) REGPARAM; extern void REGPARAM3 put_bitfield (uae_u32 dst, uae_u32 bdata[2], uae_u32 val, uae_s32 offset, int width) REGPARAM;
extern void m68k_disasm_ea (void *f, uaecptr addr, uaecptr *nextpc, int cnt, uae_u32 *seaddr, uae_u32 *deaddr);
extern void m68k_disasm (void *f, uaecptr addr, uaecptr *nextpc, int cnt);
extern void m68k_disasm_2 (TCHAR *buf, int bufsize, uaecptr addr, uaecptr *nextpc, int cnt, uae_u32 *seaddr, uae_u32 *deaddr, int safemode);
extern int get_cpu_model(void); extern int get_cpu_model(void);
/* Hack to stop conflict with AROS Exception function */ /* Hack to stop conflict with AROS Exception function */
......
...@@ -42,6 +42,7 @@ struct uae_input_device { ...@@ -42,6 +42,7 @@ struct uae_input_device {
TCHAR *custom[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT]; TCHAR *custom[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT];
uae_u16 flags[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT]; uae_u16 flags[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SUB_EVENT];
uae_s16 extra[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SIMULTANEOUS_KEYS]; uae_s16 extra[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SIMULTANEOUS_KEYS];
uae_s8 port[MAX_INPUT_DEVICE_EVENTS][MAX_INPUT_SIMULTANEOUS_KEYS];
uae_s8 enabled; uae_s8 enabled;
}; };
...@@ -240,6 +241,8 @@ struct uae_prefs { ...@@ -240,6 +241,8 @@ struct uae_prefs {
bool blitter_cycle_exact; bool blitter_cycle_exact;
int floppy_speed; int floppy_speed;
int floppy_write_length; int floppy_write_length;
int floppy_random_bits_min;
int floppy_random_bits_max;
bool tod_hack; bool tod_hack;
uae_u32 maprom; uae_u32 maprom;
int turbo_emulation; int turbo_emulation;
......
...@@ -401,6 +401,7 @@ extern void xfree (const void*); ...@@ -401,6 +401,7 @@ extern void xfree (const void*);
#define _stprintf sprintf #define _stprintf sprintf
#define _tcscat strcat #define _tcscat strcat
#define _tcsicmp strcasecmp #define _tcsicmp strcasecmp
#define _tcsnicmp strncasecmp
#define _tcsstr strstr #define _tcsstr strstr
#define _tcsrchr strrchr #define _tcsrchr strrchr
#define _tcsncpy strncpy #define _tcsncpy strncpy
......
This diff is collapsed.
...@@ -319,6 +319,11 @@ static void unacquire_joy (unsigned int joynum) ...@@ -319,6 +319,11 @@ static void unacquire_joy (unsigned int joynum)
} }
} }
static int get_joystick_flags (int num)
{
return 0;
}
struct inputdevice_functions inputdevicefunc_joystick = { struct inputdevice_functions inputdevicefunc_joystick = {
init_joysticks, init_joysticks,
close_joysticks, close_joysticks,
...@@ -330,7 +335,8 @@ struct inputdevice_functions inputdevicefunc_joystick = { ...@@ -330,7 +335,8 @@ struct inputdevice_functions inputdevicefunc_joystick = {
get_joystick_uniquename, get_joystick_uniquename,
get_joystick_widget_num, get_joystick_widget_num,
get_joystick_widget_type, get_joystick_widget_type,
get_joystick_widget_first get_joystick_widget_first,
get_joystick_flags
}; };
/* /*
......
...@@ -149,6 +149,11 @@ static int get_joystick_widget_first (unsigned int joy, int type) ...@@ -149,6 +149,11 @@ static int get_joystick_widget_first (unsigned int joy, int type)
return -1; return -1;
} }
static int get_joystick_flags (int num)
{
return 0;
}
struct inputdevice_functions inputdevicefunc_joystick = { struct inputdevice_functions inputdevicefunc_joystick = {
init_joysticks, init_joysticks,
close_joysticks, close_joysticks,
...@@ -160,7 +165,8 @@ struct inputdevice_functions inputdevicefunc_joystick = { ...@@ -160,7 +165,8 @@ struct inputdevice_functions inputdevicefunc_joystick = {
get_joystick_uniquename, get_joystick_uniquename,
get_joystick_widget_num, get_joystick_widget_num,
get_joystick_widget_type, get_joystick_widget_type,
get_joystick_widget_first get_joystick_widget_first,
get_joystick_flags
}; };
/* /*
......
...@@ -277,6 +277,10 @@ static int get_joystick_widget_first (unsigned int nr, int type) ...@@ -277,6 +277,10 @@ static int get_joystick_widget_first (unsigned int nr, int type)
return -1; return -1;
} }
static int get_joystick_flags (int num)
{
return 0;
}
struct inputdevice_functions inputdevicefunc_joystick = { struct inputdevice_functions inputdevicefunc_joystick = {
init_joysticks, init_joysticks,
...@@ -289,7 +293,8 @@ struct inputdevice_functions inputdevicefunc_joystick = { ...@@ -289,7 +293,8 @@ struct inputdevice_functions inputdevicefunc_joystick = {
get_joystick_uniquename, get_joystick_uniquename,
get_joystick_widget_num, get_joystick_widget_num,
get_joystick_widget_type, get_joystick_widget_type,
get_joystick_widget_first get_joystick_widget_first,
get_joystick_flags
}; };
/* /*
......
...@@ -234,6 +234,11 @@ static int get_joystick_widget_first (unsigned int joy, int type) ...@@ -234,6 +234,11 @@ static int get_joystick_widget_first (unsigned int joy, int type)
return -1; return -1;
} }
static int get_joystick_flags (int num)
{
return 0;
}
struct inputdevice_functions inputdevicefunc_joystick = { struct inputdevice_functions inputdevicefunc_joystick = {
init_joysticks, init_joysticks,
close_joysticks, close_joysticks,
...@@ -245,7 +250,8 @@ struct inputdevice_functions inputdevicefunc_joystick = { ...@@ -245,7 +250,8 @@ struct inputdevice_functions inputdevicefunc_joystick = {
get_joystick_uniquename, get_joystick_uniquename,
get_joystick_widget_num, get_joystick_widget_num,
get_joystick_widget_type, get_joystick_widget_type,
get_joystick_widget_first get_joystick_widget_first,
get_joystick_flags
}; };
/* /*
......
...@@ -67,6 +67,11 @@ static int get_joystick_widget_first (unsigned int joy, int type) ...@@ -67,6 +67,11 @@ static int get_joystick_widget_first (unsigned int joy, int type)
return -1; return -1;
} }
static int get_joystick_flags (int num)
{
return 0;
}
struct inputdevice_functions inputdevicefunc_joystick = { struct inputdevice_functions inputdevicefunc_joystick = {
init_joysticks, init_joysticks,
close_joysticks, close_joysticks,
...@@ -78,7 +83,8 @@ struct inputdevice_functions inputdevicefunc_joystick = { ...@@ -78,7 +83,8 @@ struct inputdevice_functions inputdevicefunc_joystick = {
get_joystick_uniquename, get_joystick_uniquename,
get_joystick_widget_num, get_joystick_widget_num,
get_joystick_widget_type, get_joystick_widget_type,
get_joystick_widget_first get_joystick_widget_first,
get_joystick_flags
}; };
/* /*
......
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
#include "inputdevice.h" #include "inputdevice.h"
#include <SDL.h> #include <SDL.h>
#define MAX_MAPPINGS 256
static unsigned int nr_joysticks; static unsigned int nr_joysticks;
static int initialized; static int initialized;
...@@ -95,7 +97,7 @@ static const char *get_joystick_uniquename (unsigned int joy) ...@@ -95,7 +97,7 @@ static const char *get_joystick_uniquename (unsigned int joy)
return SDL_JoystickName (joy); return SDL_JoystickName (joy);
} }
static void read_joysticks (void) static void read_joystick (void)
{ {
if (get_joystick_num ()) { if (get_joystick_num ()) {
unsigned int i; unsigned int i;
...@@ -105,7 +107,7 @@ static void read_joysticks (void) ...@@ -105,7 +107,7 @@ static void read_joysticks (void)
} }
} }
static int init_joysticks (void) static int init_joystick (void)
{ {
int success = 0; int success = 0;
...@@ -129,76 +131,115 @@ static int init_joysticks (void) ...@@ -129,76 +131,115 @@ static int init_joysticks (void)
write_log ("Failed to initialize joysticks\n"); write_log ("Failed to initialize joysticks\n");
} }
return success; return success;
} }
static void close_joysticks (void) static void close_joystick (void)
{ {
unsigned int i; unsigned int i;
for (i = 0; i < nr_joysticks; i++) { for (i = 0; i < nr_joysticks; i++) {
SDL_JoystickClose (joys[i].joy); SDL_JoystickClose (joys[i].joy);
joys[i].joy = 0; joys[i].joy = 0;
} }
nr_joysticks = 0; nr_joysticks = 0;
if (initialized) { if (initialized) {
SDL_QuitSubSystem (SDL_INIT_JOYSTICK); SDL_QuitSubSystem (SDL_INIT_JOYSTICK);
initialized = 0; initialized = 0;
} }
} }
static int acquire_joy (unsigned int num, int flags) static int acquire_joystick (unsigned int num, int flags)
{ {
return num < get_joystick_num (); return num < get_joystick_num ();
} }
static void unacquire_joy (unsigned int num) static void unacquire_joystick (unsigned int num)
{ {
} }
static int get_joystick_flags (int num)
{
return 0;
}
struct inputdevice_functions inputdevicefunc_joystick = { struct inputdevice_functions inputdevicefunc_joystick = {
init_joysticks, init_joystick,
close_joysticks, close_joystick,
acquire_joy, acquire_joystick,
unacquire_joy, unacquire_joystick,
read_joysticks, read_joystick,
get_joystick_num, get_joystick_num,
get_joystick_friendlyname, get_joystick_friendlyname,
get_joystick_uniquename, get_joystick_uniquename,
get_joystick_widget_num, get_joystick_widget_num,
get_joystick_widget_type, get_joystick_widget_type,
get_joystick_widget_first get_joystick_widget_first,
get_joystick_flags
}; };
/* /*
* Set default inputdevice config for SDL joysticks * Set default inputdevice config for SDL joysticks
*/ */
int input_get_default_joystick (struct uae_input_device *uid, int num, int port, int cd32) int input_get_default_joystick (struct uae_input_device *uid, int i, int port, int af, int mode)
{ {
unsigned int i, j;
int h,v; int h,v;
SDL_Joystick *joy;
joy = joys[i].joy;
if (i >= get_joystick_num ()) if (i >= get_joystick_num ())
return 0; return 0;
if (port >= 2) { if (mode == JSEM_MODE_MOUSE_CDTV) {
h = INPUTEVENT_MOUSE_CDTV_HORIZ;
v = INPUTEVENT_MOUSE_CDTV_VERT;
} else if (port >= 2) {
h = port == 3 ? INPUTEVENT_PAR_JOY2_HORIZ : INPUTEVENT_PAR_JOY1_HORIZ; h = port == 3 ? INPUTEVENT_PAR_JOY2_HORIZ : INPUTEVENT_PAR_JOY1_HORIZ;
v = port == 3 ? INPUTEVENT_PAR_JOY2_VERT : INPUTEVENT_PAR_JOY1_VERT; v = port == 3 ? INPUTEVENT_PAR_JOY2_VERT : INPUTEVENT_PAR_JOY1_VERT;
} else { } else {
h = port ? INPUTEVENT_JOY2_HORIZ : INPUTEVENT_JOY1_HORIZ;; h = port ? INPUTEVENT_JOY2_HORIZ : INPUTEVENT_JOY1_HORIZ;;
v = port ? INPUTEVENT_JOY2_VERT : INPUTEVENT_JOY1_VERT; v = port ? INPUTEVENT_JOY2_VERT : INPUTEVENT_JOY1_VERT;
} }
uid[i].eventid[ID_AXIS_OFFSET + 0][0] = h; setid (uid, i, ID_AXIS_OFFSET + 0, 0, port, h);
uid[i].eventid[ID_AXIS_OFFSET + 1][0] = v; setid (uid, i, ID_AXIS_OFFSET + 1, 0, port, v);
if (port >= 2) { if (port >= 2) {
uid[i].eventid[ID_BUTTON_OFFSET + 0][0] = port == 3 ? INPUTEVENT_PAR_JOY2_FIRE_BUTTON : INPUTEVENT_PAR_JOY1_FIRE_BUTTON; setid_af (uid, i, ID_BUTTON_OFFSET + 0, 0, port, port == 3 ? INPUTEVENT_PAR_JOY2_FIRE_BUTTON : INPUTEVENT_PAR_JOY1_FIRE_BUTTON, af);
} else { } else {
uid[i].eventid[ID_BUTTON_OFFSET + 0][0] = port ? INPUTEVENT_JOY2_FIRE_BUTTON : INPUTEVENT_JOY1_FIRE_BUTTON; setid_af (uid, i, ID_BUTTON_OFFSET + 0, 0, port, port ? INPUTEVENT_JOY2_FIRE_BUTTON : INPUTEVENT_JOY1_FIRE_BUTTON, af);
uid[i].eventid[ID_BUTTON_OFFSET + 1][0] = port ? INPUTEVENT_JOY2_2ND_BUTTON : INPUTEVENT_JOY1_2ND_BUTTON; if (SDL_JoystickNumButtons(joy) > 0)
uid[i].eventid[ID_BUTTON_OFFSET + 2][0] = port ? INPUTEVENT_JOY2_3RD_BUTTON : INPUTEVENT_JOY1_3RD_BUTTON; setid (uid, i, ID_BUTTON_OFFSET + 1, 0, port, port ? INPUTEVENT_JOY2_2ND_BUTTON : INPUTEVENT_JOY1_2ND_BUTTON);
if (SDL_JoystickNumButtons(joy) > 1)
setid (uid, i, ID_BUTTON_OFFSET + 2, 0, port, port ? INPUTEVENT_JOY2_3RD_BUTTON : INPUTEVENT_JOY1_3RD_BUTTON);
} }
/* for (j = 2; j < MAX_MAPPINGS - 1; j++) {
int am = did->axismappings[j];
if (am == DIJOFS_POV(0) || am == DIJOFS_POV(1) || am == DIJOFS_POV(2) || am == DIJOFS_POV(3)) {
setid (uid, i, ID_AXIS_OFFSET + j + 0, 0, port, h);
setid (uid, i, ID_AXIS_OFFSET + j + 1, 0, port, v);
j++;
}
}*/
if (mode == JSEM_MODE_JOYSTICK_CD32) {
setid_af (uid, i, ID_BUTTON_OFFSET + 0, 0, port, port ? INPUTEVENT_JOY2_CD32_RED : INPUTEVENT_JOY1_CD32_RED, af);
setid_af (uid, i, ID_BUTTON_OFFSET + 0, 1, port, port ? INPUTEVENT_JOY2_FIRE_BUTTON : INPUTEVENT_JOY1_FIRE_BUTTON, af);
if (SDL_JoystickNumButtons(joy) > 0) {
setid (uid, i, ID_BUTTON_OFFSET + 1, 0, port, port ? INPUTEVENT_JOY2_CD32_BLUE : INPUTEVENT_JOY1_CD32_BLUE);
setid (uid, i, ID_BUTTON_OFFSET + 1, 1, port, port ? INPUTEVENT_JOY2_2ND_BUTTON : INPUTEVENT_JOY1_2ND_BUTTON);
}
if (SDL_JoystickNumButtons(joy) > 1)
setid (uid, i, ID_BUTTON_OFFSET + 2, 0, port, port ? INPUTEVENT_JOY2_CD32_GREEN : INPUTEVENT_JOY1_CD32_GREEN);
if (SDL_JoystickNumButtons(joy) > 2)
setid (uid, i, ID_BUTTON_OFFSET + 3, 0, port, port ? INPUTEVENT_JOY2_CD32_YELLOW : INPUTEVENT_JOY1_CD32_YELLOW);
if (SDL_JoystickNumButtons(joy) > 3)
setid (uid, i, ID_BUTTON_OFFSET + 4, 0, port, port ? INPUTEVENT_JOY2_CD32_RWD : INPUTEVENT_JOY1_CD32_RWD);
if (SDL_JoystickNumButtons(joy) > 4)
setid (uid, i, ID_BUTTON_OFFSET + 5, 0, port, port ? INPUTEVENT_JOY2_CD32_FFW : INPUTEVENT_JOY1_CD32_FFW);
if (SDL_JoystickNumButtons(joy) > 5)
setid (uid, i, ID_BUTTON_OFFSET + 6, 0, port, port ? INPUTEVENT_JOY2_CD32_PLAY : INPUTEVENT_JOY1_CD32_PLAY);
}
if (i == 0) if (i == 0)
return 1; return 1;
return 0; return 0;
......
...@@ -96,7 +96,7 @@ static void show_version_full (void) ...@@ -96,7 +96,7 @@ static void show_version_full (void)
write_log ("Copyright 1995-2002 Bernd Schmidt\n"); write_log ("Copyright 1995-2002 Bernd Schmidt\n");
write_log (" 1999-2010 Toni Wilen\n"); write_log (" 1999-2010 Toni Wilen\n");
write_log (" 2003-2007 Richard Drummond\n"); write_log (" 2003-2007 Richard Drummond\n");
write_log (" 2006-2010 Mustafa Tufan\n\n"); write_log (" 2006-2010 Mustafa 'GnoStiC' Tufan\n\n");
write_log ("See the source for a full list of contributors.\n"); write_log ("See the source for a full list of contributors.\n");
write_log ("This is free software; see the file COPYING for copying conditions. There is NO\n"); write_log ("This is free software; see the file COPYING for copying conditions. There is NO\n");
write_log ("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"); write_log ("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n");
...@@ -247,6 +247,16 @@ void fixup_prefs (struct uae_prefs *p) ...@@ -247,6 +247,16 @@ void fixup_prefs (struct uae_prefs *p)
p->z3fastmem_start &= ~0xffff; p->z3fastmem_start &= ~0xffff;
if (p->z3fastmem_start < 0x1000000) if (p->z3fastmem_start < 0x1000000)
p->z3fastmem_start = 0x1000000; p->z3fastmem_start = 0x1000000;
if ((p->z3chipmem_size & (p->z3chipmem_size - 1)) != 0
|| (p->z3chipmem_size != 0 && (p->z3chipmem_size < 0x100000 || p->z3chipmem_size > max_z3fastmem)))
{
write_log ("Unsupported Zorro III fake chipmem size %x (%x)!\n", p->z3chipmem_size, max_z3fastmem);
if (p->z3chipmem_size > max_z3fastmem)
p->z3chipmem_size = max_z3fastmem;
else
p->z3chipmem_size = 0;
err = 1;
}
if (p->address_space_24 && (p->gfxmem_size != 0 || p->z3fastmem_size != 0)) { if (p->address_space_24 && (p->gfxmem_size != 0 || p->z3fastmem_size != 0)) {
p->z3fastmem_size = p->gfxmem_size = 0; p->z3fastmem_size = p->gfxmem_size = 0;
...@@ -390,7 +400,7 @@ void fixup_prefs (struct uae_prefs *p) ...@@ -390,7 +400,7 @@ void fixup_prefs (struct uae_prefs *p)
} }
fixup_prefs_dimensions (p); fixup_prefs_dimensions (p);
#ifdef JIT #if !defined (JIT)
p->cachesize = 0; p->cachesize = 0;
#endif #endif
#ifdef CPU_68000_ONLY #ifdef CPU_68000_ONLY
...@@ -444,7 +454,7 @@ void fixup_prefs (struct uae_prefs *p) ...@@ -444,7 +454,7 @@ void fixup_prefs (struct uae_prefs *p)
p->maprom = 0x0f000000; p->maprom = 0x0f000000;
if (p->tod_hack && p->cs_ciaatod == 0) if (p->tod_hack && p->cs_ciaatod == 0)
p->cs_ciaatod = p->ntscmode ? 2 : 1; p->cs_ciaatod = p->ntscmode ? 2 : 1;
//target_fixup_options (p); target_fixup_options (p);
} }
int quit_program = 0; int quit_program = 0;
...@@ -454,6 +464,8 @@ static int default_config; ...@@ -454,6 +464,8 @@ static int default_config;
void uae_reset (int hardreset) void uae_reset (int hardreset)
{ {
currprefs.quitstatefile[0] = changed_prefs.quitstatefile[0] = 0;
if (quit_program == 0) { if (quit_program == 0) {
quit_program = -2; quit_program = -2;
if (hardreset) if (hardreset)
...@@ -467,7 +479,7 @@ void uae_quit (void) ...@@ -467,7 +479,7 @@ void uae_quit (void)
deactivate_debugger (); deactivate_debugger ();
if (quit_program != -1) if (quit_program != -1)
quit_program = -1; quit_program = -1;
//target_quit (); target_quit ();
} }
/* 0 = normal, 1 = nogui, -1 = disable nogui */ /* 0 = normal, 1 = nogui, -1 = disable nogui */
...@@ -572,8 +584,10 @@ static void parse_cmdline (int argc, char **argv) ...@@ -572,8 +584,10 @@ static void parse_cmdline (int argc, char **argv)
if (i + 1 == argc) { if (i + 1 == argc) {
write_log ("Missing argument for '-f' option.\n"); write_log ("Missing argument for '-f' option.\n");
} else { } else {
char *txt = parsetext (argv[++i]);
currprefs.mountitems = 0; currprefs.mountitems = 0;
target_cfgfile_load (&currprefs, argv[++i], -1, 0); target_cfgfile_load (&currprefs, txt, -1, 0);
xfree (txt);
} }
} else if (_tcscmp (argv[i], "-s") == 0) { } else if (_tcscmp (argv[i], "-s") == 0) {
if (i + 1 == argc) if (i + 1 == argc)
...@@ -638,7 +652,7 @@ static void parse_cmdline_and_init_file (int argc, char **argv) ...@@ -638,7 +652,7 @@ static void parse_cmdline_and_init_file (int argc, char **argv)
fixup_prefs (&currprefs); fixup_prefs (&currprefs);
parse_cmdline (argc, argv); parse_cmdline (argc, argv);
fixup_prefs (&currprefs); fixup_prefs (&currprefs); //fixup after cmdline
} }
void reset_all_systems (void) void reset_all_systems (void)
...@@ -681,7 +695,9 @@ void reset_all_systems (void) ...@@ -681,7 +695,9 @@ void reset_all_systems (void)
#endif #endif
native2amiga_reset (); native2amiga_reset ();
dongle_reset (); dongle_reset ();
//sampler_init (); #ifdef SAMPLER
sampler_init ();
#endif
} }
/* Okay, this stuff looks strange, but it is here to encourage people who /* Okay, this stuff looks strange, but it is here to encourage people who
...@@ -713,7 +729,9 @@ void do_start_program (void) ...@@ -713,7 +729,9 @@ void do_start_program (void)
void do_leave_program (void) void do_leave_program (void)
{ {
//sampler_free (); #ifdef SAMPLER
sampler_free ();
#endif
graphics_leave (); graphics_leave ();
inputdevice_close (); inputdevice_close ();
DISK_free (); DISK_free ();
...@@ -787,148 +805,146 @@ static int real_main2 (int argc, char **argv) ...@@ -787,148 +805,146 @@ static int real_main2 (int argc, char **argv)
if (result) if (result)
atexit (SDL_Quit); atexit (SDL_Quit);
#endif #endif
config_changed = 1; config_changed = 1;
if (restart_config[0]) { if (restart_config[0]) {
default_prefs (&currprefs, 0); default_prefs (&currprefs, 0);
fixup_prefs (&currprefs); fixup_prefs (&currprefs);
} }
if (!graphics_setup ()) { if (!graphics_setup ()) {
write_log ("Graphics Setup Failed\n"); write_log ("Graphics Setup Failed\n");
exit (1); exit (1);
} }
#ifdef NATMEM_OFFSET #ifdef NATMEM_OFFSET
preinit_shm (); preinit_shm ();
#endif #endif
if (restart_config[0]) if (restart_config[0])
parse_cmdline_and_init_file (argc, argv); parse_cmdline_and_init_file (argc, argv);
else else
currprefs = changed_prefs; currprefs = changed_prefs;
uae_inithrtimer (); uae_inithrtimer ();
if (!machdep_init ()) {
write_log ("Machine Init Failed.\n");
restart_program = 0;
return -1;
}
if (console_emulation) { if (!machdep_init ()) {
consolehook_config (&currprefs); write_log ("Machine Init Failed.\n");
fixup_prefs (&currprefs); restart_program = 0;
} return -1;
}
if (! audio_setup ()) { if (console_emulation) {
write_log ("Sound driver unavailable: Sound output disabled\n"); consolehook_config (&currprefs);
currprefs.produce_sound = 0; fixup_prefs (&currprefs);
} }
inputdevice_init ();
inputdevice_setkeytranslation (keytrans, kbmaps);
changed_prefs = currprefs; if (! audio_setup ()) {
no_gui = ! currprefs.start_gui; write_log ("Sound driver unavailable: Sound output disabled\n");
if (restart_program == 2) currprefs.produce_sound = 0;
no_gui = 1; }
else if (restart_program == 3) inputdevice_init ();
no_gui = 0;
restart_program = 0; changed_prefs = currprefs;
if (! no_gui) { no_gui = ! currprefs.start_gui;
int err = gui_init (); if (restart_program == 2)
currprefs = changed_prefs; no_gui = 1;
config_changed = 1; else if (restart_program == 3)
if (err == -1) { no_gui = 0;
write_log ("Failed to initialize the GUI\n"); restart_program = 0;
return -1; if (! no_gui) {
} else if (err == -2) { int err = gui_init ();
return 1; currprefs = changed_prefs;
} config_changed = 1;
if (err == -1) {
write_log ("Failed to initialize the GUI\n");
return -1;
} else if (err == -2) {
return 1;
} }
}
#ifdef NATMEM_OFFSET #ifdef NATMEM_OFFSET
init_shm (); init_shm ();
#endif #endif
#ifdef JIT #ifdef JIT
if (!(currprefs.cpu_model >= 68020 && currprefs.address_space_24 == 0 && currprefs.cachesize)) if (!(currprefs.cpu_model >= 68020 && currprefs.address_space_24 == 0 && currprefs.cachesize))
canbang = 0; canbang = 0;
#endif #endif
fixup_prefs (&currprefs); fixup_prefs (&currprefs);
changed_prefs = currprefs; changed_prefs = currprefs;
target_run (); target_run ();
/* force sound settings change */ /* force sound settings change */
currprefs.produce_sound = 0; currprefs.produce_sound = 0;
#ifdef AUTOCONFIG #ifdef AUTOCONFIG
/* Install resident module to get 8MB chipmem, if requested */ /* Install resident module to get 8MB chipmem, if requested */
rtarea_setup (); rtarea_setup ();
#endif #endif
#ifdef FILESYS #ifdef FILESYS
rtarea_init (); rtarea_init ();
uaeres_install (); uaeres_install ();
hardfile_install (); hardfile_install ();
#endif #endif
savestate_init (); savestate_init ();
#ifdef SCSIEMU #ifdef SCSIEMU
scsi_reset (); scsi_reset ();
scsidev_install (); scsidev_install ();
#endif #endif
#ifdef SANA2 #ifdef SANA2
netdev_install (); netdev_install ();
#endif #endif
#ifdef UAESERIAL #ifdef UAESERIAL
uaeserialdev_install (); uaeserialdev_install ();
#endif #endif
keybuf_init (); /* Must come after init_joystick */ keybuf_init (); /* Must come after init_joystick */
#ifdef AUTOCONFIG #ifdef AUTOCONFIG
expansion_init (); expansion_init ();
#endif #endif
#ifdef FILESYS #ifdef FILESYS
filesys_install (); filesys_install ();
#endif #endif
target_startup_sequence (&currprefs); target_startup_sequence (&currprefs);
memory_init (); memory_init ();
memory_reset (); memory_reset ();
#ifdef AUTOCONFIG #ifdef AUTOCONFIG
#if defined (BSDSOCKET) #if defined (BSDSOCKET)
bsdlib_install (); bsdlib_install ();
#endif #endif
emulib_install (); emulib_install ();
uaeexe_install (); uaeexe_install ();
native2amiga_install (); native2amiga_install ();
#endif #endif
custom_init (); /* Must come after memory_init */ custom_init (); /* Must come after memory_init */
#ifdef SERIAL_PORT #ifdef SERIAL_PORT
serial_init (); serial_init ();
#endif #endif
DISK_init (); DISK_init ();
reset_frame_rate_hack (); reset_frame_rate_hack ();
init_m68k(); /* must come after reset_frame_rate_hack (); */ init_m68k(); /* must come after reset_frame_rate_hack (); */
gui_update (); gui_update ();
if (graphics_init ()) { if (graphics_init ()) {
#ifdef DEBUGGER #ifdef DEBUGGER
setup_brkhandler (); setup_brkhandler ();
if (currprefs.start_debugger && debuggable ()) if (currprefs.start_debugger && debuggable ())
activate_debugger (); activate_debugger ();
#endif #endif
if (! init_audio ()) { if (! init_audio ()) {
if (sound_available && currprefs.produce_sound > 1) { if (sound_available && currprefs.produce_sound > 1) {
write_log ("Sound driver unavailable: Sound output disabled\n"); write_log ("Sound driver unavailable: Sound output disabled\n");
} }
currprefs.produce_sound = 0; currprefs.produce_sound = 0;
} }
start_program ();
start_program (); }
}
} }
#if (defined (_WIN32) || defined (_WIN64)) && !defined (NO_WIN32_EXCEPTION_HANDLER) #if (defined (_WIN32) || defined (_WIN64)) && !defined (NO_WIN32_EXCEPTION_HANDLER)
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "enforcer.h" #include "enforcer.h"
#include "picasso96.h" #include "picasso96.h"
#include "driveclick.h" #include "driveclick.h"
#include "inputdevice.h"
#include <stdarg.h> #include <stdarg.h>
#define TRUE 1 #define TRUE 1
...@@ -306,6 +307,7 @@ int driveclick_loadresource (struct drvsample *sp, int drivetype) ...@@ -306,6 +307,7 @@ int driveclick_loadresource (struct drvsample *sp, int drivetype)
} }
return ok; return ok;
*/ */
return 0;
} }
void driveclick_fdrawcmd_close(int drive) void driveclick_fdrawcmd_close(int drive)
...@@ -792,7 +794,7 @@ end: ...@@ -792,7 +794,7 @@ end:
} }
// -- dinput.c // -- dinput.c
int input_get_default_lightpen (struct uae_input_device *uid, int i, int port) int input_get_default_lightpen (struct uae_input_device *uid, int i, int port, int af)
{ {
/* struct didata *did; /* struct didata *did;
...@@ -807,7 +809,7 @@ int input_get_default_lightpen (struct uae_input_device *uid, int i, int port) ...@@ -807,7 +809,7 @@ int input_get_default_lightpen (struct uae_input_device *uid, int i, int port)
return 0; return 0;
} }
int input_get_default_joystick_analog (struct uae_input_device *uid, int i, int port) int input_get_default_joystick_analog (struct uae_input_device *uid, int i, int port, int af)
{ {
/* int j; /* int j;
struct didata *did; struct didata *did;
...@@ -852,3 +854,30 @@ TCHAR* buf_out (TCHAR *buffer, int *bufsize, const TCHAR *format, ...) ...@@ -852,3 +854,30 @@ TCHAR* buf_out (TCHAR *buffer, int *bufsize, const TCHAR *format, ...)
return buffer + _tcslen (buffer); return buffer + _tcslen (buffer);
} }
// dinput
void setid (struct uae_input_device *uid, int i, int slot, int sub, int port, int evt)
{
uid[i].eventid[slot][sub] = evt;
uid[i].port[slot][sub] = port + 1;
}
void setid_af (struct uae_input_device *uid, int i, int slot, int sub, int port, int evt, int af)
{
setid (uid, i, slot, sub, port, evt);
uid[i].flags[slot][sub] &= ~(ID_FLAG_AUTOFIRE | ID_FLAG_TOGGLE);
if (af >= JPORT_AF_NORMAL)
uid[i].flags[slot][sub] |= ID_FLAG_AUTOFIRE;
if (af == JPORT_AF_TOGGLE)
uid[i].flags[slot][sub] |= ID_FLAG_TOGGLE;
}
// win32.c
void target_quit (void)
{
//shellexecute (currprefs.win32_commandpathend);
}
void target_fixup_options (struct uae_prefs *p)
{
//
}
...@@ -288,7 +288,7 @@ static unsigned long REGPARAM3 op_illg_1 (uae_u32 opcode) REGPARAM; ...@@ -288,7 +288,7 @@ static unsigned long REGPARAM3 op_illg_1 (uae_u32 opcode) REGPARAM;
static unsigned long REGPARAM2 op_illg_1 (uae_u32 opcode) static unsigned long REGPARAM2 op_illg_1 (uae_u32 opcode)
{ {
op_illg (opcode); op_illg (opcode);
return 4; return 4;
} }
static void build_cpufunctbl (void) static void build_cpufunctbl (void)
...@@ -426,17 +426,8 @@ void fill_prefetch_slow (void) ...@@ -426,17 +426,8 @@ void fill_prefetch_slow (void)
if (currprefs.mmu_model) if (currprefs.mmu_model)
return; return;
#endif #endif
#ifdef CPUEMU_12 regs.ir = x_get_word (m68k_getpc ());
if (currprefs.cpu_cycle_exact) { regs.irc = x_get_word (m68k_getpc () + 2);
regs.ir = get_word_ce (m68k_getpc ());
regs.irc = get_word_ce (m68k_getpc () + 2);
} else {
#endif
regs.ir = get_word (m68k_getpc ());
regs.irc = get_word (m68k_getpc () + 2);
#ifdef CPUEMU_12
}
#endif
} }
unsigned long cycles_mask, cycles_val; unsigned long cycles_mask, cycles_val;
...@@ -465,7 +456,8 @@ static void update_68k_cycles (void) ...@@ -465,7 +456,8 @@ static void update_68k_cycles (void)
} }
if (cpucycleunit < 1) if (cpucycleunit < 1)
cpucycleunit = 1; cpucycleunit = 1;
write_log ("CPU cycleunit: %d (%.3f)\n", cpucycleunit, (float)cpucycleunit / CYCLE_UNIT); if (currprefs.cpu_cycle_exact)
write_log ("CPU cycleunit: %d (%.3f)\n", cpucycleunit, (float)cpucycleunit / CYCLE_UNIT);
config_changed = 1; config_changed = 1;
} }
...@@ -492,7 +484,9 @@ void check_prefs_changed_cpu (void) ...@@ -492,7 +484,9 @@ void check_prefs_changed_cpu (void)
if (changed if (changed
|| currprefs.cpu_model != changed_prefs.cpu_model || currprefs.cpu_model != changed_prefs.cpu_model
|| currprefs.fpu_model != changed_prefs.fpu_model || currprefs.fpu_model != changed_prefs.fpu_model
#ifdef MMU
|| currprefs.mmu_model != changed_prefs.mmu_model || currprefs.mmu_model != changed_prefs.mmu_model
#endif
|| currprefs.cpu_compatible != changed_prefs.cpu_compatible || currprefs.cpu_compatible != changed_prefs.cpu_compatible
|| currprefs.cpu_cycle_exact != changed_prefs.cpu_cycle_exact) { || currprefs.cpu_cycle_exact != changed_prefs.cpu_cycle_exact) {
...@@ -1875,8 +1869,7 @@ int m68k_movec2 (int regno, uae_u32 *regp) ...@@ -1875,8 +1869,7 @@ int m68k_movec2 (int regno, uae_u32 *regp)
return 1; return 1;
} }
STATIC_INLINE int 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; uae_u32 q = 0, cbit = 0;
int i; int i;
...@@ -2021,8 +2014,7 @@ void m68k_divl (uae_u32 opcode, uae_u32 src, uae_u16 extra, uaecptr oldpc) ...@@ -2021,8 +2014,7 @@ void m68k_divl (uae_u32 opcode, uae_u32 src, uae_u16 extra, uaecptr oldpc)
#endif #endif
} }
STATIC_INLINE void 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 r0 = (src1 & 0xffff) * (src2 & 0xffff);
uae_u32 r1 = ((src1 >> 16) & 0xffff) * (src2 & 0xffff); uae_u32 r1 = ((src1 >> 16) & 0xffff) * (src2 & 0xffff);
...@@ -2475,10 +2467,7 @@ static void do_trace (void) ...@@ -2475,10 +2467,7 @@ static void do_trace (void)
/* We can afford this to be inefficient... */ /* We can afford this to be inefficient... */
m68k_setpc (m68k_getpc ()); m68k_setpc (m68k_getpc ());
fill_prefetch_slow (); fill_prefetch_slow ();
if (currprefs.mmu_model) opcode = x_get_word (regs.pc);
opcode = get_word_mmu (regs.pc);
else
opcode = get_word (regs.pc);
if (opcode == 0x4e73 /* RTE */ if (opcode == 0x4e73 /* RTE */
|| opcode == 0x4e74 /* RTD */ || opcode == 0x4e74 /* RTD */
|| opcode == 0x4e75 /* RTS */ || opcode == 0x4e75 /* RTS */
...@@ -2634,7 +2623,7 @@ STATIC_INLINE int do_specialties (int cycles) ...@@ -2634,7 +2623,7 @@ STATIC_INLINE int do_specialties (int cycles)
if (vpos != lvpos) { if (vpos != lvpos) {
sleepcnt--; sleepcnt--;
#ifdef JIT #ifdef JIT
if (pissoff == 0 && compiled_code && --zerocnt < 0) { if (pissoff == 0 && currprefs.cachesize && --zerocnt < 0) {
sleepcnt = -1; sleepcnt = -1;
zerocnt = IDLETIME / 4; zerocnt = IDLETIME / 4;
} }
...@@ -3384,7 +3373,7 @@ void m68k_disasm_2 (TCHAR *buf, int bufsize, uaecptr addr, uaecptr *nextpc, int ...@@ -3384,7 +3373,7 @@ void m68k_disasm_2 (TCHAR *buf, int bufsize, uaecptr addr, uaecptr *nextpc, int
for (lookup = lookuptab;lookup->mnemo != dp->mnemo; lookup++) for (lookup = lookuptab;lookup->mnemo != dp->mnemo; lookup++)
; ;
buf = buf_out (buf, &bufsize, L"%08lX ", m68k_getpc () + m68kpc_offset); buf = buf_out (buf, &bufsize, "%08lX ", m68k_getpc () + m68kpc_offset);
m68kpc_offset += 2; m68kpc_offset += 2;
...@@ -3806,7 +3795,6 @@ void restore_cpu_finish (void) ...@@ -3806,7 +3795,6 @@ void restore_cpu_finish (void)
doint (); doint ();
if (regs.stopped) if (regs.stopped)
set_special (SPCFLAG_STOP); set_special (SPCFLAG_STOP);
} }
uae_u8 *restore_cpu_extra (uae_u8 *src) uae_u8 *restore_cpu_extra (uae_u8 *src)
......
...@@ -325,12 +325,15 @@ static uae_u8 *restore_chunk (struct zfile *f, TCHAR *name, size_t *len, size_t ...@@ -325,12 +325,15 @@ static uae_u8 *restore_chunk (struct zfile *f, TCHAR *name, size_t *len, size_t
&& _tcscmp (name, "BRAM") != 0 && _tcscmp (name, "BRAM") != 0
&& _tcscmp (name, "FRAM") != 0 && _tcscmp (name, "FRAM") != 0
&& _tcscmp (name, "ZRAM") != 0 && _tcscmp (name, "ZRAM") != 0
&& _tcscmp (name, "ZCRM") != 0
&& _tcscmp (name, "PRAM") != 0 && _tcscmp (name, "PRAM") != 0
&& _tcscmp (name, "A3K1") != 0 && _tcscmp (name, "A3K1") != 0
&& _tcscmp (name, "A3K2") != 0) && _tcscmp (name, "A3K2") != 0)
{ {
/* without zeros at the end old state files may not work */ /* without zeros at the end old state files may not work */
mem = xcalloc (uae_u8, *totallen + 32); mem = xcalloc (uae_u8, *totallen + 32);
if (!mem)
return NULL;
if (flags & 1) { if (flags & 1) {
zfile_zuncompress (mem, *totallen, f, len2); zfile_zuncompress (mem, *totallen, f, len2);
} else { } else {
......
...@@ -14,7 +14,7 @@ hostname = GnoStiC-dv7 ...@@ -14,7 +14,7 @@ hostname = GnoStiC-dv7
uname -m = i686 uname -m = i686
uname -r = 2.6.32-22-generic uname -r = 2.6.32-22-generic
uname -s = Linux uname -s = Linux
uname -v = #33-Ubuntu SMP Wed Apr 28 13:27:30 UTC 2010 uname -v = #35-Ubuntu SMP Tue Jun 1 14:17:36 UTC 2010
/usr/bin/uname -p = unknown /usr/bin/uname -p = unknown
/bin/uname -X = unknown /bin/uname -X = unknown
...@@ -445,7 +445,7 @@ configure:4344: $? = 0 ...@@ -445,7 +445,7 @@ configure:4344: $? = 0
configure:4344: result: yes configure:4344: result: yes
configure:4350: checking for _doprnt configure:4350: checking for _doprnt
configure:4350: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5 configure:4350: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
/tmp/ccr9Vcwh.o: In function `main': /tmp/ccQrjgHH.o: In function `main':
/home/gnostic/puaex/src/tools/conftest.c:67: undefined reference to `_doprnt' /home/gnostic/puaex/src/tools/conftest.c:67: undefined reference to `_doprnt'
collect2: ld returned 1 exit status collect2: ld returned 1 exit status
configure:4350: $? = 1 configure:4350: $? = 1
...@@ -533,7 +533,7 @@ configure:4364: $? = 0 ...@@ -533,7 +533,7 @@ configure:4364: $? = 0
configure:4364: result: yes configure:4364: result: yes
configure:4364: checking for strcmpi configure:4364: checking for strcmpi
configure:4364: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5 configure:4364: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
/tmp/cc7g3tsw.o: In function `main': /tmp/cczGUJxW.o: In function `main':
/home/gnostic/puaex/src/tools/conftest.c:69: undefined reference to `strcmpi' /home/gnostic/puaex/src/tools/conftest.c:69: undefined reference to `strcmpi'
collect2: ld returned 1 exit status collect2: ld returned 1 exit status
configure:4364: $? = 1 configure:4364: $? = 1
...@@ -613,7 +613,7 @@ configure: failed program was: ...@@ -613,7 +613,7 @@ configure: failed program was:
configure:4364: result: no configure:4364: result: no
configure:4364: checking for stricmp configure:4364: checking for stricmp
configure:4364: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5 configure:4364: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
/tmp/ccMKhfZB.o: In function `main': /tmp/ccozJQD1.o: In function `main':
/home/gnostic/puaex/src/tools/conftest.c:69: undefined reference to `stricmp' /home/gnostic/puaex/src/tools/conftest.c:69: undefined reference to `stricmp'
collect2: ld returned 1 exit status collect2: ld returned 1 exit status
configure:4364: $? = 1 configure:4364: $? = 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment