To add a leading zero if a<16 HEX$(15)="F" ----- Original Message ----- From: Stephen Adolph To: Model 100 Discussion Sent: Tuesday, April 21, 2015 10:46 AM Subject: Re: [M100] quick test of M100 EU ROM checksum A8AF with REX
Nice! Mike, why B$=RIGHT$("00"+HEX$(A),2) instead of B$=HEX$(A) On Tue, Apr 21, 2015 at 10:39 AM, MikeS <dm...@torfree.net> wrote: As usual when this topic comes up I'll present the decimal version: Connect the two computers and set the receiving terminal program to capture text to a file, e.g. ROM100.txt On the M100, run: 10OPEN"COM:98N1E"FOR OUTPUT AS 1:FOR I=0 TO 32767:PRINT#1,PEEK(I):NEXT Watch a little TV, have a snack, etc. When finished, on the receiving computer fire up GWBASIC or equivalent (yes, it still runs on XP and BTW, it's >90% compatible with the M100's BASIC) and run: 10 OPEN "ROM100.TXT" FOR INPUT AS 1:OPEN "ROM100.HEX" FOR OUTPUT AS 2:FOR I=0 TO 32767:INPUT#1,A:B$=RIGHT$("00"+HEX$(A),2):PRINT#2,B$;:NEXT The resulting file will probably have an EOF at the end; you can delete it with Notepad or equivalent. The file size should be 65536. m ----- Original Message ----- From: Stephen Adolph To: Model 100 Discussion Sent: Monday, April 20, 2015 9:24 PM Subject: Re: [M100] quick test of M100 EU ROM checksum A8AF with REX Try this program- 10 REM send contents of mainrom to serial port 11 REM model = M100 100 CLS 105 PRINT" 110 PRINT"open com link to PC" 120 PRINT"19200, 8 bits, no parity, 1 stop bit" 121 PRINT"Xon/Xoff enabled, 98N1E" 135 PRINT"data format hex ascii" 140 PRINT"hit any key when link ready to receive" 150 A$=INKEY$:IF A$=""THEN 150 195 PRINT"sending data to PC via serial" 200 OPEN"com:98n1E" FOR OUTPUT AS 1 205 H$="0123456789ABCDEF" 210 FOR I=0TO32767 215 A=PEEK(I) 220 B=(AAND240)/16:C=AAND15 230 D=B:GOSUB400:D=C:GOSUB400 235 NEXT 290 CLOSE#1 300 PRINT"done!":END 400 E$=MID$(H$,D+1,1):PRINTE$;:PRINT#1,E$;:RETURN On Mon, Apr 20, 2015 at 9:09 PM, James Zeun <james.z...@gmail.com> wrote: I can run it again, but it did run for quite some time, couldn't tell you how long, because i left it and watch the TV. Was my result different to yours? I've had hit and miss results with windows and have thus fallen back on minicom under linux, which seems to handle my serial ports a lot better. I use my M100 for writing articles for my blog and this is by far the easiest way of uploading docs from the M100. With your typical text capture do the trick? James On 21 April 2015 at 01:59, Stephen Adolph <twospru...@gmail.com> wrote: did it run for a good long time? like several minutes? That is a very different rom. I think we need to get a copy of that one! Generally, to extract the ROM, it works well to send characters over the serial port as 2 byte hex represented data. ex. binary 255 gets sent as "F" "F" you can use a serial cable and capture the data using hyperterm or any other terminal program. Think you could get set up to do that? I think I have a program around here somewhere to do that. A basic program can do it equally, but it is much slower. Steve On Mon, Apr 20, 2015 at 8:47 PM, James Zeun <james.z...@gmail.com> wrote: Result 61151 On 21 Apr 2015 1:43 am, "James Zeun" <james.z...@gmail.com> wrote: I'm running this program now, entered it via basic Should it read 30 NEXTI or 30 NEXT I On 21 Apr 2015 1:07 am, "Stephen Adolph" <twospru...@gmail.com> wrote: ...seems to work just fine. So, James - so far no smoking gun. REX installs and works to first order. I've not done a huge pile of testing mind you. But it does a lot more than what you are getting. Would be good to know your checksum. This program runs forever but eventually it will tell you your ROM checksum in base 10. 5 A=0 10 FORI=0 TO 32767 20 A=A+PEEK(I) 25 IF A>65535 THEN A=A-65535 30 NEXTI 50 PRINT A Steve -- My retro tech blog and general ramblings http://bytemyvdu.wordpress.com/