Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,500,723
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 04-29-24 11:31 AM
Guest: Register | Login

0 users currently in SMW Hacking | 2 guests

Main - SMW Hacking - Reloc Offsets, Map16++, and more... New thread | New reply


boingboingsplat
Posted on 11-05-07 03:13 AM Link | Quote | ID: 69185


Giant Koopa
[PREFSTRING:wonderful bounciness]
Level: 74

Posts: 68/1292
EXP: 3634616
Next: 18928

Since: 07-23-07
From: Michicola

Last post: 4845 days
Last view: 4807 days
Alright, I'm making myself a block, and there are a couple of things that I need more info about/need to know how to do.

First of all, what are the reloc offsets for in Block Tool? They seem to have a lot to do with Map16++, but I have seen them used in other blocks too. How do you determine what to use for them?

Alright, how do you make a block change into the next block of map16? I could never figure it out, and it is pretty vital to my block. It'd be nice if this was explained in ASM as opposed to machine code.

And lastly, how do you make a block spawn a "glitter trial" such as what appears after you collect a coin? This would be a nice touch to what I'm creating, but not entirely necessary.

____________________
 

blackhole89
Posted on 11-05-07 03:16 AM Link | Quote | ID: 69186


The Guardian
Moloch whose eyes are a thousand blind windows!
Level: 124

Posts: 759/4196
EXP: 21538132
Next: 298469

Since: 02-19-07
From: Ithaca, NY, US

Last post: 474 days
Last view: 87 days



If I remember correctly (It's been years ), the reloc offsets are just the offsets in the block binary at which absolute addresses need to be adapted to where blocktool actually winds up placing the block in the ROM.

____________________



boingboingsplat
Posted on 11-06-07 04:01 AM Link | Quote | ID: 69252


Giant Koopa
[PREFSTRING:wonderful bounciness]
Level: 74

Posts: 70/1292
EXP: 3634616
Next: 18928

Since: 07-23-07
From: Michicola

Last post: 4845 days
Last view: 4807 days
Would someone please explain reloc offsets more in-depth? I have the code for the Map16++ and Glitter trail from the source of Mikeyk's coins, but I'm starting to think that its the reloc offsets that keep them from functioning.

____________________
 

Smallhacker
Posted on 11-06-07 08:59 AM Link | Quote | ID: 69272


Panser
Swedish weirdo times eleven

Level: 42

Posts: 227/339
EXP: 494594
Next: 26768

Since: 02-19-07
From: Stockholm, Sweden

Last post: 5188 days
Last view: 5187 days
The 65c816 opcodes JSR, JSL, JMP and JML requires the absolute address of the target.

However, if the target is inside the block code, there is no way to know in advance where the code will be inserted. Therefore, you make the "absolute addresses" relative to the start of the block, then add the address of the address to the reloc list. When BlockTool inserts the block, it will find a place to insert the data to, check the reloc offsets, add the start address of the block code to the relative addresses and insert.

____________________
SMW Central

boingboingsplat
Posted on 11-06-07 09:16 PM Link | Quote | ID: 69293


Giant Koopa
[PREFSTRING:wonderful bounciness]
Level: 74

Posts: 71/1292
EXP: 3634616
Next: 18928

Since: 07-23-07
From: Michicola

Last post: 4845 days
Last view: 4807 days
Thanks Smallhacker. I think I get it now. If I get any more problems (Hopefully I won't) I'll ask about them here.

____________________
 

Main - SMW Hacking - Reloc Offsets, Map16++, and more... New thread | New reply

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.021 seconds. (339KB of memory used)
MySQL - queries: 52, rows: 76/77, time: 0.015 seconds.