GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing arcade.makecode.com — Creating your own Arcade hardware Creating your own Arcade hardwareContact the MakeCode TeamIf you want to produce an Arcade compatible product please let us know at [email protected]. OverviewThe MakeCode Arcade system is designed to support a variety of physical gaming devices in addition to a more virtual experience on a PC or mobile device. We encourage others to design and build new variants of MakeCode Arcade hardware using the guidelines presented in this document. Minimal Open Source Reference Design
We have built a minimal open source hardware reference design for an Arcade board. This consists of a schematic (available as PDF and as Altium .SchDoc), a layout (available as Gerbers and related CAM files plus an Altium .PcbDoc), and a BoM (available as a Microsoft Excel file).
Arcade hardware must meet the following specifications:
In addition we encourage:
Other optional elements include:
A firmware configuration system allows a lot of flexibility regarding specific component choices and circuit designs to meet the above specification, see Configuration. The rest of this page is split into three main sections, each of which refers to our reference design:
ComponentsMCUMakeCode Arcade currently only targets ARM Cortex-based MCUs; we have tested Cortex M4F and M0+. The Arcade display resolution and colour depth requires 160x120x4 bits for a display buffer, taking a little under 10kB. We need at least two sets of display data for double-buffering and the user is very likely to use two or three more for various sprite operations. This, together with heap fragmentation concerns, requires the hardware to have at least 96kB of RAM. Programs with heavy memory requirements may only run if there is more than 96kB of RAM. In addition 512kB of flash and a processor speed of at least 64MHz or more are recommended. We currently support the following hardware variants which match the above criteria:
The STM32F41x series is listed to run at 100MHz, but to support USB we need to run them at 96MHz. We support 48 pin and larger packages. Only STM32F412 in 64 pin and larger packages support a parallel display interface, which is required if you want to use an ILI9341 320x240 display (see display). Additionally, we have experimental support for the following:
Of course, many other choices are possible and we would love to hear your feedback. DisplayWhen using a 160x128 pixel display we do not use the 8 bottom rows of the display, to make it easier to upscale to a 320x240 display. We use 15 colors plus transparency along with a user-controllable palette. Some of the displays we have tested are listed below, but if you have good reasons to use a different display please let us know. 160x128 based on ST7735 or ILI9163C controller chipIn this case the display is connected to the MCU using SPI. The chosen display must therefore expose the ST7735 or ILI9163C SPI interface. Different displays use different names for the same pins. The following are all equivalent:
Most displays don't have a MISO line and in any case this does not need to be connected. The purpose of the We have found the following part numbers for ST7735 and ILI9163C displays: 320x240 based on ILI9341 via SPIOn D5, the SPI can run up to 50MHz and most displays seem to be able to handle that, which results in about 36fps. Also, use the following display configuration to begin with: 320x240 based on ILI9341 via 8-bit parallelOn F4, this requires an 8 bit parallel interface because SPI at 42MHz is unstable; in this case STM32F412RE or better is required. The FSMC controller on STM32F412 in 64 pin version enforces the following pin connections:
The CS pin of the screen can be connected anywhere (defined in bootloader as The choice of the WR pin should be in Also, use the following display configuration to begin with: Note that the ILI9341 has 4 configuration pins IM3, IM2, IM1, IM0. The following configurations are supported:
That is, in the first config connect pin D[7] to PA5, D[6] to PA4, etc. In the second config, connect D[17] to PA5, D[16] to PA4, etc. ButtonsWe require a total of 8 buttons: The recommended button arrangement is to have the directional buttons in a 'd-pad' layout on the left of the board, while the One function of the Arcade boards should have 'soft power off' rather than a physical on-off switch, see power management. AudioSingle channel mono audio output requires either a DAC or PWM with DMA support. The corresponding audio output from the MCU should be connected to an amplifier and an on-board sounder or speaker. A headphone jack for sound is optional. Note that we no longer use a stereo jack for networking, instead we use the purpose-built Jacdac protocol with its own connector. If there is an audio headphone jack it must be clearly labelled with a 'headphone' symbol. USB connectorArcade must have a micro USB socket for power and UF2 programming. We recommend a part with through-hole mechanical solder-down tabs to provide more strength, especially for 'bare boards' which have no physical enclosure to add mechanical strength. We recommend adding ESD protection for the USB data lines and a zener diode to clamp the Vbus power line and thereby limit over-voltage transients during USB connection. Multi-player communications with JacdacWarningMulti-player communication is under development. It's fine to build prototypes, but before designing any production hardware please contact us at [email protected]. Multi-player communications between Arcade devices is based on Jacdac, a protocol for networking over a single-wire connection. Battery powerArcade boards should ideally have provision for battery power: a battery connector, a battery holder and/or a LiPo recharging circuit. For regular batteries we suggest using a JST connector of the same style and polarity as that used on the Adafruit Circuit Playground Express. AccelerometerAn accelerometer is optional. We currently support the following parts:
If requested, we can potentially add support for other accelerometers such as MSA300. The accelerometers should have the SDA, SCL and INT1 lines connected
to each respective Vibration motorAn optional vibration motor can be connected. It should be driven by the LEDsUp to 4 LEDs can be defined. The first can be used for Jacdac status. Expansion connectorYou may wish to include some kind of expansion connector that allows users to connect their own circuitry to your Arcade board. This could be a pin header that's either fitted during production or left unpopulated for users to fit or solder to if desired. Alternatively, if a number of pins are to be exposed in an 'edge connector' style, one option is a micro:bit compatible edge-connector. Another approach is to use Jacdac so that it's really easy for users to add or remove additional hardware functionality. Hardware design notesPower managementThe Arcade firmware automatically switches the device off if it is not in use, unless the user has disabled this feature. A hardware power switch is therefore unnecessary. Not only does this reduce cost, the auto-power-off feature improves battery life. In order to ensure very low quiescent consumption following auto-power-off, all peripherals to the MCU must
enter a low power mode. We also put the CPU into deep sleep. The LCD backlight and audio amplifier will
be switched off. Ensure that there is no power LED
that cannot be turned off from the MCU. If you require an MCU output to signal shutdown there is an
optional A 3.3V regulator is likely to be needed. It should be robust to any unfiltered transients on the USB power line and to downstream short-circuits which may occur if the Arcade board has no enclosure. If it is possible to touch the regulator, it must not get too hot to touch under any circumstances. An optional Commissioning and debuggingProvision must be made for commissioning boards following manufacture. Depending on the MCU it may be possible to flash and test the board over USB. However, to-date we have used a debug connector which exposes SWD and other signals, as shown in the reference design. We use a standard 0.1" pitch single row header footprint for this, but we do not fit a connector to the PCB. Instead we use the technique described here: debug connector information. Pin mappingThe reference design provides a particular pinout (or pin mapping), but it is possible to use a different pinout. You need to put your pinout in the bootloader and flash the bootloader. Then, when you get a UF2 file from the Arcade website, it will at runtime look for settings such as the pinout in the bootloader and use the right pins. There are some restrictions on the pinout:
Firmware development notesBootloadersThere are different bootloaders to support the hardware variants. These bootloaders support the CF2 configuration data section.
The following bootloaders do not support the CF2 configuration data section yet. CompilationIf you're compiling a bootloader on your own, you will need to create a
Once you're done with all these changes, drop the This should load the config, with stuff removed.
Now you can patch the config with your pinout.
You should at least change If you're seeing strange effects on the display, you can try one of the following configs: For the ST7735 and ILI9341 screens:
The patching website can also remove config entries, just specify the value as Once you're done patching, select "Apply my patch", which will download new Note that you need to use the patching website to put the right header and size in the configuration data. It's also possible to patch a binary file of the bootloader with new config using the same website. Bootloader protectionEnd users will typically update the bootloader by copying a special UF2 file, which has a user-level application that overwrites the bootloader. To prevent misuse of this feature (eg one student emailing to a another a malicious UF2 file which writes a non-functional bootloader), some bootloaders (currently only F4) implement a protection feature. When booting, the bootloader will check if it's write-protected (this is done by setting bits in flash, which only take effect upon reset). If the write-protection is disabled, presumably during a bootloader update process, the bootloader will present a screen to the user asking if they really want to update the bootloader and that doing so could possibly brick the board. If the users agrees to upgrade, the app is allowed to run (and presumably update the bootloader). Otherwise, the protection is re-enabled. The default configuration of the bootloaders have this feature disabled to ease the
development process. To enable it, set Variant notesF4STM32F4 requires an external crystal for stable USB operation. The software takes the installed crystal frequency from a specific bootloader location, but best to stick to 8MHz. The following is the recommended pinout. The recommended pinout for header was described above. It's consistent with the config for the generic F4 in the bootloader repo. D5
R2For RP2040, the application looks for CF2 section (see below) at 4kB before the end of 1MB, 2MB, 4MB, 8MB, 16MB, 32MB (that's megabytes) in the flash. It's recommended to place it at all these addresses (size of flash permitting). See sample config UF2. Manufacturers should provide a "factory reset" UF2 which contains all these config sections, and possibly a test game. This file can be used to recover after the flash has been overwritten (eg by large files in the Micropython filesystem). ConfigurationWe anticipate the future need of various configurations for display controllers, as well as different accelerometers, etc. Thus, we generate the same UF2 file for all boards of a given variant, and have the runtime look for configuration values in the bootloader area (called CF2 configuration). See https://github.com/microsoft/uf2/blob/master/cf2.md for more details on the configuration format. The bootloaders can be binary patched with new configuration data if needed. The configuration data also includes the assignment of a GPIO pin header. Generally, the header isn't essential to this board, but it's recommended to at least leave holes for people to solder it in. The mapping between MCU GPIOs and the various hardware signals such as the buttons and display interface is specified in the bootloader. They can be changed as described above. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |