mirror of
https://github.com/KarolS/millfork.git
synced 2025-07-19 09:24:20 +00:00
refactor and MPT player examble
This commit is contained in:
BIN
examples/a8/data/bitter_reality_4.mpt
Normal file
BIN
examples/a8/data/bitter_reality_4.mpt
Normal file
Binary file not shown.
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,0)
|
||||||
|
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
|
// 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
|
byte nmien = $c0
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
// ANTIC Display List Instruction Set
|
// ANTIC Display List Instruction Set
|
||||||
// THE DISPLAY LIST CANNOT CROSS A 1K BYTE MEMORY BOUNDARY UNLESS A JUMP INSTRUCTION IS USED!
|
// 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 DLI = $80 // Display list interrupt - Interrupt CPU at beginning of last scan line.
|
||||||
const byte HSCROL = $10 // Enable horizontal scrolling.
|
const byte HSCROL = $10 // Enable horizontal scrolling.
|
||||||
const byte VSCROL = $20 // Enable vertical scrolling.
|
const byte VSCROL = $20 // Enable vertical scrolling.
|
||||||
|
Reference in New Issue
Block a user