2018-10-15 14:44 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0003962GemX[All Projects] Generalpublic2018-09-22 21:23
ReporterHarry 
Assigned ToStingRayProject InfoGem'X (Demonware/Kaiko)
http://www.whdload.de/games/GemX.html
 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Summary0003962: Hello Stingray, the latest WinUAE and FS-UAE have the problem that getting the
DescriptionGameVersion: english,1 disk, original release
SlaveVersion: all

Hello Stingray,
the latest WinUAE and FS-UAE have the problem that getting the HPOS ($dff007) is not random enough to serve as random generator, resulting in mostly the same mine sequence played in WHDLoad.
The next mine is determined at $5ade, the location
$5aea MOVE.W (A5, $6),D0 ;4 Bytes long, A5 is $dff000
would be a good place to patch to return a random value.
A random generator of a variant I used in Fourmaze is:
***
GETBYTERANDOM
        bsr.s random
        LSR.L #3,D0
        AND.B #$FF,D0
        rts
random MOVE.L RANDOM1(PC),D0
        ADD.L RANDOM2(PC),D0
        MOVE.L D0,RANDOM1
        ROR.L #$04,D0
        SUB.W RANDOM2(PC),D0
        EOR.L D0,RANDOM2
        ADD.L #$56565311,RANDOM1
        RTS
RANDOM1 DC.L $3F3F751F
RANDOM2 DC.L $17179834
***
For best results, call it also every VBI for the internal side effects so playing time is incorporated and the results are not in a certain sequence.
A good place to insert in the VBI is
$7594 LEA.L $DFF000,A5 ;6 Bytes long
Thanks,
Harry.
TagsNo tags attached.
MachineUAE
CPU68020
CPUSpeed14
ChipSetAGA
GFXCardNone
ChipMem2 MB
FastMem16 MB
WorkbenchOS 3.1
KickROM40 - Kick 3.1
KickSoftNone
WHDLoad18.3
importedyes
Attached Files

-Relationships
+Relationships

-Notes

note ~0006377

StingRay (developer)

That's one excellent bug report, thanks Harry! It never was a good idea to rely on the raster beam for random numbers so this is not an UAE problem but rather a problem with faster CPU's. I'll fix this in an update.

note ~0006379

StingRay (developer)

Patch updated, random generator recoded not to rely on the raster beam and in-game timing fixed as well.

note ~0006383

Denis (reporter)

Hello Sting, I encounter a big problem about this new slave.

I have upgraded to Whdload 18.4, and GemX simply locks up my A1200 on the highscore screen. The only way for me to exit is to do CTRL+A+A.

Can you check what happens or better indicate me how can i help you ?

Thanks :)
+Notes

-Issue History
Date Modified Username Field Change
2018-09-20 23:15 administrator New Issue
2018-09-20 23:15 administrator Status new => assigned
2018-09-20 23:15 administrator Assigned To => StingRay
2018-09-21 14:47 StingRay Note Added: 0006377
2018-09-21 15:44 StingRay Note Added: 0006379
2018-09-21 15:44 StingRay Status assigned => resolved
2018-09-21 15:44 StingRay Resolution open => fixed
2018-09-22 21:23 Denis Note Added: 0006383
+Issue History