SuBoard by shiru8bit

SuBoard is an experimental NES/Famicom homebrew program that turns your
Subor-compatible keyboard Famiclone into a sort of weird, but quite powerful
instrument for live chiptune music performance. Basically you can play the
authentic NES sounds using the keyboard in a piano-like layout, similar to
what is found in many music tracker and sequencer programs.

The program provides a very minimalistic set of features, nevertheless it is
just enough for a full single person performance, similar to what could be
done with the classic Casio SA and Yamaha PSS series toy keyboards.

You can either use the program with a Flash cartridge such as Everdrive N8
(a mod to the keyboard clone may be required!), or make a custom cartridge
with the most basic board possible, NROM256.

The program is intended to be used to produce the sound without necessity
of connection to the TV, although it does provide basic video output that
highlights keyboard bits and displays current mode.

In case you want to make a more advanced live setup for the NES powered
music, I think it is a great idea to use some of the almighty NES Audio Tools
by Neil Baldwin. His work has been a major inspiration in making this program
(the single voice echo in particular). Take a look here:
https://neilbaldwin-nes.netlify.app/nes-audio/index.html



Features

- Monophonic lead instrument using one of the pulse channels or the
  triangle channel
- Limited polyphonic mode using two pulse channels for two-voice polyphony
- Dual oscillators mode with a detune between two pulse channels
- Automatic arpeggiated chords, monophonic, and portamento modes of play
- Selectable duty, volume and pitch (vibrato) envelopes
- Discrete pitch wheel with range of 1 and 2 semitones and selectable speed
- Single voice echo (delay effect) in all modes
- Preset-based drum/bass backing pattern with pattern break
- Mute/unmute for all backing pattern partials
- Direct noise pitch and type control (affects the hats)
- Bass note in the backing pattern can also be controlled



Control keys


Note keys have the standard ~2.5 octave layout, one octave above another:

 2 3   5 6 7   9 0   = \
Q W E R T Y U I O P [ ]

 S D   F G H   L :
Z X C V B N M , . /


Some functions are accessed via single key press:

Numpad /	Normal play mode, lead instrument notes get muted when all note
			keys are released.
Numpad *	Sustain play mode, lead instrument notes get sustained when all
			note keys are released.
Space		Mute lead instrument sound in the sustain mode.

F1,F2,F3	Select duty cycle. It is not tied to any of the envelope presets
			to be used as an expression tool.
F4			Select triangle mode for the lead. Triangle lead always has a
            constant volume (as this channel does not have a volume control),
            it also takes a priority over the pattern bass, and if echo is
            enabled in this mode, it plays via pulse channel with 50% duty.
            

F5			Start pattern (also gamepad Start)
F6			Stop pattern (also gamepad Select)
F7,F8		Change noise period (spectrum)
F9			Change noise mode between white and period
F10,F11,F12	Mute/unmute drums, hats, and bassline

Enter		Alter currently playing pattern into a break

Arrows		Pitch wheel (also gamepad D-Pad)

Ctrl+Note	Change backing pattern bass note (also gamepad A)
Shift+Note	Change bass note while muting lead (also gamepad B)


Both gamepads are acting the same, so you can plug it into either port.


Other functions are accessed via selection of a parameter that can then be
changed using Numpad numeric keys. Once a parameter is selected, any Numpad
numeric key press will change it. It is up to the user whether he wants to
remember the currently selected parameter, or do two button presses every
time just to be sure.

Ins			Octave selection, 1..6 (active by default)
Delete		Monophonic mode:
			1 arpeggiated chords, volume envelope restarts with new presses
			2 arpeggiated chords in legato mode, volume envelope does not restart
			3 totally mono, volume envelope restarts
			4..8 portamento with variable speed, fastest to slowest
			9 polyphonic mode
Home		Arpeggio speed, 1..6, fastest to slowest
End			Pitch wheel speed, 1..9, fastest to slowest			
PgUp		Echo/delay depth, 1..7 (1 disables the echo)
PgDown		Echo/delay time, 1..9, shortest to longest
NumLock		Volume envelope preset select, 1..9
Numpad -	Pitch envelope preset select, 1..9
Numpad +	Dual oscillator mode, not applicable for the triangle lead. 1..9
            (1 disables dual mode, 2..9 a cents to a full octave detune)
Numpad 0	Backing pattern number, 1..9 (if a pattern is playing, it will be
			applied to the next loop)
Numpad Del	Backing pattern speed, 1..9, fastest to slowest
			


Hardware quirks

There is a variety of keyboard Famiclones besides the original Famicom with the
Family Keyboard. This software only supports a subset of Subor models and direct
compatibles that happen to have expanded keyboard, with F9-F12 and Numpad keys
directly accessible, so it is not usable with the original Family Keyboard.

It has been tested on Subor SB-225B that has a PCB marked as SB-328D inside. It
has been discovered that this particular model (or the board, perhaps) has a
hardware lock to enable the keyboard to be used only with Subor cartridges.
Otherwise the keyboard is disabled, probably for compatibility reasons, to not
interfere with regular games. The lock is implemented by changing the function
of the pin 16 on the cartridge slot. If it is connected to GND on the cartridge
board, like it is supposed to be, the keyboard gets disable. To enable the
keyboard, this pin should be connected to +5V via 51K resistor.

In order to use SB-225B with Everdrive N8, the SB-225B needs to be modded by
cutting a wire nad adding this resistor to enable keyboard permanently (if you
don't want to mod the Everdrive itself, of course). For a custom cartridge the
mod can be done on the cartridge board.

There is a range of Magistr branded keyboard Famiclones that happen to have
F9-12 and Numpad keys, however, unlike Subor, the keys aren't accessible.
These clones has Nnumpad numbers connected in parallel to the regular numbers.


Interesting notes:

- Subor SB-225B sets Bit4 of Row 9 to 0 as sign of the expanded rows. This
  behaviour is mentioned in the
  https://problemkaputt.de/everynes.htm#controllerstypewriterkeyboards, but
  at the moment is not emulated anywhere.
  
- Subor SB-225B has duty cycles all correct, while Magistr Repetitor clone
  has them swapped out like many Famiclones.
  
  

History

v1.1  22.02.23  Triangle lead mode, poly mode (two pulse voices), dual mode.
v1.0  21.02.23  A proper handling Bit4 Row9 to remove always-keydow state on
                the real HW. Top octave row is expanded for four more keys.
                Both gamepads are act the same now, so it can be plugged into
                either port.
v0.91 20.02.23	Tested on Subor SB-225B, info on the HW keyboard lock on Subor
                is added.
v0.9  13.02.23	Original beta release with minimalistic but complete,including
                lead and pattern, arps, echo, porta, slide, and such. Known to
				be not working properly on the real hardware (some issues with
				the keyboard polling).



Contacts

mailto:shiru@mail.ru
http://shiru.untergrund.net
https://www.patreon.com/shiru8bit
https://twitter.com/shiru8bit
