diff --git a/images/arcadegames.jpg b/images/arcadegames.jpg
new file mode 100644
index 00000000..d543a84f
Binary files /dev/null and b/images/arcadegames.jpg differ
diff --git a/images/atarivcs.jpg b/images/atarivcs.jpg
new file mode 100644
index 00000000..0b01d318
Binary files /dev/null and b/images/atarivcs.jpg differ
diff --git a/index.html b/index.html
index acf4260c..e33b65ba 100644
--- a/index.html
+++ b/index.html
@@ -184,23 +184,6 @@ canvas.pixelated {
image-rendering: pixelated; /* Awesome future-browsers */
-ms-interpolation-mode: nearest-neighbor; /* IE */
}
-div.bitmap_editor {
- position: fixed;
- left: 2%;
- width: 46%;
- top: 10%;
- bottom: 10%;
- background-color: #333;
- border-color: #fff;
- border-style: ridge;
- border-radius: 16px;
- color: #66ff66;
- white-space: pre;
- padding: 20px;
- z-index: 9;
- font-family: "Andale Mono", "Menlo", "Lucida Console", monospace;
- font-size: 12pt;
-}
@@ -290,12 +273,38 @@ div.bitmap_editor {
Making Games For The Atari 2600
-
- PC: $
0000
- X:
0
- Y:
0
-Dest: $
0000/0
-
+
+
+
+
+
+
What would you like to start programming?
+
+
+
+
![Atari 2600 four-switch wood veneer version, dating from 1980-1982 (photo by Evan Amos)](images/atarivcs.jpg)
+
+
+
![Galaxian arcade system board (photo by Dennis van Zuijlekom, CC BY-SA 2.0)](images/arcadegames.jpg)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -326,11 +335,11 @@ Dest: $
0000/0
-
+
@@ -340,10 +349,9 @@ Dest: $
0000/0
-
+
diff --git a/presets/vicdual/soundtest.c b/presets/vicdual/soundtest.c
index fd4bb65d..7a648dad 100644
--- a/presets/vicdual/soundtest.c
+++ b/presets/vicdual/soundtest.c
@@ -30,12 +30,6 @@ __asm
; set up stack pointer, interrupt flag
LD SP,#0xE800
DI
-; copy initialized data
- LD BC, #l__INITIALIZER
- LD A, B
- LD DE, #s__INITIALIZED
- LD HL, #s__INITIALIZER
- LDIR
__endasm;
main();
}
@@ -176,7 +170,7 @@ void ay8910test() {
}
void main() {
- palette = 2;
+ palette = 0;
memcpy(tileram, font8x8, sizeof(font8x8));
memset(cellram, CHAR(' '), sizeof(cellram));
draw_box(0,0,27,31,BOX_CHARS);
diff --git a/src/emu.js b/src/emu.js
index 0d2b645c..0522cbfc 100644
--- a/src/emu.js
+++ b/src/emu.js
@@ -401,6 +401,7 @@ var Base6502Platform = function() {
if (fn.endsWith(".s")) return "ca65";
return "dasm";
}
+ this.getDefaultExtension = function() { return ".a"; };
}
function dumpRAM(ram, ramofs, ramlen) {
@@ -588,6 +589,7 @@ var BaseZ80Platform = function() {
if (fn.endsWith(".s")) return "sdasz80";
return "z80asm";
}
+ this.getDefaultExtension = function() { return ".c"; };
// TODO
//this.getOpcodeMetadata = function() { }
}
@@ -646,6 +648,7 @@ var Base6809Platform = function() {
// TODO: don't create new CPU
return new CPU6809().disasm(read(pc), read(pc+1), read(pc+2), read(pc+3), read(pc+4), pc);
}
+ this.getDefaultExtension = function() { return ".asm"; };
//this.getOpcodeMetadata = function() { }
}
diff --git a/src/platform/vcs.js b/src/platform/vcs.js
index bc6252c0..5963eac0 100644
--- a/src/platform/vcs.js
+++ b/src/platform/vcs.js
@@ -123,6 +123,7 @@ var VCSPlatform = function() {
this.getToolForFilename = function(fn) {
return "dasm";
}
+ this.getDefaultExtension = function() { return ".a"; };
};
PLATFORMS['vcs'] = VCSPlatform;
diff --git a/src/platform/vicdual.js b/src/platform/vicdual.js
index 86653939..f360ffae 100644
--- a/src/platform/vicdual.js
+++ b/src/platform/vicdual.js
@@ -64,7 +64,7 @@ var VicDualPlatform = function(mainElement) {
for (var xx=0; xx<32; xx++) {
var code = ram.mem[vramofs+xx];
var data = ram.mem[0x800 + (code<<3) + yy];
- var col = (code>>5) + (palbank<<4);
+ var col = (code>>5) + (palbank<<3);
var color1 = palette[(colorprom[col] >> 1) & 7];
var color2 = palette[(colorprom[col] >> 5) & 7];
for (var i=0; i<8; i++) {
diff --git a/src/ui.js b/src/ui.js
index 38fdce53..a30bc8ab 100644
--- a/src/ui.js
+++ b/src/ui.js
@@ -249,7 +249,7 @@ function _createNewFile(e) {
var filename = prompt("Create New File", "newfile.a");
if (filename && filename.length) {
if (filename.indexOf(".") < 0) {
- filename += ".a";
+ filename += platform.getDefaultExtension();
}
qs['file'] = "local/" + filename;
gotoNewLocation();
@@ -1038,9 +1038,27 @@ function setupDebugControls(){
}
function showWelcomeMessage() {
- if (!localStorage.getItem("8bitworkshop.hello"))
- {
+ if (!localStorage.getItem("8bitworkshop.splash")) {
+ // OH BOOTSTRAP YOU ARE SO AWESOME A+++++
+ // https://stackoverflow.com/questions/28270333/how-do-i-know-which-button-is-click-when-bootstrap-modal-closes
+ // https://github.com/jschr/bootstrap-modal/issues/224
+ var whichPlatform;
+ $('#welcomeModal button').on('click', function(event) {
+ whichPlatform = $(event.target).data('platform');
+ });
+ $('#welcomeModal img').on('click', function(event) {
+ whichPlatform = $(event.target).data('platform');
+ });
+ $('#welcomeModal').on('hidden.bs.modal', function (event) {
+ localStorage.setItem('8bitworkshop.splash', true);
+ if (whichPlatform && whichPlatform != qs['platform']) {
+ window.location = "?platform=" + whichPlatform;
+ }
+ }).modal('show');
+ }
+ else if (!localStorage.getItem("8bitworkshop.hello")) {
// Instance the tour
+ var is_vcs = platform_id == 'vcs';
var tour = new Tour({
autoscroll:false,
//storage:false,
@@ -1048,13 +1066,14 @@ function showWelcomeMessage() {
{
element: "#editor",
title: "Welcome to 8bitworkshop!",
- content: "Type your 6502 code on the left side, and it'll be assembled in real-time. All changes are saved to browser local storage.",
+ content: is_vcs ? "Type your 6502 assembly code into the editor, and it'll be assembled in real-time. All changes are saved to browser local storage."
+ : "Type your C source code into the editor, and it'll be compiled in real-time. All changes are saved to browser local storage."
},
{
element: "#emulator",
placement: 'left',
- title: "Atari VCS Emulator",
- content: "This is an emulator for the Atari VCS/2600. We'll load your assembled code into the emulator whenever you make changes.",
+ title: "Emulator",
+ content: "This is an emulator for the \"" + platform_id + "\" platform. We'll load your compiled code into the emulator whenever you make changes."
},
{
element: "#preset_select",
@@ -1065,12 +1084,12 @@ function showWelcomeMessage() {
element: "#debug_bar",
placement: 'bottom',
title: "Debug Tools",
- content: "Use these buttons to set breakpoints, single step through code, pause/resume, and perform timing analysis."
+ content: "Use these buttons to set breakpoints, single step through code, pause/resume, and use debugging tools."
},
{
element: "#dropdownMenuButton",
title: "Main Menu",
- content: "Click the menu to create new files and share your work with others."
+ content: "Click the menu to switch between platforms, create new files, or share your work with others."
},
]});
tour.init();
@@ -1109,6 +1128,7 @@ function startPlatform() {
platform = new PLATFORMS[platform_id]($("#emulator")[0]);
PRESETS = platform.getPresets();
if (qs['file']) {
+ showWelcomeMessage();
// start platform and load file
preloadWorker(qs['file']);
setupDebugControls();