Wie man Arduino wie ZX Spectrum zum Singen bringt. Teil 2: Musik Dizzy IV auf Arduino Nano

In diesem Teil des Artikels werden wir zu den interessantesten übergehen - wir werden das Dizzy IV-Musikmodul nach Zahnrädern zerlegen und die Melodie zuerst unter Windows und dann auf dem Arduino Nano spielen. Für Details willkommen unter Katze.

(Screenshot des Startbildschirms von Dizzy 4)
(Screenshot des Startbildschirms von Dizzy 4)

, .

Disclaimer: 

, , , , . , Z80. . 

Dizzy 4 David Whittaker - (: 1 2). 

, . 1987 , , , “”, Tatung Einstein ( AY-3-8910) RS-232 . 1989 . , - . -, , . . , Amstrad CPC, .

tap- Unreal Speccy IDA Pro. .

, 0x4000 ( 16384, , ) . 0xC000 0xC000 0xD300. , , , . , - , .

, , -, , . - .

( , ):

  • 0xC000 - 0xC01B - (init) - , , .

  • 0xC01C - 0xC032 - (play_loop) - . 'halt' 20 , .. 50 . , , . , , , , 20 , . , .

  • 0xC033 - (play_frame) - 50 , . . , , . , , .. - 7. AY-3-8912 3, . , , , .

  • 0xC043 - (init_next_note) - .

  • 0xC051 - (init_next_position) - , .

  • 0xC06C - (init_pattern) - .

  • 0xC082 - (init_next_note_in_current_pattern) - . init_note_in_channel, , , . , . , . , , . , ix iy, Z80 Intel 8080. , this, . iy , , ( ) .

  • 0xC0B4 - (manage_current_note) - 20 , , . manage_current_note_in_channel, , - . , () ().

  • 0xC0F5 - 0xC1E2 - (manage_current_note_in_channel) - . , . , .

  • 0xC1E3 - (ay_out) - .

,

, :

0xC043 'A' 0x3A. , , . 'A' 0x39?

, 0xC048 (, , 'AND 3Fh') (0xC043), , 'LD A, ...' , - . , 0xC044 , , .

, , , - .

Windows

, Windows, . “” Arduino . Windows ( win-implementation GitHub; Visual Studio 2017) : 1, 2.

, .

, , ATMega. 'uint8_t' 'uint16_t'.

, , python ( extractor GitHub), :

  • ( ),

  • ,

  • .

AY-3-8912 , . , , . , , - . . . , 15 . , AY-3-8912, , . . “” 16-, 4 . , , 0 3 , 4 9 . , . , , , , - ( ).

Dizzy IV . , xorshift.

Arduino

, Arduino Nano. , . , STM32, , , STM32 ZX Spectrum, . Raspberry Pi , , .

TIMER2, OC2B PD3 ( D3 Arduino). - 31373 , Arduino - , .

Arduino Nano . , . , - . , , . uart -> usb, .

, , 'get_music_data_1' 'get_music_data_2'. A, - B, .

arduino-sketch Arduino .

1

2

, Github.

: , .

P.S. - “Color Lines” ( , ) , , . . , - TR-DOS , “ ”.

 P.P.S. Unreal Speccy, speccy.info.

P.P.P.S. . VK, FB, Instagram Telegram-, Maxilect.




All Articles