mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-06-12 18:42:14 +00:00
added getRasterScanline() for profiler
This commit is contained in:
parent
0a89695722
commit
b40a156ae6
|
@ -202,6 +202,8 @@ const _GalaxianPlatform = function(mainElement, options) {
|
|||
|
||||
class GalaxianPlatform extends BaseZ80Platform implements Platform {
|
||||
|
||||
scanline : number;
|
||||
|
||||
getPresets() {
|
||||
return GALAXIAN_PRESETS;
|
||||
}
|
||||
|
@ -305,6 +307,7 @@ const _GalaxianPlatform = function(mainElement, options) {
|
|||
|
||||
advance(novideo : boolean) {
|
||||
for (var sl=0; sl<scanlinesPerFrame; sl++) {
|
||||
this.scanline = sl;
|
||||
if (!novideo) {
|
||||
drawScanline(pixels, sl);
|
||||
}
|
||||
|
@ -323,6 +326,8 @@ const _GalaxianPlatform = function(mainElement, options) {
|
|||
if (interruptEnabled) { cpu.nonMaskableInterrupt(); }
|
||||
}
|
||||
|
||||
getRasterScanline() { return this.scanline; }
|
||||
|
||||
loadROM(title, data) {
|
||||
rom = padBytes(data, romSize);
|
||||
|
||||
|
|
|
@ -99,6 +99,8 @@ const _VicDualPlatform = function(mainElement) {
|
|||
|
||||
class VicDualPlatform extends BaseZ80Platform implements Platform {
|
||||
|
||||
scanline : number = 0;
|
||||
|
||||
getPresets() {
|
||||
return VICDUAL_PRESETS;
|
||||
}
|
||||
|
@ -153,6 +155,7 @@ const _VicDualPlatform = function(mainElement) {
|
|||
advance(novideo : boolean) {
|
||||
var targetTstates = cpu.getTstates();
|
||||
for (var sl=0; sl<scanlinesPerFrame; sl++) {
|
||||
this.scanline = sl;
|
||||
inputs[2] &= ~0x8;
|
||||
inputs[2] |= ((cpu.getTstates() / cyclesPerTimerTick) & 1) << 3;
|
||||
if (!novideo) {
|
||||
|
@ -166,6 +169,10 @@ const _VicDualPlatform = function(mainElement) {
|
|||
video.updateFrame();
|
||||
}
|
||||
|
||||
getRasterScanline() {
|
||||
return this.scanline;
|
||||
}
|
||||
|
||||
loadROM(title, data) {
|
||||
if (data.length >= 0x4020 && (data[0x4000] || data[0x401f])) {
|
||||
colorprom = data.slice(0x4000,0x4020);
|
||||
|
|
|
@ -309,6 +309,8 @@ var WilliamsPlatform = function(mainElement, proto) {
|
|||
timer = new AnimationTimer(60, this.nextFrame.bind(this));
|
||||
}
|
||||
|
||||
this.getRasterScanline = function() { return video_counter; }
|
||||
|
||||
this.advance = function(novideo:boolean) {
|
||||
var cpuCyclesPerSection = Math.round(cpuCyclesPerFrame / 65);
|
||||
for (var sl=0; sl<256; sl+=4) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user