mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2025-02-09 02:31:21 +00:00
VIC Dual example; platforms in menu
This commit is contained in:
parent
fe9b295539
commit
ca9a4afec3
11
index.html
11
index.html
@ -187,17 +187,18 @@ canvas.pixelated {
|
|||||||
<li><a class="dropdown-item" href="#" id="item_share_file">Share File as GitHub Gist...</a></li>
|
<li><a class="dropdown-item" href="#" id="item_share_file">Share File as GitHub Gist...</a></li>
|
||||||
<li><a class="dropdown-item" href="#" id="item_reset_file">Revert to Original...</a></li>
|
<li><a class="dropdown-item" href="#" id="item_reset_file">Revert to Original...</a></li>
|
||||||
<li><a class="dropdown-item" href="#" id="item_download_rom">Download ROM Image...</a></li>
|
<li><a class="dropdown-item" href="#" id="item_download_rom">Download ROM Image...</a></li>
|
||||||
<!--
|
|
||||||
<li class="dropdown dropdown-submenu">
|
<li class="dropdown dropdown-submenu">
|
||||||
<a tabindex="-1" href="#">Platform</a>
|
<a tabindex="-1" href="#">Platform</a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a class="dropdown-item" href="?platform=vcs" id="item_platform_vcs">Atari VCS</a></li>
|
<li><a class="dropdown-item" href="?platform=vcs" id="item_platform_vcs">Atari VCS</a></li>
|
||||||
<li><a class="dropdown-item" href="?platform=apple2" id="item_platform_apple2">Apple ][</a></li>
|
<!--<li><a class="dropdown-item" href="?platform=apple2" id="item_platform_apple2">Apple ][</a></li>-->
|
||||||
<li><a class="dropdown-item" href="?platform=vector" id="item_platform_atarivec">Asteroids</a></li>
|
<li><a class="dropdown-item" href="?platform=mw8080bw" id="item_platform_mw8080bw">Midway 8080 B&W</a></li>
|
||||||
<li><a class="dropdown-item" href="?platform=mw8080bw" id="item_platform_mw8080bw">Midway 8080 B/W</a></li>
|
<li><a class="dropdown-item" href="?platform=vicdual" id="item_platform_vicdual">VIC Dual</a></li>
|
||||||
|
<li><a class="dropdown-item" href="?platform=galaxian" id="item_platform_galaxian">Galaxian/Scramble</a></li>
|
||||||
|
<li><a class="dropdown-item" href="?platform=vector-z80color" id="item_platform_vector_z80color">Atari Color Vector (Z80)</a></li>
|
||||||
|
<li><a class="dropdown-item" href="?platform=williams" id="item_platform_williams">Williams (Z80)</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
-->
|
|
||||||
<li class="dropdown dropdown-submenu">
|
<li class="dropdown dropdown-submenu">
|
||||||
<a tabindex="-1" href="#">Debug</a>
|
<a tabindex="-1" href="#">Debug</a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
|
71
presets/vicdual/vic1.c
Normal file
71
presets/vicdual/vic1.c
Normal file
File diff suppressed because one or more lines are too long
44
src/emu.js
44
src/emu.js
@ -561,6 +561,50 @@ var POKEYDeviceChannel = function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////// CPU sound
|
||||||
|
|
||||||
|
var CPUSoundChannel = function(cpu, clockRate) {
|
||||||
|
var sampleRate;
|
||||||
|
var buffer;
|
||||||
|
var lastbufpos=0;
|
||||||
|
var curSample=0;
|
||||||
|
var clocksPerSample;
|
||||||
|
|
||||||
|
this.setBufferLength = function (length) {
|
||||||
|
buffer = new Int32Array(length);
|
||||||
|
};
|
||||||
|
|
||||||
|
this.getBuffer = function () {
|
||||||
|
return buffer;
|
||||||
|
};
|
||||||
|
|
||||||
|
this.setSampleRate = function (rate) {
|
||||||
|
sampleRate = rate;
|
||||||
|
};
|
||||||
|
|
||||||
|
this.getSetDACFunction = function() {
|
||||||
|
return function(a,v) {
|
||||||
|
var bufpos = Math.floor(cpu.getTstates() / clocksPerSample);
|
||||||
|
while (lastbufpos < bufpos)
|
||||||
|
buffer[lastbufpos++] = curSample;
|
||||||
|
lastbufpos = bufpos;
|
||||||
|
curSample = v;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
this.generate = function (length) {
|
||||||
|
clocksPerSample = clockRate * 1.0 / sampleRate;
|
||||||
|
var clocks = Math.round(length * clocksPerSample);
|
||||||
|
if (cpu.getTstates && cpu.runFrame) {
|
||||||
|
cpu.setTstates(0);
|
||||||
|
lastbufpos = 0;
|
||||||
|
cpu.runFrame(cpu.getTstates() + totalClocks);
|
||||||
|
while (lastbufpos < length)
|
||||||
|
buffer[lastbufpos++] = curSample;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
////// 6502
|
////// 6502
|
||||||
|
|
||||||
var Base6502Platform = function() {
|
var Base6502Platform = function() {
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var VICDUAL_PRESETS = [
|
var VICDUAL_PRESETS = [
|
||||||
|
{id:'vic1.c', name:'Graphics Test'},
|
||||||
];
|
];
|
||||||
|
|
||||||
var VicDualPlatform = function(mainElement) {
|
var VicDualPlatform = function(mainElement) {
|
||||||
|
@ -179,7 +179,8 @@ function loadFile(fileid, filename, index) {
|
|||||||
if (text) {
|
if (text) {
|
||||||
loadCode(text, fileid);
|
loadCode(text, fileid);
|
||||||
} else if (!text && index >= 0) {
|
} else if (!text && index >= 0) {
|
||||||
filename += ".a";
|
if (filename.indexOf('.') <= 0)
|
||||||
|
filename += ".a";
|
||||||
console.log("Loading preset", fileid, filename, index, PRESETS[index]);
|
console.log("Loading preset", fileid, filename, index, PRESETS[index]);
|
||||||
if (text.length == 0) {
|
if (text.length == 0) {
|
||||||
console.log("Fetching", filename);
|
console.log("Fetching", filename);
|
||||||
@ -292,7 +293,7 @@ function populateExamples(sel) {
|
|||||||
sel.append($("<option />").text("--------- Chapters ---------").attr('disabled',true));
|
sel.append($("<option />").text("--------- Chapters ---------").attr('disabled',true));
|
||||||
for (var i=0; i<PRESETS.length; i++) {
|
for (var i=0; i<PRESETS.length; i++) {
|
||||||
var preset = PRESETS[i];
|
var preset = PRESETS[i];
|
||||||
var name = preset.chapter + ". " + preset.name;
|
var name = preset.chapter ? (preset.chapter + ". " + preset.name) : preset.name;
|
||||||
sel.append($("<option />").val(preset.id).text(name).attr('selected',preset.id==current_preset_id));
|
sel.append($("<option />").val(preset.id).text(name).attr('selected',preset.id==current_preset_id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
3857
tools/cp437-6x8.bdf
Normal file
3857
tools/cp437-6x8.bdf
Normal file
File diff suppressed because it is too large
Load Diff
4881
tools/cp437-8x12.bdf
Normal file
4881
tools/cp437-8x12.bdf
Normal file
File diff suppressed because it is too large
Load Diff
3857
tools/cp437-8x8.bdf
Normal file
3857
tools/cp437-8x8.bdf
Normal file
File diff suppressed because it is too large
Load Diff
@ -5,6 +5,8 @@ import sys,string
|
|||||||
height = 8
|
height = 8
|
||||||
lochar = 0x20 #48
|
lochar = 0x20 #48
|
||||||
hichar = 0x5e #57
|
hichar = 0x5e #57
|
||||||
|
lochar = 0
|
||||||
|
hichar = 255
|
||||||
|
|
||||||
chars = {}
|
chars = {}
|
||||||
inbitmap = 0
|
inbitmap = 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user