Hermes status

Nagging hardware related question? Post here!
User avatar
Pr0f
QL Wafer Drive
Posts: 1298
Joined: Thu Oct 12, 2017 9:54 am

Re: Hermes status

Post by Pr0f »

I agree with what Marcus said above (below) - there is no more optimisation to be had on the 8049 code or what that processor can offer.

If you were to look at producing a plug in replacement - then using a modern pic / atmel / intel / parallax propeller chip would be way to go - as these are still currently available, there are good tools to program them, and they can more than do what's needed.

for plug in compatibility you would need to replicate the protocol between the IPC and ZX8302 - but what you do inside your new IPC is entirely up to you.

If it is going to be a plug in replacement it MUST offer the following:

Produce sound - using the same parameters that the current IPC uses and offering as close to the same output as the original (frequencies, periods, and the effects)
Provide serial reception upto 19200 baud on the 2 serial channels
Provide a complete keyboard scan with rollover / buffering
Provide a keyrow scan
(I haven't included the infamous CTRL ALT 7 feature - as it doesn't really work well with a stock QL, but that could be implemented if wished for)

Offering any facilities over and above to match what Hermes / SuperHermes does is optional - but may well be a good idea - the syntax and specifications of the additional features are published - how it is done is somewhat irrelevant if you are writing your own replacement - just assume it is like an API and code to that requirement.

useful additions then would be

Key combo to turn key click on and off
Additional fast serial port
More slower serial ports (not sure if these were also bidirectional or not)
Non volatile storage for config and startup parameters


If you wanted to go further and move away from plug compatibility:

You could implement an extended IPC protocol - perhaps moving to 8 bit serial transfer or a shared memory area - all accesses to it should be through the mt.ipcom trap
Possibility of multidrop IPC's that sit on that bus - both of these two ideas may well require moving this function away from the ZX8302 - although it may be possible to bit bang it beyond the current 4 bit system, but the current devices make this interface slow


User avatar
Ruptor
Gold Card
Posts: 418
Joined: Fri Dec 20, 2019 2:23 pm
Location: London

Re: Hermes status

Post by Ruptor »

Silvester wrote:Here is my take on the original IPC code. I haven't reviewed it yet so be interested to hear if anything doesn't seem correct.
This confuses me is ipc_asm.zip the same original code as ipc8049.txt? That makes the code Hermes_2.zip PrOf posted the only disassembled Hermes code anywhere.
The ipc8049.txt code is an output listing with opcodes, comments and information at the bottom all about the chip, pins and ports usage etc.
Pr0f wrote:If it is going to be a plug in replacement it MUST offer the following:
Produce sound - using the same parameters that the current IPC uses and offering as close to the same output as the original (frequencies, periods, and the effects)
Provide serial reception upto 19200 baud on the 2 serial channels
Provide a complete keyboard scan with rollover / buffering
Provide a keyrow scan
(I haven't included the infamous CTRL ALT 7 feature - as it doesn't really work well with a stock QL, but that could be implemented if wished for)
Yes that is what I envisaged as being done in 'C' on a modern processor for the first stage that could encompass more later.


Silvester
Gold Card
Posts: 436
Joined: Thu Dec 12, 2013 10:14 am
Location: UK

Re: Hermes status

Post by Silvester »

Ruptor wrote:I am confused isn't it better to work on the disassembly PrOf has posted since that is Hermes and all the other stuff is old crap as well as this being an up date on the status of Hermes?)
At the time I did the disassembly of original IPC code (2019) I'd already assumed by then Hermes would probably never be released. Also I was curious how it was implemented and wanted to add some things (nothing than tinker with).

Now I know a lot more of how the IPC function was originally implemented on the 8048 I think it makes it easier to face the Hermes binary (also I more understand 8048 CPU). Minerva was derived/compatible to QDOS so I hazard to guess Hermes may have traits of original IPC.

With no disrespect intended, the thought of something coded in 'C' disinterests me greatly (like TT).


David
Silvester
Gold Card
Posts: 436
Joined: Thu Dec 12, 2013 10:14 am
Location: UK

Re: Hermes status

Post by Silvester »

Ruptor wrote:This confuses me is ipc_asm.zip the same original code as ipc8049.txt?
Yes, but only if you just want a list of opcodes and don't find meaningful comments useful, then no, I guess the're the same. Though data blocks/function may be misconstrued.
Ruptor wrote: That makes the code Hermes_2.zip PrOf posted the only disassembled Hermes code anywhere.
At the moment...


David
User avatar
Pr0f
QL Wafer Drive
Posts: 1298
Joined: Thu Oct 12, 2017 9:54 am

Re: Hermes status

Post by Pr0f »

I am more than happy for folks to take my disassembly of Hermes and add to it / correct it if need be / expand on the comments - it's by no means finished work - but given that Hermes has become open but the original source is not yet available - I thought it might be helpful to anyone looking at it.

For my own project I plan on writing up the basic program flow as "PDL" - a kind of English like language that described general program flow - I used this for my PIC projects - and it helps to include it as a comment file or comments in line so that anyone looking at your assembly later isn't lost in how the over all program works - including yourself when you go back to it a year or two later ;-) It is then that much easier to port the functionality to anywhere you want.

My DIY project doesn't use the ZX8302 at all - it's replaced by 68901 and a quad UART chip for the serial ports - no attempt will be made to implement any serial ports in the IPC, and the serial port in the 68901 will form the new comms channel to the IPC replacement - it will initially only handle keyboard and sound, with ps/2 keyboard support, and will take over NET support eventually - although I will provide a bit bang port to keep existing code happy and provide the same physical network interface that's there currently. The RTC function will be provided by a dedicated RTC chip and oscillator that will be located at the same address for read and an alternate address for write (so you can set it). Bye bye ZX8302.

I chose the 68901 because I have vhdl code for it - so it can be implemented in an FPGA if required (along with the video)


User avatar
Ruptor
Gold Card
Posts: 418
Joined: Fri Dec 20, 2019 2:23 pm
Location: London

Re: Hermes status

Post by Ruptor »

Silvester wrote:
Ruptor wrote:With no disrespect intended, the thought of something coded in 'C' disinterests me greatly (like TT).
Err what is TT? I hate 'C'rap & especially C++ lots more of the same but having worked for three different firms on 6800, 8051, and PICs writing thousands of lines of assembler using EPROMs to debug, no simulators back then, the stuff 'C' was a game changer. Pascal is my favourite. Thanks for straightening out my confusion.


User avatar
Ruptor
Gold Card
Posts: 418
Joined: Fri Dec 20, 2019 2:23 pm
Location: London

Re: Hermes status

Post by Ruptor »

Pr0f wrote:My DIY project doesn't use the ZX8302 at all - it's replaced by 68901 and a quad UART chip for the serial ports
How long will it take? It sounds complicated.


User avatar
Pr0f
QL Wafer Drive
Posts: 1298
Joined: Thu Oct 12, 2017 9:54 am

Re: Hermes status

Post by Pr0f »

As long as it does - being a DIY project and not motivated by finance or any other considerations - it often gets put on a back burner - I have plugged in various vero board funnies into a somewhat butchered QL board, tested out ideas. Tested serial port based on a DUART chip that ran well and reliably at 38,400 - and acquired all the parts I think I need - finalising some sort of design is the next stage after the video functionality is properly tested, then form there a PCB and a prototype donkey - the only requirement is it fits in the old black box. The address decoding and multi IDE interface are working in simulation, a prototype of the multi ide will be used with aurora / SGC clone to test it's viability.

Apologies for going off topic


Silvester
Gold Card
Posts: 436
Joined: Thu Dec 12, 2013 10:14 am
Location: UK

Re: Hermes status

Post by Silvester »

Ruptor wrote:[Err what is TT?
Tony Tebby, author of QDOS and SMSQ/E.


David
Derek_Stewart
Font of All Knowledge
Posts: 3928
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Hermes status

Post by Derek_Stewart »

Hi,

I have justbreslised there are 2 types of 8749 MCU:

Intel D8749
Intel 8749_datasheet.pdf
Intel D8749
(627.85 KiB) Downloaded 110 times
NEC uPD8749
Intel 8749_datasheet.pdf
Intel D8749
(627.85 KiB) Downloaded 110 times
Which the datasheets indicate the 2 chips are identical.

I have programmed with a HiLo Stems ALL03A programmer, the Intel abd NEC chip, which programmed correctly and the QL fuctioned as expected.

The QL will work with either the Intel or NEC chip, does the choice of chip matter for the Hermes code?
Attachments
NECuPD8749.pdf
NECuPD8749
(896.93 KiB) Downloaded 62 times


Regards,

Derek
Post Reply