Post Reply 
Saturn Emulator
11-09-2019, 07:21 PM (This post was last modified: 11-11-2019 10:22 PM by sunhp.)
Post: #1
Saturn Emulator
Just wondering if Prime could run SATURN CPU emulator just like HP50G does ?

Source : https://www.hpmuseum.org/cgi-sys/cgiwrap...ead=124202
Visit this user's website Find all posts by this user
Quote this message in a reply
11-12-2019, 06:08 AM
Post: #2
RE: Saturn Emulator
Hello,

The HW is definitely powerfull enough to do so...

HPP is most likely too slow to do it at a speed close to what is needed :-( especially as it does not have anything that can simulate the memory while being fast...

Bit it would be interesting to think about what 4 or 5 instructions would be useful to speed things up significantly... and make it possible...

the 50G has around 2MB of ram space, which would easely fit in Prime (G2), so it should be more or less possible.
The main issue as far as I can tell is memory access (nibble read/write access) and nibble wise manipulations (in HEW and DCB)...

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
11-12-2019, 08:07 PM
Post: #3
RE: Saturn Emulator
(11-12-2019 06:08 AM)cyrille de brébisson Wrote:  Hello,

The HW is definitely powerfull enough to do so...

HPP is most likely too slow to do it at a speed close to what is needed :-( especially as it does not have anything that can simulate the memory while being fast...

Bit it would be interesting to think about what 4 or 5 instructions would be useful to speed things up significantly... and make it possible...

the 50G has around 2MB of ram space, which would easely fit in Prime (G2), so it should be more or less possible.
The main issue as far as I can tell is memory access (nibble read/write access) and nibble wise manipulations (in HEW and DCB)...

Cyrille

What if you waste memory by storing each nibble into a byte?
Find all posts by this user
Quote this message in a reply
11-13-2019, 06:09 AM
Post: #4
RE: Saturn Emulator
hello,

That helps the read/write, BUT, it means that each nibble has to be handled individually instead of being able to be handled as packs.

For example, if you work with "packed" nibbles, you can describe 1 register as 1 64 bit integer (and use masks), so any saturn binary operation can be done in basically 1 PPL line as in: A:= (A and not mask) OR ((A and mask) + (B and mask));
regardless of the field...

Working nibble by nibbles means loops, which are much less efficient...

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
11-13-2019, 06:40 AM (This post was last modified: 11-13-2019 09:36 AM by CyberAngel.)
Post: #5
RE: Saturn Emulator
(11-13-2019 06:09 AM)cyrille de brébisson Wrote:  hello,

That helps the read/write, BUT, it means that each nibble has to be handled individually instead of being able to be handled as packs.

For example, if you work with "packed" nibbles, you can describe 1 register as 1 64 bit integer (and use masks), so any saturn binary operation can be done in basically 1 PPL line as in: A:= (A and not mask) OR ((A and mask) + (B and mask));
regardless of the field...

Working nibble by nibbles means loops, which are much less efficient...

Cyrille
I C... masks are easy... thus:
It looks like every odd nibble read (ARM read is in bytes) has to be in a buffer
in order to combine it with "upper" 4 bits of the unaltered Saturn information
producing an even number of nibbles (= a byte).
Every odd nibble write needs first a read into a buffer before the write
to yet again combine the just read upper part of the byte with the 4 bits of that odd nibble
to get a full byte to be written.

Was that an explanation that others in this group can understand?

Is that how you did it with the HP 49/50 ARM version, Cyrille?
Find all posts by this user
Quote this message in a reply
11-13-2019, 09:31 AM (This post was last modified: 11-13-2019 09:35 AM by sunhp.)
Post: #6
RE: Saturn Emulator
Thank you Cyrille for the informations, this is very interesting I like it !
Long life HP calcs !
Julien
Visit this user's website Find all posts by this user
Quote this message in a reply
Yesterday, 06:51 AM
Post: #7
RE: Saturn Emulator
Hello,

Working with packed nibbles is faster because masks and the like help a lot with all the ASM operations... speeding them up tremendously...

It does make memory access more difficult, BUT in real life, I discovered (stats) that only a relatively small % of the instructions were memory access... so it is OK to take a penalty there...

One exception of course is the reading of instructions for execution, BUT this is a known linear process, so you can manage have a shifting buffer that will do rom read only every 8 nibbles or so to speed this up...

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
Yesterday, 10:15 AM
Post: #8
RE: Saturn Emulator
(Yesterday 06:51 AM)cyrille de brébisson Wrote:  Hello,

Working with packed nibbles is faster because masks and the like help a lot with all the ASM operations... speeding them up tremendously...

It does make memory access more difficult, BUT in real life, I discovered (stats) that only a relatively small % of the instructions were memory access... so it is OK to take a penalty there...

One exception of course is the reading of instructions for execution, BUT this is a known linear process, so you can manage have a shifting buffer that will do rom read only every 8 nibbles or so to speed this up...

Cyrille
So...we will soon have a HP 50G+ Emulator running on the G2 hardware?
Even a small, even fee seems reasonable (10 USD? - 9 would be odd)

VPN
Find all posts by this user
Quote this message in a reply
Yesterday, 02:47 PM
Post: #9
RE: Saturn Emulator
(Yesterday 10:15 AM)CyberAngel Wrote:  So...we will soon have a HP 50G+ Emulator running on the G2 hardware?
Even a small, even fee seems reasonable (10 USD? - 9 would be odd)

Odd, yes, but it wouldn't be Prime...

There are only 10 types of people in this world. Those who understand binary and those who don't.
Find all posts by this user
Quote this message in a reply
Yesterday, 06:57 PM
Post: #10
RE: Saturn Emulator
(Yesterday 02:47 PM)grsbanks Wrote:  
(Yesterday 10:15 AM)CyberAngel Wrote:  So...we will soon have a HP 50G+ Emulator running on the G2 hardware?
Even a small, even fee seems reasonable (10 USD? - 9 would be odd)

Odd, yes, but it wouldn't be Prime...

Then the price of that software should be even 2 USD
since 2 is - odd enough - the only even prime.
On the other hand - that software emulates HP 50g - shouldn't it cost 50 USD
Find all posts by this user
Quote this message in a reply
Yesterday, 11:24 PM
Post: #11
RE: Saturn Emulator
(Yesterday 02:47 PM)grsbanks Wrote:  
(Yesterday 10:15 AM)CyberAngel Wrote:  So...we will soon have a HP 50G+ Emulator running on the G2 hardware?
Even a small, even fee seems reasonable (10 USD? - 9 would be odd)

Odd, yes, but it wouldn't be Prime...

Ba-dump-bump! Ouch...

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
Today, 04:41 AM (This post was last modified: Today 04:42 AM by Wes Loewer.)
Post: #12
RE: Saturn Emulator
Quote:So...we will soon have a HP 50G+ Emulator running on the G2 hardware

How would the vastly different keyboards be handled?
Find all posts by this user
Quote this message in a reply
Today, 06:05 AM
Post: #13
RE: Saturn Emulator
Technically, it is feasible... especially on G2.
Doing it in native C would be best of course, but means that Tim or I have to do it as it needs to be build in rom... and we are time limited...

Doing it in PPL would be much slower, but means that others can work on it. We could include some helper PPL functions to help speed things up (a little bit like what I did with the triangle/lines function used by Han's 3D graphing app)... But these functions would need to be well defined in advance...

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: Ernesto_R, 4 Guest(s)