Shop Learn
Manic Miner Progress — Parallax Forums

Manic Miner Progress

BaggersBaggers Posts: 3,007
edited 2007-05-29 20:42 in Propeller 1
Hi All,
This is the TV out from the Propeller, running my Manic Miner.
Looking good so far though, don't you think? smilewinkgrin.gif
I've got levels up and running on the chip, now to sort out where the sprites are and start adding some hop.gif
It now cycles through ALL 20 levels ( set up as hydra pins for tv out 12-14 and 5Mhz clock ) yeah.gif

Post Edited (Baggers) : 5/11/2007 8:54:28 PM GMT


  • AndreLAndreL Posts: 1,004
    edited 2007-05-11 08:56
    Well, anyone can take a screen shot of ANOTHER game [noparse]:)[/noparse] Let's see you get one working yourself, then we will all be impressed.

  • BaggersBaggers Posts: 3,007
    edited 2007-05-11 09:21

    It's not a screen shot of another game! surely if it was a screenshot from a game, it would have the sprites on it too.
    It's my SDL app I wrote last night, that reads through the data and displays it correctly.
    So yes it is working so far as such, just in SDL on a PC.
    I can view all 20 levels.
    Like I said, next step is to get something on the TV now that I know how the data is stored.

  • CardboardGuruCardboardGuru Posts: 443
    edited 2007-05-11 12:51
    Jolly good Baggers. Was it compressed? Run length encoding for the maps perhaps?
  • mahjonggmahjongg Posts: 141
    edited 2007-05-11 13:40
    wow, that is fast!

    I was aware that knowing the exact format would speed up the process, but this is a very fast result!

    CarboardGuru, all the info about the actual format can be found at the "room format" page here:
    and there you can see that all the block graphics are stored as nine bytes, one byte color attribute, and eight bytes for the 8x8 graphics block. The whole "room" (screen) is built up from these building blocks. Run length encoding is not used, nor necessary. How it all works is actually quite interesting and very well thought out!

    Baggers, I assume that you only wanted to test the block graphics on the PC to see if you could get a result quickly, and that after you have ported your code to the HYDRA all the other data in the room format will be directly tested on the HYDRA, instead of on the PC?

    Well, good luck with porting it to the HYDRA, I am curious whether the TV driver of Donkey Kong can be used, or whether you have to write a new driver.

    Also, the title screen, and "game over" animations are not in the "room format", so I am curious about them, are you going to have a title screen and "game over" animation?

    Note that the original title screen was just a passive graphics screen, but made a very smart use of the spectrums "blinking attribute" to emulate an animation, so that all the spectrums CPU time could be used to create the title music.

    I hope you also found the main technical page about the MM and JSW too, if not its here:

    The page about MM & JSW sound is here:

  • BaggersBaggers Posts: 3,007
    edited 2007-05-11 14:41

    It's more attribute compressed, each level is 16x32 bytes ( an attribute colour ) then there are 8 characters per level which are used ( blank/wall/crumble/conveyor etc. ) each character definition is 9 bytes 1 byte attr ( matching the one from the level map ) then 8 bytes char (8x8 pixels). all levels are 1024Bytes. 20KB for the full 20 levels. wonder if i can get it all in 32KB [noparse]:)[/noparse] that'll be a challenge.


    thanks [noparse]:)[/noparse] and yes, that was a test on the PC to see to make sure that my understanding of the data layout was correct, ( thankfully it is ). now for porting it to Prop.
    as for TV driver, I can use this for now, but I'll probably re-write it later on if need be, to make it more spectrum 2colour friendly.

    as for the game over / foot screen, that should be easy to replicate. and the title screen, I can use some extra characters for that, as the levels only use 8
  • BaggersBaggers Posts: 3,007
    edited 2007-05-12 18:52
    I've Swapped over to the spectrum tv display, for that authentic look for attributes with the characters, as it brings back lots of old memories [noparse]:)[/noparse]
    Anyway, I've got it working on that now too, and the little miners walking on the bottom third of the display.
    will post progress tomorrow.


    edit: I've also added a VSync notifier to the spectrum TV display, so I can sync displaying graphics, to save flicker [noparse]:)[/noparse]
  • CardboardGuruCardboardGuru Posts: 443
    edited 2007-05-12 23:20
    Looking very good. Fast progress. Unfortunately I never played Manic Miner, being a BBC Micro user. So I don't get the full nostalgic feel. I borrowed a Speccy once, and the game that stood out for me from the collection was Daley Thompson's Decathlon.

    I remember the port of Chuckie Egg to the BBC Micro, complete with Spectrum like single colour sprites. That was a fun game.

    Looks like we have a few Brits here.

    BTW, I suggest that you add updates at the end of your thread rather than edit the first post. It kind of makes a nonsense of the replies for anyone reading later. Also what's this binary business? Where's the source?

    Post Edited (CardboardGuru) : 5/12/2007 11:25:13 PM GMT
  • AndreLAndreL Posts: 1,004
    edited 2007-05-13 01:52
    I see you prototyped on SDL. Anyway, very cool, I am going to download and try now.

  • AndreLAndreL Posts: 1,004
    edited 2007-05-13 02:58
    Very cool! this is going to be killer, don't forget sound effects!

  • BaggersBaggers Posts: 3,007
    edited 2007-05-13 07:19
    Yeah, BBC had some amazing ports, chuckie egg and defender being two of my faves, revs + elite being awsome games too.
    As for the binary, sorry, I wanted to optimise the code a bit, and comment it, since these posts are not only for nostalgia, but they're for education purposes too, and I hadn't commented it, and since your driver and jlcebrian's driver are heavily commented, I thought I best copy suite... So once that's done I'll post source. [noparse]:)[/noparse]
    edit: Yup, nice to see some brits on here too. ( anyone tried doing a PAL tv out?

    yes, I prototyped on SDL, as it's easier to know that once I know exactly how the graphics are stored, then I could convert quickly to hydra.
    and thanks.
    and don't worry, I won't forget to add sound effects [noparse]:)[/noparse]

    Oh, and for future reference, updates will be at the bottom, not edited to the top [noparse]:)[/noparse]

  • AndreLAndreL Posts: 1,004
    edited 2007-05-13 10:40
    I like how small the tiles are, I have always liked "tiny" games, I think they look cool, lemmings for example was very cool with the little guys.

  • mahjonggmahjongg Posts: 141
    edited 2007-05-14 00:15
    Baggers said...
    I wonder if i can get it all in 32KB [noparse]:)[/noparse] that'll be a challenge.
    Well, as I said in the beginning, -you don't have to fit it all into the 32K-!

    You could put all the levels into the unused EEPROM room above the 32K border using the "Hydra Asset Manager" tool (see:, and download the level you want into a 1K buffer when you need it, using your own I2C download routine.
    You can pilfer the code to do that from FemtoBasic (see: or from some other project that uses a I2C routine to directly access the EEPROM, there seem to be many these days.

    What is this "SDL" you are talking about? is it (for example) "Simple Declarative Language" or "Specification and Description Language", or something else altogether? and why did you use SDL for this quick prototyping job? I have never heard of it, is it simple to use?

    It's very interesting that suddenly we see a deluge of new games, and game building blocks. (Donkey kong video driver with multicolor sprites, spectrum video driver, Hydra Dense Music Format etc. etc.). This promises much for the future! smilewinkgrin.gif

  • BaggersBaggers Posts: 3,007
    edited 2007-05-14 11:18
    I've updated the photo and binary, ( sorry still no source, as I wanna get things moving so I can tidy it up ( comment it ) before releasing source.

    SDL = Simple DirectMedia Layer ( see:· )


    Cheers for links mahjongg, the problem with using >32Kb is that it's awkward to get it there in the first place.
    I want it to load quickly and easily.
    What I might do, is have no buffers, just use the level data as screen etc. and make it so you download the game directly to EEPROM first, as it will overwrite the level data.

    It's getting there though roll.gif
  • CardboardGuruCardboardGuru Posts: 443
    edited 2007-05-14 12:56

    Why don't you convert the levels into run length encoded versions? If you look at the screens, they all consist of long horizontal runs of the same tile. So store a byte for the tile followed by a byte for the run length for each run*. And then uncompress them at the start of each level.

    So, looking at the first 2 lines of central cavern as shown in the picture, the first line has 11 runs = 22 bytes
    The second line has 5 runs = 10 bytes. (but it shares the last tile of line 1, so actually 4 runs = 8 bytes)
    Versus the standard 32 bytes per line.

    Looking at the screens, a run length of greater than 16 is rare, so you could perhaps use 4 bits for the run length and do 2 run lengths per 3 bytes rather than per 4 bytes.
  • BaggersBaggers Posts: 3,007
    edited 2007-05-14 13:06
    Yeah, CardboardGuru, I've already thought about that, will do that once I'm closer to finishing, [noparse];)[/noparse]
    As for byte per count, I could easily do that anyway, as there are ONLY 8 background characters, so could even be up to 32 length [noparse]:)[/noparse]
    but again, that's for later, as I'm now doing the sprite renderer, in a seperate asm cog, as SPIN is taking about 48 scan lines just to draw the four Willy's on the bottom and the one on screen, and it's just writing words, not even or'ing them onto the screen.

    Cheers for the input though [noparse]:)[/noparse]

    Also, I was keeping the levels uncompressed for the moment, because I was going to make it play the many ManicMiner mod's it appears there's a few versions where people have made editors and changed the levels.
    but I'll probably add the compressor exe, so that people can still change to what map levels they want.
  • BaggersBaggers Posts: 3,007
    edited 2007-05-20 21:47
    Just to keep you all informed, I'll be posting a playable in a day or two [noparse]:D[/noparse]
    I've had fun doing this, and will most likely have a crack at JSW after this is done [noparse]:)[/noparse]
    I'll be releasing two versions,
    One for Hydra ( I don't have a hydra, so I'll probably need someone to test it for me. )
    And the other for the ProtoBoard, so normal Prop users ( like myself ) can play it too.


    I Still have Eugene to do and slow moving baddies, and some other bits and pieces, then it's ready for a release.
    then I'll comment the source, ( if people want it commenting that is, otherwise I'll not waste time doing that and jump onto JSW )
  • RedNifreRedNifre Posts: 84
    edited 2007-05-21 01:22
    Hm, I tried the binary, but it doesn't work. The screen stays blue (default color of my screen if it has no signal). :-/
    I use a LCD TV with PAL and I loaded the binary to RAM.
  • BaggersBaggers Posts: 3,007
    edited 2007-05-21 08:21
    Hi RedNifre

    Does your LCD handle NTSC? as the JLC Spectrum TV is an NTSC display [noparse]:([/noparse] I'm in the UK ( PAL area too ) but my TV handles NTSC, if yours does, then it's something else, JLC did say he had timing issues with some LCD's, maybe your LCD needs stricter timing.

    I will however be trying to re-do the Spectrum TV so that it's all my code, and I'll be attempting a PAL display too [noparse]:)[/noparse]

  • RedNifreRedNifre Posts: 84
    edited 2007-05-22 03:12
    Mh, my TV can't handle NTSC, so that's most likely the cause.

    Oh well, have to wait for your PAL code then. [noparse]:)[/noparse]
  • BaggersBaggers Posts: 3,007
    edited 2007-05-22 08:02
    Ok, sorry to hear it didn't handle NTSC.

    PS, I all but finished it last night, I just have some timing issues with the Solar Power Level.
    So be expecting the first release some time later today [noparse]:)[/noparse]
    It's not commented as of yet, but that can come later if requested.


    By the way RedNifre, do you use a Protoboard, or Hydra, I'm wondering, cos·most hydra·things are NTSC.

    Post Edited (Baggers) : 5/22/2007 8:07:42 AM GMT
  • CardboardGuruCardboardGuru Posts: 443
    edited 2007-05-22 11:59
    Baggers said...
    PS, I all but finished it last night

    Wow! Staggeringly fast performace!
  • BaggersBaggers Posts: 3,007
    edited 2007-05-22 12:05
    Thanks, I'm just packaging up 3 versions

    1. Hydra version
    2. Proto-board version - hi-eeprom level data
    3. Proto-board version - SDCard level data

    I'll need someone to test the Hydra version for me.
    once it's working, I'll release source.

    I'm just taking my daughter to school now, then I'll post the hydra version for someone to test and give feedback, while I pack and upload Protoboard versions.

  • BaggersBaggers Posts: 3,007
    edited 2007-05-22 13:11
    Hydra version has been uploaded, for someone to test, so that I know it works on a Hydra.
    Can someone test it, and let me know if it works.



    Edit: I've added www. and added a .zip file.

    Post Edited (Baggers) : 5/22/2007 2:34:35 PM GMT
  • CardboardGuruCardboardGuru Posts: 443
    edited 2007-05-22 14:22
    Hi Jim,

    A few problems, none of them to do with the actual game!

    1) The URL needs a www in it.
    2) Someone's server isn't confirgured right, in Firefox the link doesn;t download, it displays garbage on the screen. IE copes with it though.
    3) I don't have a RAR unarchive program installed. Did you know Prop Tool has a automatic zipping facility. File/Archive/Project. It'll zip up the current top object file together with an objects that it uses. Or is it that you have some issue with zips?

    I've got to go out now. I'll have another try later.
  • BaggersBaggers Posts: 3,007
    edited 2007-05-22 15:26
    I've now added Proto/DemoBoard versions for testing, and Proto/DemoBoard with SDCard ( port0 )
    Can people test and let me know how if it's worked.
    I'll release source soon as I have confirmation that it works on all platforms.
    PS, on a side note... Does anyone know how to remove double linefeeds? lol
  • CardboardGuruCardboardGuru Posts: 443
    edited 2007-05-22 23:08
    Hi Jim,

    OK, I tried it some more. Downloaded WinRAR and got the file uncompressed. Still more problems I'm afraid.

    1) The GO.BAT uses COM6. I think the default set up for the Hydra port is COM4.
    2) After changing the com port, the Hydra would reset as expected, but the uploads failed. Tried several times.
    3) I tried programming the binaries using HAM and Prop tool instead. But I wasn't sure where to put the upper memory binary. I tried 0x10000 and uploaded the main binary with Prop tool. The Manic miner program ran, with text and graphics on the bottom of the screen. But the level area was just random garbage.
  • AndreLAndreL Posts: 1,004
    edited 2007-05-22 23:14
    SHIFT enter will usually do that, then delete.

  • edited 2007-05-23 03:20
    This demo didn't do anything when I tried to use it. It just gave me a blank screen...
  • BaggersBaggers Posts: 3,007
    edited 2007-05-23 08:10
    Hi CardboardGuru
    The upper memory binary is itself an prop executable which you load into ram, it then shows a garbage screen, while it copies the level data etc it needs to from $8000-$e800. once it's complete it will show the title pic, and say DONE in the bottom of the screen.
    at this time, you then download the main binary to ram or load to eeprom $0000

    hope this helps.
    sorry for the COM6 in go.bat that's cos it's COM6 for me [noparse]:)[/noparse] I forgot to tell people to change the port number. my bad

    Is your COM port 4 or 6? go.bat is set up to use 6 as default.

  • CardboardGuruCardboardGuru Posts: 443
    edited 2007-05-23 08:47
    Hi Baggers,

    OK, got it now by loading both eeprom files with Prop tool. I'm one of those unfortunate people for who the serial link to the Hydra only works successfully 50% of the time even with prop tool. With that exe it hasn't worked at all. But prop tool did the job.

    The game itself works great! Though I haven't managed to get past the first screen yet. I can see that for the middle key in the top row I have to jump either early or late, but I haven't managed to time it right yet.

    Well done Jim!
Sign In or Register to comment.