Galaksija

Discussion about other targets
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Re: Galaksija

Post by stefano »

Thank you.. both !
@RobertK, it's great to see you getting confidence, we can't leave the whole work on Dominic for much longer :D
User avatar
RobertK
Well known member
Posts: 347
Joined: Mon Feb 26, 2018 12:58 pm

Re: Galaksija

Post by RobertK »

The WAV output will still need some tweaking.
stefano wrote: Wed Mar 30, 2022 4:28 pm @RobertK, it's great to see you getting confidence, we can't leave the whole work on Dominic for much longer :D
:) I've actually made one more step forward and managed to get this...

Code: Select all

make -i gal_clib.lib
...working without errors. But it seems that I'm compiling the wrong thing, because after editing src\appmake\galaksija.c it says that gal_clib.lib is up to date. I believe that I have to compile the "appmake" part instead? How can this be compiled?
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Re: Galaksija

Post by stefano »

you probably need to copy (or move) the resulting lib file from z88dk/libsrc to z88/lib/clibs
To update it, the previous build must be removed from z88dk/libsrc
User avatar
dom
Well known member
Posts: 2072
Joined: Sun Jul 15, 2007 10:01 pm

Re: Galaksija

Post by dom »

To build appmake you need to run make in z88dk/src/appmake

Since you're on windows, it might be easier to download the free version of Visual Studio and use the project file which is in the win32/ directory.
User avatar
jorgegv
Well known member
Posts: 287
Joined: Wed Nov 18, 2020 5:08 pm

Re: Galaksija

Post by jorgegv »

stefano wrote: Thu Mar 31, 2022 7:34 am you probably need to copy (or move) the resulting lib file from z88dk/libsrc to z88/lib/clibs
To update it, the previous build must be removed from z88dk/libsrc
After recompiling a library, you can just 'make install' in the base libsrc dir and It Will be installesd in place.

Just did this about a thousand times for the SP1 migration back to Classic. :)
User avatar
RobertK
Well known member
Posts: 347
Joined: Mon Feb 26, 2018 12:58 pm

Re: Galaksija

Post by RobertK »

I can now test the WAVs on my own hardware, I have fixed the problem. The audio input was dead because the values of resistors R11 and R14 were swapped in the schematic.
dom wrote: Thu Mar 31, 2022 7:51 am Since you're on windows, it might be easier to download the free version of Visual Studio and use the project file which is in the win32/ directory.
It didn't work on the first attempt, so I would like to get it working in Git Bash first.

dom wrote: Thu Mar 31, 2022 7:51 am To build appmake you need to run make in z88dk/src/appmake
I have tried that, but I'm getting a "The system cannot find the file specified" error. Any idea what could be wrong here?

Code: Select all

ws09@nbkac3 MINGW64 ~/z88dk (master)
$ export PATH=$(pwd)/bin:$PATH

ws09@nbkac3 MINGW64 ~/z88dk (master)
$ export ZCCCFG=$(pwd)/lib/config

ws09@nbkac3 MINGW64 ~/z88dk (master)
$ cd src

ws09@nbkac3 MINGW64 ~/z88dk/src (master)
$ cd appmake

ws09@nbkac3 MINGW64 ~/z88dk/src/appmake (master)
$ make
cc -Wall -std=gnu11 -MMD -pedantic -I../common   -c -o kc.o kc.c
process_begin: CreateProcess(NULL, cc -Wall -std=gnu11 -MMD -pedantic -I../common -c -o kc.o kc.c, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [<builtin>: kc.o] Error 2
User avatar
dom
Well known member
Posts: 2072
Joined: Sun Jul 15, 2007 10:01 pm

Re: Galaksija

Post by dom »

I think that error means that cc is not on the path when a shell is spawned from make.

You should be able to build with make CC=/full/path/to/cc - and then probably run into another problem!
User avatar
RobertK
Well known member
Posts: 347
Joined: Mon Feb 26, 2018 12:58 pm

Re: Galaksija

Post by RobertK »

Unfortunately, I still can't build libraries, I will report my problems in another thread.

In the meantime, please re-check the Galaksija WAV problem. Dragoljub believes that he has found something that definitely seems to be wrong:

I have found a problem in the "raw2wav" function in the file "z88dk\src\appmake\appmake.c", see the attachment.
Either "len" needs to be increased by the value of 63 in "data", as it has already been increased in "riff", or better: discard these 63 bytes, I see no reason what they could be for. With that, every "raw" file that is currently converted to "wav" on all z88dk targets (not only on the Galaksija) is shortened by 63 samples at its end.

z88dk-wac-cut-src.png

In case that it should help: I have attached an ultra-small program maintest.c, containing only an empty main() section, with two WAV files: a "bad" one that was created with z88dk (this one only loads in MAME), and a "good" one created from the .gtp file with the GALem emulator, this one loads on both the real hardware and in MAME.
The Galaksija always loads the entire tape sound, and at the end it says "WHAT?" if the parity check has been unsuccessful. Therefore, a shorter WAV file makes testing easier.
Galaksija_maintest.zip
You do not have the required permissions to view the files attached to this post.
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Re: Galaksija

Post by stefano »

I hope I solved the problem, look here:

https://github.com/z88dk/z88dk/issues/2013
..file size related problems are described at the bottom of the thread.

I don't remember why I put in a blank space at the beginning, I vaguely remember it had to do with some target on MAME, but I may be wrong. In any case this type of tuning should probably be addressed on the single target system rather than generally applied.

If the nightly process will succeed, you should have the updated tools tomorrow morning.
User avatar
RobertK
Well known member
Posts: 347
Joined: Mon Feb 26, 2018 12:58 pm

Re: Galaksija

Post by RobertK »

Thanks, now all z88dk-generated WAV files can be loaded correctly on my Galaksija Plus replica!
I'm still waiting for confirmation from Dragoljub that it's working on his original Galaksija too, but I expect it to work there as well.

May I once again repeat this wish regarding games.h on this target: can one of you please replace the virtual joystick 5678-0 with QAOP-NM? The former really makes no sense on this target, while the latter would help a lot on the original keyboard (which had an unusual cursor keys layout).
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Re: Galaksija

Post by stefano »

The code to work on should be here.
https://github.com/z88dk/z88dk/blob/mas ... ystick.asm
I probably need to get back to the galaxy's documentation
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Re: Galaksija

Post by stefano »

I noticed that the pictures show the cursor keys close to QA, PM.
Did other keyboard layouts exist?
One more thought, to think at all the options: should we take care of some special condition to permit two players to press the keys simultaneously?
User avatar
RobertK
Well known member
Posts: 347
Joined: Mon Feb 26, 2018 12:58 pm

Re: Galaksija

Post by RobertK »

In general (regarding all targets), I would set the priorities on keyboard layouts suitable for emulation, and add layouts for real hardware as a bonus. Nowadays, only a few people will be running our software on real hardware, but the vast majority will be using emulators.

I've checked the existing Galaksija software: almost all games were single-player only, and most of them used the Cursor keys (mostly in all four directions).

I've found three two-player games, and it seems that every author used his own layout:

Tenis3.gtp
(only Up/Down + Fire)
QA-S
PL-K

Wall.gtp
(only Left/Right)
ZX
,. (<>)

Svetleci.gtp
Up-Down-A-S
P-;-Left-Right
(; is below the P key)

The last one is funny, splitting the cursor keys among the two players...

If you really want to add two additional layouts for two-player control, I would suggest extending the Tenis3.gpt layout:
QAWE-SD
PLIO-KJ
stefano wrote: Sun May 22, 2022 2:45 pm One more thought, to think at all the options: should we take care of some special condition to permit two players to press the keys simultaneously?
That would always be nice to have, provided that it can be implemented. As far as I know, parallel two-player joystick() polling is available on those targets that support in_KeyPressed().
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Re: Galaksija

Post by stefano »

We all did it, at the time, to play a 2 player snake duel on the same keyboard!
Ok, I take your original suggestion and try to replace cursors with qaopm
User avatar
RobertK
Well known member
Posts: 347
Joined: Mon Feb 26, 2018 12:58 pm

Re: Galaksija

Post by RobertK »

Please do NOT replace cursors! :-) Replace 5678-0 with QAOP-M.
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Re: Galaksija

Post by stefano »

Thanks Dom for reporting ;)
RokertK, a first build does not require a git sync, you could in example lend the pre-build environment distributed by MAME, grab z88dk-master in zipped form from github, set 2 environment variables in bashrc and you are set.
Tiny commits can be done also using the web interface.
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Re: Galaksija

Post by stefano »

QAOPM is on its way for the nightly build ;)
User avatar
RobertK
Well known member
Posts: 347
Joined: Mon Feb 26, 2018 12:58 pm

Re: Galaksija

Post by RobertK »

stefano wrote: Wed May 25, 2022 12:43 pm QAOPM is on its way for the nightly build ;)
Excellent, many thanks! It's all working fine, I have already updated my programs.
User avatar
RobertK
Well known member
Posts: 347
Joined: Mon Feb 26, 2018 12:58 pm

Re: Galaksija

Post by RobertK »

I have now built the AY sound card...
GalaksijaPlus_SoundBoard_400px.jpg
...and I can confirm that PSG sound support is virtually perfect on the Galaksija Plus target. I still have some low-priority wishes for improvement, but speeding up highres graphics would be far more important to me, so I will report these later.

I have made a video dealing with sound on the Galaksija:

https://www.youtube.com/watch?v=PmAof9cuGsE&t=500s

Between 1:49 and 3:43, you can hear what z88dk 1-Bit-Sound sounds like. That tape output sound still isn't emulated in any of the emulators, so I decided to include that in my video. 1-Bit-Sound is perfect too, but the Galaksija turns off the screen every time a sound is being played.
You do not have the required permissions to view the files attached to this post.
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Re: Galaksija

Post by stefano »

well done, the video catches the sounds very neatly.
Post Reply