Code Monkey home page Code Monkey logo

sehugg / 8bitworkshop Goto Github PK

View Code? Open in Web Editor NEW
494.0 30.0 81.0 85.09 MB

web-based IDE for 8-bit programming and Verilog development

Home Page: http://8bitworkshop.com/

License: GNU General Public License v3.0

CSS 0.32% JavaScript 34.16% C 22.32% HTML 2.79% Makefile 0.03% Shell 0.02% C++ 0.65% Assembly 6.42% Verilog 8.07% Python 0.01% Lua 0.02% TypeScript 23.32% Slice 0.25% BASIC 1.07% FreeBasic 0.52% Visual Basic 6.0 0.01% Dockerfile 0.02%
ide homebrew retro assembly c 8-bit

8bitworkshop's People

Contributors

cybernesto avatar damieng avatar dependabot[bot] avatar ewenmcneill avatar haroldo-ok avatar konamiman avatar limoka avatar micahcowan avatar notexactlysiev avatar oliverschmidt avatar sehugg avatar taylorza 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

8bitworkshop's Issues

ifconfig is deprecated and should be replaced with "ip addr" in the Makefile

Hello!
First of all I want to thank you for this awesome piece of software and the best NESDEV book ever made!

I am an Arch Linux user. If you are familiar with Arch Linux, you know the bleeding edge nature of the system. ifconfig has been deprecated for a while, and is in fact no longer existing in Arch Linux, thus I had some problems coming up when i tried to call make tsweb. I solved this by simply replacing ifconfig with ip addr for both the web and tsweb-part.

Is this a change you would consider doing?

This is how the web and tsweb looks like in my Makefile now:

web:
	ip addr | grep inet
	python3 scripts/serveit.py 2>> /dev/null #http.out

tsweb:
	ip addr | grep inet
	$(TSC) -w &
	python3 scripts/serveit.py 2>> /dev/null #http.out

Edit: I can of course also do a pull request on this change, if you want.

Timing not shown for macros on VCS

This is perhaps more of a feature request than an issue, but currently (v2.1.0) when editing for VCS (perhaps others as well?) and selecting Show Timing no timing is shown for macros either in the place that it is called on in the macro code itself. Here is a short example:

image

	processor 6502
       	include "vcs.h"
        include "macro.h"

	MAC INITIALIZE
        	sei		;disable interrupts (not really needed, but convention)
       		cld		;disable BCD math mode
        	ldx #$ff	;initialize stack pointer to $FF
        	txs		;transfer X register to S register
        	lda #0		;set A register to 0

.InitToZero	sta $0,X	;store A register at ($0+X)
		dex		;decrement X
        	bne .InitToZero	;loop until X is 0
        ENDM
    

	seg Code
        org $f000

Start   
	INITIALIZE
    
	lda #$ff ;load value into A
        sta COLUBK	;store A into BG color register
        jmp Start
    
PowerOn org $fffc
        .word Start
        .word Start

Forth support

Hi Steven,

thanks for the very enlightening talk about 8bitworkshop at KansasFest
2020.

I was unaware of 8bitworkshop, but I will surely use it for future
projects. It's really great.

In your talk you mentioned that you are interested to add other
languages to 8bitworkshop in the future, maybe Forth.

I'm part of the team that maintains VolksForth, a Forth system for 6502,
Z80/i8080, 8086 and 68000 machines.

VolksForth is currently on the Forth83 language level, but we have
add-on code to make VolksForth compatible with ANSI-Forth '94 and the
latest Forth 2012 standard.

From the machines supported by 8bitworkshop, VolksForth runs on

  • C64
  • Apple II
  • MSX (experimental port available, but not checked into Github)
  • MS-DOS PC

in addition, it also runs on

  • Atari ST
  • Apple 1
  • Atari XL/XE (possibly on Atari 5200, never tried)
  • 8080/Z80 CP/M machines
  • py65 (Python based 6502 Emulator)

We have plans to support these machines in the future

  • Amiga
  • Sinclair QL
  • Amstrad CPC (without CP/M)
  • Sinclair Spectrum
  • m68k Linux
  • 68000 based MacOS
  • Apple Lisa

You find VolksForth on https://github.com/forth-ev/VolksForth

VolksForth is written in VolksForth (not Assembler or C or other language), it Meta-Compiles to other targets. The plan is to be able to metacompile from each target to any other supported target.

If you are interested in collaborating integrating some Forth system
into 8bitworkshop, let me know.

Problems with Bankswitch example

I've done several tests with the bankswitch example, I've noticed some problems.

  • Does not work on several devices (simple NES clones, regular NES cart dumpers, etc).
  • Not able to use bank 2 on 8000.

Hypotesis: There might be something awkard on the packing.

I've tested on the same devices, some ROM images the same mapper and also deals with bankswitch. To better track and my fix attempt, I've created an repository of the example with a build script: https://github.com/gutomaia/NES_bankswitch_example.

For the problem "Not able to use bank 2 on 8000", look code at branch "more_banks".

Compiling downloaded code

Hi! The 8bitworkshop IDE is really cool! Question though: I downloaded the hello.c file from the VIC Dual and tried to compile on my Linux box with: gcc hello.c -o hello and got a slew of errors from the compiler. Do I need to add additional flags in order to compile the code? I'll copy / paste the errors below:

hello.c: In function ‘start’:
hello.c:9:4: error: expected ‘(’ before ‘LD’
LD SP,#0xE800 ; set up stack pointer
^~
hello.c:9:4: error: unknown type name ‘LD’
hello.c:9:13: error: stray ‘#’ in program
LD SP,#0xE800 ; set up stack pointer
^
hello.c:9:14: error: expected identifier or ‘(’ before numeric constant
LD SP,#0xE800 ; set up stack pointer
^~~~~~
hello.c:9:23: error: unknown type name ‘set’
LD SP,#0xE800 ; set up stack pointer
^~~
hello.c:9:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘stack’
LD SP,#0xE800 ; set up stack pointer
^~~~~
hello.c:10:16: error: unknown type name ‘disable’; did you mean ‘double’?
DI ; disable interrupts
^~~~~~~
double
hello.c:11:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘__endasm’
__endasm;
^~~~~~~~
hello.c: At top level:
hello.c:16:12: error: expected declaration specifiers or ‘...’ before numeric constant
char __at (0xe000) cellram[32][32];
^~~~~~
hello.c:17:12: error: expected declaration specifiers or ‘...’ before numeric constant
char __at (0xe800) tileram[256][8];
^~~~~~
hello.c: In function ‘clrscr’:
hello.c:31:10: error: ‘cellram’ undeclared (first use in this function)
memset(cellram, 0, sizeof(cellram));
^~~~~~~
hello.c:31:10: note: each undeclared identifier is reported only once for each function it appears in
hello.c: In function ‘setup_stdio’:
hello.c:35:10: error: ‘tileram’ undeclared (first use in this function)
memcpy(tileram, font8x8, sizeof(font8x8));
^~~~~~~
hello.c: In function ‘scrollup’:
hello.c:43:12: error: ‘cellram’ undeclared (first use in this function)
memmove(&cellram[0][1], &cellram[0][0], sizeof(cellram)-1);
^~~~~~~
hello.c: In function ‘putchar’:
hello.c:64:3: error: ‘cellram’ undeclared (first use in this function)
cellram[cursor_x][31-cursor_y] = ch;
^~~~~~~

NES vram buffer sample

Hello,

I have been following along with the projects using my local build environment (CC65 and the Mesen emulator). I found that the VRAM Buffer sample had some odd behavior where the Y scroll position jumped all around. At first I chalked it up to my local emulator, but I was able to get it to happen in JSNES, too, by increasing VBUFSIZE to 150.

As far as I can tell, the issue is that the scroll register isn't getting set during the vblank period, as the local variable y and the NESLIB variable SCROLL_Y seem correct.

More nametables for side-scrolling platformers

Is there any way to have more nametables to the right of nametable B, like a side-scrolling platformer
would? (btw sorry i keep making issues, i just need help with stuff that i don't think is in the book)

Verilog: Test Pattern: rgb = {b,g,r} needs more explanation

In the Verilog "Test Pattern" example, the rgb assignment assign rgb = {b,g,r}; seems somewhat counter intuitive.

assign rgb = {b,g,r};

The variable naming implies (at least to me) a "r, g, b" ordering (ie, "r" is most significant bit), but the actual implementation appears to be a "b, g, r" ordering, at least when read as a big endian value; ie it appears in the emulated video hardware that the "r" is the least significant bit, and the "b" is the most significant bit. Page 45 of the book ("Designing Video Game Hardware in Verilog") explains that syntax as making "b" the most significant bit. But the variable naming leads me to expect "r" to be the most significant bit...

This seems to violate the Principle of Least Surprise, and I think it'd be worth at least adding a comment on that particular example (the first one where the video hardware is introduced) that explains the (emulated) video hardware is Little Endian (the "r" in "rgb" is at the least significant bit end) and Verilog is Big Endian. Hence the opposite order.

AFAICT the colour mapping is coming from:

var RGBLOOKUP = [
0xff222222,
0xff2222ff,
0xff22ff22,
0xff22ffff,
0xffff2222,
0xffff22ff,
0xffffff22,
0xffffffff,
0xff999999,
0xff9999ff,
0xff99ff99,
0xff99ffff,
0xffff9999,
0xffff99ff,
0xffffff99,
0xff666666,
];

via:

idata[frameidx] = RGBLOOKUP[gen.rgb & 15];

and the output of RGBLOOKUP seems like it's a RGBA value (with alpha always forced to 0xff) in little endian order (ie A(lpha) at most significant end, then B, G, R). (It looks like the input is a 4-bit value, presumably RGBI with an intensity bit, like early PC graphics hardware; but ordered I,B,G,R from most significant to least significant bit.)

I'm not sure where those RGBA values go after that, and thus whether that RGBA Little Endian implementation is a Javascript/HTML/Browser implementation artifact or an internal choice (eg, for compatibility with another emulated platform).

My guess is that this implementation detail could be hidden by the RGBLOOKUP table, but that doing so would require all the other video examples -- including ones in the printed book! -- to be rewritten for the new "hardware" colour order. Hence the suggestion to add a comment into the online examples to document further what is happening. (It's not documented in the book AFAICT, at least not in the relevant chapter -- chapter 10.)

Ewen

PS: To save anyone else finding this some time, the "video display" is turned on for the Verilog platform in the IDE when hsync, vsync, and rgb are present as output signals; otherwise you get the waveform view. So you can't, eg, rename the output signal to bgr to make it "more logical", as then the video display emulation disappears... :-)

this.hasvideo = gen.vsync !== undefined && gen.hsync !== undefined && gen.rgb !== undefined;

Some edits cause a need for file reload

Version 2.1.0, editing for VCS

As an example, starting from New File, then deleting all of the text and typing in line by line the code found in the book chapter 5.2 the emulator will not work even once the code is completed unless I go to the file selector and choose some other file, then go back to the file selector and re-open the file I was just working on. There seem to some edits that cause the emulator to refuse to run without a file-reload but I'm not sure exactly which edits these are (but I've encountered it within the first 2 book example programs)

BTW just wanted to say also that I'm in love with this IDE and the 2600 book! <3 <3 <3

make *.nes export feature

This isn't actually an issue, but is there any possibility that you could add a feature that exports the NES program to a *.nes file instead of a *.rom file? And, if you have any recommendations for programs that can do this, what are they? (I'd rather do the first option, because of the directives that only work in the 8bitworkshop IDE.)

Can anybody import a project into 8BWS ? sess is undefined...

When you publish/create a project on github, there's a link in README.md that proposes to open the project in 8bitworkshop. I think it's a great feature to share your code with others but it does not seem possible for someone other than me to do so ... as others receive an error "could not import (project). sess is undefined" ..

Am I missing something ? Thanks for such a wonderful tool !

Migrate to ES2020 modules someday

Right now, the TypeScript compiler targets ES5, which generates non-native JS modules. We don't use Webpack or Babel or anything. The index.html page loads all of the .js files with <script> tags (except those loaded dynamically at runtime) and has a simple handmade require() function to resolve imports.

To target ES6, we'd have do a bunch of things, like add ".js" to all the import declarations, use dynamic imports, and fix all the Node tests. Having tried this a couple of times, it is fiddly.

Only ES2020 has dynamic imports, and not many browsers support them in web workers. So we are going to still probably use importScripts().

Verilog: Regression: player 2 keys control player 1 instead of player 2

In the Verilog simulation, it appears the keys for player 1 (arrow keys, space/shift) and the keys for player 2 (a, d, w, s, z, x) both actually control player 1, at least experimentally. Ie, both seem to only affect the horizontal vars output (ie, based on vertical position). (I think this is an accidental regression; see comments at the end.)

Player 1 Keys: arrow keys + space + shift
Player 2 Keys: A/D/W/S + Z + X

// select p1 bit based on vertical position
wire p1gfx = switches_p1[vpos[7:5]];
// select p2 bit based on horizontal position
wire p2gfx = switches_p2[hpos[7:5]];
assign rgb = {1'b0,
display_on && p1gfx,
display_on && p2gfx};

This also appears to be true when using the sprite rotation example, but fortunately that one only relies on the player 1 controls (but can be controlled with both "player 1" and "player 2" controls equivalently).

.switch_left(switches_p1[0]),
.switch_right(switches_p1[1]),
.switch_up(switches_p1[2])

As best I can tell the problem is in platform/verilog.ts in the table passed to makeKeycodeMap():

var VERILOG_KEYCODE_MAP = makeKeycodeMap([
[Keys.LEFT, 0, 0x1],
[Keys.RIGHT, 0, 0x2],
[Keys.UP, 0, 0x4],
[Keys.DOWN, 0, 0x8],
[Keys.A, 0, 0x10],
[Keys.B, 0, 0x20],
[Keys.P2_LEFT, 0, 0x1],
[Keys.P2_RIGHT, 0, 0x2],
[Keys.P2_UP, 0, 0x4],
[Keys.P2_DOWN, 0, 0x8],
[Keys.P2_A, 0, 0x10],
[Keys.P2_B, 0, 0x20],
[Keys.START, 2, 0x1],
[Keys.P2_START, 2, 0x2],
[Keys.SELECT, 2, 0x4],
[Keys.P2_SELECT, 2, 0x8],
[Keys.VK_7, 2, 0x10],
]);

It seems like the second parameter in each row should be the player number or similar, but in platform/verilog.ts both the player 1 keys and the player 2 keys are set to 0 (ie, player 1).

Compare with, eg, platforms/nes.ts which matches the player 1 keys with a 1 and the player 2 keys with a 2:

const JSNES_KEYCODE_MAP = makeKeycodeMap([
[Keys.A, 0, 0],
[Keys.B, 0, 1],
[Keys.SELECT, 0, 2],
[Keys.START, 0, 3],
[Keys.UP, 0, 4],
[Keys.DOWN, 0, 5],
[Keys.LEFT, 0, 6],
[Keys.RIGHT, 0, 7],
[Keys.P2_A, 1, 0],
[Keys.P2_B, 1, 1],
[Keys.P2_SELECT, 1, 2],
[Keys.P2_START, 1, 3],
[Keys.P2_UP, 1, 4],
[Keys.P2_DOWN, 1, 5],
[Keys.P2_LEFT, 1, 6],
[Keys.P2_RIGHT, 1, 7],
]);

as does Galaxian:

const GALAXIAN_KEYCODE_MAP = makeKeycodeMap([
[Keys.A, 0, 0x10], // P1
[Keys.LEFT, 0, 0x4],
[Keys.RIGHT, 0, 0x8],
[Keys.P2_A, 1, 0x10], // P2
[Keys.P2_LEFT, 1, 0x4],
[Keys.P2_RIGHT, 1, 0x8],
[Keys.SELECT, 0, 0x1],
[Keys.START, 1, 0x1],
[Keys.VK_2, 1, 0x2],
]);

From the definition of makeKeycodeMap(), I think it confirms the second item in each row is the index (eg, into the switches array), so that'd confirm that player 1 should be 0 and player 2 should be 1:

export function makeKeycodeMap(table : [KeyDef,number,number][]) : KeyCodeMap {
var map = new Map<number,KeyMapEntry>();
for (var i=0; i<table.length; i++) {
var entry = table[i];
var val : KeyMapEntry = {index:entry[1], mask:entry[2], def:entry[0]};
map[entry[0].c] = val;
}
return map;
}
const DEFAULT_CONTROLLER_KEYS : KeyDef[] = [
Keys.UP, Keys.DOWN, Keys.LEFT, Keys.RIGHT, Keys.A, Keys.B, Keys.SELECT, Keys.START,
Keys.P2_UP, Keys.P2_DOWN, Keys.P2_LEFT, Keys.P2_RIGHT, Keys.P2_A, Keys.P2_B, Keys.P2_SELECT, Keys.P2_START,
];

AFAICT the fix would just be to change the P2_* keys rows from index 0 to index 1, ie in these lines:

[Keys.P2_LEFT, 0, 0x1],
[Keys.P2_RIGHT, 0, 0x2],
[Keys.P2_UP, 0, 0x4],
[Keys.P2_DOWN, 0, 0x8],
[Keys.P2_A, 0, 0x10],
[Keys.P2_B, 0, 0x20],

And that appears to be the way that it was before the most recent change (to "standardize keys"), so my guess is that this is a cut'n'paste regression that was just overlooked in testing that change.

Ewen

PS: Also for anyone finding this, you have to click on the output video screen to ensure the input focus goes there for the keys to work; that was non-obvious initially. (Otherwise the input focus is, eg, the source editor, and pressing keys in that doesn't control the running program :-) )

Unknown Mnemonic Error

I am new to using the 8bitworkshop IDE and a novice programmer in general. While looking through the blog it seems that I just type my code and it instantly gets compiled. So I am wondering why I am getting unkown Mnemonic errors.
unknown mnemonic error

[Feature Request] Importing image files into the Asset Editor

Hi! First of all thanks a lot for creating such an amazing "all-in-one" IDE for retrodev, and for your books!

I really love the Asset Editor to draw / fix assets on the fly. However, when working for an actual game project it can be quite long to draw all the assets inside this tool (as there is no copy-paste function, no cancel, etc.).

I think a great feature addition to solve this "issue" would be to be able to import an image into the asset editor. Even a simple and straightforward import for a BMP or PNG file would be wonderful!

That way, we could use external drawing programs to draw the assets, and then upload the image to Asset Editor so it can "convert" it to the relevant assembly format.

For context, I'm currently toying with Atari 7800 and, AFAIK, there is no program that can convert an image file (whatever the format) to the weird graphic format used by the console. The only tools available (for 7800basic) are outputing assembly code in DASM format, that can't be used with CA65.

Anyway, thanks for your great work!

Missing xmacro.h

I can't find xmacro.h in the source here, even though it is referenced by most of the examples, and is needed for TIMER_SETUP - curious what else is already available within it.

Thanks!

Support for Amstrad CPC

The Amstrad CPC was a fairly popular home computer in France, Spain and the UK in the 80s. The CPC is available on the tiny8bit project. There is a cross-development environment called CPCTelera that uses SDCC and provides a large library of game-related functions, plus tools for assets conversion. There is as well an online version of the RASM assembler coupled with an embedded tiny8bit emulator, but I'm not aware of any project that allows to write C directly in the browser for the CPC.

Is there any plan to support the Amstrad CPC in 8bitworkshop?

Cannot build with current instructions

Running the instructions provided in Readme.md it does not work.
How to fix this ?

Steps (clean install )

SMP Debian 4.19.146-1 (2020-09-17)
node v10.21.0
npm 6.14.8

sudo apt-get install gcc g++ make htop git
sudo apt-get install nodejs npm mocha
sudo npm install -g npm@latest
sudo npm install make -g
sudo npm install npm-install-missing -g
sudo apt-get update
sudo apt-get upgrade

git clone https://github.com/sehugg/8bitworkshop.git
chmod -R 777 8bitworkshop/
cd 8bitworkshop/
git submodule init
git submodule update
npm-install-missing

Package Current Wanted Latest Location
chokidar MISSING 3.4.2 3.4.2 8bitworkshop
electron-store MISSING 6.0.0 6.0.0 8bitworkshop
jquery MISSING 3.5.1 3.5.1 8bitworkshop
reflect-metadata MISSING 0.1.13 0.1.13 8bitworkshop
update-electron-app MISSING 1.5.0 2.0.1 8bitworkshop
[ [ 'chokidar', '3.4.2' ],
[ 'electron-store', '6.0.0' ],
[ 'jquery', '3.5.1' ],
[ 'reflect-metadata', '0.1.13' ],
[ 'update-electron-app', '1.5.0' ] ]
Segmentation fault.] - extract:update-electron-app: http fetch GET 200 https://

Won't stop saying 'QuotaExceededError'

Whenever I make changes in the code (for any platform) something keeps popping up a the top that says 'QuotaExceededError.' What is this, and how do i fix it?

[Feature Request] Keyboard Input in Verilog

I'd love to use the Verilog to hack up a sorta 70s computer system. Unfortunately, the only inputs that I'm aware of are joystick and paddle ones. You could have a hotkey or mouse clickable button to switch between joystick and keyboard modes.

[Feature request] Highlighting variable name in whole code

It would be easier to track where everything is put with a double click on variable name highlighting all other places where variable repeats. For me, this feature is priceless when I try to learn already written code by someone else or myself and it makes easier to track typos. It even could be any highlighted word.

[Feature Request] add SNES compiler to platforms

I am working on a NES game right now, but I am considering making a SNES game in the future, but there are absolutely no online tools that I know of or have seen. Also, I'm terrible at assembly, so could it be with C? Thanks!

TypeError: s.startsWith is not a function

Hi!
I was trying out this Pi calculator for the Atari 2600 and when I put it into 8bitworkshop (I copied and pasted pi.s and pimacros.m, added include "vcs.h", processor 6502, and .org $F000) and then it threw an error at line 1 (no matter what was actually on the line):

TypeError: s.startsWith is not a function

Most likely, it's because I probably didn't do something correctly (I'm not very experienced with assembly) but upon searching the error on Google and on the GitHub Issues page, I found nothing about it.

Here's what the log said:

exception thrown: TypeError: s.startsWith is not a function,match_fn@https://8bitworkshop.com/v3.7.0/gen/worker/workermain.js:723:20
abort@https://8bitworkshop.com/v3.7.0/src/worker/asmjs/dasm.js:17:3953
Ee@https://8bitworkshop.com/v3.7.0/src/worker/asmjs/dasm.js:10:23222
jb@https://8bitworkshop.com/v3.7.0/src/worker/asmjs/dasm.js:9:14467
Ja@https://8bitworkshop.com/v3.7.0/src/worker/asmjs/dasm.js:9:3469
vc@https://8bitworkshop.com/v3.7.0/src/worker/asmjs/dasm.js:9:68187
Cb@https://8bitworkshop.com/v3.7.0/src/worker/asmjs/dasm.js:9:36692
callMain@https://8bitworkshop.com/v3.7.0/src/worker/asmjs/dasm.js:17:2560
execMain@https://8bitworkshop.com/v3.7.0/gen/worker/workermain.js:416:8
assembleDASM@https://8bitworkshop.com/v3.7.0/gen/worker/workermain.js:744:13
executeBuildSteps@https://8bitworkshop.com/v3.7.0/gen/worker/workermain.js:2701:27
handleMessage@https://8bitworkshop.com/v3.7.0/gen/worker/workermain.js:2781:22
onmessage@https://8bitworkshop.com/v3.7.0/gen/worker/workermain.js:2790:35
EventHandlerNonNull*@https://8bitworkshop.com/v3.7.0/gen/worker/workermain.js:2789:5
@https://8bitworkshop.com/v3.7.0/src/worker/loader.js:4:14
dasm.js:5:56212

exception thrown: TypeError: s.startsWith is not a function,match_fn@https://8bitworkshop.com/v3.7.0/gen/worker/workermain.js:723:20
abort@https://8bitworkshop.com/v3.7.0/src/worker/asmjs/dasm.js:17:3953
Ee@https://8bitworkshop.com/v3.7.0/src/worker/asmjs/dasm.js:10:23222
jb@https://8bitworkshop.com/v3.7.0/src/worker/asmjs/dasm.js:9:14467
Ja@https://8bitworkshop.com/v3.7.0/src/worker/asmjs/dasm.js:9:3469
vc@https://8bitworkshop.com/v3.7.0/src/worker/asmjs/dasm.js:9:68187
Cb@https://8bitworkshop.com/v3.7.0/src/worker/asmjs/dasm.js:9:36692
callMain@https://8bitworkshop.com/v3.7.0/src/worker/asmjs/dasm.js:17:2560
execMain@https://8bitworkshop.com/v3.7.0/gen/worker/workermain.js:416:8
assembleDASM@https://8bitworkshop.com/v3.7.0/gen/worker/workermain.js:744:13
executeBuildSteps@https://8bitworkshop.com/v3.7.0/gen/worker/workermain.js:2701:27
handleMessage@https://8bitworkshop.com/v3.7.0/gen/worker/workermain.js:2781:22
onmessage@https://8bitworkshop.com/v3.7.0/gen/worker/workermain.js:2790:35
EventHandlerNonNull*@https://8bitworkshop.com/v3.7.0/gen/worker/workermain.js:2789:5
@https://8bitworkshop.com/v3.7.0/src/worker/loader.js:4:14
dasm.js:5:56212

EXCEPTION match_fn@https://8bitworkshop.com/v3.7.0/gen/worker/workermain.js:723:20
abort@https://8bitworkshop.com/v3.7.0/src/worker/asmjs/dasm.js:17:3953
Ee@https://8bitworkshop.com/v3.7.0/src/worker/asmjs/dasm.js:10:23222
jb@https://8bitworkshop.com/v3.7.0/src/worker/asmjs/dasm.js:9:14467
Ja@https://8bitworkshop.com/v3.7.0/src/worker/asmjs/dasm.js:9:3469
vc@https://8bitworkshop.com/v3.7.0/src/worker/asmjs/dasm.js:9:68187
Cb@https://8bitworkshop.com/v3.7.0/src/worker/asmjs/dasm.js:9:36692
callMain@https://8bitworkshop.com/v3.7.0/src/worker/asmjs/dasm.js:17:2560
execMain@https://8bitworkshop.com/v3.7.0/gen/worker/workermain.js:416:8
assembleDASM@https://8bitworkshop.com/v3.7.0/gen/worker/workermain.js:744:13
executeBuildSteps@https://8bitworkshop.com/v3.7.0/gen/worker/workermain.js:2701:27
handleMessage@https://8bitworkshop.com/v3.7.0/gen/worker/workermain.js:2781:22
onmessage@https://8bitworkshop.com/v3.7.0/gen/worker/workermain.js:2790:35
EventHandlerNonNull*@https://8bitworkshop.com/v3.7.0/gen/worker/workermain.js:2789:5
@https://8bitworkshop.com/v3.7.0/src/worker/loader.js:4:14
workermain.ts:2743:14

EXCEPTION match_fn@https://8bitworkshop.com/v3.7.0/gen/worker/workermain.js:723:20
abort@https://8bitworkshop.com/v3.7.0/src/worker/asmjs/dasm.js:17:3953
Ee@https://8bitworkshop.com/v3.7.0/src/worker/asmjs/dasm.js:10:23222
jb@https://8bitworkshop.com/v3.7.0/src/worker/asmjs/dasm.js:9:14467
Ja@https://8bitworkshop.com/v3.7.0/src/worker/asmjs/dasm.js:9:3469
vc@https://8bitworkshop.com/v3.7.0/src/worker/asmjs/dasm.js:9:68187
Cb@https://8bitworkshop.com/v3.7.0/src/worker/asmjs/dasm.js:9:36692
callMain@https://8bitworkshop.com/v3.7.0/src/worker/asmjs/dasm.js:17:2560
execMain@https://8bitworkshop.com/v3.7.0/gen/worker/workermain.js:416:8
assembleDASM@https://8bitworkshop.com/v3.7.0/gen/worker/workermain.js:744:13
executeBuildSteps@https://8bitworkshop.com/v3.7.0/gen/worker/workermain.js:2701:27
handleMessage@https://8bitworkshop.com/v3.7.0/gen/worker/workermain.js:2781:22
onmessage@https://8bitworkshop.com/v3.7.0/gen/worker/workermain.js:2790:35
EventHandlerNonNull*@https://8bitworkshop.com/v3.7.0/gen/worker/workermain.js:2789:5
@https://8bitworkshop.com/v3.7.0/src/worker/loader.js:4:14
workermain.ts:2743:14

Sorry in advance if this is a problem on my end!

Error: Cannot find module '8bitworkshop/node_modules/electron/install.js'


# cd 8bitworkshop/
8bitworkshop# git submodule init
/8bitworkshop# git submodule update
8bitworkshop# npm i

> [email protected] postinstall 8bitworkshop/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

> [email protected] postinstall 8bitworkshop/node_modules/electron
> node install.js

internal/modules/cjs/loader.js:979
  throw err;
  ^

Error: Cannot find module '8bitworkshop/node_modules/electron/install.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:976:15)
    at Function.Module._load (internal/modules/cjs/loader.js:859:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Error: Values longer than 32 bits are not supported

Hi.
I am new in 8bitworkshop.
I am trying to use the platform to use my codes to write in the screen and I was able to write some characters, but when I try to change the characters by using the arrows keys, the system reports an issue:
Error: Values longer than 32 bits are not supported
Do you have any hint about what is this error?
issue.zip

in addition, I would like to know a way to enter numbers from mi laptop keyboard ... is it possible?

Electron Support

Hello!

I would love to use this as a stand alone app on my machine. Would there be any interest in adding electron support? I am a JavaScript dev and would be happy to help implement it.

PS. Love this project and loved the book on nes dev

graphics corruption on Firefox for the non-asm NES examples

  • NES
  • Hello World example
  • Firefox 66 on Linux gives the below result:
    image
  • similar corruptions can be observed in the other C-based examples. The ASM-code examples seem to work fine.
  • the example is okay when running in Chrome on the same system.

Edits cause IDE to un-pause

Version 2.1.0 editing for VCS

When I click pause in the IDE and make edits to the code the IDE will automatically unpause after successfully inputting a line. This is mostly a problem because when top-down coding, such as when copying from the book, the emulator will often stop working at some point and the only way to get it working again is to select another file and re-load the file I'm working on (I'll file a separate bug for that)

Editing linker cfg for NES

I was hoping to edit the linker config. I took the src/worker/lib/nes/neslib2.cfg file, renamed it, and used GitHub's web interface to upload the file into my repo. In my main C source file I added:
//#resource "example.cfg"
//#define CFGFILE example.cfg

The config file is listed in the project, but opening it causes an error message, and leaves the editor portion of the screen glitched and unusable.
TypeError: a.match is not a function https://8bitworkshop.com/v3.4.2/src/codemirror/codemirror.js (36:356)

I'll see if I can just edit it outside the IDE and continue that way, but it can be a bit of a land-mine while it's in the file list.

It's a really nice IDE, I like it!

[Feature Request] Add in X16 Emulator using cc65

Hi, If you've not already heard of it Commander X16 is an exciting new hardware project in development and the Emulator already exists. (https://github.com/commanderx16/x16-emulator) Someone has already compiled this to WASM although I've not got the details on how.

Could you add this as an emu option along with cc65, giving the possibility of coding in ASM, BASIC or C?

I can help, but I'm just getting up to speed on WASM (it's new to me). I'm going to have a play around and possibly fork this repo, but I have a feeling you'd be able to do it much faster :D If I make any progress I'll be sure to update this thread.

"TypeError: qs is undefined" when loading index.html via localhost

Environment:-
Firefox 56, 64bit.
OS:- Ubuntu 16.04 LTS, 64bit.

Steps to repro:-
1- From a terminal window:- git clone https://github.com/sehugg/8bitworkshop
2- cd 8bitworkshop
3- run a local server, e.g.:- python -m http.server
4- Using Firefox, goto: "http://localhost:8000/"
**Please note that this issue also repros on Chrome.
screenshotscreenshot from 2017-11-11 15-16-34

Result:-
You'll get a messagebox stating: "TypeError: qs is undefined" on FireFox

Expected result:-
8bitworkship web site/ IDE loads up without any errors.

Apple II palette broken in 3.5.0

The Apple II palette looked right in version 3.4.2. The HGR Test would cycle through green and magenta as expected on real hardware. Version 3.5.0 shows some strange red instead.

Release Version 3.5

The latest version online is 3.5, but the github releases page only has up to 3.4

Verilog: Can't create more than 5 files in a project

Hi,
Thanks for this wonderful veriflog IDE / Visualizer.
I try to create a project with more than 5 files, but each time I create a new one, it fails and the project can't build. I don't know if it is a generic issue.

[Possible bug] Asset editor gets reset

I cannot make any tiles because of this bug.
Steps to reproduce:

  1. Create an empty array for the asset editor
  2. Draw stuff in the asset editor
  3. Switch to a tab other than the asset editor
  4. Come back to the asset editor
  5. The tiles are now all empty and there is no change in the array.

Metastability

Hi Steven,

i am reading your book "Designing Video Games HW in verilog". Very awesome book and your https://8bitworkshop.com/ is amazing - thanks a lot.

When i run your moving ball with icestick (ice401k) i got an unstable design, but i did some modification. I changed the vsync and collison trigger into:

reg [2:0] vsync_r = 0;
always @(posedge sysclk)
vsync_r = {vsync_r[1:0], vsync};

reg [2:0] ball_vert_collide_r = 0;
always @(posedge sysclk)
ball_vert_collide_r = {ball_vert_collide_r[1:0], ball_vert_collide};

reg [2:0] ball_horiz_collide_r = 0;
always @(posedge sysclk)
ball_horiz_collide_r = {ball_horiz_collide_r[1:0], ball_horiz_collide);

// update horizontal timer
always @(posedge sysclk or posedge reset)
begin
if (reset) begin
// reset ball position to center
ball_hpos <= ball_horiz_initial;
ball_vpos <= ball_vert_initial;
end else if (vsync_r[2:1] == 2'b01) begin
// add velocity vector to ball position
ball_hpos <= ball_hpos + ball_horiz_move;
ball_vpos <= ball_vpos + ball_vert_move;
end
end

// vertical bounce
always @(posedge sysclk)
begin
if (ball_vert_collide_r[2:1] == 2'b01)
ball_vert_move <= -ball_vert_move;
end

// horizontal bounce
always @(posedge sysclk)
begin
if (ball_horiz_collide_r[2:1] == 2'b01)
ball_horiz_move <= -ball_horiz_move;
end

With these changes it works. Could you please comment on that?

br,

HD

Feature request: support MADS assembler

I would love it if maybe there was a VCS (MADS) platform or maybe an Assembler option under the Platform selection that allowed using the MADS assembler (http://mads.atari8.info/ ) I've used this in the WUDSN IDE and it seems to work fine for 2600 development.

Obviously this goes beyond the scope of this being a book-support tool and would mean it moving toward being a real development tool so I consider this request a bit of a long shot but I hope you consider it!

Thanks so much for making this awesome tool and the wonderfully informative book!

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.