mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-12-27 17:29:49 +00:00
pt3: made total time count 3x faster in theory
still too slow
This commit is contained in:
parent
770fe2bf25
commit
a15706fb81
19
pt3_player/FAQ
Normal file
19
pt3_player/FAQ
Normal file
@ -0,0 +1,19 @@
|
||||
PT3_Player Frequently Asked Questions
|
||||
|
||||
Q: Will this play on any Apple II?
|
||||
|
||||
A. Yes, though you need a Mockingboard in Slot 4 to hear the music.
|
||||
|
||||
You probably need 48k of RAM too.
|
||||
|
||||
|
||||
Q: Can you fit more than 18 songs on the disk?
|
||||
|
||||
A: Yes, it depends on how complex the PT3 files are.
|
||||
Also, PT3 files compress nicely and I could fit even more if I LZ4
|
||||
compressed them, it's just that would make it harder for other
|
||||
people to use the player.
|
||||
|
||||
Yes, I could write code that automatically decode in LZ4 encoded,
|
||||
but that gets tricky for various reasons, and you also need
|
||||
some RAM to decode the image into.
|
@ -2,7 +2,7 @@ The PT3_player
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
by Vince "Deater" Weaver
|
||||
15 May 2019
|
||||
17 May 2019
|
||||
http://www.deater.net/weave/vmwprod/pt3_player/
|
||||
|
||||
Plays Vortex Tracker II .pt3 files on the Apple II
|
||||
@ -76,11 +76,20 @@ Adding other files
|
||||
(with often complex, or hard-to find tools) the PT3_PLAYER can in
|
||||
theory play plain .pt3 files.
|
||||
|
||||
To get the player to play them, just rename them to fit the naming
|
||||
scheme (I think it will just be 00.PT3, 01.PT3, 02.PT3) and replace
|
||||
the existing files on the disk image with your favorite Apple II
|
||||
disk tool.
|
||||
To play your own files, just copy the file you want over an
|
||||
existing file (using the same filename).
|
||||
|
||||
TODO: It would be great if the player was smart enough to catalog
|
||||
the disk and just play all the files it finds, but that's a level
|
||||
of disk manipulation I don't have time to mess with right now.
|
||||
|
||||
|
||||
Other Future Plans
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The PT3 format can handle 6-channel songs (which a Mockingboard
|
||||
can play). I'd like to add support for this, but it will
|
||||
need some low-level changes to the code.
|
||||
|
||||
Code Optimization
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
@ -1,10 +1,15 @@
|
||||
; VMW Chiptune Player
|
||||
;===============
|
||||
; VMW PT3 Player
|
||||
;===============
|
||||
|
||||
; zero page definitions
|
||||
.include "zp.inc"
|
||||
|
||||
; Location the files load at.
|
||||
; If you change this, you need to update the Makefile
|
||||
PT3_LOC = $4000
|
||||
|
||||
|
||||
; Number of files. Should probably detect this automatically
|
||||
NUM_FILES EQU 18
|
||||
|
||||
|
||||
@ -15,39 +20,50 @@ pt3_setup:
|
||||
jsr HOME
|
||||
jsr TEXT
|
||||
|
||||
bit LORES
|
||||
bit LORES ; Lo-res graphics
|
||||
bit SET_GR
|
||||
bit TEXTGR ; split text/graphics
|
||||
|
||||
jsr clear_screens
|
||||
|
||||
|
||||
;===================
|
||||
; Check for Apple II and patch
|
||||
;===================
|
||||
;=======================
|
||||
; Check for Apple II/II+
|
||||
;=======================
|
||||
; this is used to see if we have lowecase support
|
||||
|
||||
lda $FBB3 ; IIe and newer is $06
|
||||
cmp #6
|
||||
beq apple_iie
|
||||
|
||||
lda #1
|
||||
lda #1 ; set if older than a IIe
|
||||
sta apple_ii
|
||||
|
||||
apple_iie:
|
||||
|
||||
|
||||
|
||||
;===============
|
||||
; Init disk code
|
||||
;===============
|
||||
|
||||
jsr rts_init
|
||||
|
||||
;===============
|
||||
; init variables
|
||||
;===============
|
||||
|
||||
lda #0
|
||||
sta DRAW_PAGE
|
||||
sta DONE_PLAYING
|
||||
sta WHICH_FILE
|
||||
|
||||
;=======================
|
||||
; Detect mockingboard
|
||||
;========================
|
||||
|
||||
; Note, we do this, but then ignore it, as sometimes
|
||||
; the test fails and then you don't get music.
|
||||
; In theory this could do bad things if you had something
|
||||
; easily confused in slot4, but that's probably not an issue.
|
||||
|
||||
; print detection message
|
||||
|
||||
; lda #<mocking_message ; load loading message
|
||||
@ -121,12 +137,6 @@ mockingboard_found:
|
||||
; 4fe7 / 1e6 = .020s, 50Hz
|
||||
|
||||
|
||||
;============================
|
||||
; Draw title screen?
|
||||
;============================
|
||||
|
||||
|
||||
|
||||
;==================
|
||||
; load first song
|
||||
;==================
|
||||
@ -144,7 +154,7 @@ mockingboard_found:
|
||||
;============================
|
||||
; Enable 6502 interrupts
|
||||
;============================
|
||||
|
||||
start_interrupts:
|
||||
cli ; clear interrupt mask
|
||||
|
||||
|
||||
@ -183,24 +193,19 @@ done_play:
|
||||
lda #0
|
||||
sta DONE_PLAYING
|
||||
|
||||
; clear the flame for now
|
||||
; clear the flame
|
||||
; FIXME: doesn't matter as we aren't displaying right now
|
||||
|
||||
jsr fire_setline
|
||||
|
||||
|
||||
; jsr clear_bottoms
|
||||
|
||||
jsr new_song
|
||||
|
||||
; clear the flame for now
|
||||
; re-enable the flame
|
||||
lda #7
|
||||
jsr fire_setline
|
||||
|
||||
cli ; re-enable interrupts
|
||||
jmp start_interrupts
|
||||
|
||||
jmp main_loop
|
||||
|
||||
forever_loop:
|
||||
jmp forever_loop
|
||||
|
||||
|
||||
|
||||
@ -461,6 +466,15 @@ done_MHz:
|
||||
; Calculate Length of Song
|
||||
;=================================
|
||||
|
||||
; There's no easy way to do this? (???)
|
||||
; We walk through the song counting frames
|
||||
; We can't even do this quickly, as the number of frames
|
||||
; per pattern can vary, and you have to parse a channel
|
||||
; to see this, and channel data is varying-width and so
|
||||
; you have to parse it all.
|
||||
; Time is just number of frames/50Hz
|
||||
|
||||
|
||||
lda #$0
|
||||
sta current_line
|
||||
sta current_subframe
|
||||
@ -484,7 +498,14 @@ fc_pattern_good:
|
||||
lda current_subframe
|
||||
bne fc_line_good
|
||||
|
||||
jsr pt3_decode_line
|
||||
; we only calc length of chanel A, hopefully enough
|
||||
|
||||
lda #1
|
||||
sta pt3_pattern_done
|
||||
|
||||
; decode_note(&pt3->a,&(pt3->a_addr),pt3);
|
||||
ldx #(NOTE_STRUCT_SIZE*0)
|
||||
jsr decode_note
|
||||
|
||||
lda pt3_pattern_done
|
||||
bne fc_line_good
|
||||
@ -715,7 +736,6 @@ song_list:
|
||||
.include "pageflip.s"
|
||||
.include "gr_setpage.s"
|
||||
.include "qkumba_rts.s"
|
||||
;.include "../asm_routines/gr_hlin.s"
|
||||
.include "keypress_minimal.s"
|
||||
.include "interrupt_handler.s"
|
||||
.include "pt3_lib.s"
|
||||
|
Loading…
Reference in New Issue
Block a user