mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2025-01-13 21:36:16 +00:00
added getRasterScanline() for profiler
This commit is contained in:
parent
0a89695722
commit
b40a156ae6
@ -201,6 +201,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);
|
||||
}
|
||||
@ -322,6 +325,8 @@ const _GalaxianPlatform = function(mainElement, options) {
|
||||
// NMI interrupt @ 0x66
|
||||
if (interruptEnabled) { cpu.nonMaskableInterrupt(); }
|
||||
}
|
||||
|
||||
getRasterScanline() { return this.scanline; }
|
||||
|
||||
loadROM(title, data) {
|
||||
rom = padBytes(data, romSize);
|
||||
|
@ -98,6 +98,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) {
|
||||
@ -165,6 +168,10 @@ const _VicDualPlatform = function(mainElement) {
|
||||
}
|
||||
video.updateFrame();
|
||||
}
|
||||
|
||||
getRasterScanline() {
|
||||
return this.scanline;
|
||||
}
|
||||
|
||||
loadROM(title, data) {
|
||||
if (data.length >= 0x4020 && (data[0x4000] || data[0x401f])) {
|
||||
|
@ -308,6 +308,8 @@ var WilliamsPlatform = function(mainElement, proto) {
|
||||
pixels = video.getFrameData();
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user