AY music: PT3 player!

Probably the most technical forum around. It does not have to be coding related, or assembly code only. Just talk about how you can use the AY chip to do cool sounding things :)
User avatar
iss
Wing Commander
Posts: 1841
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

AY music: PT3 player!

Post by iss »

Hello all!
Great news: our Oric has PT3 player!

Thanks to French Touch, who shared his incredible work, now everyone can create new demos, add PT3 music to games and enjoy these high quality tunes.

Visit French Touch youtube channel to see his demos.
There you can find zipped sources and some DSKready to play. (I attach below the same ZIP just to mirror this precioussss;)).

Fun detail is that I was following the work of deater78 on comp.sys.apple2, planing to port his code for Oric... and surprise, surprise - French Touch come with his master piece - ready to use PT3 player!!!

Merci beaucoup, French Touch!
Attachments
ORIC_PLAYER_PT3.zip
(1 MiB) Downloaded 956 times
User avatar
Chema
Game master
Posts: 3157
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: AY music: PT3 player!

Post by Chema »

I have just downloaded and tested it and I am quite impressed!!!

At least a pro-tracker for our Oric which is compatible with Vortex... is this true?

I'll give a look at the size and CPU usage (which I guess will be quite high), but it is indeed a great job. And excelent news for our community.
User avatar
Dbug
Site Admin
Posts: 5042
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: AY music: PT3 player!

Post by Dbug »

Very cool :)

The code is a bit confusing, is that actually a Z80 emulator???

Code: Select all

    ; "registers" Z80
    ; A = A
    ; F = flags
    
    z80_A   .dsb 1      ; save A
    z80_C   .dsb 1
    z80_B   .dsb 1
    z80_E   .dsb 1
    z80_D   .dsb 1
    z80_L   .dsb 1
    z80_H   .dsb 1
    z80_IX  .dsb 2
    z80_AP  .dsb 1      ; save A'
to anyone trying to optimize it: There's a lot of self modified code that is not obvious at first glance.

Like for example:

Code: Select all

PrSlide	
        LDA #$AC             <-- Put AC in A
        STA z80_E
        STA (z80_IX),Y
        INY
        LDA #$AC             <-- Look mum, an optimization, I can just remove that one!
        STA z80_D
        STA (z80_IX),Y

       (...)
       
PTDECOD 
	LDY #Note   							    				
	LDA (z80_IX),Y
	STA PrNote+1												
	LDY #CrTnSl    		    						    		
	LDA (z80_IX),Y                                              
	STA PrSlide+1	   <-- Not so fast! Patches the first one!
	INY 
	LDA (z80_IX),Y											
	STA PrSlide+8	   <-- Not so fast! Patches the second one!
User avatar
6502Nerd
Flying Officer
Posts: 137
Joined: Thu Oct 08, 2020 9:48 pm
Location: Leicestershire, UK
Contact:

Re: AY music: PT3 player!

Post by 6502Nerd »

I have converted this to work with dflat - not yet interrupt driven (WIP), but I have downloaded a huge library of PT3 files and can call the player 50 times per second (roughly) to get a decent rendition.

This is quite an old thread though - my question is whether this is the way to go or if the Arkos AKY format is better as I have seen dbug in a newer thread indicate this is a good player.

Main objective is to have something with a decent library of songs as I am no good at composing so it would take too long to make my own songs. For PT3 files, I have now 1000s of songs.

(BTW - I spotted a bug in the PT3 player which disables the I/O port when updating AY register 7 which stopped the keyboard from working - my keyboard routines assume the I/O port is enabled rather than taking the time to do this each time).
User avatar
iss
Wing Commander
Posts: 1841
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: AY music: PT3 player!

Post by iss »

6502Nerd wrote: Wed Jan 01, 2025 3:20 pm (BTW - I spotted a bug in the PT3 player which disables the I/O port when updating AY register 7 which stopped the keyboard from working - my keyboard routines assume the I/O port is enabled rather than taking the time to do this each time).
Haha, yet another one fall into this pit. :lol:
You are not alone, @iss and @Dbug were there too ... Click!

EDIT: Above is for AKS player but PT3 player has the same bug:
20250101_110602.jpg
Post Reply