Language…
5 users online: Daizo Dee Von, ezdeez85, Oskise,  Ringo,  Telinc1 - Guests: 249 - Bots: 379
Users: 64,795 (2,375 active)
Latest user: mathew

New block inserter (042)

Link Thread Closed
It's a .NET 2.0 app, you'll need the framework if you want to run this.

It doesn't suffer from slowdown with a jump table instead of an elseif style of searching blocktool uses. Two methods are / will be made avaliable for insertion blocks.

-xkas .asm files
-blocktool .bin files

Upon first time opening, you'll be told where it installed a hack. This is the same address you'd place in a hex editor (points to RATS tag). Then, you're free to add blocks and insert them. Save your changes and see how it works.

It generates two files at the moment. A "blocks.db" file which is the database for blocks avaliable for insertion and a "<insert ROM name>.bks" which keeps track of which blocks are inserted and what ID has been assigned to them. When you patch a blocktool patched ROM, it will just overwrite what it has previously placed there. It should pretty much behave like blocktool was never installed. If you'd like to try this, please make plenty of backups since I don't trust it much myself. I've tinkered with most of the hacks I have here and it seems to tolerate the new system just fine. Feedback much appreicated...

The pictures below should explain themselves.

The block data editor

The legacy .bin tab

Choose a block

Currently inserted blocks


I mentioned an .asm block for xkas, which an example of is shown here.

Code
;template block, this example simply blanks the screen when mario stands above the block

JMP MarioBelow : JMP MarioAbove : JMP MarioSide : JMP SpriteV
JMP SpriteH : JMP MarioCape : JMP MarioFireBall

MarioAbove:
	STZ $2100	;reset

MarioSide:
MarioBelow:
SpriteV:
SpriteH:
MarioCape:
MarioFireBall:
	RTL


The JMPs MUST be there for it to function since that's what my code jumps to in the block (to replace the function of offsets). Basically what you have here is something that makes the screen partially black when mario is on top. The code always ends in RTL. Don't place header / lorom or orgs because the program does that automatically. There is no way for me to tell whether xkas has produced an error sicne it outputs a file uncondtionally, although testing a block in command line shouldn't be that much of a hassle at all.

Desptie that minor issue I chose xkas over TRASM because since TRASM is pretty much a fossil from the demoscene (1994) and as such has a few issues that really bugged me during sprite programming.

-Math system is busted. I remember trying to get some simple math going and had no success, then I gave up trying when not even the examples including in it's .doc were failing.
-Missing opcodes (ouch)
-Loopholes need to be taken when writing certain data to the output
-Errors which aren't caught at all (anyone here ever met the "wtf mate" error from sprite tool when TRASM outputs a different sized file between passes?). Really got on my nerves.

Let me know if it does anything odd. I've had success with .bin / .asm insertion.

Updates:
-.bin support
-Delete works properly now
-Changing a critical element in the database for a block that is currently inserted warns you that you need to reinsert (just click the below menu item)
-Reinsert all menu option added, deletes all blocks then reinserts. You have to do this if you change any block data for already inserted blocks.
-Generates tooltips.
-Fixed issue with the program thinking a block with failed reinsertion is still inserted.
-Fixed issue where it would potentially overwrite critical unprotected data.
-Fixed issue where bogus offsets / reloc offsets would cause potential issues.
-If the contents of ROM are inconsistent with what the program thinks is in ROM, and message box pops up and the inconsistent stuff is removed from the ROM or the record.
-Sorts by map16
-Change map16
-Catches whether xkas is present or not, not sure how I missed this one.
-SA-1 mapping added
-Fixed issue where sprite index was not carried into block code (this fixes any sprite <-> block interaction issues)
-Added a hack for the many blocktool .bin blocks that would crash without hex edits

http://smkdan.eludevisibility.org/other/btsd042.zip

I'm also making some blocks, but not just rewriting the blocktool .bins in .asm form (unless there's something definable), but a few new ones. They're all in the .asm folder.
Looks very good. I'll check it out when I download it at home.
Now I leave my IPS patches of my hacks for everyone play and edit as you want to.

Bramble Invasion & Surreliatus


A blocktool that use .asm and don't cause slowdown is insta-win.
Originally posted by Necro
A blocktool that use .asm and don't cause slowdown is insta-win.


100% agreed.
smkdan, it's almost unbeleavable what you put out here all the time!


smkdan, you never cease to amaze me.
HELL YES.

I've been waiting for an alternate block inserter without slowdown for so long, and here it is. I hope this is completed to the end. :)
Your layout has been removed.
Awesome. I'll be sure to use it once you can insert .bin files, because I already have too many blocks used in my hack right now.
This sucks. The white on grey is so 18th century. Just for that, I'm not using the program. >8(

..

As I was saying, I've been following this on IRC, and it looks pretty great so far. Being able to directly insert .asm files without that whole slowdown issue is pure bliss, and I'm sure everyone else will think so too. Looking forward to the final release of this.
What does everyone mean by slowdown? Please explain.
no, the issue is caused by blktool incredibly stupid coding. It cause more slowdown when more block get inserted(no matter if the block are actualy used or not in the current level or the whole hack)
Oh My God...

Smkdan, you're a lifesaver. My computer (And probably many others) can't use blocktool because I get a stupid message like "Could Not Open rom.dll". But I'm sure this will work on my computer. (Yay, I can finally insert custom blocks!) Best of luck with this project smkdan, I'm definitely looking forward to .blk functionality in the future! =D
Thanks everyone.

I tried adding .bin support and updated the link with it. What it does is provide a 'wrapper' for the blocks (they use RTS and BT defined offsets) and apply everthing else accordingly. These blocks will not slowdown for being .bin for anything. I tested the sensitive brick (see in the pic in the edit, just copy everything over (yes offsets are in decimal adn relocs are in hex). It seems to work fine. Whole page isn't there, but apart from that it should run .bin blocks fine.
Wait, Smkdan, this is yours? nice work! i cant wait to use it (especially since it dosent cause slowdown. :D )

EDIT:I tried to run this and this a message pops up saying this: 'The application failed to initialize properly (0xc0000135). Click OK to terminate the application.'

Anyone know what's wrong?
<TLMB> I use YY-CHR to edit DNA
If you are already using the old blocktool will it get rid of the slowdown? Or do you have to delete the blocks from the old one first?
Originally posted by smkdan
It should pretty much behave like blocktool was never installed.


*sigh*

Did you even READ his post?
<TLMB> I use YY-CHR to edit DNA
I did read his post, guess I missed/forgot that part.

oh so you can make your own blocks!?
Also i know how to insert blocks to my hack!! thank you for creating this program! :D
Nothing to put here at the time being.
Thanks to Tom Servo for the awesome new layout!
Originally posted by Marioman
oh so you can make your own blocks!?

You could always make your own blocks. <_<

well with ASM yes but not the programNothing to put here at the time being.
Thanks to Tom Servo for the awesome new layout!
Link Thread Closed