(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-01-24 05:03 AM
0 users currently in SMW Hacking.
Acmlm's Board - I3 Archive - SMW Hacking - Is inserting custom blocks via ASM better than using BlockTool?
  
User name:
Password:
Reply:
 
Options: - -
Quik-Attach:
Preview for more options

Max size 1.00 MB, types: png, gif, jpg, txt, zip, rar, tar, gz, 7z, ace, mp3, ogg, mid, ips, bz2, lzh, psd

UserPost
pikaguy900
Posts: 88/748
I don't mean to sound rude, but... Why did you hijack my thread? Anyways.... I guess it really is better to insert Custom Blocks via ASM. Unfortunately, I barely understand it, even after reading the stickied thread that tells what each part of ASM is (my Hex Editor only lists the hex numbers, so I assume things like JSL are only for text files...).
Sukasa
Posts: 1815/2068
Yeah... 16 * 2 * 4096 bytes for the offset tables, and an additional 4096*5 btyes for the actual block-is-here tables and the bitflags for them. And, the way the tables are constructed and the system is coded, unfortunately you HAVE to have the full table.
BMF54123
Posts: 676/876
4 1/2 banks (~147K?!) seems a little...excessive.

Perhaps you could allow users to choose how many blocks they want to reserve the first time they run the program, in order to decrease the amount of space used? I highly doubt anyone is going to use that many blocks.
Sukasa
Posts: 1811/2068
...Which, coincidentally, is the same premise as BTO. the difference lies in the fact that the data tables for BTO take up 4 1/2 ROM banks, and the code is slightly slower (but still incredibly faster than BT). And Watermelon: Don't worry, it will eventually
BMF54123
Posts: 674/876
I abandoned Block Tool not too long ago in favor of my own system. I use 7 tables, each containing 128 16-bit addresses, which gives me 128 blocks and 32K of space to work with (plenty for now). Each table corresponds to a different action (touched from above/below/sides, hit by fireball, etc.). Basically, the code gets the current block number and uses it as an index into one of the aforementioned address tables, depending on the current action. This address is then compared with a reserved "unused" value. If it matches, no code exists for this block number/action, and the routine exits; otherwise, the routine jumps to the block code at that address. This method is simple and elegant, and uses very few CPU cycles, since no loops are involved.
Watermelon
Posts: 37/44
Originally posted by Kailieann
Originally posted by Watermelon
Well, the new BlockTool Omega doesn´t has slowdown . I recommend to use that instead.

That would be a little tricky, seeing as BTO doesn't actually do anything yet.

Really? Damn, is that I never tryed it . My bad.
spel werdz rite
Posts: 1559/1796
ASM is much better! The best way to do it (at least how I do it) is like so:
1)Make your JSL at the specific block offsets (read the Lunar Magic readme to find where these are.
2)After you have made your JSL, go to it's address.
3)Write this:
08 C2 30 8B DA 4B AB A5 03 A2 nn nn CA CA 30 08
DD xx xx D0 F7 FC yy yy C2 30 FA AB 28 60
In those cases, 'nn nn' is the number of blocks you plan on inserting x2. So if you were going to put in 0x17 blocks, you would write 0x2E 00. And 'xx xx' is the high/low bytes of the address for the blocks you would write down. So say 'xx xx' is 0x13 87, you would go to $8713 and write the block numbers of the custom blocks.
Indexed with the block number, 'yy yy' is the address to write the addresses of the blocks, then go to those addresses and write your custom block ASM. I have seen no slowdowns using this method.
Sukasa
Posts: 1798/2068
Yeah, that is more of a demo of the program's UI.

However, ASM woudl be faster if you just comparted block numbers and branched, unlike blocktool which does some crazy huge lkooping that isn't really needed.
Kailieann
Posts: 423/808
Originally posted by Watermelon
Well, the new BlockTool Omega doesn´t has slowdown . I recommend to use that instead.

That would be a little tricky, seeing as BTO doesn't actually do anything yet.
Watermelon
Posts: 36/44
Originally posted by Stephan Reiken
How about a related question, could putting blocks in via ASM eliminate the Slow-Down that having many Custom Blocks from BlockTool has?

Well, the new BlockTool Omega doesn´t has slowdown . I recommend to use that instead.
Stephan Reiken
Posts: 166/200
How about a related question, could putting blocks in via ASM eliminate the Slow-Down that having many Custom Blocks from BlockTool has?
pikaguy900
Posts: 81/748
Sort of. Right now, I'm only wanting efficiency for the blocks, even if it means doing a lot of work in ASM.
Kailieann
Posts: 422/808
If you want to insert blocks via ASM, go ahead.
But, I'm sure you already know it'd be an unholy pain in the ass to say the least.
pikaguy900
Posts: 80/748
Is it better to insert blocks via ASM than inserting them using BlockTool? Every time I insert a new custom block, I use BlockTool, but I've grown to hate it somewhat, seeing as one of the blocks I inserted is now malfunctioning... So, would ASM prevent that sort of thing happening, or does it not matter?
Acmlm's Board - I3 Archive - SMW Hacking - Is inserting custom blocks via ASM better than using BlockTool?


ABII

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

Page rendered in 0.014 seconds; used 358.43 kB (max 412.01 kB)