Skip to content
This repository was archived by the owner on Jun 2, 2024. It is now read-only.

Console Specific Tips es

eldexterr edited this page May 22, 2019 · 5 revisions

Cuando escavamos en memoria en estas viejas consolas ayuda saber que los creadores originales de estos juegos trabajaron en ellos alguna vez. Si te familiarizas bien en la manera en la que trabaja tu consola favorita entonces hacer un set va a resultar mas sencillo y preciso.

NES (RANes)

Duplicado de Direcciones

nes_mem_mirror

Cuando utilices el inspector de memoria para encontrar variables en juegos de NES, va a ver 4 copias de todo lo que encuentres. Si te estas preguntando "cual debería de utilizar?" o "deberia probar cada una de ellas?" no es tan complicado como parece.

Esta es una característica que el NES le da a los desarrolladores para encontrar mas maneras para buscar en memoria. Porque el NES en si solo tiene 2KB de RAM, el primer resultado (el que va abajo de 0x800) tiene que ser usado para consistencia, y aplicar condiciones adicionales en los otros realmente no hace nada.

Esto también aplica para RPS y tablas clasificatorias también.

Game Boy (RAVBA)

Mapa de Memoria

Algunos rangos de valores significan diferentes cosas en el contexto del hardware del Game Boy, así que tener un mapa de lo que te puede resultar útil puede ayudar a eliminar esos valores que no sirven. Así es como se desplaya:

  • 0x0000 - 0x7FFF: Información del ROM (No hay razón para utilizarlo. Esta área contiene información del header que solamente la leen algunos emuladores.)
  • 0x8000 - 0x9FFF: Información de Gráficos (Algunas veces algunas cosas tal vez tengan sentido si lo que estas buscando es el ID de mapa o animación , pero siempre va a ver otras maneras mejores de hacer las cosas así intenta evitar el uso de cualquiera de estas)
  • ✔️ 0xA000 - 0xBFFF: RAM del Cartucho (Ej. archivos de guardado. Algunas veces utilizar estas direcciones puede ser inevitable porque entonces tu set seria vulnerable a trampas cargando archivos de guardado de 100%. Mas información de como proteger tus logros contra archivos de guardado mas adelante)
  • ✔️ 0xC000 - 0xDFFF: RAM de trabajo (Aquí esta la bueno; casi todo lo que necesitas se encuentra en este rango)
  • 0xE000 - 0xFDFF: ECHO RAM (No la utilices, mira mas abajo)
  • 0xFE00 - 0xFE9F: Mas Información de Gráficos (lo mismo que información de gráficos de arriba)
  • 0xFEA0 - 0xFFFF: Variado (No lo utilices)

Para mas información mira: http://gameboy.mongenel.com/dmg/asmmemmap.html

ECHO RAM

gb_echo_ram

Similar que el NES, algunas variables tal vez se muestren mas de una vez cuando te encuentres buscando en el inspector de memoria. El segundo resultado es lo que se le conoce como ECHO RAM, que es un espejo de la memoria actual. Aunque algunos emuladores tienden a ignorar esta área o a emularla incorrectamente, se recomienda NO utilizarla para nada y siempre utilizar el primer resultado.

El Game Boy tiene 8KB de RAM empezando en 0xC000. La ECHO RAM empieza en 0xE000, asi que si tus direcciones empiezan con una E vas a tener que remplazar el primer carácter que no tenga un cero con una C. Recuerda: C es lo correcto, E es la echo!

GBC

En el GBC, los 4KB de memoria de 0xD000-0xDFFF son un banco para un bloque de memoria mas grande de 32kb que no es directamente accesible por el procesador. Los Bits 0-2 de 0xFF70 indican cual banco esta cargado en el bloque de memoria 0xD000-0xDFFF. Es una "función" utilizada para expandir el almacenamiento de los ROMs del GBC mientras aun se tiene el soporte para ROMs del GB original.

Cambiar de Banco (cambiar el valor de 0xFF70) provoca que la memoria en el rango 0xD000-0xDFFF se actualice. Esto aparece como un flickering/parpadeando en el Visor de Memoria y provoca que la búsqueda de memoria sea mas complicada. Si estas escribiendo condiciones dependiendo de la memoria que se encuentra en ese bloque, también vas a requerir que 0xFF70 tenga un valor en especifico para asegurarte que estas utilizando el banco correcto. Los 4KB de memoria de 0xC000-0xCFFF no se cambian como el banco y pueden ser utilizados sin preocupaciones sin condiciones adicionales.

It is not advisable to use these addresses for achievements if there is any alternative to doing so. As of January 2018, RALibretro will only display bank 0x00 at 0xFF70. RetroArch has fluctuating memory banks, but the various addresses do not function in the same manner as RAVisualBoyAdvance. At least until RetroArch receives a memory inspector, achievements using addresses from 0xD000-0xDFFF will only work within RAVisualBoyAdvance.

GB/GBC BIOS

RALibRetro and RetroArch support the GB/GBC BIOS, which shows the "Nintendo" and "GameBoy" logo before starting the game. This provides approximately four seconds where the main memory ($C000-$DFFF) hasn't been initialized and can't be trusted, and may cause achievements to trigger while loading the game for a subset of users who have the BIOS enabled.

To enable this feature, put the bios file (named gb_bios.bin or gbc_bios.bin) into the system directory of either RALibRetro or RetroArch. When you start the game, you will see the "Nintendo" and "GameBoy" logos before proceeding into the actual game.

If this is causing you problems, you may need to add logic to prevent the achievements from triggering while the BIOS is executing, but it would be preferable to use in-game logic if possible (i.e. a specific screen is being displayed).

The BIOS code is loaded from $0000-$00FF, so identify some chunk of that memory that's unique while the BIOS is running and ignore it. For example, the last four bytes of the GBC BIOS block are 3E 11 E0 50, so you could add this condition to the achievement to prevent it from triggering while the BIOS is running.

32-bit 0x00FC != 0x50E0113E

After the BIOS completes, the block is blanked out with FF's, and repurposed for interrupt vectors. For more detail, see A Look at the GameBoy bootstrap.

NOTE: The last four bytes of the GB BIOS are 3E 01 E0 50. So the GB condition would be:

32-bit 0x00FC != 0x50E0013E

Nintendo 64 (RAP64)

Using GameShark Codes for Addresses

GameShark codes can be a valuable resource for finding addresses you can't or don't feel like finding. They have 12 characters per line and are fairly easy to parse.

[AA][BBBBBB] [CCCC]

[AA] is the codetype. This is a short instruction to the GameShark that defines what to do with the next value. If you understand what the GameShark code does you can use it to help with condition-making.

  • 80, 88: The address is 8-bit. Sets the value [00CC] to the address [BBBBBB].
  • 81, 89: The address is 16-bit. Sets the value [CCCC] to the address [BBBBBB].
  • D0: The address is 8-bit. Checks if [00CC] is equal to the value at address [BBBBBB] then executes the next line if it is.
  • D2: The address is 8-bit. Checks if [00CC] is DIFFERENT to the value at address [BBBBBB] then executes the next line if it is.
  • D1: The address is 16-bit. Checks if [CCCC] is equal to the value at address [BBBBBB] then executes the next line if it is.
  • D3: The address is 16-bit. Checks if [CCCC] is DIFFERENT to the value at address [BBBBBB] then executes the next line if it is.

Here are some examples:

  • Paper Mario: Infinite HP:

[80][10F292] [0032]

Sets the 8-bit value at 0x10F292 to 0x32 (50). So this means Mario's HP is an 8-bit value at 0x10F292.

  • Donkey Kong 64: Play as Rambi:

[80][74E77C] [0006]

Sets the 8-bit value at 0x74E77C to 6. So this means the character you're playing as is an 8-bit value at 0x74E77C.

  • Chameleon Twist 2: Hold L to Moon Jump:

[D0][18BAB5] [0020] <- Looking at this one

[81][18B9E0] [4200]

Checks if the 8-bit value at 0x18BAB5 is equal to 0x20. This means 0x18BAB5 contains a button press variable and Bit5 (0x20) corresponds to L.

Anti-GSC and GameHacking are both good resources for finding GameShark codes.

Neo Geo

Mandatory UniBIOS protection

UniBIOS allows several debugging options, and also access the database of individual cheats for every game. Therefore all achievements for Neo Geo need to be protected from abusing it. The simpliest solution here is disallowing UniBIOS usage completely, directly from the level of achievement code.

Fortunately part of UniBIOS data seems to be reflected in two address strings in the RAM: 0x00fe30 and 0x00fe50. While UniBIOS is active 0x00fe30 in 32-bit size seems to always brings the same value (for every Neo Geo game) which is 80025632, and it doesn't seem to change after the ROM was loaded. For any other BIOS, the value is always 0, (except for the moment the RAM is overloaded by the diagnostic program, after the ROM was loaded).

To protect achievements from using UniBIOS all we need to do is to include a simple protection which will reset when 0x00fe30 in 32-bit size is not equal to 0. This additionally, eventually protect the achievement from unlocking during RAM diagnostic process.

Here is how the protection should look alike (selected in the Achievement Editor): unineo1

Here is how the same RAM region looks when other BIOS are used (here MSV): unineo2

Guidelines

General

Achievement Development

WIP


Portugues

Geral

Desenvolvedores


Español

General

Desarrolladores

Clone this wiki locally