Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.sinclair > #4572 > unrolled thread
| Started by | Volker Bartheld <news2018@bartheld.net> |
|---|---|
| First post | 2018-03-23 09:28 +0100 |
| Last post | 2019-12-06 01:25 -0500 |
| Articles | 13 — 8 participants |
Back to article view | Back to comp.sys.sinclair
[Q] De-tokenize ZX Spectrum Basic for PC? Volker Bartheld <news2018@bartheld.net> - 2018-03-23 09:28 +0100
Re: [Q] De-tokenize ZX Spectrum Basic for PC? deKay <andyk@lofi-gaming.org.uk> - 2018-03-23 09:44 +0000
Re: [Q] De-tokenize ZX Spectrum Basic for PC? Gzavsnap <**..NOSPAM..**@nospam.somewere> - 2018-03-23 11:06 +0100
Re: [Q] De-tokenize ZX Spectrum Basic for PC? Volker Bartheld <news2018@bartheld.net> - 2018-03-23 12:34 +0100
Re: [Q] De-tokenize ZX Spectrum Basic for PC? Gzavsnap <**..NOSPAM..**@nospam.somewere> - 2018-03-23 22:53 +0100
Re: [Q] De-tokenize ZX Spectrum Basic for PC? Volker Bartheld <news2018@bartheld.net> - 2018-03-25 00:35 +0100
Re: [Q] De-tokenize ZX Spectrum Basic for PC? Gzavsnap <**..NOSPAM..**@nospam.somewere> - 2018-04-24 17:35 +0200
Re: [Q] De-tokenize ZX Spectrum Basic for PC? arda <ardarda@gmail.com> - 2018-03-26 06:58 -0700
Re: [Q] De-tokenize ZX Spectrum Basic for PC? Edward Solly <aelfstangard@gmail.com> - 2019-11-10 10:11 -0800
Re: [Q] De-tokenize ZX Spectrum Basic for PC? Marcos Cruz <use_the_contact_page@programandala.net> - 2019-11-10 21:28 +0000
Re: [Q] De-tokenize ZX Spectrum Basic for PC? Bruno Florindo <zxspectrum128@gmail.com> - 2019-11-10 19:17 -0800
Re: [Q] De-tokenize ZX Spectrum Basic for PC? Marcos Cruz <use_the_contact_page@programandala.net> - 2019-11-17 13:14 +0000
Re: [Q] De-tokenize ZX Spectrum Basic for PC? "Supratim Sanyal <\"supratim sanyal" <"qcocal::sanyal\""@NOSPAM.X.mim.X.update.X.uu.X.se.NOSPAM> - 2019-12-06 01:25 -0500
| From | Volker Bartheld <news2018@bartheld.net> |
|---|---|
| Date | 2018-03-23 09:28 +0100 |
| Subject | [Q] De-tokenize ZX Spectrum Basic for PC? |
| Message-ID | <3145k8bl8cf3$.dlg@news.bartheld.net> |
... currently working on some crap games contributions and the question came up how to transfer and convert Sinclair ZX Spectrum Basic programs for editing on PC. So more or less the opposite of bas2tap [1]. Just running 10 OPEN #3;"t" 20 LLIST 30 CLOSE #3 in an emulator and grabbing if1_out.txt (using EightyOne [2]) as the ZX Interface 1 manual suggests is close but intrododuces unwanted line breaks and the need for regex-fiddling. Any ideas are highly appreciated. THX. Greets, Volker P.S.: What tool for TZX file management do you recommend? Splitting, merging, deleting segmants and generating a catalogizing would be useful. I have a ton of tapes with a ton of programs, most not really correlated. [1] http://www.worldofspectrum.org/pub/sinclair/tools/generic/bas2tap26-generic.zip https://github.com/andybalaam/bas2tap [2] https://sourceforge.net/projects/eightyone-sinclair-emulator/ -- @: W E B 2 0 1 8 at B A R T H E L D dot N E T 3W: www.bartheld.net
[toc] | [next] | [standalone]
| From | deKay <andyk@lofi-gaming.org.uk> |
|---|---|
| Date | 2018-03-23 09:44 +0000 |
| Message-ID | <e2j9bdd227pndcmmg2ef1j08mpodea8jb7@4ax.com> |
| In reply to | #4572 |
Soni tempori elseu romani yeof helsforo nisson ol sefini ill des Fri, 23 Mar 2018 09:28:27 +0100, sefini jorgo geanyet des mani yeof do comp.sys.sinclair, yawatina tan reek esk Volker Bartheld <news2018@bartheld.net> fornis do marikano es bono tan el: >... currently working on some crap games contributions and the question >came up how to transfer and convert Sinclair ZX Spectrum Basic programs for >editing on PC. So more or less the opposite of bas2tap [1]. Doesn't BASIN do this? deKay -- Lofi Gaming - http://lofi-gaming.org.uk Gaming Diary - http://lofi-gaming.org.uk/diary Blog - http://lofi-gaming.org.uk/blog My computer runs at 3.5MHz and I'm proud of that
[toc] | [prev] | [next] | [standalone]
| From | Gzavsnap <**..NOSPAM..**@nospam.somewere> |
|---|---|
| Date | 2018-03-23 11:06 +0100 |
| Message-ID | <5ab4d17d$0$7596$426a74cc@news.free.fr> |
| In reply to | #4573 |
Le 23/03/2018 à 10:44, deKay a écrit : > Soni tempori elseu romani yeof helsforo nisson ol sefini ill des Fri, 23 Mar > 2018 09:28:27 +0100, sefini jorgo geanyet des mani yeof do comp.sys.sinclair, > yawatina tan reek esk Volker Bartheld <news2018@bartheld.net> fornis do > marikano es bono tan el: >> ... currently working on some crap games contributions and the question >> came up how to transfer and convert Sinclair ZX Spectrum Basic programs for >> editing on PC. So more or less the opposite of bas2tap [1]. > Doesn't BASIN do this? > deKay Zx-Preview! http://www.zx-modules.de/
[toc] | [prev] | [next] | [standalone]
| From | Volker Bartheld <news2018@bartheld.net> |
|---|---|
| Date | 2018-03-23 12:34 +0100 |
| Message-ID | <1wjeyst7b6tug$.dlg@news.bartheld.net> |
| In reply to | #4574 |
>>> ... currently working on some crap games contributions and the question
>>> came up how to transfer and convert Sinclair ZX Spectrum Basic programs for
>>> editing on PC.
>> Doesn't BASIN do this?
> Zx-Preview!
> http://www.zx-modules.de/
Pretty cool! Thanks for the pointer.
For those who don't want a msi installer and GUI and stuff, I quickly
hacked (could be prettier with std::string, dynamic buffers and UNICODE
support, but WTF...) Chris Cowley's SnapList [1] command line tool to work
with MS Visual Studio 2012. Sourcecode see below. Have fun.
Greets,
Volker
P.S.: Just found out that bas2tap [2] has a little error in its parser:
While...
10 LET a = 5 OR 10
20 PRINT a
... runs perfectly fine on a real ZX Spectrum, bas2tap complains about a
non-numeric left operand.
/*****************************************************************************
SnapList - ZX Spectrum Snapshot file to ASCII text converter
Copyright (c)2002 Chris Cowley. <ccowley@grok.co.uk>
Microsoft Visual Studio 2012 Port by Volker Bartheld. <w e b 2 0 1 8 AT b a r t h e l d . n e t>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
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, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*****************************************************************************/
#include <stdio.h>
#include <string.h>
#define PROG_VER "1.10"
int DeTokenize(const unsigned char *In, int LineLen, char *Out);
void ConCat(char *Out, int *Pos, const char *Text);
int main(int argc, char* argv[])
{
FILE *fIn;
unsigned short ProgAddr, LineNum, LineLen;
unsigned char LineData[65535];
char LineText[65535];
if (argc != 2)
{
printf("SnapList v");
printf(PROG_VER);
printf("\n\nUsage: %s filename.sna > outputfile.txt\n\n",argv[0]);
return(1);
}
if( (fIn = fopen(argv[1], "rb" )) == NULL )
{
fprintf(stderr,"ERROR: Unable to open file %s\n",argv[1]);
return(2);
}
/* All 48K snapshots are 49179 bytes, check to ensure our .sna is at least this long */
fseek(fIn, SEEK_SET, SEEK_END);
if (ftell(fIn) < 49179)
{
fprintf(stderr,".SNA files should be at least 49179 bytes long, the input file is %d bytes\n",ftell(fIn));
fclose(fIn);
return(3);
}
/*
** Process the snapshot pointed to by fIn **
*/
/* Get the PROG system variable (PEEK 23635+256*PEEK 23636) */
/* https://www.worldofspectrum.org/faq/reference/formats.htm: */
// Offset Size Description
// ------------------------------------------------------------------------
// 0 1 byte I
// 1 8 word HL',DE',BC',AF'
// 9 10 word HL,DE,BC,IY,IX
// 19 1 byte Interrupt (bit 2 contains IFF2, 1=EI/0=DI)
// 20 1 byte R
// 21 4 words AF,SP
// 25 1 byte IntMode (0=IM0/1=IM1/2=IM2)
// 26 1 byte BorderColor (0..7, not used by Spectrum 1.7)
// 27 49152 bytes RAM dump 16384..65535
// ------------------------------------------------------------------------
// Total: 49179 bytes
// Offset is: PROG=23635-16384+27
const int PROG_ADDR_OFFS=23635-16384+27;
fseek(fIn,PROG_ADDR_OFFS,SEEK_SET);
fread(LineData,1,2,fIn);
ProgAddr = LineData[0]+LineData[1]*256;
if ( (ProgAddr < 23296) || (ProgAddr > 65530) )
{
fprintf(stderr,"Invalid system variable area. This snapshot does not contain a BASIC program.\n");
fclose(fIn);
return(4);
}
/* seek to PROG area */
const int PROG_OFFS=ProgAddr-16384+27;
fseek(fIn,PROG_OFFS,SEEK_SET);
while( !feof(fIn) )
{
fread(LineData,1,2,fIn);
LineNum = LineData[0]*256+LineData[1];
if (LineNum > 16384) break;
fread(LineData,1,2,fIn);
LineLen = LineData[0]+LineData[1]*256;
fread(LineData,1,LineLen,fIn);
LineData[LineLen]=0; /* Terminate the line data */
DeTokenize(LineData,LineLen,LineText);
printf("%d%s\n",LineNum,LineText);
}
fclose(fIn);
return(0);
}
/*****************************************************************************
DeTokenize()
'In' should point to a string containing tokenized ZX Spectrum text.
'LineLen' should contain the length of the Input data in characters.
The expanded Text will be placed in 'Out', which must be large enough
to contain the full text.
*****************************************************************************/
int DeTokenize(const unsigned char *In, int LineLen, char *Out)
{
int i = 0, o = 0;
for(i=0;i<LineLen;i++)
{
switch (In[i])
{
case 14:
i += 5; /* Skip encoded number */
break;
case 16:
i++; /* Skip embedded INK */
break;
case 17:
i++; /* Skip embedded PAPER */
break;
case 18:
i++; /* Skip embedded FLASH */
break;
case 19:
i++; /* Skip embedded BRIGHT */
break;
case 20:
i++; /* Skip embedded INVERSE */
break;
case 21:
i++; /* Skip embedded OVER */
break;
case 22:
i += 2; /* Skip embedded AT */
break;
case 23:
i += 2; /* Skip embedded TAB */
break;
case 92:
ConCat(Out,&o,"\\\\");
break;
case 127:
ConCat(Out,&o,"\\*"); /* Copyright symbol - compatible with zmakebas */
break;
case 128:
ConCat(Out,&o,"\\ ");
break;
case 129:
ConCat(Out,&o,"\\ '");
break;
case 130:
ConCat(Out,&o,"\\' ");
break;
case 131:
ConCat(Out,&o,"\\''");
break;
case 132:
ConCat(Out,&o,"\\ .");
break;
case 133:
ConCat(Out,&o,"\\ :");
break;
case 134:
ConCat(Out,&o,"\\'.");
break;
case 135:
ConCat(Out,&o,"\\':");
break;
case 136:
ConCat(Out,&o,"\\. ");
break;
case 137:
ConCat(Out,&o,"\\.'");
break;
case 138:
ConCat(Out,&o,"\\: ");
break;
case 139:
ConCat(Out,&o,"\\:'");
break;
case 140:
ConCat(Out,&o,"\\..");
break;
case 141:
ConCat(Out,&o,"\\.:");
break;
case 142:
ConCat(Out,&o,"\\:.");
break;
case 143:
ConCat(Out,&o,"\\::");
break;
case 144:
ConCat(Out,&o,"\\a");
break;
case 145:
ConCat(Out,&o,"\\b");
break;
case 146:
ConCat(Out,&o,"\\c");
break;
case 147:
ConCat(Out,&o,"\\d");
break;
case 148:
ConCat(Out,&o,"\\e");
break;
case 149:
ConCat(Out,&o,"\\f");
break;
case 150:
ConCat(Out,&o,"\\g");
break;
case 151:
ConCat(Out,&o,"\\h");
break;
case 152:
ConCat(Out,&o,"\\i");
break;
case 153:
ConCat(Out,&o,"\\j");
break;
case 154:
ConCat(Out,&o,"\\k");
break;
case 155:
ConCat(Out,&o,"\\l");
break;
case 156:
ConCat(Out,&o,"\\m");
break;
case 157:
ConCat(Out,&o,"\\n");
break;
case 158:
ConCat(Out,&o,"\\o");
break;
case 159:
ConCat(Out,&o,"\\p");
break;
case 160:
ConCat(Out,&o,"\\q");
break;
case 161:
ConCat(Out,&o,"\\r");
break;
case 162:
ConCat(Out,&o,"\\s");
break;
case 163:
ConCat(Out,&o,"\\t");
break;
case 164:
ConCat(Out,&o,"\\u");
break;
case 165:
ConCat(Out,&o,"RND");
break;
case 166:
ConCat(Out,&o,"INKEY$");
break;
case 167:
ConCat(Out,&o,"PI");
break;
case 168:
ConCat(Out,&o,"FN ");
break;
case 169:
ConCat(Out,&o,"POINT ");
break;
case 170:
ConCat(Out,&o,"SCREEN$ ");
break;
case 171:
ConCat(Out,&o,"ATTR ");
break;
case 172:
ConCat(Out,&o,"AT ");
break;
case 173:
ConCat(Out,&o,"TAB ");
break;
case 174:
ConCat(Out,&o,"VAL$ ");
break;
case 175:
ConCat(Out,&o,"CODE ");
break;
case 176:
ConCat(Out,&o,"VAL ");
break;
case 177:
ConCat(Out,&o,"LEN ");
break;
case 178:
ConCat(Out,&o,"SIN ");
break;
case 179:
ConCat(Out,&o,"COS ");
break;
case 180:
ConCat(Out,&o,"TAN ");
break;
case 181:
ConCat(Out,&o,"ASN ");
break;
case 182:
ConCat(Out,&o,"ACS ");
break;
case 183:
ConCat(Out,&o,"ATN ");
break;
case 184:
ConCat(Out,&o,"LN ");
break;
case 185:
ConCat(Out,&o,"EXP ");
break;
case 186:
ConCat(Out,&o,"INT ");
break;
case 187:
ConCat(Out,&o,"SQR ");
break;
case 188:
ConCat(Out,&o,"SGN ");
break;
case 189:
ConCat(Out,&o,"ABS ");
break;
case 190:
ConCat(Out,&o,"PEEK ");
break;
case 191:
ConCat(Out,&o,"IN ");
break;
case 192:
ConCat(Out,&o,"USR ");
break;
case 193:
ConCat(Out,&o,"STR$ ");
break;
case 194:
ConCat(Out,&o,"CHR$ ");
break;
case 195:
ConCat(Out,&o,"NOT ");
break;
case 196:
ConCat(Out,&o,"BIN ");
break;
case 197:
ConCat(Out,&o," OR ");
break;
case 198:
ConCat(Out,&o," AND ");
break;
case 199:
ConCat(Out,&o,"<=");
break;
case 200:
ConCat(Out,&o,">=");
break;
case 201:
ConCat(Out,&o,"<>");
break;
case 202:
ConCat(Out,&o," LINE ");
break;
case 203:
ConCat(Out,&o," THEN ");
break;
case 204:
ConCat(Out,&o," TO ");
break;
case 205:
ConCat(Out,&o," STEP ");
break;
case 206:
ConCat(Out,&o," DEF FN ");
break;
case 207:
ConCat(Out,&o," CAT ");
break;
case 208:
ConCat(Out,&o," FORMAT ");
break;
case 209:
ConCat(Out,&o," MOVE ");
break;
case 210:
ConCat(Out,&o," ERASE ");
break;
case 211:
ConCat(Out,&o," OPEN #");
break;
case 212:
ConCat(Out,&o," CLOSE #");
break;
case 213:
ConCat(Out,&o," MERGE ");
break;
case 214:
ConCat(Out,&o," VERIFY ");
break;
case 215:
ConCat(Out,&o," BEEP ");
break;
case 216:
ConCat(Out,&o," CIRCLE ");
break;
case 217:
ConCat(Out,&o," INK ");
break;
case 218:
ConCat(Out,&o," PAPER ");
break;
case 219:
ConCat(Out,&o," FLASH ");
break;
case 220:
ConCat(Out,&o," BRIGHT ");
break;
case 221:
ConCat(Out,&o," INVERSE ");
break;
case 222:
ConCat(Out,&o," OVER ");
break;
case 223:
ConCat(Out,&o," OUT ");
break;
case 224:
ConCat(Out,&o," LPRINT ");
break;
case 225:
ConCat(Out,&o," LLIST ");
break;
case 226:
ConCat(Out,&o," STOP ");
break;
case 227:
ConCat(Out,&o," READ ");
break;
case 228:
ConCat(Out,&o," DATA ");
break;
case 229:
ConCat(Out,&o," RESTORE ");
break;
case 230:
ConCat(Out,&o," NEW ");
break;
case 231:
ConCat(Out,&o," BORDER ");
break;
case 232:
ConCat(Out,&o," CONTINUE ");
break;
case 233:
ConCat(Out,&o," DIM ");
break;
case 234:
ConCat(Out,&o," REM ");
break;
case 235:
ConCat(Out,&o," FOR ");
break;
case 236:
ConCat(Out,&o," GO TO ");
break;
case 237:
ConCat(Out,&o," GO SUB ");
break;
case 238:
ConCat(Out,&o," INPUT ");
break;
case 239:
ConCat(Out,&o," LOAD ");
break;
case 240:
ConCat(Out,&o," LIST ");
break;
case 241:
ConCat(Out,&o," LET ");
break;
case 242:
ConCat(Out,&o," PAUSE ");
break;
case 243:
ConCat(Out,&o," NEXT ");
break;
case 244:
ConCat(Out,&o," POKE ");
break;
case 245:
ConCat(Out,&o," PRINT ");
break;
case 246:
ConCat(Out,&o," PLOT ");
break;
case 247:
ConCat(Out,&o," RUN ");
break;
case 248:
ConCat(Out,&o," SAVE ");
break;
case 249:
ConCat(Out,&o," RANDOMIZE ");
break;
case 250:
ConCat(Out,&o," IF ");
break;
case 251:
ConCat(Out,&o," CLS ");
break;
case 252:
ConCat(Out,&o," DRAW ");
break;
case 253:
ConCat(Out,&o," CLEAR ");
break;
case 254:
ConCat(Out,&o," RETURN ");
break;
case 255:
ConCat(Out,&o," COPY ");
break;
default:
if (In[i]>=32) Out[o++] = In[i];
}
}
Out[o]=0;
return strlen(Out);
}
/*****************************************************************************
ConCat()
Places the null-terminated string pointed to by 'Text' at position 'Pos'
in 'Out'. 'Out' must be large enough to contain the newly placed text.
*****************************************************************************/
void ConCat(char *Out, int *Pos, const char *Text)
{
int n = 0;
/* Stop two adjacent spaces appearing */
if ( (*Pos > 0) && (Out[*Pos-1] == 32) && (Text[0] == 32) ) (*Pos)--;
while(Text[n] != 0)
{
Out[*Pos+n] = Text[n];
n++;
}
*Pos += n;
}
[1]
http://freestuff.grok.co.uk/snaplist/index.html
http://www.worldofspectrum.org/pub/sinclair/tools/generic/SnapList.zip
[2]
https://github.com/andybalaam/bas2tap
--
@: W E B 2 0 1 8 at B A R T H E L D dot N E T
3W: www.bartheld.net
[toc] | [prev] | [next] | [standalone]
| From | Gzavsnap <**..NOSPAM..**@nospam.somewere> |
|---|---|
| Date | 2018-03-23 22:53 +0100 |
| Message-ID | <5ab576e8$0$3855$426a74cc@news.free.fr> |
| In reply to | #4574 |
ZX SPECTRUM: Fichiers TXT to TAP (TZX). - « ZmakeBas.exe » from Russell Marks (Dos) Bin and sources: (XavSnap update) http://zx81.ordi5.free.fr/tools/zmakebas-1.1.zip have fun...
[toc] | [prev] | [next] | [standalone]
| From | Volker Bartheld <news2018@bartheld.net> |
|---|---|
| Date | 2018-03-25 00:35 +0100 |
| Message-ID | <dj3onzembxba$.dlg@news.bartheld.net> |
| In reply to | #4576 |
On Fri, 23 Mar 2018 22:53:06 +0100, Gzavsnap wrote: > ZX SPECTRUM: Fichiers TXT to TAP (TZX). > http://zx81.ordi5.free.fr/tools/zmakebas-1.1.zip "zmakebas 1.1 - convert text files into Spectrum Basic programs." This is actually the opposite of what I intend to do. I have the Spectrum tzx, tap, sna, whatever file and want a readable, detokenized File on my PC. bas2tap [1] does quite a good job with compiling text into tokens. Greets, Volker [1] https://github.com/andybalaam/bas2tap -- @: W E B 2 0 1 8 at B A R T H E L D dot N E T 3W: www.bartheld.net
[toc] | [prev] | [next] | [standalone]
| From | Gzavsnap <**..NOSPAM..**@nospam.somewere> |
|---|---|
| Date | 2018-04-24 17:35 +0200 |
| Message-ID | <5adf4eb5$0$9287$426a34cc@news.free.fr> |
| In reply to | #4577 |
Le 25/03/2018 à 00:35, Volker Bartheld a écrit :
> On Fri, 23 Mar 2018 22:53:06 +0100, Gzavsnap wrote:
>> ZX SPECTRUM: Fichiers TXT to TAP (TZX).
>> http://zx81.ordi5.free.fr/tools/zmakebas-1.1.zip
>
> "zmakebas 1.1 - convert text files into Spectrum Basic programs."
>
> This is actually the opposite of what I intend to do. I have the Spectrum
> tzx, tap, sna, whatever file and want a readable, detokenized File on my
> PC. bas2tap [1] does quite a good job with compiling text into tokens.
>
> Greets,
> Volker
In association with Valker Bartheld, the "SnaList" had been updated to
read TAP and TZX files.
It's new name is "TapList" [XavSnap release]
* read Basic, Machine codes & arrays (char/num)
* Tap,Tzx & SNA format.
* compatible with Zmakebas specials characters arguments.
download: http://zx81.ordi5.free.fr/tools/TapList.zip
{win32/64}
Zmakebas updated too [XavSnap release]:
(it's not a Zmakebas-1.5 update!)
download: http://zx81.ordi5.free.fr/tools/zmakebas-1.1.zip
{win32/64}
All the best.
[toc] | [prev] | [next] | [standalone]
| From | arda <ardarda@gmail.com> |
|---|---|
| Date | 2018-03-26 06:58 -0700 |
| Message-ID | <4caf002d-6103-4eee-8eec-599d647f2b72@googlegroups.com> |
| In reply to | #4573 |
> Doesn't BASIN do this? > > deKay Yes, and also, Basinc v1.72 has a command line option -dumptxt you can use basinc 1.72 for dumping text files of basinc compatible file types (tap,tzx,sna,z80). eg. basinc oregon_trail.tap -dumptxt results: oregon_trail.tap_BASIC.txt get it here: http://arda.kisafilm.org/blog/?p=1243&lang=en
[toc] | [prev] | [next] | [standalone]
| From | Edward Solly <aelfstangard@gmail.com> |
|---|---|
| Date | 2019-11-10 10:11 -0800 |
| Message-ID | <fe5d270b-372b-4908-af25-63b12a17eb5d@googlegroups.com> |
| In reply to | #4572 |
On Friday, 23 March 2018 04:28:23 UTC-4, Volker Bartheld wrote: > ... currently working on some crap games contributions and the question > came up how to transfer and convert Sinclair ZX Spectrum Basic programs for > editing on PC. So more or less the opposite of bas2tap [1]. > > Just running > > 10 OPEN #3;"t" > 20 LLIST > 30 CLOSE #3 > > in an emulator and grabbing if1_out.txt (using EightyOne [2]) as the ZX > Interface 1 manual suggests is close but intrododuces unwanted line breaks > and the need for regex-fiddling. > > Any ideas are highly appreciated. THX. > > Greets, > Volker > > P.S.: What tool for TZX file management do you recommend? Splitting, > merging, deleting segmants and generating a catalogizing would be useful. I > have a ton of tapes with a ton of programs, most not really correlated. > > > [1] > http://www.worldofspectrum.org/pub/sinclair/tools/generic/bas2tap26-generic.zip > https://github.com/andybalaam/bas2tap > > [2] > https://sourceforge.net/projects/eightyone-sinclair-emulator/ > > > > -- > @: W E B 2 0 1 8 at B A R T H E L D dot N E T > 3W: www.bartheld.net I wrote a program in Turbo Pascal 7 to de-tokenize Sinclair BASIC programs. I'll try to dig it up and re-compile with Lazarus or FreePascal. Let me know if you are still interested.
[toc] | [prev] | [next] | [standalone]
| From | Marcos Cruz <use_the_contact_page@programandala.net> |
|---|---|
| Date | 2019-11-10 21:28 +0000 |
| Message-ID | <slrnqsh075.5fl.use_the_contact_page@nb505.reto> |
| In reply to | #4782 |
En/Je/On/In 2019-11-10, Edward Solly <aelfstangard@gmail.com> escribió/skribis/wrote/scrit: > On Friday, 23 March 2018 04:28:23 UTC-4, Volker Bartheld wrote: >> ... currently working on some crap games contributions and the >> question came up how to transfer and convert Sinclair ZX Spectrum >> Basic programs for editing on PC. So more or less the opposite of >> bas2tap. > I wrote a program in Turbo Pascal 7 to de-tokenize Sinclair BASIC > programs. I'll try to dig it up and re-compile with Lazarus or > FreePascal. Let me know if you are still interested. Also "listbasic" does what Volker needs. It lists the BASIC source from a snapshot or a TAP file. It's part of the Fuse emulator's fuse-utils: https://sourceforge.net/projects/fuse-emulator/files/
[toc] | [prev] | [next] | [standalone]
| From | Bruno Florindo <zxspectrum128@gmail.com> |
|---|---|
| Date | 2019-11-10 19:17 -0800 |
| Message-ID | <6215fc08-86fa-482a-b7a9-0ccf316c6f6e@googlegroups.com> |
| In reply to | #4572 |
On Friday, March 23, 2018 at 1:28:23 AM UTC-7, Volker Bartheld wrote: > ... currently working on some crap games contributions and the question > came up how to transfer and convert Sinclair ZX Spectrum Basic programs for > editing on PC. So more or less the opposite of bas2tap [1]. > > Just running > > 10 OPEN #3;"t" > 20 LLIST > 30 CLOSE #3 > > in an emulator and grabbing if1_out.txt (using EightyOne [2]) as the ZX > Interface 1 manual suggests is close but intrododuces unwanted line breaks > and the need for regex-fiddling. > > Any ideas are highly appreciated. THX. > > Greets, > Volker > > P.S.: What tool for TZX file management do you recommend? Splitting, > merging, deleting segmants and generating a catalogizing would be useful. I > have a ton of tapes with a ton of programs, most not really correlated. > > > [1] > http://www.worldofspectrum.org/pub/sinclair/tools/generic/bas2tap26-generic.zip > https://github.com/andybalaam/bas2tap > > [2] > https://sourceforge.net/projects/eightyone-sinclair-emulator/ > > > > -- > @: W E B 2 0 1 8 at B A R T H E L D dot N E T > 3W: www.bartheld.net Spectaculator, and possibly other emulators, can redirect LPrint and LList to a .txt file.
[toc] | [prev] | [next] | [standalone]
| From | Marcos Cruz <use_the_contact_page@programandala.net> |
|---|---|
| Date | 2019-11-17 13:14 +0000 |
| Message-ID | <slrnqt2h2j.9cd.use_the_contact_page@nb505.reto> |
| In reply to | #4784 |
En/Je/On/In 2019-11-11, Bruno Florindo <zxspectrum128@gmail.com> escribió/skribis/wrote/scrit: > Spectaculator, and possibly other emulators, can redirect LPrint and > LList to a .txt file. That's a good method too, provided you can load the program first. Also the Fuse emulator redirects its printing to a text file.
[toc] | [prev] | [next] | [standalone]
| From | "Supratim Sanyal <\"supratim sanyal" <"qcocal::sanyal\""@NOSPAM.X.mim.X.update.X.uu.X.se.NOSPAM> |
|---|---|
| Date | 2019-12-06 01:25 -0500 |
| Message-ID | <qscs9k$dct$1@dont-email.me> |
| In reply to | #4572 |
[Multipart message — attachments visible in raw view] — view raw
Interestingly I found this by Paul Dunn on my (PC) hard-drive - looks like I grabbed this from somewhere in 2016. There probably is a later version from the author. I've linked 1 file to this email: * SpecBAS Windows - SpecOS.zip (15.5 MB) hosted on WeTransfer: https://we.tl/t-mAkFNVNldb
[toc] | [prev] | [standalone]
Back to top | Article view | comp.sys.sinclair
csiph-web