![]() |
![]() |
#21 |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 2,532
|
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. |
![]() |
![]() |
#22 |
Registered User
![]() Join Date: Sep 2004
Location: Brasil
Age: 48
Posts: 178
|
Sure, but thanks to your great information, I found the problematic function:
Code:
draw_routine 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) .exit_draw_routine movem.l (sp)+,d0-d3/a0 rts 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. |
![]() |
![]() |
#23 |
Registered User
![]() Join Date: Nov 2018
Location: Poland
Posts: 13
|
Well thanks a lot for taking your time to investigate.
Unfortunately I am not a programmer so I am unable to help. |
![]() |
![]() |
#24 |
Registered User
![]() Join Date: Nov 2019
Location: Celle / Germany
Posts: 119
|
Maybe a little Patch would be enough that patches the opcodes of the movem-instructions to save and restore address register a1 as well.
|
![]() |
![]() |
#25 |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,581
|
|
![]() |
![]() |
#26 |
Defendit numerus
![]() Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,080
|
Here I am, can someone put the executable in the zone for me?
I think that the patch, thanks to those who have already worked on it, is really a matter of a few minutes. EDIT: ok, I downloaded the ADF from TOSEC collection. I simply applied the patch SyX suggested, thanks to Thomas' previous work, so pretty much nothing on my end ![]() Fully untested. EDIT2: removed as it is not working. Last edited by ross; 06 December 2022 at 17:56. |
![]() |
![]() |
#27 |
Registered User
![]() Join Date: Nov 2018
Location: Poland
Posts: 13
|
It didn't work. Sorry.
|
![]() |
![]() |
#28 |
Defendit numerus
![]() Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,080
|
Ok, then the "movem +A1" fix is not enough
![]() Sorry but right now I don't really have the possibility of a proper debugging for a working fix (of course I remain available if others want to look at the code and suggest a patch which I will then apply). |
![]() |
![]() |
#29 | |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,581
|
Quote:
from movem.l (sp),d0-d3/a0 to movem.l (sp),d0-d3/a0/a1 Can solve crash problem? |
|
![]() |
![]() |
#30 | |
Defendit numerus
![]() Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,080
|
Quote:
![]() EDIT: hmm, the problem here is that PolyDraw destroys A1 for SetAPen as well, so the routine should be written a little differently And also the first Move() could destroy D0 and D1... Last edited by ross; 07 December 2022 at 13:44. |
|
![]() |
![]() |
#31 |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 2,532
|
There is more than a single Draw() and a single PolyDraw() that needs to be fixed. Essentially, the whole assembler function needs to be redone. Maybe there are even more assembler functions like this. As said, this program has quite some "issues" by making assumptions that some graphic calls preserve particular registers.
|
![]() |
![]() |
#32 | |
Defendit numerus
![]() Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,080
|
Quote:
Then it's not trivial, it's certainly not about changing a couple of bytes like I did initially... Well, I go back to the initial consideration: if someone wants to look for every routine that has the registers problem and report it, otherwise I just can't spend the time on it now, sorry. |
|
![]() |
![]() |
#33 |
Registered User
![]() Join Date: Nov 2018
Location: Poland
Posts: 13
|
I've contacted the author and he said that Music-X sources are still copyrighted, so impossible to publish...
I think that leaves a choice: either give up Music-X or give up P96... |
![]() |
![]() |
#34 |
ex. demoscener "Bigmama"
![]() Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,481
|
Except that given the issues described above, it might as well crash using native graphics, depending on the OS/kickstart version.
|
![]() |
![]() |
#35 |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 2,532
|
Software only runs out of copyright some 25 years after the death of its author, so that is nothing new. However, as you could reach its author, have you tried the obvious, namely asking for a fix of the (rather obvious) problem?
|
![]() |
![]() |
#36 | |
Registered User
![]() Join Date: Nov 2018
Location: Poland
Posts: 13
|
Quote:
Quote:"Also, the Music-X source code is really bad. I was a young programmer then and very inexperienced and made a lot of mistakes." He is using a modern tools for his projects now so his interest in reviving Music-X is pretty low. Plus and he doesn't feel very much as a "retro guy".. But you can try motivate him by yourself ![]() https://soundcloud.com/music-by-talin |
|
![]() |
![]() |
#37 |
Registered User
![]() Join Date: Nov 2018
Location: Poland
Posts: 13
|
Wow, in the latest version of P96 problem was SOLVED !!!
![]() ![]() ![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
What the heck is this... thing? | cheshirenoir | Hardware mods | 4 | 14 July 2018 06:51 |
Experimental thing - Gloom Deluxe + CD Music | earok | project.CD32 Conversion | 4 | 03 January 2017 16:46 |
Does this thing have a name? | Noctumus | Retrogaming General Discussion | 11 | 24 September 2016 22:22 |
Dr. Vector is back / new .mod-label for rare amiga-demoscene-music | remute | MarketPlace | 0 | 03 July 2014 23:27 |
What was that Lazarus thing about? | JonSick | Retrogaming General Discussion | 4 | 25 February 2008 12:28 |
|
|