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

« back to all changes in this revision

Viewing changes to src/core/hwpm.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
/* Hey EMACS -*- linux-c -*- */
 
2
/* $Id: hwpm.h 1455 2005-05-31 18:38:03Z roms $ */
 
3
 
 
4
/*  TiEmu - an TI emulator
 
5
 *
 
6
 *  Copyright (c) 2000-2001, Thomas Corvazier, Romain Lievin
 
7
 *  Copyright (c) 2001-2003, Romain Lievin
 
8
 *  Copyright (c) 2003, Julien Blache
 
9
 *  Copyright (c) 2004, Romain Li�vin
 
10
 *  Copyright (c) 2005, Romain Li�vin
 
11
 *
 
12
 *  This program is free software; you can redistribute it and/or modify
 
13
 *  it under the terms of the GNU General Public License as published by
 
14
 *  the Free Software Foundation; either version 2 of the License, or
 
15
 *  (at your option) any later version.
 
16
 *
 
17
 *  This program is distributed in the hope that it will be useful,
 
18
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
19
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
20
 *  GNU General Public License for more details.
 
21
 *
 
22
 *  You should have received a copy of the GNU General Public License
 
23
 *  along with this program; if not, write to the Free Software
 
24
 *  Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
 
25
 */
 
26
 
 
27
#ifndef __TI68K_HWPM__
 
28
#define __TI68K_HWPM__
 
29
 
 
30
#include <stdint.h>
 
31
 
 
32
/*
 
33
  Definitions
 
34
*/
 
35
 
 
36
// Hardware parameter block from TIGCC documentation
 
37
// Exists only on FLASH calculators
 
38
typedef struct {
 
39
        uint16_t  len;                 /* length of parameter block    */
 
40
    uint32_t  hardwareID;          /* 1 = TI-92 Plus, 3 = TI-89    */
 
41
    uint32_t  hardwareRevision;    /* hardware revision number     */
 
42
    uint32_t  bootMajor;           /* boot code version number     */
 
43
    uint32_t  bootRevision;        /* boot code revision number    */
 
44
    uint32_t  bootBuild;           /* boot code build number       */
 
45
    uint32_t  gateArray;           /* gate array version number    */
 
46
    uint32_t  physDisplayBitsWide; /* display width                */
 
47
    uint32_t  physDisplayBitsTall; /* display height               */
 
48
    uint32_t  LCDBitsWide;         /* visible display width        */
 
49
    uint32_t  LCDBitsTall;         /* visible display height       */
 
50
} HW_PARM_BLOCK;
 
51
 
 
52
// Possible values if hardwareID field
 
53
#define HWID_TI92P  1
 
54
#define HWID_TI89   3
 
55
#define HWID_V200   8
 
56
#define HWID_TI89T  9
 
57
 
 
58
/*
 
59
        Functions
 
60
*/
 
61
 
 
62
void ti68k_display_hw_param_block(HW_PARM_BLOCK *s);
 
63
int ti68k_get_hw_param_block(uint8_t *rom_data, uint8_t rom_base, HW_PARM_BLOCK *block);
 
64
int ti68k_put_hw_param_block(uint8_t *rom_data, uint8_t rom_base, const HW_PARM_BLOCK *s);
 
65
 
 
66
#endif