Custom Block Inserter for Super Mario World
Version 2.0
 
Created By Jonathan Wilson
jonwil@tpgi.com.au
ICQ 77572965
AIM jonwil2002
Yahoo Messenger jonwil2002
MSN JonathanWilson623@hotmail.com

whats new in 2.0:
250 new blocks!
Also, a few enhancements to the inserter (mainly making some windows and controls bigger)
Plus the new version of Lunar Compress.dll

whats new in 1.0:
50 new blocks and general fixes for stuff, now the SMB3 smashable blocks 
give points, the no-yoshi blocks work properly and a few other things.
Also, I improved the interface a little, the "add block" thingo is now a 
list-box instead of a drop-down combo box which makes it easier to use.

whats new in 0.99:
Updated to Delphi 7, Apollo 6.1 and Lunar Compress 1.40
Misc bug fixes
Resumed working on blocks, fixed some problems with smb3.bin (so you need 
to re-insert the blocks. also note that blocks.dbf has changed so you 
need to take the new version and re-add anything you added before)
New set of blocks to come out as version 1.00, with hopefully fixed
no-yoshi blocks, smashable bricks that give points like SMB3 and stuff.
Any changes to existing blocks will be mentioned in this readme.

Whats new in 0.98:
Fixed some errors in the descriptions of some of the blocks.
Fixed the no-yoshi blocks, hopefully for good this time.
 
Whats new in 0.97:
Fixed another error in the main ASM, just re-insert the blocks to get the fix.
Attempted to fix the no-yoshi blocks problem.
However, they still dont work right. I still cant seem to find the right RAM location to test against to tell if mario is really on yoshi.

Whats new in 0.96:
Changed the locked door blocks to work between levels (even if mario goes to the overworld & back). 
If anyone finds anything, no matter how minute, that stops working, PLEASE tell me about it.
Updated the description to reflect the changes.

Whats new in 0.95:
Changed the format of the .DSC files, as per FuSoYas request.

Whats new in 0.94:
Fixed a serious problem with the main ASM.
Also fixed a problem with the inserting code.
Just re-insert the blocks to get the new ASM and the fixed coding.

Whats new in 0.93:
Fixed ßouchés sensitive blocks so that they dont test the blue POW flag anymore.
Changed some block descriptions.
Fixed a problem with the window resizing where the grid wasnt being resized to fill the window.
Added a test to make sure that the rom has had at least one level saved before using it with the inserter (so that certain needed ASM hacks are installed).

Whats new in 0.92:
Fixed a spelling mistake in the block database (thanks Emuz).
Fixed the problem where the program wasnt closing files properly untill you exited the program.
 
Whats new in 0.91:
Moved the "add block" and "change block" panels so that they dont obscure the grid anymore.
Fixed some problems with using the "movement blocks" right next to the edge of the screen.
 
This program is still a beta. Please report any bugs, comments etc to me so that they can be fixed for the next version. (both with the inserter and the blocks it inserts)
 
Included with the program are full source code plus the needed database runtime dlls. If you want to use the source code, you will need a copy of apollo VCL 6.0 as well as a copy of Borland Delphi (I use version 6, dont know if it would work for earlier versions).
 
Make sure you completly read this readme.txt file. If you dont know how to edit the graphics or map16, read the tutorials. Same with the animated tile editor tutorial that comes with the animated tile editor.
 
File -> Open (or Ctrl-O): Opens a rom to add blocks to.
 
File -> Save (or Ctrl-S): Saves the blocks to the rom
This will find some vacant space in the rom, insert the needed ASM for the blocks and also create the .DSC file. A .DSC file is a file with the same base name as the rom file but a different extention. It contains the map16 tile numbers, titles and descriptions for the blocks that have been inserted into the rom. Its usefull as a reference for the hacker to remind them what blocks they inserted and what numbers they used (open it in notepad or whatever to view it) and with any luck, FuSoYa will support them in a future version of Lunar Magic.
 
File -> Exit: Exits the program
 
Blocks -> Edit Block Data: Allows you to edit the details for existing blocks or to add new blocks you have created to the program. Only use this if you know what you are doing. Note that this is NOT a block editor, you still have to create the ASM blocks outside the inserter. If you want to know the specifics for adding new blocks, contact me and I will give you the details.
 
Help -> About: Shows the about box.
 
Add Block: Allows you to add a block for insertion to the rom. Choose a block from the list and type in the number of the map16 tile to use (in decimal)
 
Change Block: Allows you to change the map16 number associated with the block you have selected in the grid. Type in the new map16 number (in decimal)
 
Remove Block: Allows you to remove the block you have selected in the grid from the list, so it wont get inserted into the rom.
 
View details: Displays the title, usage instructions and author details for the block you have selected in the grid.
Its a good idea to read the usage instructions for all blocks that you are using, they will explain anything special you need to know or do in order to use the blocks.
The usage instructions cover 2 things:
How to insert the block into the rom, including anything to do with animated
tile editing and also what to set the "this block acts like" settings to.
and How to use the block in the game, including what the block is, what it does
anmd so on.
 
If you wish to know how the block works at a technical level, contact me since I know how all the ASM involved with this program works.
The "author" field isnt quite totally accurate since a large number of the blocks contain code written by more than one person.
Thanks to FuSoYa, ßouché, Alaric, Sepiroth and others for their help.

Note:
Not all the blocks have been tested with luigi, if you find a block that doesnt work properly with luigi, do tell me about it :)
 
Other notes:
Please dont distribute modified versions of the blocks.dbf file. If you have custom blocks you have made, send them to me and I will add them to the master blocks.dbf file which will hold all blocks.
Also, dont distribute modified versions of the source code either, send me any changes you make and want included.
Distributing the block editor unmodified is ok though.
 
Distributing your roms.dbf file containing your particular block selections is also ok. Note that there is only one list of blocks to be inserted across the entire program, regardless of what rom you load, i.e. if you load a different rom, you still get whatever tiles you last selected.
 
2 notes about the tiles.
1.you cant insert 2 tiles with the same map16 number (and this includes wholepage blocks that have the same page as another block).
and 2.you can, however, use the same block number with different map16 numbers. Note that you will only get
one copy of the ASM which saves space.
 
If you dont know how to convert from hex into decimal, open windows calculator (start -> programs -> accessories -> calculator). Then select "scientific" mode. Select hex, then type in the number. Then click on decimal and it will convert it for you.
You can also convert the other direction in a similar way by selecting decimal, inputing the number and then selecting hex.
 
Also note that if you have any custom blocks in your hack already (this includes anyone that has based their hack off of demo world) then your hack will need to be modified to be block inserter compatible (its a simple task but it has to be done by hand). If you need this done to your hack, contact me and I will do it for you.
 
Also, you dont necessarily have to folow the "this block acts like" settings specified for the blocks. For example, you could make a block that uses the ASM for the switchable on-off blocks but instead of being programmed to act like tile 25, its programmed to act like lava so that when its "visible" it blocks mario when its "invisible" it kills or hurts mario.
If you find any bugs in the program or the blocks or if you experiance e.g. a crash when using one of the blocks, please let me know ASAP so I can fix it.

Files included with this program:
readme.txt the documentation for the program
gfxtutor.txt tutorial on editing graphics in SMW
m16tutor.txt tutorial on editing map16 in SMW
lunar compress.dll Lunar Compression dll
sde61.dll database engine dll
sdecdx61.dll database engine dll
sdentx61.dll database engine dll
sdensx61.dll database engine dll
about.dfm about box form
about.pas about box form source code
blkdet.dfm block details form
blkdet.pas block details form source code
blkedit.dfm edit block data form
blkedit.pas edit block data form source code
blkpick.dfm block inserter form
blkpick.pas block inserter form source code
blktool.cfg delphi config file for block inserter
blktool.dof delphi options file for block inserter
blktool.dpr delphi project file for block inserter
blktool.exe block inserter program
blktool.res delphi resource file for block inserter
blocks.dbf main block database
blocks.nsx index file for main block database
blocks.smt memo data file for main block database
rom.dbf database for currently selected tiles
*.bin ASM code for the various blocks
lunardll.pas Lunar Compress interface code for Delphi
copying licence aggrement for the block inserter
