Author Topic: USIfAC II:Convert a PC or USB stick to Amstrad HDD,access dsk's,and many more!  (Read 19576 times)

0 Members and 1 Guest are viewing this topic.

Offline ikonsgr

  • 464 Plus
  • *****
  • Posts: 495
  • Country: gr
    • ikonsgr 80's Home Micros WorkBench
  • Liked: 508
  • Likes Given: 96
And here is the Basic utility in ascii text form:
 
10 DIM a$(62),o$(62)
15 p=1:BORDER 0:INK 0,0:INK 1,23
20 ON ERROR GOTO 500
25 MODE 2:LOCATE 30,12:PRINT"Initializing ..."
30 OPENIN"INDEX.TXT"
40 FOR n=1 TO 61
50 INPUT#9,a$(n)
55 IF INSTR(a$(n),"DSK")<>0 THEN GOSUB 1000 ELSE n=n-1
60 NEXT
500 CLS:FOR n=1 TO 20:LOCATE 1,n:PRINT n;"  ";o$(n):NEXT
505 k=1:FOR n=21 TO 40:LOCATE 30,k:PRINT n;"  ";o$(n):k=k+1:NEXT
507 k=1:FOR n=41 TO 60:LOCATE 60,k:PRINT n;"  ";o$(n):k=k+1:NEXT
510 LOCATE 1,21:|SMG
515 LOCATE 40,24:PRINT"To Exit press '0'"
520 LOCATE 40,21:INPUT"Mount Nr : ",m:IF m=0 THEN GOTO 800
530 LOCATE 40,22:INPUT"Slot Nr : ",s:IF s=0 THEN GOTO 800
540 ON s GOTO 600,610,620,630
600 z$=o$(m):|MG,@z$:CLS:GOTO 500
610 z$=o$(m):|MG2,@z$:CLS:GOTO 500
620 z$=o$(m):|MG3,@z$:CLS:GOTO 500
630 z$=o$(m):|MG4,@z$:CLS:GOTO 500
800 CLS:IF INP(&FBDC)=&83 THEN |464 ELSE |FDC:END
1000 o$(p)=LEFT$(a$(n),8)+".DSK":p=p+1:RETURN

* NC.TXT
(0.87 kB - downloaded 5394 times)

In this form, you can easily edit/view the listing from your PC and run it directly to your Amstrad!  ;)

Offline SkulleateR

  • 464 Plus
  • *****
  • Posts: 326
  • Country: de
  • Liked: 180
  • Likes Given: 97
Finally, "3rd party support" for USIfAC II  started!
Well done!  ;)
btw, if you want, we could add this in the download link of usifac ii windows utility prorgam,and why not, add a section in User's guide too!  ;)


You are of course free to do so ... I'm still working on larger directory support with more DSK files but the main structure stays the same... And of course still investigate the issue we wrote about  ;)

Offline Philippe Lardenois

  • CPC464
  • **
  • Posts: 19
  • Liked: 8
  • Likes Given: 8

Turns out my DM-101 ( ESP-07 ESP-8266 ) modules had no firmware on them at all. The flashing process is a bit involved. These modules seem to work only with old firmware.  ESP_8266_BIN0.92.bin (attached) was the one I got working. It's possible that newer firmware will work, but I had no joy. I set up the access point though the usb-ttl and then stuck it in the usifac.


But it's recognised by the usifac now and I can communicate with it through the 464. So all is good :)



Hi, got the same problem. Can we flash the module with the Pickit 3.5 ? or do you have a noob procedure for us to do that ?


Thanks

Offline issalig

  • CPC464
  • **
  • Posts: 38
  • Country: es
  • Liked: 19
  • Likes Given: 43

Hi, got the same problem. Can we flash the module with the Pickit 3.5 ? or do you have a noob procedure for us to do that ?


Thanks
No, Philippe, this should be done with a usb-serial module like this one https://es.aliexpress.com/item/1005001510943320.html
In particular I use the black one with CP2102 but you could use others for example PL2303HX that is used in the documentation for Direct Serial Connection https://www.dropbox.com/sh/ezzga2dppm6jlm7/AACwFC_rv2QatWh_ndKc9fhma?dl=0&preview=Amstrad+CPC+Serial+Interface+II+User+Guide.pdf
For flashing it you can find instructions in http://nerdclub-uk.blogspot.com/2016/09/upgrading-firmware-in-esp8266-wifi.html

But I guess, maybe your module is OK and you just need to change the baudrateIf it is reporting strange characters (it is working but in an unknown baudrate probably)
It looks that some of the modules use 9600bps and also the "exotic"  74880bps , so you could give a try to set that baudrate in the arduino serial monitor or in Realterm or in CPC with |TER
Additionally, in my case I needed to  set station mode for wifi  AT+CWMODE=1  and then AT+CWJAP="WIFINAME","YOURPASS"Then , setup baudrate  AT+CIOBAUD=115200   and the same speed in USIFAC

Offline Philippe Lardenois

  • CPC464
  • **
  • Posts: 19
  • Liked: 8
  • Likes Given: 8
Thanks. Gonna look for it. Stay tuned.
Phil

Offline ikonsgr

  • 464 Plus
  • *****
  • Posts: 495
  • Country: gr
    • ikonsgr 80's Home Micros WorkBench
  • Liked: 508
  • Likes Given: 96
Hi, got the same problem. Can we flash the module with the Pickit 3.5 ? or do you have a noob procedure for us to do that ?
Thanks

 Download this: https://www.dropbox.com/s/vkq6ghmf39a0qx7/ESP8266_flasher.zip?dl=0
Just run "esp8266_flasher.exe", click "BIN" button and select the included: "HS06F014 ESP-01S.bin", set your com port number and press "download".
This must be the easiest way to flash a wifi module.
Btw, i found out why mysteriously all my wifi modules stopped working: firewall blocked access to windows utility TCP server (i suspect the antivirus involved in this...)
So, if your Wifi module can't connect to PC check windows firewall settings, if there is any inbound rule that block access of the Amstrad utility.
« Last Edit: 12:43, 03 May 21 by ikonsgr »

Offline ikonsgr

  • 464 Plus
  • *****
  • Posts: 495
  • Country: gr
    • ikonsgr 80's Home Micros WorkBench
  • Liked: 508
  • Likes Given: 96
But I guess, maybe your module is OK and you just need to change the baudrateIf it is reporting strange characters (it is working but in an unknown baudrate probably)
It looks that some of the modules use 9600bps and also the "exotic"  74880bps , so you could give a try to set that baudrate in the arduino serial monitor or in Realterm or in CPC with |TER
Additionally, in my case I needed to  set station mode for wifi  AT+CWMODE=1  and then AT+CWJAP="WIFINAME","YOURPASS"Then , setup baudrate  AT+CIOBAUD=115200   and the same speed in USIFAC

 Well, you can do all that, by simply giving |WIFI. There is also no need to preset wifi module's speed to usufac's serial port speed, as program will scan all available speeds automatically and set to current speed of the wifi module (i simply give an AT command and check respond, if it's the right one then obviously this is the correct serial port speed!  ;) btw, the |WIFI utility is in BASIC, so it can be a good source for learning too!  ;))
After that, you'll be asked if you want to change the speed, and then set Access point name+password (this is ommited if module is already connected to an access point), and finally establish a TCP conection by giving ip address+port  of a tcp server.
The only thing that you need to take care, is that, after initial power up (of Amstrad+usifac+wifi module), you should wait for a few seconds for the wifi module to boot properly, and then give "|WIFI" command. If you give the command too quick, you might get a lot of garbage on screen, even hang-ups and resets, although no harm is done with that, as you can simply reset amstrad and give "|WIFI" again!  ;)
« Last Edit: 23:20, 17 April 21 by ikonsgr »

Offline issalig

  • CPC464
  • **
  • Posts: 38
  • Country: es
  • Liked: 19
  • Likes Given: 43
btw, the |WIFI utility is in BASIC, so it can be a good source for learning too!  ;) )
Nice info @ikonsgr but how can this BASIC code be listed? (BTW, I still have to learn how to program RSX commands  :) )

Offline ikonsgr

  • 464 Plus
  • *****
  • Posts: 495
  • Country: gr
    • ikonsgr 80's Home Micros WorkBench
  • Liked: 508
  • Likes Given: 96
Well, after finishing setting up wifi module, you just give "LIST" at basic prompt, and you will get the BASIC listing!  :D
And here is the asm code for the |WIFI command:
Code: [Select]
data_size equ 3465
addr equ &170
org &c000
ld hl, setwifi_code
ld de, addr
ld bc, data_size
ldir
ld a ,#FB
in a,(#Dc)
ld l, a
ld h,&ae
ld de,data_size+&170
ld B,4

patch_mems: ;length+1678+368 (&170)

ld (HL),e
INC HL
LD (HL),d
INC HL
dec b
jr nz,patch_mems

ld a,l
cp &6e
jp z,runcommand
ret

runcommand:
ld hl,&ae29
ld a,0
ld (hl),a
ld hl, run_code
ld de, &7900
ld bc, 8
ldir
jp &7900

Run_code:
defb 14,0,33,149,234,205,27,0


setwifi_code:

defb 19,0,10,0,173,32,16,1,130,32,14,32,32,32,32,32,32,32,0,31,0,17,0,185,32,28,208,251,44,25,43,1,185,32,28,208,251,44,25,43,1,185
defb 32,28,208,251,44,25,43,0,60,0,20,0,147,32,3,0,0,83,208,40,25,10,41,1,13,0,0,115,101,114,115,112,101,101,228,239,25,24,1,13,0
defb 0,99,117,114,115,112,101,101,228,239,255,11,40,28,221,251,41,32,32,32,32,32,32,32,32,32,0,25,0,30,0,162,32,14,44,15,1,162,32,16,44
defb 14,1,186,32,16,1,138,32,32,32,0,10,0,40,0,159,32,30,136,19,0,36,0,50,0,3,0,0,225,239,34,65,84,43,67,87,77,79,68,69,61
defb 49,34,1,159,32,30,176,4,32,32,32,32,32,32,32,0,19,0,100,0,197,32,115,101,114,105,97,108,32,115,101,116,117,112,0,60,0,110,0,138,1
defb 216,32,35,14,44,25,18,44,25,55,44,17,44,22,1,124,0,83,84,65,212,1,216,32,35,14,44,25,18,44,25,55,44,18,44,22,1,138,1,216,32
defb 35,14,44,15,44,25,79,44,15,44,25,25,0,60,0,115,0,169,32,25,22,44,19,1,191,34,83,101,116,32,110,101,119,32,115,112,101,101,100,63,32
defb 40,89,47,78,41,34,1,131,32,28,3,187,1,13,0,0,111,102,102,115,101,244,239,14,32,32,32,32,32,32,32,0,34,0,116,0,161,32,255,10,40
defb 25,43,41,239,14,32,235,32,30,120,0,32,32,32,32,32,32,32,32,32,32,32,32,32,0,41,0,117,0,161,32,255,10,40,25,46,41,239,14,32,235
defb 32,13,0,0,111,102,102,115,101,244,239,25,11,1,160,32,30,84,1,32,32,32,32,32,0,10,0,118,0,160,32,30,116,0,0,58,0,120,0,191,1
defb 191,34,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,80,114,101,115,115,58,34,1,158,32,13,0,0,248,239
defb 21,32,236,32,25,14,32,32,32,32,0,75,0,130,0,195,32,3,0,0,83,208,40,13,0,0,248,245,20,41,1,169,32,25,32,44,13,0,0,248,1
defb 191,32,34,60,34,59,172,40,255,25,40,13,0,0,216,245,20,41,44,16,44,15,41,59,34,62,58,34,59,3,0,0,83,208,40,13,0,0,248,245,20
defb 41,32,32,0,11,0,140,0,176,32,13,0,0,248,0,60,0,160,0,140,32,57,54,48,48,44,53,55,54,48,48,44,49,49,53,50,48,48,44,50,51
defb 48,52,48,48,44,52,54,48,56,48,48,44,53,55,54,48,48,48,44,57,50,49,54,48,48,44,49,48,54,53,54,48,48,0,21,0,170,0,13,0,0
defb 115,101,114,115,240,239,14,1,131,32,28,3,187,0,51,0,180,0,161,32,255,10,40,25,64,41,239,14,32,235,32,13,0,0,115,101,114,115,240,239,25
defb 12,1,3,0,0,83,208,239,34,57,54,48,48,34,32,32,32,32,32,32,32,32,32,0,54,0,190,0,161,32,255,10,40,25,65,41,239,14,32,235,32
defb 13,0,0,115,101,114,115,240,239,25,15,1,3,0,0,83,208,239,34,53,55,54,48,48,34,32,32,32,32,32,32,32,32,32,32,32,0,52,0,200,0
defb 161,32,255,10,40,25,57,41,239,14,32,235,32,13,0,0,115,101,114,115,240,239,25,16,1,3,0,0,83,208,239,34,49,49,53,50,48,48,34,32,32
defb 32,32,32,32,32,32,0,51,0,210,0,161,32,255,10,40,25,56,41,239,14,32,235,32,13,0,0,115,101,114,115,240,239,25,17,1,3,0,0,83,208
defb 239,34,50,51,48,52,48,48,34,32,32,32,32,32,32,32,0,50,0,220,0,161,32,255,10,40,25,49,41,239,14,32,235,32,13,0,0,115,101,114,115
defb 240,239,25,18,1,3,0,0,83,208,239,34,52,54,48,56,48,48,34,32,32,32,32,32,32,0,54,0,230,0,161,32,255,10,40,25,48,41,239,14,32
defb 235,32,13,0,0,115,101,114,115,240,239,25,19,1,3,0,0,83,208,239,34,53,55,54,48,48,48,34,32,32,32,32,32,32,32,32,32,32,0,44,0
defb 240,0,161,32,255,10,40,25,41,41,239,14,32,235,32,13,0,0,115,101,114,115,240,239,25,21,1,3,0,0,83,208,239,34,57,50,49,54,48,48,34
defb 0,51,0,250,0,161,32,255,10,40,25,40,41,239,14,32,235,32,13,0,0,115,101,114,115,240,239,25,23,1,3,0,0,83,208,239,34,49,48,54,53
defb 54,48,48,34,32,32,32,32,32,32,0,25,0,24,1,161,32,13,0,0,115,101,114,115,240,239,14,32,235,32,160,32,30,180,0,0,54,0,44,1,3
defb 0,0,193,239,34,65,84,43,85,65,82,84,95,68,69,70,61,34,244,3,0,0,83,208,244,34,44,56,44,49,44,48,44,48,34,32,32,32,32,32,32
defb 32,32,32,32,32,32,32,0,33,0,54,1,159,32,30,176,4,1,185,32,28,209,251,44,13,0,0,115,101,114,115,240,1,185,32,28,209,251,44,15,0
defb 25,0,64,1,158,32,13,0,0,233,239,15,32,236,32,25,100,1,176,32,13,0,0,233,0,110,0,84,1,216,32,35,16,44,15,44,25,79,44,25,21
defb 245,13,0,0,79,70,70,83,69,212,44,25,25,245,13,0,0,79,70,70,83,69,212,1,186,32,35,16,44,14,1,187,32,35,16,44,15,1,216,32,35
defb 17,44,15,44,25,79,44,25,19,245,13,0,0,79,70,70,83,69,212,44,25,20,245,13,0,0,79,70,70,83,69,212,1,186,32,35,17,44,14,1,187
defb 32,35,17,44,15,1,159,32,30,208,7,0,37,0,86,1,3,0,0,225,239,34,65,84,43,67,73,80,77,79,68,69,61,49,34,1,159,32,30,176,4
defb 32,32,32,32,32,32,32,0,28,0,89,1,3,0,0,225,239,34,65,84,43,67,73,80,83,69,78,68,34,1,159,32,30,176,4,0,55,0,94,1,169
defb 32,25,30,44,25,22,245,13,0,0,79,70,70,83,69,212,1,191,34,87,105,70,105,32,77,111,100,117,108,101,32,99,111,110,110,101,99,116,101,100,33
defb 34,32,32,32,32,32,32,32,0,17,0,104,1,131,32,28,3,187,1,152,32,32,32,32,32,0,31,0,176,4,197,32,83,69,78,68,32,65,84,32,67
defb 79,77,77,65,78,68,83,32,82,79,85,84,73,78,69,0,24,0,196,4,158,32,13,0,0,235,239,15,32,236,32,255,14,40,3,0,0,225,41,0,29
defb 0,206,4,185,32,28,208,251,44,255,1,40,172,40,3,0,0,193,44,13,0,0,203,44,15,41,41,0,11,0,216,4,176,32,13,0,0,203,0,24,0
defb 226,4,185,32,28,208,251,44,28,13,0,1,185,32,28,208,251,44,28,10,0,0,12,0,236,4,3,0,0,193,239,34,34,0,6,0,246,4,201,0,24
defb 0,0,5,197,32,83,69,78,68,32,84,69,88,84,32,82,79,85,84,73,78,69,0,25,0,60,5,158,32,13,0,0,235,239,15,32,236,32,255,14,40
defb 3,0,0,225,41,32,0,38,0,70,5,185,32,28,208,251,44,255,1,40,172,40,3,0,0,193,44,13,0,0,203,44,15,41,41,32,32,32,32,32,32
defb 32,32,32,0,14,0,80,5,176,32,13,0,0,203,32,32,32,0,36,0,85,5,161,32,13,0,0,99,114,108,230,238,14,32,235,32,185,32,28,208,251
defb 44,25,13,1,185,32,28,208,251,44,25,10,0,36,0,90,5,191,32,35,15,44,255,3,40,25,10,41,244,255,3,40,25,13,41,1,3,0,0,225,239
defb 34,34,32,32,32,32,32,0,6,0,100,5,201,0,22,0,208,7,197,32,87,73,70,73,32,67,79,78,78,69,67,84,73,79,78,0,22,0,210,7,3
defb 0,0,193,239,34,65,84,69,48,34,1,159,32,30,176,4,0,12,0,213,7,185,32,28,209,251,44,15,0,10,0,218,7,159,32,30,184,11,0,10,0
defb 223,7,131,32,28,3,187,0,32,0,224,7,161,32,13,0,0,83,84,65,84,85,211,239,14,32,235,32,13,0,0,83,84,65,84,85,211,239,15,0,40
defb 0,228,7,178,32,13,0,0,115,116,97,116,117,243,32,160,32,30,2,8,44,30,152,8,44,30,238,7,44,30,152,8,44,30,2,8,32,32,0,6,0
defb 238,7,201,0,52,0,2,8,169,32,25,27,44,25,19,245,13,0,0,111,102,102,115,101,244,1,163,34,65,46,80,46,32,115,115,105,100,58,34,44,3
defb 0,0,115,115,105,228,32,32,32,32,32,32,32,32,0,52,0,12,8,169,32,25,28,44,25,20,245,13,0,0,111,102,102,115,101,244,1,163,34,112,97
defb 115,115,119,111,114,100,58,34,44,3,0,0,112,97,115,243,32,32,32,32,32,32,32,32,32,0,73,0,22,8,3,0,0,225,239,34,65,84,43,67,87
defb 74,65,80,95,68,69,70,61,34,244,255,3,40,25,34,41,244,3,0,0,83,83,73,196,244,255,3,40,25,34,41,244,34,44,34,244,255,3,40,25,34
defb 41,244,3,0,0,80,65,83,211,244,255,3,40,25,34,41,0,15,0,32,8,159,32,30,176,4,32,32,32,32,32,0,53,0,42,8,169,32,25,30,44
defb 25,21,245,13,0,0,111,102,102,115,101,244,1,191,34,67,111,110,110,101,99,116,105,110,103,46,46,46,34,59,32,32,32,32,32,32,32,32,32,32,32
defb 32,32,0,10,0,52,8,159,32,30,184,11,0,45,0,62,8,161,32,13,0,0,115,116,97,116,117,243,239,16,32,235,32,191,34,79,75,34,1,138,32
defb 35,17,1,160,32,30,228,7,32,32,32,32,32,32,32,32,0,73,0,72,8,169,32,25,15,44,25,22,245,13,0,0,111,102,102,115,101,244,1,191,34
defb 69,114,114,111,114,58,82,101,116,114,121,40,49,41,32,111,114,32,73,110,115,101,114,116,32,110,101,119,32,65,99,99,101,115,115,32,80,111,105,110,116
defb 40,50,41,63,34,32,32,0,36,0,82,8,161,32,255,10,40,25,64,41,239,14,32,235,32,138,32,35,16,1,160,32,30,32,8,32,32,32,32,32,32
defb 32,32,0,46,0,92,8,161,32,255,10,40,25,65,41,239,14,32,235,32,138,32,35,16,1,138,32,35,17,1,131,32,28,3,187,1,160,32,30,2,8
defb 32,32,32,32,32,32,32,0,10,0,102,8,160,32,30,82,8,0,60,0,152,8,138,32,35,16,1,131,32,28,3,187,1,169,32,25,27,44,25,19,245
defb 13,0,0,111,102,102,115,101,244,1,163,34,72,111,115,116,32,105,112,58,34,44,3,0,0,104,111,115,244,32,32,32,32,32,32,32,0,52,0,162,8
defb 169,32,25,30,44,25,20,245,13,0,0,111,102,102,115,101,244,1,163,34,112,111,114,116,58,34,44,3,0,0,112,111,114,244,32,32,32,32,32,32,32
defb 32,32,32,32,32,32,0,53,0,172,8,3,0,0,72,79,83,212,239,255,3,40,25,34,41,244,3,0,0,72,79,83,212,244,255,3,40,25,34,41,244
defb 34,44,34,244,3,0,0,80,79,82,212,32,32,32,32,32,32,32,0,56,0,182,8,3,0,0,225,239,34,65,84,43,67,73,80,83,84,65,82,84,61
defb 34,244,255,3,40,25,34,41,244,34,84,67,80,34,244,255,3,40,25,34,41,244,34,44,34,244,3,0,0,72,79,83,212,0,25,0,192,8,3,0,0
defb 99,111,110,110,101,99,244,239,3,0,0,225,32,32,32,32,32,0,10,0,197,8,159,32,30,176,4,0,56,0,202,8,169,32,25,30,44,25,21,245,13
defb 0,0,111,102,102,115,101,244,1,191,34,67,111,110,110,101,99,116,105,110,103,46,46,46,34,59,1,159,32,30,184,11,32,32,32,32,32,32,32,32,32
defb 32,0,22,0,212,8,161,32,13,0,0,83,84,65,84,85,211,239,17,32,235,32,201,0,70,0,222,8,169,32,25,15,44,25,22,245,13,0,0,111,102
defb 102,115,101,244,1,191,34,69,114,114,111,114,58,82,101,116,114,121,40,49,41,32,111,114,32,73,110,115,101,114,116,32,110,101,119,32,72,111,115,116,32
defb 83,101,114,118,101,114,40,50,41,63,34,0,31,0,232,8,161,32,255,10,40,25,64,41,239,14,32,235,32,138,32,35,16,1,160,32,30,182,8,32,32
defb 32,0,38,0,242,8,161,32,255,10,40,25,65,41,239,14,32,235,32,138,32,35,16,1,138,32,35,17,1,160,32,30,152,8,32,32,32,32,32,0,10
defb 0,252,8,160,32,30,232,8,0,13,0,184,11,197,32,115,116,97,116,117,115,0,12,0,189,11,185,32,28,209,251,44,15,0,38,0,194,11,3,0,0
defb 225,239,34,65,84,43,67,73,80,83,84,65,84,85,83,34,1,159,32,30,176,4,32,32,32,32,32,32,32,32,0,11,0,204,11,13,0,0,201,239,15
defb 0,40,0,214,11,214,32,40,13,0,0,201,241,22,41,32,250,32,40,255,11,40,28,209,251,41,239,25,255,41,32,32,32,32,32,32,32,32,32,32,0
defb 38,0,224,11,13,0,0,193,239,255,11,40,28,208,251,41,1,13,0,0,201,239,13,0,0,201,244,15,32,32,32,32,32,32,32,32,32,0,6,0,234
defb 11,213,0,25,0,244,11,13,0,0,83,84,65,84,85,211,239,255,11,40,28,208,251,41,245,25,48,0,42,0,249,11,161,32,40,13,0,0,83,84,65
defb 84,85,211,241,16,41,32,252,32,40,13,0,0,115,116,97,116,117,243,238,19,41,32,235,32,30,189,11,0,6,0,254,11,201,0,18,0,160,15,13,0
defb 0,225,239,15,1,13,0,0,233,239,14,0,27,0,170,15,214,32,40,13,0,0,225,239,15,41,32,250,32,40,13,0,0,233,241,25,15,41,0,29,0
defb 180,15,13,0,0,225,239,255,11,40,28,209,251,41,1,13,0,0,233,239,13,0,0,233,244,15,0,6,0,190,15,213,0,6,0,200,15,201,0,46,0
defb 136,19,197,32,97,117,116,111,109,97,116,105,99,32,115,112,101,101,100,32,100,101,116,101,99,116,105,111,110,32,111,102,32,119,105,102,105,32,32,32,32
defb 32,32,0,21,0,146,19,185,32,28,209,251,44,15,32,32,32,32,32,32,32,32,32,0,19,0,156,19,3,0,0,225,239,34,65,84,34,32,32,32,32
defb 32,0,16,0,166,19,159,32,30,176,4,1,159,32,30,160,15,0,19,0,176,19,161,32,13,0,0,193,239,15,32,235,32,30,196,19,0,51,0,186,19
defb 13,0,0,225,239,255,11,40,28,208,251,41,1,161,32,13,0,0,225,239,25,65,32,252,32,13,0,0,225,239,25,13,32,252,32,13,0,0,225,239,25
defb 79,32,235,32,201,0,30,0,196,19,13,0,0,83,69,82,83,80,69,69,196,239,13,0,0,83,69,82,83,80,69,69,196,245,15,0,77,0,201,19,161
defb 32,13,0,0,83,69,82,83,80,69,69,196,239,23,32,235,32,185,32,28,209,251,44,13,0,0,67,85,82,83,80,69,69,196,1,191,34,78,79,32,87
defb 105,70,105,32,109,111,100,117,108,101,32,100,101,116,101,99,116,101,100,33,34,1,152,32,32,32,32,32,32,32,0,28,0,206,19,185,32,28,209,251,44
defb 13,0,0,115,101,114,115,112,101,101,228,1,160,32,30,146,19,0,0,0

This is actaully a method of passing Basic files through assembly code, and i'm using it in many other RSX commands!
The bytes transferred to &170 is the actual basic listing, and it's nothing more that the saved BAS file, without the first 128 bytes of header!  ;)
After that, you only need to set some variables in memory (the "patch_mems" section) , and you are ready!
And finally, the best part: the few bytes in the "run code" section, allows you to automatically run the inserted basic program, without giving "RUN" command!  ;)
It's only a few instructions:
Code: [Select]
ld c,0
ld hl,&ea92
call &001b

This,as small as it may seems, was rather tricky and hard to accomplish, as it required to intercept the "Run" command in basic rom at specific address (far call RST 3 to &ea92 of rom 0=Basic)!
And because i couldn't find a dissasmble code of CPC 464 BASIC 1.0 rom, this automation is only available for CPC 6128  :)

btw, here is all you need to know about creating your own rsx commands: http://cpctech.cpc-live.com/docs/manual/s158se09.pdf

« Last Edit: 00:06, 18 April 21 by ikonsgr »

Offline ikonsgr

  • 464 Plus
  • *****
  • Posts: 495
  • Country: gr
    • ikonsgr 80's Home Micros WorkBench
  • Liked: 508
  • Likes Given: 96
@SkulleateR , i made a simple windows app,in order to create the index.txt without needing writing a cli command, and added all (multi_dsk_manager.zip) to USIfAC II assets directory!. First post also updated to include a short description of new additions!  ;)

Offline issalig

  • CPC464
  • **
  • Posts: 38
  • Country: es
  • Liked: 19
  • Likes Given: 43
Well, after finishing setting up wifi module, you just give "LIST" at basic prompt, and you will get the BASIC listing!  :D
I thought about LIST but it seemed too obvious. :)

Thanks for the explanation, this is what I like from projects like USIFAC, learning from experts and sharing knowledge is priceless. I hope one day I will be able to develop an expansion card.


Offline kolleykibber

  • CPC464
  • **
  • Posts: 44
  • Country: gb
  • Liked: 37
  • Likes Given: 31
If anyones interested, I've gone down the rabbit hole of the strange world of the esp8266 and have flashed ESP-Link. I've connected the module to the uart connector instead of the wifi plug on the usifac. This gives the CPC a web server and I can telnet to it using the |ter and |com programs. It's all very exciting. I imagine Duke is using something like a customised version of esplink in the M4 board.


I can't connect the CPC to a shell yet. I've tried ncat -e and socat but the encoding appears to be bad. Any tips?



Offline ikonsgr

  • 464 Plus
  • *****
  • Posts: 495
  • Country: gr
    • ikonsgr 80's Home Micros WorkBench
  • Liked: 508
  • Likes Given: 96
@kolleykibber , How exactly you connect to this shell you mention?
Did you use |WIFI command?
Also take a look at user manual in Configure esp8266 module section, you will find a list of most useful commands for setting up module manually,use module as TCP server etc

Offline kolleykibber

  • CPC464
  • **
  • Posts: 44
  • Country: gb
  • Liked: 37
  • Likes Given: 31
Hi @ikonsgr ,


It's an alternative firmware  https://github.com/jeelabs/esp-link.


It provides a serial-wifi bridge. After flashing you connect your pc/mac directly to the module's ssid and then through web pages, connect to your local network. Then you can telnet directly to the ip address of the module and communicate over serial directly to the UART pins.


It can also be used to flash the microcontroller over wifi. There's examples for Arduino and ARM. I read something about updating a PIC bootloader to flash over the UART rather than ISCP, but I can't find it now..


I set the speed of the Usifac though your |set command and matched the speed of the esp though the admin web page. I was trying to get a reverse shell from osx using ncat/netcat/socat but I had no joy. I think it's a unix TERM issue.


Using


ncat IPADDRESS 23 -e /bin/sh


commands were sent from your |ter program but not recognised. I had no problems sending plain text each way.
« Last Edit: 02:42, 20 April 21 by kolleykibber »

Offline ikonsgr

  • 464 Plus
  • *****
  • Posts: 495
  • Country: gr
    • ikonsgr 80's Home Micros WorkBench
  • Liked: 508
  • Likes Given: 96
Since you can send/receive characters without problem, maybe commands need <CR>+<LF> at the end to be executed, just like AT commands.
I've added this kind of functionality on |TER terminal, by pressing <clr> key. So, before giving the ncat command, press clr,you will get <CR>+<LF>=ON message (this means that <CR>+<LF> will be also sent at the end of string), and then type the command, maybe this way it ill work.
« Last Edit: 09:36, 20 April 21 by ikonsgr »

Offline issalig

  • CPC464
  • **
  • Posts: 38
  • Country: es
  • Liked: 19
  • Likes Given: 43
Hi, I am trying Amstrad Diagnostics (https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/amstrad-diagnostics-rom/)
I think it would be nice to make it work and have it available under |DIAG command or similar (if there is still space on the PIC)

I attach the 2 files I have tested (built from last version https://github.com/llopis/amstrad-diagnostics ):
- If I try the bin file (|USB ,run "DIAG)  i get "Line too long"
- If I try the  dsk file   (|USB, |MG,"AMSTRA~1.DSK", |FDC, RUN "DIAG) it get a red screen that vanishes into blue and gets stacked while it should not.
I have contacted @llopis and he says this about the dsk execution "What you describe is the lower RAM test, which sounds like it runs through, but then it gets stuck maybe trying to page out lower ROM or something like that."
Any hint?
« Last Edit: 12:03, 20 April 21 by issalig »

Offline llopis

  • Supporter
  • CPC6128
  • *
  • Posts: 299
  • Country: es
    • Noel's Retro Lab
  • Liked: 183
  • Likes Given: 145
With a DSK build, the lower RAM test only works on the screen, so that shouldn't be it. I suspect the problem comes from paging ROMs in and out maybe?
Unfortunately I don't have one of those devices (hoping they become available soon again because I'd love to try it), but since you're building the diagnostics yourself, you can try narrowing down the problem by commenting out some of these calls:
https://github.com/llopis/amstrad-diagnostics/blob/main/src/SystemInfo.asm


Try doing it without the CalculateTotalUpperRAM call and without the DetectModel call and let me know which of those two fixes it. That should help quite a bit. Maybe there's something I can fix from my end to make it work then.
Thanks!


Offline issalig

  • CPC464
  • **
  • Posts: 38
  • Country: es
  • Liked: 19
  • Likes Given: 43
Thanks Noel, commenting out "call CalculateTotalUpperRAM" made it work  8) . (Pls, see attached DSK file without Upper RAM function)

Then checking Lower ROM works good until ROM5 which is the slot using USFIAC and it is filled with small yellow dots but we are on the good track.
« Last Edit: 23:44, 20 April 21 by issalig »

Offline ikonsgr

  • 464 Plus
  • *****
  • Posts: 495
  • Country: gr
    • ikonsgr 80's Home Micros WorkBench
  • Liked: 508
  • Likes Given: 96
Nice utility, but unfortunately the diag.bin inside dsk (i used |DSK command to copy image to a real disk and run it from floppy disk  ;D ), dosen't seem to work on my CPC 6128.
It gives the vanishing red pixels, one long beep, then 2 short beeps and then.... nothing. I tried it, with and without USIfACII connected, i got exactly the same behavior.

Offline issalig

  • CPC464
  • **
  • Posts: 38
  • Country: es
  • Liked: 19
  • Likes Given: 43
Have you tried the DSK without upper RAM (DIAGWOUR.DSK https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-iimake-your-pc-or-usb-stick-an-hdd-for-amstrad-access-dsk-and-many-more!/?action=dlattach;attach=34254 )  or the one in the first post?
Anyway, @ikonsgr how could USIFAC be enabled/disabled/detected?

I tried OUT &FBD1,30 in order to detect it but it gives me error.
« Last Edit: 20:02, 20 April 21 by issalig »

Offline ikonsgr

  • 464 Plus
  • *****
  • Posts: 495
  • Country: gr
    • ikonsgr 80's Home Micros WorkBench
  • Liked: 508
  • Likes Given: 96
Ok, DIAGWOUR.DSK loads program, but it crashes on rom checking when it goes where USIfAC II rom is (i got "Unknown" with red letters on Rom 5)
If you want to disable completely USIfAC board you can just select a rom number bigger the 15 for example: out &fbd2,16. This should set board's rom number to 16, so it will never initialized, thus it would be like board is not connected (and you will not get the USIfAC message on boot) :-)
As for detection, i think the "USIfAC II Enhanced" message on boot screen is quite straight forward :)
Finally, you can check the status of various functions with |STAT command, if all is "OFF", then it's like be in "Stand by" mode, only RSX commands are functioning (and if you want to disable it completely you can set rom number as i already told you).
« Last Edit: 19:22, 20 April 21 by ikonsgr »

Offline issalig

  • CPC464
  • **
  • Posts: 38
  • Country: es
  • Liked: 19
  • Likes Given: 43
Yes, Diagnostics fails when analising ROM5 which is USIFAC default and could probably be avoided disabling USIFAC with the command you provided.

Boot message is ok for human interaction but I was thinking a way of detecting USIFAC from code like reading an port address and get a status byte or some signature.Thus Diagnostics could detect USIFAC, disable it, perform ROM tests, and enable it again.

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 2.591
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
  • Liked: 1226
  • Likes Given: 2886
The problem is not the usifac, it's the test rom. it needs to be adapted.
http://futureos.de --> Get the revolutionary FutureOS (Recent update: 2021.01.24)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.05.24)

Offline llopis

  • Supporter
  • CPC6128
  • *
  • Posts: 299
  • Country: es
    • Noel's Retro Lab
  • Liked: 183
  • Likes Given: 145
Ok, DIAGWOUR.DSK loads program, but it crashes on rom checking when it goes where USIfAC II rom is (i got "Unknown" with red letters on Rom 5)
If you want to disable completely USIfAC board you can just select a rom number bigger the 15 for example: out &fbd2,16. This should set board's rom number to 16, so it will never initialized, thus it would be like board is not connected (and you will not get the USIfAC message on boot) :-)
Yes, that's not a problem that it says unknown. It says that about any ROM that is not one of the official system ROMs. The part I should try to fix is why it crashes when checking the upper RAM total. USIfAC doesn't add any RAM, right? That's really puzzling.


If nobody figures it out before and sends a fix, whenever I get my own USIfAC board I'll try to figure it out and see if I can modify the diagnostics ROM to work with it.

Offline ikonsgr

  • 464 Plus
  • *****
  • Posts: 495
  • Country: gr
    • ikonsgr 80's Home Micros WorkBench
  • Liked: 508
  • Likes Given: 96
Yes, Diagnostics fails when analising ROM5 which is USIFAC default and could probably be avoided disabling USIFAC with the command you provided.
Boot message is ok for human interaction but I was thinking a way of detecting USIFAC from code like reading an port address and get a status byte or some signature.Thus Diagnostics could detect USIFAC, disable it, perform ROM tests, and enable it again.

Ok, here is an "advance" trick,to find out if a USIfAC II board is installed (even if it doesn't show boot msg e.g. give a non initiliazed rom number):
 out &fbd1,30: if inp(&fbd0)=83 then print "USIfAC II board is installed" 
kids don't try it at home!  :laugh:

Btw,i tried what you proposed and it seems to work: if you give an out &fbd2,16, usifac is disabled (no program will find anything at rom 5  :) ) , but then you can change it back to rom 5 (by simply giving again out &fbd2,5) , and everything works again, without needing to reset or anything!  ;)
« Last Edit: 23:02, 20 April 21 by ikonsgr »