Modify CP/M Source files - TMS9918 + PS/2 Keyboard instead of Terminal

144 views
Skip to first unread message

Matheus Yan

unread,
Jun 25, 2024, 12:40:43 PM (4 days ago) Jun 25
to RC2014-Z80
Im trying to modify the CP/M 2.2 sources to use a TMS9918 and a PS/2 keyboard instead of a terminal. My big goal is to make my little computer full independent from my notebook and run it only by itself. But, to start, Im trying to recompile the PutSysPlus.asm from Small Computer Centrall with the Small Computer Workshop, this little program runs with the SCM and writhe the CP/M to the CF card. The point is that Im stuck because the SCW do not compile th PutSysPlus program thet it literally came with and any of the other compilers that I tested (Zasm, Sjamplus, Tniasm) work thit it (it uses much copiler instructions like #IF, #define, etc...)
Does anyone could give a way to do it or a better solution to modify the CP/M 2.2 files and put then on the CF card?
This is the error that I get when try to assemble, after that the programs close:
I also put here a image of the files that Im trying to modify. Pode ser uma imagem de texto
Pode ser uma imagem de texto Pode ser uma imagem de texto

Jonathan Harston

unread,
Jun 26, 2024, 12:13:19 PM (3 days ago) Jun 26
to RC2014-Z80
You shouldn't be trying to modify CP/M to access a different keyboard, you should be modifying the BIOS.

If you do a search for "z80 ps/2 keyboard" with your favourite search engine, you'll find loads of PS/2 keyboard driver sample code.

Matheus Yan

unread,
Jun 27, 2024, 3:01:35 PM (2 days ago) Jun 27
to RC2014-Z80
Yes, Im talking about modify the BIOS but to put on my computer I need to recompile the BIOS and the PutSysPlus, that includes the CPM hex files. From that, Withe the final file i use the SCM to tranfer it to my CF card

J.B. Langston

unread,
Jun 27, 2024, 8:48:09 PM (2 days ago) Jun 27
to RC2014-Z80
What are you using to interface the PS/2 keyboard? This is a serial interface that the Z80 will not be able to handle it directly. You might be able to bitbang it, but you would at least need a couple of mosfets to make the signals open drain. You would also need a pullup resistor. But it will probably be a lot easier if you try to do it on a microcontroller and interface that with the Z80 over a parallel bus.

Alan Cox

unread,
Jun 28, 2024, 8:02:56 AM (yesterday) Jun 28
to rc201...@googlegroups.com
On Fri, 28 Jun 2024 at 01:48, J.B. Langston <jb.la...@gmail.com> wrote:
>
> What are you using to interface the PS/2 keyboard? This is a serial interface that the Z80 will not be able to handle it directly. You might be able to bitbang it, but you would at least need a couple of mosfets to make the signals open drain. You would also need a pullup resistor. But it will probably be a lot easier if you try to do it on a microcontroller and interface that with the Z80 over a parallel

There are RC2014 cards for both bitbanging PS/2 and for using the
classic IBM PS/2 style (or clone) 40pin keyboard controller chip. Some
of the "use a modern micro to fake a terminal" boards also do
keyboard.

Alan

Matheus Yan

unread,
Jun 28, 2024, 10:08:57 AM (yesterday) Jun 28
to RC2014-Z80
At first time, I thought to use two 595 for convert the Serial to Parallel and interface it with the z80 to read all the 11 PS/2 Bits in two IO address, but, after some time, I realise that the SIO could be more useful to direct interact with the Serial PS/2. The Dr. Volt already done that but He used the not TX or Rx from DART, but CTSA and CTSB as Digital IO for that. I would like to adjust it to run on my SIO by the propely RxDB and RxCB in sincronous mode, as the A port is used to terminal interface. I want to avoid using uC or anything more powerful than the Z80 itself just for keyboard interface. I do not need to write anything to the Keyboard, just read the buttons is enought.

Matheus Yan

unread,
Jun 28, 2024, 10:26:14 AM (yesterday) Jun 28
to RC2014-Z80
Hello Alan, I already see some boards that uses ATMega328 to handle PS/2 interface and also act as a display processor to emulates a terminal on a RCA or VGA display. I would ike the already existing VDP board on my project to do it, despite it is not the better soluction, as can only display 40 characters for line, I would like to simulate make my little project full independent from micro controllers, FPGA, or anything more powerfull than the Z80. I dont think that is so difficult to modify the BIOS to direct interact with the TMS9918 and the PS/2 keyboard and its really necessary a terminal emulator to work.
Reply all
Reply to author
Forward
0 new messages