mirror of
https://github.com/Luigi30/FruitMachine-Swift.git
synced 2026-04-26 18:17:43 +00:00
page 2
This commit is contained in:
@@ -12,6 +12,7 @@ extension AppleIIBase {
|
||||
|
||||
class LoresMode: NSObject {
|
||||
static func putLoresPixel(buffer: UnsafeMutablePointer<BitmapPixelsLE555.PixelData>?, pixel: UInt8, address: UInt16) {
|
||||
|
||||
let pageOffset = address - 0x400
|
||||
let pixelPosition = VideoHelpers.getPixelOffset(memoryOffset: Int(pageOffset))
|
||||
if(pixelPosition.x == -1 && pixelPosition.y == -1) {
|
||||
|
||||
@@ -25,7 +25,11 @@ extension AppleIIBase {
|
||||
}
|
||||
|
||||
//Calculate the offset to reach the desired position.
|
||||
let baseOffset = EmulatedSystemInstance!.emulatorViewDelegate.scanlineOffsets[Int(pixelPosition.y)] + Int(pixelPosition.x)
|
||||
var baseOffset = EmulatedSystemInstance!.emulatorViewDelegate.scanlineOffsets[Int(pixelPosition.y) % 192] + Int(pixelPosition.x)
|
||||
|
||||
if(EmulatedSystemInstance!.videoSoftswitches.PAGE_2) {
|
||||
baseOffset += 0x400
|
||||
}
|
||||
|
||||
for charY in 0..<AppleII.A2CharacterGenerator.CHAR_HEIGHT {
|
||||
let offset = baseOffset + (AppleII.ScreenDelegate.PIXEL_WIDTH * charY)
|
||||
|
||||
@@ -10,6 +10,9 @@ import Cocoa
|
||||
|
||||
extension AppleIIBase {
|
||||
|
||||
static let PAGE1_BASE: Address = 0x400
|
||||
static let PAGE2_BASE: Address = 0x800
|
||||
|
||||
typealias Softswitch = Bool
|
||||
|
||||
struct VideoSoftswitches {
|
||||
|
||||
Reference in New Issue
Block a user