News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_teopl

CPCtelera Docker Build Environment (plus Enterprise port!)

Started by teopl, 12:40, 04 June 25

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

teopl

Hello, I started work on making cpctelera environment and project building easy (using prebuilt Docker images) - you can check it here:

https://github.com/baxpick/cpctelera_example

Docker images use (current) development branch of cpctelera and since breaking changes are made between the branches and cpctelera will hopefully evolve in the future - you might want to build your own docker image if this one is not suitable (but I will probably update it regulary).

This started as a need to use cpctelera on Apple M (silicon) architecture (current cpctelera does not support this: https://github.com/lronaldo/cpctelera/issues/162 ) and with the multiarchitecture docker image this is now possible - since no VM/cygwin/wine/... wrappers are used compile is really fast now!

What is also really great is that, thanks to @Geco from enterpriseforever forum, you can now also port your cpctelera projects to Enterprise computer since he provided (almost complete) port of cpctelera for Enterprise!

Some simple projects can be even built for Enterprise without any changes to the code - example: https://github.com/lronaldo/cpctelera/issues/162#issuecomment-2919802493

Of course, porting will probably require some changes (moving memory around, disable or reimplement music, interrupt handling, update colors, ...) but I did manage to port my old game with just a few changes - see here: https://enterpriseforever.com/games/amstrad-cpc-port-ludic-break-the-loop/

Prodatron

Quote from: teopl on 12:40, 04 June 25What is also really great is that, thanks to @Geco from enterpriseforever forum, you can now also port your cpctelera projects to Enterprise computer since he provided (almost complete) port of cpctelera for Enterprise!

Some simple projects can be even built for Enterprise without any changes to the code - example: https://github.com/lronaldo/cpctelera/issues/162#issuecomment-2919802493

Of course, porting will probably require some changes (moving memory around, disable or reimplement music, interrupt handling, update colors, ...) but I did manage to port my old game with just a few changes - see here: https://enterpriseforever.com/games/amstrad-cpc-port-ludic-break-the-loop/


Very cool!
Is it not possible to use @Geco s AY-emulator for the Dave soundchip, so that even music can be ported without any modifications?
Currently I am not sure, what player is used in CPCtelera. If it is using @Targhan s Arkos player, I can provide a version for the Enterprise (originally made for the SymbOS SoundDaemon).

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

teopl

Quote from: Prodatron on 15:03, 04 June 25
Quote from: teopl on 12:40, 04 June 25What is also really great is that, thanks to @Geco from enterpriseforever forum, you can now also port your cpctelera projects to Enterprise computer since he provided (almost complete) port of cpctelera for Enterprise!

Some simple projects can be even built for Enterprise without any changes to the code - example: https://github.com/lronaldo/cpctelera/issues/162#issuecomment-2919802493

Of course, porting will probably require some changes (moving memory around, disable or reimplement music, interrupt handling, update colors, ...) but I did manage to port my old game with just a few changes - see here: https://enterpriseforever.com/games/amstrad-cpc-port-ludic-break-the-loop/


Very cool!
Is it not possible to use @Geco s AY-emulator for the Dave soundchip, so that even music can be ported without any modifications?
Currently I am not sure, what player is used in CPCtelera. If it is using @Targhan s Arkos player, I can provide a version for the Enterprise (originally made for the SymbOS SoundDaemon).

Do you know which Arkos Tracker (players) version you have already ported to Enterprise?

If I remember correctly, original cpctelera still uses Arkos Tracker 1...

In this cpctelera port Geco provided, there is already a working Arkos Tracker 2 port! So you could use it to have music also, if Arkos2 is good for your Enterprise cpctelera project.

But since cpctelera doesn't integrate Arkos2 and it's quite different from Arkos1, when porting music you need to manually call asm functions like "init", "play", ... (which is quite possible and not very hard even for me :) )

Not sure which exact Arkos Tracker 2 players Geco ported (there were few variants) but I can check.

Now... There is already Arkos Tracker 3 released and there is also this: https://github.com/lronaldo/cpctelera/issues/189

Maybe we should wait for cpctelera Arkos Tracker 3 integration and then beg Geco (or you hehe) for asm version...


Targhan

Indeed, CPCTelera still uses AT1. It shouldn't be very hard to make it use AT3, but 1) I didn't have time to really fathom CPCTelera, 2) My Github issue raised three thumbs up but no constructive remarks :). I don't have time right now to take care of that, and the AT3 roadmap will keep me busy for a few months before I can work on CPCTelera again.
By the way, AT2 and AT3 work the same way, player-wise.
Targhan/Arkos

Arkos Tracker 3.2.6 now released! - Follow the news on Twitter!
CPC Scene Radio! 24/7 CPC music only! Website Stream
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

teopl

@Targhan looks like Geco already did both: Arkos2 integration in cpctelera and Arkos2 port to enterprise!

I am not sure how complete/correct this port is but I tried code he sent me and it worked well! (I did not use cpctelera hooks but directly called asm functions).

I answered to your Github issue here: https://github.com/lronaldo/cpctelera/issues/189#issuecomment-2943480758 and uploaded what I have from @Geco so far on https://github.com/baxpick/cpctelera-enterprise/tree/enterprise-port

As for the AT2 and AT3 players being the same, great, even easier for someone who would check this and wrap it for the next cpctelera release!

@Prodatron If you have more recent or better (whatever that means :D ) port for of Arkos players for enterprise, please do contribute.

From https://github.com/baxpick/cpctelera-enterprise/blob/enterprise-port/README_EP_CPC.txt :
Change HW setting, by set the required HW to 1 in file:
cpctelera/CPCteleraHW.src
and set the appropriate #define statement in file:
cpctelera/src/keyboard/keyboard.h

using different Arkos players in main.c:
#include <cpctelera.h>          for Arkos 1 player
#include <cpcteleraAkg.h>       for Arkos 2 Akg player
#include <cpcteleraAkm.h>       for Arkos 2 Akm player
#include <cpcteleraAky.h>       for Arkos 2 Aky player
#include <cpcteleraLW.h>        for Arkos 2 LW player
labels are the same, just player name should be inserted after cpct_akp for example music init for
- Arkos1: cpct_akp_musicInit(0x6000)
- Arkos2 Akg: cpct_akpAKG_musicInit(0x6000, 0)

Player settings can be set in the following files:
cpctelera/src/audio/arkostracker*_var.src

If you use Enterprise hardware then AY emulation parameters can set in file:
cpctelera/CPCteleraHW.src

if you do not use hw envelopes then set         NO_ENVELOPE_IRQ to 1, saves CPU, and memory
if you use low frequency hw envelopes then set  NO_ENVELOPE_IRQ to 0, and do not set any    ENABLE_xxxHZ_IRQ (ENABLE_300HZ_IRQ is not implemented yet in the loader)
if you use high frequency hw envelopes then set NO_ENVELOPE_IRQ to 0, and set               ENABLE_1000HZ_IRQ , the usage of 1KHz envelope emulation is a bit tricky,
because you have to set up a counter 20 for your code which should run in video interrupt, and has to be called in every 20th interrupt, but the music player should
be called in each interrupt, timing is solved in the music player routine.

the following parameters are for behaviour if there is noise and tone on a AY channel in the same time:
toneAndNoiseModeAtnns   set 1 if you want to get tone frequency as noise on channel A
toneAndNoiseModeAtone   set 1 if you want to get noise frequency on channel A
toneAndNoiseModeAtoise  set 1 if you want to get tone frequency on channel A

EP file loader is start.src it can be translated by sjasm 0.39.
it is prepared for loading 3 files, 1 screen, 1 binary which is called, and after finish returns to loader, and for the final binary file.
Screen file and 1st binary can be omitted if any of them does not exist by specifying load address 0 to the file which is going to be omitted.
Load address, load length, start address, and file name has to be updated in start.src
EP version of CPCtelera is prepared to use maximum 2 video page in same time, video ram configuration can be set in the loader with appropriate vidpage variable.


teopl

Now sound works on Enterprise as well!

binary download here: https://enterpriseforever.com/games/amstrad-cpc-port-ludic-break-the-loop/msg94139/#msg94139

@Targhan could you please check this link on enterprise forever forum (if you have any idea why is this) as there is a small glitch in one song (I uploaded there correct and incorrect .wav as well as .aks file)

I published changes here: https://github.com/baxpick/ludic-break-the-loop

Simply by running ./build_all.sh both versions (Amstrad/Enterprise) are built using cpctelera docker images.

./build.sh \
    --folder-src . \
    --folder-output ./OUTPUT/ENTERPRISE \
    --platform enterprise \
    --buildcfg-z80ccflags "-DENTERPRISE"
./build.sh \
    --folder-src . \
    --folder-output ./OUTPUT/CPC \
    --platform cpc


Prodatron

Wow that is really cool! Thanks @teopl and @Geco , @Targhan for this fantastic work!

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Targhan

@Prodatron I didn't do anything :).
@teopl I'll try to check that as soon as I can!
Targhan/Arkos

Arkos Tracker 3.2.6 now released! - Follow the news on Twitter!
CPC Scene Radio! 24/7 CPC music only! Website Stream
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

teopl

Quote from: Targhan on Yesterday at 16:12@Prodatron I didn't do anything :).
@teopl I'll try to check that as soon as I can!
@Targhan but you made and still are making Arkos! So, thank you! :)
Btw, I did not find macOS silicon binary for AT3 (is there one?) so I compiled it (M3, Xcode 16.2) - only 2 minor changes to code/dependencies and AT3 is alive and well in my /Applications folder.

About the sound glitch, Geco suggested some magic (https://enterpriseforever.com/games/amstrad-cpc-port-ludic-break-the-loop/msg94148/#msg94148)  so I will try this and let you know if this helps.

Powered by SMFPacks Menu Editor Mod