This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

Hacking Family Basic keyboard support to certain games

Hacking Family Basic keyboard support to certain games
by on (#128904)
This question is honestly better suited to a place like ROMHacking.net, but I figure I ask here.

After finding out there were games like Jeopardy on the NES, where you need to type in an answer, it made me wonder if it would be at all possible to hack keyboard support for those games. There was also the Family Basic kit released for the Famicom, allowing you to make your own NES games, or rather programs, and with it came a keyboard. Is it possible to do, and if so, how difficult would it be? While adding keyboard support to a game sounds like a trivial effort nowadays, I'm well aware that to do even the simplest of things on the NES required entire paragraphs of code just to make it work.

On the flip side, this would also work really well for games with alphanumeric passwords.
Re: Hacking Family Basic keyboard support to certain games
by on (#128905)
Anything is theoretically possible if you put in enough time and effort.

In this particular case, you would have to at least consider the following tasks:
  1. Figuring out a keyboard reading routine
  2. Finding space to put the keyboard reading routine
  3. Figuring out where the relevant input routines are in the game (e.g. the routines for handling input during answering, password entry, etc.)
  4. Editing said input routines to handle keyboard input (e.g. calling your keyboard reading routine and handling its input in terms of the game)

There's probably things I'm missing from this list; hopefully someone else will chime in.

I know of at least three sources of keyboard reading routines:

Of course, you could always try writing your own (wiki info), but that's easier said than done. ;)
Re: Hacking Family Basic keyboard support to certain games
by on (#128955)
Note that Famicom Hangman does not check if the key is already held down (the routine in Attribute Zone does check), since it is not needed in this game (it ignores letters you have already pushed).

OneCrudeDude wrote:
This question is honestly better suited to a place like ROMHacking.net, but I figure I ask here.

After finding out there were games like Jeopardy on the NES, where you need to type in an answer, it made me wonder if it would be at all possible to hack keyboard support for those games. There was also the Family Basic kit released for the Famicom, allowing you to make your own NES games, or rather programs, and with it came a keyboard. Is it possible to do, and if so, how difficult would it be? While adding keyboard support to a game sounds like a trivial effort nowadays, I'm well aware that to do even the simplest of things on the NES required entire paragraphs of code just to make it work.

On the flip side, this would also work really well for games with alphanumeric passwords.
I very much agree with this; if you make your own games, you may consider to add support for a keyboard, too (even if a standard controller is also supported). It can help much.
Re: Hacking Family Basic keyboard support to certain games
by on (#128992)
Makimura has made two keyboard test roms with commented source included.

http://rdev.g-pw.org/makimura/homebrew/ ... input-test
http://rdev.g-pw.org/makimura/homebrew/ ... nput-test2