Code Monkey home page Code Monkey logo

Comments (6)

Fabrizio-Caruso avatar Fabrizio-Caruso commented on May 13, 2024 1

@sprive Hi again,

Consider also that the WebAssembly/JS as a target is also out of scope for Cross-Lib, whose goal is to provide a hardware abstraction layer for vintage systems (mostly 8-bits) and some helping scripts (to build, manage project, handle abstract assets, etc.).
Nevertheless, if I manage to figure out how to get some "immediate input" working, I would be more than happy to support it as a target.

I am closing this "issue", but feel free to post related questions here.

from cross-lib.

Fabrizio-Caruso avatar Fabrizio-Caruso commented on May 13, 2024

@sprive you are talking about two very different things.
Concerning a Webassembly/Javascript target, the answer is a "very partial yes".
I could run some experiments with emscripten. In theory I can build very ugly turn-based only versions of my games with horrible input.
So the problem is that I would have to learn how to implement the input. I am not fluent in Javascript. Can you help?

Concerning the emulators, you can already run and play some of my games (I will add the last 2 asap) on the browser.
Some of the Javascript emulators I use (Vic20, C64, VZ200, Laser 500) auto-load whatever binary I release (or re-upload in the GitHub release sections).

You can play some of the games online here:
https://github.com/Fabrizio-Caruso/CROSS-LIB/blob/master/docs/GAMES.md

For most general debugging I don't even need an emulator nor a browser because I can build my games for the PC terminal.
So I don't even need a cross-compiler.

Example:
xl bomber -> builds the game "Bomber" for whatever terminal it is used to run the "xl" script (this requires a native compiler such as gcc and the ncurses package)
xl run bomber -> runs Bomber on the host terminal (you can of course do the same thing by running the binary in the build folder directly)

If you want to run a game/program on an emulator, I support Mame/Mess and Vice. Depending on the set-up, you may have to modify config.ini and copy some roms in the required directories (see config.ini).
Examples:
xl shuriken vic20 -> builds Shuriken for the Commodore Vic 20 (+16k)
xl run shuriken vic20 -> launches Vice, which auto-loads shuriken and runs it

xl horde msx -> builds Horde for the MSX
xl run horde msx -> launches Mame/Mess, which auto-loads Horde and runs it

from cross-lib.

sprive avatar sprive commented on May 13, 2024

Hi @Fabrizio-Caruso

Yes, sorry 2 things :-)

Concerning the emulators, you can already run and play some of my games (I will add the last 2 asap) on the browser.
You can play some of the games online here:
https://github.com/Fabrizio-Caruso/CROSS-LIB/blob/master/docs/GAMES.md

YES exactly this. :-)
I guess manually adding the links manually isn't so bad given that only some use cases work well for it and text is still a problem.
...

I have dabbled with Emscripten, and (not the library's fault fault) I've been both amazed that it works, and also frustrated with any getting browser based text input working with it. Pyscript seems very interesting but have not tried yet.

Yes, I can help, but for this type of project my skills (Python, networking, and requests) they would be limited to testing, and a little bit of C coding. No JS, presently. Let me know if there's an issue that fits, else I will continue following this until someone fluent in JS can help.

from cross-lib.

Fabrizio-Caruso avatar Fabrizio-Caruso commented on May 13, 2024

@sprive just to let you know that I am actively improving the xl script (with fixes, minor additions in the commands and some cosmetic improvements such as colored text to highlight warnings, errors, succeeded tests, makefile commands, etc. ).
So I invite you to pull the latest changes. Would you let me know if it has improved for you?

from cross-lib.

sprive avatar sprive commented on May 13, 2024

@Fabrizio-Caruso Thanks.

  1. On the WASM stuff, I'm starting to look at fantasy console https://wasm4.org/
    I get WASM-4 and CROSS-LIB are different purposes.
    My primary use case is running in a browser, but if the same code runs on a retro platform that is a big plus.
    (WASM-4 will never target retro hardware so that's a limiter there).
    Thanks for taking this odd request seriously.

  2. Yes, I'll be a back with feedback (I will take time, don't have a retro dev env or this library setup). I've followed the AtariAge and YouTube posts on your project, but I haven't actually used CROSS-LIB yet :-)

from cross-lib.

sprive avatar sprive commented on May 13, 2024

@Fabrizio-Caruso And earlier, when I asked about WASM, I phrased that wrong.
What I really meant was "target the browser" (with workflow conveniences).

The distinction being that including/bundling a page which invokes a bundled (someone else's) JS-based emulator and the project you just built, achieves all that that without CROSS LIB ever knowing anything about WASM.

The build scripts look pretty neat. Just starting to RTFM here. Thanks

from cross-lib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.