Jump to content
IGNORED

2600 programming in a web browser


sm3

Recommended Posts

Is that guy on AtariAge? I don't recognize the name, but don't really know many screenname to real name mappings around here.

 

That's a good question, I'm not sure!

 

I received his book today from Amazon. About 234 pages in total. So that answers my question, a CreateSpace book looks just like a normal book! ;)

  • Like 1
Link to comment
Share on other sites

So the 8-bit Workshop combines the Javatari 2600 emulator, DASM assembler and a web-based editor and debugger, all in the browser.

 

It seems the book expands upon the example code he has on the web page and starts off with a 6502 assembly language tutorial.

 

If you are new to 2600 programming, it might be worth picking up a copy of his book.

 

I can't speak for the Kindle version, because I didn't get that version, but the paperback version is good. I never liked how technical books are formatted in the Kindle, but maybe if you view it on a PC or large tablet, the layout will work.

Link to comment
Share on other sites

I ordered the book as well mostly out of curiosity and to support such efforts.

It was super fast as print on demand, even in Germany :)

While it is a bit vague on some things (like 6502 vs 6507 etc) it is a very nice hands-on tutorial to start coding.

Not superior to all the stella PDFs around but well presented in a not-too-complex way. So for people who actually want to code and not so much learn about all the backgrounds, this might be perfect.

Nice for a longer train trip or something - easy to read.

Link to comment
Share on other sites

If I may add:

I see no download of their used macros? Which is a downside for me.

Great plus, however, is the real time compilation/execution cycle!

 

The macros are built in to the file: http://8bitworkshop.com/dasm.js

 

...as long strings of decimal numbers. Using this site:

 

http://www.kjetil-hartveit.com/blog/10/hex-binary-decimal-octal-and-ascii-converter

 

I went decimal -> To Hex -> To ascii...

 

...and found that macro.h (Version 1.06, 3/SEPTEMBER/2004) and vcs.h (Version 1.05, 13/November/2003) are from dasm.

 

Xmacro.h is:

 

;-------------------------------------------------------

; Usage: TIMER_SETUP lines

; where lines is the number of scanlines to skip (> 2).

; The timer will be set so that it expires before this number

; of scanlines. A WSYNC will be done first.

 

MAC TIMER_SETUP

.lines SET {1}

lda #(((.lines-1)*76-14)/64)

sta WSYNC

sta TIM64T

ENDM

 

;-------------------------------------------------------

; Use with TIMER_SETUP to wait for timer to complete.

; You may want to do a WSYNC afterwards, since the timer

; is not accurate to the beginning/end of a scanline.

 

MAC TIMER_WAIT

.waittimer

lda INTIM

bne .waittimer

ENDM

 

Also... if you want to see the book's source code:

 

http://8bitworkshop.com/presets/examples/

 

they also have other source code of various games & demos here:

 

http://8bitworkshop.com/presets/games/

Edited by eccofonic
  • Like 2
Link to comment
Share on other sites

Got "Making Games For The Atari 2600" today. It has a description of what is going on in xmacro in Chapter 12, but no listing as in my post above.

 

And although the javascript-based IDE is nice... looks like you have to be online to use it. Too bad there's no offline version...

Edited by eccofonic
Link to comment
Share on other sites

And although the javascript-based IDE is nice... looks like you have to be online to use it. Too bad there's no offline version...

 

I concur with this feeling, and ended up deciding to create a Visual Studio Code extension that works in a similar fashion: code editing on one tab, auto running the ROM on another. It's heavily inspired by 8bitworkshop, but adds all the goodies a good editor allows you like having other include files, code navigation, shortcuts, being offline, etc. A truly modern, no-compromise approach to 6502/Atari development, in my opinion.

 

The caveat is that I just started it and it's nowhere near ready. Right now it only allows editing asm files with some language features. It does dasm compilation on the background (for error checking etc), but doesn't export ROMs nor does it open the emulator tab with the ROM yet. I've been adding features at a constant pace though - just added navigate-to-definition yesterday, for example - and hope to have exporting/emulating soon. Also, it's open source, so anyone can contribute with suggestions/bug fixes/features/etc.

 

(I swear I didn't join the forum just to spam this - I've been lurking for a while - but thought it was worth mentioning now.)

Edited by zeh
  • Like 1
Link to comment
Share on other sites

 

I concur with this feeling, and ended up deciding to create a Visual Studio Code extension that works in a similar fashion: code editing on one tab, auto running the ROM on another. It's heavily inspired by 8bitworkshop, but adds all the goodies a good editor allows you like having other include files, code navigation, shortcuts, being offline, etc. A truly modern, no-compromise approach to 6502/Atari development, in my opinion.

 

The caveat is that I just started it and it's nowhere near ready. Right now it only allows editing asm files with some language features. It does dasm compilation on the background (for error checking etc), but doesn't export ROMs nor does it open the emulator tab with the ROM yet. I've been adding features at a constant pace though - just added navigate-to-definition yesterday, for example - and hope to have exporting/emulating soon. Also, it's open source, so anyone can contribute with suggestions/bug fixes/features/etc.

 

(I swear I didn't join the forum just to spam this - I've been lurking for a while - but thought it was worth mentioning now.)

That's a cool idea. Seems worthy of its own topic don't you think? Maybe include some screen shots as you add new functionality.

Link to comment
Share on other sites

 

I concur with this feeling, and ended up deciding to create a Visual Studio Code extension that works in a similar fashion: code editing on one tab, auto running the ROM on another. It's heavily inspired by 8bitworkshop, but adds all the goodies a good editor allows you like having other include files, code navigation, shortcuts, being offline, etc. A truly modern, no-compromise approach to 6502/Atari development, in my opinion.

 

The caveat is that I just started it and it's nowhere near ready. Right now it only allows editing asm files with some language features. It does dasm compilation on the background (for error checking etc), but doesn't export ROMs nor does it open the emulator tab with the ROM yet. I've been adding features at a constant pace though - just added navigate-to-definition yesterday, for example - and hope to have exporting/emulating soon. Also, it's open source, so anyone can contribute with suggestions/bug fixes/features/etc.

 

(I swear I didn't join the forum just to spam this - I've been lurking for a while - but thought it was worth mentioning now.)

 

That's a pretty cool project. If you like, you can also consider 6502.ts (https://github.com/6502ts/6502.ts) as the embedded emulator. It is written in Typescript (which should fit well in the context of a VSC plugin), and overall compatibility is comparable to Javatari.js. TIA is better (the 6502.ts core is the core that is going to be running in Stella 5), CPU and timers are currently slightly less accurate. It's featureset is somewhat different; in particular, it supports WebGL for display and phosphor simulation, and it comes with a debugger that could be integrated into VSC. Speed is at least as good as Javatari.

Edited by DirtyHairy
Link to comment
Share on other sites

That's a cool idea. Seems worthy of its own topic don't you think? Maybe include some screen shots as you add new functionality.

 

Yeah, I should probably do that soon. I just don't like talking too much about a project until it's actually fun and ready to be used though; so other than my confused twitter audience, it's not "public" yet.

 

 

That's a pretty cool project. If you like, you can also consider 6502.ts (https://github.com/6502ts/6502.ts) as the embedded emulator. It is written in Typescript (which should fit well in the context of a VSC plugin), and overall compatibility is comparable to Javatari.js. TIA is better (the 6502.ts core is the core that is going to be running in Stella 5), CPU and timers are currently slightly less accurate. It's featureset is somewhat different; in particular, it supports WebGL for display and phosphor simulation, and it comes with a debugger that could be integrated into VSC. Speed is at least as good as Javatari.

 

Thanks DirtyHarry. That's actually something I was wondering - how good 6502.ts would play with the extension. I actually have it as an item deep down on the TODO list, as I've seen you talking about it here a while ago, but haven't had much time to look into it. I'll do as soon as I'm ready to move back to the preview/debug part. Right now I have an early implementation that opens a Javatari tab, but doesn't really load the ROM into it.

 

It's good to know of the debugger - that's the one part I was mostly curious about, as I want to leverage all the VSC's debugging features into the extension. Just took a quick look and I'm loving the debugger interface and features. And being in TS certainly helps too if I want to submit a PR or debug an issue in the future. My language of choice right now.

Edited by zeh
Link to comment
Share on other sites

 

Yeah, I should probably do that soon. I just don't like talking too much about a project until it's actually fun and ready to be used though; so other than my confused twitter audience, it's not "public" yet.

 

 

Thanks DirtyHarry. That's actually something I was wondering - how good 6502.ts would play with the extension. I actually have it as an item deep down on the TODO list, as I've seen you talking about it here a while ago, but haven't had much time to look into it. I'll do as soon as I'm ready to move back to the preview/debug part. Right now I have an early implementation that opens a Javatari tab, but doesn't really load the ROM into it.

 

It's good to know of the debugger - that's the one part I was mostly curious about, as I want to leverage all the VSC's debugging features into the extension. Just took a quick look and I'm loving the debugger interface and features. And being in TS certainly helps too if I want to submit a PR or debug an issue in the future. My language of choice right now.

 

:) Nice to hear, and I share your sentiments on Typescript: I really think it is the next evolution of JS for heavy applications. If you want to check out the current state, you can find runnable builds of the various frontend components here: https://6502ts.github.io/ . The interesting parts are Stellerator (a React frontend aimed at playing) and the 2600 debugger (a CLI-based frontend that integrates the debugger).

 

Integrating 6502.ts into your project would most definitely work. I have long been planning on documenting the various front-facing APIs, so this would be a nice opportunity to do so. I can also give you a hand integrating the emulator once you are ready to load and run ROMs.

 

The debugger currently supports breakpoints, inspection and execution tracing. I have several plans for extending it (watch expressions, conditional breakpoints, etc.), but most of my time currently goes into real life atm. Integrating it would require some changes (mainly more decoupling from the CLI), but I have been planning to do so eventually anyway. Just drop me a note if you'd like some assistance, I'll be happy to contribue.

Edited by DirtyHairy
Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...