DS-Homebrew / nds-bootstrap

Boot an nds file
https://wiki.ds-homebrew.com/nds-bootstrap/
GNU General Public License v3.0
1.19k stars 75 forks source link

Dragon Quest V (JP) AP Patch freeze at the beginning #1013

Closed Mafu0567 closed 2 years ago

Mafu0567 commented 4 years ago

Your console configuration: Old 3DS XL, Luma3DS 10.2, boot9strap 1.3 TWiLight Menu++ Version: TWiLightMenu 16.10 TWiLight Menu++ Theme: DSi

Expected behaviour

Game should not hang when stepping out on deck at the beginning.

Actual behaviour

Game hangs on said event, need to patch rom manually, delete included AP patch

Steps to reproduce

  1. Start game
  2. Create Save
  3. Read Dialogue until getting to boat
  4. Walk out of the bedroom
  5. Climb stairs
  6. Walk out of door
  7. Walk around deck

Config

bootstrap.ini

DEBUG = 1
LOGGING = 1
CACHE_FAT_TABLE = 0
ROMREAD_LED = 0
DMA_ROMREAD_LED = -1
CONSOLE_MODEL = 2
NDS_PATH = sd:/roms/nds/Dragon Quest V - Tenkuu no Hanayome (Japan).nds
SAV_PATH = sd:/roms/nds/saves/Dragon Quest V - Tenkuu no Hanayome (Japan).sav
AP_FIX_PATH = sd:/_nds/TWiLightMenu/apfix/YV5J-2340.ips
RAM_DRIVE_PATH = sd:/null.img
LANGUAGE = -1
DSI_MODE = 0
BOOST_CPU = 0
BOOST_VRAM = 0
DONOR_SDK_VER = 0
PATCH_MPU_REGION = 0
PATCH_MPU_SIZE = 0
CARDENGINE_CACHED = 1
FORCE_SLEEP_PATCH = 0
EXTENDED_MEMORY = 0
CACHE_BLOCK_SIZE = 0
PRECISE_VOLUME_CONTROL = 0
SOUND_FREQ = 0

Logs

NDSBTSRP.LOG

Module params offset restored: 02000C08
sdk_version: 04027531
This rom is compressed

Switched to NTR mode BIOS
old heap pointer: 02189C60

new heap pointer: 0218B460

Heap Shrink Sucessfull

relocate_ce9
firstCardLocation 02189C60 : 02780000

armReadCardLocation 02189D54 : 02780000

thumbReadCardLocation 02189D70 : 02780000

armReadCardDmaLocation 02189DA0 : 02780000

armReadSlot2Location 02189DC4 : 02780000

armSetDmaCardLocation 02189DF8 : 02780000

thumbReadCardDmaLocation 02189E30 : 02780000

thumbSetDmaCardLocation 02189E50 : 02780000

armReadNandLocation 02189E7C : 02780000

thumbReadNandLocation 02189EA8 : 02780000

armWriteNandLocation 02189ED0 : 02780000

thumbWriteNandLocation 02189EF0 : 02780000

armIrqEnableLocation 02189F20 : 02780000

thumbIrqEnableLocation 02189F40 : 02780000

pdashReadLocation 02189F6C : 02780000

thumbReadSlot2Location 02189F90 : 02780000

ipcSyncHandlerLocation 02189FD0 : 02780000

resetLocation 02189FFC : 02780000

globalCardLocation 0218B32C : 02780000

 ce9->patches 02189C98

patchCardNds

findSwi12Offset:
swi 0x12 call not found

swi12 location : 00000000

cardIrqEnable location : 020862A8

startOffset : 02000000

cardRead location : 0207076C

cardPullOut location : 02070B4C

cardId location : 02070828

patchCardSetDma
cardReadDma location : 02070630

patchMpuSize: 00000000

ERR_NONE

Arm7 (patch vAll)
forwardedRelocStartAddr
023801D0
vAddrOfRelocSrc
023801E8
Relocation src: 023801E8
Relocation dst: 037F8000

JumpTableFunc: 0238BC54
Eeprom read:    0238BC60
Eeprom page write:  0238BC74
Eeprom page prog:   0238BC88
Eeprom verify:  0238BC9C
Eeprom page erase:  0238BCAC
swi12 location : 0238C0A8

swiGetPitchTable location : 02387604

ERR_NONE

hookNdsRetailArm7
hookLocation arm7: 02390810

ERR_NONE
hookLocation arm9: 027E0000

AP-fix found and applied
chipID: 80007FC2

debug: true
ndsPath: "sd:/roms/nds/Dragon Quest V - Tenkuu no Hanayome (Japan).nds"
savPath: "sd:/roms/nds/saves/Dragon Quest V - Tenkuu no Hanayome (Japan).sav"
donorE2Path: ""
donor2Path: ""
donor3Path: ""
donorPath: ""
donorTwlPath: ""
saveSize: 10000
language: FF
dsiMode: 0
donorSdkVer: 0
patchMpuRegion: 0
patchMpuSize: 0
ceCached: true
cacheBlockSize: 4000
extendedMemory: false
consoleModel: 2
colorMode: 0
romRead_LED: 0
dmaRomRead_LED: FFFFFFFF
boostCpu: false
boostVram: false
soundFreq: false
forceSleepPatch: false
logging: true
initDisc: false
gameOnFlashcard: false
saveOnFlashcard: false
backlightMode: 0
RocketRobz commented 4 years ago

See if turning off heap shrink fixes this.

Mafu0567 commented 4 years ago

I changed the word crash to hang, since I can still return to the Home Menu.

It doesn't look like turning off heap shrink fixes the issue. NDSBTSRP.LOG

Mafu0567 commented 4 years ago

So I've tried with both:

Both with heap shrink off, hangs after a couple of steps on the deck. More details:

I also tried playing with a save past the prologue, and it either hangs or shows a black screen when entering a fight.

Hope this helps! nds-bootstrap.zip NDSBTSRP.LOG

RocketRobz commented 4 years ago

What tool did you use to AP-patch the ROM?

Kontrast-JZ commented 3 years ago

Can confirm the same issue with the Japanese release of Dragon Quest 5.

Latest versions of nds-bootstrap and TwilightMenu (as of 2020/12/03) Tried with a clean no-intro dump, both default and with heap shrink disabled. Default settings.

Upon gaining control of the character, if you press L to move the camera, it immediately hangs. Music continues, but the game is locked. If you press R to move the camera, it won't hang immediately but rather will take a longer press, or if you've pushed it once, it will eventually just hang.

Mafu0567 commented 3 years ago

What tool did you use to AP-patch the ROM?

The retrogamefan tool here I think: https://gbatemp.net/download/retrogamefan-nds-rom-tool-v1-0_b1215.35735/ Sorry for the late answer!

Kontrast-JZ commented 3 years ago

A quick update for clarity: Using the RGF Tool, I patched the Dominent release (no-intro version says it doesn't need ap-fix), and deleted the included ap-fix in the TwilightMenu folder. Game runs as intended, no camera hang and I was able to get off the boat just fine. If I had to guess, there's a typo in the YV5J-2340.ips file or the way it's applied. Update: Can confirm that manually applying the ap-fix results in the exact same ips patch, so that rules an ips typo out.

KururinX commented 3 years ago

It seems that the specifications of AP-FIX have changed ... About the bug of Dragon Quest 5 (JP).

1: Intro loop as in # 648

2: Freezes when the L button is pressed, etc.

3: Freeze when saving. Is the save damaged? (From the beginning)

4: Black out when entering battle

Case4's Log

NDSBTSRP.LOG

Kontrast-JZ commented 3 years ago

20.0.1 with newest nds-bootstrap

(before deleting old apfix folder) Now that the apfix is a pack file, the old solution of pre-patching the image and removing the apfix from the folder no longer bypasses the issue. Even when I load the pre-patched game, it reverts back to the non-fixed version upon booting, which is truly strange, like its patching in reverse.

(after deleting the old folder) The display now has a doubling glitch at the bottom of each screen, where the bottom area of the graphics is repeated again about 10 pixels or so above it. Not sure why this even happened. Even if I enable the two patches from the cheat menu (apfix and save fix), it doesn't seem to apply them.

(post script side note, even with this little issue... I really appreciate all these qol changes. Software keeps getting better and better! Thank you guys!)

RocketRobz commented 3 years ago

The doubling glitch is random, and is not caused by nds-bootstrap or TWLMenu++. It's caused by TWL_FIRM, which is the one rendering the screens.

Mafu0567 commented 3 years ago

Yeah, playing this version of the game seems to work best with the flashcart kernel.

RocketRobz commented 2 years ago

A fixed AP-patch is now included in TWLMenu++. Closing.