English Amiga Board

Go Back   English Amiga Board > Requests > request.Music

Thread Tools
Old Yesterday, 00:13   #21
Thomas Richter
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 2,101
More information on this. After debugging for a couple of hours, the issue is clear. This is a bug in Music-X. The details are involved.

The program seems to be written in C with some small subroutines optimized in assembler. One of the assembler functions is used for rendering data on the screen. The assembler function incorrectly assumes that the graphics.library call FillRect() preserves register a1, the pointer to the rastport. This is of course nowhere documented and probably just an overview.

By sheer coincidence, a1 contains upon return a pointer to a data structure whose first pointer points to the exec soft interrupt list. Thus, if this (now invalid) pointer is passed into RectFill() again, then this structure is mis-interpreted as rastport. The first pointer of this (faulty) data structure is a pointer to the layer (or should be) and then the LockLayersRom() in P96 trashes the soft interrupt list. The soft interrupt handler within exec then jumps into the wild by handling the incorrect data as struct interrupt, which is is not. It then jumps into the wild, trashing the system.

Thus, bad software. Just with more details this time.
Thomas Richter is online now  
Old Yesterday, 20:40   #22
Registered User

Join Date: Sep 2004
Location: Brasil
Age: 48
Posts: 176
Originally Posted by Thomas Richter View Post
Thus, bad software. Just with more details this time.
Sure, but thanks to your great information, I found the problematic function:
                movea.l (gfxbase).l,a6
                movem.l d0-d3/a0,-(sp)
                jsr     Move(a6)
                addq.w  #1,d0
                subq.w  #1,d2
                move.w  d1,-(sp)
                move.w  d2,-(sp)
                move.w  d3,-(sp)
                move.w  d2,-(sp)
                move.w  d3,-(sp)
                move.w  d0,-(sp)
                move.w  d1,-(sp)
                move.w  d0,-(sp)
                subq.w  #1,d0
                addq.w  #1,d2
                move.w  d1,-(sp)
                move.w  d2,-(sp)
                move.w  d3,-(sp)
                move.w  d2,-(sp)
                move.w  d3,-(sp)
                move.w  d0,-(sp)
                movea.l sp,a0
                moveq   #7,d0
                jsr     PolyDraw(a6)
                adda.w  #$1C,sp
                tst.w   d4
                bmi.s   .exit_draw_routine
                move.l  d4,d0
                jsr     SetAPen(a6)
                movem.l (sp),d0-d3/a0
                addq.w  #2,d0
                addq.w  #1,d1
                subq.w  #2,d2
                subq.w  #1,d3
                jsr     RectFill(a6)

                movem.l (sp)+,d0-d3/a0
Then I usually prefer to think that it was only a typing error from the original developers. And if this is the only bug (and this is a big if, because at contrary than you, I haven't wasted more than 5 minutes with the debugger and only by the curiosity for your information), then it can be fixed by adding the register A1 to the first and last movem instruction.

But what I am trying to say, it is that Thomas, a guy that has not interest in this software, has wasted hours of his time for finding the bug and given a lot of information that can help to fix this program. Then somebody with enough interest by running Music-X in those modern configuration could try to fix it and be grateful to all the hard work that people like Thomas is doing for the platform.
SyX is offline  

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
What the heck is this... thing? cheshirenoir Hardware mods 4 14 July 2018 07:51
Experimental thing - Gloom Deluxe + CD Music earok project.CD32 Conversion 4 03 January 2017 17:46
Does this thing have a name? Noctumus Retrogaming General Discussion 11 24 September 2016 23:22
Dr. Vector is back / new .mod-label for rare amiga-demoscene-music remute MarketPlace 0 04 July 2014 00:27
What was that Lazarus thing about? JonSick Retrogaming General Discussion 4 25 February 2008 13:28

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 14:45.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.
Page generated in 0.06604 seconds with 15 queries