Skip to content

Commit

Permalink
Version 1.5.0 (The neuronal necessity)
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperIlu committed Apr 2, 2021
1 parent 8704589 commit bbfbcde
Show file tree
Hide file tree
Showing 3,223 changed files with 277,599 additions and 13,177 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
53 changes: 27 additions & 26 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,32 +79,32 @@ dzcomm/obj/djgpp/asmdef.s
JSBOOT.ZIP
cacert.pem
curl-7.74.0/lib/curl_config.h
openssl-1.1.1i/libcrypto.pc
openssl-1.1.1i/libssl.pc
openssl-1.1.1i/openssl.pc
openssl-1.1.1i/crypto/buildinf.h
openssl-1.1.1i/crypto/bf/bf-586.s
openssl-1.1.1i/crypto/bn/bn-586.s
openssl-1.1.1i/crypto/bn/co-586.s
openssl-1.1.1i/crypto/bn/x86-gf2m.s
openssl-1.1.1i/crypto/bn/x86-mont.s
openssl-1.1.1i/crypto/camellia/cmll-x86.s
openssl-1.1.1i/crypto/cast/cast-586.s
openssl-1.1.1i/crypto/chacha/chacha-x86.s
openssl-1.1.1i/crypto/des/crypt586.s
openssl-1.1.1i/crypto/des/des-586.s
openssl-1.1.1i/crypto/ec/ecp_nistz256-x86.s
openssl-1.1.1i/crypto/md5/md5-586.s
openssl-1.1.1i/crypto/modes/ghash-x86.s
openssl-1.1.1i/crypto/poly1305/poly1305-x86.s
openssl-1.1.1i/crypto/rc4/rc4-586.s
openssl-1.1.1i/crypto/ripemd/rmd-586.s
openssl-1.1.1i/crypto/sha/sha1-586.s
openssl-1.1.1i/crypto/sha/sha256-586.s
openssl-1.1.1i/crypto/sha/sha512-586.s
openssl-1.1.1i/include/crypto/bn_conf.h
openssl-1.1.1i/include/crypto/dso_conf.h
openssl-1.1.1i/include/openssl/opensslconf.h
openssl-1.1.1k/libcrypto.pc
openssl-1.1.1k/libssl.pc
openssl-1.1.1k/openssl.pc
openssl-1.1.1k/crypto/buildinf.h
openssl-1.1.1k/crypto/bf/bf-586.s
openssl-1.1.1k/crypto/bn/bn-586.s
openssl-1.1.1k/crypto/bn/co-586.s
openssl-1.1.1k/crypto/bn/x86-gf2m.s
openssl-1.1.1k/crypto/bn/x86-mont.s
openssl-1.1.1k/crypto/camellia/cmll-x86.s
openssl-1.1.1k/crypto/cast/cast-586.s
openssl-1.1.1k/crypto/chacha/chacha-x86.s
openssl-1.1.1k/crypto/des/crypt586.s
openssl-1.1.1k/crypto/des/des-586.s
openssl-1.1.1k/crypto/ec/ecp_nistz256-x86.s
openssl-1.1.1k/crypto/md5/md5-586.s
openssl-1.1.1k/crypto/modes/ghash-x86.s
openssl-1.1.1k/crypto/poly1305/poly1305-x86.s
openssl-1.1.1k/crypto/rc4/rc4-586.s
openssl-1.1.1k/crypto/ripemd/rmd-586.s
openssl-1.1.1k/crypto/sha/sha1-586.s
openssl-1.1.1k/crypto/sha/sha256-586.s
openssl-1.1.1k/crypto/sha/sha512-586.s
openssl-1.1.1k/include/crypto/bn_conf.h
openssl-1.1.1k/include/crypto/dso_conf.h
openssl-1.1.1k/include/openssl/opensslconf.h
5.BMP
5.PCX
5.PNG
Expand All @@ -117,3 +117,4 @@ TMP1.TMP
TMP1.ZIP
TMP2.TMP
TMP2.ZIP
openssl-1.1.1k/apps/progs.h
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Version 1.5.0 (The neuronal necessity) / April 2, 2021
* Added SQLite module
* Added module for training/running neuronal networks
* Added libcpuid module
* Added NanoSVG module
* Added global variables `Width`/`Height`
* Added single parameter version of `Color()`
* Added `Console` and `EvalChain` classes.
* Added perlin noise module
* You can now create single color Bitmaps with `new Bitmap(width, height, color)`
* FIXED: small fixes for raw disk access.
* FIXED: p5js `arc()` function is now somewhat useable (was completely broken before).
* FIXED: Updated openssl to 1.1.1k

# Version 1.4.0 (The curly conglomerate) / Jan 22, 2021
* Replaced loadpng+libpng by alpng to reduce EXE size.
* Added fast integer array class `IntArray`
Expand Down
2 changes: 1 addition & 1 deletion DOjS.cppcheck
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<path name="zlib-1.2.11/"/>
<path name="cylindrix/"/>
<path name="alpng13/"/>
<path name="openssl-1.1.1i/"/>
<path name="openssl-1.1.1k/"/>
<path name="curl-7.74.0/"/>
</exclude>
</project>
4 changes: 2 additions & 2 deletions DOjS.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ SOFTWARE.

#define SYSINFO ">>> " //!< logfile line prefix for system messages

#define DOSJS_VERSION 1.40 //!< version number
#define DOSJS_VERSION_STR "V1.4.0" //!< version number as string
#define DOSJS_VERSION 1.50 //!< version number
#define DOSJS_VERSION_STR "V1.5.0" //!< version number as string

#define JSBOOT_DIR "JSBOOT/" //!< directory with boot files.
#define JSBOOT_ZIP "JSBOOT.ZIP" //!< filename for ZIP of JSBOOT
Expand Down
58 changes: 58 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -1766,3 +1766,61 @@ OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of a copyright holder shall not
be used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization of the copyright holder.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
libcpuid license:

Copyright 2008 Veselin Georgiev,
anrieffNOSPAM @ mgail_DOT.com (convert to gmail)

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
nanosvg license:

Copyright (c) 2013-14 Mikko Mononen [email protected]

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
noise license:

The code in this repository is public domain software.
Some of these implementations were originally released
under GPL or MIT licenses, and you may still find those
implementations floating around on the Internet, but as the
sole author of the code, I have now released it into the
public domain.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ WATT32=watt32-2.2dev.rel.11/
ZLIB=zlib-1.2.11
KUBAZIP=zip
ALPNG=alpng13
OPENSSL=openssl-1.1.1i
OPENSSL=openssl-1.1.1k
CURL=curl-7.74.0

# compiler
Expand Down Expand Up @@ -180,8 +180,8 @@ devzip: all doc
rm -f $(RELZIP)
curl --remote-name --time-cond cacert.pem https://curl.se/ca/cacert.pem
cp $(GLIDE)/v1/lib/glide3x.dxe ./GLIDE3X.DXE
cp openssl-1.1.1i/apps/openssl.exe .
zip -9 -r $(RELZIP) $(EXE) WATTCP.CFG GLIDE3X.DXE CWSDPMI.EXE LICENSE README.md CHANGELOG.md JSBOOT.ZIP examples/*.js tests/*.js $(GLIDE)/*/lib/glide3x.dxe V_*.BAT TEXUS.EXE cacert.pem openssl.exe *.DXE
cp $(OPENSSL)/apps/openssl.exe .
zip -9 -r $(RELZIP) $(EXE) WATTCP.CFG GLIDE3X.DXE CWSDPMI.EXE LICENSE README.md CHANGELOG.md JSBOOT.ZIP examples/*.js tests/*.js tests/*.svg $(GLIDE)/*/lib/glide3x.dxe V_*.BAT TEXUS.EXE cacert.pem openssl.exe *.DXE
scp $(RELZIP) [email protected]:/sata/c64

doc:
Expand Down
2 changes: 1 addition & 1 deletion Makefile.dxemk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ clean distclean:
rm -rf *.DXE *.d *.o *.undef

%.o: %.c
$(CC) -o $@ -c $(CFLAGS) $<
$(CC) -o $@ -c $(CFLAGS) $(DXE_CFLAGS) $<

%.DXE: %.o $(DXE_FILES)
$(DXE3GEN) -o $@ $^ $(DXE_LDFLAGS) -U -E _init_ -E _shutdown_ -V | tee $(basename $@).undef | sort
Expand Down
65 changes: 34 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,22 @@ DOjS is pronounces like [doge](https://en.wikipedia.org/wiki/Doge_(meme)), but e

DOjS was only possible due to the work of these people/projects:
* [MuJS](https://mujs.com/) JavaScript interpreter
* The [Allegro library](https://liballeg.org/)
* The [Allegro library](https://liballeg.org/) and [Allegro XC](https://github.com/msikma/allegro-4.2.2-xc)
* [DJGPP](http://www.delorie.com/djgpp/) from DJ Delorie and the [Linux compile scripts](https://github.com/andrewwutw/build-djgpp) by Andrew Wu.
* The people that contributed to [p5js](https://p5js.org/).
* The Glide source cleanup of [Ozkan Sezer](https://github.com/sezero/glide).
* [AllegroPNG](http://alpng.sourceforge.net/) PNG loader for Allegro
* [DZCOMM](http://dzcomm.sourceforge.net/) COM port library
* [libcpuid](https://github.com/anrieff/libcpuid) for cpuid module
* [curl](https://curl.se/) and [OpenSSL](https://www.openssl.org/) for curl module
* [cylindrix](https://sourceforge.net/projects/cylindrix/) for IPX module
* [nanosvg](https://github.com/memononen/nanosvg) for SVG loading
* [noise](https://github.com/stegu/perlin-noise) for perlin noise generation
* [genann](https://github.com/codeplea/genann) for neural network engine
* [SQLite](https://www.sqlite.org/index.html) for sqlite module
* [Watt32](https://www.watt-32.net/) for TCP/IP networking
* [zip](https://github.com/kuba--/zip) for ZIP file access
* [zlib](http://zlib.net/)

You can find me on [Twitter](https://twitter.com/dec_hl) if you want...

Expand Down Expand Up @@ -171,7 +183,8 @@ See the [changelog](/CHANGELOG.md) for the projects history.
# Planed work
* Error popup in the editor.
* TCP/IP remote logging/debugging.
* add loading of DXEs through JS.
* add FFT module
* Use IntArray for DSP sampling
* Add ZIP file functions (e.g. https://libzip.org/users/ or https://github.com/kuba--/zip).
* Implement 3df file loading from ZIP
* Make FreeDOS package.
Expand All @@ -182,6 +195,8 @@ See the [changelog](/CHANGELOG.md) for the projects history.
* Anything fun...

# Licenses
See [LICENSE](LICENSE) file for all licenses.

## DOjS
All code from me is released under **MIT license**.

Expand Down Expand Up @@ -256,44 +271,32 @@ it freely, subject to the following restrictions:
source distribution.

## zip code
[zip](https://github.com/kuba--/zip) is licensed by UNLICENSE
See UNLICENSE in zip directory.

## WATTCP
WATTCP - TCP/IP library routines

Copyright (c) 1990, 1991, 1992, 1993 Erick Engelke
See manual.txt in watt32 directory.

Portions Copyright (c) 1993 Quentin Smart
Portions Copyright (c) 1991 University of Waterloo
Portions Copyright (c) 1990 National Center for Supercomputer Applications
Portions Copyright (c) 1990 Clarkson University
Portions Copyright (c) 1983, 1986, Imagen Corporation
## OpenSSL
The OpenSSL toolkit stays under a double license, i.e. both the conditions of
the OpenSSL License and the original SSLeay license apply to the toolkit.

This software is distributed in the hope that it will be useful,
but without any warranty; without even the implied warranty of
merchantability or fitness for a particular purpose.
## cURL
See COPYING in curl directory.

**RESTRICTIONS**
You may freely use this library to produce programs which you may give
away or sell in source format, or as compiled executables, or both.
## genann
See LICENSE in neural.dxelib.

You may not sell this library or a portion thereof or distribute modified
versions the library code in either source or OBJect or LIBrary format
without written permission from the author. The author still maintains
copyright privileges and will assert the privileges of ownership for
purposes of royalties such distributions.
## sqlite
See LICENSE.md in sqlite.dxelib.

Portions of this code were written or enhanced by others and offerred
to me for distribution in WATTCP under my copyright. To my knowledge,
all copyrights exercised are listed at the top of this file. If this
is incorrect, please contact me so I can rectify the situation.
## libcpuid
See COPYING in cpuid.dxelib.

## cURL
See LICENSE file.
## nanosvg
See LICENSE.txt in nanosvg.dxelib.

## OpenSSL
The OpenSSL toolkit stays under a double license, i.e. both the conditions of
the OpenSSL License and the original SSLeay license apply to the toolkit.
## noise
See LICENSE.md in noise.dxelib.

# Usage
## Command line
Expand Down
28 changes: 28 additions & 0 deletions al3d.dxelib/al3d.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*
MIT License
Copyright (c) 2019-2021 Andre Seidelt <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

#include <mujs.h>
#include <stdio.h>

Expand All @@ -7,8 +29,14 @@
#include "zipfile.h"
#include "zbuffer.h"

/**************
** prototype **
**************/
void init_al3d(js_State *J);

/***********************
** exported functions **
***********************/
void init_al3d(js_State *J) {
LOGF("%s\n", __PRETTY_FUNCTION__);

Expand Down
7 changes: 6 additions & 1 deletion bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,19 @@ static void new_Bitmap(js_State *J) {

blit(DOjS.current_bm, bm, x, y, 0, 0, w, h);
} else if (js_isnumber(J, 1) && js_isnumber(J, 2)) {
// new Bitmap(width, height)
// new Bitmap(width, height [, color])
bm = create_bitmap_ex(32, js_tonumber(J, 1), js_tonumber(J, 2));
if (!bm) {
DEBUG("No Memory for Bitmap\n");
JS_ENOMEM(J);
return;
}
DEBUGF("new Bitmap 0x%p with data=%p\n", bm, bm->dat);

// clear with given color
if (js_isnumber(J, 3)) {
clear_to_color(bm, js_toint32(J, 3));
}
} else if (js_isstring(J, 1)) {
// new Bitmap("filename")
fname = js_tostring(J, 1);
Expand Down
25 changes: 15 additions & 10 deletions color.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,25 @@ SOFTWARE.
** static functions **
*********************/
static void f_Color(js_State *J) {
if (js_isundefined(J, 1) || js_isundefined(J, 2) || js_isundefined(J, 3)) {
js_error(J, "Color needs at least three integer arguments");
return;
} else {
int r = js_toint16(J, 1);
int g = js_toint16(J, 2);
int b = js_toint16(J, 3);
int a = 255;
int r;
int g;
int b;
int a = 255;
if (js_isdefined(J, 1) && js_isdefined(J, 2) && js_isdefined(J, 3)) {
r = js_toint16(J, 1);
g = js_toint16(J, 2);
b = js_toint16(J, 3);
if (js_isdefined(J, 4)) {
a = js_toint16(J, 4);
}
uint32_t rgba = makeacol32(r, g, b, a);
js_pushnumber(J, rgba);
} else if (js_isdefined(J, 1)) {
r = g = b = js_toint16(J, 1);
} else {
js_error(J, "Color needs one or three number arguments");
return;
}
uint32_t rgba = makeacol32(r, g, b, a);
js_pushnumber(J, rgba);
}

/**
Expand Down
Loading

0 comments on commit bbfbcde

Please sign in to comment.