mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 23:52:26 +00:00
Merge pull request #521 from TomHarte/AppleVideo
Fixes Apple II double low resolution graphics
This commit is contained in:
commit
760817eb3b
@ -20,6 +20,7 @@
|
|||||||
#include "../../Components/AudioToggle/AudioToggle.hpp"
|
#include "../../Components/AudioToggle/AudioToggle.hpp"
|
||||||
|
|
||||||
#include "../../Outputs/Speaker/Implementation/LowpassSpeaker.hpp"
|
#include "../../Outputs/Speaker/Implementation/LowpassSpeaker.hpp"
|
||||||
|
#include "../../Outputs/Log.hpp"
|
||||||
|
|
||||||
#include "Card.hpp"
|
#include "Card.hpp"
|
||||||
#include "DiskIICard.hpp"
|
#include "DiskIICard.hpp"
|
||||||
@ -427,7 +428,10 @@ template <Analyser::Static::AppleII::Target::Model model> class ConcreteMachine:
|
|||||||
bool has_updated_cards = false;
|
bool has_updated_cards = false;
|
||||||
if(read_pages_[address >> 8]) {
|
if(read_pages_[address >> 8]) {
|
||||||
if(isReadOperation(operation)) *value = read_pages_[address >> 8][address & 0xff];
|
if(isReadOperation(operation)) *value = read_pages_[address >> 8][address & 0xff];
|
||||||
else if(write_pages_[address >> 8]) write_pages_[address >> 8][address & 0xff] = *value;
|
else {
|
||||||
|
if(address >= 0x200 && address < 0x6000) update_video();
|
||||||
|
if(write_pages_[address >> 8]) write_pages_[address >> 8][address & 0xff] = *value;
|
||||||
|
}
|
||||||
|
|
||||||
if(is_iie() && address >= 0xc300 && address < 0xd000) {
|
if(is_iie() && address >= 0xc300 && address < 0xd000) {
|
||||||
bool internal_c8_rom = internal_c8_rom_;
|
bool internal_c8_rom = internal_c8_rom_;
|
||||||
@ -526,7 +530,7 @@ template <Analyser::Static::AppleII::Target::Model model> class ConcreteMachine:
|
|||||||
// Write-only switches. All IIe as currently implemented.
|
// Write-only switches. All IIe as currently implemented.
|
||||||
if(is_iie()) {
|
if(is_iie()) {
|
||||||
switch(address) {
|
switch(address) {
|
||||||
default: printf("Write %04x?\n", address); break;
|
default: break;
|
||||||
|
|
||||||
case 0xc000:
|
case 0xc000:
|
||||||
case 0xc001:
|
case 0xc001:
|
||||||
|
@ -332,13 +332,13 @@ template <class BusHandler, bool is_iie> class Video: public VideoBase {
|
|||||||
case GraphicsMode::DoubleLowRes: {
|
case GraphicsMode::DoubleLowRes: {
|
||||||
const int row_shift = (row_&4);
|
const int row_shift = (row_&4);
|
||||||
for(int c = column_; c < pixel_end; ++c) {
|
for(int c = column_; c < pixel_end; ++c) {
|
||||||
const uint16_t nibble = (bus_handler_.perform_aux_read(static_cast<uint16_t>(text_address + c)) >> row_shift) & 0xf0f;
|
const uint16_t nibble = bus_handler_.perform_aux_read(static_cast<uint16_t>(text_address + c)) >> row_shift;
|
||||||
|
|
||||||
if(c&1) {
|
if(c&1) {
|
||||||
pixel_pointer_[0] = pixel_pointer_[4] = (nibble >> 8) & 4;
|
pixel_pointer_[0] = pixel_pointer_[4] = (nibble >> 8) & 2;
|
||||||
pixel_pointer_[1] = pixel_pointer_[5] = (nibble >> 8) & 8;
|
pixel_pointer_[1] = pixel_pointer_[5] = (nibble >> 8) & 4;
|
||||||
pixel_pointer_[2] = pixel_pointer_[6] = (nibble >> 8) & 1;
|
pixel_pointer_[2] = pixel_pointer_[6] = (nibble >> 8) & 8;
|
||||||
pixel_pointer_[3] = (nibble >> 8) & 2;
|
pixel_pointer_[3] = (nibble >> 8) & 1;
|
||||||
|
|
||||||
pixel_pointer_[8] = pixel_pointer_[12] = nibble & 4;
|
pixel_pointer_[8] = pixel_pointer_[12] = nibble & 4;
|
||||||
pixel_pointer_[9] = pixel_pointer_[13] = nibble & 8;
|
pixel_pointer_[9] = pixel_pointer_[13] = nibble & 8;
|
||||||
@ -346,10 +346,10 @@ template <class BusHandler, bool is_iie> class Video: public VideoBase {
|
|||||||
pixel_pointer_[7] = pixel_pointer_[11] = nibble & 2;
|
pixel_pointer_[7] = pixel_pointer_[11] = nibble & 2;
|
||||||
graphics_carry_ = nibble & 8;
|
graphics_carry_ = nibble & 8;
|
||||||
} else {
|
} else {
|
||||||
pixel_pointer_[0] = pixel_pointer_[4] = (nibble >> 8) & 1;
|
pixel_pointer_[0] = pixel_pointer_[4] = (nibble >> 8) & 8;
|
||||||
pixel_pointer_[1] = pixel_pointer_[5] = (nibble >> 8) & 2;
|
pixel_pointer_[1] = pixel_pointer_[5] = (nibble >> 8) & 1;
|
||||||
pixel_pointer_[2] = pixel_pointer_[6] = (nibble >> 8) & 4;
|
pixel_pointer_[2] = pixel_pointer_[6] = (nibble >> 8) & 2;
|
||||||
pixel_pointer_[3] = (nibble >> 8) & 8;
|
pixel_pointer_[3] = (nibble >> 8) & 4;
|
||||||
|
|
||||||
pixel_pointer_[8] = pixel_pointer_[12] = nibble & 1;
|
pixel_pointer_[8] = pixel_pointer_[12] = nibble & 1;
|
||||||
pixel_pointer_[9] = pixel_pointer_[13] = nibble & 2;
|
pixel_pointer_[9] = pixel_pointer_[13] = nibble & 2;
|
||||||
|
Loading…
Reference in New Issue
Block a user