2015-09-14 00:24:03 +00:00
|
|
|
//
|
|
|
|
// pia.h
|
|
|
|
// apple1
|
|
|
|
//
|
|
|
|
// Created by Daniel Loffgren on 9/12/15.
|
|
|
|
// Copyright (c) 2015 Daniel Loffgren. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef __apple1__pia__
|
|
|
|
#define __apple1__pia__
|
|
|
|
|
|
|
|
#include <v6502/mem.h>
|
2015-09-14 01:33:42 +00:00
|
|
|
#include <curses.h>
|
2015-09-14 00:24:03 +00:00
|
|
|
|
2015-09-23 07:32:25 +00:00
|
|
|
#define A1PIA_KEYBOARD_INPUT_REGISTER 0xD010
|
|
|
|
#define A1PIA_KEYBOARD_READY_REGISTER 0xD011
|
|
|
|
#define A1PIA_VIDEO_OUTPUT_REGISTER 0xD012
|
|
|
|
#define A1PIA_VIDEO_ATTR_REGISTER 0xD013
|
2015-09-14 00:24:03 +00:00
|
|
|
|
2015-09-14 01:33:42 +00:00
|
|
|
typedef struct {
|
|
|
|
/** @brief Curses output object */
|
|
|
|
WINDOW *screen;
|
|
|
|
/** @brief Hardwired memory used to trap video activity and report keyboard input */
|
|
|
|
v6502_memory *memory;
|
2015-09-14 07:18:02 +00:00
|
|
|
char buf;
|
2015-09-18 08:29:31 +00:00
|
|
|
int signalled;
|
2015-09-19 05:16:51 +00:00
|
|
|
int suspended;
|
2015-09-14 01:33:42 +00:00
|
|
|
} a1pia;
|
|
|
|
|
|
|
|
a1pia *pia_create(v6502_memory *mem);
|
|
|
|
void pia_destroy(a1pia *pia);
|
2015-09-14 00:24:03 +00:00
|
|
|
|
2015-09-18 07:16:14 +00:00
|
|
|
void pia_start(a1pia *pia);
|
|
|
|
void pia_stop(a1pia *pia);
|
|
|
|
|
2015-09-14 00:24:03 +00:00
|
|
|
#endif /* defined(__apple1__pia__) */
|