The ROM and PC versions have been released at https://morphcatgames.itch.io/micromagesUPDATE: Cartridges are available again at https://www.brokestudio.fr/en/front-page-en/Hey, y'all!
It's been a while. I teamed up with an artist and we've been working on a new game for the past 3-ish years.
Well, it's finished and we are now raising funds for cartridge production via Kickstarter.
https://www.kickstarter.com/projects/morphcat-games/micro-mages-a-new-game-for-the-nesFeatures:
- vertically scrolling platformer
- wall jumps!
- 1-4 players, cooperate or compete for score
- boss battles
- secrets/replay value
- carefully optimized for NROM (32KB code, 8KB graphics)
This looks great! Hoping your Kickstarter succeeds. I think you are asking for very little.
I assume cartridges are shipped from Germany (or somewhere in EU at least), right?
Thank you, Sumez!
Yes, we are lucky. Europe seems to be great for print and the artist has a lot of knowledge in that area, which allows us to offer a very reasonably priced CIB.
Indeed, all rewards are going to be shipped from Germany.
I absolutely love your vide on storage management! I especially found it interesting how you use shifted symetric designs for your maps. It feels like a pretty severe limitation "just" to save 50%, but I bet it had an interesting effect on how stages are perceived as well.
The first part about sprite design is really useful if I ever want to introduce a pixel artist to NES graphics, though.
The only "problem" is that I think you're very fast at glancing over what's so unique about an NROM cartridge, and why it's cool that this game is going for it.
https://www.youtube.com/watch?v=ZWQ0591PAxMShared the Kickstarter with a bunch of guys and I think it got you at least a few more backers.
I think you'll have no trouble meeting the goal.
Long time no see!
It's great to see something new after all this time. And there are bats too
Hope it succeed, looks good!
It's finally here!
Best of luck with the campaign!
Congrats on successful campaign!
This looks AWESOME, specially considering the limitations of NROM! I don't know how you managed to fit so many *good* graphics on such a small space! Congratulations!
Sumez wrote:
https://www.youtube.com/watch?v=ZWQ0591PAxM
This is awesome -- and a wonderful example of good and clever engineering. "Every bit counts". Be proud! :-)
Sumez wrote:
https://www.youtube.com/watch?v=ZWQ0591PAxM
I feel like this video is meant for the general public, seeing as most of us developers already know about these tricks. The only real revelation in the video was the technique used to break the symmetry of the background while still using half the bytes to represent each screen. That was pretty cool. I'm still very impressed that this game fits in 40KB... knowing that it uses only 512 tiles and still looks this good and animates this well is the most amazing part.
oh, you already reached your goal! Congratulation
The symmetrical background thing made me think of the Atari 2600, where the playfield is always symmetrical unless you modify the playfield pattern mid-scanline (which is very heavy on CPU and memory!), but you can still create more interesting backgrounds by changing the symmetry mode between repeated and reflected on different sections of the screen, and also using the ball object to draw extra walls. It's not the exact same thing that Micro Mages does, but the end result is similar, an environment that doesn't look or feel boring, but conserves hardware resources.
Seriously impressive!
What software did you use to make that tech video?
Could be something else, but all those video animations can be done with adobe afterEffects, which is pretty much the industry standard for video animation and infographics.
--
Congrats on the successful campaign!! The game looks even greater than i dared hope.
Is there a demo? Would love to see it in action.
Thanks for all your feedback and sorry for the late response. We've been overwhelmed by the response the Kickstarter has been getting the last couple of days.
Sumez wrote:
I absolutely love your vide on storage management! I especially found it interesting how you use shifted symetric designs for your maps. It feels like a pretty severe limitation "just" to save 50%, but I bet it had an interesting effect on how stages are perceived as well.
The first part about sprite design is really useful if I ever want to introduce a pixel artist to NES graphics, though.
The only "problem" is that I think you're very fast at glancing over what's so unique about an NROM cartridge, and why it's cool that this game is going for it.
https://www.youtube.com/watch?v=ZWQ0591PAxMShared the Kickstarter with a bunch of guys and I think it got you at least a few more backers. :P I think you'll have no trouble meeting the goal.
The funny thing about the mirroring limitation is that we felt it gave the levels a much stronger identity and we could even improve level design in many locations despite it, mainly because of redesigning/going over all levels a second and third time.
We cited Super Mario Bros. as an example for NROM, which still seems to be regarded as the holy grail of game development achievements by many. If that does not sell the coolness factor of NROM, then I don't know what does. :-)
Thanks for your support!
thefox wrote:
Seriously impressive!
What software did you use to make that tech video?
Nicolas, the artist, used After Effects. Took him many months and he completely wrecked his PC in the process. :-)
Makes me wonder if something like AviSynth/VapourSynth could be used to create videos like this programmatically, at a much faster pace and without losing your sanity. After you spent half of your life writing a code base for it, that is.
Banshaku wrote:
Is there a demo? Would love to see it in action.
Sorry, no demo. We think the game gets really fun once you familiarized yourself with the controls. From world 2 onward or so. We assume people who paid money are more likely to give the game a thorough play.
Also, we did not want to spoil the fun of getting a new game CIB, unboxing and playing it for the first time. Although that would be up to the individual person, of course.
Quote:
After Effects [...] and he completely wrecked his PC in the process
I know what this feels like! After Effects is awesome, but veeeery hungry once your project grows. My old pc didn't like the situation.
Congrats on going past 1k backers!
The design of the videos and the kickstarter page itself is very slick!
And I like the idea of mirroring and shifting background block rows while storing the levels. Thanks for sharing!
The FAQ claims that
Rainworrior's Antoine's building the cartridges? Is he the only one who will build all the carts? Because currently it looks like the kickstarter can attract over 2000 supporters easily...
Lazycow wrote:
The FAQ claims that Rainworrior's building the cartridges? Is he the only one who will build all the carts?
???
antoine who did twin dragons is making the carts.
not sure why you thought brad was on it.
Lazycow wrote:
The FAQ claims that Rainworrior's building the cartridges? Is he the only one who will build all the carts?
Oops, NOT Rainworrior, sorry.
The 'o' in there makes me think there's some mirror-universe Rainwario out there building cartridges.
Lazycow wrote:
The FAQ claims that
Rainworrior's Antoine's building the cartridges? Is he the only one who will build all the carts? Because currently it looks like the kickstarter can attract over 2000 supporters easily...
Yep, it seems that I'll have a lot of
fun work to do
This looks super! Backed!
rainwarrior wrote:
The 'o' in there makes me think there's some mirror-universe Rainwario out there building cartridges. ;)
You're hereby known as rainworrier. ;-)
@miau
Oh well, just wanted to see it in action out of curiosity. Will the digital version be available later in any other way? It's not that 8$ is a lot, more that I do not have any way to pay online these days. In Japan, we are a paper society even though people want to think otherwise. Never used a credit card, can buy online and ask to pay at the convenience store (I'm not joking here). There is some cashless thing that work only in Japan but rarely use them (edy, suica, sugoca etc).
I may be interested later once I find how to pay for it.
Lazycow wrote:
The design of the videos and the kickstarter page itself is very slick!
The FAQ claims that
Rainworrior's Antoine's building the cartridges? Is he the only one who will build all the carts? Because currently it looks like the kickstarter can attract over 2000 supporters easily...
Yes, we discussed with him at length how much he can (and wants to) handle. We also set what we think is a generous (for him and us) estimated date of delivery on the rewards. On the "2nd batch" of rewards that is now available, we set an even later date, just in case.
Banshaku wrote:
Will the digital version be available later in any other way?
Yes, it will be!
Ok, good to know! I don't think there will be a famicom version, isn't it?
I'd say a Famicom version is not out of the question, but there probably won't be one anytime soon.
Except for the Japanese market, the demand may be low so for now it's not a priority. I'm just one of those "odd-case" that don't have a nes anymore (should have never sold it before moving ^^;;)
This looks and sounds amazing. It is 4 player right? Then that is an extra bonus. Seems like a great party game. Also there seems to be a LOT of fine details and polish that I really appreciate.
tokumaru wrote:
I feel like this video is meant for the general public, seeing as most of us developers already know about these tricks.
Absolutely. What makes me appreciate the video is not the content itself, but the competent way it's being presented to the common audience.
That's also the reason I think it's a little weak at getting across why limiting yourself to NROM is even a thing. (and what exactly NROM is).
Yes, SuperMario Bros. was a big achievement in video game development, but I'm not sure people who think "8-bit" means pixelated graphics understand why.
miau wrote:
Sorry, no demo. We think the game gets really fun once you familiarized yourself with the controls. From world 2 onward or so. We assume people who paid money are more likely to give the game a thorough play.
Also, we did not want to spoil the fun of getting a new game CIB, unboxing and playing it for the first time. Although that would be up to the individual person, of course.
I can completely get behind this!
Although I'm personally a fan of demos, I think there is always the risk of devaluating your product through one.
I saw this new video.
https://www.youtube.com/watch?v=ZWQ0591PAxMI really liked how you explain the process of making the game. I didn't know you were trying for a 40K game.
All of the tricks and techniques that you are using are really thoughtful and impressive. Wish you the best.
Also were you the guys who were making Super Bat Puncher too? The name morphcat rings a bell.
Wow 151 167 Euros!
Congratulations on the success of the kickstarter. Truly amazing numbers!
Everyone should look at this thread and the kickstarter to see how you can effectively design and market a NES game with good appeal. Money well deserved!
rainwarrior wrote:
The 'o' in there makes me think there's some mirror-universe Rainwario out there building cartridges.
He's a fan of Wizard of Wor, perhaps? W O R R I O R S S S
Lazycow wrote:
Oops, NOT Rainworrior, sorry.
Punch wrote:
He's a fan of Wizard of Wor, perhaps? W O R R I O R S S S
C O M E O U T T O P L A Y A Y !
Quote:
Everyone should look at this thread and the kickstarter to see how you can effectively design and market a NES game with good appeal. Money well deserved!
as somebody who is planning a kickstarter in the next 6 months, i'd be very interested to know people's thoughts on why this game in particular was so successful...
for myself, i'm not sure the game itself looks more appealing to me than something like twin dragons or nebs'n'debs (which is to say, they all look like fun NES games that i would enjoy greatly). however, it made more than 5x the amount that those other games did.
one thing that occurs to me is that micro mages has multiplayer, as did super russian roulette, which also had an incredibly successful campaign. unfortunately it's too late to think about adding that to project blue, but certainly something i will be adding into any future games.
another thing that i noticed a lot of people responding to was the video explaining the various design choices that went into making the game itself.
i tried searching the web for anything like a pre-hype campaign, but couldn't find anything of that nature. every article i read about it seemed to be responding to the success of the kickstarter, not advertising it before it's success. seemed to come out of nowhere!
@toggle switch: I think the kickstarter page is very well done and the game screenshots and previews have a lot of charm. The graphics of Twin Dragons and Nebs'n'Debs are also very good in pixel art, but they have a different style that style might not resemble old NES games that much. Also, the gameplay of Micro Mages seems to offer something special. At least that's why I supported the kickstarter...
Maybe Worphcat can tell us more?
(scnr)
I think it was a confluence of the trailer and the optimization video, and the emphasis that the game is already 100% done.
The optimization video really showed the amount of work they have put in to the game and that it is going to be a high quality release. And I feel like making the first line of the Kickstarter "The Game is 100% Done" was pretty huge, easing potential nerves over backing a dud.
Also probably the reputation of the "Super Bat Puncher Guy" is finally releasing a game brought a lot of people.
I can't speak for anyone else, but the 4-player hybrid coop-competitive is what sold me on it.
Things Micro Mages did right:
1. Was 100% complete when the KS launched
2. Had highly polished visuals and presentation, not only in-game, but in packaging, presentation, etc.
3. Offered something unique in terms of gameplay (not only for the console, but in general)
4. Reached backers outside of the nesdev and NES collector scenes. Micro Mages was featured at more than one event in Germany... IIRC, a museum? and a convention of some sort? The developer duo had garnered popularity through Ludum Dare success with their previous game. (Super Russian Roulette seemed to have similar success in reaching far out of the normal homebrew collector base).
5. Had images of box and cart all ready (meaning, presumably packaging design was all complete, but more importantly, showcased quality designs there.
6. Had reasonable Int'l shipping costs (US-based KS campaigns often ask for an extra $30 in shipping for overseas orders, often on top of $60 or more for a CIB, but CIB w/ int'l shipping was only ~$55).
I strongly believe that if US-based projects were willing to eat some of their profit margin per item to compensate for the country's shipping costs, they'd see a boost in total profit due to increased number of sales.
7. Offered DRM-free normal NES ROM to all backer levels.
8. Had a professional and likable "voice" to their campaign and online presence.
Honestly, 2, 3, and 4 together are likely the magic combination for a big NES KS success.
Congratulations! Astounding and remarkable campaign, absolutely inspiring more than you might know.
M_Tee wrote:
Honestly, 2, 3, and 4 together are likely the magic combination for a big NES KS success.
Absolutely. I couldn't have summed this up better. And thank you for doing it. It's points #2 and #4 especially I wouldn't have ever figured out how to tackle.
As someone who had been working on an "inventive" 40kb game two years ago, I thought about launching a campaign like this, with digital downloads and a completed game being key. I opted to stop working on it, with one year lost to a rom hack while working at a grueling management job, and a second year lost to tirelessly not getting rehired in my "profession" after quitting that job only to become secretly depressed and only work intermittently on sound programming.
This campaign has seriously caused me question my approach to life, especially in the last year or so.
At this point though, I think #1 counts for a lot with a kickstarter, too. People are sick of paying full price for a game that they may or may not get in 8 years.
There's loads of things that made me an instant backer of Micro Mages:
* I've been missing any good 4-player game for the NES. I know it's due to the risk of them being a flicker-fest, and the beautiful graphics work around that very cleverly
* Really well done trailer
* Previous track record with Super Bat Puncher demo, which is still one of the most fun NES homebrews I've played
* Knowing it's a finished game, as others have mentioned (though it's one of the minor points TBH)
* The game just looks like damn good fun to play... especially with friends
Things that made me only back Nebs 'n'Debs as a digital download:
* I did try the demo, and while it was a really high-quality competition entry it just was a bit too much of a "generic platformer" for me to really go back to. And the Kickstarter trailer didn't seem to advertise enough to change that overall feeling.
* The shipping to anywhere outside the US being so expensive. It really adds to the cost, and knowing that I'll also be punished by customs made me more reluctant to hit that backing button.
* While the graphics are really nice and well-done, all in all I couldn't help thinking it still feels like an NROM game with compromises, which maybe should have gone bigger and gotten more content - especially given how much the CIB+shipping adds up to for non-US residents. In contrast, Micro Mages felt a lot less minimalistic and more complete - despite its miniature sprites.
I usually back homebrews for the NES as CIB, so it was a close one with Nebs'n'Debs. Had the shipping been a bit more fair I probably would have gone for the CIB, just for the usual support-all-decent-NES-homebrews instinct
On a third note, a NES:ish kickstarter that seems to be struggling to reach it's basic goal is
this oneBesides having a really awful trailer (no, your friends going on about how much they like your game is NOT good trailer material, no matter who gave you that idea)... the fact that it's just a NES version of a PC party game really gives me the feeling that I'm backing a cheapened-down HK demake of a game -and I'd much rather back a NES game where the author puts their heart and soul into making the NES game *the* definite version to play.
Bananmos wrote:
Besides having a really awful trailer (no, your friends going on about how much they like your game is NOT good trailer material, no matter who gave you that idea)...
Seriously though. Who ever even watched through an entire Kickstarter trailer?
These are always super long, and completely fail the idea behind an elevator pitch (which is essentially what a Kickstarter is).
Of course, you can make them as long as you want them, but you gotta hook your audience within the first 15 seconds or you might as well not.
Don't start out with some geeky developer sitting in his mom's basement muttering to a handheld camera. Start out with gameplay right off the bat, as the very first thing. Then talk about how much you care about the game afterwards. And get a good camera and a good mic.
Sorry, forgot to post a followup here.
M_Tee summed up the contributing factors pretty well, I think.
I'd like to expand on what happened with our video "How we fit an NES game into 40KB" in the hope it might be interesting to some of you.
There are a few channels uploading similar content that have been gaining popularity:
-
GameHut-
Retro Game Mechanics ExplainedCan't remember the others, but either way, people seem to love these kinds of tech videos. I certainly enjoy them a lot, so I approached Nicolas with the wish to create something in similar spirit for Micro Mages.
One week before the end of the campaign we were at a pace where we thought we may barely hit € 100k if we're lucky, the usual bump in pledges towards the end of a campaign was accounted for in our calculations. Then, apparently, the video got enough views for the Youtube algorithm to start recommending it to people on the homepage and that's when things exploded (250k views on the last day of the campaign).
Needless to say, now we're incredibly glad Nicolas suffered through all those hours of video editing and PC crashes. It paid off to go the extra mile and that's probably something you're absolutely required to do if you want to stand out on Kickstarter.
NROM means nothing to normal folks, we knew we needed to make clear why exactly it's a
small big thing. Actually, it's more about communicating why developing a game on the NES is special in the first place. That's the thing other homebrew Kickstarters haven't been capitalizing on enough, I think. Everyone here knows it's completely unlike modern game development, but to our audience, the game may have just been
yet another indie platformer without the extra insight.
Ironically, Micro Mages was conceived as a project to test crowdfunding waters, something that wouldn't cost us years of our life to make, where we wouldn't feel compelled to go all-out and instead could allow ourselves to relax, make mistakes and learn from them.
We just released the ROM and PC versions at
https://morphcatgames.itch.io/micromagesAll Kickstarter/Indiegogo backers should have received a download link + Steam key via e-mail.
PARTY!
Hello I have a question about the 4-player mode in Micro Mages.
On the
kickstarter page it is stated that it supports both the Four Score and the Hori 4-player adapter, but nothing about the standard 4-player solution on Famicom which is to use two external controllers (there are many kinds of adapters to hookup these) as well as the two built-in standard controllers. The Hori adapter isn't very common and uses a special protocol that isn't supported by many games, so it would make little sense to support it without supporting the standard solution as well.
Is it true that it only supports the Four Score and Hori adapter or is there some kind of misunderstanding here?
Pokun wrote:
Hello I have a question about the 4-player mode in Micro Mages.
On the
kickstarter page it is stated that it supports both the Four Score and the Hori 4-player adapter, but nothing about the standard 4-player solution on Famicom which is to use two external controllers (there are many kinds of adapters to hookup these) as well as the two built-in standard controllers. The Hori adapter isn't very common and uses a special protocol that isn't supported by many games, so it would make little sense to support it without supporting the standard solution as well.
Is it true that it only supports the Four Score and Hori adapter or is there some kind of misunderstanding here?
I've never heard about a Famicom adapter for hooking up two external controllers. Do you have any information on it?
I can't imagine it working differently to the Hori adapter switch set to 2 players, which is supported by Micro Mages and allows you to play with 4 players in the same way you mentioned - connect 2 external controllers, use 2 standard controllers.
Micro Mages reads D1 of $4016/$4017 to get the 3rd/4th player input, which seems to be the intended way (by Nintendo, at least I seem to recall reading about it somewhere) to handle two extra controllers.
Yes, controllers on D1 on $4016/4017 is a standard thing for Famicom. There are other adapters that do this besides that hori one, and I've seen a pair of controllers that just plugs into the expansion port like this too.
It's also normal for Famicom games to OR D0 and D1 for games that aren't 4-player so people can use custom controllers instead of the hardwired ones.
So... it sounds like Micro Mages is doing the normal thing for 4-player on the Famicom, though it might be disappointing for 1/2 player mode if someone prefers using a custom controller?
Many western NES releases don't do this though, so it's probably not too unexpected from non-Japanese games. If you do a Famicom form cartridge release, you might consider ORing them for 1/2 player modes?
Edit: Micro Mages does OR D1 and D0 for 1/2 player modes, so it's completely correct, I believe.
IIRC, in 2-player mode, Micro Mages will actually do the D0/D1 OR-ing and allow to use external controllers as replacement for worn-out standard pads.
Ninjad, but I'll post anyway since I wrote up all this, and I have some other things to say.I see, so it does support the standard way after all (reading D1 of $4016/$4017), that's good to hear. Stating that it supports the Hori adapter sounds like you support
its special protocol that only a few game does (three known games are Wit's, US Championship V'Ball and Downtown Nekketsu Koshinkyoku) though. Do not trust Wikipedia in this matter because it's full of misconceptions.
miau wrote:
I've never heard about a Famicom adapter for hooking up two external controllers. Do you have any information on it?
Some controllers has the adapter built-in, like the
ASCII Stick 2 Turbo, so the second controller can be daisy chained in the first controller. Sometimes external controllers even have a switch so you can choose which controller it acts like (D1 of $4016 or $4017). There are also adapters like HAL's JoyPair and Hori's Twin Adapter. The Hori 4-player adapter can also be used like this like you already know, but that alone won't let you use the second pair of controller ports.
It can also be easily built by using two Neo-Geo controller extension cables or more popularly is to use two
NES controller extension cables and one Neo-Geo cable so that any NES controllers (including some accessories like the Zapper) can be used in the expansion port. This is what I do since NES controllers and Zappers are relatively cheap and easy to find.
BTW I just got to see the
manual, and correct me if I'm wrong but it looks like there is a mistake here. I don't have the Hori 4-player adapter myself, but from what other people testing it had to say it sounds like the 2P/4P switch do not matter when just using the first pair of ports. The switch is only used to enable the second pair of ports in games that supports them. In the manual however it says that the switch must be set to 4P in Micro Mages despite it not supporting the second pair of ports, which can't be right.
miau wrote:
IIRC, in 2-player mode, Micro Mages will actually do the D0/D1 OR-ing and allow to use external controllers as replacement for worn-out standard pads.
Ah, yes it does seem to do that. (Somehow my test keys failed to set when I tried it a few minutes ago!) Well, then I think it's 100% doing the correct thing.
Pokun wrote:
miau wrote:
I've never heard about a Famicom adapter for hooking up two external controllers. Do you have any information on it?
Some controllers has the adapter built-in, like the
ASCII Stick 2 Turbo, so the second controller can be daisy chained in the first controller. Sometimes external controllers even have a switch so you can choose which controller it acts like (D1 of $4016 or $4017). There are also adapters like HAL's JoyPair and Hori's Twin Adapter. The Hori 4-player adapter can also be used like this like you already know, but that alone won't let you use the second pair of controller ports.
It can also be easily built by using two Neo-Geo controller extension cables or more popularly is to use two
NES controller extension cables and one Neo-Geo cable so that any NES controllers (including some accessories like the Zapper) can be used in the expansion port. This is what I do since NES controllers and Zappers are relatively cheap and easy to find.
Ok, that is interesting info. Thanks!
Pokun wrote:
BTW I just got to see the
manual, and correct me if I'm wrong but it looks like there is a mistake here. I don't have the Hori 4-player adapter myself, but from what other people testing it had to say it sounds like the 2P/4P switch do not matter when just using the first pair of ports. The switch is only used to enable the second pair of ports in games that supports them. In the manual however it says that the switch must be set to 4P in Micro Mages despite it not supporting the second pair of ports, which can't be right.
That's right, it doesn't matter. However, you can use 4 external controllers in 4p mode on the Hori. The controllers in port 3 and 4 will replace worn-out standard pads in this case. I can't check for validity of this information right now, though. Either way, it was easier to just state "leave the switch set to 4 at all times" and not have to add any more text than that.
Iirc the 3/4 ports behave similarly to the FourScore in that you've got to read another byte from $4016/4017 respectively after the first controllers were read to get their data.
miau wrote:
However, you can use 4 external controllers in 4p mode on the Hori. The controllers in port 3 and 4 will replace worn-out standard pads in this case. I can't check for validity of this information right now, though. Either way, it was easier to just state "leave the switch set to 4 at all times" and not have to add any more text than that.
Iirc the 3/4 ports behave similarly to the FourScore in that you've got to read another byte from $4016/4017 respectively after the first controllers were read to get their data.
So it does support the Hori adapter after all?
Wit's seems to use OR-ing with D0 and D1 to duplicate the first port pair with the built-in controllers and uses the second port pair for player 3 and 4, but you instead duplicates them in the second port pair? That sounds smarter because that way you can still support normal expansion controllers at the same time.
Sorry for the very late response.
Pokun wrote:
So it does support the Hori adapter after all?
Wit's seems to use OR-ing with D0 and D1 to duplicate the first port pair with the built-in controllers and uses the second port pair for player 3 and 4, but you instead duplicates them in the second port pair? That sounds smarter because that way you can still support normal expansion controllers at the same time.
Apparently
I thought I'd post the 4-player controller reading code as it took me a while to figure out at the time. Hope this will make someone's life easier:
Code:
;NES 4-player controller reading - written for the ca65 assembler
;- works with FourScore on NES (and AV Famicom afaik)
;- works with Hori adapter on Famicom (up to 4 players)
;- works with expansion port controllers on Famicom (3 players)
;- should work with dual expansion port controllers on Famicom (4 players)
;- has checks in place to allow worn out standard controllers to be replaced by
; expansion controllers on Famicom (depending on state of playerActive array);
; This is good behavior for Famicom, a lot of commercially released Famicom
; games do the same!
;joypad button constants
JOY_RIGHT = $01
JOY_LEFT = $02
JOY_DOWN = $04
JOY_UP = $08
JOY_START = $10
JOY_SELECT = $20
JOY_B = $40
JOY_A = $80
.zeropage
;you'll need to initialize this when the user selects the number of players.
;zero for active players, non-zero for inactive players
playerActive: .res 4
;will hold state of joypads after call to updateInput (use bitwise ops with
;button constants above)
joy1: .res 1
joy2: .res 1
joy3: .res 1
joy4: .res 1
buf4016_0: .res 3
buf4016_1: .res 3
buf4017_0: .res 3
buf4017_1: .res 3
.code
;call this at the beginning of a frame
.proc updateInput ;a,x,y
;not 100% sure anymore why I wrote these out
;most likely had to do with some zeropage reuse/optimization thing in Micro Mages
byte2_4016_0 = buf4016_0 + 0
byte1_4016_0 = buf4016_0 + 1
byte0_4016_0 = buf4016_0 + 2
byte2_4017_0 = buf4017_0 + 0
byte1_4017_0 = buf4017_0 + 1
byte0_4017_0 = buf4017_0 + 2
byte2_4016_1 = buf4016_1 + 0
byte1_4016_1 = buf4016_1 + 1
byte0_4016_1 = buf4016_1 + 2
byte2_4017_1 = buf4017_1 + 0
byte1_4017_1 = buf4017_1 + 1
byte0_4017_1 = buf4017_1 + 2
;reset strobe bit
ldy #$01
sty $4016
dey
sty $4016
;read joypad and famicom expansion pads as well as multitap adapters
ldx #3-1
@byteLoop:
ldy #8
@readLoop:
lda $4016
lsr a ; bit0 -> Carry
rol buf4016_0,x
lsr a ; bit1 -> Carry
rol buf4016_1,x
lda $4017
lsr a ; bit0 -> Carry
rol buf4017_0,x
lsr a ; bit1 -> Carry
rol buf4017_1,x
dey
bne @readLoop
dex
bpl @byteLoop
lda byte0_4016_1
sta joy3
lda byte0_4017_1
sta joy4
;on Famicom, it is expected that the expansion port controller
;can be used to replace a worn-out standard controller #1
;Let's do that unless a third player joins the party
lda byte0_4016_0
ldy playerActive+2 ;player 3
beq :+
ora joy3
:
sta joy1
;also allow second expansion controller to replace standard controller #2
lda byte0_4017_0
ldy playerActive+3 ;player 4
beq :+
ora joy4
:
sta joy2
@detectMultitap:
;check 3rd bytes from bit0 reads
lda byte2_4016_0
cmp #%00010000 ;$10
bne @skipFourScore
lda byte2_4017_0 ;$20
cmp #%00100000
bne @skipFourScore
;FourScore detected
;2nd bytes hold controller #3/#4 data
lda byte1_4016_0
ora joy3
sta joy3
lda byte1_4017_0
ora joy4
sta joy4
jmp @skipDetectMultitap
@skipFourScore:
;check 3rd bytes from bit1 reads
lda byte2_4016_1
cmp #%00100000 ;$20
bne @skipHori
lda byte2_4017_1
cmp #%00010000 ;$10
bne @skipHori
;hori adapter detected
;2nd bytes hold controller #3/#4 data
;allow to replace worn out standard famicom controllers with these as well (4p mode)
lda byte1_4016_1
ora joy1
sta joy1
lda byte1_4017_1
ora joy2
sta joy2
@skipHori:
@skipDetectMultitap:
rts
.endproc
Thanks for your reply.
It looks like you do the Hori adapter like the Four Score but with a port-swapped signature and reading the data from the EXP port pins, just as expected.