1
/* -*- mode: C++; tab-width: 4 -*- */
2
/* ===================================================================== *\
3
Copyright (c) 2000-2001 Palm, Inc. or its subsidiaries.
6
This file is part of the Palm OS Emulator.
8
This program is free software; you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation; either version 2 of the License, or
11
(at your option) any later version.
12
\* ===================================================================== */
17
#include "EmRegsPrv.h"
19
// Location and range of registers
21
const uint32 kMemoryStart = 0xFFFFF000;
22
const uint32 kMemorySize = sizeof (HwrM68EZ328Type);
25
// Macro to return the DragonballEZ address of the specified register
27
#define addressof(x) (kMemoryStart + offsetof(HwrM68EZ328Type, x))
30
// Macros for reading/writing DragonballEZ registers.
32
#define READ_REGISTER(reg) \
33
_get_reg (&f68EZ328Regs.reg)
35
#define WRITE_REGISTER(reg, value) \
36
_put_reg (&f68EZ328Regs.reg, value)
39
// Macro for installing DragonballEZ register handlers
41
#define INSTALL_HANDLER(read, write, reg) \
42
this->SetHandler ((ReadFunction) &EmRegsEZ::read, (WriteFunction) &EmRegsEZ::write, addressof (reg), sizeof (f68EZ328Regs.reg))
45
#endif /* EmRegsEZPrv_h */