mirror of
https://github.com/pevans/erc-c.git
synced 2024-12-30 06:29:48 +00:00
Actually map memory when we create an apple2
This commit is contained in:
parent
33c8f0de9d
commit
73f7d8f63a
@ -1,9 +1,11 @@
|
||||
#ifndef _APPLE2_MEM_H_
|
||||
#define _APPLE2_MEM_H_
|
||||
|
||||
#include "apple2.h"
|
||||
#include "vm_segment.h"
|
||||
|
||||
extern vm_8bit apple2_mem_read_bank(vm_segment *, size_t);
|
||||
extern void apple2_mem_write_bank(vm_segment *, size_t, vm_8bit);
|
||||
extern void apple2_mem_map(apple2 *);
|
||||
|
||||
#endif
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
#include "apple2.h"
|
||||
#include "apple2.draw.h"
|
||||
#include "apple2.mem.h"
|
||||
#include "mos6502.dis.h"
|
||||
#include "option.h"
|
||||
#include "vm_segment.h"
|
||||
@ -56,6 +57,9 @@ apple2_create(int width, int height)
|
||||
// Our memory is that which is owned by the CPU.
|
||||
mach->memory = mach->cpu->memory;
|
||||
|
||||
// Set the read/write mappers for everything
|
||||
apple2_mem_map(mach->memory);
|
||||
|
||||
// Initliaze our system ROM and separate bank-switched block of RAM
|
||||
mach->rom = vm_segment_create(APPLE2_ROM_SIZE);
|
||||
mach->ram2 = vm_segment_create(APPLE2_RAM2_SIZE);
|
||||
|
Loading…
Reference in New Issue
Block a user