Jump to content

Photo

Super Mario Clone being written now


389 replies to this topic

#51 analmux OFFLINE  

analmux

    Stargunner

  • Topic Starter
  • 2,088 posts

Posted Sat Dec 27, 2003 5:57 AM

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

#52 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • 8,792 posts
  • Location:Baden-Württemberg, Germany

Posted Sat Dec 27, 2003 7:34 AM

? i have loaded the turbo basic version while ago but haven't seen any mario? i'll have to double check again.

#53 analmux OFFLINE  

analmux

    Stargunner

  • Topic Starter
  • 2,088 posts

Posted Sat Dec 27, 2003 10:35 AM

? i have loaded the turbo basic version while ago but haven't seen any mario? i'll have to double check again.


Well how about this:

I've posted the atr image again to be sure you have the right one.

---attachement deleted---

-----
mux

Edited by analmux, Sun Mar 25, 2007 1:40 PM.


#54 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • 8,792 posts
  • Location:Baden-Württemberg, Germany

Posted Sat Dec 27, 2003 6:10 PM

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

#55 analmux OFFLINE  

analmux

    Stargunner

  • Topic Starter
  • 2,088 posts

Posted Sat Dec 27, 2003 8:56 PM

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

#56 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • 8,792 posts
  • Location:Baden-Württemberg, Germany

Posted Sun Dec 28, 2003 3:03 AM

:) 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?

#57 analmux OFFLINE  

analmux

    Stargunner

  • Topic Starter
  • 2,088 posts

Posted Sun Dec 28, 2003 7:29 AM

:) 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

#58 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • 8,792 posts
  • Location:Baden-Württemberg, Germany

Posted Sun Dec 28, 2003 7:49 AM

unbelievable...

reminds me thist:


http://www.s-direktn...dj/session.html

or

http://www.s-direktn...cs/submiss1.jpg
http://www.s-direktn...cs/submiss2.jpg

:D

#59 TMR ONLINE  

TMR

    River Patroller

  • 3,007 posts
  • Beeping the horn on the data bus
  • Location:Leeds, U.K.

Posted Sun Dec 28, 2003 8:19 AM

Am i the only person who works out DLIs in their head, slaps some code together and tweaks until it goes then...? =-)

#60 Bryan OFFLINE  

Bryan

    Quadrunner

  • 8,397 posts
  • Cruise Elroy = 4DB7
  • Location:Puriscal, Costa Rica

Posted Sun Dec 28, 2003 9:07 AM

Am i the only person who works out DLIs in their head, slaps some code together and tweaks until it goes then...? =-)


There's at least 2 of us. :)

-Bry

#61 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • 8,792 posts
  • Location:Baden-Württemberg, Germany

Posted Mon Dec 29, 2003 3:50 AM

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

Attached Thumbnails

  • scan.jpg


#62 Bryan OFFLINE  

Bryan

    Quadrunner

  • 8,397 posts
  • Cruise Elroy = 4DB7
  • Location:Puriscal, Costa Rica

Posted Mon Dec 29, 2003 6:00 AM

Just curious, what are the common variations of 6502 mnemonics? I've seen some Polish code that barely looked like 6502 at all, or was I looking at a bunch of macros?

-Bry

#63 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • 8,792 posts
  • Location:Baden-Württemberg, Germany

Posted Mon Dec 29, 2003 6:14 AM

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/

#64 analmux OFFLINE  

analmux

    Stargunner

  • Topic Starter
  • 2,088 posts

Posted Mon Dec 29, 2003 9:19 AM

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, Sun Mar 25, 2007 2:00 PM.


#65 analmux OFFLINE  

analmux

    Stargunner

  • Topic Starter
  • 2,088 posts

Posted Sat Jan 3, 2004 4:48 PM

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, Sun Mar 25, 2007 2:05 PM.


#66 analmux OFFLINE  

analmux

    Stargunner

  • Topic Starter
  • 2,088 posts

Posted Sat Jan 3, 2004 8:07 PM

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

#67 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • 8,792 posts
  • Location:Baden-Württemberg, Germany

Posted Sun Jan 4, 2004 3:09 AM

@ 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?

#68 analmux OFFLINE  

analmux

    Stargunner

  • Topic Starter
  • 2,088 posts

Posted Sun Jan 4, 2004 7:55 AM

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

#69 analmux OFFLINE  

analmux

    Stargunner

  • Topic Starter
  • 2,088 posts

Posted Sun Jan 4, 2004 8:05 AM

....In the status-window period (between scanline 193 and 225), we have about 2200 cycles left. That might even be enough time to run RMT songs. Anyway it will be synced correctly to a DLI, so the human ear won't hear any delays....

-----
mux

#70 devwebcl OFFLINE  

devwebcl

    Dragonstomper

  • 886 posts
  • Location:Chile

Posted Wed Jan 7, 2004 3:24 PM

btw have you seen a video of a guy finishing smb 3 in 10 minutes?
it's really amazing! 8)
devweb

#71 DracIsBack OFFLINE  

DracIsBack

    River Patroller

  • 4,527 posts
  • Location:Toronto, Canada

Posted Wed Jan 7, 2004 6:56 PM

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.

#72 bjk7382 OFFLINE  

bjk7382

    River Patroller

  • 4,577 posts
  • Location:Michigan

Posted Wed Jan 7, 2004 7:10 PM

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?

#73 emkay OFFLINE  

emkay

    Quadrunner

  • 7,042 posts
  • What's up?
  • Location:Holy Grail ;)

Posted Wed Jan 7, 2004 7:14 PM

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.

#74 bjk7382 OFFLINE  

bjk7382

    River Patroller

  • 4,577 posts
  • Location:Michigan

Posted Wed Jan 7, 2004 7:27 PM

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.

#75 analmux OFFLINE  

analmux

    Stargunner

  • Topic Starter
  • 2,088 posts

Posted Thu Jan 8, 2004 7:32 AM

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




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users