News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Anyone Interested in Doing "SMB Special" for NES?  (Read 300281 times)

frantik

  • Hero Member
  • *****
  • Posts: 642
    • View Profile
Re: Anyone Interested in Doing "SMB Special" for NES?
« Reply #120 on: March 11, 2008, 04:45:15 am »
it's the middle of the night, so I figure I might have time to get some more work done on the movement code integration before anyone is awake.

.... except i'm an insomniac freak lol jk take your time.

glad to hear you've worked out some bugs in the renderer though, and fixed 4-2 up.  :laugh:

in 4-3 there is no enterable pipe but there is a vine which uses the same pipe codes....

Karatorian

  • Sr. Member
  • ****
  • Posts: 381
  • "Gotta get get ... 6502"
    • View Profile
    • Studio Karatorian
Re: Anyone Interested in Doing "SMB Special" for NES?
« Reply #121 on: March 11, 2008, 08:53:59 am »
Ok, I posted the new version of the level renders. It's got all the bug fixes I mentioned above, the fixed 4-2, and full movement code support. The movement code now handles firebar intial positions and rotation direction. It also handles the previously unhandled 0xC1 code, which is up and down for Parakoopas and going forward in an up and down wave for Cheep Cheeps.

I also made a slight modification to the indicators for block contents. The Hudsonsoft Bee is now labled with a 'B' and the remaining unidentified powerup is labled with a 'U'.

I'll go mess around with 4-3 and see what happens.
Current ProjectsFinal Fantasy EngineSMB Special for NESStudio Karatorian
@loop: lda (src),y — sta (dst),y — iny — bne @loop — inc src+1 — inc dst+1 — dex — bne @loop

frantik

  • Hero Member
  • *****
  • Posts: 642
    • View Profile
Re: Anyone Interested in Doing "SMB Special" for NES?
« Reply #122 on: March 11, 2008, 07:15:31 pm »
Ok, I posted the new version of the level renders. It's got all the bug fixes I mentioned above, the fixed 4-2, and full movement code support. The movement code now handles firebar intial positions and rotation direction. It also handles the previously unhandled 0xC1 code, which is up and down for Parakoopas and going forward in an up and down wave for Cheep Cheeps.

I also made a slight modification to the indicators for block contents. The Hudsonsoft Bee is now labled with a 'B' and the remaining unidentified powerup is labled with a 'U'.

I'll go mess around with 4-3 and see what happens.

sweet :thumbsup:  great work on 4-2 btw

hey on the next render (if there is one) can you number the chunks?  perhaps a number on the top row would work since therei's never any blocks on that row

Karatorian

  • Sr. Member
  • ****
  • Posts: 381
  • "Gotta get get ... 6502"
    • View Profile
    • Studio Karatorian
Re: Anyone Interested in Doing "SMB Special" for NES?
« Reply #123 on: March 12, 2008, 03:07:09 pm »
I actually thought about numbering the chunks, but I never got around to it. Seeing as you've requested it, I guess I should have, he he. Actually, I don't see there being another set of renders unless any more bugs come up. Other than not numbering the chunks, the rendering portion of my code is pretty much feature complete. I suppose I could make another set of renders just to fix that.

The only other changes I see making to my code are to improve the info file functions to output some more information. In particular, I had planned to output detailed sprite information. I may also clean up the code to the point where it could be released to the general public. (I don't know who'd really want it, but it seems a waste to have put all the effort in and not release it.)

I think the next item on my agenda will be to add the fixed version of 4-2 to the patch I made.

Keep up the good work.
Current ProjectsFinal Fantasy EngineSMB Special for NESStudio Karatorian
@loop: lda (src),y — sta (dst),y — iny — bne @loop — inc src+1 — inc dst+1 — dex — bne @loop

frantik

  • Hero Member
  • *****
  • Posts: 642
    • View Profile
Re: Anyone Interested in Doing "SMB Special" for NES?
« Reply #124 on: March 13, 2008, 02:56:06 am »
Ok so finished world 4 :)  I had to do a little trickery and change the pointers around so some enemies were turned into block objects instead cause i had tons of left over enemies and not very many blocks.  Some falling spikes were replaced with podobos.. they're not quite the same thing so i didn't include all of them in places where there's multiple spikes next to each other.  i did include them in hard mode though muhuhahaha.  also in 4-3 i didn't make the bonus a dead end but that may change if it's determined it indeed is a trap.  I also fiddled with the backgrounds to make them more like the SMBS backgrounds (taller trees, bushes in the tree/fence levels)

Download Worlds 1 thru 4









Download Worlds 1 thru 4


btw if you don't want to play thru the whole game to see the new stuff each time, you can enable world select at the main title screen using game genie code ALTEYZ.  Then press b at the main title screen and you can select a world as if you had beaten the game
« Last Edit: March 13, 2008, 06:28:58 am by frantik »

rbudrick

  • Jr. Member
  • **
  • Posts: 40
    • View Profile
Re: Anyone Interested in Doing "SMB Special" for NES?
« Reply #125 on: March 13, 2008, 10:38:47 am »
glad to hear the lift is back :D

hey Karatorian whats up with the random dark block in world 4-1 above the hidden 1up?

also:

does anybody know if lakitu comes back if you go up the vine and return to the level?  perhaps the dark block is the lakitu continuation code or something?

and is that really a trap bonus room in 4-3?  there's pipe connection data but no enterable pipe.  the pipe connection data is also weird pointing to chunk 5 which has no exit pipe


I believe the trap room is the one I mentioned in the DP thread.  By the way, was the "feature" in 4-3 added where you are forced to drop the elevator before the platform appears?

-Rob

frantik

  • Hero Member
  • *****
  • Posts: 642
    • View Profile
Re: Anyone Interested in Doing "SMB Special" for NES?
« Reply #126 on: March 13, 2008, 12:42:47 pm »
Quote
By the way, was the "feature" in 4-3 added where you are forced to drop the elevator before the platform appears?

i'm still not convinced it's intentional and/or appears in a proper copy of the game...  but regardless i haven't been spending much time on asm hacking yet and that is definitely something which is an extreme low priority

i was reviewing 4-3 again though and it definitely looks like there is no pipe in the proper exit pipe location so it is almost definitely a trap.  weird that there is a 1 up that looks like it's impossible to get though

rbudrick

  • Jr. Member
  • **
  • Posts: 40
    • View Profile
Re: Anyone Interested in Doing "SMB Special" for NES?
« Reply #127 on: March 13, 2008, 05:14:22 pm »
Well, the fact that the youtube video is a unglitched version of the game and the player specifically skipped this part tells me it was put there on purpose.  So, we either need to find this version or get the X1 version.

-Rob

Googie

  • Hero Member
  • *****
  • Posts: 1046
  • I'd like to solve the puzzle... Jiggers!
    • View Profile
    • My work in progress ROM Hacking site
Re: Anyone Interested in Doing "SMB Special" for NES?
« Reply #128 on: March 13, 2008, 05:17:03 pm »
I just played through the latest build, here's what I gotta say...

 :thumbsup: eeee!

Can't wait for the next build.  :D

MathUser2929

  • Hero Member
  • *****
  • Posts: 1644
    • View Profile
Re: Anyone Interested in Doing "SMB Special" for NES?
« Reply #129 on: March 13, 2008, 05:26:01 pm »
I tried pm'ing the guy who made the video on youtube, but I didn't get a responce.

Good job on world 4 anyway. It sucks that so much stuff needs replacing tho. Some of those things are what made the SMB Special, special. I hope you can add in the spikes or whatever in the end. Or someone will step up and put them in.

Once idea I had a while ago was what if you built the game on a Duck Hunt/SMB cart. and you can use the Duck Hunt space for parts of the hack.

Googie

  • Hero Member
  • *****
  • Posts: 1046
  • I'd like to solve the puzzle... Jiggers!
    • View Profile
    • My work in progress ROM Hacking site
Re: Anyone Interested in Doing "SMB Special" for NES?
« Reply #130 on: March 13, 2008, 05:28:03 pm »
Oh man, that be pretty cool! I gotta find that ROM to see how many kb it has, I don't even think I have that one. ^____________________^

Karatorian

  • Sr. Member
  • ****
  • Posts: 381
  • "Gotta get get ... 6502"
    • View Profile
    • Studio Karatorian
Re: Anyone Interested in Doing "SMB Special" for NES?
« Reply #131 on: March 13, 2008, 06:42:10 pm »
The SMB+DH rom I have is 80k, 4 banks of PRG-ROM and 2 banks of CHR-ROM. The header says that it's a mapper 66 (GxROM and compatible) game and (as is apparently common for mapper 66 games) has the mirroring set wrong. FCEU runs it, but I recall having issues with it in some other emulator.

IMO, I'd proably be easier to simply do a rom expansion on SMB than to hack up SMB+DH to use the extra space.

Edit:

Does anyone know how much faster the SMBS timer is than the SMB one? I know it's faster and would like to have my info file generator provide the equivilant time in it's header info section. However, I don't trust the timing of the emulators I'm usings. I've been running PC88Win through Wine, so that could affect it's timing and the docs for the Linux emu I've found (quasi88) specifically say that it's timing isn't very accurate.

I'm sure someone who knows SMBs internals could tell me exactly how fast the SMB timer goes down. (In frames, preferably.) So basically, I just need an idea of how fast the SMBS timer goes down on an accurate emulator or real hardware. I don't know which PC88 emu has the most accurate timing, but if someone does, could you check it out for me?
« Last Edit: March 13, 2008, 07:04:57 pm by Karatorian »
Current ProjectsFinal Fantasy EngineSMB Special for NESStudio Karatorian
@loop: lda (src),y — sta (dst),y — iny — bne @loop — inc src+1 — inc dst+1 — dex — bne @loop

frantik

  • Hero Member
  • *****
  • Posts: 642
    • View Profile
Re: Anyone Interested in Doing "SMB Special" for NES?
« Reply #132 on: March 13, 2008, 10:59:22 pm »
Quote
the fact that the youtube video is a unglitched version of the game and the player specifically skipped this part tells me it was put there on purpose

well we can't draw that conclusion from the player using a glitch, but I did check out the video and you can see that the platform is indeed missing during the brief flash of that room on the screen.



i still doubt it was intentional but who knows..  and it's still low on the priority list imo compared to hidden power up blocks and various enemies which need to be added.  I think falling spike enemies shouldn't be too hard to add since they don't have very complicated movements or anything. 

right now I'm mostly focusing on making sure all of the basic level layout is implemented as faithfully as much as possible.  once all 8 worlds are ported over then if nobody else has started work on enemy code i will try to see what I can do.  thats one area i'm not super familiar with in SMB so if anybody else wants to give it a shot be my guest.

karatorian here's the game timer routine in SMB which is called every cycle.  I'm not 100% sure but I think the timer ticks down every $18 game cycles when the GameTimerCtrlTimer expires.  edit:  yep i modified "ResGTCtrl: lda #$18                   ;reset game timer control" and was able to speed up the clock :)

Code: [Select]
;-------------------------------------------------------------------------------------
; $b74f-$b7a3 ( 0x375f - 0x37b3 ) run game timer routine
RunGameTimer:
           lda OperMode               ;get primary mode of operation
           beq ExGTimer               ;branch to leave if in title screen mode
           lda GameEngineSubroutine
           cmp #$08                   ;if routine number less than eight running,
           bcc ExGTimer               ;branch to leave
           cmp #$0b                   ;if running death routine,
           beq ExGTimer               ;branch to leave
           lda Player_Y_HighPos
           cmp #$02                   ;if player below the screen,
           bcs ExGTimer               ;branch to leave regardless of level type
           lda GameTimerCtrlTimer     ;if game timer control not yet expired,
           bne ExGTimer               ;branch to leave
           lda GameTimerDisplay
           ora GameTimerDisplay+1     ;otherwise check game timer digits
           ora GameTimerDisplay+2
           beq TimeUpOn               ;if game timer digits at 000, branch to time-up code
           ldy GameTimerDisplay       ;otherwise check first digit
           dey                        ;if first digit not on 1,
           bne ResGTCtrl              ;branch to reset game timer control
           lda GameTimerDisplay+1     ;otherwise check second and third digits
           ora GameTimerDisplay+2
           bne ResGTCtrl              ;if timer not at 100, branch to reset game timer control
           lda #TimeRunningOutMusic
           sta EventMusicQueue        ;otherwise load time running out music
ResGTCtrl: lda #$18                   ;reset game timer control
           sta GameTimerCtrlTimer
           ldy #$23                   ;set offset for last digit
           lda #$ff                   ;set value to decrement game timer digit
           sta DigitModifier+5
           jsr DigitsMathRoutine      ;do sub to decrement game timer slowly
           lda #$a4                   ;set status nybbles to update game timer display
           jmp PrintStatusBarNumbers  ;do sub to update the display
TimeUpOn:  sta PlayerStatus           ;init player status (note A will always be zero here)
           jsr ForceInjury            ;do sub to kill the player (note player is small here)
           inc GameTimerExpiredFlag   ;set game timer expiration flag
ExGTimer:  rts         
« Last Edit: March 13, 2008, 11:10:39 pm by frantik »

Karatorian

  • Sr. Member
  • ****
  • Posts: 381
  • "Gotta get get ... 6502"
    • View Profile
    • Studio Karatorian
Re: Anyone Interested in Doing "SMB Special" for NES?
« Reply #133 on: March 14, 2008, 03:56:22 am »
What does a game cycle mean? Is it one frame, or some other length of time?

Given that you where able to to speed up the clock, that gives me an idea. Rather than reduce the level time limits to an equivilent length of time, you could speed up the clock. Which do you think would be better?

Of course, we'd still need to figure out how fast the SMBS clock is either way.

On a related note, is Mario faster in SMBS than in SMB? When running, he seems to really zip along. (Oh dear, I can't belive I'm actually contemplating changing the physics. Is that a bad sign?)

I'm not too familiar with the SMB code myself, but I've managed to get a good grasp of 6502 ASM, so I am interested in helping out in that department. In regards to the changes you've implimented so far, have you been building from a modified disassembly, or have you just been hexediting the ROM itself? (Personally, I prefer the former method, if reasonable, which in SMB's case, I'd say it is.)

In either case, it'd be nice to know what changes you've implimented so far. While I could, of course, tease them out of the patches you've made, it'd be wasted effort.

Seeing as you've mentioned that space is getting pretty tight, I could work on expanding the ROM.

Finally, could anyone who's familar with the SMB code tell me whether doppelganger's or F.H.'s disassembly is better?

After looking at them, the answer is pretty clear, doppelganger's is the way to go. I've already gotten it to assemble and am looking into expasion.
« Last Edit: March 14, 2008, 05:25:21 am by Karatorian »
Current ProjectsFinal Fantasy EngineSMB Special for NESStudio Karatorian
@loop: lda (src),y — sta (dst),y — iny — bne @loop — inc src+1 — inc dst+1 — dex — bne @loop

frantik

  • Hero Member
  • *****
  • Posts: 642
    • View Profile
Re: Anyone Interested in Doing "SMB Special" for NES?
« Reply #134 on: March 14, 2008, 04:13:30 am »
i think it would be much better to just adjust the timer so it runs at the same time.  I was thinking one way you could measure the time using relative length meters would be to note where in the theme song the time runs out. 

Changes i've made so far besides level stuff

* add upside down pipes and red pirhanna plants
* modify ground tile layouts (like for castles and whatnot so the top brick is lower)
* modify background tiles a little bit
* modify underwater pipe palette and background palette
* modify underwater background type
* modify sideways pipe object to use the same tiles from the other sideways pipe

i think thats it so far..  and i've just been hex editing the existing rom..


I'm not sure what the F.H. disassembly is but doppleganger's is 100% complete.

MathUser2929

  • Hero Member
  • *****
  • Posts: 1644
    • View Profile
Re: Anyone Interested in Doing "SMB Special" for NES?
« Reply #135 on: March 14, 2008, 09:21:26 am »
Ok, I got another idea. IF, you have extra space left after doubling the size of the rom, perhaps you could dedicated that to unnique graphics, and code, and you could have those swapped in and out on a stage by stage basis. Like say, a stage requires a certain sprite, well, have the sprites not being used in vram, swapped out for the new sprite used in the extra space. So that way you won't have to replace enemies.

Another idea, at least for the hammer powerup. If you don't have space to draw it in, use the hammer bros hammer graphics, in it's pace, and try to make it replicate the SMBS hammer behavior.

SMB2J-2Q

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Re: Anyone Interested in Doing "SMB Special" for NES?
« Reply #136 on: March 14, 2008, 12:15:40 pm »
I don't want the timer in my SMB hack to tick any faster, please.

insectduel

  • Full Member
  • ***
  • Posts: 128
    • View Profile
    • Insectduel's Domain
Re: Anyone Interested in Doing "SMB Special" for NES?
« Reply #137 on: March 14, 2008, 01:05:08 pm »
That was a great project so far. I wish I could be in this project. But unfortunely, I have no sound card to play SMB Special with PC-88.

World 4-4 is kind of interesting too. May struck the idea for my next plus series project. Plus the level rips aren't that easy to design if I had to be in the project.
Please do not send me RHDN's private messages to contact me, you must use Facebook and I'll be able to reply to you quickly. I AM NOT AN ACTIVE RHDN MEMBER!

SonofMog

  • Full Member
  • ***
  • Posts: 194
  • Ho ho kupo
    • View Profile
Re: Anyone Interested in Doing "SMB Special" for NES?
« Reply #138 on: March 14, 2008, 06:17:35 pm »
I don't want the timer in my SMB hack to tick any faster, please.
Sorry to say, but I don't think it's your hack anymore... With frantik and Karatorian doing all the work if they want to make it as close a port as they can, it's their say.
shaqfu: Like I said, the mere concept of a bat'leth-wielding Moogle did me in.

Karatorian

  • Sr. Member
  • ****
  • Posts: 381
  • "Gotta get get ... 6502"
    • View Profile
    • Studio Karatorian
Re: Anyone Interested in Doing "SMB Special" for NES?
« Reply #139 on: March 14, 2008, 07:55:14 pm »
After looking at the layout and code structure of the ROM, I've found a nice way to gain a lot of space (about 3k) for additional code and data in the "hardwired" bank. This is by relocating the sound engine and data into another bank. The sound engine code is cleanly contained and there is only one entry point into it from the rest of the code. By relocating the sound portion of the code into another bank, and replacing the only entry into the code with a far call rather than a standard function call, a big chunk of space can be freed up.

Additionally, as ROM sizes have to be powers of two anyway, this also gives us a whole 16k bank of PRG-ROM to do whatever we need to with. Furthermore, the sound code would only use about 3k of it's bank, so there'd be another 13k or so there to work with as well. All in all, I think there'll be more than enough space.

While this may seem like a drastic fairly drastic change, it's pretty much neccessary to do something of the sort. Based on doppleganger's ROM map, there's only about 42 bytes of unused space in the SMB PRG-ROM. While I could proabably manage to squeeze the mapper handling code into such a small space, it wouldn't leave much room for anything else. This way, I free up a large area in the high bank, which is often the most useful area.

I should have a working demo of the expanded ROM some time soon. Once I get that done I'll start integrating the changes frantik has already made.

frantik: How much additional space for levels do you think you'll need? I know, as the saying goes, it's hard tellin' not knowin', but what would your estimate be? If we could manage to fit all the levels, other changes, and game engine (sans sound) into 32k, it would definetly simplify things.
Current ProjectsFinal Fantasy EngineSMB Special for NESStudio Karatorian
@loop: lda (src),y — sta (dst),y — iny — bne @loop — inc src+1 — inc dst+1 — dex — bne @loop