mirror of
https://github.com/TomHarte/CLK.git
synced 2026-04-26 19:17:52 +00:00
Attempt to copy and paste my way to working type-1 sprites.
This commit is contained in:
@@ -212,19 +212,23 @@ void TMS9918<personality>::run_for(const HalfCycles cycles) {
|
||||
// ------------------------
|
||||
// Perform memory accesses.
|
||||
// ------------------------
|
||||
#define fetch(function, clock, offset) { \
|
||||
const int first_window = from_internal<personality, clock>(this->fetch_pointer_.column); \
|
||||
const int final_window = from_internal<personality, clock>(end_column); \
|
||||
if(first_window == final_window) break; \
|
||||
if(final_window != clock_rate<personality, clock>()) { \
|
||||
function<true>( \
|
||||
this->line_buffers_[this->fetch_pointer_.row], this->fetch_pointer_.row + offset, \
|
||||
first_window, final_window); \
|
||||
} else { \
|
||||
function<false>( \
|
||||
this->line_buffers_[this->fetch_pointer_.row], this->fetch_pointer_.row + offset, \
|
||||
first_window, final_window); \
|
||||
} \
|
||||
#define fetch(function, clock, offset) { \
|
||||
const int first_window = from_internal<personality, clock>(this->fetch_pointer_.column); \
|
||||
const int final_window = from_internal<personality, clock>(end_column); \
|
||||
if(first_window == final_window) break; \
|
||||
if(final_window != clock_rate<personality, clock>()) { \
|
||||
function<true>( \
|
||||
this->line_buffers_[this->fetch_pointer_.row], \
|
||||
this->line_buffers_[(this->fetch_pointer_.row + 1) % this->mode_timing_.total_lines], \
|
||||
this->fetch_pointer_.row + offset, \
|
||||
first_window, final_window); \
|
||||
} else { \
|
||||
function<false>( \
|
||||
this->line_buffers_[this->fetch_pointer_.row], \
|
||||
this->line_buffers_[(this->fetch_pointer_.row + 1) % this->mode_timing_.total_lines], \
|
||||
this->fetch_pointer_.row + offset, \
|
||||
first_window, final_window); \
|
||||
} \
|
||||
}
|
||||
|
||||
switch(line_buffer.fetch_mode) {
|
||||
|
||||
Reference in New Issue
Block a user