An emulator, assembler, and disassembler for the Sega Game Gear
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

30 lines
1.1 KiB

  1. ;; Copyright (C) 2014-2015 Ben Kurtovic <ben.kurtovic@gmail.com>
  2. ;; Released under the terms of the MIT License. See LICENSE for details.
  3. ; ----- CRATER UNIT TESTING SUITE ---------------------------------------------
  4. ; This file contains basic header code for standard assembly files in the unit
  5. ; testing suite. It sets values for the ROM header, and contains basic test
  6. ; runner code.
  7. .rom_size auto ; Smallest possible ROM size >= 32 KB
  8. .rom_header auto ; Standard header location (0x7FF0)
  9. .rom_checksum off ; Don't write a ROM checksum to the header
  10. .rom_product 0 ; Zero product code
  11. .rom_version 0 ; Zero version number
  12. .rom_region "GG Export" ; Common region code for Western ROMs
  13. .rom_declsize auto ; Set declared size to actual ROM size
  14. .cross_blocks auto ; Do not allow data to cross between blocks
  15. ; Main routine (execution begins here)
  16. .org $0000
  17. main:
  18. di ; Disable maskable interrupts
  19. call test ; Run test subroutine
  20. emu except(done) ; Signal to emulator that test is done
  21. ; Non-maskable interrupt handler (should not happen; raise an exception)
  22. .org $0066
  23. nmi_handler:
  24. emu except(nmi) ; Signal to emulator that an NMI was received