Advertisement
Guest User

Untitled

a guest
Mar 21st, 2011
524
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.30 KB | None | 0 0
  1.  
  2. REALTEC Cart Mapper - description v1 (2005.03.08)
  3.  
  4. by Tasco Deluxe [tascoDLX(AT)hotmail(DOT)com]
  5.  
  6. * Thanks to Mask Of Destiny for info about the boot state (from "The Earth Defend")
  7.  
  8.  
  9. The REALTEC cart mapper is found in unlicensed Genesis/MegaDrive game carts produced by REALTEC.
  10. Game carts known to utilize the mapper include "The Earth Defend", "Whac-A-Critter", and
  11. "Funnyworld/Balloon Boy 2-in-1". They all contain common code used to display the REALTEC logo
  12. and map a portion of the main ROM.
  13.  
  14. When the cart is powered on, 8KB of boot code is mapped by default into the cart's ROM area and
  15. is mirrored throughout. This boot code is likely the last 8KB of the main ROM (all known carts
  16. are 4 Mbit [512KB] w/ boot code at $07E000). The boot code, after displaying the REALTEC logo,
  17. has the option to display a menu for game selection. After a selection is made, any neccessary
  18. initializations are performed and a portion of the main ROM is mapped.
  19.  
  20. The code used to access the mapping registers is common amongst all known carts. A portion
  21. of code is copied to RAM and executed. This code writes to the mapping registers based on a
  22. selection number. Afterwards, the code clears the first 16 bytes of the I/O area ($A10000
  23. thru $A1000F) and resets the M68000 manually (stack address is read from $000000, code address
  24. is read from $000004).
  25.  
  26. The mapping is performed by writing to 3 mapped-in registers -- $400000, $402000, $404000.
  27. Only one value is written per register. However, the same value is written 256 times in a row.
  28. It is unknown whether this is because the registers explicitly require 256 writes, or because
  29. the hardware is so crappy as to need multiple writes.
  30.  
  31. The register descriptions below are listed in the order they are commonly written.
  32. All registers are byte-sized and only known to have write access.
  33.  
  34. * $402000 - Size of ROM range to map (in 1Mbit [128KB] blocks)
  35.  
  36. [maximum (theoretical) value of 32]
  37.  
  38. * $400000 - Bits of the ROM address (lower)
  39.  
  40. The bits (as written) are: ? ? ? ? ? c c c
  41.  
  42. * $404000 - Bits of the ROM address (upper)
  43.  
  44. The bits (as written) are: ? ? ? ? ? m m !
  45.  
  46. '?' is an unknown bit that is clear (in all known cases)
  47. '!' is an unknown bit that is set (in all known cases)
  48.  
  49. From the above registers, the resulting ROM address (binary) is:
  50.  
  51. 00mm ccc0 0000 0000 0000 0000
  52.  
  53. The common code in all REALTEC mapper carts sets the mapper values based on a selection number
  54. (ROM address only -- the ROM size is fixed). The ROM addresses for these selections, numbered
  55. 1 thru 8, are:
  56.  
  57. 1) $000000 [$00,$01]
  58. 2) $040000 [$02,$01]
  59. 3) $100000 [$00,$03]
  60. 4) $180000 [$04,$03]
  61. 5) $200000 [$00,$05]
  62. 6) $280000 [$04,$05]
  63. 7) $300000 [$00,$07]
  64. 8) $380000 [$04,$07]
  65.  
  66. The only cart known to use a selection other than #1 is "Funnyworld/Balloon Boy 2-in-1"
  67. ("Balloon Boy" is #1, "Funnyworld" is #2). It is assumed that the included code is merely a
  68. suggestion and that any valid ROM address can be mapped.
  69.  
  70. A ROM range that is mapped, in order to function properly, must include a M68000 vector table
  71. since the cart's entire ROM area is replaced by the mapped range. None of the known carts
  72. attempt to remap a different ROM range after the boot code has executed. It is unknown whether
  73. the mapper allows the boot code to be remapped, although it seems doubtful.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement