Post Reply 
48G Re-creation Project (fantasy)
11-11-2019, 11:49 PM
Post: #61
RE: 48G Re-creation Project (fantasy)
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/simpl...ing#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.
Find all posts by this user
Quote this message in a reply
11-12-2019, 12:43 AM
Post: #62
RE: 48G Re-creation Project (fantasy)
(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/simpl...ing#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.
Visit this user's website Find all posts by this user
Quote this message in a reply
11-12-2019, 01:07 AM
Post: #63
RE: 48G Re-creation Project (fantasy)
looks like it was made on windows too. I'm not saying its impossible,its just more work to port windows stuff over.
Find all posts by this user
Quote this message in a reply
11-12-2019, 07:07 AM
Post: #64
RE: 48G Re-creation Project (fantasy)
(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/...sEmu48/src
Visit this user's website Find all posts by this user
Quote this message in a reply
11-12-2019, 01:01 PM (This post was last modified: 11-12-2019 01:11 PM by EugeneNine.)
Post: #65
RE: 48G Re-creation Project (fantasy)
(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/...sEmu48/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.
Find all posts by this user
Quote this message in a reply
11-12-2019, 03:03 PM
Post: #66
RE: 48G Re-creation Project (fantasy)
(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/...sEmu48/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.
Visit this user's website Find all posts by this user
Quote this message in a reply
11-13-2019, 04:15 PM
Post: #67
RE: 48G Re-creation Project (fantasy)
(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/simpl...ing#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.
Find all posts by this user
Quote this message in a reply
11-13-2019, 04:32 PM (This post was last modified: 11-13-2019 04:36 PM by KeithB.)
Post: #68
RE: 48G Re-creation Project (fantasy)
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.
Find all posts by this user
Quote this message in a reply
11-14-2019, 07:23 PM
Post: #69
RE: 48G Re-creation Project (fantasy)
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.
Find all posts by this user
Quote this message in a reply
11-18-2019, 02:54 PM
Post: #70
RE: 48G Re-creation Project (fantasy)
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.
Find all posts by this user
Quote this message in a reply
11-26-2019, 05:09 PM (This post was last modified: 11-26-2019 05:10 PM by EugeneNine.)
Post: #71
RE: 48G Re-creation Project (fantasy)
(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/...sEmu48/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/1447...is-cstring ?
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)