[hatari-devel] Wotanoid problem : Fixed for me ;)

Laurent Sallafranque laurent.sallafranque at free.fr
Sun Jan 24 00:13:52 CET 2010


Ok, I've got wotanoid working ;)

I had to patch 2 parts of hatari : gemdos and iomemtabFalcon

As I'm not an expert at all with gemdos, I prefer asking you if my fix 
is correct before upload it.

The problem is in Fopen.
The second value passed (number of octets to read was -1in the program)

With this value, we immediately return.
The Fread reads 0 octets and nothing is loaded from the file.

I've added a test :
if the parameter = -1, It loads the whole file.


For iomemtabFalcon, I had to patch another memory address.

Patch is just below.
could you tell me if this is OK for you ?

Regards

Laurent




diff -r ebc4d432fc2e src/gemdos.c
--- a/src/gemdos.c      Fri Jan 22 00:44:43 2010 +0100
+++ b/src/gemdos.c      Sun Jan 24 00:11:54 2010 +0100
@@ -1747,6 +1747,9 @@

        nBytesLeft = FileSize-CurrentPos;

+       if (Size = -1)
+               Size = FileSize;
+
        /* Check for bad size and End Of File */
        if (Size <= 0 || nBytesLeft <= 0)
        {


diff -r ebc4d432fc2e src/ioMemTabFalcon.c
--- a/src/ioMemTabFalcon.c      Fri Jan 22 00:44:43 2010 +0100
+++ b/src/ioMemTabFalcon.c      Sun Jan 24 00:11:54 2010 +0100
@@ -236,6 +236,7 @@

        { 0xff9200, SIZE_WORD, Joy_StePadButtons_ReadWord, 
IoMem_WriteWithoutInterception },    /* Joypad fire buttons */
        { 0xff9202, SIZE_WORD, Joy_StePadMulti_ReadWord, 
Joy_StePadMulti_WriteWord },     /* Joypad directions/buttons/selection */
+       { 0xff9206, SIZE_BYTE, IoMem_VoidRead, IoMem_VoidWrite 
},                               /* No bus error here ; fix Wotanoid*/
        { 0xff9210, SIZE_BYTE, IoMem_VoidRead, IoMem_VoidWrite 
},                               /* No bus error here */
        { 0xff9211, SIZE_BYTE, IoMem_VoidRead, 
IoMem_WriteWithoutInterception },          /* Joypad 0 X position (?) */
        { 0xff9212, SIZE_BYTE, IoMem_VoidRead, IoMem_VoidWrite 
},                               /* No bus error here */




More information about the hatari-devel mailing list