Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
1 user currently in Super Mario World hacking: labmaster | 3 guests
Acmlm's Board - I2 Archive - Super Mario World hacking - Implementing HDMA effects via palette hacks (code included) [ASM] | |
Pages: 1 2Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
blackhole89

LOLSEALS
Moderator of ROM hacking
EmuNET IRC network admin
Head GM of TwilightRO
Level: 47

Posts: 67/971
EXP: 739208
For next: 26995

Since: 03-15-04
From: Dresden/Germany

Since last post: 14 hours
Last activity: 12 hours
Posted on 04-02-04 07:47 PM Link | Quote
@BMF: Now I've got a real problem. I am using HDMA chans #2 and #3 together for background gradients (as described above). #2 works on $2121 and #3 on $2122, so I basically edit the palette.
It looks ok, but is heavily unstable (as described above). If you can help me, I'll mail you the ROM.

GreetZ & thanks in advance,
Blacky.
Atma X

Bandit
Level: 43

Posts: 87/801
EXP: 553639
For next: 11407

Since: 03-16-04
From: Derrière vous!!!

Since last post: 43 days
Last activity: 14 days
Posted on 04-03-04 09:26 PM Link | Quote
HyperHacker: I'm not really familliar with ASM or HDMA, so I was wondering (from your opinion) if this page I found is a good place (a good explination of how to hack HDMA) for me to get started with HDMA hacking. http://www.emulatronia.com/doctec/consolas/snes/dma.txt
blackhole89

LOLSEALS
Moderator of ROM hacking
EmuNET IRC network admin
Head GM of TwilightRO
Level: 47

Posts: 71/971
EXP: 739208
For next: 26995

Since: 03-15-04
From: Dresden/Germany

Since last post: 14 hours
Last activity: 12 hours
Posted on 04-03-04 10:20 PM Link | Quote
It's quite good (used this one too), but this one's even better:
http://www.geocities.com/Qwertie256/attic/snesemu/qsnesdoc.html#DMATransfers
Can be also used as a reference.
As for assembly, I recommend you to google around a bit.

GreetZ
Blacky.
Atma X

Bandit
Level: 43

Posts: 88/801
EXP: 553639
For next: 11407

Since: 03-16-04
From: Derrière vous!!!

Since last post: 43 days
Last activity: 14 days
Posted on 04-03-04 11:04 PM Link | Quote
So does HDMA hacking actually require any knowledge of ASM? If not, is there a program that can be used to help me to edit it.
knuck

Hinox
Banned until 19-58-5815: trolling, flaming, spamming, being a general fucktard...
Level: 62

Posts: 187/1818
EXP: 1894574
For next: 90112

Since: 03-15-04

Since last post: 14 hours
Last activity: 9 hours
Posted on 04-03-04 11:10 PM Link | Quote
Atma X:
Originally posted by BMF54123
WARNING: This is only for people who are experienced with ASM. It involves directly modifying game code and utilizing palette hacks.


READ before you POST.
blackhole89

LOLSEALS
Moderator of ROM hacking
EmuNET IRC network admin
Head GM of TwilightRO
Level: 47

Posts: 73/971
EXP: 739208
For next: 26995

Since: 03-15-04
From: Dresden/Germany

Since last post: 14 hours
Last activity: 12 hours
Posted on 04-03-04 11:11 PM Link | Quote
There are two ways in general.

(1) assembly.
(2) the SNES9x cheat function (think ZSNES has kind of this too)

means, you won't come around asm when you wanna insert it in your hack. (2) can be used for some little experiments. If you wanna try, I'd post a list with about 15 game genie codes to be used at once.
Atma X

Bandit
Level: 43

Posts: 98/801
EXP: 553639
For next: 11407

Since: 03-16-04
From: Derrière vous!!!

Since last post: 43 days
Last activity: 14 days
Posted on 04-08-04 04:21 AM Link | Quote
Thanks Blackhole89, yes, please do post those.

And also, can you tell me how hard it would be to make the HDMA Effect from the last bosses room in Act Raiser (the Background moving effect, it's the space looking BG)?
I could send you a savestate that is at that part if you're not sure which BG and HDMA effect that I'm talking about.


(edited by Atma X on 04-07-04 09:59 PM)
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 318/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 04-08-04 06:21 AM Link | Quote
I did?
Read the first post. You have to import the hdmamain.bin file.
Atma X

Bandit
Level: 43

Posts: 99/801
EXP: 553639
For next: 11407

Since: 03-16-04
From: Derrière vous!!!

Since last post: 43 days
Last activity: 14 days
Posted on 04-08-04 06:58 AM Link | Quote
Oh, you're right you didn't. You quoted on Blackhole89's question and I just wasn't looking at it right. Sorry about that.

Edit: Where's BMF's "Palette-Based ASM System", I couldn't find a link for it.


(edited by Atma X on 04-07-04 09:58 PM)
(edited by Atma X on 04-07-04 11:47 PM)
ExKay
Somebody set up us the bomb!
Level: 50

Posts: 53/1114
EXP: 908268
For next: 39049

Since: 03-15-04
From: Hannover, Germany

Since last post: 14 hours
Last activity: 1 hour
Posted on 04-08-04 03:26 PM Link | Quote
Here is it:Palette ASM


(edited by Hidden Mario on 04-08-04 06:27 AM)
mikepjr

Ninji
Level: 26

Posts: 57/242
EXP: 92006
For next: 10269

Since: 03-15-04
From: houston texas

Since last post: 4 days
Last activity: 1 hour
Posted on 04-08-04 08:35 PM Link | Quote
God i would love to be able to do this kind of stuff its sooooo panm cool.
BMF98567
BLACK HAS BUILT A SILLY DICE-MAZE!
GO!

Current list of BURNING FURY >8( recipients:
- Yiffy Kitten (x2)
- Xkeeper
Level: 53

Posts: 115/1261
EXP: 1094149
For next: 62970

Since: 03-15-04
From: Blobaria
Special Move: Rising Meatloaf Backhand Combo

Since last post: 21 hours
Last activity: 1 hour
Posted on 04-09-04 02:07 PM Link | Quote
Just a quick little update: I've decided to rewrite my HDMA-handling system from scratch, due to stupid limitations and a couple of bugs blackhole89 brought up. The new version will be able to handle multiple HDMA channels, and you'll have full control over which register each channel writes to, and what write method is used (the current version forces mode 02). If all goes as planned, it should be available before next week.
blackhole89

LOLSEALS
Moderator of ROM hacking
EmuNET IRC network admin
Head GM of TwilightRO
Level: 47

Posts: 88/971
EXP: 739208
For next: 26995

Since: 03-15-04
From: Dresden/Germany

Since last post: 14 hours
Last activity: 12 hours
Posted on 04-09-04 02:33 PM Link | Quote
At last.
I think the old version's capital error was that it was hooked on that 7F8000 call, wasn't it?
BMF98567
BLACK HAS BUILT A SILLY DICE-MAZE!
GO!

Current list of BURNING FURY >8( recipients:
- Yiffy Kitten (x2)
- Xkeeper
Level: 53

Posts: 116/1261
EXP: 1094149
For next: 62970

Since: 03-15-04
From: Blobaria
Special Move: Rising Meatloaf Backhand Combo

Since last post: 21 hours
Last activity: 1 hour
Posted on 04-09-04 02:40 PM Link | Quote
I really don't think that was the main problem with it...as we both know, it just clears the area of RAM reserved for sprite data (which is later copied to actual OAM memory). Doing so at the wrong time shouldn't cause a crash, unless there are some freaky timing issues going on elsewhere in the hardware.

Anyway, it doesn't really matter anymore, as I'm probably going to hook a different part of the code in the next release.
blackhole89

LOLSEALS
Moderator of ROM hacking
EmuNET IRC network admin
Head GM of TwilightRO
Level: 47

Posts: 89/971
EXP: 739208
For next: 26995

Since: 03-15-04
From: Dresden/Germany

Since last post: 14 hours
Last activity: 12 hours
Posted on 04-09-04 02:43 PM Link | Quote
Yep, that could be way better. Meanwhile, I'd better think about how I'll get rid of the old code the best way...
BMF98567
BLACK HAS BUILT A SILLY DICE-MAZE!
GO!

Current list of BURNING FURY >8( recipients:
- Yiffy Kitten (x2)
- Xkeeper
Level: 53

Posts: 117/1261
EXP: 1094149
For next: 62970

Since: 03-15-04
From: Blobaria
Special Move: Rising Meatloaf Backhand Combo

Since last post: 21 hours
Last activity: 1 hour
Posted on 04-10-04 02:30 PM Link | Quote
Alright, new version is available here. There are some major changes this time around, so please read this carefully...

First, you'll need to insert hdmamainv2.bin, just like you did hdmamain.bin. However, this one hooks a different part of the code (in the NMI routine, actually), so you'll need to restore the old JSL @ $2495 (should be 22 00 80 7F) and make the following change at $03AA:

22 xx xx xx EA EA EA EA (where xx xx xx is the 24-bit address of hdmamainv2.bin)

In this version, there are 8 reserved sections of memory, one for each HDMA channel. Your palette-based code will write the HDMA parameters here. Each section is 8 bytes long, though the last 2 bytes are currently unused. They are set up as follows:

HDMA 0: $7FFF00
HDMA 1: $7FFF08
HDMA 2: $7FFF10
HDMA 3: $7FFF18
HDMA 4: $7FFF20
HDMA 5: $7FFF28
HDMA 6: $7FFF30
HDMA 7: $7FFF38

Each set of parameters has the following format:

CC PP RR AA AA AA xx xx

CC: HDMA channel enable flag. This must correspond to the channel number of the memory section you're using:

HDMA 1: 01
HDMA 2: 02
HDMA 3: 04
HDMA 4: 08
HDMA 5: 10
HDMA 6: 20
HDMA 7: 40
HDMA 8: 80

PP: HDMA parameters (register $43x0).

RR: PPU register to be altered by this HDMA channel.

AA AA AA: 24-bit address of your HDMA table.

xx: Currently unused.

Unused sections (those starting with a zero byte) will be bypassed, and the corresponding HDMA channel will be left untouched.

NOTE: Although you can configure up to 8 channels simultaneously, please note that only channels 3 and 4 appear to be entirely unused. The rest are used for other HDMA effects and general-purpose DMA. Use them at your own risk!

Now, a rundown of the new palette-activated hdmasubv2.bin example file:

$01, $10: These 24-bit addresses point to one of the 8 memory sections described above. In the example file, they're set to channel 3 ($7FFF18).
$0D: 16-bit address of HDMA parameters.
$17: Size of HDMA table, minus 1.
$19: 16-bit address of HDMA table.
$1C: 24-bit RAM address HDMA table will be copied to. Set to $7FFF40 by default.
$40: HDMA parameters, 6 bytes. This is copied to the memory section specified at $01 and $10. In the example file, it's set to channel 3, write mode 02 (write twice), PPU register $210F, table address $7FFF40.
$46: HDMA table. This is copied to the RAM address specified at $1C.

Okay, I'm very tired and this post is making less and less sense each time I read it. In summary, all you need to do to use an HDMA channel in this version is write the necessary parameters to the appropriate memory section (so, if you want to use channel 3, write the parameters to $7FFF18; for channel 4, $7FFF20; etc.). The code will take care of the rest for you.

To activate HDMA channel 4, using write mode 02, PPU register $210F, and HDMA table at $7FFF80, write the following to $7FFF20-$7FFF26:

10 02 0F 80 FF 7F

Please note that I haven't tried using multiple channels at once with this code, though it *should* work. If not, let me know.

Any questions, please don't hesitate to ask. I can probably explain things better once I've had a good night's sleep...
blackhole89

LOLSEALS
Moderator of ROM hacking
EmuNET IRC network admin
Head GM of TwilightRO
Level: 47

Posts: 92/971
EXP: 739208
For next: 26995

Since: 03-15-04
From: Dresden/Germany

Since last post: 14 hours
Last activity: 12 hours
Posted on 04-24-04 01:37 PM Link | Quote
*pushes* Ah yes, back from deep underground.
Well then, I'll check this out.

EDIT - This didn't fix my problem, but anyway, I found the (evident) reason for the crash: It occurs only when a palette change is done. Many of the SMW-intern palette changes don't care for vertical-blank periods and therefore can start changing the palette amidst of HDMA's work, interfering with the first HDMA table working on $2121 (palette index selector) in some way and causing a crash/pointer havoc/endless loop/whatsoever. I fear there's no real way to fix it, unless you can make all the palette changes wait for VBLANKs.

GreetZ
Blacky.


(edited by blackhole89 on 04-24-04 06:27 AM)
Pages: 1 2Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Super Mario World hacking - Implementing HDMA effects via palette hacks (code included) [ASM] | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.019 seconds.