8bitworkshop - online IDE now supports NES
Moderator: Moderators
8bitworkshop - online IDE now supports NES
I found this to be pretty impressive:
https://8bitworkshop.com/
I first saw it when it supported Atari 2600 only, and now it also supports NES, some (I think 8080-based) arcade hardware, Apple ][, and even custom Verilog machines. I've never seen such an IDE for Verilog before, that provides audio and video output.
Plenty of NES example code is there, in C and assembly.
edit: Project is GPL3, and may be run locally.
https://github.com/sehugg/8bitworkshop
https://8bitworkshop.com/
I first saw it when it supported Atari 2600 only, and now it also supports NES, some (I think 8080-based) arcade hardware, Apple ][, and even custom Verilog machines. I've never seen such an IDE for Verilog before, that provides audio and video output.
Plenty of NES example code is there, in C and assembly.
edit: Project is GPL3, and may be run locally.
https://github.com/sehugg/8bitworkshop
Re: 8bitworkshop - online IDE now supports NES
Wow! I saw this come up in my Twitter or RSS feeds a few days ago and bookmarked it. This is really quite impressive though. Not that it would replace my local setup, but maybe I can get some more local gamedevs interested in retro-dev.
Re: 8bitworkshop - online IDE now supports NES
That looks really impressive. Is it really possible to develop a game in C? What about the function call stack frame performance hits, etc.? How do you break a C program up into swappable banks? I guess I'm really asking, is this a toy or can you really do something with this?
- rainwarrior
- Posts: 8732
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: 8bitworkshop - online IDE now supports NES
This IDE will let you do C or assembly, some of the examples are in C, some aren't. This thing seems to provide the cc65 toolchain which will do either.zeroone wrote:Is it really possible to develop a game in C? What about the function call stack frame performance hits, etc.? How do you break a C program up into swappable banks? I guess I'm really asking, is this a toy or can you really do something with this?
Whether you can make a game in C is a different topic/question, but yes you can, and lots of people have at this point. It seems to have used shiru's neslib as a starting point. Banking is possible too.
I'm not really sure how this IDE handles banking... it seems to have a bankswitching example, but doesn't look like it provides access to a CFG file to set it up? There's a "memory map" view which looks kinda like a CFG file but I can't figure out how to edit it. Doesn't seem to have any documentation?
Re: 8bitworkshop - online IDE now supports NES
You have to pay for it: https://www.amazon.com/gp/product/10759 ... e2c322d80arainwarrior wrote:Doesn't seem to have any documentation?
Re: 8bitworkshop - online IDE now supports NES
Yes it is.zeroone wrote:Is it really possible to develop a game in C?
When writing NES games in C, you're better off using only global variables. This way, you don't need to have a stack for parameters and local variables. Otherwise, yes, the performance can suffer immensely.zeroone wrote:What about the function call stack frame performance hits, etc.?
(You can simulate function calls with parameters by declaring macros, so your code still looks clean.)
In the same way you do this in Assembly. The cc65 compiler lets you put code and data into segments by using #pragma and then code-name, rodata-name, bss-name:zeroone wrote:How do you break a C program up into swappable banks?
https://cc65.github.io/doc/cc65.html#s7
My game "City Trouble":
Gameplay video: https://youtu.be/Eee0yurkIW4
Download (ROM, manual, artworks): http://www.denny-r-walter.de/city.html
Gameplay video: https://youtu.be/Eee0yurkIW4
Download (ROM, manual, artworks): http://www.denny-r-walter.de/city.html
Re: 8bitworkshop - online IDE now supports NES
I recognize some of those graphics.
This is wayyyy cool, I remember running across those books on Amazon, definitely interested.
This is wayyyy cool, I remember running across those books on Amazon, definitely interested.
Re: 8bitworkshop - online IDE now supports NES
I also instantly recognized the font (and the entire order of the chr sheet.)
Re: 8bitworkshop - online IDE now supports NES
It looks like the project is GPL3, and can be run locally if needed:
https://github.com/sehugg/8bitworkshop
I've noticed when making changes (in the Verilog compiler at least) if the video starts getting jittery, hitting the start/stop recording button clears it up.
https://github.com/sehugg/8bitworkshop
I've noticed when making changes (in the Verilog compiler at least) if the video starts getting jittery, hitting the start/stop recording button clears it up.
Re: 8bitworkshop - online IDE now supports NES
yes, cc65 takes 1 page(256 bytes at least) for running stack to call functions, but i insist on c environment.DRW wrote:Yes it is.zeroone wrote:Is it really possible to develop a game in C?
When writing NES games in C, you're better off using only global variables. This way, you don't need to have a stack for parameters and local variables. Otherwise, yes, the performance can suffer immensely.zeroone wrote:What about the function call stack frame performance hits, etc.?
(You can simulate function calls with parameters by declaring macros, so your code still looks clean.)
In the same way you do this in Assembly. The cc65 compiler lets you put code and data into segments by using #pragma and then code-name, rodata-name, bss-name:zeroone wrote:How do you break a C program up into swappable banks?
https://cc65.github.io/doc/cc65.html#s7
Re: 8bitworkshop - online IDE now supports NES
also u can define globle ver. in zero-page, and extern them in c file. then u can save the memory. but be careful, cc65 also use zero-page as its own system low-level funcs and bootloader usage. DO NOT ACCESS OVER $60(Hex), in another word, u can use 96 bytes of ram space in zero-page freely
- rainwarrior
- Posts: 8732
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: 8bitworkshop - online IDE now supports NES
You can set this up to use far less than 256 bytes. 64 bytes is probably more than adequate for most purposes.aquasnake wrote:cc65 takes 1 page(256 bytes at least) for running stack to call functions
Adjusting it for this 8bitworkshop IDE thing might be impossible though, unfortunately.
The cc65 runtime takes 26 bytes of zeropage. I don't know where you get the number 96 from, because there should be 240 bytes free. On top of this, you should not be using raw hex addresses for your variables. Reserve them in the ZEROPAGE segment, and the linker will ensure they don't overlap with anything else allocated there.aquasnake wrote:also u can define globle ver. in zero-page, and extern them in c file. then u can save the memory. but be careful, cc65 also use zero-page as its own system low-level funcs and bootloader usage. DO NOT ACCESS OVER $60(Hex), in another word, u can use 96 bytes of ram space in zero-page freely
Re: 8bitworkshop - online IDE now supports NES
;; FIXME: optimize zeropage usagerainwarrior wrote:You can set this up to use far less than 256 bytes. 64 bytes is probably more than adequate for most purposes.aquasnake wrote:cc65 takes 1 page(256 bytes at least) for running stack to call functions
Adjusting it for this 8bitworkshop IDE thing might be impossible though, unfortunately.
The cc65 runtime takes 26 bytes of zeropage. I don't know where you get the number 96 from, because there should be 240 bytes free. On top of this, you should not be using raw hex addresses for your variables. Reserve them in the ZEROPAGE segment, and the linker will ensure they don't overlap with anything else allocated there.aquasnake wrote:also u can define globle ver. in zero-page, and extern them in c file. then u can save the memory. but be careful, cc65 also use zero-page as its own system low-level funcs and bootloader usage. DO NOT ACCESS OVER $60(Hex), in another word, u can use 96 bytes of ram space in zero-page freely
SCREEN_PTR = $62 ;2
CRAM_PTR = $64 ;2
CHARCOLOR = $66
BGCOLOR = $67
RVS = $68
CURS_X = $69
CURS_Y = $6a
tickcount = $6b ;2
VBLANK_FLAG = $70
ringbuff = $0200
ringwrite = $71
ringread = $72
ringcount = $73
ppuhi = $74
ppulo = $75
ppuval = $76
screenrows = (30-1)
charsperline = 32
xsize = charsperline
cc65 normally use $62 to $80 for system usage, and they are stored at fixed address.
only below $62 here is safe to use, so i suggest not to over $60. and over $80, there maybe exist other stack
- rainwarrior
- Posts: 8732
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: 8bitworkshop - online IDE now supports NES
I strongly recommend that you stop hard-coding addresses and use reservations instead:
As for what you're doing with $80-$FF I have no idea what you've set up there, but that's not a normal CC65 thing. You are doing something custom that has reserved that, I guess.
Code: Select all
.zeropage
SCREEN_PTR: .res 2
CRAM_PTR: .res 2
CHARCOLOR: .res 1
BGCOLOR: .res 1
RVS: .res 1
CURS_X: .res 1
CURS_Y: .res 1
; etc.
Re: 8bitworkshop - online IDE now supports NES
I just noticed there's an example that shows how to include a CFG (guess what it's based on):rainwarrior wrote: I'm not really sure how this IDE handles banking... it seems to have a bankswitching example, but doesn't look like it provides access to a CFG file to set it up? There's a "memory map" view which looks kinda like a CFG file but I can't figure out how to edit it. Doesn't seem to have any documentation?
https://8bitworkshop.com/projects/?n=ne ... 65-example
other projects not listed inside the IDE: https://8bitworkshop.com/projects/
Code: Select all
;; Modified by @sehugg for @8bitworkshop
;; - load example.cfg file
;; - omit crt0 and neslib libs
;;
;#resource "example.cfg"
;#define CFGFILE example.cfg
;#define LIBARGS ,
;; end of special instructions