PT3 Vortex tracker playback on the Einstein target

Discussion about other targets
Post Reply
MikesRetroTech
New member
Posts: 4
Joined: Wed Apr 17, 2019 7:00 am

PT3 Vortex tracker playback on the Einstein target

Post by MikesRetroTech »

Has anyone been able to get the Vortex/Arkos tracker playback routines running on the Einstein?

I have tried and failed, primarily because I don't know what I am doing =(

It seems that this is the last piece of the z88dk development puzzle for the Einstein, as graphics are catered for, but proper sound/music isn't. With the Einstein having the same AY chip as the MSX, I had hoped the sound routines would have been the same?

I guess I will have to keep going at it until I succeed?

Ho Hum.
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Re: PT3 Vortex tracker playback on the Einstein target

Post by dom »

That's a good point, I've not added the player functions for WYZ + VT2. They should be easy to add so I'll try to get into the next nightly.
Timmy
Well known member
Posts: 392
Joined: Sat Mar 10, 2012 4:18 pm

Re: PT3 Vortex tracker playback on the Einstein target

Post by Timmy »

Note: If the Einstein has the same AY chip as the MSX, then you probably should know that on the MSX, writing the wrong numbers to the AY chip can destroy hardware. On one specific MSX emulator there is always a big warning when doing AY output but I don't know how it works on the Einsstein.
MikesRetroTech
New member
Posts: 4
Joined: Wed Apr 17, 2019 7:00 am

Re: PT3 Vortex tracker playback on the Einstein target

Post by MikesRetroTech »

Timmy wrote: Fri Mar 03, 2023 12:22 pm Note: If the Einstein has the same AY chip as the MSX, then you probably should know that on the MSX, writing the wrong numbers to the AY chip can destroy hardware. On one specific MSX emulator there is always a big warning when doing AY output but I don't know how it works on the Einsstein.
Does the VT_Sound routine take this into account? I would hope so!

I have tried to re-compile my demo code using the VT_Sound wrapper from here: https://github.com/stefanbylund/vt_sound but get an error

error: invalid library file version: file=C:/Software/z88dk/lib/config/../../libsrc/_DEVELOPMENT/lib/sdcc_iy/vt_sound.lib, found=14, expected=16

How do I fix this or where can I find V16 of the VT_sound.lib file?
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Re: PT3 Vortex tracker playback on the Einstein target

Post by dom »

I've added the drivers for both tracker engines and updated the examples to provide Einstein compile lines:

* https://github.com/z88dk/z88dk/tree/mas ... /sound/wyz
* https://github.com/z88dk/z88dk/tree/mas ... /sound/vt2

The feature should be available in the next nightly
MikesRetroTech
New member
Posts: 4
Joined: Wed Apr 17, 2019 7:00 am

Re: PT3 Vortex tracker playback on the Einstein target

Post by MikesRetroTech »

dom wrote: Fri Mar 03, 2023 7:32 pm I've added the drivers for both tracker engines and updated the examples to provide Einstein compile lines:

* https://github.com/z88dk/z88dk/tree/mas ... /sound/wyz
* https://github.com/z88dk/z88dk/tree/mas ... /sound/vt2

The feature should be available in the next nightly
Brilliant. it works fine with last nights build =D I am a happy bunny now.

I have a another question: in the sound.asm file the music.pt3 is imported as a BINARY file, then referenced in the C code. How do I load this file using just C with no assembler? I want to be able to pass a filename to the main.c so it plays any .pt3 file i want.

I don't seem to be able to find any reference to this online, but to be honest, I don't know how to word the serch properly anyway so probably missing the mark!

When trying to reference a file on disk, my code compiles but the Einstein just resets which i think is because I am not loading the file properly =(

Any help is appeciated and if any one has a file routine to load a binary file into a vt_song structure I would be greatful to see it

Thanks
Mike.
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Re: PT3 Vortex tracker playback on the Einstein target

Post by dom »

You should be able to do something like this:

Code: Select all

int fd = open(filename, O_RDONLY,0);
if ( fd != -1 ) {
   int r = read(fd, 40000, 16384);
   // r is how long the file is
   close(fd);

   ay_vt2_init(40000)
   ay_vt2_start();
}
Assuming that there's free memory at address 40000.

Edit: fopen() on CP/M machines (hence the Einstein) opens files in text mode unless you use "rb" for example. So the read will stop at the first byte that has the value 26 (EOF)
MikesRetroTech
New member
Posts: 4
Joined: Wed Apr 17, 2019 7:00 am

Re: PT3 Vortex tracker playback on the Einstein target

Post by MikesRetroTech »

dom wrote: Sat Mar 04, 2023 3:23 pm You should be able to do something like this:

Code: Select all

int fd = open(filename, O_RDONLY,0);
if ( fd != -1 ) {
   int r = read(fd, 40000, 16384);
   // r is how long the file is
   close(fd);

   ay_vt2_init(40000)
   ay_vt2_start();
}
Assuming that there's free memory at address 40000.

Edit: fopen() on CP/M machines (hence the Einstein) opens files in text mode unless you use "rb" for example. So the read will stop at the first byte that has the value 26 (EOF)
Amazing, Thanks dom that really helped!
Post Reply