Jump to content
IGNORED

Super Mario Bros. on Atari 8bit?


analmux

Recommended Posts

One Faster way to clear 2k of memory is to do a partial code unroll, doing multiple stores per loop. Something like this

 

LDA #0

TAY

ClearLoop

STA $00,Y

STA $80,Y

STA $0100,Y

STA $0180,Y

STA $0200,Y

STA $0280,Y

STA $0300,Y

STA $0380,Y

STA $0400,Y

STA $0480,Y

STA $0500,Y

STA $0580,Y

STA $0600,Y

STA $0680,Y

STA $0700,Y

STA $0780,Y

INY

BPL ClearLoop

 

I am not sure why you need to keep clearing Pages 0 & 1 during the main game play.

Edited by peteym5
Link to comment
Share on other sites

Some ground could be gained by optimisation of the scrolling. I assume the original doesn't just unpack an entire level into raw character data then just move the window over it?

Exactly. It's unpacking the stuff on the fly. After scrolling 16 pixels to the right it starts to unpack new 'metatiles' from AreaData to the metatile buffers at $0500-$069f. I'd call this unpacking stage 1. After that there's another unpack, to explode the metatiles to real charcodes (2*2 chars for every metatile). This is unpacking stage 2.

 

 

i.e. when you're writing characters to columns greater than 208 or so, also write them into columns starting at zero. When your window origin reaches position 208, set it back to zero. That way, you can have a level which can be infinitely long, and you can do H-Scrolling by rendering new data only and not having to perform any move operations.

The MWP scrolling method is also possible in this situation. MWP even supports unlimited 8 dir scrolling, and it takes just one 1kb. Anyway, one idea could be to do the alternating antic 4 mode (13*2 charmode lines), using alternating fonts, and using the same starting address (LMS) for any pair of charmode lines. Then only 512 bytes per screen are needed (at max), and we could do a precompute of both scrolling stages 1 & 2 at once, and prepare 8 screens, to fill up 4 kb. I've never seen a SMB level longer than 16 screens, so it could be easily stage 1&2 unpacked in 2 runs. The first run is before entering the level, the executing of unpacking the 2nd run can be spreaded over many frames from the start. However, we could as well do just stage 1 unpacking and do wrapped scrolling instead, using 1kb (or 512bytes, if the software mode "double antic 4" is used). As far as I can see the stage 1 depack takes the most time of all stages. The NES still needs to do screen update buffer after stage 1 AND 2.

 

So, maybe a nice solution is stage 1 unpacking: 16 screens at max. thus 4 kb of metatiles. These metatiles are needed for the mario - playfield interaction logic. The stage 2 unpacking can still be on the fly. The buffers aren't needed.

 

 

We can also take advantage (regardless of the mapping method employed) of the fact that we can pre-render to the right of the visible window, doing a small bit each frame.

Indeed. Spreading out will help a lot. On NES the code has activity peaks after scrolling 16 pixels, and this could cause flickering as when there's also 5 enemy sprites on screen, 1 vbi will take more than 1 frame of cpu time. So, using some logic, doing some precomputing and spreading the needed action would be the best, I think.

 

 

The main problem of the software sprite rendering might be solved using some precompute engine, however in many situations the enemies show no regular behaviour.

 

F.e. just one goomba walking left can be precomputed and stuffed in a special / separate font. 2 goombas will get more difficult, as when they encounter obstacles (say a pipe), it'd need to bounce back. The other goomba behind him will now bounce on the first goomba etc. ...we cannot always prepare for the bounce positions, and all the precompute engine can do is computing the rolled gfx for the 'non-overlapping' parts of any sprite. The bouncing parts must be computed in real time.

 

In later levels we have the bouncing / flying turtles, and to precompute them all would be a real challenge. So, these must be rendered in real time. The same applies for enemy sprites falling from a tile boundary.

 

Anyway, font flipping won't work in this case, I'm afraid. However, in totally different cases, font flipping COULD be a solution.

 

But, if we'd take a look at precomputing the stuff, we really need some flexible engine. This is already a real challenge.

 

Another solution could still be to minimize the peaks of the main screen routines, and try to use PM instead. Up till now that would be the easiest.

Edited by analmux
Link to comment
Share on other sites

But, anyway to clear things up. I'm not sure if I'll spend the time to finish this idea of porting SMB over to A8. So, people please DON'T consider this as a new project for me

 

Aw crap, now you say that! i wrote it up as news for Retro Gamer!

Link to comment
Share on other sites

  • 4 months later...

Any progress? Hello! :)

Nope. But did you expect any?

 

See these remarks from the first post:

 

I'm wondering if at least a nice port would be possible
But last days I've been thinking of possibilities of porting, and I'm interested in others' views.

It could be a subtle difference, but these two sentences, i.e. the main idea of this thread, do NOT mean that "I AM GOING TO PORT SMB TO A8".

 

What I was mainly interested in is whether others are interested in this idea, and if they have some ideas of how to solve some of the bigger problems.....or in other words, and maybe the question was a bit unclear, whether we could start some open-source project or at least a community project. But, the only reaction, be it rather indirect, was another thread about a PM multiplexer. You might remember a demo with a Mario-sprite and some enemies (SMB level 1-1).

Edited by analmux
Link to comment
Share on other sites

  • 1 year later...

Analmux: Any chance you can make your most recent .ATR of this + your modified source available? All the other links are dead now...

 

All I could find is this

 

This is FANTASTIC!

 

Here you are...latest version (5)

 

BTW, I feel a bit confused as I know my stuff was downloaded more than 66 times. No one else was helping you in the meantime. :?:

Link to comment
Share on other sites

  • 2 months later...

either analmux is deleting his own links, or there are higher powers at work. I totally depend on AA to store all important things Atari.

 

It's not hard to imagine Al getting hate mail from Nintendo's lawyers :)

 

analmux: please post one more time so I can make the file STICK!

Link to comment
Share on other sites

I have been checking progress on this thing for years. I believe the only good way is to use a multicolor multiplexer. I have done some recent experiments and managed to animate 10 multicolor sprites that are 20 pixels high x 8 wide. I don't have time to get involved with this mario project. This is all done in VBI & DLIs. I am not sure how many sprites Mario had on the screen at once.

mc_spritedemo.zip

Edited by peteym5
Link to comment
Share on other sites

Can't seem to get it to run in Altirra. Can anyone help with correct settings please? :) Thanks in advance.

Setup as 64K 800XL

 

System > Hardware > 800XL

System > Firmware > 600XL/800XL

System > Memory Size > 64K (800XL/1200XL)

 

That did the trick! +1 rep for you! :)

 

Wow! Very impressive, I must say. Keep up the great work! Another +1! :thumbsup:

Link to comment
Share on other sites

  • 8 months later...

I needed a smile today, so I necrobumped this after making it completely through the first level !!! I had someone play the real thing on an emulator next to me so I could see what to do.

 

It would be cool if i could get the nes emulator synced with Altirra so the keyboard would be read at the same rate on both emulators.

 

Good times on the A8

Edited by fibrewire
Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...