Steem bug ! (extended resolutions, source included)

A forum for anything about the Steem Engine STE emulator, comments, problems, bug reports etc. Steven Seagal regularly provides updated versions of the original STEem code. The current version is v3.9.4.

Moderators: Mug UK, Steem Authors, Moderator Team

User avatar
megar
Atari maniac
Atari maniac
Posts: 85
Joined: Mon Nov 22, 2004 8:33 am
Location: East of France
Contact:

Steem bug ! (extended resolutions, source included)

Postby megar » Sat Jul 21, 2012 1:00 am

The glitch I encountered in my previous thread is definitely a bug.
When any extended resolution (800x600x1 as example), running the following code will crash:

Code: Select all

    move.w  #$73,d0
    lea     rts(pc),a2
    jsr     (a2)

    move.w  #7,-(a7)
    trap    #1
    addq.l  #4,a7

    clr.w   -(a7)
    trap    #1

rts:
    rts


It doesn't crash if d0 is other value, or if the instruction is jsr (a3), only jsr (a2) when d0=73 triggers it. Quite strange !

Any steem hacker can see what is happening under the hood ?

User avatar
megar
Atari maniac
Atari maniac
Posts: 85
Joined: Mon Nov 22, 2004 8:33 am
Location: East of France
Contact:

Re: Steem bug ! (extended resolutions, source included)

Postby megar » Sat Jul 21, 2012 4:18 am

I FOUND IT !!!!!

Here is a patch:

Code: Select all

Index: emulator.cpp
===================================================================
--- emulator.cpp        (revision 68)
+++ emulator.cpp        (working copy)
@@ -106,7 +106,7 @@
 
 #ifndef NO_CRAZY_MONITOR
   if (extended_monitor){
-    if ((ir&15)==2){ //VDI or AES
+    if ((ir&0xffff)==0x4e42){ //instruction is TRAP #2 (VDI or AES)
 #ifdef ENABLE_LOGFILE
       if (logsection_enabled[LOGSECTION_TRAP]) log_os_call(2);
 #endif



The condition to trigger the bug:
- extended resolution
- d0=0x73
- d1-> unreadable address
- instruction is jsr (a2) or jmp (a2).

Time to go to bed, now !

Edit: pull request sent to https://github.com/btuduri/Steem-Engine


Social Media

     

Return to “Steem”

Who is online

Users browsing this forum: No registered users and 3 guests