Cara membuat Arduino bernyanyi seperti ZX Spectrum. Bagian 2: Musik Dizzy IV di Arduino Nano

Di bagian artikel ini, kita akan beralih ke yang paling menarik - kita akan membongkar modul musik Dizzy IV dengan roda penggerak dan memainkan melodi terlebih dahulu di Windows, lalu di Arduino Nano. Untuk detailnya, selamat datang di bawah cat.

(tangkapan layar dari layar awal Dizzy 4)
(tangkapan layar dari layar awal 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