~ubuntu-branches/ubuntu/breezy/tiemu/breezy

« back to all changes in this revision

Viewing changes to src/core/ti_hw/memory.h

  • Committer: Bazaar Package Importer
  • Author(s): Julien BLACHE
  • Date: 2005-06-02 16:50:15 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050602165015-59ab24414tl2wzol
Tags: 1.99+svn1460-1
* New snapshot.
* debian/control:
  + Updated build-depends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*  gtktiemu - a TI89/92/92+ emulator
2
 
 *  (c) Copyright 2000-2001, Romain Lievin and Thomas Corvazier
3
 
 *  (c) Copyright 2001-2002, Romain Lievin
4
 
 *
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.
9
 
 *
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.
14
 
 *
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.
18
 
 */
19
 
 
20
 
#ifndef __TI68K_MEMORY__
21
 
#define __TI68K_MEMORY__
22
 
 
23
 
#include "intlist.h"
24
 
 
25
 
/* Functions */
26
 
 
27
 
int hw_init_mem();
28
 
int hw_exit_mem();
29
 
 
30
 
extern UBYTE get_byte(CPTR adr);
31
 
extern UWORD get_word(CPTR adr);
32
 
extern ULONG get_long(CPTR adr);
33
 
 
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);
37
 
 
38
 
extern UBYTE *get_real_address(CPTR adr);
39
 
extern int    valid_address(CPTR adr, ULONG size);
40
 
 
41
 
extern void extRomWriteByte(int adr, int v);
42
 
extern void intRomWriteByte(int adr, int v);
43
 
 
44
 
/* Banks sizes. Must be a power of two */
45
 
 
46
 
#define RAM_SIZE  (256 * 1024)
47
 
#define ROM_SIZE  (2 * 1024 * 1024)
48
 
#define IO_SIZE   (32)
49
 
 
50
 
/* Variables */
51
 
 
52
 
extern UBYTE *ti_ram;
53
 
extern UBYTE *ti_rom, *ti_int_rom, *ti_ext_rom;
54
 
extern UBYTE *ti_io;
55
 
 
56
 
extern UBYTE *mem_tab[8];
57
 
extern ULONG mem_mask[8];
58
 
 
59
 
extern int memprotect, ram128;
60
 
extern int mem_and, ram_wrap;
61
 
 
62
 
extern int flash_protect;
63
 
extern int rom_ret_or;
64
 
extern int rom_write_ready;
65
 
extern int rom_write_phase;
66
 
extern int rom_erase;
67
 
extern int rom_erasePhase;
68
 
 
69
 
/* Defines */
70
 
 
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; }
73
 
 
74
 
#define LM_BYTE 0
75
 
#define LM_WORD 1
76
 
#define LM_LONG 2
77
 
 
78
 
#define LM_READ 0
79
 
#define LM_WRITE 1
80
 
 
81
 
#endif