mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-23 20:29:42 +00:00
Kicking the ball a little further down the road, ROMs and PRGs now reach the actual emulated machine.
This commit is contained in:
parent
b29b2a5d08
commit
12243c40ad
@ -14,3 +14,11 @@ unsigned int Machine::perform_bus_operation(CPU6502::BusOperation operation, uin
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
void Machine::set_rom(ROMSlot slot, size_t length, const uint8_t *data)
|
||||
{
|
||||
}
|
||||
|
||||
void Machine::add_prg(size_t length, const uint8_t *data)
|
||||
{
|
||||
}
|
||||
|
@ -14,8 +14,18 @@
|
||||
|
||||
namespace Vic20 {
|
||||
|
||||
enum ROMSlot {
|
||||
ROMSlotKernel,
|
||||
ROMSlotBASIC,
|
||||
ROMSlotCharacters,
|
||||
};
|
||||
|
||||
class Machine: public CPU6502::Processor<Machine>, public CRTMachine::Machine {
|
||||
public:
|
||||
|
||||
void set_rom(ROMSlot slot, size_t length, const uint8_t *data);
|
||||
void add_prg(size_t length, const uint8_t *data);
|
||||
|
||||
// to satisfy CPU6502::Processor
|
||||
unsigned int perform_bus_operation(CPU6502::BusOperation operation, uint16_t address, uint8_t *value);
|
||||
void synchronise() {}
|
||||
|
@ -14,6 +14,6 @@
|
||||
- (void)setKernelROM:(nonnull NSData *)rom;
|
||||
- (void)setBASICROM:(nonnull NSData *)rom;
|
||||
- (void)setCharactersROM:(nonnull NSData *)rom;
|
||||
- (void)setPRG:(nonnull NSData *)rom;
|
||||
- (void)setPRG:(nonnull NSData *)prg;
|
||||
|
||||
@end
|
||||
|
@ -18,16 +18,24 @@
|
||||
return &_vic20;
|
||||
}
|
||||
|
||||
- (void)setROM:(nonnull NSData *)rom slot:(Vic20::ROMSlot)slot {
|
||||
_vic20.set_rom(slot, rom.length, (const uint8_t *)rom.bytes);
|
||||
}
|
||||
|
||||
- (void)setKernelROM:(nonnull NSData *)rom {
|
||||
[self setROM:rom slot:Vic20::ROMSlotKernel];
|
||||
}
|
||||
|
||||
- (void)setBASICROM:(nonnull NSData *)rom {
|
||||
[self setROM:rom slot:Vic20::ROMSlotBASIC];
|
||||
}
|
||||
|
||||
- (void)setCharactersROM:(nonnull NSData *)rom {
|
||||
[self setROM:rom slot:Vic20::ROMSlotCharacters];
|
||||
}
|
||||
|
||||
- (void)setPRG:(nonnull NSData *)rom address:(uint16_t)address {
|
||||
- (void)setPRG:(nonnull NSData *)prg {
|
||||
_vic20.add_prg(prg.length, (const uint8_t *)prg.bytes);
|
||||
}
|
||||
|
||||
- (void)setKey:(uint16_t)key isPressed:(BOOL)isPressed {
|
||||
|
Loading…
Reference in New Issue
Block a user