| View previous topic :: View next topic |
| Author |
Message |
Sonic 65 Newbie
Joined: 08 Sep 2009 Posts: 1
|
Posted: Sat Sep 12, 2009 6:00 am Post subject: Snake in 260 bytes for MD |
|
|
Hi guys - like snkenjoi and andlabs before me, I'm also from Sonic Retro. =P
I read through snkenjoi's thread on the smallest useful MD ROM and also TascoDLX's Megadrive demo, both of which inspired me to see if I could make some sort of simple game within the 260-byte TMSS limit that still worked on all MD models (note: this is untested on real hardware, but it works on all emulators, even Fusion with the TMSS bios).
The game pretty much plays like a basic Snake clone (collect food to grow bigger, if you hit yourself or the edges of the stage you die). There is no sound in this demo (not enough space ). It doesn't really look very pretty, but I guess that's to be expected.
ROM link.
Known issues are that when you get a food piece, a grey 8x8 tile appears in the top-left corner for a split second, and the controls aren't really as responsive as I'd have liked them to be. However, the game is still very playable.
I'll release the source after I comment it fully. If you're really impatient, you could try disassembling it or something. =P
If you seriously want a screenshot before downloading, behold:
 |
|
| Back to top |
|
 |
Shiru Very interested
Joined: 07 Apr 2007 Posts: 786 Location: Russia, Moscow
|
Posted: Sat Sep 12, 2009 6:13 am Post subject: |
|
|
This is good, though I think you could fit much more in 260 bytes.
The smallest possible Snake game was my obsession some time ago, I wanted to make it into 128 bytes or less. I've made 256 bytes version for ZX Spectrum with sound effects and restarting after game over (it was easily possible to make it smaller without sound, but it would be far from 128 bytes anyway), and few versions for 8086 PC without sound, but with restarting (it was 189 bytes or so). The most smallest Snake implementations I know is 144 bytes for 8086 PC and 121 byte for ZX Spectrum (written in FP calculator code). |
|
| Back to top |
|
 |
Christuserloeser Very interested

Joined: 28 Jan 2007 Posts: 124 Location: DCEvolution.net
|
Posted: Sat Sep 12, 2009 4:02 pm Post subject: |
|
|
Hey, thanks a lot for sharing !  _________________ http://www.DCEvolution.net - Gigabytes of free Dreamcast software for you
 |
|
| Back to top |
|
 |
TmEE co.(TM) Very interested

Joined: 05 Dec 2006 Posts: 1953 Location: Estonia, Mahtra village
|
Posted: Sat Sep 12, 2009 5:28 pm Post subject: |
|
|
Problem with 68K is that your typical opcode takes minimally 2 bytes, and lot of them take 4 or more bytes. Z80, 8080 and other 8bit CPUs have things in 1 or 2 bytes usually so you can have much more in same space.
Anyway, this is nice  _________________ Mida sa loed ? Nagunii aru ei saa  |
|
| Back to top |
|
 |
8bitwizard Very interested

Joined: 24 Feb 2007 Posts: 155 Location: Austin, TX
|
Posted: Thu Sep 17, 2009 2:07 pm Post subject: |
|
|
An even bigger problem is that the word "SEGA" has to be located at $0100. Thus, no TMSS-compatible ROM can be less than 260 bytes.
Beyond this, there is quite a bit of overhead just to get it to start up: 8 bytes for initial A7 and PC, 4 bytes for "SEGA", and 20 bytes for handling TMSS. But loading A0 saves 4 bytes later, so that's really 8 + 4 + 16 = 28 bytes, before you can do anything useful.
Then the VDP has to be set up, taking 12 more bytes just to set the registers, then you have to clear VRAM, then you have to set up the joypad (but I don't see it storing $40 to set up the control port).
So you can't directly compare the size of this against the size something where the hardware has already been initialized for you. |
|
| Back to top |
|
 |
jeanetti Newbie
Joined: 03 Nov 2009 Posts: 2
|
Posted: Wed Nov 04, 2009 11:26 am Post subject: |
|
|
Where can i download a donkey kong country rom that doesn't lag? i want to download a donkey kong country rom (first one) to play with my super nintendo emulator but everytime i download one it lags...where can i download one that i can play at normal game speed and doesn't lag.
_____________________
market samurai ~ marketsamurai ~ marketsamurai.com
Last edited by jeanetti on Sat Nov 07, 2009 9:46 am; edited 1 time in total |
|
| Back to top |
|
 |
Flygon Interested

Joined: 28 Sep 2009 Posts: 43
|
Posted: Wed Nov 04, 2009 11:34 am Post subject: |
|
|
Uh, jeanetti, you've both hit the completely wrong topic and forum to be asking that question.
I suggest asking that question somewhere else.  |
|
| Back to top |
|
 |
LocalH Very interested
Joined: 19 Dec 2006 Posts: 132
|
Posted: Wed Nov 04, 2009 3:47 pm Post subject: |
|
|
Back on topic...
For those of us unencumbered by TMSS, I wonder what the smallest possible version of this would be. I've got a TMSS-less Gen1 with my trusty SMD so I could test to make sure it works on real hardware. Based on 8bitwizard's post, I see a minimum of 24 bytes that can be discarded (since you don't have to handle TMSS) but I'm wondering if one could abuse the header area (since there are no restrictions on executing code between $0-$1FF AFAIK, even on TMSS MDs). I bet you could get a TMSS-less version of this comparable to other systems (I would guess 160-192 bytes given the differences in instruction set). |
|
| Back to top |
|
 |
Fred Newbie
Joined: 20 Sep 2008 Posts: 5 Location: Sweden
|
Posted: Tue Nov 17, 2009 2:00 pm Post subject: |
|
|
| bot wrote: | | lololololdonkey konglolololol |
what |
|
| Back to top |
|
 |
|