From a15706fb8180b05fe08c3017cbf88a9f6ba292ab Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Fri, 17 May 2019 12:57:39 -0400 Subject: [PATCH] pt3: made total time count 3x faster in theory still too slow --- pt3_player/FAQ | 19 +++++++++ pt3_player/README.pt3_player | 19 ++++++--- pt3_player/pt3_player.s | 78 ++++++++++++++++++++++-------------- 3 files changed, 82 insertions(+), 34 deletions(-) create mode 100644 pt3_player/FAQ diff --git a/pt3_player/FAQ b/pt3_player/FAQ new file mode 100644 index 00000000..2e8e9b11 --- /dev/null +++ b/pt3_player/FAQ @@ -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. diff --git a/pt3_player/README.pt3_player b/pt3_player/README.pt3_player index 85699d5c..45c69d56 100644 --- a/pt3_player/README.pt3_player +++ b/pt3_player/README.pt3_player @@ -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 ~~~~~~~~~~~~~~~~~ diff --git a/pt3_player/pt3_player.s b/pt3_player/pt3_player.s index 6244b50c..381f4e33 100644 --- a/pt3_player/pt3_player.s +++ b/pt3_player/pt3_player.s @@ -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 #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"