From: Wolfgang Moser on 18 Oct 2006 17:32 Hi Per, > WM> Therefore I vote for only using 31 chars. But with using a 3-bit > WM> checksum only, we don't lose a single decoded raw byte. > > 3-bit checksum just won't do though. Way too easy to get a typo that > isn't caught, like an 8 instead of a 0. hmmmm, by clever reordering the mapping of the chars such possible confusions for a pair of chars with the three lower bits (when decoded) beeing the same could be minimized or eliminated I believe. And then we have got this weird bit permutation... Using only 3 bits for the line checksum and thus saving one char per line to type in sound like a fair trade-off to me. Well, no proof of the reliability here, of course ;-) > WM> Do you like Java-5 ? > > Actually, no :P ;-) Same as with me and Perl. Womo
From: Groepaz on 19 Oct 2006 11:29 MagerValp wrote: > WM> :-) Along with Tok64 integrated to produce true BASIC files for > WM> testing and cbmconvert for creating a D64... > > I've been using petcat -w2. How does that compare to Tok64? > btw, you can omit linenumbers when using petcat (only use them in lines that are targets for goto/gosub) -- http://www.hitmen-console.org http://www.gc-linux.org/docs/yagcd.html http://www.pokefinder.org http://ftp.pokefinder.org Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway <Andrew S. Tanenbaum>
From: MagerValp on 20 Oct 2006 07:09 >>>>> "G" == Groepaz <groepaz(a)gmx.net> writes: G> btw, you can omit linenumbers when using petcat (only use them in lines that G> are targets for goto/gosub) Nice! -- ___ . . . . . + . . o _|___|_ + . + . + . Per Olofsson, arkadspelare o-o . . . o + MagerValp(a)cling.gu.se - + + . http://www.cling.gu.se/~cl3polof/
From: Wolfgang Moser on 20 Oct 2006 15:45 Hi, Groepaz schrieb: > MagerValp wrote: >> WM> :-) Along with Tok64 integrated to produce true BASIC files for >> WM> testing and cbmconvert for creating a D64... >> >> I've been using petcat -w2. How does that compare to Tok64? >> > > btw, you can omit linenumbers when using petcat (only use them in lines that > are targets for goto/gosub) pretty funny, this would simplify some things. It seems we got a new competitor for the job of minimizing the size/effort for the minislave.txt type-in? Womo
From: Wolfgang Moser on 21 Oct 2006 17:27
Hi Per, MagerValp schrieb: > [...] > Maybe we should hold a competition? Who can write the smallest basic > program that copies the 684 bytes of minislave to $cc00? :) Data lines > should be max 39 chars long, for readability, while code lines can be got my entry up and running. I changed from the 3-bit checksum to 8-bits as you recommended. I did some tests and immediately recognized thta a lot of error weren't detected. > up to 79. The data also shouldn't use "l" (el) or "O" (capital Oh), as > they're easily confused with 1 and 0. Currently the 5-Bit encoding is done to uppercase chars. This is somewhat difficult to read so I think about trying out a lowercase encoding. But that would need another mapping of course. Womo The type-in: 10 DATA7JBBNQB87JAANQC8MNQD8FNEX8GJO8QQ 11 DATASLFNFX8JDDXQE7AL3A3PRFJKNCKWAIAQ 12 DATA3AVQOFJCNCIFAINA6QOOJNMONBOOMNC5 13 DATA8OBAQOOJ7NNODOOMWEOOAVQONJNOOFFH 14 DATAOONMGOOA6QOOJMJCXTFAABAQ8OCMSXM5 15 DATA7JH9FJ4CAFKMYFEAACAGEAIAZAIBJZG3 16 DATAWCJKAQTO7AIG3TIMN8TJMBAMOOEIIZQN 17 DATAHTRAWOOASHOOAS5OJASNONJE6NQC8WJS 18 DATAQBENDO8NQFO8JZNQY3FNJO8NZIO8NZJ5 19 DATAG8VFZFNIX8VFYCKQACYGYFCANNQI8E7W 20 DATAIA8PIFNJX8E7A8PI9ESYQPOECZHQQNCX 21 DATAVAFNIO8NZJX8K8QY6I8QSPQSNNQNP8JX 22 DATAIGHQJGJA8QNHNQYP8JQRQNANJEXPJAMR 23 DATA8QM3NRFP8JTEQMSN3KXPJ4MQAHXJKYQO 24 DATAJQCMSOMA4BXNORAQDZNJVEFB7NRMPVFO 25 DATARNNNNGPFBOFAAN3PXPMRNXIM3OXPQ9WV 26 DATANJBYFQBZ9ORAQCMSGMRAB8NM3MOPCJMJ 27 DATAWJIAAQTO7JAANQZPMNQ3PENSGPENTGP3 28 DATANJKFCIAA54OOCA8OZROPJAANQQOPAT4W 29 DATAOOFJAFCR3AT4ONNHOONOIOOAL4OONFJX 30 DATAOONOKOOA54OONQ4PNOQ5P3A4XOFN6GPK 31 DATANOQ7P3A4GOFNZXPJY9ENZOPNA3XPJP9P 32 DATAMNQ3PWJFWCIAAQMONNQQPFORGPBAMGOT 33 DATANNQSPFOTXPBAMOOJAAFCABAMOOFJANCI 34 DATAQRBAMOONZZOPOQ3PJAQMORAHXORANGO9 35 DATANNREPNOFXPBAMOON3COPORDPJAQMONNB 36 DATAAROPZHJVWKFNQ8PJQABAMOOJQAFCABA3 37 DATAZMOONRKPNORLPCMMXOENIG8OQJ88ASI8 38 DATA7JGJNQM87JAANQN8MOQO8ENPG8NJZ6NM 39 DATAZCO8JABNZDO8NQF87OQE8CKQHYRA5OOS 40 DATAJASWOFJI6NQI8DINQJ88ANJHNCXOQIEY 41 DATA7JI4COPAQEGQMNJB7CXOQIEJIGWCPFAC 42 DATAAGVF4VG56EK3AIARS4ENIX8INRC4NIJK 43 DATA88XIES3QHQTAIEKZLNQ3PEN3XP5INAZE 44 DATAXPENZGPQADHO38PAQKENCO8JZABKNZDG 45 DATAX8EOEG8MQF88AAAAZQ7TLWYAWIQAAIAK 100 DATA END 110 A=52224 : SA=A : N=9 120 READ A$ : IF A$<>"END" GOTO 140 130 PRINT CHR$(13)"POKE"A-5"TO"A-2"TO SET IP, SYS"SA"TO START" : END 140 N=N+1 : R=0 : S=0 : CK=0 150 FOR I=1 TO 32 160 : IF S<8 GOTO 210 170 : Q=R AND 255 180 : R=INT(R/256) : S=S-8 190 : POKE A,Q : A=A+1 200 : CK = (CK + Q) AND 255 210 : Q=ASC(MID$(A$,I,1)) : GOSUB 300 220 : R=R*32 + Q : S=S+5 230 NEXT I 240 PRINT N","; 250 IF CK=R GOTO 120 260 PRINT " CHECKSUM ERROR" 270 END 300 IF Q>90 THEN Q=Q-32 320 IF Q=48 THEN Q=79 330 IF Q=49 THEN Q=73 340 IF Q>85 THEN Q=Q-1 350 IF Q<65 THEN Q=Q+39 360 Q=(Q-65) AND 31 : RETURN |