1
/* gtktiemu - a TI89/92/92+ emulator
2
* (c) Copyright 2000-2001, Romain Lievin and Thomas Corvazier
3
* (c) Copyright 2001-2002, Romain Lievin
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
#ifndef __TI68K_MEMORY__
21
#define __TI68K_MEMORY__
30
extern UBYTE get_byte(CPTR adr);
31
extern UWORD get_word(CPTR adr);
32
extern ULONG get_long(CPTR adr);
34
extern void put_long(CPTR adr, ULONG arg);
35
extern void put_word(CPTR adr, UWORD arg);
36
extern void put_byte(CPTR adr, UBYTE arg);
38
extern UBYTE *get_real_address(CPTR adr);
39
extern int valid_address(CPTR adr, ULONG size);
41
extern void extRomWriteByte(int adr, int v);
42
extern void intRomWriteByte(int adr, int v);
44
/* Banks sizes. Must be a power of two */
46
#define RAM_SIZE (256 * 1024)
47
#define ROM_SIZE (2 * 1024 * 1024)
53
extern UBYTE *ti_rom, *ti_int_rom, *ti_ext_rom;
56
extern UBYTE *mem_tab[8];
57
extern ULONG mem_mask[8];
59
extern int memprotect, ram128;
60
extern int mem_and, ram_wrap;
62
extern int flash_protect;
63
extern int rom_ret_or;
64
extern int rom_write_ready;
65
extern int rom_write_phase;
67
extern int rom_erasePhase;
71
#define rom_at_0() { mem_tab[0] = ti_rom; mem_mask[0] = ROM_SIZE-1; }
72
#define ram_at_0() { mem_tab[0] = ti_ram; mem_mask[0] = RAM_SIZE-1; }