struct input_osc
{
- signed64 on_time;
- signed64 off_time;
- signed64 repeat;
+ int64_t on_time;
+ int64_t off_time;
+ int64_t repeat;
struct hw_event *event;
const char *name;
- uint8 mask;
- uint8 value;
- uint16 addr;
+ uint8_t mask;
+ uint8_t value;
+ uint16_t addr;
};
#define NR_PORT_A_OSC (4)
static hw_port_event_method m68hc11cpu_port_event;
static void make_oscillator (struct m68hc11cpu *controller,
- const char *id, uint16 addr, uint8 mask);
+ const char *id, uint16_t addr, uint8_t mask);
static struct input_osc *find_oscillator (struct m68hc11cpu *controller,
const char *id);
static void reset_oscillators (struct hw *me);
static void
make_oscillator (struct m68hc11cpu *controller, const char *name,
- uint16 addr, uint8 mask)
+ uint16_t addr, uint8_t mask)
{
struct input_osc *osc;
struct input_osc *osc = (struct input_osc*) data;
SIM_DESC sd;
sim_cpu *cpu;
- signed64 dt;
- uint8 val;
+ int64_t dt;
+ uint8_t val;
sd = hw_system (me);
cpu = STATE_CPU (sd, 0);
m68hc11_info (struct hw *me)
{
SIM_DESC sd;
- uint16 base = 0;
+ uint16_t base = 0;
sim_cpu *cpu;
struct m68hc11sio *controller;
- uint8 val;
+ uint8_t val;
sd = hw_system (me);
cpu = STATE_CPU (sd, 0);
val = cpu->ios[M6811_INIT];
print_io_byte (sd, "INIT ", 0, val, base + M6811_INIT);
sim_io_printf (sd, "Ram = 0x%04x IO = 0x%04x\n",
- (((uint16) (val & 0xF0)) << 8),
- (((uint16) (val & 0x0F)) << 12));
+ (((uint16_t) (val & 0xF0)) << 8),
+ (((uint16_t) (val & 0x0F)) << 12));
cpu_info (sd, cpu);
stops. */
int
m68hc11cpu_set_oscillator (SIM_DESC sd, const char *port,
- double ton, double toff, signed64 repeat)
+ double ton, double toff, int64_t repeat)
{
sim_cpu *cpu;
struct input_osc *osc;
/* Compute the ON time in cpu cycles. */
f = (double) (cpu->cpu_frequency) * ton;
- osc->on_time = (signed64) (f / 4.0);
+ osc->on_time = (int64_t) (f / 4.0);
if (osc->on_time < 1)
osc->on_time = 1;
/* Compute the OFF time in cpu cycles. */
f = (double) (cpu->cpu_frequency) * toff;
- osc->off_time = (signed64) (f / 4.0);
+ osc->off_time = (int64_t) (f / 4.0);
if (osc->off_time < 1)
osc->off_time = 1;
case OPTION_OSC_INFO:
for (i = 0; i < controller->last_oscillator; i++)
{
- signed64 t;
+ int64_t t;
struct input_osc *osc;
osc = &controller->oscillators[i];
void
m68hc11cpu_set_port (struct hw *me, sim_cpu *cpu,
- unsigned addr, uint8 val)
+ unsigned addr, uint8_t val)
{
- uint8 mask;
- uint8 delta;
+ uint8_t mask;
+ uint8_t delta;
int check_interrupts = 0;
int i;
/* Scan IC3, IC2 and IC1. Bit number is 3 - i. */
for (i = 0; i < 3; i++)
{
- uint8 mask = (1 << i);
+ uint8_t mask = (1 << i);
if (delta & mask)
{
- uint8 edge;
+ uint8_t edge;
int captured;
edge = cpu->ios[M6811_TCTL2];
static void
m68hc11cpu_io_write (struct hw *me, sim_cpu *cpu,
- unsigned_word addr, uint8 val)
+ unsigned_word addr, uint8_t val)
{
switch (addr)
{
/* Change the RAM and I/O mapping. */
case M6811_INIT:
{
- uint8 old_bank = cpu->ios[M6811_INIT];
+ uint8_t old_bank = cpu->ios[M6811_INIT];
cpu->ios[M6811_INIT] = val;
byte = 0;
while (nr_bytes)
{
- uint8 val;
+ uint8_t val;
if (base >= controller->attach_size)
break;
- val = *((uint8*) source);
+ val = *((uint8_t*) source);
m68hc11cpu_io_write (me, cpu, base, val);
source = (char*) source + 1;
base++;