Giter Site home page Giter Site logo

superilu / dojs Goto Github PK

View Code? Open in Web Editor NEW
664.0 664.0 28.0 75 MB

A MS-DOS Creative Coding IDE/platform based on JavaScript

License: Other

C 93.55% Makefile 0.14% Batchfile 0.01% C++ 1.08% JavaScript 5.11% Assembly 0.04% Python 0.05% Dockerfile 0.01% Shell 0.01%
3dfx allegro djgpp dos dzcomm freedos glide hacktoberfest javascript ms-dos msdos mujs p5js processing retro retrocomputing retrogaming voodoo-card

dojs's People

Contributors

dependabot[bot] avatar enijar avatar superilu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dojs's Issues

red/blue colors inverted

the red and blue colors are inverted when running DOjS in 32 Bit mode ("-b 32") with a "mpeg" video.

Running DOjS with modified EXE name does not work

In theory it should be possible to rename DOJS.EXE and JSBOOT.ZIP to, lets say, FOO.EXE and FOO.ZIP.
Running FOO.EXE without additional parameters should run the script MAIN.JS in the FOO.ZIP.
This does not work because DOjS still searches for the bootfiles in JSBOOT.ZIP instead of FOO.ZIP.

Correct path structure for DOjS projects?

Hi
Hi
Just testing out DOjS. This looks great :)

DOjS V1.10.0
Windows 95 OSR2.x, FreeDOS 1.3

I am testing DOjS examples and also attempting to test jiyuai V0.0.2
Q. What are the script files path relative to? (The script file location, or DOjS.EXE location)

DOjS script examples are a sub-directory of \DOjS aka \DOjS\examples\*.*
Examples run without issue.


I placed jiyuai as a subdirectory \DOjS\jiyuai\*.js
.\DOjS\jiyuai\MAIN.JS
.\DOjS\jiyuai\ui\ui.js
If I run the script from the script directory:
Batch

@ECHO OFF
SET PATH=%path%;C:\JSDOS\DOjS;C:\JSDOS\DOjS\jiyuai
REM CD C:\JSDOS\DOjS
CD C:\JSDOS\DOjS\jiyuai
CALL C:\JSDOS\DOjS\DOjS.EXE -r C:\JSDOS\DOjS\jiyuai\main.js

I get errors from: Include('./ui/uiapp.js')
ReferenceError: 'Include" is not defined
DOjS ERROR


If i run the .\DOjS\jiyuai\main.js script from the DOjS editor.
SET PATH=%path%;C:\JSDOS\DOjS;C:\JSDOS\DOjS\jiyuai
I get:

Erro: Could not load "./ui/uiapp.js"
    at Require (JSBOOT.ZIP=JSBOO/func.js:214)
    at Include (JSBOOT.ZIP=JSBOO/func.js:224)
    at C:\JSDOS\DOjS\jiyuai\main.js:4

main.js

var inputStr = '';
Include('./ui/uiapp.js');
Include('./demos/dlgdemo.js');
Include('./demos/scrdemo.js');
Include('./demos/ascdemo.js');
Include('./demos/wdgdemo.js');

...

I have tried changing the paths to reflect the location of the script in relation to DOjS directory, ie. Include('./jiyuai/ui/uiapp.js'); Include('jiyuai/ui/uiapp.js');
I have some partial success using DOS file names: Include('.\ui\uiapp.js');


If I place jiyuai files in the root directory next to DOjS everything runs as expected without error.

\DOjS\DOjS.EXE
\DOjS\main.js (jiyuai)
\DOjS\ui\\*.js
\DOjS\ui\*.[DIR]

Must libraries be a sub-directory of DOjS.EXE?
and
Can I place the main script.js in a sub-directory?
Or are scripts meant to be in the root along side of DOjS.exe?

Sorry for the long explanation.
This may be related to jiyuai, but I also need to work out the correct location of scripts an paths for my self as well, otherwise I will end up with a root directory mess and name conflicts everywhere lol

Best regards
Axle

Include() and Require() hide parse errors

When loading JS modules with syntax errors Include() and Require() treat parse errors the same as "file not found".
This should be optimized for better error reporting

Compilation

Thank you for developing for DOS!

Could you please publish the binary as well? I normally work on DOS and don't even have a Windows 10 and especially any Linux PC. I don't have any hope to ever have your program until someone compiles it for me since cross-compiling is not an option and it won't compile on DOS with native DJGPP, at least with these settings and my understanding of C is not deep enough for any trickery.

Thank you :)

Compilation Problems take 2

its not a matter of using it... its a matter of not spreading garbage in the world... i would not use a project that is as dumb as requiring win10 to compile something for DOS... so without that fixed... i can't promote... to the contrary... all my reviews of the project would be terrible... and so on...

so dont make garbage for DOS... if you are not ready to honor people that code for DOS.... you are just destroying the meaning of all of it... so PLEASE STOP MAKING DOS STUFF if you will act like retarded against DOS

Misleading error message when JSBOOT.ZIP is write-protected

I tested "SpaceButton" recently, and due to the way I transferred the game to my retro PC (using a CD-R), the game files were read-only, which resulted in an error message "Script name missing". Once the write-protection has been removed on the game data files, the game started working normally.

Steps to reproduce:

  1. Download https://superilu.itch.io/spacebutton
  2. Copy the files to a folder on a Windows 98 SE machine (not sure if relevant)
  3. Select all files, open file properties, check the "Read-only" attribute
  4. Try to start the game using run.bat (from within Windows, again not sure if relevant)

Expected result:

  • Game gives an error message that the files are read-only, or game works with read-only files

Actual result:

  • Game exits with the message "Script name missing."

Build Problems

can you please fix this retarded way of build it? to just requires a .sh or a makefile or a .bat

not anything retarded like windows 10 or linux subsystem/emulation/etc?

Execute external program

Is it possible to execute external program and use the returned value? Something like var val = exec('time').

Add API for zlib/bzlib/etc

Based on File() and ByteArray from #30 iimplement an API for zlib/bzlilb./etc data (de)compression.
Make everything not zlib a loadable module.

Add INI file for command line options

Right now some options can only be changes using command line parameters (e.g. screen resolution).
It would be nice to be able to put these command line parameters into an extra file for distributing SW created with DOjS.
This way the user can start the EXE and no BAT needs to be included if command line options are used.

Video playback question

Hi, thank you for quick support of nanojpeg library.

I want to make the best dos launcher with downloading metadata from internet.

Can you give me a hint of some video player component that could be used as a part of Dojs UI? Any format. It can be Autodesk FLI or Mpeg or Mjpeg or Smack video component used in games.

"memory fouled" error after runtime exception/error

DOjS will exit with the message "memory fouled" and DJGPP/CWSDPMI register dump when a script error occurs.
set_last_error() in DOjS.c has a typo in strlen() invocation.

Will be fixed in a maintenance release soon.

Add command for use on dos browser

Hi,

can you add in program the commands used on web (web javascript capability) for integrate your proect into DOS browser (e.g. Links browser)?

DOjS Package problem

I was going to update the repository from version 1.6.1 to the latest version 1.7.0. However, there is a problem. It appears you inadvertently included a couple non-redistributable files in the release package. You will want to correct that as soon as possible.

/examples/blendfx.js Missing "examples/rose.png"

Hi
Just testing out DOjS. This looks great :)

DOjS V1.10.0
Windows 95 OSR2.x, FreeDOS 1.3

The example blendfx.js is missing the rose.png from the examples directory.
Line: 88 rose = new Bitmap("examples/rose.png");

I checked previous versions and has never been included. I tried an arbitrary 400x400px 8-bit 256 color with alpha and receive "Exit code 1" so I haven't gone any further down the rabbit hole :)
I have not tested all examples yet...

I am attempting to work out some other quirks (related) while becoming familiar with DOjS (seperate post).

Kind regards
Axle

Any plans to include TCP/IP capability?

It would be very nice to be able to interface with a packet driver, open websockets to an IP address, send and receive bytes, etc... do you have plans to include this capability? I know things like WattTCP and picoTCP do exist that could be used.

Also something that could be done, though I'm not sure how difficult this is, is to also include the capability to use Windows 9x websockets if the program is running on Windows. I do know that it is possible to do this from a DOS program running on Windows.

LoadLibrary does not work on 2nd run when using integrated editor

Steps to reproduce:

  1. dojs newfile.js
  2. Add LoadLibrary("curl"); to the top
  3. in Setup() declare var https = new Curl();
  4. Allow program to run, then exit
  5. Run again
  6. ReferenceError: 'Curl' is not defined

The issue goes away temporarily if you save the project, close the editor, and reopen, but this becomes understandably tedious

Shifted screen and wrong colors

Ok so I have a function render() that

  1. calls System("wget ...") to get a list of pixels (x,y, and color) and save them in a file
  2. loads the file with new File()
  3. clears the screen with ClearScreen()
  4. uses Plot() to fill the whole screen with pixels from the file

It works fine with the first two calls, but with third call the screen is shifted to the bottom-right by about 30-40px and the colors are wrong, I can't even move mouse above that shifted position and when I move the mouse to the right it appears on the left side (just as the image). When I repeat the render() call, it shifts by another 30-40px as you can see on the attached screen (sorry about the quality but its a photo of the Libretto screen :D).

dojsproblem

Disabling the cursor

Firstly I would just like to congratulate @SuperIlu on the work that has been done to date. This project is really awesome!

Is there a way to disable the cursor during runtime? I can see how it might be useful in many cases, but I would like to hide it for some situations.

image

Assertion failed at ../../../swlibs/newpci/pcilib/fxpci.c line 506: 0

When running exampl1.js using DOjS 1.2.0 on DOSBox 0.74-3, it crashes with the following backtrace:

Assertion failed at ../../../swlibs/newpci/pcilib/fxpci.c line 506: 0
Shutting down Allegro
Exiting due to signal SIGABRT
Raised at eip=0017c90c
eax=002d4964 ebx=00000120 ecx=00000017 edx=00000000 esi=000001ff edi=002d4b1c
ebp=002d4bd8 esp=002d4950 program=C:\BEN\DOJS\DOJS.EXE
cs: sel=00a7  base=00400000  limit=ffffffff
ds: sel=00af  base=00400000  limit=ffffffff
es: sel=00af  base=00400000  limit=ffffffff
fs: sel=00bf  base=00000000  limit=0010ffff
gs: sel=00bf  base=00000000  limit=0010ffff
ss: sel=00af  base=00400000  limit=ffffffff
App stack: [002d4c48..00254c48]  Exceptn stack: [00254684..00252744]

Call frame traceback EIPs:
  0x00185185

Can't use let or const

I'm going to guess it's because I'm doing something wrong, but writing something like "const thing = 1;" just gives me an unexpected token error. Is there something I'm missing?

nanojpg

have you been thinking about including jpeg support?
we have png, but those can get rather large..
this looks nice:
http://keyj.emphy.de/nanojpeg/

(by the way, have you tried compiling sqlite3.exe shell using your compiler flags? there's no recent dos compile of that anywhere;
i tried loading sqlite.dxe with jsh but it didn't work)

http_get() is super slow

It takes ~40 seconds to load 10kb of data while wget (which also uses WATTCP) reaches download speed of ~100kb/s.

I've tested this in FreeDOS 1.2.

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.