mirror of
https://github.com/KarolS/millfork.git
synced 2025-04-10 01:36:59 +00:00
Merge pull request #79 from zbyti/master
refactor and MPT player examble
This commit is contained in:
commit
4a09a80db0
@ -92,6 +92,12 @@ how to create a program made of multiple files loaded on demand
|
||||
|
||||
* [Horizontal stars example](a8/horizontal_stars.mfk) – horizontal stars done on one missile
|
||||
|
||||
### Music
|
||||
|
||||
* [CMC Player](a8/cmcplayer.mfk) – CMC player with sample music
|
||||
|
||||
* [MPT Player](a8/mptplayer.mfk) – MPT player with sample music
|
||||
|
||||
### Benchmarks
|
||||
|
||||
* [Grand Theft Antic](a8/grand_theft_antic.mfk) – ANTIC impact on CPU depending on the used graphic mode
|
||||
|
23
examples/a8/cmcplayer.mfk
Normal file
23
examples/a8/cmcplayer.mfk
Normal file
@ -0,0 +1,23 @@
|
||||
const word ADDRMUS = $a000
|
||||
const word ADDRPLA = $b000
|
||||
|
||||
asm void comm(byte register(a) a, byte register(x) x, byte register(y) y) @ ADDRPLA+3 extern
|
||||
asm void takt() @ ADDRPLA+6 extern
|
||||
|
||||
void main(){
|
||||
comm($70,ADDRMUS.lo,ADDRMUS.hi)
|
||||
comm(0,0,0)
|
||||
while os_CH == $ff {
|
||||
if antic_vcount == $10 {
|
||||
antic_wsync = $e
|
||||
gtia_colbk = $e
|
||||
takt()
|
||||
gtia_colbk = 0
|
||||
}
|
||||
}
|
||||
comm($40,0,0)
|
||||
}
|
||||
|
||||
const array player @ ADDRPLA = file("data/cmc_player.rep", 6)
|
||||
// Music by Michal Brzezicki (Caruso) - Echo
|
||||
const array music @ ADDRMUS = file("data/echo.cmc", 6)
|
BIN
examples/a8/data/bitter_reality_4.mpt
Normal file
BIN
examples/a8/data/bitter_reality_4.mpt
Normal file
Binary file not shown.
4
examples/a8/data/cmc.nfo
Normal file
4
examples/a8/data/cmc.nfo
Normal file
@ -0,0 +1,4 @@
|
||||
Chaos Music Composer http://atariki.krap.pl/index.php/
|
||||
player modified by Marok; version 2.2 rev01-20
|
||||
|
||||
Example tune: Michal Brzezicki (Caruso) - Echo
|
BIN
examples/a8/data/cmc_player.rep
Normal file
BIN
examples/a8/data/cmc_player.rep
Normal file
Binary file not shown.
BIN
examples/a8/data/echo.cmc
Normal file
BIN
examples/a8/data/echo.cmc
Normal file
Binary file not shown.
4
examples/a8/data/mpt.nfo
Normal file
4
examples/a8/data/mpt.nfo
Normal file
@ -0,0 +1,4 @@
|
||||
Music ProTracker http://atariki.krap.pl/index.php/Music_Protracker
|
||||
player version 2.4
|
||||
|
||||
Example tune: Adam Bienias (SoTe): Bitter Reality - Partyland 1
|
BIN
examples/a8/data/mpt_player.obj
Normal file
BIN
examples/a8/data/mpt_player.obj
Normal file
Binary file not shown.
25
examples/a8/mptplayer.mfk
Normal file
25
examples/a8/mptplayer.mfk
Normal file
@ -0,0 +1,25 @@
|
||||
const word ADDRMUS = $a000
|
||||
const word ADDRPLA = $b000
|
||||
|
||||
byte stop @ ADDRPLA + $62d
|
||||
|
||||
asm void comm(byte register(a) a, byte register(x) x, byte register(y) y) @ ADDRPLA extern
|
||||
asm void takt() @ ADDRPLA+3 extern
|
||||
|
||||
void main(){
|
||||
comm(0,ADDRMUS.hi,ADDRMUS.lo)
|
||||
comm(4,0,0)
|
||||
while os_CH == $ff {
|
||||
if antic_vcount == $10 {
|
||||
antic_wsync = $e
|
||||
gtia_colbk = $e
|
||||
takt()
|
||||
gtia_colbk = 0
|
||||
}
|
||||
}
|
||||
stop = 0
|
||||
}
|
||||
|
||||
const array player @ ADDRPLA = file("data/mpt_player.obj", 6)
|
||||
// Music by Adam Bienias (SoTe): Bitter Reality - Partyland 1
|
||||
const array music @ ADDRMUS = file("data/bitter_reality_4.mpt", 6)
|
@ -17,6 +17,21 @@
|
||||
// PORTB_SYSTEM_ON = %00000001; portb bit value to turn System on
|
||||
//
|
||||
// ================================================
|
||||
//
|
||||
// Now the routine that lets you get to
|
||||
// the RAM that is under the OS.
|
||||
// There are actually 2 memory areas
|
||||
// present:
|
||||
// 4K at $C000 to $CFFF, 49152 to 53247
|
||||
// 10K at $D800 to $FFFF, 55296 to 65535
|
||||
//
|
||||
// The last 6 bytes of the 10K area are not
|
||||
// usable, since that is where the interrupt
|
||||
// routines are located. Therefore do not
|
||||
// use any RAM above $FFF9 (65529) or you
|
||||
// will crash the system.
|
||||
//
|
||||
// ================================================
|
||||
|
||||
byte nmien = $c0
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
// ANTIC Display List Instruction Set
|
||||
// THE DISPLAY LIST CANNOT CROSS A 1K BYTE MEMORY BOUNDARY UNLESS A JUMP INSTRUCTION IS USED!
|
||||
const byte LMS = $40 // Load memory scan 10-bit counter, $fff boundary.
|
||||
const byte LMS = $40 // Load memory scan 12-bit counter, $0-$fff boundary.
|
||||
const byte DLI = $80 // Display list interrupt - Interrupt CPU at beginning of last scan line.
|
||||
const byte HSCROL = $10 // Enable horizontal scrolling.
|
||||
const byte VSCROL = $20 // Enable vertical scrolling.
|
||||
|
Loading…
x
Reference in New Issue
Block a user