(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
06-16-24 09:13 PM
0 users currently in SMW Hacking.
Acmlm's Board - I3 Archive - SMW Hacking - SNES assemblery: I cannot read from or write to 7EC100, 7EC101 or 7EC800. Wha? New poll | |
Add to favorites | Next newer thread | Next older thread
User Post
Glyphodon



 





Since: 11-18-05

Last post: 6369 days
Last view: 6349 days
Posted on 05-30-06 10:27 PM Link | Quote
I first wrote something like A9 01 8D 00 C1 in my SMW hack. For those of you less hexadecimally inclined, that's:

LDA #$01
STA 7EC100

I even opened up Geiger's Debugger and put in a write breakpoint for 7EC100. Nothing. I put in an exec. breakpoint for where those two opcodes were, and they popped up quick so I know my code's being read -- it's just not being interpreted.

I tried using 7EC101 and I was similarly screwed. I recalled that I had the same problem when I tried to access 7EC800, which is in the general 7ECxxx area, so I figured I might be having the same problem there.

Am I trying to access RAM I can't, or what? I post it here in SMW hacking first because the problem is in my SMW hack. I don't know if that was such a great idea since this would seem to be a more general SNES processor problem.
Cirvania

Cyball
I guess this is as close as Xkeeper will get to spell it right. :<


 





Since: 11-17-05
From: The Island of Puerto Rico.

Last post: 6330 days
Last view: 6328 days
Posted on 05-30-06 10:35 PM Link | Quote
Hmm.. weird. I actually had the same problem once. I decided to leave that section of RAM alone. But have you tried [A9 01 8F 00 C1 7E]? I know the game reads the 7E bank as default, but it could still work...

Of course, this is coming from a guy with little ASM experience, so meh
C:/xkas bio.asm
Compiled ASM code








Since: 11-17-05

Last post: 6328 days
Last view: 6327 days
Posted on 05-30-06 10:39 PM Link | Quote
I think the problem is because you end up trying to write to ROM because you are using absolute adressing, example your 8D 00 C1 try to write to Snes 00:C100 wich is the ROM, use long adressing mode insted


(edited by Bio on 05-30-06 09:39 PM)
(edited by Bio on 05-30-06 09:42 PM)
Cirvania

Cyball
I guess this is as close as Xkeeper will get to spell it right. :<


 





Since: 11-17-05
From: The Island of Puerto Rico.

Last post: 6330 days
Last view: 6328 days
Posted on 05-30-06 10:43 PM Link | Quote
Um.. That's kinda what I told him, Bio.

Replace 8D(STA abs) with 8F(STA long).
C:/xkas bio.asm
Compiled ASM code








Since: 11-17-05

Last post: 6328 days
Last view: 6327 days
Posted on 05-30-06 10:44 PM Link | Quote
that because you posted while I was making my post
Glyphodon



 





Since: 11-18-05

Last post: 6369 days
Last view: 6349 days
Posted on 05-30-06 11:04 PM Link | Quote
I'd rather not try that unless I were pretty sure that was the problem because I'd have to rewrite much of my reading code to match. It involves putting things in Y and Y only has an absolute mode, not a long one.

I don't think that that'd solve the problem anyway because where my code is now there used to be "A9 04 8D FC 1D". It STA'd 4 into 7E1DFC to make the spin jump sound without incident, which wouldn't be possible if it were writing to ROM, right?


(edited by Glyph Phoenix on 05-30-06 10:05 PM)
C:/xkas bio.asm
Compiled ASM code








Since: 11-17-05

Last post: 6328 days
Last view: 6327 days
Posted on 05-30-06 11:12 PM Link | Quote
please, learn about ROM bank:
Originally posted by BMF98567
Oh, okay, I think I understand now. LoROM banks are easy. In each bank:

$xx0000-$xx1FFF = first 8K of WRAM ($7E0000-$7E1FFF)
$xx2000-$xx7FFF = hardware registers and "reserved" addresses
$xx8000-$xxFFFF = ROM data

ROM data always starts at SNES $xx8000. To calculate LoROM addresses, you start with $008000 at the very beginning of the ROM (PC $000000, no header), and increment the bank by 1 after every $8000 (32K) bytes:

PC $000000-$007FFF = SNES $008000-$00FFFF
PC $008000-$00FFFF = SNES $018000-$01FFFF
PC $010000-$017FFF = SNES $028000-$02FFFF

etc.

I suggest you read this document. It explains SNES memory mapping far better than I ever could.


See, SNES adress XX:0000 to XX:1FFF is 7E0000 to 7E1FFF in RAM, meaning that they are the only one you can acess with absolute adressing


(edited by Bio on 05-30-06 10:14 PM)
(edited by Bio on 05-30-06 10:17 PM)
HyperHacker

Star Mario
Finally being paid to code in VB! If only I still enjoyed that. <_<
Wii #7182 6487 4198 1828


 





Since: 11-18-05
From: Canada, w00t!
My computer's specs, if anyone gives a damn.
STOP TRUNCATING THIS >8^(

Last post: 6328 days
Last view: 6328 days
Posted on 05-30-06 11:14 PM Link | Quote
Originally posted by Glyph Phoenix
I don't think that that'd solve the problem anyway because where my code is now there used to be "A9 04 8D FC 1D". It STA'd 4 into 7E1DFC to make the spin jump sound without incident, which wouldn't be possible if it were writing to ROM, right?

You basically answered your own question. Looking at this memory map, 00:8000-00:FFFF is ROM, and SMW usually has the data bank register (or whatever the hell it's called) at zero, so that certainly does appear to be the problem: You're writing to 00:C100, not 7E:C100. 00:0000-00:1FFF is mapped to 7E:0000-7E:1FFF, which is why the same code works with 7E1DFC.

[edit] Posted at the same time as Bio. That's the second time someone's done that in this thread.


(edited by HyperMackerel on 05-30-06 10:15 PM)
Glyphodon



 





Since: 11-18-05

Last post: 6369 days
Last view: 6349 days
Posted on 05-30-06 11:52 PM Link | Quote
Good to know. I'll just assume that long addressing would fix the problem and thank you guys now because I'm tired.

Edit: Yeah, that worked perfectly. Thanks all.


(edited by Glyph Phoenix on 05-30-06 10:52 PM)
(edited by Glyph Phoenix on 05-30-06 10:53 PM)
(edited by Glyph Phoenix on 05-31-06 02:08 PM)
Add to favorites | Next newer thread | Next older thread
Acmlm's Board - I3 Archive - SMW Hacking - SNES assemblery: I cannot read from or write to 7EC100, 7EC101 or 7EC800. Wha? |


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.041 seconds; used 392.70 kB (max 483.91 kB)