MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Pages: 1

peter ferrie
MAME Fan
Reged: 10/06/10
Posts: 46
Send PM


Gundam Wing: Endless Duel
#332077 - 09/20/14 12:10 AM


I had a quick look at this today, based on the SVN comment from David Haywood that the decryption is done but it still doesn't start.

It still doesn't start because the entrypoint value is wrong. Right now, it's pointing in the middle of an instruction, like this:

BRK #$20
MVP $22, $CF
ROL $A3

which makes no sense at all. However, if we shift that by just one byte, we get a more meaningful disassembly:

LDY #$00
JSR $CF44

That aside, the interrupt handler looks like this:

LDX $12
JSR ($8875,X)

but the first 32 pages are full of #$55, so ($8875,55) points right into code, because there are only 12 entries in the table.
It also appears that there's a REP #$20 that should be active but isn't, because of this:

A326: LDA #$FC
A328: ORA ($85,X)
A32A: JSR $20E2
A32D: LDA #$E0

makes much more sense like this:

A326: LDA #$01FC
A329: STA $20
A32B: SEP #$20
A32D: LDA #$E0

especially because $20xx is full of #$A0. The code is interspersed with #$00 which look like they're supposed to the high byte for constant loads.
The disassembler doesn't seem to notice when REP #$20 is active, which complicates things a bit.



Master O
Yes, Even Parodius Music
Reged: 11/20/06
Posts: 1332
Send PM


Re: Gundam Wing: Endless Duel new [Re: peter ferrie]
#332107 - 09/20/14 07:40 PM


> I had a quick look at this today, based on the SVN comment from David Haywood that
> the decryption is done but it still doesn't start.
>
> It still doesn't start because the entrypoint value is wrong. Right now, it's
> pointing in the middle of an instruction, like this:
>
> BRK #$20
> MVP $22, $CF
> ROL $A3
>
> which makes no sense at all. However, if we shift that by just one byte, we get a
> more meaningful disassembly:
>
> LDY #$00
> JSR $CF44
>
> That aside, the interrupt handler looks like this:
>
> LDX $12
> JSR ($8875,X)
>
> but the first 32 pages are full of #$55, so ($8875,55) points right into code,
> because there are only 12 entries in the table.
> It also appears that there's a REP #$20 that should be active but isn't, because of
> this:
>
> A326: LDA #$FC
> A328: ORA ($85,X)
> A32A: JSR $20E2
> A32D: LDA #$E0
>
> makes much more sense like this:
>
> A326: LDA #$01FC
> A329: STA $20
> A32B: SEP #$20
> A32D: LDA #$E0
>
> especially because $20xx is full of #$A0. The code is interspersed with #$00 which
> look like they're supposed to the high byte for constant loads.
> The disassembler doesn't seem to notice when REP #$20 is active, which complicates
> things a bit.

Why not just go to git.redump.net/mame, download the source code, edit the appropriate spot where that code goes, and commit it to source, then?

You can use git to do that.



"Note to Noobs:

We are glad to help you but simply posting that something does not work is not going to lead to you getting help. The more information you can supply defining your problem, the less likely it will be that you will get smart-alec replies.

C.D.~"



AWJ
Reged: 03/08/05
Posts: 936
Loc: Ottawa, Ontario
Send PM


Re: Gundam Wing: Endless Duel new [Re: peter ferrie]
#332115 - 09/20/14 09:51 PM


Our disassembler isn't so good at handling architectures like 65816 where the instruction encoding is dynamic and constantly changes. I highly recommend hax65816 by Neill Corlett for disassembling 65816 software.



peter ferrie
MAME Fan
Reged: 10/06/10
Posts: 46
Send PM


Re: Gundam Wing: Endless Duel new [Re: Master O]
#332117 - 09/21/14 01:19 AM


> Why not just go to git.redump.net/mame, download the source code, edit the
> appropriate spot where that code goes, and commit it to source, then?
>
> You can use git to do that.

What spot where what code goes?
The entrypoint? I have no idea what is the correct value. I am merely pointing out that the current one is wrong, and offering a suggestion for what might be correct.
The first 32 pages of #$55s? I have no idea what is supposed to be there.
The REP #$20? I doubt that the hardware will magically configure itself differently for different games. If the REP is not active for other games, then it won't be active for this one, either. Something else needs to run and set it.
This is not something that I can fix and test. I can merely contribute to the investigation.



peter ferrie
MAME Fan
Reged: 10/06/10
Posts: 46
Send PM


Re: Gundam Wing: Endless Duel new [Re: AWJ]
#332122 - 09/21/14 04:28 AM


> Our disassembler isn't so good at handling architectures like 65816 where the
> instruction encoding is dynamic and constantly changes.

Yes, I understand that. It can't be done statically because the REP might far from the current function, and it can't be done dynamically because the code being disassembled might follow a SEP.
I didn't intend to suggest that it's any kind of bug, just a source of difficulty.



peter ferrie
MAME Fan
Reged: 10/06/10
Posts: 46
Send PM


Re: Gundam Wing: Endless Duel new [Re: peter ferrie]
#332146 - 09/22/14 12:39 AM


And a deeper investigation shows that the only place where there is a switch from emulation to native mode occurs at $8000, but that code also jumps to $fe72 where there is no defined content. That might call into question if the ROM is dumped fully.
Definitely not something that I can fix.



Sune
Connected
Reged: 09/21/03
Posts: 5648
Loc: Lagoa Santa, Brasil
Send PM


Re: Gundam Wing: Endless Duel new [Re: Master O]
#332160 - 09/22/14 03:11 PM


> Why not just go to git.redump.net/mame, download the source code, edit the
> appropriate spot where that code goes, and commit it to source, then?

He can't do that because it's code from the game.

Here's a "smart-alec" reply. Note to noobs: Maybe it's time to revise your signature.

S



Master O
Yes, Even Parodius Music
Reged: 11/20/06
Posts: 1332
Send PM


Re: Gundam Wing: Endless Duel new [Re: Sune]
#332179 - 09/22/14 11:37 PM


> > Why not just go to git.redump.net/mame, download the source code, edit the
> > appropriate spot where that code goes, and commit it to source, then?
>
> He can't do that because it's code from the game.
>
> Here's a "smart-alec" reply. Note to noobs: Maybe it's time to revise your signature.
>
> S

Well, given how technical his answer was, I thought he had programming ability, which is why I said maybe he should do that. *shrugs*

Also, my sig is for people who can't get mame to run properly, but then don't give any further info about what they did to get in that position. At the same they expect an answer from the general community.



"Note to Noobs:

We are glad to help you but simply posting that something does not work is not going to lead to you getting help. The more information you can supply defining your problem, the less likely it will be that you will get smart-alec replies.

C.D.~"



Master O
Yes, Even Parodius Music
Reged: 11/20/06
Posts: 1332
Send PM


Re: Gundam Wing: Endless Duel new [Re: peter ferrie]
#332330 - 09/26/14 06:02 AM


> I had a quick look at this today, based on the SVN comment from David Haywood that
> the decryption is done but it still doesn't start.
>
> It still doesn't start because the entrypoint value is wrong...


Quote:


http://git.redump.net/mame/commit/?id=3c701640ae7b603211b15bf12a4212b87c9015d7

Gundam Wing: Endless Duel updates: [Peter Ferrie]
* added additional shared memory block
* added protection handlers
* corrected reset vector
* worked around bad startup Game now boots but doesn't coin up.







"Note to Noobs:

We are glad to help you but simply posting that something does not work is not going to lead to you getting help. The more information you can supply defining your problem, the less likely it will be that you will get smart-alec replies.

C.D.~"



Anonymous
Unregistered
Send PM


Re: Gundam Wing: Endless Duel new [Re: Master O]
#332336 - 09/26/14 12:30 PM


> Well, given how technical his answer was, I thought he had programming ability, which
> is why I said maybe he should do that. *shrugs*

You assumed that he could fix it, but didn't have the skill to know that he could check out the code and submit a fix. You have a rather distorted view on emulation software development.



peter ferrie
MAME Fan
Reged: 10/06/10
Posts: 46
Send PM


Re: Gundam Wing: Endless Duel new [Re: Master O]
#332345 - 09/26/14 05:30 PM


Yes, it turns out that I just needed the original version for comparison. I could not have made any progress without it.
However, as noted, it doesn't coin up, so I still haven't got it to work.



Master O
Yes, Even Parodius Music
Reged: 11/20/06
Posts: 1332
Send PM


Re: Gundam Wing: Endless Duel new [Re: peter ferrie]
#332380 - 09/27/14 06:53 AM


> Yes, it turns out that I just needed the original version for comparison. I could not
> have made any progress without it.
> However, as noted, it doesn't coin up, so I still haven't got it to work.




Quote:


http://git.redump.net/mame/commit/?id=0ae6bfc42dec7fce6be12d6578d6636460a69003

snesb.c: Add coin/DSW inputs to Gundam Wing, game is now playable. [stephh]





"Note to Noobs:

We are glad to help you but simply posting that something does not work is not going to lead to you getting help. The more information you can supply defining your problem, the less likely it will be that you will get smart-alec replies.

C.D.~"


Pages: 1

MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 230 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 1961