hwpm.h 2.3 KB

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