Hermes status

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

Re: Hermes status

Post by Pr0f »

Ruptor wrote:
Pr0f wrote:ok - so this is incomplete - and may have inaccuricies in it - the idea would be to build upon it...
Just to clarify Hermes is on 8749 but this code says "CPU: Intel 8049 (MCS-48 family)" so is Hermes on the 8049 as well?
Oh! I guess the 80 is ROM and 87 is EEPROM. :oops:
The obvious path for a replacement seems to be the modern 8051 flash units but it might be easier to convert the code to 'C' for an upgrade that could be maintained by anyone.
Yes - 8749 is just an eprom version of the 8049 - and confusingly there is also a piggy back version 8750 (which I have) that has a 28 pin socket built onto a ceramic chip containing the processor - odd beast - but meant to allow more rapid turnaround on development.

I believe there was also a ROMLESS version - the 8039 - which requires an external ROM to work - the Falkengberg keyboard interface had one of these on it I think


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

Re: Hermes status

Post by Derek_Stewart »

Silvester wrote:Thanks Prof and Derek for uploads.

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.
I must say that you have done really good job on the disassembley.

To assemble the source code, would ASM48 v0.41, be okay, downloadable from Github at:
https://github.com/daveho/asm48


Regards,

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

Re: Hermes status

Post by Silvester »

Thanks, it made my head hurt for a while afterwards :)

This is where I got it from : http://sourceforge.net/project/showfile ... p_id=72293


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

Re: Hermes status

Post by Derek_Stewart »

Silvester wrote:Thanks, it made my head hurt for a while afterwards :)

This is where I got it from : http://sourceforge.net/project/showfile ... p_id=72293
Hi David

It looks the same files as on Github.

I will give a go and assemble the code and try programme a Hermes chip.

Iam waiting for some 8749 chips to arrive.


Regards,

Derek
User avatar
klausfrank
Chuggy Microdrive
Posts: 61
Joined: Wed Jan 26, 2011 10:47 am
Location: Silkeborg, Denmark

Re: Hermes status

Post by klausfrank »

- and they are posted and on their way.
Regards


User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: Hermes status

Post by mk79 »

That disassembly is from the original IPC, not Hermes. But in any case, well done, that looks quite extensive. Wish I had this a long time ago ;-)

At one point I sunk a lot of time into implementing the IPC sound as well as possible in QPC, but eventually gave up when I realized that part of the random number generator relied on an uninitialized register, very hard if not impossible to emulate accurately.


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

Re: Hermes status

Post by Pr0f »

The bits I still have not fathomed out completely:

How sound and serial work together in the state machine - I can see where we turn the speaker on and off - but it's getting to that bit from the rather wonderful and complex state machine - I did wonder if I had the time and patience to map that all out in a big flow chart - but that's a long exercise!!

How the sound parameters are consumed and used to drive the state machine - I concentrated on the serial side - as that was of the most immediate interest to me - since Intel's own notes on implementing serial on the MCS48 suggest only 4800 baud is possible - clearly not as we all know.

What those odd jump tables or data tables are that I still haven't fully back referenced.



As an experiment - I did assemble that code using an MCS48 assembler I found online - it may be the one you found - it's command line only - and it generated a binary file that had the same checksum and passed a fc /b in DOS as a perfect match - but I didn't try blowing that image into a chip to see if it actually worked - that would be the logical next step.

I have to say it's a wonderful bit of code and some really clever table indexing techniques to reduce code size and improve speed here and there - this is an MCS48 driven to it's limits - probably why the superhermes was implemented as a 16 bit pic


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

Re: Hermes status

Post by Pr0f »

This was the piggy back version I found on ebay:

https://www.cpushack.com/2011/03/06/cpu ... back-cpus/


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

Re: Hermes status

Post by Ruptor »

mk79 wrote:That disassembly is from the original IPC, not Hermes. But in any case, well done, that looks quite extensive. Wish I had this a long time ago ;-)
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?
If an optimiser was used on the Hermes code to squeeze more in to the chip it will be impossible to decipher. Just one level of optimisation of a 'C' compiler on PIC makes it impossible to follow let alone the other four levels that are available. The simple optimisers identify blocks of identical and delete lots of blocks using just one block by indexed jumps and that is enough to lose total understanding. It is quicker to write a new IPC in 'C' than decipher the old one with all the obvious advantages. :)


User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: Hermes status

Post by mk79 »

Ruptor wrote:
mk79 wrote:That disassembly is from the original IPC, not Hermes. But in any case, well done, that looks quite extensive. Wish I had this a long time ago ;-)
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?
As opposed to what? I just see people sharing existing work and I really like the extensive nature of the IPC disassembly. I know from personal experience how difficult this is. Hadn't seen the Hermes one yet, but I see this is also a good effort. I still hope the original source code is sometime recovered because the true gold usually is in Laus's comments.
If an optimiser was used on the Hermes code to squeeze more in to the chip it will be impossible to decipher.
The optimizer is called "Lau". This is all assembly code, there is no optimization stage beyond the programmer. Besides, 8049 assembler does not need any further obfuscation, I think it's quite unreadable as-is.
It is quicker to write a new IPC in 'C' than decipher the old one with all the obvious advantages. :)
You cannot write 8049 code in C. But for a possible "SuperDuperHermes" on a modern chip I would also not advocate writing it in assembler...


Post Reply