HP Forums
48G Re-creation Project (fantasy) - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: 48G Re-creation Project (fantasy) (/thread-13863.html)

Pages: 1 2 3 4


RE: 48G Re-creation Project (fantasy) - EugeneNine - 11-11-2019 11:49 PM

looking at the emy48 source it appears to have been developed on windows which usually makes porting to something else harder.
I know the x48 code will work on ARM so I'd suggest starting with an ARM MCU such as the mso432 http://www.ti.com/microcontrollers/simplelink-mcus/wired-mcus/overview/overview.html?keyMatch=msp432&tisearch=Search-EN-Everything#second

which are low cost, low power, arm and some have an lcd controller, should be able to get it into a single chip solution.


RE: 48G Re-creation Project (fantasy) - sunhp - 11-12-2019 12:43 AM

(11-11-2019 11:49 PM)EugeneNine Wrote:  looking at the emy48 source it appears to have been developed on windows which usually makes porting to something else harder.
I know the x48 code will work on ARM so I'd suggest starting with an ARM MCU such as the mso432 http://www.ti.com/microcontrollers/simplelink-mcus/wired-mcus/overview/overview.html?keyMatch=msp432&tisearch=Search-EN-Everything#second

which are low cost, low power, arm and some have an lcd controller, should be able to get it into a single chip solution.

Here is another 48G emulator source code written in C :
https://www.hpcalc.org/details/5354

It works well and the renderer code could be replaced/dropped pretty easily.


RE: 48G Re-creation Project (fantasy) - EugeneNine - 11-12-2019 01:07 AM

looks like it was made on windows too. I'm not saying its impossible,its just more work to port windows stuff over.


RE: 48G Re-creation Project (fantasy) - sunhp - 11-12-2019 07:07 AM

(11-12-2019 01:07 AM)EugeneNine Wrote:  looks like it was made on windows too. I'm not saying its impossible,its just more work to port windows stuff over.

It's pure C code nicely written by Daniel Nilsson, and here my little version using SDL2 :
https://github.com/brizzly/jsEmu48/tree/master/jsEmu48/src


RE: 48G Re-creation Project (fantasy) - EugeneNine - 11-12-2019 01:01 PM

(11-12-2019 07:07 AM)sunhp Wrote:  
(11-12-2019 01:07 AM)EugeneNine Wrote:  looks like it was made on windows too. I'm not saying its impossible,its just more work to port windows stuff over.

It's pure C code nicely written by Daniel Nilsson, and here my little version using SDL2 :
https://github.com/brizzly/jsEmu48/tree/master/jsEmu48/src

Its not the C language its the windows specific headers and translating those to something simpler.

But copy/paste it into something like the arduino IDE nd see if it will compile, if it will for the most part then you have a start.


RE: 48G Re-creation Project (fantasy) - sunhp - 11-12-2019 03:03 PM

(11-12-2019 01:01 PM)EugeneNine Wrote:  
(11-12-2019 07:07 AM)sunhp Wrote:  It's pure C code nicely written by Daniel Nilsson, and here my little version using SDL2 :
https://github.com/brizzly/jsEmu48/tree/master/jsEmu48/src

Its not the C language its the windows specific headers and translating those to something simpler.

But copy/paste it into something like the arduino IDE nd see if it will compile, if it will for the most part then you have a start.

The project was made with Allegro and I did replaced this deprecated lib with SDL. There is 0 Windows specific code.


RE: 48G Re-creation Project (fantasy) - Druzyek - 11-13-2019 04:15 PM

(11-11-2019 11:49 PM)EugeneNine Wrote:  I know the x48 code will work on ARM so I'd suggest starting with an ARM MCU such as the mso432 http://www.ti.com/microcontrollers/simplelink-mcus/wired-mcus/overview/overview.html?keyMatch=msp432&tisearch=Search-EN-Everything#second
The MSP432 seems pretty neat, but I would also check out the STM32 line, which has a lot more features. You can get one of their "discovery boards" pretty cheap: STM32 Discovery Boards The one I have used (STM32F429 Discovery Board) has a 168MHz ARM, 2MB Flash, 256k internal RAM with 64-Mbit SDRAM on the board, and a 2.4" LCD. It would be a very good base to work off of. It also has a second USB port that you can set to use as a virtual COM port, which really simplifies communicating with a PC. There is also a "mass storage" option, though I haven't used it. You may be able to set up drag and drop for files pretty easily with it.

Quote:looks like it was made on windows too. I'm not saying its impossible,its just more work to port windows stuff over.
One of the main things to consider is memory management. Does the C code for any of these emulators make calls to malloc? If so, you'll have to implement a dynamic memory system, since there is no magic working behind the scenes on an embedded processor like there is on a Windows system.


RE: 48G Re-creation Project (fantasy) - KeithB - 11-13-2019 04:32 PM

I will see your discovery board and raise you a launchpad:
https://www.ti.com/tool/MSP-EXP432P401R

They also have a nice 128x128 pixel display that interfaces easily.

(They also have a color touchscreen)

The MSP432P4111 launchpad has an LCD, and all the other features you mentioned. The single USB port on the debugger actually presents itself as two com ports, one for debugging and the other for serial communication with the MCU. Drag and drop is coming soon.


RE: 48G Re-creation Project (fantasy) - Druzyek - 11-14-2019 07:23 PM

Do you mean this one? MSP432P4111 Launchpad Same $30 price tag as the STM32 board but no built in LCD, only 48MHz vs 168MHz, and no built in SDRAM. There doesn't seem to be an external memory bus from what I can tell in the MSP432P4111 datasheet.

Quote:The single USB port on the debugger actually presents itself as two com ports, one for debugging and the other for serial communication with the MCU.
Yes, the MSP430 launchpads do this too but it is not because the chip itself is handling any of the USB stuff like the STM32 does but because the extra hardware on the dev board is doing the heavy lifting. Will you still get those com ports with just the microcontroller not on the dev board?

Not saying that the STM32 is the only logical choice here or anything. Other things like software support can matter more in the end.


RE: 48G Re-creation Project (fantasy) - EugeneNine - 11-18-2019 02:54 PM

I saw the LCD's on Ti's site but each one was lower resolution than the 48's so it would be difficult to make it work. If we can find one that a little more then adding a border and drawing the flags at the top are pretty easy.


RE: 48G Re-creation Project (fantasy) - EugeneNine - 11-26-2019 05:09 PM

(11-12-2019 07:07 AM)sunhp Wrote:  
(11-12-2019 01:07 AM)EugeneNine Wrote:  looks like it was made on windows too. I'm not saying its impossible,its just more work to port windows stuff over.

It's pure C code nicely written by Daniel Nilsson, and here my little version using SDL2 :
https://github.com/brizzly/jsEmu48/tree/master/jsEmu48/src

I was looking through some other source code. Do you know how to convert Microsoft's CString type to non-Microsoft C? Looks like I can juust use a plain old string https://stackoverflow.com/questions/14473526/what-is-cstring ?