Jump to content
IGNORED

How to create cartridge images (.bin?) usable in js99er from EA5 files?


Recommended Posts

All my homebrewed games are in EA5 format (multiple files per game).

I would like to run then on a browser and make them available to everyone by providing links to js99er with a link to a .bin
e.g.,
https://js99er.net/#/?cartUrl=http://tigameshelf.net/Files/Emu/bnp_8.bin

js99er online emulator can read cartridge files in .bin format (whatever it is).
Is there a tool to do the conversion from EA5 to a cartridge format that js99er can digest?

Ideally I would need a scriptable tool that I can include and invoke automatically in my build-chain.
Is there such a scriptable tool? Otherwise I will make do with a manual tool.

Link to comment
Share on other sites

There are 2 GUI tools that will pack a set of EA5 files into a module with a ROM loader. Fred Kaal's 'module creator' over at hexbus.com/ti99geek. The second is classic99, under the debug tools there is a make module menu item, exact location and docs are in the PDF. 

 

For scriptable solutions, you can build a ROM loader, and DD the parts together into a .bin. understand the sample code over here http://www.stuartconner.me.uk/ti/ti.htm#bank_switching

 

 

  • Like 1
Link to comment
Share on other sites

There are some utilities in the elfutils directory of the GCC installation.  These are elf2cart, elf2ea5 and ea5split.  I didn't write these - I inherited them from somewhere.  But it should be possible to write a simple standalone command line tool to convert ea5 to cart by reading the source for these utils.  If you do create a ea5 to cart util it could be a useful addition to these tools to include with gcc.

Link to comment
Share on other sites

@Asmusr, sorry I need to correct what I wrote or make it clearer. The image may work with JS99er. It just does not work if I try to load it through the URL parameter cartUrl (https://js99er.net/#/?cartUrl=), e.g.,
https://js99er.net/#/?cartUrl=https://github.com/Fabrizio-Caruso/CROSS-LIB/releases/download/trexBETA/XTREX18.bin
or

https://js99er.net/#/?cartUrl=http://github.com/Fabrizio-Caruso/CROSS-LIB/releases/download/trexBETA/XTREX18.bin


By the way, I am using ea5tocart in my framework. I would like to include it. Who should I thank for the tool other than you for pointing it out? Are you the author?

Edited by Fabrizio Caruso
Link to comment
Share on other sites

The load from URL feature doesn't work for me on any binary. Might it have something to do with cross-site scripting limitations (security)? The Chrome dev tools console tells me it loads the image from the url, but the emulator itself doesn't pick it up.

Edited by TheMole
edited for spelling
Link to comment
Share on other sites

@TheMole I don't know but I know that I use other JS emulators that can load (the very same) games for other systems through a url parameter:
https://nippur72.github.io/vic20-emu/?joy=1&load=http://github.com/Fabrizio-Caruso/CROSS-LIB/releases/download/trexBETA/Xtrex_vic20_exp_16k.prg
https://webmsx.org/?cartridge1_url=http://github.com/Fabrizio-Caruso/CROSS-LIB/releases/download/trexBETA/Xtrex_msx_16k.rom

https://nippur72.github.io/laser500emu/?load=http://github.com/Fabrizio-Caruso/CROSS-LIB/releases/download/trexBETA/Xtrex_laser500_keyboard.bin
and some others.
So it must be possible.
What does not work with these other JS emulators is https but I can use http instead of https and this is enough to make them load and run the binaries.

Edited by Fabrizio Caruso
Link to comment
Share on other sites

5 hours ago, TheMole said:

The load from URL feature doesn't work for me on any binary. Might it have something to do with cross-site scripting limitations (security)? The Chrome dev tools console tells me it loads the image from the url, but the emulator itself doesn't pick it up.

I'm using a server side proxy to download the file in order to bypass the CORS limitations, but it doesn't work with directs.

 

Here is an example that should work: https://js99er.net/#/?cartUrl=https:%2F%2Ftigameshelf.net%2FFiles%2FEmu%2Fbnp_8.bin

 

I don't know how easy it is to change the proxy to work with redirects? I will take a look later.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

4 hours ago, Fabrizio Caruso said:

@Asmusr Thanks for the reply. Could please support redirect or at least GitHub repos? If not, how can I get the right url to use with your emulator?

Try now [it should work with one redirect].

Edited by Asmusr
Link to comment
Share on other sites

Thanks @Asmusr! It works!
I can use https. For example: https://js99er.net/#/?cartUrl=https:%2F%2Fgithub.com%2FFabrizio-Caruso%2FCROSS-LIB%2Freleases%2Fdownload%2FtrexBETA%2FXTREX18.bin


By the way, Firefox runs it significantly slower than Chrome. This is not your emulator's fault though. It is just Firefox. I use the latest Fires 131.0.3 (64 bit).

  • Like 1
Link to comment
Share on other sites

19 hours ago, Fabrizio Caruso said:

Thanks @Asmusr! It works!
I can use https. For example: https://js99er.net/#/?cartUrl=https:%2F%2Fgithub.com%2FFabrizio-Caruso%2FCROSS-LIB%2Freleases%2Fdownload%2FtrexBETA%2FXTREX18.bin


By the way, Firefox runs it significantly slower than Chrome. This is not your emulator's fault though. It is just Firefox. I use the latest Fires 131.0.3 (64 bit).

Yea I use EDGE alone and it is faster then Google Chrome or Firefox. 

Link to comment
Share on other sites

On 10/17/2024 at 12:17 AM, Fabrizio Caruso said:

By the way, Firefox runs it significantly slower than Chrome. This is not your emulator's fault though. It is just Firefox. I use the latest Fires 131.0.3 (64 bit).

 

It's not expected to run slower in Firefox, but I see what you mean. I think it may be caused by one of the latest updates to the framework, so I will need to revert to earlier versions of the code to see where it happened. It's most obvious in Firefox, but it also affects Chrome/Edge, for instance with the F18A Karts demo, where it's having trouble keeping up the frame rate. 

  • Like 2
Link to comment
Share on other sites

10 hours ago, Asmusr said:

It's not expected to run slower in Firefox, but I see what you mean. I think it may be caused by one of the latest updates to the framework, so I will need to revert to earlier versions of the code to see where it happened. It's most obvious in Firefox, but it also affects Chrome/Edge, for instance with the F18A Karts demo, where it's having trouble keeping up the frame rate. 

I have tried to revert the code to different timepoints before major changes, but the performance of the F18A Karts demo is pretty much the same. I can't say for sure, but I think Firefox used to perform as well as Chrome, so maybe some changes in a recent version of Firefox had a negative effect on performance? Anyway, for something like Parsec the performance is fine on my computer (runs at a steady 60 FPS), so I'm not so concerned.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...