1

Hello
I stopped C developing because as I knew how to do some things in C but there was always one problem that annoyed me a lot, I stopped developing on the Neo in C and instead switched to 68k assembly language. But, here's my problem: my program works perfectly fine with an original MVS BIOS, but when I try it with an AES BIOS or an Unibios, then I just get a black screen and MAME debug option shows that it does some stuff then loop over this:

C116D0 | cmpm.w (a0)+, (a1)+
C116D2 | bne $C116DA
C116D4 | cmpa.l a1, a2
C116D6 | bne $c116d0

If someone has a clue on what happens here (@blastar ?) it would help me a lot.
avatar

2

hmm, I don't know the problem (yet)... a loop in the BIOS itself that checks something... and that infinitely. maybe it's some kind of validity/work check that fails because of a strange memory configuration?
you're certainly using your own entry in the XML file?

3

I don't know a thing about 68k assembly and even less on NeoGeo but maybe it's a uninitialized variable that causes some trouble?
avatar"If you see strict DRM and copy protection that threatens the preservation of history, fight it: copy the work, keep it safe, and eventually share it so it never disappears. [...] no one living 500 years from now will judge your infringing deeds harshly when they can load up an ancient program and see it for themselves."

Benj Edwards - Why History Needs Software Piracy

- - -
Achat ou échange: topic de mes recherches

4

blastar (./2) :
hmm, I don't know the problem (yet)... a loop in the BIOS itself that checks something... and that infinitely. maybe it's some kind of validity/work check that fails because of a strange memory configuration?
you're certainly using your own entry in the XML file?
No, I use Super Sidekicks in MAME. One weird thing is that even the simple Hello world program from wiki.neogeodev.org has the same problem, and that both programs work on MVS
avatar

5

Maybe you can find some information here : http://www.ajworld.net/neogeodev/beginner/

6

Thanks for the link! Lots of useful info and I didn't know about it
avatar

7

Hi

Assuming a0 and a1, two address registers, are pointing to two memory sections,
the code seems to try to compare the content and the address location....

C116D0 | cmpm.w (a0)+, (a1)+ ... compare the word (cmpm.w) pointed by a0 and a1, set flags and post increment a0 and a1
C116D2 | bne $C116DA ... branch if not equal to instruction at $C116DA ... what ever follow
C116D4 | cmpa.l a1, a2 ... if equal the compare both addresses (address are long i.e. .l), set the flags
C116D6 | bne $c116d0 .... if not equal them loop back to $c116D0 to further compare the loop
C116DA | ... what ever follow here

So it seems this loop is trying to compare the content of two data section pointed by a0 and a1, and also their address location.
Could this piece of code be used by some sort of verification for security, usually one compare the address content but here
there is also some comparison for address location too ...

Hope this helps

Brahim :: Singapore
avatar

8

I'm not great with asm yet, but we don't know what a1 and a2 are pointed to do we? I think we can assume that a1 is pointing to a different place than a2 and that this code is looking for comparison.

It is fair to say that a1 is the cart and a2 is the system. A security verification makes sense.

Can you comment out these lines to see what happens?
avatar

9

I recommend to start from the source of 'aj/freem (e.g. ADPCM-A and ADPCM-B test thing)' or to use it as a base, it is well commented and a good start for your own code, it also made it easier for me to get back into development after a few years.
to learn the basics for ASM 'MarkeyJester's Motorola 68000 Beginner's Tutorial' is a good start.

10

I also read the tutorial from MarkeyJester. You might write a program in C and then rewrite some of the functions in asm. That's what I have been doing. I rewrote my collision detection code in asm and learned a lot from it.
avatar

11

Here is disassembly code of KOF '94 taken through internal disassember of MAME debugger. It's need to find an IDs of punch/kick swing and hit SFX samples according to weak, medium and strong attack types (and IDs of hitmark sprites according to this attack types and pallettes for this sprites also) in this pieces of code. Would anybody able to help me with it?

tromb Fichier joint : KOF '94 disassembly.zip
avatar

12

I marked all the addressations to $10FD96 (P1_CURRENT), $10FD97 (P1_CHANGE), $10FD9C (P2_CURRENT), $10FD9D (P2_CHANGE) I found with a comments (search this comments by "P1_CUR", "P1_CHNG", "P2_CUR", "P2_CHNG" text) in the KOF '94 disassembly. It's necessary to understand now, what in-game processes the pieces of code following after commented commands are responsible for.

tromb Fichier joint : KOF '94 disassembly (commented).zip
avatar