Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:11 13 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MANIC MINER game for CMM

Author Message
ceptimus
Senior Member

Joined: 05/07/2019
Location: United Kingdom
Posts: 130
Posted: 08:06pm 02 Sep 2019
Copy link to clipboard 
Print this post

Here is my conversion of the famous MANIC MINER game for the Colour Maximite.

Unzip the attached zip and move the resulting MMINER folder to your Maximite SD card.  The folder named MMINER contains a few files and various sub-folders that also contain files.

Assuming you are in the root directory on your Maximite, to play the game you need to:

chdir mminer
mminer

I've tried to make it as authentic as I can to the ZX Spectrum original.  Main differences are:

* The CMM (game) screen is only 240 pixels wide, so I've trimmed 8 pixels off each side of the original (256-wide) Spectrum screen.  This doesn't alter the gameplay as all the caverns have impenetrable walls up both sides - so you can't see the walls on the CMM version but the edges of the screen count as walls instead.

* The CMM only has 8 colours instead of the Spectrum's 15.  Mostly doesn't matter to the gameplay.

* I altered some of the guardian colours in the Solar Power Generator cavern (19/20) and the conveyor colour in there.  This is because the solar beam (yellow) drains Willy's air faster than usual when it touches him, and to make detecting that easier, I didn't want any other yellow things in that level.  It was hard to code that level anyhow.

* I couldn't get the rapid colour cycling of the whole screen to work - this happens in the ZX Spectrum game when a level is completed.

* The ZX Spectrum version changes the screen border colour to match or contrast with the level background colour.  I tried changing just the top and bottom 'borders' of the CMM screen to work like that, but it looked horrible, so I've just left what 'borders' can be controlled by the CMM black.

* The ZX Spectrum cheat code that allows Willy to teleport to levels is present.  Type 6031769 fairly slowly, and you'll see the boot at the bottom of the screen.  You teleport using the PgUp and PgDn keyboard keys because MMBasic can't detect the multiple keys needed to work in the Spectrum 'binary code' manner.

* There's also an infinite lives cheat: 2718281

Configuration:

If you have a joystick or other game control device with three inputs for left, right, and jump (fire) it makes the game much easier to play.  Because different users will have their joysticks connected to different input pins on their Maximites, I've made it configurable by editing the MMINER.BAS program (which only does a bit of configuration before CHAIN-ing other programs to play the game).

Edit the MMINER.BAS program and change the line js=0 to js=1 to enable your joystick. Then edit the three lines jsL=13, jsR=14, and jsF=15 to set the PIN numbers your joystick uses for Left, Right, and Fire.  Save the program and then you'll be all set any time you want to play the game.

You'll see there are a few other minor configuration things you can change in the MMINER.BAS program - but the joystick is probably the only thing most users will want to change.

I'll be grateful for feedback on bugs etc.  It would be nice if people can report when they've managed to complete one of the levels - I've not played all of them myself yet, and I may not be skilful enough to complete the hardest ones!  We can perhaps use this thread to keep a list of completed levels until we've either ticked them all off, or found some of them to be impossible!  There are several YouTube videos recorded by experts on the original Spectrum showing how the levels can be done - so providing I've not introduced bugs that make the Maximite version harder than the Spectrum one, the levels should all be possible.


MMINER.zip
Edited 2019-09-03 06:08 by ceptimus
 
MauroXavier
Guru

Joined: 06/03/2016
Location: Brazil
Posts: 303
Posted: 08:49pm 02 Sep 2019
Copy link to clipboard 
Print this post

I'm anxious to test it. Soon I come to my house and will gladly test it!

Even that I've not tested it yet, congratulations anyway! I sure it must be a great conversion.

(PS.: After finish Gauntlet, I'm thinking in a port of the Auf Wiedersehen Monty, a true test of patience too)
 
cosmic frog
Guru

Joined: 09/02/2012
Location: United Kingdom
Posts: 302
Posted: 09:16pm 02 Sep 2019
Copy link to clipboard 
Print this post

I'll be testing this out tomorrow (day off work) and will let you know.
I've already seen the video on YouTube and it looks great. Thanks for sharing your code, I know these things take a lot of time and patience, it's very much appreciated.

Dave.
 
MauroXavier
Guru

Joined: 06/03/2016
Location: Brazil
Posts: 303
Posted: 09:28pm 02 Sep 2019
Copy link to clipboard 
Print this post

I tested a while and sincerely, it's incredible!

Your conversion is very well made and is perceptible that you focused on the minimal details.

When I have time I will see deeply your code to learn some tricks, after all, always is good to learn a little more.  

Thanks for sharing your fantastic work!  
 
SimpleSafeName

Guru

Joined: 28/07/2019
Location: United States
Posts: 351
Posted: 03:25am 03 Sep 2019
Copy link to clipboard 
Print this post

I tried it out, and never having played Manic Miner before, I suck.

And thus concludes the "Inept Gamer's Report".
 
Poppy

Guru

Joined: 25/07/2019
Location: Germany
Posts: 486
Posted: 08:46am 03 Sep 2019
Copy link to clipboard 
Print this post

Really nice!


Andre ... such a GURU?
 
cosmic frog
Guru

Joined: 09/02/2012
Location: United Kingdom
Posts: 302
Posted: 09:21am 03 Sep 2019
Copy link to clipboard 
Print this post

Just had this running on my MaxiMite 4.05 and it's fantastic. The look and feel is exactly the same as the Spectrum version.
It's amazing that something like this can be written entirely in BASIC.
Great work!

I now look forward to MauroXavier's finished version of Gauntlet.

Thanks. Dave.
 
ceptimus
Senior Member

Joined: 05/07/2019
Location: United Kingdom
Posts: 130
Posted: 12:07pm 03 Sep 2019
Copy link to clipboard 
Print this post

Thanks for the kind comments guys!

SimpleSafeName: everyone, including the author, Matthew Smith, acknowledges that the first level is rather hard - the next three levels are all easier. So if you want to practice, you should slowly enter the cheat code, 6031769 during the game and then use PgUp to move to the next level.  Remember, with the keyboard, if you want to keep running after you land, you must release the direction key and press it again mid-jump.

I made a video that shows how to play the first five levels:  You can see I'm not very good, and I ran out of lives on the first level first time round.  But then on the second try I made it as far as Eugene's Lair, and I would have finished that level too but for a couple of stupid errors right at the end.  

https://youtu.be/LcbuvVZmD_g

While making that video I noticed a small bug where a couple of Willy's pixels get left behind when he has a very close encounter with a guardian.  I don't think it's done that until very recently, so I need to find where I've introduced that bug.
 
MipsyKing
Newbie

Joined: 12/02/2015
Location: Italy
Posts: 17
Posted: 04:29pm 03 Sep 2019
Copy link to clipboard 
Print this post

Jet Pac was the first game I played in my life when a friend of mine bought the Spectrum... it was cool and very playble...
Manic Miner is the second game I've played, few days after, and really made us forget the previous. The computer playing a music while showing a piano on the screen... incredible! All that "sprites" moving around...
Of course, none of us was capable to pass over the second level, but we played it for days... and the foot crashin you at the end, always made us laughing!
great game... ^_^
 
Decoy
Senior Member

Joined: 02/08/2019
Location: Denmark
Posts: 109
Posted: 05:53pm 03 Sep 2019
Copy link to clipboard 
Print this post

It is amazing, you have really done great work here!

Since I am not native to Old Blighty, I wasn't exposed to the speccy in any real capacity. Thus, I have never played the game before.

So, my question may be from ignorance - but I will try: After each jump, you need to re-press the arrow key to start moving again. Is this a MaxiMite shortcoming, or was the original game like this?

Again, it is quite awesome having quality games like this on the MaxiMite! Thanks for that!

 
ceptimus
Senior Member

Joined: 05/07/2019
Location: United Kingdom
Posts: 130
Posted: 08:12pm 03 Sep 2019
Copy link to clipboard 
Print this post

Hi Decoy,

On the Maximite, you get used to letting go the key and re-pressing it while you're still in mid-air if you want to do a running jump and keep running after landing.  You absolutely need to do that on some levels as it's the only way to run the 'wrong way' against the direction of travel of a conveyor.

The having to repress the arrow key is unfortunately down to how the Maximite reads the PS2 keyboard and makes the current keypress available to the program.  As far as I know, there's no way to improve it - though a future version of MMBasic may make that possible.  The original Spectrum keyboard worked like you'd expect without having to repress the keys.  However, most Spectrum owners preferred to use a plug-in joystick anyway.

The best Maximite solution at the moment is to add a 'joystick':  this doesn't have to be a real joystick - all you need is three momentary "press to make" push buttons, one for left, one for right, and one for jump.

Wire those three push buttons to Maximite pins 13, 14, and 15 (you can choose other pins if you wish, but those are the ones I used) one terminal of each push button to the chosen pin, and the other terminal to ground.

I did use a real vintage joystick that also has 'up' and 'down' switches which are wired to my Maximite pins 11 and 12 - but the MANIC MINER game ignores those inputs - you use 'fire' to jump rather than up.

Then edit the MMINER.BAS program (it's just a small 'launcher' program that loads other larger programs to actually play the game).  

Change the line that says js=0  to js=1 to enable the "joystick"  if you've used the pins I suggest, then that's it, but if you've used different pins edit the following lines - there are comments to explain in the code.

Save the modified program, and then you'll have the option of using your "joystick" to control Willy - the keyboard will still work at the same time.
.
Edited 2019-09-04 06:26 by ceptimus
 
ceptimus
Senior Member

Joined: 05/07/2019
Location: United Kingdom
Posts: 130
Posted: 09:02pm 03 Sep 2019
Copy link to clipboard 
Print this post

I think I fixed the small 'trailing pixels' bug I noticed in the video.  Attached is the very slightly modified  V0.9b

MMINER.zip
 
MauroXavier
Guru

Joined: 06/03/2016
Location: Brazil
Posts: 303
Posted: 02:35am 04 Sep 2019
Copy link to clipboard 
Print this post

  ceptimus said  * I couldn't get the rapid colour cycling of the whole screen to work - this happens in the ZX Spectrum game when a level is completed.


I don't know if you tried this, but you can invert the colours of the screen (in the size you want) to get a reasonable effect. It's not a colour cycling like ZX Spectrum, but maybe you like the result:

LINE(0,0)-(MM.Hres,MM.Vres),-1,BF
Edited 2019-09-04 12:38 by MauroXavier
 
SimpleSafeName

Guru

Joined: 28/07/2019
Location: United States
Posts: 351
Posted: 02:46am 04 Sep 2019
Copy link to clipboard 
Print this post

  ceptimus said  Thanks for the kind comments guys!

SimpleSafeName: everyone, including the author, Matthew Smith, acknowledges that the first level is rather hard - the next three levels are all easier. So if you want to practice, you should slowly enter the cheat code, 6031769 during the game and then use PgUp to move to the next level.  Remember, with the keyboard, if you want to keep running after you land, you must release the direction key and press it again mid-jump.

I made a video that shows how to play the first five levels:  You can see I'm not very good, and I ran out of lives on the first level first time round.  But then on the second try I made it as far as Eugene's Lair, and I would have finished that level too but for a couple of stupid errors right at the end.  

https://youtu.be/LcbuvVZmD_g

While making that video I noticed a small bug where a couple of Willy's pixels get left behind when he has a very close encounter with a guardian.  I don't think it's done that until very recently, so I need to find where I've introduced that bug.


I saw (and commented on) your video. So you have to get all of the keys then. That explains it... :)
 
MipsyKing
Newbie

Joined: 12/02/2015
Location: Italy
Posts: 17
Posted: 04:58pm 04 Sep 2019
Copy link to clipboard 
Print this post

Just for my curiosity, Ceptimus, the animations made from Matthew Smith largely helped the game to be an istant success.
On how many images is based the Willy's "sprite"?
And the other enemies, like the famous "robot" at first level?
 
ceptimus
Senior Member

Joined: 05/07/2019
Location: United Kingdom
Posts: 130
Posted: 08:17pm 04 Sep 2019
Copy link to clipboard 
Print this post

I've copied Matthew Smith's sprites exactly, though they appear a little 'fatter' on the the standard Maximite screen because Maximite pixels aren't square unless you have a monitor where you can adjust the width and height to make them so.

The Willy sprite only has 4 frames for each direction of travel.  It's not really enough and if you look closely he always leads with the same arm and leg. The screen resolution on the original Spectrum probably wasn't good enough to see that clearly - the Spectrum video output was modulated up to a broadcast frequency so that standard TVs could be 'tuned in' to the  'broadcast' channel.  You could modify the hardware of a Spectrum to get at the unmodulated video signal and use a monitor to get a sharper picture, but very few people did that in the 80s.

Conversions of the game to some other platforms often used 8 frames for each direction plus more colours.  The Maximite is well capable of doing that of course - and without taking up any more processor time: each sprite could use 7 colours plus the background - but I wanted to keep the game looking as close to the Spectrum original as I could, so each sprite is just one colour.

The other sprites, vertical and horizontal travelling, also only use four animation frames.  The vertical ones always use the same frames whether travelling up or down (except the Kong beast which is a special case).  The horizontal ones come in two types - one type uses the same 4 frames whether travelling left or right and the other one uses 4 frames for left and a different 4 for right.

It depends on the level. The levels that have 8-frame horizontal sprites, like the first level robot one, don't have any vertical sprites.  Levels that have only 4-frame horizontal sprites can have up to 4 horizontal and up to 4 vertical.  The only level that uses the full compliment of eight "guardians" is Amoebatrons' Revenge.

The Eugene sprite in Eugene's Lair is another special case, and the only level where 8-frame horizontal sprites co-exist with a "sort-of" vertical travelling sprite.

These restrictions don't really apply to the Maximite - it was just the way Matthew Smith chose to store his levels so that he could compress 20 levels plus the actual game into the Spectrum's 48K of RAM.  Of course, with his later Jet Set Willy game he found ways of compressing many more rooms and sprites into that same limited memory.

I take my hat off to Matthew Smith.  He coded the whole game in about eight weeks back in 1983.  He didn't have to just write the game engine - he also designed all the sprites and all the room (cavern) layouts.  He was only 17 years old, and he did the whole thing using a Tandy TRS-80 model III computer and his own-design interface (which he built on strip board) so that, for testing, he could 'squirt' the assembled code and levels quickly direct into the Spectrum's RAM via its expansion port from the Tandy's parallel port.  He didn't even own a Spectrum at the time - he was using a loaned unit.  
.
Edited 2019-09-05 06:36 by ceptimus
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025