for (;;) {
uae_u32 b = read_comm_pipe_u32_blocking (&requests);
- if (unitnum < 0) {
- thread_alive = -1;
- return NULL;
- }
+ if (unitnum < 0)
+ continue;
+
switch (b)
{
case 0x100:
case 0x103: // unpause
sys_command_cd_pause (DF_IOCTL, unitnum, 0);
break;
+ case 0x104: // stop
+ cdaudiostop();
+ break;
case 0x110: // do_play!
do_play();
break;
int first = -1;
int cdtvunit = -1, audiounit = -1;
- if (unitnum >= 0) {
- cdaudiostop();
+ if (unitnum >= 0)
sys_command_close (DF_IOCTL, unitnum);
- }
unitnum = -1;
cdtv_reset();
if (!device_func_init(DEVICE_TYPE_ANY)) {
void cdtv_free (void)
{
if (thread_alive > 0) {
+ write_comm_pipe_u32 (&requests, 0x0104, 1);
write_comm_pipe_u32 (&requests, 0xffff, 1);
while (thread_alive > 0)
sleep_millis(10);
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;
if (!configure_rom (p, roms, romcheck))
return 0;
p->bogomem_size = 0;
- p->chipmem_size = 0x200000;
+ p->chipmem_size = 0x100000;
p->chipset_mask = CSMASK_ECS_AGNUS | CSMASK_ECS_DENISE;
p->cs_cdtvcd = p->cs_cdtvram = 1;
if (config > 0)
static uaecptr debug_copper_pc;
extern int audio_channel_mask;
+extern int inputdevice_logging;
static FILE *logfile;
" sm <sprite mask> Enable or disable sprites\n"
" di <mode> [<track>] Break on disk access. R=DMA read,W=write,RW=both,P=PIO\n"
" Also enables extended disk logging\n"
+ " dj [<level bitmask>] Enable joystick/mouse input debugging\n"
" dm Dump current address space map\n"
" q Quit the emulator. You don't want to use this command.\n\n"
};
if (*inptr == 'i') {
next_char(&inptr);
disk_debug(&inptr);
- } else if(*inptr == 'm') {
+ } else if(*inptr == 'j') {
+ inptr++;
+ inputdevice_logging = 1 | 2;
+ if (more_params(&inptr))
+ inputdevice_logging = readint(&inptr);
+ console_out("input logging level %d\n", inputdevice_logging);
+ } else if(*inptr == 'm') {
memory_map_dump_2(0);
} else {
uae_u32 daddr;
break;
current = next;
}
+ if (!current) {
+ write_log("tried to unlock non-existing lock %x\n", lock);
+ return;
+ }
put_long (current << 2, get_long (lock));
}
lock -= 4;
static void
action_lock_from_fh (Unit *unit, dpacket packet)
{
- uaecptr out;
Key *k = lookup_key (unit, GET_PCK_ARG1 (packet));
TRACE(("ACTION_COPY_DIR_FH(0x%lx)\n", GET_PCK_ARG1 (packet)));
if (k == 0) {
PUT_PCK_RES1 (packet, DOS_FALSE);
return;
}
- out = action_dup_lock_2 (unit, packet, k->aino->uniq);
+ action_dup_lock_2 (unit, packet, k->aino->uniq);
}
/* convert time_t to/from AmigaDOS time */
/* I don't think I need to play with shlock count here, because I'm
opening from an existing lock ??? */
- /* Is this right? I don't completely understand how this works. Do I
- also need to free_lock() my lock, since nobody else is going to? */
de_recycle_aino (unit, aino);
+ free_lock (unit, lock); /* lock must be unlocked */
PUT_PCK_RES1 (packet, DOS_TRUE);
/* PUT_PCK_RES2 (packet, k->uniq); - this shouldn't be necessary, try without it */
}
#include "autoconf.h"
int inputdevice_logging = 0;
-static int potgo_logging = 0;
#define DIR_LEFT 1
#define DIR_RIGHT 2
int left = 0, right = 0, top = 0, bot = 0;
uae_u16 v = 0;
- if (inputdevice_logging > 2)
+ if (inputdevice_logging & 2)
write_log("JOY%dDAT %x\n", joy, m68k_getpc(®s));
readinput ();
if (joydir[joy] & DIR_LEFT)
mouse_frame_y[0] = mouse_y[0];
mouse_frame_x[1] = mouse_x[1];
mouse_frame_y[1] = mouse_y[1];
-// write_log ("%d:%04.4X %p\n",vpos,v,m68k_getpc());
+ if (inputdevice_logging & 2)
+ write_log ("JOYTEST: %04.4X PC=%x\n", v , M68K_GETPC);
}
static uae_u8 parconvert (uae_u8 v, int jd, int shift)
but |= 0x40 << i;
}
}
- //write_log("%02.2X:%02.2X %x\n", dra, but, M68K_GETPC);
+ if (inputdevice_logging & 4)
+ write_log("BFE001: %02.2X:%02.2X %x\n", dra, but, M68K_GETPC);
return but;
}
{
int i;
- if (potgo_logging)
- write_log ("W:%d: %04.4X %p\n", vpos, v, M68K_GETPC);
+ if (inputdevice_logging & 16)
+ write_log ("POTGO_W: %04.4X %p\n", v, M68K_GETPC);
#ifdef DONGLE_DEBUG
if (notinrom ())
write_log ("POTGO %04.4X %s\n", v, debuginfo(0));
if (notinrom ())
write_log ("POTGOR %04.4X %s\n", v, debuginfo(0));
#endif
- if (potgo_logging)
- write_log("R:%d:%04.4X %d %p\n", vpos, v, cd32_shifter[1], M68K_GETPC);
+ if (inputdevice_logging & 16)
+ write_log("POTGO_R: %04.4X %d %p\n", v, cd32_shifter[1], M68K_GETPC);
return v;
}
uae_reset (r);
}
record_key ((uae_u8)((key << 1) | (key >> 7)));
- if (inputdevice_logging > 0)
+ if (inputdevice_logging & 1)
write_log("Amiga key %02.2X %d\n", key & 0x7f, key >> 7);
return;
}
if (nr <= 0)
return 0;
ie = &events[nr];
- if (inputdevice_logging > 0)
+ if (inputdevice_logging & 1)
write_log("'%s' %d %d\n", ie->name, state, max);
if (autofire) {
if (state)
int type;
int blocksize;
int mciid;
- int mcimode;
CDROM_TOC toc;
UINT errormode;
int playend;
void mapped_free(uae_u8 *mem)
{
shmpiece *x = shm_start;
+
+ if (!p96mode && mem == p96fakeram) {
+ xfree (p96fakeram);
+ p96fakeram = NULL;
+ while(x) {
+ struct shmid_ds blah;
+ if (mem == x->native_address) {
+ int shmid = x->id;
+ shmids[shmid].key = -1;
+ shmids[shmid].name[0] = '\0';
+ shmids[shmid].size = 0;
+ shmids[shmid].attached = 0;
+ }
+ x = x->next;
+ }
+ return;
+ }
+
while(x) {
if(mem == x->native_address)
shmdt(x->native_address);
shmaddr = natmem_offset + p96ram_start;
} else {
p96ram_start = currprefs.z3fastmem_start + ((currprefs.z3fastmem_size + 0xffffff) & ~0xffffff);
+ shmaddr = natmem_offset + p96ram_start;
VirtualFree(shmaddr, os_winnt ? size : 0, os_winnt ? MEM_DECOMMIT : MEM_RELEASE);
xfree(p96fakeram);
result = p96fakeram = xcalloc (size + 4096, 1);
* Copyright 1997-1999 Brian King
*/
-/* Uncomment this line if you want the logs time-stamped */
-/* #define TIMESTAMP_LOGS */
+//#define MEMDEBUG
#include "sysconfig.h"
//tmp &= 0xffff;
tmp |= _CRTDBG_CHECK_ALWAYS_DF;
tmp |= _CRTDBG_CHECK_CRT_DF;
- //tmp |=_CRTDBG_CHECK_EVERY_16_DF;
- //tmp |= _CRTDBG_DELAY_FREE_MEM_DF;
+#ifdef MEMDEBUG
+ tmp |=_CRTDBG_CHECK_EVERY_16_DF;
+ tmp |= _CRTDBG_DELAY_FREE_MEM_DF;
+#endif
_CrtSetDbgFlag(tmp);
}
#endif
#define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100)
#define GETBDD(x) ((x) % 100)
-#define WINUAEBETA 8
+#define WINUAEBETA 9
#define WINUAEPUBLICBETA 1
-#define WINUAEDATE MAKEBD(2007, 2, 24)
+#define WINUAEDATE MAKEBD(2007, 2, 27)
#define IHF_WINDOWHIDDEN 6
#define NORMAL_WINDOW_STYLE (WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU)
workprefs.sound_stereo_swap_ahi = (SendDlgItemMessage (hDlg, IDC_SOUNDSWAP, CB_GETCURSEL, 0, 0) & 2) ? 1 : 0;
idx = SendDlgItemMessage (hDlg, IDC_SOUNDDRIVE, CB_GETCURSEL, 0, 0);
- if (idx >= 0) {
+ if (idx != CB_ERR && idx >= 0) {
LRESULT res = SendDlgItemMessage (hDlg, IDC_SOUNDDRIVESELECT, CB_GETCURSEL, 0, 0);
- if (res >= 0) {
- if (res > DS_BUILD_IN_SOUNDS + 2) {
- int j = res - (DS_BUILD_IN_SOUNDS + 2 + 1);
+ if (res != CB_ERR && res >= 0) {
+ int xtra = driveclick_pcdrivemask ? 2 : 0;
+ if (res > DS_BUILD_IN_SOUNDS + xtra) {
+ int j = res - (DS_BUILD_IN_SOUNDS + xtra + 1);
char *p = drivesounds;
while (j-- > 0)
p += strlen (p) + 1;
+Beta 9: (RC 2)
+
+- non-ASPI CDTV CD audio didn't always stop when exiting/reseting
+- added dj [<mask>] command to debugger. Enable joystick/mouse
+ input logging
+- CDTV quickstart chip ram size set to correct 1M (correct config
+ is more important than workaround for one game)
+- Fixed another filesystem lock leak in ACTION_FH_FROM_LOCK
+ (dos.library/OpenFromLock())
+- do not allow unlocking of non-existing locks in filesystem.
+ Previously it caused random memory corruption and also triggered
+ following (previously unknown) 1.0b2 issue:
+ "added workaround for AMOS filesystem emulation incompatibility
+ (infinite loop in filesystem code) Reason for freeze unknown,
+ proper fix unknown.. (filesystem emulation is confusing..)"
+- external drive sound selection GUI didn't work if fdrawcmd.sys
+ was not installed
+
Beta 8: (RC 1)
- uaehf.device unit >=30 crash fixed