romcalls.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /* Hey EMACS -*- linux-c -*- */
  2. /* $Id: romcalls.h 2268 2006-11-06 17:18:51Z roms $ */
  3. /* TiEmu - Tiemu Is an EMUlator
  4. *
  5. * Copyright (c) 2000-2001, Thomas Corvazier, Romain Liévin
  6. * Copyright (c) 2001-2003, Romain Liévin
  7. * Copyright (c) 2003, Julien Blache
  8. * Copyright (c) 2004, Romain Liévin
  9. * Copyright (c) 2005, Romain Liévin, Kevin Kofler
  10. * Copyright (c) 2007, Kevin Kofler
  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. Breakpoint definitions
  28. */
  29. #ifndef __ROMCALLS__
  30. #define __ROMCALLS__
  31. #include <stdio.h>
  32. #include <stdint.h>
  33. #define NMAX_ROMCALLS 0x800
  34. /* Types */
  35. typedef struct
  36. {
  37. int id;
  38. uint32_t addr;
  39. const char* name;
  40. } ROM_CALL;
  41. /* Functions */
  42. void romcalls_get_table_infos(uint32_t *base, uint32_t *size);
  43. void romcalls_get_symbol_address(int id, uint32_t *addr);
  44. int romcalls_load(int noflash);
  45. int romcalls_is_loaded(void);
  46. int romcalls_is_addr(uint32_t addr);
  47. const char* romcalls_get_name(int id);
  48. uint32_t romcalls_get_addr(int id);
  49. const char* ercodes_get_name(unsigned id);
  50. #define ROMCALL_ID(elt) (((ROM_CALL *)(elt->data))->id)
  51. #define ROMCALL_NAME(elt) (((ROM_CALL *)(elt->data))->name)
  52. #define ROMCALL_ADDR(elt) (((ROM_CALL *)(elt->data))->addr)
  53. #endif