Jump to content
IGNORED

Super Mario Clone being written now


analmux

Recommended Posts

  • 2 weeks later...
  • 1 month later...

I've not worked on Mario since christmas, as I encountered a speed problem in the scrolling engine which has still to be solved.

 

In the meantime I was very busy with college, exams, relaxing a little, making some music and I had still other plans for demos & programs on the A8bit. I nearly had a nervous breakdown this year, and I decided to take it all easy. I'm doing physics & maths at the same time.

 

I'm a man with too many plans :roll:

 

Soon I will pick it all up again and continue the developing.

Link to comment
Share on other sites

Soon I will pick it all up again and continue the developing.

 

Well, we don't want you to go crazy working on it. :P It just looked like a promising game that I would hate to see get put off forever.

 

A game this good can take as long as needed, but I just hope it gets finishied someday. :)

Link to comment
Share on other sites

  • 3 months later...

Okay, I officially started coding again today for the Super Mario clone.

 

It took me two days to dive into my old code from christmas 2003, and understand what I did at the time.

 

Good news:

Scrolling engine updated. Version 2 is working in 75% of the cputime of version 1:

 

-I rearranged a tile lookup table

-I got rid of many time consuming asl/rol instructions

-I unrolled a piece of code that's responsible for writing a new column of graphics in the border areas

 

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

Super Mario Clone status:

-levels & graphics: complete

-music: still to be written

-screen/scrolling engine: working

-sprite engine: working

-playing routine: to be written

-title screen + level decompressor: ready

 

Work already done (estimate): 87 %

Link to comment
Share on other sites

Next step: getting the play-routines working

 

this time I've got some weird walk/scroll bug but if you try very hard, you can reach the end of the level before time is up. :D

 

you can only use joy left/right or reset to pick another level.

 

...I hope I can finish the game before 1 august ABBUC deadline. :ponder:

 

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

Super Mario Clone status:

-levels & graphics: complete

-music: most music still to be written

-screen/scrolling engine: working

-sprite engine: working better

-playing routine: to be fiddled with

-title screen + level decompressor: ready

 

Work already done (estimate): 89 %

Link to comment
Share on other sites

just bought yesterday in munich NES SuperMario for GBA and played it on the trip back on train. it's really most of the time 4 colour or less... so it shold not be a problem to port... :8

 

i would like to see the SNES Mario 1-3 Super Mario Allstars on GBA and not the original ones... and the leveldesign was really copied 1:1 in giana sisters... no wonder that nintendo suited rainbow arts...

Link to comment
Share on other sites

I like your efforts so far, mux.

 

If you ever found someone to produce this in cartridge form, I'd definitely get a copy..though I still don't have an Atari computer for it yet.

 

Just to bump this up a bit, I now have a working 800XL and I'm hopeful that someone will be able to produce this game on cart.

 

I was wondering if I could play it using a sio2pc device? :ponder:

Link to comment
Share on other sites

I tried this in Atari800win 3.1 - Under NTSC setting it crashes after title screen - in PAL mode I can get to the start but then it is real goofy - Mario moves on his on back and forth and every so often the screen will scroll over 1 block.

 

Oh well - looking at it still makes me want it :)

Link to comment
Share on other sites

...hmmm,

 

Well, I want to make it NTSC compatible, but maybe I've got to recode it partially then. I didn't try to run the game on the emulator with NTSC mode yet. I should do that.

 

for the ABBUC contest it is only required to run in PAL mode, but when I've finished the PAL version, or if I don't make it before the programming contest deadline, then I'll definitely make it for both PAL/NTSC modes.

 

I remember earlier versions of the game DID run better on NTSC machines, maybe some new routines are not NTSC-friendly.

Link to comment
Share on other sites

Okay, after a short debugging session it works on NTSC machines now (see below). Today I implemented also some vertical movements, but still very experimental. It doesn't seem to do what I want at all. Though it's fun to play with.

 

I found the NTSC lockup bug in a rather unexpected piece of code, namely the code that clears the PM-base before playing/moving around in a level. The code makes use of a custom subroutine I made to clear a number of pages of memory. The weird thing is: in PAL mode it doesn't lock up, however in the past I've already deactivated a piece of code that clears the screenmemory, which resulted in a total lockup even in PAL mode, so it is a fundamental problem, possibly caused by corrupt (i.e. ill-defined) labels in assembly code.

 

are there any NTSC coders that encountered similar problems in the past???

 

(progress still 89%)

Link to comment
Share on other sites

Okay, this is a weird story:

 

Christmas 2003: I started coding the main scroll&play routines, I encountered a bug. When clearing pages 195-199 (PMbase1) the atari locked up (PAL mode). Then I changed it to 196-199 (4 pages instead of 5). The lockup didn't occur anymore.

 

There was a second area that needed to be cleared: pages 204-207 (PMbase2), so I wrote another clearing routine. Now the atari in NTSC mode locks up. How is this possible????

 

lda #0    ;value to be stored in memory

ldy #204  ;starting page

ldx #4    ;number of pages

jsr fillmem

 

Well. I tried many different things: Firstly clearing 3 pages (204-206) and in another version clearing pages (205-207) (with my clear-page subroutine: x-register denotes number of pages!!!): so if you clear 3 pages nothing goes wrong, and it doesn't matter which pages are cleared.

 

weird isn't it!!

 

then I just thought that maybe a zeropage register ("z_dest" as postindexed indirect,y instruction) was used twice (f.e. by a DLI or VBI routine, so things will interfere). The fillmem routine makes use of a zeropage pointer for writing 0's into locations.

 

this wasn't the case, but when I turned off all interrupts, the problem was solved....hmmmm :!:

 

Now this is the explanation, and it has nothing to do with PAL/NTSC-compatibility:

 

The ingame screen is divided in 2 parts: playing field and status window. A Displaylist Interrupt is triggered between them that changes fontpage and setcolors. The DLI however makes use of the x-register !!!! (pagecounter of fillmem routine) and will take the value zero when the DLI is executed:

 

pha

lda #newfontpage

sta wsync

sta chbase

ldx #3

loop0

lda newsetcolors,x

sta colpf0,x

dex

bpl loop0

pla

rti

 

 

WELL: beginners mistake #1: I didn't save x to the stack, as you should always do in interrupts, so after the DLI was executed, a zero was returned to x, which results in 256 pages to be cleared: THE WHOLE atari memory: 64 kbytes :twisted:

 

Now I did insert the save x (txa pha) and load x (lda tax) and the problem is solved:

 

pha

txa

pha

lda #newfontpage

sta wsync

sta chbase

ldx #3

loop0

lda newsetcolors,x

sta colpf0,x

dex

bpl loop0

pla

tax

pla

rti

 

 

BUT, we've got just one question left: why on NTSC and not on PAL:

 

well, the clearing of the memory always starts at an exact timing and clearing 4 pages takes more cpu time than clearing 3 pages so: while a PAL frame is longer than an NTSC frame, we can clear exactly 4 pages in a PAL frame, and exactly 3 pages in an NTSC frame BEFORE the conflicting DLI occurs (the clearing process is clearly done in less than a frame). That explains why I couldn't clear 5 pages in PAL mode, but just 4.

 

I thought there was some kind of ghost hiding inside my atari, but now this clears things up, and after all I understand what went wrong.

 

.....STUPID.........STUPID.........STUPID.... :yawn:

 

 

....but now it should work :)

Link to comment
Share on other sites

Nice to know I'm not alone in creating really weird bug puzzles to try and figure out! It always amazes me what the cause of some of these bugs turn out to be.

 

You're making good progress. :thumbsup:

 

In case you don't already know - Sorry to say there is some kind of problem it running when the emulator is running in NTSC(Atari800WinPLus 4.0 beta3)

Link to comment
Share on other sites

mike...you mean the "Gameboy" style of scrolling??? maybe simply because with antic you can scroll up to 4kb with the LMS commands...and this is easier... ;) or you leave it completly out like some of the polish games...

 

pick a GB(A) emulator like no$gb and watch the vram then you see how you have to scroll on gameboy...

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