Any progress being made with ZX81 emulation?
-
@JimmyFromTheBay said in Any progress being made with ZX81 emulation?:
(I have really zero idea how scripts work.)
I would suggest you read this :
https://www.freecodecamp.org/news/how-to-learn-linux-terminal-as-a-beginner/
and this :
https://www.freecodecamp.org/news/shell-scripting-crash-course-how-to-write-bash-scripts-in-linux/There are many more sites on the internet to find.
Terminal commands can be used in a bash script.
RetroPie is a collection of bash scripts and are basically tied together.
For beginners the most difficult part is how these scripts work.
I had the same issue when starting to write module-scripts.
(A module-script is basically 1 script of the collection of RetroPie scripts.)
The most important thing is to recognize that a module-script contains functions and also that it uses functions.
Also variable are used.
These functions and variables are made and used to simplify the scripts so they can be used in more module-scripts.
Most functions can be found in the RetroPie-Setup/scriptmodules/helpers.sh.
That is basically the summary.Have a look and hopefully you will understand it better now.
You can experiment with it testing just 1 function in a module-script.
Lets say you only want to test the function sources_sz81 from the sz81.sh :function sources_sz81() { gitPullOrClone }
Then you can go into the terminal and do :
cd cd Retropie-Setup sudo ./retropie_packages sz81 sources
It will then download the sz81 source code, using the gitPullOrClone function, and places it in :
~/RetroPie-Setup/tmp/build/sz81
If you want to remove source code for sz81 then you can use :sudo ./retropie_packages sz81 clean
You can just do a test in the sources_sz81 function and replace gitPullOrClone with something like :
echo "hello world"
Then if you do :
sudo ./retropie_packages sz81 sources
Instead it will output :
hello worldSo you can test every function one by one (and add stuff in there just to test) :
sudo ./retropie_packages sz81 depends (if it's there) sudo ./retropie_packages sz81 sources sudo ./retropie_packages sz81 build sudo ./retropie_packages sz81 install sudo ./retropie_packages sz81 configure sudo ./retropie_packages sz81 clean
This, however, will execute all functions in one go :
sudo ./retropie_packages sz81
Just like when running it from the retropie_setup.
-
Seems it wasn't possible to make one script because of not being able to load the config as an option.
So I created a separate module-script for zx80 just like you suggested :
https://github.com/FollyMaddy/RetroPie-Share/blob/main/00-scriptmodules-00/emulators/sz80.shIt patches the source code to make use of a different config directory (.sz80 instead of sz81)
Read the help.
First time it will boot in zx81 by default.
Change the it by clicking the config icon inside the emulator and save the config. -
@Folly Works! Fantastic! ZX80 games! Thank you! :)
-
@Folly said in Any progress being made with ZX81 emulation?:
BTW.
Did you try altering the video-mode in the runcommand launch menu for displaying the emulator screen properly or better ?Yes, can't get it to make any difference.
-
I tested hero and had exactly the same image.
I will add that second option to the script that you suggested. -
A suggestion is to read the manual.
It can be found in the folder manual in the source.Found that it can also do Chroma.
So games that have color will work too.Here are some examples :
In the Makefile you can also add more, ZXPAND is an example which is an external addon.
It seems to be working but I do not know yet where to put the SD-card files -
@Folly Ooh, getting ZXPAND in would be great, because then Zedragon II would work, and maybe the DK'Tronics version of Space Invaders by Jeff Minter.
-
When also doing the ZX81-ZXPAND I think the approach should be similar as what we did with zx80.
- rename the function names
- do the same patch as in zx80 to separate the config file for the zxpand version
- patch the makefile so the option
-zxpand
will be added for compiling the emulator with xzpand - edit the help part if we know where to put the sdcard files for zxpand
- edit where the configure part so the binary is saver in a different folder than the standar sz81 emultor and edit where the runcommands go to and how they are called
Looking at the previous module-scripts I made, would you be able to make the module-script for zxpand now ?
-
-
What is the "makefile"?
-
What are the "sdcard files" for ZXPAND?
-
"edit where the configure part so the binary is saver in a different folder than the standar sz81 emultor" - is that referring to these lines?
function sources_sz80() { gitPullOrClone #patch and change the config directory for ZX80 sed -i 's/\"\.sz81\"/\"\.sz80\"/g' "sdl_resources.h"
Because I have NO idea what that's all about, or what the different slashes mean. There basically isn't one part of that last line I understand :(
So it looks like the answer to your question, sadly, is "Hell no" :D
-
-
@JimmyFromTheBay said in Any progress being made with ZX81 emulation?:
- What is the "makefile"?
Here you can find what makefiles do.
The sourcecode of sz81 is here.
You will notice the Makefile.
I highlighted these lines to give you an impression on what can be added to the CFLAGS in order to compile the source code with for example zxpand.
To add zxpand it has to be added in the line 40 :
.... -D_DZ80_EXCLUDE_SCRIPT -DZXPAND- What are the "sdcard files" for ZXPAND?
I am not an expert on zxpand but it seems that program files are loaded from sdcard.
More info about zxpand can be found here.
You can also read that the SZ81 emulator can emulate the ZXpand+. To run a ZXpand-compatible program, you have to put the P file and its .wad file in the ZXpand_SD_Card folder.- "edit where the configure part so the binary is saver in a different folder than the standar sz81 emultor" - is that referring to these lines?
function sources_sz80() { gitPullOrClone #patch and change the config directory for ZX80 sed -i 's/\"\.sz81\"/\"\.sz80\"/g' "sdl_resources.h"
no,
I meant :
function configure_sz80()What you mention is sources part , look at the function name.
Because I have NO idea what that's all about, or what the different slashes mean. There basically isn't one part of that last line I understand :(
You can read more about what the program sed does over here.
So it looks like the answer to your question, sadly, is "Hell no" :D
Haha, I understand.
In the beginning it's all garbage.
Try to read the stuff I send you.
Hope you will understand it a little bit better.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.