c64? maybe

This commit is contained in:
Steven Hugg 2019-08-19 13:42:32 -04:00
parent 31e052b2df
commit d1df9b940d
4 changed files with 613 additions and 7 deletions

593
src/platform/c64.ts Normal file

File diff suppressed because one or more lines are too long

View File

@ -1659,7 +1659,7 @@ var qs = (function (a : string[]) {
function installErrorHandler() {
if (typeof window.onerror == "object") {
window.onerror = function (msgevent, url, line, col, error) {
var msgstr = (msgevent instanceof PromiseRejectionEvent) ? (msgevent.reason+" (rejected)") : (msgevent+"");
var msgstr = msgevent['reason'] ? (msgevent['reason']+" (rejected)") : (msgevent+"");
console.log(msgevent, url, line, col, error);
// emulation threw EmuHalt
if (error instanceof EmuHalt || msgstr.indexOf("CPU STOP") >= 0) {

View File

@ -550,7 +550,7 @@ export class MemoryView implements ProjectView {
w: $(workspace).width(),
h: $(workspace).height(),
itemHeight: getVisibleEditorLineHeight(),
totalRows: 0x2000,
totalRows: 0x1400,
generatorFn: (row : number) => {
var s = this.getMemoryLineAt(row);
var linediv = document.createElement("div");

View File

@ -271,11 +271,6 @@ var PLATFORM_PARAMS = {
libargs: ['atari5200.lib',
'-D', '__CARTFLAGS__=255'],
},
'c64': {
define: '__C64__',
cfgfile: 'c64.cfg',
libargs: ['c64.lib'],
},
'verilog': {
},
'astrocade': {
@ -321,6 +316,24 @@ var PLATFORM_PARAMS = {
{name:'Cartridge ROM',start:0x4000,size:0xc000,type:'rom'},
],
},
'c64': {
define: '__C64__',
cfgfile: 'c64.cfg', // SYS 2058
libargs: ['c64.lib'],
//extra_link_files: ['c64-cart.cfg'],
extra_segments:[
{name:'6510 Registers',start:0x0, size:0x2,type:'io'},
{name:'RAM', start:0x2, size:0x7ffe,type:'ram'},
{name:'Cartridge ROM',start:0x8000,size:0x2000,type:'rom'},
{name:'BASIC ROM', start:0xa000,size:0x2000,type:'rom'},
{name:'RAM', start:0xc000,size:0x1000,type:'ram'},
{name:'VIC-II I/O', start:0xd000,size:0x0400,type:'io'},
{name:'Color RAM', start:0xd800,size:0x0400,type:'io'},
{name:'CIA 1', start:0xdc00,size:0x0100,type:'io'},
{name:'CIA 2', start:0xdd00,size:0x0100,type:'io'},
{name:'KERNAL ROM', start:0xe000,size:0x2000,type:'rom'},
],
},
};
PLATFORM_PARAMS['sms-sms-libcv'] = PLATFORM_PARAMS['sms-sg1000-libcv'];