+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  NES DTE Code Etc.
Pages: 1 [2]
Author Topic: NES DTE Code Etc.  (Read 1207 times)
creaothceann
Guest
« Reply #15 on: September 25, 2007, 08:57:46 am »

Quote from: Disch on September 24, 2007, 07:42:28 pm
ack... rapidshare

Quote
You have reached the download-limit for free-users. Want to download more?
Get your own Premium-account now! Instant download-access! (Or wait 203 minutes)

No dynamic IPs?
« Last Edit: September 25, 2007, 11:24:32 am by creaothceann »
Nightcrawler
Guest
« Reply #16 on: September 25, 2007, 09:32:25 am »

I think this problem could have been solved in one minute if several lines of a real, full tracelog were posted.. You know, with register values.
Kagemusha
Guest
« Reply #17 on: September 25, 2007, 09:41:49 am »

I thought a posted a response saying how I got my DTE hack to work. Oh well, it turns out that I didn't completely fill out my DTE table which I guess the game was trying to load values that didn't exist. Now that I filled it out everything is working. So hooray for my first ASM hack!
Nightcrawler
Guest
« Reply #18 on: September 25, 2007, 02:27:08 pm »

OK. Good. That's cool. I assume the debugger you were using allows you to view memory right? Just a quick look at the area of RAM (or in the ROM) where your DTE values were being pulled from based on your trace information should be all it takes to solve this. I'm not sure exactly where you went had trouble.
Kagemusha
Guest
« Reply #19 on: September 25, 2007, 07:35:49 pm »

Alright it seems I've jumped the gun a little. From the looks of it the game doesn't load any character following a DTE value. It just kind of skips it and continues on as normal until another DTE value comes along rendering the DTE hack pointless. Anyone want to take a look or have any idea why this is?
Disch
Guest
« Reply #20 on: September 25, 2007, 09:37:35 pm »

I will -- provided you put it somewhere I can download from  ;P
Kagemusha
Guest
« Reply #21 on: September 26, 2007, 03:28:03 pm »

Alrighty, here it is.

http://mijet.eludevisibility.org/stuff/

The DTE table starts at 1FFD7.
Disch
Guest
« Reply #22 on: September 27, 2007, 08:56:51 am »

I didn't see anything immediately wrong with the code.  I'll have to try debugging it later to see what's really going on.  I was looking at the intro where the two dudes are talking to each other -- I stepped through the debugger and it looked like the second character in the DTE table was being loaded just fine.  But with the scrambled text it's hard to tell since I'm not 100% sure what the desired output is (didn't really look at the text itself yet)

One thing I can mention is you should really be using BCS/BCC instead of BPL/BMI for those kind of comparisons (though I doubt this is your problem).  CMP #$1B will come back as negative (N set) if A is 9B or higher.  Your code is also a bit inefficient but that's alright  Grin
Kagemusha
Guest
« Reply #23 on: September 27, 2007, 09:15:54 am »

Damn, I seem to have trouble making things clear.

To better explain it, try entering the DTE value $1B which is RE. RE is loaded fine, but the next hex value is skipped completely. So if you have RE and you put $01(it's A) as the next character, it won't show up instead the next character after A will appear.

So if REAB(let's say B is the third character) is used, only REB will show up. I hope that explains things.
« Last Edit: September 27, 2007, 09:31:30 am by Pennywise »
RedComet
Guest
« Reply #24 on: September 27, 2007, 09:42:19 am »

Sounds like your incrementing your string index one too many times. Step through your code and see how many times the index is being changed.
Firlet
Guest
« Reply #25 on: September 28, 2007, 08:55:27 am »

Quote from: RedComet on September 27, 2007, 09:42:19 am
Sounds like your incrementing your string index one too many times. Step through your code and see how many times the index is being changed.

You get the -star- prize!

Took a peek (aside from getting dusted by MIJET's Undeadline translation - wonder if they'll do the X68 version since they've got ChaChaCha on their minds).

From what the man recalls, the flow went something like..

ex. (LI)NE

Read (LI), DTE caught, Print (L) ; INC $0185 (0->1)
Read N, DTE flag, Print (I) ; INC $0185 (1->2)
Read E, No DTE, Print (E) ; bump $0185 (2->3)

So the DTE routine needs to DEC $0185 somewhere when running the exception (or whatever the LDY addy is). Something like that.
Kagemusha
Guest
« Reply #26 on: September 29, 2007, 12:15:15 pm »

I'm not entirely sure what to do. It looks like I have to modify my DTE code with DEC $?Huh. I think in order to do that I'll need to create some code that will recognize the exception, but I'm not entirely sure what to do as my ASM knowledge is probably below average right now. More importantly am I on the right track with implementing the DEC and if I am, what instructions should I use to implement it?
« Last Edit: September 29, 2007, 04:46:27 pm by Pennywise »
KingMike
Guest
« Reply #27 on: September 29, 2007, 10:46:32 pm »

Yes, you want to use DEC $0185.
It should compensate for the fact that you are using the first script character twice.
Decrement only on one of the two characters in your DTE routine.
Pages: 1 [2]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC