Odd problem with Pi Zero Serial adapter

368 views
Skip to first unread message

James Sternberg

unread,
Aug 20, 2017, 2:46:45 PM8/20/17
to RC2014-Z80
Hello!  I just recently completed an rc2014 build with a backplane pro, pageable ROM, 64K ram, CF adapter, standard serial adapter and the Pi Zero module.  It works perfectly, running CP/M when hooked to a serial port with a terminal, but I get odd behavior with the Pi Zero module.  It *almost* works perfectly, but if I take a directory of file, it only lists the first one.  Without the module, it lists all files perfectly.  It is also getting the full 80 columns, so that does not seem to be the problem.  If this was a UNIX system I would say that it is a simple mismatch between the expected terminal type and the real terminal type and I would set the TERM environment variable.  I am not sure of what to do in this case, though.  Here is a picture of me listing out the files for user 0 on the B drive (showing only one file) and then running Zork 3 (which is there, but doesn't list out).  Any ideas of what is causing this?


Peter Fielden-Weston

unread,
Aug 20, 2017, 4:59:09 PM8/20/17
to RC2014-Z80
James,

I had a very similar thing happen a while ago. In CP/M running DIR would only list one file. I could run any program on that drive though. I haven't fixed it, the problem vanished and hasn't (yet) reappeared.

Peter

James Sternberg

unread,
Aug 20, 2017, 8:58:49 PM8/20/17
to RC2014-Z80
Do you remember doing anything that might have made the problem vanish?

PianoMatt

unread,
Aug 21, 2017, 12:19:57 AM8/21/17
to RC2014-Z80
It's because the Pi terminal sends carriage return and line feed at the end of a line. I had to recompile PiGFX to stop it doing that (just set that particular #define to off in the configuration file). That ended up breaking MBASIC though since I think that expects both, although it does work using teraterm using just CR so I'm not sure...

Peter Fielden-Weston

unread,
Aug 21, 2017, 12:44:13 PM8/21/17
to RC2014-Z80
DAMN!

I sacrificed two goats to try and fix that.

Damndamndamndamndamndamndamn.


Peter

PianoMatt

unread,
Aug 24, 2017, 7:19:06 AM8/24/17
to RC2014-Z80
I'm not able to test this theory since I'm working away at the moment, but I think that using the configuration option to disable CR+LF just sends LF, which breaks MBASIC. Is anyonbe able to teat this? Better yet, is Filippo around?

PianoMatt

PianoMatt

unread,
Aug 24, 2017, 4:22:43 PM8/24/17
to RC2014-Z80

Called it!

Right, now how to fix it. To the source code...

PianoMatt

unread,
Aug 24, 2017, 5:15:00 PM8/24/17
to RC2014-Z80
Right, I've bodged something together. Basically in the config file I've added a new #define called "SEND_CR_ONLY", and in pigfx.c I've added an if statement to the keypress handler function that looks for ASCII character 10 (LF) and replaces it with 13 (CR).

If you want to get it working on your own Pi then just replace the two files above in the source and make, or just drag the kernel.img file onto an SD.

I've tested it with DIR, ZAP and a few different MBASIC programs and it seems to work fine for me. Your mileage may vary. There's probably a better solution that doesn't completely stop it from sending LF characters, but this is good enough for me for now.

PianoMatt
kernel.img
pigfx.c
pigfx_config.h

James Sternberg

unread,
Aug 25, 2017, 8:12:04 AM8/25/17
to RC2014-Z80
Thanks!  That saves me from having to install a cross-compiler toolchain onto my computer.

James Sternberg

Spencer Owen

unread,
Aug 25, 2017, 8:42:25 AM8/25/17
to rc201...@googlegroups.com
Excellent, thanks PainoMatt!

I've not had a chance to test it myself yet, but assuming it does what you say (I'm sure it does!), would you mind if I uploaded your files to the RC2014 GitHub so it's easier for others to find?

Cheers

Spencer

--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+unsubscribe@googlegroups.com.
To post to this group, send email to rc201...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rc2014-z80/0e89ee77-6c4d-4caa-9b22-3f3334bb6346%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

PianoMatt

unread,
Aug 25, 2017, 8:54:56 AM8/25/17
to RC2014-Z80
Absolutely, go for it. kernel.img for all!


On Friday, 25 August 2017 13:42:25 UTC+1, Spencer Owen wrote:
Excellent, thanks PainoMatt!

I've not had a chance to test it myself yet, but assuming it does what you say (I'm sure it does!), would you mind if I uploaded your files to the RC2014 GitHub so it's easier for others to find?

Cheers

Spencer

Peter Willard

unread,
Aug 27, 2017, 12:23:37 PM8/27/17
to RC2014-Z80
 :(   I only get the rainbow screen

PianoMatt

unread,
Aug 27, 2017, 3:16:28 PM8/27/17
to RC2014-Z80

What files have you got on the SD card?
Reply all
Reply to author
Forward
0 new messages