27C400 EPROM emulators (beta) issue D technical discussion

General discussions or ideas about hardware.
User avatar
PaulJ
Posts: 1568
Joined: Sun Apr 08, 2018 1:14 am
Location: USA

Re: 27C400 EPROM emulators (beta) issue D technical discussion

Post by PaulJ »

Here's the setup I use. The "Echo Typed Characters" is basically half duplex because the Emu27c400 doesn't echo received characters so when you do a partial burn you don't see what you enter unless the terminal is in half duplex.
Serial7.jpg
Serial7.jpg (47.44 KiB) Viewed 6520 times
When you program a Slot this is what it looks like.
Connected

hi - firmware info
p - program
r - program & verify
v - verify
y - copy
e - erase
f - chip erase
c - CRC32
w - switch ROM
9 - override SP GPIO
0 - override R GPIO
x - use intel HEX
o - option menu
s - service menu
a - advanced program menu
h - help

pCommand: program 27C200 (256KB)
Slot? 0-7
7Size? 1=128KB? 2=256KB
2Byte swap? y/n
yslot 7, filesize 262144, byteswap 1
Erase, done
Address=1c0000,1fffff
Send binary
262144/262144
Took 3.436s

OK
---------------------------------------------------------------------------------------
After you answer the questions you need to send the file. Use "Send File" in the menu.
Serial5.jpg
Serial5.jpg (17.93 KiB) Viewed 6520 times
Make sure you use the Binary (raw) transfer protocol.
Serial6.jpg
Serial6.jpg (85.24 KiB) Viewed 6520 times
If all works right you should see 262144/262144" if all occurred correctly and you sent a file of the slot size. If you do a partial burn its done out of the advanced menu and everything is specified. Let me know if you need an example.

----------------------------------------------------------------------------------------

When you start serial after the Emu27c400 is connected you should see something similar to the next photo. The Emu will be the highlighted line with your sn being something else I would assume.

If you hit the o option from the main menu I use this setup which is for 256k 16 bit eprom in an Atari.


o >option menu
A17 A18 A19
pull-up y y y
enable y y y
ROM size 27C200 256KB
intial ROM 2
autosave initial n
ROM switch pullup n
SP pin mode 0

Good luck!
Attachments
Serial3.jpg
Serial3.jpg (39.32 KiB) Viewed 6520 times
cmorley
Posts: 291
Joined: Tue May 28, 2019 5:46 pm

Re: 27C400 EPROM emulators (beta) issue D technical discussion

Post by cmorley »

Useful write up, thanks PaulJ.

VCP identifiers:
There is a hidden option in the options menu. Press F and it will uses a constant VCP identifier. Otherwise it creates the ID from the STM32 UUID (unique).

Constant ID is useful for me as every module I test or program always appears as the same COM port on the PC.
User avatar
simon.wilkie
Posts: 4
Joined: Mon May 25, 2020 2:05 pm

Re: 27C400 EPROM emulators (beta) issue D technical discussion

Post by simon.wilkie »

Thank you SO much for this breakdown! Incredibly helpful of you. I have received my pair of series D and i'll be following this guide to flash ASAP. :!: :D
nivrig
Posts: 16
Joined: Mon Jul 26, 2021 3:42 pm

Re: 27C400 EPROM emulators (beta) issue D technical discussion

Post by nivrig »

Has anyone had any luck programming images on macOS using pySerial or minicom?

I can connect to the emulator board via USB using minicom and navigate around the menu system, but when it comes to "Send file" it just hangs. I've tried x/y/zmodem in minicom as well as /bin/cat binary upload with the same result. pySerial is similar - it gets to "Send file" and hangs. On the same mac, SmarTTY in Windows 10 in VMWare can program images sucessfully so it looks like something on the mac side.

I'm not keen on dropping £40 on Serial app TBH, and my ultimate goal is to automate programming via a makefile and I'm not sure thats even possible with Serial.

info output:

Code: Select all

****************************************************************
BooBip 27C200/400/800/160 EPROM emulator & ROM switcher
www.BooBip.com

Device          18.011 issue C/D
STM32 firmware  0.9 (C)2021 Chris Morley
CPLD firmware   0.10 (C)2020 Chris Morley
Firmware CRC    9dabc55d
STM32 id        dev=0x445, rev=0x1000
STM32 uid       00100009 4e534301 20393130
CPLD id         mfg=0x06e, dev=0x20a5, rev=0
FLASH id        mfg=1, dev=0xc4
EPROM type      27C400 (512KB)
ROM selected    0

Acknowledgements
Clifford Wolf. Lib(X)SVF:
  A library for implementing SVF and XSVF JTAG players.
  http://www.clifford.at/libxsvf/

OK
User avatar
PaulJ
Posts: 1568
Joined: Sun Apr 08, 2018 1:14 am
Location: USA

Re: 27C400 EPROM emulators (beta) issue D technical discussion

Post by PaulJ »

nivrig wrote: Mon Jul 26, 2021 3:51 pm Has anyone had any luck programming images on macOS using pySerial or minicom?

I can connect to the emulator board via USB using minicom and navigate around the menu system, but when it comes to "Send file" it just hangs. I've tried x/y/zmodem in minicom as well as /bin/cat binary upload with the same result. pySerial is similar - it gets to "Send file" and hangs. On the same mac, SmarTTY in Windows 10 in VMWare can program images sucessfully so it looks like something on the mac side.

I'm not keen on dropping £40 on Serial app TBH, and my ultimate goal is to automate programming via a makefile and I'm not sure thats even possible with Serial.
You just send it with no protocol. Its hanging because its waiting for a successful block transfer answer. You should be able to send it with nothing connected to the serial port.. If the serial program you're using has a text mode 8n1 use that. Even the binary transfer mode expects ack's and will hang. If you put the emulator in the receive mode you I suspect you could even go to a console window and cat the file out. Let us know how you make out.
cmorley
Posts: 291
Joined: Tue May 28, 2019 5:46 pm

Re: 27C400 EPROM emulators (beta) issue D technical discussion

Post by cmorley »

ooo... seems the modules survive insertion 180 degree rotated in an A1200 without :fire: :yay:
nivrig
Posts: 16
Joined: Mon Jul 26, 2021 3:42 pm

Re: 27C400 EPROM emulators (beta) issue D technical discussion

Post by nivrig »

PaulJ wrote: Mon Jul 26, 2021 5:46 pmYou just send it with no protocol. Its hanging because its waiting for a successful block transfer answer. You should be able to send it with nothing connected to the serial port.. If the serial program you're using has a text mode 8n1 use that. Even the binary transfer mode expects ack's and will hang. If you put the emulator in the receive mode you I suspect you could even go to a console window and cat the file out. Let us know how you make out.
Finally circling back to this :roll:

Using pyserial, 115200 8N1, I was finally able to get a sucessful program by writing the data in 32 byte chunks instead of a single 'ser.write(bytearray)' statement.

The following example upload loop prints the '258048/262144' style counter received from the emulator, and subsequent code shows the "OK" output received as well. Using 64 byte chunks or larger hang as before. Using macOS 'screen' and 'cat' didn't work either, FWIW.

Code: Select all

	ser = serial.Serial('/dev/tty.usbmodem204931394E531', baudrate=115200, timeout=10)
	...
        write_len = 0
        while write_len < image_len:
            ser.write(image_bytes[write_len:write_len+32])
            write_len += 32
            if ser.in_waiting > 0:
                print(ser.read(ser.in_waiting))
            ser.flush()
I don't know why the chunking works though...
User avatar
PaulJ
Posts: 1568
Joined: Sun Apr 08, 2018 1:14 am
Location: USA

Re: 27C400 EPROM emulators (beta) issue D technical discussion

Post by PaulJ »

nivrig wrote: Fri Sep 17, 2021 1:23 pm
Using pyserial, 115200 8N1, I was finally able to get a sucessful program by writing the data in 32 byte chunks instead of a single 'ser.write(bytearray)' statement.

I don't know why the chunking works though...
I would guess that 115200 is too fast for the emulator. I'm not sure how @cmorley handles incoming data but at 9600 8N1 I just tell the terminal program to send it and it's a one stroke operation that takes about 15 seconds as I recall. If you want to run the serial link that fast it may work if you connect up hardware handshake if the emulator supports it. By the way I use the serial app which works very well for all serial needs on the mini M1.
cmorley
Posts: 291
Joined: Tue May 28, 2019 5:46 pm

Re: 27C400 EPROM emulators (beta) issue D technical discussion

Post by cmorley »

Baud is irrelevant because it is USB and not converted to serial (RS232/RS485 etc) at any point.

Baud in terminal programs often changes TX/RX buffer sizes in the programs which can appear to help... but if you're tinkering with that to improve things then the terminal program is no good for USB.
cmorley
Posts: 291
Joined: Tue May 28, 2019 5:46 pm

Re: 27C400 EPROM emulators (beta) issue D technical discussion

Post by cmorley »

nivrig wrote: Fri Sep 17, 2021 1:23 pm I don't know why the chunking works though...
Not sure... Keir just sends it in one send call in his python script. I imagine you are deadlocking on the serial read for some reason... or perhaps you are writing to the serial in ASCII instead of binary.
https://github.com/keirf/Amiga-Stuff/bl ... /boobip.py
Post Reply

Return to “HARDWARE DISCUSSIONS”