Skip to content

Latest commit

 

History

History
182 lines (172 loc) · 7.85 KB

readmeEnglish.md

File metadata and controls

182 lines (172 loc) · 7.85 KB

Belial01

This project aims to continue the legacy of the multiplatform Diskmag Exilium (Belial 01), under an ATMEGA328 (arduinocade).
First we need a hardware platform, which in this case, will be the arduinocade (Peter Barrett).
In order to bring the platform closer to the maximum number of people, a first design will be made under an ARDUINO ONE board without the need to change the 16 Mhz glass (sacrificing color), as well as the greater compatibility of pins and hardware of the arduinocade.



IDE Arduino

Tests have been carried out with the IDE 1.8.11.

Hardware

An ARDUINO ONE plate is used, equipped with ATMEGA328, so it would also be worth DUEMILANOVE or NANO, respecting the location of the pins.
The same pins as the arduinocade will be used:

  • Video - D1 and 9
  • Audio - D6
The specific pins of the arduino will be left free for the future:
  • A4,A5 - I2C to connect EEPROM LC256
  • 13,12,11- ISP programmer
  • D2 and D3 - PS/2 keyboard
For the joystick we'll use:
  • ATARI - A0,A1,A2,A3,D4 and D5
The pins and the infrared module have been removed from the arduinocade, but we will use ATARI and AMSTRAD CPC standard controls instead.



Video

The SPI mode (Dave Schmenk) is used to generate video, similar to the arduinocade, but with the difference, of following with the same 16 Mhz crystal of the arduino, so that a signal is generated:

  • CVBS RCA
  • Black and white NTSC
  • Hsync 63.55 microseconds
  • 320x200 pixels
  • Tiles 40x25
  • Single resistance 1 K and 470 ohms
The circuit to be carried out is as follows:



Audio mixer

The audio of arduinocade is characterized by

  • PWM - pin D6
  • Mono output
  • 4 channels
  • Resistance 100 K
I have decided to continue using pin 6 for compatibility, but I have replaced the 100 K fixed resistor with a 100 K logarithmic pontentiometer, which allows the volume to be adjusted.

I have also added a simple passive audio mixer, so we can mix the output of the arduinocade MONO with a stereo audio input. To do this, 1 K resistors must be used for each input:

Thanks to this mixer, we can play background music from external audio devices, while the music of the arduinocade plays.



Test ATARI joystick

I have created an ATARI joystick test program for Arduino, which allows us to test the button presses:

joystickTestDB9

The standard of ATARI and AMSTRAD CPC of common mass, PULLUP, is used and the pins to be used in ARDUINO are
  • Up - 14 (A0)
  • Down - 15 (A1)
  • Left - 16 (A2)
  • Right - 17 (A3)
  • A - 4
  • B - 5
The representation of the DB9 connector is as follows

The circuit is very simple:



Jukebox

We have:
  • Server part (mobile or computer) in web browser that receives requests for sound commands, via audio tones
  • Arduinocade generating song control commands via sound
Basically, the arduinocade sends audio tones to a web application that decodes them, so that depending on the command, a song is executed.
JUKEBOX DTMF
JUKEBOX DTMF (online)
The tones that are generated are square monotones, but of 2 types:
  • With 63.55 microsecond NTSC synchronism
  • Normal without video sync interruption
In the first case, multiple tones are generated from the horizontal video synchronism, so that the drawing on the screen does not stop, but the wave is not pure. So, in the HTML5 part, we must have removed the DTMF checkbox, that is to say, we will hear monotone tones, and we must have activated the NTSC checkbox.
For the second case, the drawing on the screen will be stopped each time sound is generated, but a purer wave will be generated. In the HTML5 part we must have removed the DTMF checkbox and the NTSC.

The commands that are sent as nonotone are:
  • #00* - Track 0
  • #01* - Track 1
  • #02* - Track 2
  • #04* - Track 3
  • #07* - Track 4
  • #0D* - Track 5
  • #10* - Track 6
  • #11* - Track 7
  • #12* - Track 8
  • #14* - Track 9
  • #24* - Track 10
  • #20* - Next Track
  • #21* - Last Track
  • #22* - Play/Pause
  • #17* - + Volume
  • #1D* - - Volume
Tone to Hz conversion (taking video):
  • 0 - 1336 Hz
  • 1 - 697 Hz
  • 4 - 770 Hz
  • 7 - 852 Hz
  • D - 1633 Hz
  • # - 561,98718669215 Hz
  • * - 393,3910306845 Hz
  • 2 - 302,60848514192 Hz
Tone to Hz conversion without NTSC (no video output)
  • 0 - 1336 Hz
  • 1 - 697 Hz
  • 4 - 770 Hz
  • 7 - 852 Hz
  • D - 1633 Hz
  • # - 1477 Hz
  • * - 941 Hz
  • 2 - 1209 Hz
From the Arduino application, we can use the buttons on the controller:
  • Up - Volume up
  • Down - Volume Down
  • Left - previous song
  • Right - Next song
  • A - Play/Pause
  • B - NTSC mode without stopping drawing on the screen, or without interruptions, stopping drawing
For this test, an extra slow mode has been used (500 ms tone, 500 ms silence) and with 4 sending tones #xx*, but by modifying the code we can put the FAST mode with only 2 tones and maximum speed. So, we must also put these options in the web decoder part.

HTML5

I've created several tools:

  • Image to Tiles Converter (remove repeats)
  • 40x25 visual simulator of the entire arduinocade memory map in HTML5
  • Joystick simulation in HTML5
  • Sound simulation in HTML5
In this way, you can see and interact, just as if you had an arduinocade, but from the browser. Unfortunately, all the js code I use is for my own use, so it's not comfortable for the end user, and I haven't uploaded it to the repository. The Arduino code is uploaded.

Console

The capture of the joystick test in the arduino:

The capture of the jukebox in the arduino:

It can be put in a simple wooden or plastic box.