Jump to content
IGNORED

Super Mario Clone being written now


analmux

Recommended Posts

I'll use Joystick-up to jump and to enter tubes that are upside down, and the trigger for turbo or to throw a fireball. Joystick down, to enter normal tubes and doors.

 

I Won't use any softwaresprites. I've got the full PMs left, as it's no MCS.

 

I've got PM versions of the mario puppet. Just watch the turbobasic demo that I've posted in the "Favourite game never ported to A8bit"-thread. There's a link earlier in this thread.

 

I've already got some run and jump routines. Just need to convert them to Assembly-language.

 

-----

mux

Link to comment
Share on other sites

demo is done 1995? why da hell does it need to take so much time? ;)

 

is there any reason why mario is just kind of monochrome? not possible to use better colors for the 3 color pm? just a thought.... you can run it in the emulator faster... ;)

 

anyway...well done... can't wait to get the 1st playable demo... :)

Link to comment
Share on other sites

demo is done 1995? why da hell does it need to take so much time? ;)

 

Like I explained at the thread-start. All the other time I was working on other things like highschool, composing music (on PC with Cubase VST), and gathering ideas for a token based linux/unix like Operating System for the A8bits (especially with hardware upgrades), thinking about the Grand Unifying Theory of Modern Physics, study etc. And besides, in 1995 I didn't spend as much time on my A8bit as now, and I never had an assembler until I recently found the community with all the nice software and Sio2pc, MyIDE stuff....And I'm a better coder now, as everything in 1995 had to be done in Turbobasic, with machine-code in decimal data statements in the .bas file. I used to know all mnemonics, and never made use of labels e.a.

 

For example: when I needed to copy 4 pages of memory I just did:

10 A=1536

20 READ D:IF D=-1 THEN END

30 POKE A,D:A=A+1:GOTO 20

100 DATA 104,169,0,133,203,133,205,169,224

110 DATA 133,204,169,128,133,206,162,4

120 DATA 160,0,177,203,145,205,200,208,249

130 DATA 230,204,230,206,202,208,240,96,-1



RUN



READY

Q=USR(1536)

 

Instead of:

PLA

LDA #0

STA z_sour

STA z_dest

LDA #224

STA z_sour+1

LDA #128

STA z_dest+1

LDX #4

[loop_1]

LDY #0

[loop_0]

LDA (z_sour),y

STA (z_dest),y

INY

BNE loop_0

INC z_sour+1

INC z_dest+1

DEX

BNE loop_1

RTS

 

Can you imagine how I coded my player missile engine the first way, and other stuff, like the title-screen betaversion of this game, and a digital sampler program. :) I always used a pen and a huge load of paper to make drafts of the routines.

 

is there any reason why mario is just kind of monochrome? not possible to use better colors for the 3 color pm? just a thought.... you can run it in the emulator faster... ;)

 

You might have noticed that all the colors are a bit out of tune, they all will be optimized at the end, however the monochrome mario didn't bother me that much, and I don't have much alternatives.

 

-------------

Progress on the scrolling routines: Scrolling stops at level boundaries now.

 

-----

mux

Link to comment
Share on other sites

:) no assembler? come on... mac/65, atari assembler, bibo assembler, torsten karwoth's 130xe macro assembler... all this tools i used at that time...

 

today is quite easier to code with XASM + PC tools... ;)

 

but stupid question... how have you ripped 1995 the nes code + gfx? or did you drew all hand by hand?

Link to comment
Share on other sites

:) no assembler? come on... mac/65, atari assembler, bibo assembler, torsten karwoth's 130xe macro assembler... all this tools i used at that time...

 

Nope, no assembler. When I started to work with Atari I was just a 9 year old kid (1989), and all I had was the 800 xl my father bought to program graphics art in basic, plus a 1010 cassette drive. The only game I had was on a tape, I remember it all too well, the Parthenon and the Bavarian Castle Jigsaw Puzzle, with that great title music (by Mozart). I still have the tune on my mobile phone :D

 

When I was 12 I coded my first stuff (simple move routines), and I didn't have a 1050 diskdrive until 1994. I never ripped the gfx and code, I did all by hand, computed all fontdata by hand at that time. It sure was the die-hard way of programming. I've still got all the tons of paper I drawed full. I simply wasn't aware of all the tools that had to be out there. At that time I thought I was the only one using an a8bit, and all other people were using PCs.

 

-------------------------------------

 

Okay, here are some pics of my paperwork/notitions. It did get very late last night :D

Link to comment
Share on other sites

bryede, xasm has several nice built in "macros" f.e.

 

mva, mvx, mvy, post increment and many more... once you are used to them you are coding definitly faster...

 

mva #value adress

 

will be assembled to:

 

lda #value

sta adress

 

sta adress,x+

 

will be assembled to

 

sta adress

inx

 

 

more here:

 

http://xasm.atari.org

 

http://atariarea.histeria.pl/x-asm/

Link to comment
Share on other sites

oky... analmux... here are my scribbles... the scribbles of a genius... ;) don't take it too serious... ;)

 

...FUNKY :P

 

-----

 

Yes, I took a mini-holiday from coding. That means, doing some homework :D

 

Tonight I'll return to the coding. Working on the sprite engine now.

 

Possibly tomorrow I'll start the Physical Modelling of the movements/mechanics/kinematics of mario, that means using the Euler-forward methods of velocities/accelerations to compute the locations.

 

-----

mux

Edited by analmux
Link to comment
Share on other sites

Okay, first of all, the sprite engine is working properly now. It took me just 2 hours to code it last thursday. My cousin was visiting me for 4 days, so I didn't find time yet to continue.

 

The mechanics part is also done.

 

NOW: Thinking hard about the Mario <-> Playfield interaction. Especially the slopes are a bit tricky (as Mario should be able to slide off them).

 

---------------

 

I've noticed a small problem, that might give trouble on NTSC machines.

My scrolling routine seems to eat a LOT CPU-cycles at certain points in time, especially in fast-scroll modes (1 tile = 8 pixels (horizontal) per frame), when scrolling diagonal, and both the horizontal AND the vertical wrapping buffer must be updated.

 

But I didn't optimize the code of the wrapping system yet. It uses a lot 'JSR's they seem to eat many cycles, and the Tile2charcode Lookup Table should be organized in a much different way (as now I need too much 'ASL's to compute offset addresses in the table).

 

However, I'm still fearing some time-conflicts in future. I should consider to optimize the scrolling routines first. Seems like I would need double buffering after all (don't have memory left for that :| ).

 

....I still need to experiment with the timing.

 

-----

mux

Edited by analmux
Link to comment
Share on other sites

Okay, I've encountered my first big (a little unexpected) problem, but after an hour of sleep I've got a very easy solution.

 

I'll need to trigger the scrolling and sprite routines at the start of the drawing of the playfield (at scanline 32), by a simple DLI.

 

The largest part of the computation (decompressing tiles, preparing display list, ANDing and mirroring sprite data) will be done in this period (see 2 in draft0). All results will be stored in a buffer, which will be read during the Vertical Blank Interrupt. The task of the VBI part is just to do some fast shifting of the final data bytes. This should be done in less than 1300 (at max.!!!) cycles, which leaves enough time for playing music and handling the game's logic (Mechanics / Movement) in both the PAL and NTSC configuration, so the big computation will be 160*(114-46)=10880 cycles. Should be FAR enough.

 

.....However, the sprite and scrolling engines must be drastically rewritten.... :|

 

-----

mux

Link to comment
Share on other sites

@ analmux

 

looks very good...

 

just simple question... why are you mixing up the VBL tasks into DLI/VBL?

 

because DLI has priority over VBL? i mean... i would assume that the music player should be the 1st VBL is executed as the human ear does hear evrey single delay in music imho much more than small gfx glitches...

 

i am sure that you can optimise your lookup tables as it sounds like with some ASLs etc in the main code... most of the time these operations can be computed directly into lookups...

 

and i am still wondering that you don't reverse engenieer the NES code.... ;) i am not a maths genie nor a physics and i am wondering if this physics a mario game really needs... :D but i am sure that these are some lookup tables as well... aren't they?

Link to comment
Share on other sites

just simple question... why are you mixing up the VBL tasks into DLI/VBL?

 

Well, in the period of time that the playfield screen is written we're not allowed to make any changes to the dlist. or screenmem., but we CAN actually do large computations, needed for the screenchanges. That's what I'm going to do now.

 

because DLI has priority over VBL?

 

I don't know what you mean???

 

i mean... i would assume that the music player should be the 1st VBL is executed as the human ear does hear evrey single delay in music imho much more than small gfx glitches...

 

That's true, but when the status-window is being drawed (Period 3) there's enough time to run a simple music player, that will be triggered by the bottom-DLI that changes color and font for the Status-window.

 

i am sure that you can optimise your lookup tables as it sounds like with some ASLs etc in the main code... most of the time these operations can be computed directly into lookups...

 

Right, I don't think I have another choice. It's really necessary.

 

and i am still wondering that you don't reverse engenieer the NES code....

 

I've studied the SMB3 code of the NES a lot (I did rip the NES ROM image on Atari 800xl by myself in 1995 and put in on 3 floppys), and I know for example where the level-decompressor is located, and I know how they compressed the levels, but more than that I do not know. I don't know where the sprite-routines and play-routines are located. Looking at the code, it seems there are really many L.U.T.s. But the NES code doesn't seem to be optimized either, or is the NES CPU a stripped version of the 6502??? They don't seem to use certain commands (BCD mode?).

 

:D but i am sure that these are some lookup tables as well... aren't they?

 

Could be, but the Mechanics part of my program won't need that much time at all, so I'd better use that for more realistic gameplay. In the Mario demo I wrote in 1995 I used a parabola lookup table though for the jumps.

 

-----

mux

Link to comment
Share on other sites

Here's a silly question, but I've wanted to ask it for a while. The NES Super Mario Brothers needs two buttons (1 - jump, 2 - fire) ... how will you deal with that on the XE with only one button?

 

While I think XE Commando is a great translation, one thing I don't like is the "hold down and press fire" to toss a grenade method. On the 7800 and NES, I got used to the second button and found myself constantly (mis) firing on the XE version.

Link to comment
Share on other sites

Here's a silly question, but I've wanted to ask it for a while. The NES Super Mario Brothers needs two buttons (1 - jump, 2 - fire) ... how will you deal with that on the XE with only one button?

 

I already asked this question and didn't get an answer.

 

So how are we going to run and jump at the same time?

Link to comment
Share on other sites

Here's a silly question, but I've wanted to ask it for a while. The NES Super Mario Brothers needs two buttons (1 - jump, 2 - fire) ... how will you deal with that on the XE with only one button?

 

I already asked this question and didn't get an answer.

 

So how are we going to run and jump at the same time?

 

 

???

 

 

Look above in the thread ;)

 

Analmux wrote:

 

I'll use Joystick-up to jump and to enter tubes that are upside down, and the trigger for turbo or to throw a fireball. Joystick down, to enter normal tubes and doors.

Link to comment
Share on other sites

Here's a silly question, but I've wanted to ask it for a while. The NES Super Mario Brothers needs two buttons (1 - jump, 2 - fire) ... how will you deal with that on the XE with only one button?

 

I already asked this question and didn't get an answer.

 

So how are we going to run and jump at the same time?

 

 

???

Look above in the thread ;)

Analmux wrote:

I'll use Joystick-up to jump and to enter tubes that are upside down, and the trigger for turbo or to throw a fireball. Joystick down, to enter normal tubes and doors.

 

Sorry, I thought I was keeping a good eye on this thread and didn't see it. Thanks for clearing that up. Sounds like it will work good.

Link to comment
Share on other sites

btw have you seen a video of a guy finishing smb 3 in 10 minutes?

it's really amazing!  8)  

devweb

 

Well, as you might have guessed, I was totally addicted to SMB3, and 10 minutes isn't far from my personal record of minimal needed time to finish the game. I can play the game with my eyes closed.

 

-----

mux

Link to comment
Share on other sites

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...