Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,579,496
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 05-12-24 10:20 PM
Guest: Register | Login

Main - Posts by mikeyk

Pages: 1 2 3 4

mikeyk
Posted on 06-12-07 07:59 AM, in Sprite Tool Update + Source Code (rev. 4 of 06-12-07 05:33 PM) Link | Quote | ID: 44709


Paragoomba
Level: 22

Posts: 1/74
EXP: 50045
Next: 8305

Since: 06-11-07

Last post: 6063 days
Last view: 4139 days
Hello all! Hope everyone is well. I'm back from the dead with some news. First of all, I want to thank icegoom for pointing me to Acmlm's board II. I hadn't heard news of the move, and I had assumed this community was dead. I'm so happy to see business is still booming.

You all probably noticed that I was on a long hiatus -- I hadn't touched a Mario ROM in months. That would probably still be the case if an email hadn't shown up in my inbox -- written entirely in Japanese. Through the power of online translation, I figured out it was about Sprite Tool. Still, it would have slipped through the cracks if I hadn't opened the attached screen shots. I was simply AMAZED at what I saw.

I started talking to him. He mentioned he was having some problems, and sent me some asm code he'd been working on. I was really impressed with some of the clever things he was doing. Unfortunately for him, TRASM and Sprite Tool weren't playing nice for some of it. He asked me if I could help him out, and I ended up making him a custom build of Sprite Tool for him.

With a newly found interest in hacking, I started digging around. I was able to get my hands on some new custom sprites. I also came across a game that is simply brilliant. It's by far the most original, fun, innovative hack that I've ever seen. WOW, it's just wow. I'll make a post about it soon

Anyway...

Because of the issues that Japanese hacker was having, I decided to release the source code for Sprite Tool. It's not very well written or documented (I did write it in an excited hurry last year,) but I tried to go back and add some useful comments. Hopefully someone may be able to get something out of it.

Sprite Tool 1.25 includes some updates, some of my unreleased work, and some sprites from Japan. Check it out!

* Source is included in the 'source' subdirectory.

* You can now specify your rom and sprite list as command line arguments. From command prompt you can run "sprite_tool.exe rom_name.smc sprite_list.txt" to bypass the prompts.

* I fixed a bug that was causing sprites to get assembled for the wrong bank. I never heard anyone complain about it, but it could have potentially caused issues if people were using long addresses.

And no release would be complete without some new sprites...

First, my unreleased sprites from last summer. They are all based off of YI enemies and use the ExGfx file yi_enemies (SP4).bin.
* yi_goomba.cfg
* yi_shyguy.cfg
* kabooma.cfg

edit: *****Japanese sprites removed for now*****

That's all I got for now. Hope you enjoy.
-mikeyk

mikeyk
Posted on 06-12-07 04:26 PM, in Sprite Tool Update + Source Code Link | Quote | ID: 44766


Paragoomba
Level: 22

Posts: 2/74
EXP: 50045
Next: 8305

Since: 06-11-07

Last post: 6063 days
Last view: 4139 days
Since there are some negative feeling going around about the Japanese sprites, I have decided to take them out of the release for now.

mikeyk
Posted on 06-14-07 05:13 AM, in Sprite Tool Update + Source Code Link | Quote | ID: 45271


Paragoomba
Level: 22

Posts: 3/74
EXP: 50045
Next: 8305

Since: 06-11-07

Last post: 6063 days
Last view: 4139 days
Many of you have been waiting for the return of the Japanese sprites. This should be everything that was included, minus the starsw pack. Thanks to the Japanese hackers that worked hard to create these sprites. We all appreciate your willingness to share them with us.

Remnic The Hedgehog: The YI sprites that I included were the last ones that I ever worked on. I never finished the goomba, which is why it doesn't squish. I figured I might as well release it in case someone want to use/modify it.

icegoom: You mentioned the "originals" folder. Some, if not all, of those sprites can be used with Sprite Tool. I don't really remember too well, but I wanted to include them in the release as they may be beneficial to someone.

Smallhacker, icegoom: Thanks for pointing out the bugs. I'm actually surprised there haven't been more -- in the beginning I was making a bunch of sprites in a hurry. I did include the bug fixes in the release (I think even back when the Japanese sprites were included). I wouldn't mind if someone would check those out and make sure I didn't screw them up.

mikeyk
Posted on 06-18-07 07:05 AM, in SMW and 65816 pros: Look here Link | Quote | ID: 46487


Paragoomba
Level: 22

Posts: 4/74
EXP: 50045
Next: 8305

Since: 06-11-07

Last post: 6063 days
Last view: 4139 days
Hey guys...

I actually started a disassembly project of my own about a week ago, and I've made some pretty quick progress. Smallhacker pointed me towards your files, and I had a quick glance. You're definitely way ahead in commenting, while I'm ahead in having assemble-able code. We're definitely going to have to consolidate our projects at some point... shouldn't be too bad. As for the details of the project, my first question: what assembler are you guys planning on using? My stuff is pretty flexible, so let me know what you were thinking, and we'll get the ball rolling.


mikeyk
Posted on 06-18-07 04:15 PM, in SMW and 65816 pros: Look here (rev. 2 of 06-18-07 04:22 PM) Link | Quote | ID: 46554


Paragoomba
Level: 22

Posts: 5/74
EXP: 50045
Next: 8305

Since: 06-11-07

Last post: 6063 days
Last view: 4139 days
I'm going to take a wild guess and assume this is the assembler Sukasa had in mind, http://www.villehelin.com/wla.html. I'll take a look at this sometime today or tomorrow. With any luck I'll be able to get the first 2 banks fully assembled with it.

mikeyk
Posted on 06-18-07 05:05 PM, in Sprite Tool Update + Source Code Link | Quote | ID: 46562


Paragoomba
Level: 22

Posts: 6/74
EXP: 50045
Next: 8305

Since: 06-11-07

Last post: 6063 days
Last view: 4139 days
Remnic: The YI sprites were never completely finished. I released them in case people wanted to use them as is, or modify them to make them better. I'm not really doing any sprite work right now, because I see myself getting wrapped up in the SMW disassembly project. Maybe someday I'll get around to finishing them, but there's always the opportunity for a motivated person to beat me to it.

Sparx: I don't know if I ever inserted those sprites into a hack, so maybe the tilemap is off. If the GFX don't look right, I would recommend modifying the GFX file so they do.

mikeyk
Posted on 06-18-07 07:13 PM, in SMW and 65816 pros: Look here Link | Quote | ID: 46607


Paragoomba
Level: 22

Posts: 7/74
EXP: 50045
Next: 8305

Since: 06-11-07

Last post: 6063 days
Last view: 4139 days
I'll change my stuff to adhere to the WLA syntax for now. You mentioned that you wanted some flexibility in managing some code such as labels -- what kind of functionality did you have in mind?

mikeyk
Posted on 06-28-07 05:54 AM, in Adding overworld music Link | Quote | ID: 50341


Paragoomba
Level: 22

Posts: 9/74
EXP: 50045
Next: 8305

Since: 06-11-07

Last post: 6063 days
Last view: 4139 days
I came across a program today that allows you to insert up to 8 new songs into the overworld. The site is in Japanese, so you might want to check it out via google translate:

http://vip.rgr.jp/sm4wiki/index.php?Overworld%20Editor%2F%B2%BB%B3%DA%A4%CE%C4%C9%B2%C3

Make sure you back up your ROM before experimenting with this. I don't speak Japanese, so maybe someone can be a better help here -- from what I gather all you need to do to use this is:

1. Start with an expanded ROM (edited with LM.) From the command line run:
addmusic romname.smc INIT
Don't run this more than once, or it will corrupt your ROM

2. Run:
addmusic romname.smc
This will convert 11.txt through 18.txt into music and insert it into the ROM

3. With the LM overworld editor change the overworld music to any track 11 - 18 and hear the new tunes.

If you want to create your own music, the format of the txt files is on the site, but I have not looked into it all. Check it out

mikeyk
Posted on 06-28-07 06:12 AM, in Adding overworld music (rev. 2 of 06-28-07 06:16 AM) Link | Quote | ID: 50344


Paragoomba
Level: 22

Posts: 10/74
EXP: 50045
Next: 8305

Since: 06-11-07

Last post: 6063 days
Last view: 4139 days
There also seems to be some more songs in the same txt format here, under the heading BGM: http://vip.rgr.jp/sm4wiki/index.php?%BC%AB%BA%EE%CA%AA%C5%B8%BC%A8%BE%EC

Edit: This page looks to have some more music related stuff as well. Perhaps we can figure some of this stuff out.
http://smw-vip.hp.infoseek.co.jp/

mikeyk
Posted on 06-28-07 06:23 AM, in SMW and 65816 pros: Look here Link | Quote | ID: 50348


Paragoomba
Level: 22

Posts: 11/74
EXP: 50045
Next: 8305

Since: 06-11-07

Last post: 6063 days
Last view: 4139 days
I've made quite a bit of progress on this front, so I figured I'd share a snapshot of my work. There's still a whoooole lot to improve, especially the documentation (most of what's there comes from Sukasa and SmallHacker). But I figure the more eyes we get on this the better things will be. Hopefully this doesn't count as a ROM link -- here we go

mikeyk
Posted on 06-28-07 05:36 PM, in Adding overworld music Link | Quote | ID: 50423


Paragoomba
Level: 22

Posts: 12/74
EXP: 50045
Next: 8305

Since: 06-11-07

Last post: 6063 days
Last view: 4139 days
Looking a little closer at the page, there is a note in one of the blue boxes (obvious machine translation):

You will pay attention to the excess of capacity. Because there is no prevention measure... As for maximum of the music data which can insert, “total of the data after the converting about 9600 bytes”

Maybe that is why the gfx are being overwritten? The source is included in the archive, so it shouldn't be too hard to see exactly what is going on.

mikeyk
Posted on 07-10-07 07:40 AM, in Question: Spawning a sprite in-level? [ASM] (rev. 4 of 07-11-07 10:07 AM) Link | Quote | ID: 53640


Paragoomba
Level: 22

Posts: 13/74
EXP: 50045
Next: 8305

Since: 06-11-07

Last post: 6063 days
Last view: 4139 days
This is my bread and butter

If you are just dealing with regular sprites, this is a skeleton of the routine that you'll need to run. If you want to create a custom sprite rather than a regular one, there are a few differences. Let me know if you want to know.

; This routine loads Y with the index of the first free sprite slot
; If all slots are full Y = #$FF. This is why we return if we get a
; negative value.
22 E4 A9 02 JSL.L $02A9E4
30 XX BMI Return

; Next set the sprite status into $14C8,Y
; Possible values are:
; 1 - Initialization
; 2 - Falling off screen (hit by star, shell, etc)
; 3 - Smushed
; 4 - Spin Jumped
; 5 - ?
; 6 - End of level turn to coin
; 7 - Nothing, points to return
; 8 - Normal
; 9 - Stationary (Carryable, flipped, stunned)
; A - Kicked
; B - Being carried
; C - Power up created from carrying a sprite through goal
;
; You probably want to use #$01 or #$08, depending if you want
; the initialization routine to be run
A9 XX LDA.B #$XX
99 C8 14 STA.W $14C8,Y

; Set the sprite to generate
A9 XX LDA.B #$XX
99 9E 00 STA.W 009E,Y

; Set X/Y Positions
; ...
99 E4 00 STA.W 00E4,Y
; ...
99 E0 14 STA.W 14E0,Y
; ...
99 D8 00 STA.W 00D8,Y
; ...
99 D4 14 STA.W 14D4,Y

; This subroutine clears out all of the sprite table values,
; and loads the new values for the 6 tweaker tables.
; It requires the sprite index to be in X
DA PHX
BB TYX
22 D2 F7 07 JSL.L $07F7D2
FA PLX

; (EDIT: moved this below the table clearing subroutine)
; Set sprite direction
; ...
99 7C 15 STA.W 157C,Y


That really should do it for the basics. Everything else would just be gravy.

mikeyk
Posted on 07-10-07 09:09 AM, in Question: Spawning a sprite in-level? [ASM] Link | Quote | ID: 53656


Paragoomba
Level: 22

Posts: 14/74
EXP: 50045
Next: 8305

Since: 06-11-07

Last post: 6063 days
Last view: 4139 days
If you are looking to spawn a sprite that was inserted with Sprite Tool, then you need to make a few modifications. I'll post back tomorrow when I have my notes on hand.

Glad I'm able to help you out. It sounds like you have a pretty cool idea brewing -- I'll be anxious to see the final result

mikeyk
Posted on 07-10-07 10:22 PM, in Question: Spawning a sprite in-level? [ASM] (rev. 5 of 07-12-07 07:22 PM) Link | Quote | ID: 53718


Paragoomba
Level: 22

Posts: 15/74
EXP: 50045
Next: 8305

Since: 06-11-07

Last post: 6063 days
Last view: 4139 days
This code is for generating a Sprite Tool sprite. Hopefully I didn't mess anything up. The major differences are:
1. Store the sprite to create into 7FAB9E rather than 9E
2. Load the 6 Tweaker bytes from the custom sprite table, not the original sprite table
3. Store processing bits to $7FAB10

; This routine loads Y with the index of the first free sprite slot
; If all slots are full Y = #$FF. This is why we return if we get a
; negative value.
JSL $02A9E4
BMI Return

; Put sprite index in X, as the called routines require this
PHX
TYX

; Set the sprite to generate into the custom sprite number
LDA #$XX
STA $7FAB9E,X

; Set the "normal" sprite status into $14C8 table
LDA #$08
STA $14C8,X

; Set X/Y Positions
; (insert code to set up position)
STA $00E4,X
; (insert code to set up position)
STA $14E0,X
; (insert code to set up position)
STA $00D8,X
; (insert code to set up position)
STA $14D4,X

PHY
; This subroutine clears out all of the sprite table values,
; It requires the sprite index to be in X
JSL $07F7D2
; This routine loads the 6 Tweaker properties for the custom sprite
; It also puts the address of the INIT routine in $00
JSL $0187A7
; Set as a custom sprite
LDA #$88
ORA #$01 ; <---Only if you want the extra bit to be set
STA $7FAB10,X
; Call INIT routine on sprite
PHK
PER.W #$0002
JML ($0000)
PLY

PLX

mikeyk
Posted on 07-11-07 12:02 AM, in Question: Spawning a sprite in-level? [ASM] Link | Quote | ID: 53729


Paragoomba
Level: 22

Posts: 16/74
EXP: 50045
Next: 8305

Since: 06-11-07

Last post: 6063 days
Last view: 4139 days
There's really no way to tell how you ended up in that loop. Could you at least post the routine that you created to generate the sprite?

mikeyk
Posted on 07-11-07 08:08 AM, in Question: Spawning a sprite in-level? [ASM] Link | Quote | ID: 53835


Paragoomba
Level: 22

Posts: 17/74
EXP: 50045
Next: 8305

Since: 06-11-07

Last post: 6063 days
Last view: 4139 days
Try putting 88 into 7FAB10 instead of 08. I made an error in my original post, and edited it a few minutes after making it. Other than that, it looks good. So let me know how it goes

mikeyk
Posted on 07-11-07 10:06 AM, in Question: Spawning a sprite in-level? [ASM] Link | Quote | ID: 53853


Paragoomba
Level: 22

Posts: 18/74
EXP: 50045
Next: 8305

Since: 06-11-07

Last post: 6063 days
Last view: 4139 days
I believe if you set $01 rather than $08 into $14C8,Y, the INIT routine will run.

It's been awhile since I looked into the ASM hacks that Sprite Tool installs, so I'd been a bit fuzzy with the details. I just had an opportunity to look at the source, so I think I'm starting to remember it a little better.

RAM table $14C8 is the sprite's status. It can take the values 01-0C (I listed them out in my first post in this thread). Sprite tool only deals with status 01 (calls INIT routine) and 08 (calls MAIN routine). All other statuses are passed on to the original SMW handling code with the "acts like" byte as the sprite number ($9E).

mikeyk
Posted on 07-12-07 06:03 PM, in Wow! Japanese ASM Files! Link | Quote | ID: 54178


Paragoomba
Level: 22

Posts: 19/74
EXP: 50045
Next: 8305

Since: 06-11-07

Last post: 6063 days
Last view: 4139 days
It looks like the author of STARSW has decided to let us use his sprites. He only asks that we download the package from his site, and not redistribute it -- most likely because it has been updated so frequently.

http://mario.cold-web.net/view.cgi/1179998074/

I would like to thank him for allowing us to download these sprites. He's using Sprite Tool in a way I never thought to. It works out very nicely.

mikeyk
Posted on 07-12-07 07:21 PM, in Question: Spawning a sprite in-level? [ASM] Link | Quote | ID: 54182


Paragoomba
Level: 22

Posts: 20/74
EXP: 50045
Next: 8305

Since: 06-11-07

Last post: 6063 days
Last view: 4139 days
I went back and looked at how I handled things in the generic generator that I include in Sprite Tool. It looks like I gave you a little bit of bad information. You do want to set 08 at the sprite status, and you can just call the INIT routine from your sprite generating subroutine. I edited my previous code post to be accurate.

mikeyk
Posted on 07-17-07 05:56 AM, in SMW and 65816 pros: Look here Link | Quote | ID: 55582


Paragoomba
Level: 22

Posts: 21/74
EXP: 50045
Next: 8305

Since: 06-11-07

Last post: 6063 days
Last view: 4139 days
I've been steadily making progress on the disassembly. I'd like to once again share the current progress with everyone here. You'll see that many more sections have been commented. Also most of the stored pointers now reference their targets. Have a look at the latest snapshot:

http://home.comcast.net/~dkaminski/disasm/all.rar

Pages: 1 2 3 4


Main - Posts by mikeyk

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

Page rendered in 3.637 seconds. (330KB of memory used)
MySQL - queries: 130, rows: 162/162, time: 3.621 seconds.