News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Concern with hexadecimal addresses on Megadrive (retroachievements)  (Read 3468 times)

Thundard

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
(I use google translator. Sorry if I do not understand.)

Hello
I do not know if I'm allowed to talk about this on the forum.
I am an amateur developer achievements on Retroachievements.org
So far, I have developed on NES. I use "Ram Search" to find the values to defer on "Memory Inspector", a program supplied with emulators Retroachievements.
I never had any problems with the NES. Now I have to create achievements for Megadrive game but the addresses do not coincide.
I have a screenshot to explain my problem.



If the address "Ram Watch (00FFFE13)" is equal to "Memory Inspector (0xFE13)"
what is the address "Memory Inspector" if "Ram Watch (00A01FF6)"?

Is not 0x1FF6 :(



Thanks for help :)
« Last Edit: February 14, 2015, 11:28:22 am by Thundard »

mz

  • Sr. Member
  • ****
  • Posts: 447
  • Whore
    • View Profile
Re: Concern with hexadecimal addresses on Megadrive (retroachievements)
« Reply #1 on: February 14, 2015, 12:20:30 pm »
So... Why the hell do you assume that 0xFFFE13 means 0xFE13? 0xFFFE13 should mean 0xFFFE13.

And according to this:

 000000-3FFFFFh : ROM
 400000-7FFFFFh : Unused (1)
 800000-9FFFFFh : Unused (2)
 A00000-A0FFFFh : Z80 address space (3)
 A10000-A1001Fh : I/O
 A10020-BFFFFFh : Internal registers and expansion (4)
 C00000-DFFFFFh : VDP (5)
 E00000-FFFFFFh : RAM (6)

0xFE13 is part of the ROM space, not RAM.
There has to be a better life.

Thundard

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: Concern with hexadecimal addresses on Megadrive (retroachievements)
« Reply #2 on: February 14, 2015, 12:25:32 pm »
In fact, 0xFFFE13 on Ram Search is 0xFE13 on Memory Inspector  :-\
And 00A01FF6... I don't know  :-\

mz

  • Sr. Member
  • ****
  • Posts: 447
  • Whore
    • View Profile
Re: Concern with hexadecimal addresses on Megadrive (retroachievements)
« Reply #3 on: February 14, 2015, 12:27:06 pm »
Now I see that Memory Inspector is a separate program. I don't know why you're using it, and Retroachievements doesn't even display correctly in Firefox for me to bother to look for it. But... It only shows 0xFFFF memory addresses, which means it's probably not meant for the Genesis.

If you want to inspect the RAM of the Genesis, use a Genesis emulator with debugging tools.
There has to be a better life.

henke37

  • Hero Member
  • *****
  • Posts: 643
    • View Profile
Re: Concern with hexadecimal addresses on Megadrive (retroachievements)
« Reply #4 on: February 14, 2015, 12:38:03 pm »
Never attempt to debug an emulated system without the cooperation of the emulator itself, you are doomed to get confused by the emulation. See if you can find an emulator with something like a gdb stub. Heck, write your own stub if you really want it, the gdb protocol is rather simple.

Thundard

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: Concern with hexadecimal addresses on Megadrive (retroachievements)
« Reply #5 on: February 14, 2015, 12:50:39 pm »
If this is not understood, I can make you a video ^^

00FFFE13 (as 0xFE13), this is the address of the stages on the game "El Viento".

At the first level, the value is 00FFFE13 = 01
At the second level 00FFFE13 = 02
etc ...

If I inspect the hexadecimal values with Memory Inspector (Required when creating achievements)
At the first level, the value is 0xFE13 = 01
At the second level 0xFE13 = 02
etc ...

00A01FF6 is the address of the victory music when fighting a boss. The values are 0000 when the boss is alive, and 9570 when the boss is dead.

So if I want to make an achievement when I kill the boss of Level 2 (for example), I have to do:

0xFE13=02 + ?x????=9570

If I find the ?x????, I won ^_^

mz

  • Sr. Member
  • ****
  • Posts: 447
  • Whore
    • View Profile
Re: Concern with hexadecimal addresses on Megadrive (retroachievements)
« Reply #6 on: February 14, 2015, 02:43:46 pm »
If you read the memory map I put earlier, you can see that 0xA01FF6 is in the Z80 address space. So, if that program can't read that address, you should search for a better indicator of the status of bosses in the main RAM. Probably the HP of the bosses when they reach 0 is a better indicator.
There has to be a better life.

Thundard

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: Concern with hexadecimal addresses on Megadrive (retroachievements)
« Reply #7 on: February 14, 2015, 04:28:10 pm »
Probably the HP of the bosses when they reach 0 is a better indicator.

Good idea ^^ But, the first boss got 3 transformations... with the same energy bar  :banghead:

There is a video with a example + my problem.

https://www.youtube.com/watch?v=8ww8UXPpv20

Dr. Floppy

  • Restricted Access
  • Hero Member
  • *
  • Posts: 970
  • Make America GREAT Again!
    • View Profile
    • BaddestHacks.net
Re: Concern with hexadecimal addresses on Megadrive (retroachievements)
« Reply #8 on: February 14, 2015, 06:20:38 pm »
It looks like that Memory Inspector is using FF in $FFFE13 as a way of saying "fixed bank".

This leads me to suspect that A0 is an indicator of the swappable bank containing your relevant $11F6.

What are the typical sizes of swappable banks on Megadrive games?

Malias

  • Sr. Member
  • ****
  • Posts: 303
    • View Profile
Re: Concern with hexadecimal addresses on Megadrive (retroachievements)
« Reply #9 on: February 14, 2015, 09:17:13 pm »
Mega Drive games (with one exception) don't use bank swapping.  All of the rom is addressable at once.  mz's memory map is correct:  FFFE13 is ram and A01FF6 is the z80.  Considering that it was common practice to use the z80 to run the music, it's not too surprising.

With that in mind, I'd suggest finding some other method for determing when a boss is dead.  Lots of stuff happens (internally) when you defeat a boss;  It's just a matter of finding something that you can detect and use.
The great achievement is to lose one's reason for no reason, and to let my lady know that if I can do this without cause, what should I do if there were cause?
     ~Don Quixote~

Thundard

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: Concern with hexadecimal addresses on Megadrive (retroachievements)
« Reply #10 on: February 15, 2015, 06:13:48 pm »
FFFE13 is ram and A01FF6 is the z80.

Aaaah Ok!!  ;D I will ask the admin of retroachievements if we can use the addresses from the Z80. Otherwise ... I'd find something else.

With that in mind, I'd suggest finding some other method for determing when a boss is dead.  Lots of stuff happens (internally) when you defeat a boss;  It's just a matter of finding something that you can detect and use.

Yes. I found the life bar bosses. She walked down two units at each hit. That's why I had not found before. I was doing a search for "Equal to change = 1"  ::)

Thank you all for your help.