Skip to content

Commit

Permalink
Tape browser fixes, SAVE trap simplified, readme.md updated
Browse files Browse the repository at this point in the history
  • Loading branch information
EremusOne committed Oct 11, 2024
1 parent b08f382 commit a501be7
Show file tree
Hide file tree
Showing 9 changed files with 1,030 additions and 982 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ Pin assignment in `hardpins.h` is set to match the boards we've tested emulator
- ZjoyKiLer for his testing, code and ideas.
- [Ackerman](https://github.com/rpsubc8/ESP32TinyZXSpectrum) for his code and ideas.
- [Mark Woodmass](https://specemu.zxe.io) and [Juan Carlos González Amestoy](https://www.retrovirtualmachine.org) for his excellent emulators and his help with wd1793 emulation and many other things.
- Magnus Krook for [SoftSpectrum 48](https://softspectrum48.weebly.com), an excellent emulator which together with his complete and well documented website was of great help and inspiration.
- [Rodolfo Guerra](https://sites.google.com/view/rodolfoguerra) for his wonderful enhanced ROMs and his help for adding tape load turbo mode support to the emulator.
- [Juanjo Ponteprino](https://github.com/SplinterGU) for his help and contributions to ESPectrum
- Weiv and [MartianGirl](https://github.com/MartianGirl) for his detailed analysis of Snow effect.
Expand All @@ -191,13 +192,13 @@ Pin assignment in `hardpins.h` is set to match the boards we've tested emulator
- [Amstrad PLC](http://www.amstrad.com) for the ZX-Spectrum ROM binaries [liberated for emulation purposes](http://www.worldofspectrum.org/permits/amstrad-roms.txt).
- [Jean Thomas](https://github.com/jeanthom/ESP32-APLL-cal) for his ESP32 APLL calculator.

## Thanks also to all this writters, hobbist and documenters
## Thanks also to all this writters, hobbyists and documenters

- [Retrowiki](http://retrowiki.es/) especially the people at [ESP32 TTGO VGA32](http://retrowiki.es/viewforum.php?f=114) subforum.
- [RetroReal](https://www.youtube.com/@retroreal) for his kindness and hospitality and his great work.
- Rodrigo Méndez [Ron](https://www.twitch.tv/retrocrypta)
- Armand López [El Viejoven FX](https://www.youtube.com/@ElViejovenFX)
- Javi Ortiz [El Spectrumero](https://www.youtube.com/@ElSpectrumeroJaviOrtiz)
- Javi Ortiz [El Spectrumero](https://www.youtube.com/@ElSpectrumeroJaviOrtiz)
- José Luis Rodríguez [VidaExtraRetro](https://www.twitch.tv/vidaextraretro)
- [El Mundo del Spectrum](http://www.elmundodelspectrum.com/)
- [Microhobby magazine](https://es.wikipedia.org/wiki/MicroHobby).
Expand Down
31 changes: 16 additions & 15 deletions include/Tape.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
To Contact the dev team you can write to [email protected] or
To Contact the dev team you can write to [email protected] or
visit https://zxespectrum.speccy.org/contacto
*/
Expand Down Expand Up @@ -149,16 +149,16 @@ class Tape {

// Tape
static FILE *tape;
static FILE *cswBlock;
static FILE *cswBlock;
static string tapeFileName;
static string tapeSaveName;
static string tapeFilePath;
static int tapeFileType;
static uint8_t tapeEarBit;
static uint8_t tapeStatus;
static uint8_t SaveStatus;
static uint8_t romLoading;
static int tapeCurBlock;
static int tapeNumBlocks;
static int tapeCurBlock;
static int tapeNumBlocks;
static uint32_t tapebufByteCount;
static uint32_t tapePlayOffset;
static size_t tapeFileSize;
Expand All @@ -176,7 +176,7 @@ class Tape {
static bool FlashLoad();
static void Save();

static void tapeEject();
static void Eject();

static uint32_t CalcTapBlockPos(int block);
static uint32_t CalcTZXBlockPos(int block);
Expand All @@ -192,17 +192,18 @@ class Tape {
static void moveSelectedBlocks(int targetPosition);
static string getBlockName(int block);
static void renameBlock(int block, string new_name);

static double tapeCompensation;

private:

static void (*GetBlock)();

static void TAP_Open(string name);
static void TAP_Open(string name, string path);
static void TAP_getBlockData();
static void TAP_ReOpen();
static void TAP_GetBlock();
static void TZX_Open(string name);
static void TZX_Open(string name, string path);
static void TZX_GetBlock();
static void TZX_BlockLen(TZXBlock &blockdata);

Expand All @@ -216,7 +217,7 @@ class Tape {
static uint16_t tapeBit1PulseLen; // lenght of pulse for bit 1
static uint16_t tapeHdrLong; // Header sync lenght in pulses
static uint16_t tapeHdrShort; // Data sync lenght in pulses
static uint32_t tapeBlkPauseLen;
static uint32_t tapeBlkPauseLen;
static uint8_t tapeLastByteUsedBits;
static uint8_t tapeEndBitMask;
static uint32_t tapeNext;
Expand All @@ -237,7 +238,7 @@ class Tape {
static int callBlock;

static int CSW_SampleRate;
static int CSW_PulseLenght;
static int CSW_PulseLenght;
static uint8_t CSW_CompressionType;
static uint32_t CSW_StoredPulses;

Expand All @@ -250,10 +251,10 @@ class Tape {
static uint16_t asd;
static uint32_t curGDBSymbol;
static uint8_t curGDBPulse;
static uint8_t GDBsymbol;
static uint8_t nb;
static uint8_t curBit;
static bool GDBEnd;
static uint8_t GDBsymbol;
static uint8_t nb;
static uint8_t curBit;
static bool GDBEnd;
static Symdef* SymDefTable;

};
Expand Down
40 changes: 20 additions & 20 deletions include/messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

To Contact the dev team you can write to [email protected] or
To Contact the dev team you can write to [email protected] or
visit https://zxespectrum.speccy.org/contacto

*/

#ifndef ESPECTRUM_MESSAGES_h
#define ESPECTRUM_MESSAGES_h

#define EMU_VERSION " v1.31 "
#define EMU_VERSION " v1.32 "

// Language files
#include "messages_en.h"
Expand Down Expand Up @@ -252,16 +252,16 @@ static const char *MENU_ROMSTK95[NLANGS] = { MENU_ROMSTK95_EN, MENU_ROMSTK95_ES,
"TK90X\t[T]\n"\
"TK95\t[9]\n"

static const char *MENU_ARCH_PREF[NLANGS] = {
"Preferred machine\n" MENU_ARCHS_PREF "Last used\t[L]\n",
static const char *MENU_ARCH_PREF[NLANGS] = {
"Preferred machine\n" MENU_ARCHS_PREF "Last used\t[L]\n",
"Modelo preferido\n" MENU_ARCHS_PREF "Ultimo utilizado\t[L]\n",
"Hardware favorito\n" MENU_ARCHS_PREF "Usado por \xA3ltimo\t[L]\n"
};

#define MENU_ROMS_PREF "Spectrum 48K\t>\n"\
"Spectrum 128K\t>\n"\
"TK90X\t>\n"\
"TK95\t>\n"
"TK95\t>\n"

static const char *MENU_ROM_PREF[NLANGS] = { "Preferred ROM\n" MENU_ROMS_PREF, "ROM preferida\n" MENU_ROMS_PREF, "ROM favorita\n" MENU_ROMS_PREF};

Expand All @@ -271,7 +271,7 @@ static const char *MENU_ROM_PREF_48[NLANGS] = {
"Escolha ROM\n" MENU_ROMS48_PREF_PT "Usada por \xA3ltimo\t[Last]\n"
};

static const char *MENU_ROM_PREF_TK90X[NLANGS] = {
static const char *MENU_ROM_PREF_TK90X[NLANGS] = {
"Select ROM\n" MENU_ROMSTK90X_PREF_EN "Last used\t[Last ]\n",
"Elija ROM\n" MENU_ROMSTK90X_PREF_ES "Ultima usada\t[Last ]\n",
"Escolha ROM\n" MENU_ROMSTK90X_PREF_PT "Usada por \xA3ltimo\t[Last ]\n"
Expand Down Expand Up @@ -397,7 +397,7 @@ static const char *POKE_BANK_MENU[NLANGS] = { " Bank \n" , " Banco \n" , " Banc
"\r"\
"\r"\
"\r"

static const char *AboutMsg[NLANGS][11] = {
{
"\nF1(C)2023-24 V\xA1" "ctor Iborra \"Eremus\"\r"\
Expand Down Expand Up @@ -529,7 +529,7 @@ static const char *AboutMsg[NLANGS][11] = {
"\r"\
"\r"\
"\r"\
"\r"
"\r"
,
"\nF1Muchas gracias a nuestros Patreons:\r"\
PATREONS
Expand Down Expand Up @@ -569,7 +569,7 @@ static const char *AboutMsg[NLANGS][11] = {
"\nA1VidaExtraRetro, \nB1C\x82sar Nicol\xA0s-Gonz\xA0lez\r"\
"\nC1Rodolfo Guerra, \nD1Todos los creadores en\r"\
"el servidor ZXSpectrum en Discord\r"\
"\r"\
"\r"\
"\nF1y, por supuesto, a:\r"\
"\r"\
"\nD1Sir Clive Sinclair \nF1& \nA1M\nE1a\nC1t\nD1t\nB1h\nA1e\nE1w \nC1S\nD1m\nB1i\nA1t\nE1h\r"
Expand Down Expand Up @@ -618,7 +618,7 @@ static const char *AboutMsg[NLANGS][11] = {
"\r"\
"\r"\
"\r"\
"\r"
"\r"
,
"\nF1Muchas gracias a nuestros Patreons:\r"\
PATREONS
Expand Down Expand Up @@ -658,7 +658,7 @@ static const char *AboutMsg[NLANGS][11] = {
"\nA1VidaExtraRetro, \nB1C\x82sar Nicol\xA0s-Gonz\xA0lez\r"\
"\nC1Rodolfo Guerra, \nD1Todos los creadores en\r"\
"el servidor ZXSpectrum en Discord\r"\
"\r"\
"\r"\
"\nF1y, por supuesto, a:\r"\
"\r"\
"\nD1Sir Clive Sinclair \nF1& \nA1M\nE1a\nC1t\nD1t\nB1h\nA1e\nE1w \nC1S\nD1m\nB1i\nA1t\nE1h\r"
Expand Down Expand Up @@ -767,8 +767,8 @@ static const char *StartMsg[NLANGS] = {
"modify and share it for free.\n"\
"\n"\
"If you like ectrum consider\n"\
"becoming Patreon. Your support help\n"\
"us to maintain and improve the project\n"\
"becoming Patreon. Your support help\n"\
"us to maintain and improve the project\n"\
"for all users. You can do it\n"\
"at\n"
,
Expand All @@ -779,8 +779,8 @@ static const char *StartMsg[NLANGS] = {
"modificarlo y compartirlo gratis.\n"\
"\n"\
"Si te gusta ectrum considera hacer-\n"\
"te patrocinador. Tu apoyo nos ayuda a\n"\
"mantener y mejorar el proyecto para\n"\
"te patrocinador. Tu apoyo nos ayuda a\n"\
"mantener y mejorar el proyecto para\n"\
"todos los usuarios. Puedes hacerlo\n"\
"en\n"
,
Expand All @@ -791,13 +791,13 @@ static const char *StartMsg[NLANGS] = {
"modific\xa0-lo e compartilh\xa0-lo gr\xa0tis.\n"\
"\n"\
"Se voc\x88 gosta de ectrum considere\n"\
"se tornar um patrocinador. Seu apoio\n"\
"ajuda a manter e melhorar o projeto\n"\
"se tornar um patrocinador. Seu apoio\n"\
"ajuda a manter e melhorar o projeto\n"\
"para todos os usu\xa0rios. Voc\x88 pode\n"\
"fazer isso em\n"
"fazer isso em\n"
};

static const char *STARTMSG_CLOSE[NLANGS] = { "This message will close in %02ds",
static const char *STARTMSG_CLOSE[NLANGS] = { "This message will close in %02ds",
"Este mensaje se cerrar\xA0 en %02ds",
"Esta mensagem ser\xA0 fechada em %02ds"
};
Expand Down Expand Up @@ -8745,7 +8745,7 @@ const uint8_t Layout_TK[] = {
0xC0, 0xC0, 0xC0, 0xC0
};

const uint8_t ZX_Kbd[] = {
const uint8_t ZX_Kbd[] = {
0x45, 0x42, 0x46, 0x38, 0x00, 0x01, 0xB0, 0x00, 0xC0, 0xC0, 0xC0, 0xC0,
0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0,
0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0,
Expand Down
Loading

0 comments on commit a501be7

Please sign in to comment.