|
It is currently Wed Jun 19, 2013 7:40 pm
|
View unanswered posts | View active topics
 |
|
 |
|
| Author |
Message |
|
Corn
|
Post subject: Re: Super Mario 64 Star Road, Christmas Carnival & Missing S  Posted: Mon Jan 16, 2012 3:13 am |
| Developer |
 |
 |
Joined: Sat Jan 31, 2009 7:11 am Posts: 444
|
Nerd42 wrote: Once I understood the problem well enough to communicate it to Skrelux, he responded with a patch that fixes the issue with Star Road. I bet that if you just pasted my reply to you about R0 register, Skrelux would know what to do to fix it... >.>
_________________
|
|
|
|
 |
|
adt1340
|
Post subject: Re: Super Mario 64 Star Road, Christmas Carnival & Missing S  Posted: Sun Jan 22, 2012 12:54 am |
| Mime |
 |
Joined: Sun Jan 22, 2012 12:50 am Posts: 3
|
|
Hi, so I'm using Skrelux's patch to allow it to be playable on Daedalusx64 rev747, and it's working fine until I went into Level 5 (Gloomy Garden) and it crashes everytime. I'm using a Phat PSP on Daedalusx64 rev747. Anyone else have this issue?
|
|
|
|
 |
|
Salv-E
|
Post subject: Re: Super Mario 64 Star Road, Christmas Carnival & Missing S  Posted: Tue Jan 24, 2012 8:19 pm |
| Founder |
 |
 |
Joined: Tue Nov 04, 2008 5:07 pm Posts: 2939
|
adt1340 wrote: Hi, so I'm using Skrelux's patch to allow it to be playable on Daedalusx64 rev747, and it's working fine until I went into Level 5 (Gloomy Garden) and it crashes everytime. I'm using a Phat PSP on Daedalusx64 rev747. Anyone else have this issue? Can you post a savestate before the crash?
_________________

<Salvy>WTF Kirby is invisible on latest rev?! <Dougamer>Hmmm <Dougamer>I'll "aquire" kirby and check... 20 minutes later... <Salvy>Kirby looks ok on default settings Dougamer? <Dougamer>still... "aquiring" it Salvy...
|
|
|
|
 |
|
adt1340
|
Post subject: Re: Super Mario 64 Star Road, Christmas Carnival & Missing S  Posted: Tue Jan 24, 2012 11:11 pm |
| Mime |
 |
Joined: Sun Jan 22, 2012 12:50 am Posts: 3
|
|
Ok, here's the savestate.
|
|
|
|
 |
|
messiaen
|
Post subject: Re: Super Mario 64 Star Road, Christmas Carnival & Missing S  Posted: Fri Jan 27, 2012 1:28 am |
| Mime |
 |
Joined: Mon Jul 06, 2009 7:58 am Posts: 9
|
|
I'm puzzled by the R0 issues in Star Road/Carnival, can someone provide an example PC where that happens? I am still waiting more information from Celux, he said he corrected many instances of this error, but I don't think such bizarre error could happen many times, so he may be mistaking some data as code, which could explain other random crashes.
By the way, I am willing to correct the problem in Missing Stars, I just need a register/PC report of the crash before and after my previous fix. Does it happens whenever you get near to Goomba or when you do some interaction with him?
|
|
|
|
 |
|
messiaen
|
Post subject: Re: Super Mario 64 Star Road, Christmas Carnival & Missing S  Posted: Fri Jan 27, 2012 3:06 am |
| Mime |
 |
Joined: Mon Jul 06, 2009 7:58 am Posts: 9
|
|
Yes, the PC on the first post is already at some exception handler.
I have those old sources from PJ 1.4 somewhere in my HD, modifying the interpreter core to track register write should be easy. Nemu actually has an debug function to break on register change, but it seems a bit broken (at least with r0).
|
|
|
|
 |
|
Salv-E
|
Post subject: Re: Super Mario 64 Star Road, Christmas Carnival & Missing S  Posted: Fri Jan 27, 2012 10:03 am |
| Founder |
 |
 |
Joined: Tue Nov 04, 2008 5:07 pm Posts: 2939
|
|
@adt1340: Thnx for the savestate, I'll take a look today.
@messiaen: I can provide any debug information you might need for example disambly of the BSOD, Addr, PC, opcode(s) where the R0 write happened. Ultimately I can provide the debug PC version of Daedalus, it hasn't been updated in quiet abit, but you should be able to reproduce the crash, and also contains debug tools that can be useful to you. Just let me know!
_________________

<Salvy>WTF Kirby is invisible on latest rev?! <Dougamer>Hmmm <Dougamer>I'll "aquire" kirby and check... 20 minutes later... <Salvy>Kirby looks ok on default settings Dougamer? <Dougamer>still... "aquiring" it Salvy...
|
|
|
|
 |
|
messiaen
|
Post subject: Re: Super Mario 64 Star Road, Christmas Carnival & Missing S  Posted: Fri Jan 27, 2012 11:34 am |
| Mime |
 |
Joined: Mon Jul 06, 2009 7:58 am Posts: 9
|
|
Ok, I found the instruction. Actually, I'm almost sure this is a bug in Daedalus, since its not emulating accurately the hardware!
To disable the peach intro (otherwise modified Castle Grounds will crash), I NOP the instruction at 0x6BD4 in the ROM. In the Missing Stars hack you don't have the problem because I fully nopped it. On Star Road, however, or any other hack done with my "Level Importer" tool, a SHORT NOP is used, that is, only the first 16-bits of the instruction are changed to 0x2400 (ADDIU R0, R0), not the immediate operands.
I probably should have used a full NOP (like I did in TMS), however this method is not only valid but also widely used in Gameshark codes for shorter 16-bit NOPs. That's why I consider it as a bug, since it may cause problem with many Gameshark codes which have been tested on the console.
So, to fix the Star Road ROM, just change 0x6BD4 to 0x6BD8 to "00000000" in the original ROM.
I am interested in the PC debug version so I can fix the goomba issue in the Missing Stars hack.
|
|
|
|
 |
|
Corn
|
Post subject: Re: Super Mario 64 Star Road, Christmas Carnival & Missing S  Posted: Fri Jan 27, 2012 1:07 pm |
| Developer |
 |
 |
Joined: Sat Jan 31, 2009 7:11 am Posts: 444
|
messiaen wrote: Ok, I found the instruction. Actually, I'm almost sure this is a bug in Daedalus, since its not emulating accurately the hardware!
To disable the peach intro (otherwise modified Castle Grounds will crash), I NOP the instruction at 0x6BD4 in the ROM. In the Missing Stars hack you don't have the problem because I fully nopped it. On Star Road, however, or any other hack done with my "Level Importer" tool, a SHORT NOP is used, that is, only the first 16-bits of the instruction are changed to 0x2400 (ADDIU R0, R0), not the immediate operands.
I probably should have used a full NOP (like I did in TMS), however this method is not only valid but also widely used in Gameshark codes for shorter 16-bit NOPs. That's why I consider it as a bug, since it may cause problem with many Gameshark codes which have been tested on the console.
So, to fix the Star Road ROM, just change 0x6BD4 to 0x6BD8 to "00000000" in the original ROM.
I am interested in the PC debug version so I can fix the goomba issue in the Missing Stars hack. What you say is exactly the issue, full NOP vs. a write to R0... When emulating the CPU it is very costly to detect writes to R0, imagine having to add a branch to all OPs beeing emulated to test for R0 as destination (a write to R0 actually changes the value and will wreck havoc on subsequent OPs) but on real hardware its not and issue since a write to R0 will change nothing. We cant afford to look for when the destination is R0 so a full NOP *is* really needed for DaedalusX64.
_________________
|
|
|
|
 |
|
messiaen
|
Post subject: Re: Super Mario 64 Star Road, Christmas Carnival & Missing S  Posted: Fri Jan 27, 2012 1:37 pm |
| Mime |
 |
Joined: Mon Jul 06, 2009 7:58 am Posts: 9
|
|
Right, if that's the case then its probably not worth to do this just for a few Gameshark codes. I'll correct the NOP method in my tool, so future ROM hacks won't have this problem.
Another way to fix Star Road/Carnival/Super Mario 74 (a major hack which probably also has this problem) without resorting to a hex editor is to use/force this cheat code:
8124BBD4 0000 8124BBD6 0000
It simply nops the offending instruction. It has to be activated during the title screen before its executed because of possible dynarec issues.
Edit: just looked quickly at mupen source code, indeed it checks for operations to r0 on all opcodes (but yeah, speed is not an issue nowadays on PCs).
|
|
|
|
 |
|
Salv-E
|
Post subject: Re: Super Mario 64 Star Road, Christmas Carnival & Missing S  Posted: Fri Jan 27, 2012 2:10 pm |
| Founder |
 |
 |
Joined: Tue Nov 04, 2008 5:07 pm Posts: 2939
|
messiaen wrote: Right, if that's the case then its probably not worth to do this just for a few Gameshark codes. I'll correct the NOP method in my tool, so future ROM hacks won't have this problem.
Another way to fix Star Road/Carnival/Super Mario 74 (a major hack which probably also has this problem) without resorting to a hex editor is to use/force this cheat code:
8124BBD4 0000 8124BBD6 0000
It simply nops the offending instruction. It has to be activated during the title screen before its executed because of possible dynarec issues.
Edit: just looked quickly at mupen source code, indeed it checks for operations to r0 on all opcodes (but yeah, speed is not an issue nowadays on PCs). I converted/tested your cheat (works perfectly), also I enabled by default =1. R0 write fix,=1,8124BBD4-0000,8124BBD4-0000,
I'll upload the debug PC version of Daedalus i one sec.
_________________

<Salvy>WTF Kirby is invisible on latest rev?! <Dougamer>Hmmm <Dougamer>I'll "aquire" kirby and check... 20 minutes later... <Salvy>Kirby looks ok on default settings Dougamer? <Dougamer>still... "aquiring" it Salvy...
|
|
|
|
 |
|
messiaen
|
Post subject: Re: Super Mario 64 Star Road, Christmas Carnival & Missing S  Posted: Fri Jan 27, 2012 7:27 pm |
| Mime |
 |
Joined: Mon Jul 06, 2009 7:58 am Posts: 9
|
|
I generally use NEMU's debugger to find what I want. If its an ASM hack, I use Renegade64 to quickly assemble it. Renegade is a bit old but supports .ORG and labels, so its suitable for simpler things.
Also, I tried the version of Daedalus you sent me, but it didn't run "The Missing Stars".
|
|
|
|
 |
|
Salv-E
|
Post subject: Re: Super Mario 64 Star Road, Christmas Carnival & Missing S  Posted: Fri Jan 27, 2012 8:33 pm |
| Founder |
 |
 |
Joined: Tue Nov 04, 2008 5:07 pm Posts: 2939
|
messiaen wrote: I generally use NEMU's debugger to find what I want. If its an ASM hack, I use Renegade64 to quickly assemble it. Renegade is a bit old but supports .ORG and labels, so its suitable for simpler things.
Also, I tried the version of Daedalus you sent me, but it didn't run "The Missing Stars". Ahh NEMU, haven't heard that name in a long time. Thnx I'll take a look at it. You need to add TMS to roms.ini, just open it and add these entries to it (Afterwards it booted for me): {76d1fe61f9bb05ea-45} Name=Super Mario 64 - The Missing Stars v2 Comment= Info= Preview=Super_Mario_64_The_Missing_Stars.png SaveType=Eeprom4k
{88aefe21241410a4-45} Name=Super Mario 64 - The Missing Stars Comment= Info= Preview=Super_Mario_64_The_Missing_Stars.png SaveType=Eeprom4k
_________________

<Salvy>WTF Kirby is invisible on latest rev?! <Dougamer>Hmmm <Dougamer>I'll "aquire" kirby and check... 20 minutes later... <Salvy>Kirby looks ok on default settings Dougamer? <Dougamer>still... "aquiring" it Salvy...
|
|
|
|
 |
|
|
 |
|
 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|