mirror of
https://github.com/TomHarte/CLK.git
synced 2024-10-04 17:56:29 +00:00
Attempted a square wave, made the Vic itself responsible for address manipulation re:the 6560.
This commit is contained in:
parent
e99055bedb
commit
30b7db3979
@ -57,7 +57,7 @@ MOS6560::MOS6560() :
|
|||||||
"float phaseOffset = 6.283185308 * float(iPhase + 8u) / 8.0;" // TODO: appropriate phaseOffset
|
"float phaseOffset = 6.283185308 * float(iPhase + 8u) / 8.0;" // TODO: appropriate phaseOffset
|
||||||
|
|
||||||
// sin(phase + phaseOffset)
|
// sin(phase + phaseOffset)
|
||||||
"return mix(step(1, c) * y, step(2, c) * step(3.141592654, mod(phase + phaseOffset, 6.283185308)) * 2.0, amplitude);" // TODO: square wave (step(3.141592654, mod(phase + phaseOffset, 6.283185308))?)
|
"return mix(step(1, c) * y, step(2, c) * step(3.141592654, mod(phase + phaseOffset, 6.283185308)) * 2.0 - 1.0, amplitude);" // TODO: square wave (step(3.141592654, mod(phase + phaseOffset, 6.283185308))?)
|
||||||
"}");
|
"}");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,8 +226,7 @@ uint16_t MOS6560::get_address()
|
|||||||
*/
|
*/
|
||||||
if(_column_counter&1)
|
if(_column_counter&1)
|
||||||
{
|
{
|
||||||
// TODO: don't add 0x8000. That's a hack.
|
return _character_cell_start_address + (_character_code*8) + (_row_counter&7);
|
||||||
return 0x8000 + (_character_cell_start_address + (_character_code*8) + (_row_counter&7));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -25,6 +25,7 @@ unsigned int Machine::perform_bus_operation(CPU6502::BusOperation operation, uin
|
|||||||
|
|
||||||
// run the phase-1 part of this cycle, in which the VIC accesses memory
|
// run the phase-1 part of this cycle, in which the VIC accesses memory
|
||||||
uint16_t video_address = _mos6560->get_address();
|
uint16_t video_address = _mos6560->get_address();
|
||||||
|
if(!(video_address&0x1000)) video_address += 0x8000;
|
||||||
_mos6560->set_graphics_value(read_memory(video_address), _colorMemory[video_address & 0x03ff]);
|
_mos6560->set_graphics_value(read_memory(video_address), _colorMemory[video_address & 0x03ff]);
|
||||||
|
|
||||||
// run the phase-2 part of the cycle, which is whatever the 6502 said it should be
|
// run the phase-2 part of the cycle, which is whatever the 6502 said it should be
|
||||||
|
Loading…
Reference in New Issue
Block a user