home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / FAQSYS18.ZIP / FAQS.DAT / SEGA1409.FAQ < prev    next >
Internet Message Format  |  1995-12-12  |  73KB

  1. From U6C16@wvnvm.wvnet.edu Fri Sep 16 17:39:58 1994
  2. Newsgroups: rec.games.programmer,rec.games.video.sega
  3. Subject: Sega Programming FAQ Version 6
  4. From: <U6C16@wvnvm.wvnet.edu>
  5. Date: Thu, 15 Sep 1994 13:09:29 EDT
  6.  
  7. Sega Programming FAQ September 14, 1994, Sixth Edition
  8. =============================================================
  9.  
  10. This FAQ (Frequently Asked Questions) is about how to program
  11. the Sega Genesis and Mega Drive Video Games Systems.
  12.  
  13. This file IS Public Domain, and can be used by all.
  14. You may copy and post this file elsewhere. Share and enjoy.
  15.  
  16. If you want to add anything, especially game code or
  17. information on the hardware please E-mail me. My E-mail
  18. and real address are below and at the end of this FAQ.
  19.  
  20. Disclaimer : In no way I am indorsing any products, systems,
  21. etc. What I am doing is providing the information that I
  22. have found throughout internet and other network systems and
  23. reporting them here, with out reverse engineering. All
  24. information is reported as is- I will not accept any
  25. responsibility if you fry your system trying something out.
  26.  
  27. All copyrights are owned by their respective owners, no
  28. infringements intended.
  29.  
  30. Henry Rieke
  31. <U6c16@Wvnvm.Wvnet.Edu>
  32.  
  33. US Mail:
  34.  
  35. Henry Rieke
  36. Attn: Sega FAQ
  37. 161 Poplar Dr
  38. Morgantown, Wv 26505-2340
  39.  
  40. =============================================================
  41.  
  42. 0.1 Changes, Updates and Coming Soon
  43.  
  44. 1) Graphic, Video, and processor maps have been added. Major stuff here.
  45. In fact, enough to being programming your own games.
  46.  
  47. 2) With a sad note, I have to report that the Sega listserver
  48. has died a death of low usage, and long with that went the site
  49. on Busop. I am in the process of locating a new site(s), and
  50. will make the apporte posts when I do. If you have a site that you
  51. admin, and are willing to donate some disk space, let me know please.
  52. The good news of this is that these new sites will be mirrored so you
  53. could find the files quicker. I am also working on a WWW version of this
  54. document, and if you know of a site to put it, let me know.
  55.  
  56. 3) Coding for the four player tap from Electonic Arts has been added.
  57. Does anyone have the code for the multi-tap from Sega, and how it works?
  58.  
  59. 4) I am now beginning to work on a topic header on languages that
  60. you can program in for the Sega and Sega CD ROM. If you have any
  61. direct information (compiler, how to compile, etc) let me know so
  62. I can include it.
  63.  
  64. =============================================================
  65.  
  66. 1.0 Questions
  67.  
  68. Q) What are the differences between Mega Drive and Genesis?
  69.    What are the differences between Mega CD and Sega CD?
  70.  
  71. A) Physically, on the outside, the only difference is the
  72.    plastic case, the cartridge shape is slightly different on
  73.    the American version, smaller in size. On the inside there
  74.    are four jumpers labeled J1 though J4. J1 and J2 is the
  75.    language switch, between English and Japanese, J3 and J4
  76.    select the output between PAL and NTSC. You can build a
  77.    switch that can allow you to select between these options.
  78.    The diagram is included in this document (Chapter 5.0,
  79.    called "Language Switch"). The reason for the language
  80.    switch is to keep people from getting the game before it
  81.    is officially released elsewhere in the world. The newer
  82.    Sega Machines do not have the jumpers, and hence you can
  83.    not build a switch (as of yet).
  84.  
  85.    The difference between Mega CD and Sega CD are internal.
  86.    In side the machine there is a ROM BIOS chip which is changed
  87.    for different markets. Sega has a version of the BIOS which
  88.    will play any system's games, but this is for Game developing
  89.    and testing. There is a device called Pro-CDX which will allow
  90.    you to by-pass the lockout and play any country's games.
  91.  
  92. Q) Where to find files on the Sega Genesis/Mega Drive
  93.    hardware?
  94.  
  95. A) You can find the files on the Sega hardware from one of
  96.    the following FTP sites. A brief section describing memory
  97.    and cartridge ROMs are included in this FAQ. The author
  98.    Rick McTeague, is from Louisville and the most current copy
  99.    can be found there first.
  100.  
  101. FTP ftp.spd.louisville.edu
  102.     pub\sega\hardware.txt
  103.  
  104. FTP sunsite.unc.edu
  105.     pub\micro\games\sega\faqs\incoming\hardware.txt
  106.     It's in there. I'm not sure of the exact location.
  107.     There are also many other files here as well as a few
  108.     68000 ASM. <-- yet to be moved and posted. Working on
  109.     it.
  110.  
  111.  
  112. Q) What does it take to program the Genesis?
  113.  
  114. A) Development kits can be bought from many companies, a list
  115.    is included in the section called "Companies". These kits
  116.    require an IBM or Amiga computer to compile the code,
  117.    which is usually assembly, but can be in C as long as it
  118.    can be compiled into 68000 binary. SEGA's own kit is extremely
  119.    expensive and they are rumored to have slow response time
  120.    to answer questions. The price of the kits cost from $1000
  121.    to $4000.
  122.  
  123. Q) Is IBM or Amiga the only two platforms for game
  124.    development?
  125.  
  126. A) No. The Apple Macintosh does have a system, which does allow
  127.    you to compile games, but it is a do-it yourself job (See below
  128.    for the whole scope). There also is a system for the Apple IIgs,
  129.    called Sluggo from Parsons Engineering. As for the Mac, if you
  130.    know, please pass it on. It is rumored that Electronic Arts uses
  131.    a priority system on the Macintosh for porting the games.
  132.  
  133. -- This information comes from Landon Dyer <landon@apple.com>,
  134.  
  135. -- You can generate 68K code for the Sega "trivially" with the
  136.    C compiler and assembler in the Macintosh programmer's workshop
  137.    (MPW). You'll need to hack up some transfer utilities, but this
  138.    is not really hard. You can wire-wrap a ROMulator, or buy one;
  139.    there are a bunch on the market that should work just fine.
  140.    I had a ROMulator and a debugger up and running in about a
  141.    week, working evenings. (Ed note: ROMular information can be found
  142.    at the FTP sites)
  143.  
  144. Q) How do I program the SEGA CD Rom?
  145.  
  146. A) I am beginning to understand how to program this device,
  147.    but more information is needed, so if you have any, please
  148.    pass it along to me so I can include it in the next update.
  149.    Look under Hardware 2.1, Sega CD for more information about
  150.    the unit.
  151.  
  152. Q) What is Saturn, and how do I program that?
  153.  
  154. A) Saturn is Sega's next generation game machine, which
  155.    is based on Sega's S-1 /S-2 arcade Machine's motherboard.
  156.    Rumor has it that it will allow programming in C as
  157.    well as Assembly, and porting of arcade games that are
  158.    based on the S-1 and S-2 boards will take only a week.
  159.    There is good news and bad news as well.
  160.    Good news, Microsoft will be writing the OS.
  161.    Bad new, Microsoft will be writing the OS.
  162.  
  163. Q) What else is there on Internet?
  164.  
  165. A) Well there is the Sega Programming forum, which you can
  166.    join by subscribing to it with this command:
  167.    Send a message to Listserv@Busop.Cit.Wayne.Edu with the
  168.    first line reading SUBSCRIBE MEGADEV
  169.    To unsubscribe, do the same above, except the first line
  170.    should read UNSUBSCRIBE MEGADEV
  171.  
  172.    There is also Rec.Games.Video.Programmer and
  173.    Rec.Games.Video.Sega where you can ask your questions.
  174.  
  175.    There are also files on how to use the old SEGA 3D glasses
  176.    with your IBM compatible computer which can be found all
  177.    over the place (including the above FTP sites).
  178.  
  179. =============================================================
  180.  
  181. 2.0 Hardware : This is the inner workings of the Sega system
  182. ROM and Memory. For a better understanding Sega Hardware I
  183. suggest reading Hardware.txt. An up-to-date version of this
  184. file can be gotten by anonymous ftp from Ftp.spd.louisville.edu,
  185. in the file "Pub/sega/Hardware.txt".
  186.  
  187. Genesis - this information comes from Rick McTeague.
  188.  
  189. Sega Genesis Hardware Internals - Revised: 04/07/1993
  190.  
  191. Please send corrections or comments to:
  192.  
  193.    Rick McTeague
  194.    Sysrick@starbase.spd.louisville.edu
  195.  
  196. Disclaimers:
  197.  
  198. The following information was extracted without the use of
  199. official information from Sega Enterprises, Ltd. I therefore
  200. offer no warranty on the correctness of this information.
  201. Use it at your own risk.
  202.  
  203. This information was gathered as a personal project, and is
  204. not the responsibility of my employer.
  205.  
  206. Different versions of the Genesis exist, so I won't suggest
  207. that any of this information is right for anybody's Genesis
  208. but my own.
  209.  
  210. Sega, Genesis, Sonic the Hedgehog, and Ecco the Dolphin are
  211. trademarks of Sega Enterprises, Ltd. Other trademarks are the
  212. property of their respective companies.
  213.  
  214.  
  215. The Cartridge ROM
  216. -----------------
  217.  
  218. As others on the net have observed, a standard Genesis
  219. cartridge is nothing more than a small printed circuit board
  220. with a ROM on it. There are some cartridges which have
  221. battery-backed RAM for saving high scores, configurations,
  222. etc., but I haven't seen these, so I don't know about them.
  223. If you know of a particular cartridge that has RAM, let me
  224. know so I can go rent one and take it apart (shhhh!) to see
  225. what's in it.
  226.  
  227. A cartridge contains a word-wide (16 bit) ROM with up to 2
  228. Meg words (4 Mbytes). This is based on the signal !C_CE, which
  229. is used as the cartridge ROM's chip enable on the cartridges
  230. I've looked at, and which is active at addresses $000000-$3fffff.
  231.  
  232. It may be possible to have more than 4 Mbyte cartridges; if
  233. so, either they ignore the !C_CE line and do their own
  234. address decoding, or there's a register somewhere in the
  235. Genesis which changes the default address decoding scheme for
  236. !_CE.
  237.  
  238. Note that cartridges are advertised as being "8 Meg"; as far
  239. as I know, is 8 Meg _bits_, not bytes. 1 Mbyte is still
  240. pretty impressive for a game machine.
  241.  
  242. SONIC uses a 40-pin 256Kx16 (512Kx8) ROM in word mode.
  243.  
  244. Ecco the Dolphin uses a 42-pin 512Kx16 (1024Kx8) ROM in word
  245. mode. This one confused me because I'd never seen a 42-pin
  246. DIP before, so I thought it was 40 pins. No wonder the
  247. signals didn't look right...
  248.  
  249. Putting together a little bit of information from a Sharp
  250. data sheet for a 512 Kword ROM with a bit of conjecture based
  251. on the Sonic and Ecco cartridges, this is what I can come up
  252. with for pinouts:
  253.  
  254.          Sonic                              Ecco
  255.       (256 Kword)                       (512 Kword)
  256.  
  257.                                           ----u----
  258.          ----u----               A18    1=|       |=42   VCC?
  259. A17    1=|       |=40   A 8      A17    2=|       |=41   A 8
  260. A 7    2=|       |=39   A 9      A 7    3=|       |=40   A 9
  261. A 6    3=|       |=38   A10      A 6    4=|       |=39   A10
  262. A 5    4=|       |=37   A11      A 5    5=|       |=38   A11
  263. A 4    5=|       |=36   A12      A 4    6=|       |=37   A12
  264. A 3    6=|       |=35   A13      A 3    7=|       |=36   A13
  265. A 2    7=|       |=34   A14      A 2    8=|       |=35   A14
  266. A 1    8=|       |=33   A15      A 1    9=|       |=34   A15
  267. A 0    9=|       |=32   A16      A 0   10=|       |=33   A16
  268. !CE   10=|       |=31   !BYTE    !CE   11=|       |=32   !BYTE
  269. GND   11=|       |=30   GND      GND   12=|       |=31   GND
  270. !OE   12=|       |=29   D15      !OE   13=|       |=30   D15
  271. D 0   13=|       |=28   D 7      D 0   14=|       |=29   D 7
  272. D 8   14=|       |=27   D14      D 8   15=|       |=28   D14
  273. D 1   15=|       |=26   D 6      D 1   16=|       |=27   D 6
  274. D 9   16=|       |=25   D13      D 9   17=|       |=26   D13
  275. D 2   17=|       |=24   D 5      D 2   18=|       |=25   D 5
  276. D10   18=|       |=23   D12      D10   19=|       |=24   D12
  277. D 3   19=|       |=22   D 4      D 3   20=|       |=23   D 4
  278. D11   20=|       |=21   VCC      D11   21=|       |=22   VCC
  279.          ---------                        ---------
  280.  
  281. Note that the address line numbering is different than that
  282. of the 68000; line A0 of the ROM is really connected to the
  283. 68000's A1. This is because of the way the 68000 handles
  284. even/odd byte addressing using !UDS and !LDS.
  285.  
  286. The !BYTE line is held high. This puts the ROM chip into
  287. "word" mode, where data is accessed 16 bits at a time.
  288.  
  289. The convenient correspondence between ROM and 68000 data and
  290. address lines (ROM D0 = 68K D0, ROM D1 = 68K D1, etc..., and
  291. ROM A0 = 68K A1,  ROM A1 = 68K A2, etc...) may not exist in
  292. all cartridge designs. This is sometimes difficult to
  293. visualize, but keep in mind that the ROM doesn't care whether
  294. its D0 is really D0, or if its A3 is really A3, etc. As long
  295. as each data line is used as the same D## line for both
  296. programming and reading, and each address line is used as the
  297. same A## for both programming and reading, the ROM will
  298. function properly and the 68000 will see the right
  299. instructions. Think about it...
  300.  
  301. Why bring this up? If you remove the ROM from the cartridge
  302. PCB and try to read it with a EPROM programmer, there may be
  303. situations where you won't see valid 68000 instructions, or
  304. things won't be in the right place... Assuming your
  305. programmer isn't messed up, this would be because the address
  306. and data lines on the ROM aren't assigned the way you'd
  307. expect.
  308.  
  309. Why would someone make a cartridge like this? To make your
  310. life difficult, if you're wanting to hack their ROMs, or to
  311. make their life easy, by making the cartridge PCB easier to
  312. design.
  313.  
  314. The easiest way to avoid this potential problem is to build
  315. an adapter from your programmer's EPROM socket to an edge
  316. card connector into which you plug the cartridge. This is a
  317. bit safer, too, so you don't have to remove the ROM from the
  318. cartridge (or even open it up).
  319.  
  320. The Memory Map
  321. --------------
  322.  
  323. $000000 $3fffff Cartridge ROM, when enabled by cartridge
  324. control register and !CART_IN.
  325.  
  326. $000000 $0007ff Internal OS ROM, when enabled by cartridge
  327. control register and !CART_IN.
  328.  
  329. $ff0000 $ffffff 64Kbytes scratchpad RAM
  330. Partially decoded; RAM actually appears repeated between
  331. $e00000 through $ffffff.
  332.  
  333. $a14101 cartridge control register
  334. bit 0 = 0: cartridge disabled, OS ROM enabled
  335. bit 0 = 1: cartridge enabled, OS ROM disabled
  336.  
  337. $a00000 $a????? Unknown. Audio? Controller I/O?
  338.  
  339. $c00000 $c????? Video display controller registers
  340.  
  341. The OS puts the top of its stack at $ffff00, and defines a
  342. "user stack pointer" at $000000 (building down through the
  343. top of RAM memory).
  344.  
  345. The Z80 processor is used for sound and has 8Kbytes of RAM.
  346. I don't know anything about how the Z80 does its work, as I
  347. haven't looked.
  348.  
  349. Acknowledgements
  350. ----------------
  351. Thanks to:
  352.  
  353. dt93tn@pt.hk-r.se (Tore Nestenius) for info on older Genesis
  354. systems.
  355.  
  356. lewism@rpi.edu (Michael Lewis) for info on the Sony CXA1145
  357. and Samsung KM6264 chips.
  358.  
  359. crs@crs-sys.uucp (Chris Gregors) for posting a version of the
  360. Genesis cartridge port pinouts.
  361.  
  362. merlyn@digibd.com (Brian Westley) for Game Genie information
  363. and decoder program.
  364. ------------------------------------------------------------
  365.  
  366. Brief technical description of the Genesis:
  367.  
  368. ---
  369. The genesis graphics hardware consists of 2 scrollable planes.
  370. Each plane is made up of tiles. Each tile is an 8x8 pixel square
  371. with 4 bits per pixel. Each pixel can thus have 16 colors. Each
  372. tile can use 1 of 4 color tables, so on screen you can get 64
  373. colors at once, but only 16 in any specific tile. Tiles require
  374. 32 bytes. There is 64K of graphics memory. This would allow
  375. for 2048 unique tiles if memory were used for nothing else.
  376.  
  377. Each plane can be scrolled independently in various ways.
  378. Planes consist of tables of words, where each word describes a
  379. tile. The word contains 11 bits for describing which tile, 2 bits
  380. for flip x and flip y, 2 bits for the selection of the color table,
  381. and 1 bit for a depth selector. Sprites are composed of tiles also.
  382. A sprite can be up to 4 tiles wide by four tiles high. Since each
  383. tile is 8x8, this means sprites can be anywhere from 8x8 pixels to
  384. 32x32 pixels. There can be 80 sprites on screen at one time. On a
  385. scan line you can have 10 32 pixel wide sprites or 20 16 pixel wide
  386. sprites. Each sprite can only have 16 colors but they are out of the
  387. 4 different color tables. Color 0=transparent.
  388.  
  389. Colors are 3 bits for each gun, so 512 colors are possible.
  390.  
  391. There is a memory copier that is in hardware. This does fast copies from
  392. the 68000 ram into the graphics ram.
  393.  
  394. The 68000 runs at about 8 mhz. It has 64K of memory devoted to it. The
  395. ROM cartridge appears at 0.
  396.  
  397. The Z80 has 8K of ram. The 68000 can download programs to the z80 and
  398. let them go. The z80 can access the graphics chips or the sound synth
  399. chips but usually those things are controlled by the 68000.
  400.  
  401. The sound chips consist of a Yamaha synthesis chip and a TI programmable
  402. sound generator. The PSG has 3 square wave tones and 1 white noise tone.
  403. Each tone/noise channel can have its own frequency and volume.
  404.  
  405. The Yamaha chips are based on FM synthesis. There are 6 voices with 4
  406. operators each. The chips are similiar to those used in the Yamaha
  407. DX27 and DX100 synthesizers. By setting up registers a rich variety of
  408. sounds can be created.
  409.  
  410. ------------------------------------------------------------
  411.  
  412. 2.1 Sega CD Rom. The following information came from
  413. Leyland@island.COM (Robert Leyland), who was a programmer for the
  414. most excellent Sega CD Rom game - Flying Aces. (Plug!Plug!
  415. Plug!Plug!Plug!Plug!)
  416.  
  417. -- The Sega CD is ISO 9660 format, with proprietary start-up code
  418. that must be licensed from SEGA in order to work. For programming
  419. you use two PC's, one connected to a debugging system and the other
  420. emulated an CD-ROM drive.
  421. The trickiest part of programming the Sega CD/Genesis combo is
  422. keeping the two CPU's synchronized. For some reason the single
  423. hardest thing to do with any computer is get it to talk reliably
  424. with another computer.
  425. --
  426.  
  427.  
  428. ------------------------------------------------------------
  429.  
  430. 2.2 Joystick - 3 button version - Could some please post a 6
  431. button version?
  432.  
  433. By: nhowland@matt.ksu.ksu.edu (Neal Howland) for information
  434. on the Joystick port.
  435.  
  436. First some background info:  The chip inside the controller
  437. is a 74HC157.  This is a high-speed cmos quad 2-line to
  438. 1-line multiplexer. Basically how this works is there are two
  439. inputs ( A and B ) for every output ( Y ).  There are four
  440. groups like this.  There is one select signal for the whole
  441. chip.  When the select signal is low, the output ( Y ) is the
  442. same as input A.  When the select signal is high, the output
  443. Y is the same as input B.  The pinout for the chip is as
  444. follows:
  445.  
  446.    Pin 1 - SelectPin 16 - Vcc (+5V)
  447.    Pin 2 - 1APin 15 - G (? must be low)
  448.    Pin 3 - 1BPin 14 - 4A
  449.    Pin 4 - 1YPin 13 - 4B
  450.    Pin 5 - 2APin 12 - 4Y
  451.    Pin 6 - 2BPin 11 - 3A
  452.    Pin 7 - 2YPin 10 - 3B
  453.    Pin 8 - GndPin 9 - 3Y
  454.  
  455.  
  456. All the controls are done with switches.  Up is a switch,
  457. Down is a switch, etc. Now, I will be referring to the output
  458. of these switches later on. What I mean is that the output is
  459. usually high, that is when the switch isn't pressed.
  460.  
  461. When the button is pushed, the output goes low.  This is
  462. accomplished by connecting the output to +5V through a 10k
  463. resistor. The button is then attached between the output and
  464. ground. It looks like this:
  465.  
  466.      +5V -----/\/\/------+--------- Output
  467.                10k       |
  468.                          |
  469.                 /        |
  470.    Ground -----/  -------+
  471.               button
  472.               (normally open)
  473.  
  474. For all of those who could actually decipher the above
  475. schematic, congratulations!
  476.  
  477.  
  478. I will now run down what lines from the plug are connected to
  479. what. The line numbers are determined as follows, looking
  480. straight at the plug on the front of the Genesis the numbers
  481. are:
  482.  
  483.    1 2 3 4 5
  484.     6 7 8 9
  485.  
  486.   (For those of you who buy a joystick cable from radio shack
  487. the pin #'s to wire colors are as follows: 1-white 2-blue
  488. 3-green 4-brown 5-yellow 6-orange 7-red 8-black 9-gray )
  489.  
  490. anyway, line connections:
  491.  
  492. Line 1 - Up output      These are the only two direct
  493. Line 2 - Down output             connections
  494.  
  495. Line 3 - Pin 4 of the chip output 1Y
  496. Line 4 - Pin 7 of the chip output 2Y
  497.  
  498. Line 5 - This line carries in +5V. It is connected to the
  499.          +5V bus line.
  500.  
  501. Line 6 - Pin 9 of the chip output 3Y
  502. line 7 - Pin 1 of the chip this carries in a select signal
  503.          from the Genesis. This is a signal which varies
  504.          rapidly and controls which input goes through the
  505.          output.
  506.  
  507. Line 8 - Ground  This is connected to the Ground bus line.
  508. Line 9 - Pin 12 of the chip output 4Y
  509.  
  510. Now for the chips pin connections:
  511.  
  512. Pin 1 - Line 7    (select)
  513. Pin 2 - Ground    (1A)  Don't ask me why they do this. Maybe
  514. Pin 3 - Left      (1B)  future expansion
  515. Pin 4 - Line 3    (1Y)
  516. Pin 5 - Ground    (2A)  Again, possibly future expansion
  517. Pin 6 - Right     (2B)
  518. Pin 7 - Line 4    (2Y)
  519. Pin 8 - Ground    (GND)
  520. Pin 9 - Line 6    (3Y)
  521. Pin 10 - Button B (3B)
  522. Pin 11 - Button A (3A)
  523. Pin 12 - Line 9   (4Y)
  524. Pin 13 - Button C (4B)
  525. Pin 14 - Start    (4A)
  526. Pin 15 - Ground   (G)   This must be connected to ground
  527. Pin 16 - +5V      (Vcc) Power source for the chip
  528.  
  529. Anyway that's all the info needed to build your own joystick.
  530.  
  531. Now as an added bonus, additional information!
  532.  
  533. A simple source for a joystick cable is the Radio Shack
  534. joystick extension cable. It is around $5 and is 10 ft. long.
  535. Just snip off the connector that won't plug into the Genesis,
  536. strip the wires back, and use the color pinout list I gave
  537. above.
  538.  
  539. I went to my local arcade game repair company today and
  540. purchased the supplies I needed.  They were much cheaper than
  541. I expected.  Things you would need to buy from them would be:
  542.  
  543.    an 8-way joystick     this ran me $15
  544.         3 buttons             $2.50 apiece
  545.  
  546. I only bought three buttons because I am going to use a Radio
  547. Shack push button switch for my start button. You can purchase
  548. 4 arcade game buttons if you wish.
  549.  
  550. Interesting ideas for extras on the joystick:
  551.  
  552. 1.  Autofire can be achieved with a simple 555 timer circuit.
  553.  
  554.     For anyone wanting a challenge it should be possible to
  555. build a digital autofire using a divide-by-n counter with the
  556. select signal as clock input.
  557.  
  558. 2.  Slow down mode is just autofire for the start button.
  559.  
  560. =============================================================
  561.  
  562. 3.0 Companies - these companies produce the hardware that is
  563. required to write games for the Genesis. The original
  564. document came from: Scott Golby <sgolby@st.nepean.uws.edu.au>
  565.  
  566.    Hi Everyone,
  567.  
  568.    Here is the current list of info I have about the Sega.
  569.  
  570.    I have had about 10 replies so far asking to pass my
  571. info on.  If people want I will pass their EMail address on
  572. to everyone else so we can work as a group.  Drop me a line
  573. if you want to be added to the 'group' list.
  574.  
  575. *****    <----- Five astrict like this means info from
  576. different people
  577.  
  578.    Sega Genesis Developer Resources
  579.  
  580.    Dan Chang April 18, 1993
  581.  
  582. Sega of America Inc
  583. Consumer Products Division
  584. 125 Shoreway Road
  585. San Carlos, California, 94070
  586. Tel : (415) 802-4400
  587. Fax : (415) 802-4458
  588.  
  589. Stuart Kosoy is the person to contact at Sega of America
  590. at (415)802-4407.
  591.  
  592. Products : Detailed SEGA Genesis technical information.  GEMS
  593. SEGA music development package.
  594. Solution : Music and Sound effects package for the Sega. SOA
  595. can provide detailed information on programming the Genesis;
  596. however they will want to know more about your company first.
  597.  
  598. Western Technologies, Inc.
  599. 12057 Jefferson Blvd
  600. Culver City, California, 90230
  601. Tel : (310) 821-7880
  602. Fax : (310) 306-1739
  603.  
  604. Products : SegaDev Card. PC-Hosted Genesis development
  605. hardware, which includes SEGADEV.EXE, a Windows-hosted
  606. source-level debugger, and SEGALOAD.EXE, a PC_hosted 68000
  607. object code downloader.
  608. Solutions : SEGA Genesis Hardware, WT recommends Sierra
  609. Systems 68000 Assembler.
  610.  
  611.  
  612. Sierra Systems
  613. 6728 Evergreen Ave
  614. Oakland California 94611
  615. Tel : (510) 339-8200  or (800) 776 4888
  616. Fax : (510) 339 3844
  617.  
  618. Products : PC-hosted Sierra C cross-compiler, which included
  619. 68000 C compiler, assembler, linker.
  620.  
  621. Contact person at Sierra Systems is Larry Rosenthal
  622. E-Mail Sierra@netcom.com
  623.  
  624.  
  625. Motorola, Literature Dist
  626.  
  627. This entry basically has a list of 68000 reference and
  628. programming books.
  629.  
  630.  
  631. Echidna
  632. 1101 W Stevens Ave, Suite 232
  633. Santa Ana California 92707
  634. Tel : (714) 545-2662
  635. Fax : (714) 545-3705
  636.  
  637. Products : tUME - the Universal Map Editor. PC-Hosted tool to
  638. edit tile-maps.
  639. Solutions : Saves time in designing game maps and placing
  640. level information. Downloads maps to Western Techs SegaDev
  641. card.
  642.  
  643. A tUME demo can be found by FTP busop.cit.wanye.edu under
  644. /pub/megadev/incoming/tumedemo.zip
  645. Well worth a look.
  646.  
  647.  
  648. Cross Products Limited
  649. 23 The Calls
  650. Leeds LS2 7EH, England
  651. Tel 0532 429814
  652. Fax 0532 426163   (dial 011 44 532 426163 from USA)
  653.  
  654. Product : SNASM68K : PC-Hosted SEGA Genesis development
  655. system, which includes a 68000 assembler, linker, debugger.
  656.  
  657.  
  658. Parsons Engineering
  659. Imhurst Ave
  660. Covina California 91724
  661. Tel (818) 966 5538
  662.  
  663. Products : PC/Apple IIgs hosted Sluggo Genesis development
  664. hardware.
  665.  
  666.  
  667. Advantech
  668. 1333 E.9400 South, Suite 160
  669. Sandy Utah, 84092
  670. Tel : (801) 572-5410
  671. Fax : (810) 572-5674
  672.  
  673. Products : blank SEGA Genesis cartridge PC boards, blank
  674. EPROMS.
  675.  
  676. *****
  677. Genesis Development System Frequently Asked Questions
  678.  
  679. Q:What is the Genesis Development System?
  680.  
  681. A:The GDS is a cross development system that lets you develop games and other
  682.   software to run on the Sega Genesis. The system consists of a 4 inch by 8
  683.   inch printed circuit board that plugs in the cartridge slot of the Genesis,
  684.   and has a cable going to the parallel port of the host computer. A complete
  685.   software set is included consisting of an integrated editor/assembler, a
  686.   stand alone assembler, a symbolic debugger, a music and sound effect editor,
  687.   a utility to break standard 16 color IFF images into tiles to be downloaded
  688.   to the Sega, a utility to capture screen graphics on the Genesis, a
  689.   utility to send an LBM image to the Genesis for preview, a linker for
  690.   joining multiple object modules, and several example files.
  691.  
  692. Q:Does it come with any source files?
  693.  
  694. A:You get source to the music editor, source to a Z80 program to run on the
  695.   genesis to interpret the music files, source to a demo program that plays
  696.   music and has sprites bouncing around behind the Sega logo, source to the
  697.   download utilities. Complete source is provided on communicating between
  698.   the host machine and the Genesis.
  699.  
  700. Q:How much memory does it have on the board?
  701.  
  702. A:It comes with 2.25 or 4.25 megabytes of memory. Older versions had 1.25
  703.   megabytes. 256K is reserved for use by the debugger for variable
  704.   storage and symbols.
  705.  
  706. Q:Can you program CD games with it?
  707.  
  708. A:It is not specifically designed for a CD. You could program as if you're
  709.   creating a cartridge then modify the code later to make it work on the
  710.   CD. I provide no information on the Genesis CDROM drive. I don't own one
  711.   myself. The Genesis CDROM market is perhaps 10% of the cartridge market.
  712.  
  713. Q:Does it include technical specifications for the Genesis?
  714.  
  715. A:Yes, it comes with descriptions of the memory map, graphics registers, the
  716.   Z80's functions, reading the joysticks, sprites, scrolling, tiles, the
  717.   DMA copier, the audio chips-in short everything required to program the
  718.   genesis. Also provided are several working demos with source.
  719.  
  720. Q:Is this proprietary information stolen from Sega?
  721.  
  722. A:No, the information on the Genesis came from reverse engineering it,
  723.   completely independent of Sega. There are no copyright violations in the
  724.   purchase or sale of this development system, nor is there anything illegal
  725.   about any use of it.
  726.  
  727. Q:How does it work?
  728.  
  729. A:The board has ROMs on it which contain the monitor and debugger that runs
  730.   on the Genesis. When the Genesis is reset, the ROMs take over and wait for
  731.   commands to come from the host machine-commands like download bytes, send
  732.   bytes back, set up registers, define a symbol, or enter the interactive
  733.   debugger. When in the interactive debugger the host machine acts as a
  734.   terminal, and characters are sent over the cable. Full 68000 debugging
  735.   is possible, including disassembly, single step, register view and modify,
  736.   breakpoints, expression evaluation, memory view, modify, search and copy,
  737.   symbol definition, memory compare. There is also a z80 disassembler built
  738.   in.
  739.  
  740. Q:What about the assembler?
  741.  
  742. A:The assembler is a full macro 68000 assembler, and includes the full 8080
  743.   and parts of the Z80 instruction set. It generates symbol table information
  744.   that can be downloaded to the Genesis to allow for symbolic debugging.
  745.   On a 66 Mhz DX2 the assembler is about 550,000 lines/minute. There is also
  746.   a linker which combines multiple object files.
  747.  
  748. Q:Can I program in C?
  749.  
  750. A:There is no C compiler included in the package. In the future there
  751.   may be.
  752.  
  753. Q:How do I make artwork? Is there a sprite editor?
  754.  
  755. A:Originally I planned on including a simple graphic editor, but I found that
  756.   no one used it-instead they used Dpaint. The best way is to use dpaint to
  757.   create graphics in lo-res 16 color mode, then to use the utility I provide
  758.   to convert them to raw data to be sent to the Sega. Animation can be done
  759.   within Dpaint. Unfortunately there is no editor for manipulating giant
  760.   figures made out of sprites, but in principle it would be possible to do. So
  761.   probably you will use dpaint or some other painting program to create the
  762.   artwork.
  763.  
  764. A:Can you backup existing cartridges like the game backup systems?
  765.  
  766. Q:The system is intended for game development. However if you were able
  767.   to obtain ROM images, they can be downloaded just like original code.
  768.   When running a ROM under the system, you can tinker with memory, modify
  769.   gameplay, add lives, etc. You can do all the normal debugging functions,
  770.   like single step, breakpoints, etc, to see how the program is working.
  771.   In the future (Mid March, 1994) a reader will be available for $100 which
  772.   will let you read out the contents of your cartridges.
  773.  
  774. Q:How fast are downloads?
  775.  
  776. A:The current board has transfer rates of up to 105K bytes per second. Older
  777.   versions of the board had a 49K bytes per second transfer rate.
  778.  
  779. Q:What host machines is this available on?
  780.  
  781. A:Currently the complete system is available on the IBM PC. There is also
  782.   an Amiga version but it has fewer features than the PC version.
  783.  
  784. Q:Why should I buy your system and not go through Sega?
  785.  
  786. A:My system is better and cheaper than those provided by Sega. I sell to
  787.   anyone. Sega sells only to large companies. I require no non-disclosure
  788.   statements to be signed. Sega requires you to sign extensive non-disclosure
  789.   statements, and you essentially have to be subservient to them forever.
  790.   If you buy my system you immediately have the ability to create software
  791.   for the Genesis. If you create a game, you can then sell it outrifht or
  792.   attempt to publish it yourself. You wouldn't have to pay Sega any of their
  793.   rediculous royalties on each unit, regardless of how well your program
  794.   sells.
  795.  
  796. Q:How long has this system been available?
  797.  
  798. A:It first became available in April 1991. The 2 and 4 megabyte versions
  799.   first became available in February, 1994.
  800.  
  801. Q:How many have already been sold?
  802.  
  803. A:I've sold around 30 units so far.
  804.  
  805. Q:How much does it cost?
  806.  
  807. A:For the 4 megabyte version the cost is $1600. For the 2 megabyte version
  808.   the cost is $1500. For the duration of March, 1994 there is a special
  809.   introductory price of $1000 for the 2 megabyte version and $1100 for the
  810.   4 megabyte version. After March, 1994 the price will be raised by $500.
  811.  
  812. Q:Will it be ported to other platforms?
  813.  
  814. A:There are no plans to port the software to any other platforms.
  815.  
  816. Q:What about technical support? How about software upgrades?
  817.  
  818. A:You can send me email and I will answer questions and help solve your
  819.   problems. If I'm home you can call me. Concerning software support: I want
  820.   you to be happy with this. If you want some program written, and it seems
  821.   like a good idea, chances are I'll do it for free and include it with the
  822.   system. Currently if the software seems sparse it's because no one has
  823.   complained so I guess I include enough. There's no point in writing
  824.   software if it isn't going to be used. In any case software upgrades are
  825.   free unless it's some major upgrade like including a C compiler-I don't
  826.   believe in selling something for hundreds of dollars then nickel and diming
  827.   you on upgrades. EPROM upgrades are free if you send back your originals.
  828.  
  829. Q:Do we need to pay you any royalty on games developed with the system?
  830.  
  831. A:No. Once you bought the system you can do anything you want with it-except
  832.   copy it and sell it yourself...
  833.  
  834. Q:How can I contact you?
  835.  
  836. A:Send me mail, email or call.
  837.   818-584-0357
  838.   INTERNET: dash@netcom.com
  839.   David Ashley
  840.   395 Sierra Madre Villa
  841.   Pasadena, CA 91107
  842.   USA
  843.  
  844. *****
  845.  
  846. =============================================================
  847.  
  848. 4.0 Code samples. The following code was graciously given to
  849. me by David Ashley, inventor of the GDS. We all owe him a big
  850. Thanks!
  851.  
  852. Here's sample code for reading the joystick:
  853. ------------
  854. ;jsinit must be called to set up the joystick, otherwise
  855. reading back will ;have errors. This need only be called
  856. once.
  857. jsinit:     moveq #$40,d0
  858.       move.b      d0,$a10009
  859.       move.b      d0,$a1000b
  860.       move.b      d0,$a1000d
  861.       rts
  862. ;The following two routines can be used for reading from the
  863. joystick
  864. ;ports.
  865. ;porta and portb return a byte in d0. 0 bits mean button is
  866. not down,
  867. ;1 mean button is down.
  868. ;The order is:
  869. ;76543210
  870. ;SACBRLDU
  871. ;meaning Start, A, C, B, Right, Left, Down, Up
  872. porta:      move.b      #$40,$a10003
  873.       nop
  874.       nop
  875.       move.b      $a10003,d1
  876.       andi.b      #$3f,d1
  877.       move.b      #$00,$a10003
  878.       nop
  879.       nop
  880.       move.b      $a10003,d0
  881.       andi.b      #$30,d0
  882.       lsl.b #2,d0
  883.       or.b  d1,d0
  884.       not.b d0
  885.       rts
  886. portb:      move.b      #$40,$a10005
  887.       nop
  888.       nop
  889.       move.b      $a10005,d1
  890.       andi.b      #$3f,d1
  891.       move.b      #$00,$a10005
  892.       nop
  893.       nop
  894.       move.b      $a10005,d0
  895.       andi.b      #$30,d0
  896.       lsl.b #2,d0
  897.       or.b  d1,d0
  898.       not.b d0
  899.       rts
  900. -----------------------
  901.  
  902. Graphics code is another matter. Since I sell a development
  903. system, and one of the features is I provide technical info
  904. on the Genesis hardware, it would sort of be a conflict of
  905. interest for me to give things away :^).
  906.  
  907. -----------------------
  908.  
  909. The whole sample is not inlcuded because of it's size.
  910. However you can find the rest of the code, about 5 pages worth, at the
  911. same locations as this file. Look for a file called code.txt.
  912. These files will always be posted together.
  913.  
  914.         dc.l $FFFE00,$D7E,$200,$200,$200
  915.         dcb.l $17,$200
  916.         dc.l $E9E,$200,$EAE,$200,$20E
  917.         dcb.l $F,$20E
  918.         dcb.l $F,$200
  919.         dc.b "SEGA MEGA DRIVE (C)SEGA "
  920.         dc.b "1989.AUG _____",$87,"V        "
  921.         dc.b "                        "
  922.         dc.b "              ",$87,"V        "
  923.         dc.b "                        "
  924.         dc.b "        GM 00054010-01",$93,"G"
  925.         dc.b "JD              ",$0,$0,$0,$0,$0,$3,"",$FF
  926.         dc.b $0,"",$0,$0,$0,"",$FF,"                "
  927.         dc.b "                        "
  928.         dc.b "                        "
  929.         dc.b "JUE             "
  930.         move #$100,$A11100
  931.  
  932. =============================================================
  933.  
  934. 4.11 Four Way Player Tap from Electonic Arts. While no code
  935. is prodived, here is a hack of sorts. I am honoring the request
  936. of anonymity from the sender. The $__ are ports calls by the
  937. software to control the hardware (of couse).
  938.  
  939. With the EA 4 way play adapter, all the controllers are read through
  940. controller 1's port after sending the selection data out of controller
  941. 2's port. The selection data is $0C for controller 1, $1c for controller
  942. 2, $2c for controller 3, and $3c for controller 4.
  943.  
  944. The adaptor is detected by setting the registers in the following way.
  945. (This is from G______ C____ code, so don't ask me why they did some of
  946. this stupid stuff.)
  947.  
  948. $40->CTRL1
  949. $40->CTRL2
  950. $43->CTRL2 (This doesn't make sense... why set it twice?)
  951. $7C->DATA2 (This is probably masked off by the $43 above...)
  952. $7F->CTRL2
  953. $7C->DATA2
  954.  
  955. If you read DATA1 and either of the low 2 bits is set, there isn't a 4
  956. tap. You must enable writing to port two after that so that you can
  957. select the port.
  958.  
  959. Well this is the view from inside the machine... hope this helps you
  960. somewhat.
  961.  
  962. =============================================================
  963.  
  964. 4.2 Graphics, Color Palette and sprit control
  965.  
  966.  
  967. Hi,
  968.  
  969. I found a file called 'MegaDrive Documentation' on a BBS in Holland.
  970. I dunno which format it use (maybe an Amiga one) but it's easily redable.
  971. You'll maybe find some info in it for your faq. So here it is...
  972.  
  973. Regards,
  974.  
  975. David Delabassee <delabass@nic.INbe.net>
  976.  
  977. ==============================================================
  978.  
  979. DATABASE
  980. NODE MAIN "Table of Contents"
  981.  
  982.  
  983. Table of Contents:
  984.  
  985. {"About" LINK About }
  986. {"MegaDrive MAP" LINK Megarivemap}
  987. {"The VRAM" LINK TheVRAM }
  988. {"The Tiles 8*8" LINK TheTiles8*8}
  989. {"Horizontal Scrolls" LINK HorizontalScrolls}
  990. {"The CRAM" LINK TheCRAM}
  991. {"The Screens Maps" LINK TheScreensMaps}
  992. {"Priority of Plans" LINK Priority}
  993. {"The SRAM" LINK TheSRAM}
  994. {"Sprites List" LINK SpritesList}
  995. {"Access to the VRAM" LINK AccesstoVRAM}
  996. {"Video Registers" LINK Video-Registers}
  997. {"Interruptions" LINK Interruptions}
  998. {"Exceptions of 68000 of the GENESIS" LINK Exceptions}
  999.  
  1000.  
  1001. {"More InFormAtions" LINK Informations}
  1002.  
  1003.  
  1004.  
  1005. NODE  About "About"
  1006.  
  1007.       *     MEGADRIVE DOCUMENTATION VERSION 1.0 *
  1008.  
  1009.       Date   : 09-02-94
  1010.       Author : All Writen by MuMBlY / {"MYSTIC" LINK Informations}
  1011.  
  1012.  
  1013. ENDNODE
  1014.  
  1015. NODE  Megarivemap "megadrive map"
  1016.  
  1017. ----------------------------------------------------------------------
  1018.                   MEGADRIVE MAP
  1019. ----------------------------------------------------------------------
  1020.  
  1021.             000000-3FFFFF : 4 Megas Rom Cardtrige
  1022.             400000-9FFFFF : Reserved
  1023.             A00000-AFFFFF : I/O Ports
  1024.             B00000-BFFFFF : Reserved
  1025.             C00000-DFFFFF : Vdp
  1026.             E00000-FEFFFF : Ram Image
  1027.             FF0000-FFFFFF : 64kb RAM
  1028.  
  1029. ENDNODE
  1030.  
  1031. NODE TheVRAM "The VRAM"
  1032.  
  1033. The VRAM
  1034. ----------------------------------------------------------------------
  1035.  
  1036. The 'RAM video' (64 kb) is used for countaining all informations of
  1037. the screen.
  1038.  
  1039. - Caracters (tiles) of 8*8 pixels in 16 colors (32 bytes per caracters).
  1040. - Screens (2 screen of 32*32 to 128*128 in 64 colors).
  1041. - Attributs of Sprites (maximum of 80 sprites).
  1042. - Horizontal pointers of scrollings (1 pointer per line).
  1043.  
  1044. ENDNODE
  1045.  
  1046. NODE TheCRAM "The CRAM"
  1047.  
  1048. ----------------------------------------------------------------------
  1049.                   The CRAM
  1050. ----------------------------------------------------------------------
  1051.  
  1052. The 'RAM color' (128 bytes) is used for containing the 4 palettes of 16
  1053. colors (1 word per color).
  1054.  
  1055. - Each Color is coded on 12 bits:
  1056.   Bit 11-8 : Bleue Value
  1057.   Bit 7-4  : Green Value
  1058.   Bit 3-0  : Red   Value
  1059.  
  1060. THe least signicative bit of each value is ignored, that is given a palette
  1061. of 8*8 values =3D 512 differents colors
  1062.  
  1063. ENDNODE
  1064.  
  1065. NODE TheSRAM "The SRAM"
  1066.  
  1067. ----------------------------------------------------------------------
  1068.                   The SRAM
  1069. ----------------------------------------------------------------------
  1070.  
  1071. The 'Scroll RAM' (128 Bytes ?)is used for countaining values of vertical
  1072. scrolling.
  1073.  
  1074. ENDNODE
  1075.  
  1076. NODE TheTiles8*8 "The Tiles 8*8"
  1077.  
  1078. ----------------------------------------------------------------------
  1079.                   The Tiles 8*8
  1080. ----------------------------------------------------------------------
  1081.  
  1082. The Tiles of 8*8 pixels in 16 colors.
  1083. Each tile is longer of 32 bytes.
  1084. The Format is simple : 1 longer word per line*8lines.
  1085. Each Pixel is represented in an half-byte.
  1086.  
  1087. Example : dc.1$01111100 ; letter A in Color 1 !
  1088.         dc.1$11000110
  1089.         dc.1$11000110
  1090.         dc.1$11111110
  1091.         dc.1$11000110
  1092.         dc.1$11000110
  1093.         dc.1$11000110
  1094.         dc.1$00000000
  1095. ENDNODE
  1096.  
  1097. NODE TheScreensMaps "The Screens Maps"
  1098.  
  1099. ----------------------------------------------------------------------
  1100.                   The Screens Maps
  1101. ----------------------------------------------------------------------
  1102.  
  1103. The GENESIS is able to manage 2 SUperposed screens (Playfields).
  1104. Each palyfield can do of 32*32 tiles until 128*128 tiles.
  1105. Each tiles is coded on 1 word and are consecutive in the screen map.
  1106.  
  1107. The Format is
  1108.       Bit 15    : {"Priority" LINK Priority}
  1109.         Bit 14-13 : Palette  ( 0 to 3 )
  1110.         Bit 12    : Vertical Flipping
  1111.         Bit 11    : Horizontal Flipping
  1112.         Bit 10-0  : Tile number ( 0 to 2047 )
  1113.  
  1114. Example :
  1115.       dc.w $8001 ; Priority =3D 1, Pallette =3D 0, no Flipping, Tile number #1
  1116.  
  1117. ENDNODE
  1118.  
  1119. NODE Spriteslist "Sprites LIst"
  1120.  
  1121. ----------------------------------------------------------------------
  1122.                   Sprites List
  1123. ----------------------------------------------------------------------
  1124.  
  1125. The GENESIS is able to manage until 80 sprites on the screen.
  1126. The only limit is of 20 sprites per line of pixel and of 320 pixels
  1127. of sprites per line. ( ya can display 20 sprites of 16 pixels of large
  1128. with the same Y-axis but which 10 sprites of 32 pixels of large )
  1129.  
  1130. The sprites used the same tiles that the screen.
  1131. THose lastest can do of 1*1 tiles to 4*4 tiles.
  1132.  
  1133. Format of the list of sprites to display (8 bytes per sprite) :
  1134.  
  1135. byte 0-1 : Y-axis (0 to 511)+$80
  1136. byte 2   : SIze    (bit 0-1 : height 0-3+1 , Bit 2-3 : width 0-3+1)
  1137. byte 3   : Link Data ( next sprite in the list or 0 for end of list)
  1138. byte 4-5 : Fisrt number tile sprite (See farther !)
  1139. bute 6-7 : X-axis (0 to 511)+$80
  1140.  
  1141. It indicate that the first tile of sprite b'coz the GENESIS deduces
  1142. automaticaly the next as that :
  1143.  
  1144.       Tile #1:Tile #4 ; Sprite of 16 pixels on 24 pixels
  1145.       Tile #2:Tile #5
  1146.       Tile #3:Tile #6
  1147. =09
  1148. The format of tile number is same at format of screens
  1149. That's limit the sprites to 16 colors (maxi!).
  1150. The Flipping is indicated for the complete sprite.
  1151.  
  1152. example List :
  1153. =09
  1154.  dc.w $0+$80  ; Y-axis in the top of screen (0)
  1155.  dc.b %0101   ; Size 16*16 pixels
  1156.  dc.b 1       ; Number of the next sprite in the List for the priority
  1157.  dc.w $4001   ; Palette =3D 2, First tile =3D 1, No Flipping=
  1158.  (Tiles#1,#2,#3,#4)
  1159.  dc.w $0+$80  ; X =3D 0
  1160.  dc.w $40+$80 ; Y =3D 64
  1161.  dc.b %0001   ; Size 8*16 pixels
  1162.  dc.b 0       ; Last sprite
  1163.  dc.w $5001   ; Palette 2, Vertical Flipping, Tile #1 (Tile #1,#2)
  1164.  dc.w $40+$80 ; X =3D 64
  1165.  
  1166.  the order of sprites in the list indicates the priority of sprites between
  1167.  them : the first sprite is First Plan.
  1168. ENDNODE
  1169.  
  1170. NODE HorizontalScrolls "Horizontal Scrolls"
  1171.  
  1172. ----------------------------------------------------------------------
  1173.                   Horizontal Scrolls
  1174. ----------------------------------------------------------------------
  1175.  
  1176. The GENESIS is able to manage an horizontal offset for each line.
  1177.  
  1178. The Format for each horizontal offset :
  1179.  
  1180.  1 word for each offset of playfield A
  1181.  1 word for each offset of playfield B
  1182.  ...
  1183.  
  1184.  Example :
  1185.  
  1186.  dc.w $0001 ; A move of 1 pixel about right for playfield A
  1187.  dc.w $ffff ; A move of 1 pixel about left for playfield B
  1188.  dc.w $0002 ; 2 pixels to right for A (second line)
  1189.  dc.w $0003 ; 3 pixels to right for B (second line)
  1190.  ...
  1191.  
  1192.  it's possible to have a pointer which functions for all screen or for all
  1193.  tiles or for all lines.
  1194.  The numbber of pointer is in function of choose mode.
  1195. ENDNODE
  1196.  
  1197. NODE Priority "Priority of Plans"
  1198.  
  1199. ----------------------------------------------------------------------
  1200.                   Priority of Plans
  1201. ----------------------------------------------------------------------
  1202.  
  1203. Each Tiles of each screen and each sprite countains a bit of priority.
  1204. That settles the priorities of plans between them and the sprites with
  1205. plans.
  1206. When all bits are to 0 : the sprites are on the screen A which is on the
  1207. screen B. Each bit that we have putting to 1, does moving the plan.
  1208.  
  1209. Example :
  1210.  Screen B=3D1, Screen A=3D0, Sprite=3D0
  1211.  The screen B pass in front of the sprites which goes in front of the
  1212.  screen A.
  1213. ENDNODE
  1214.  
  1215. NODE AccesstoVRAM "Access to the VRAM"
  1216.  
  1217. ----------------------------------------------------------------------
  1218.                   Access to the VRAM
  1219. ----------------------------------------------------------------------
  1220.  
  1221. On MAnual Mode (without SRAM) :
  1222. 2 ports are used : 1 for the address and 1 for the data.
  1223. the two ports are on 32 bits and the address increases itself
  1224. automaticaly.
  1225. the only prolem is that it must to code the address which follows the type
  1226. of RAM that we want to address.
  1227.  
  1228. For the VRAM : Address 0-FFFF
  1229.  
  1230.  ((address and $3fff)+$4000)*$10000+(($1c000 and address)shr 14)
  1231.  
  1232. For the CRAM : Address 0-7F
  1233.  
  1234.  ($c000+address)*$10000
  1235.  
  1236. For the SRAM : Address 0-7F ?
  1237.  
  1238.  (($3fff and address)+$4000)*$10000+$10
  1239.  
  1240.  The address is putting in the vdp_cmd ($c00004)
  1241.  
  1242.  The Data is putting in the vdp_dat ($c00000)
  1243.  
  1244. Example :
  1245.  
  1246.  move.1#$c0000000,vdp_cmd ; Address 0 of the CRAM
  1247.  move.1#$c0000eee,vdp_dat ; color 0 and 1 of the first palette (black&white)
  1248.  move.w#$0444,vdp_dat ; color 2 of the first palette (Dark Grew)
  1249. ENDNODE
  1250.  
  1251. NODE Video-Registers "Video Registers"
  1252.  
  1253. ----------------------------------------------------------------------
  1254.                   Video Registers
  1255. ----------------------------------------------------------------------
  1256.  
  1257. the write access to video regiters does by the vdp_cmd
  1258. it codes on a word :
  1259.  
  1260.       Bit 15=3D1 : indicates that's a register
  1261.       Bit 14-8 : number of register
  1262.       Bit 7-0  : Value to write in the register
  1263.  
  1264. Example :
  1265.  
  1266.  move.w#$8000,vdp_cmd ; Register #0=3D0
  1267.  move.1#$81ff8200     ; Register #1=3Dff, register #2=3D0
  1268.  
  1269. Register #0
  1270.  
  1271.  Bit 7 : 0
  1272.  Bit 6 : 0
  1273.  Bit 5 : 0
  1274.  Bit 4 : Control interrupt H(Niv 4) 1:ON 0:OFF
  1275.  Bit 3 : 0
  1276.  Bit 2 : 1
  1277.  Bit 1 : Control mode screen ?
  1278.  Bit 0 : 0
  1279.  
  1280. Register #1
  1281.  
  1282.  Bit 7 : 0
  1283.  Bit 6 : TV 1:ON 0:OFF
  1284.  Bit 5 : Control Interrupt V(Niv 6) 1:ON 0:OFF
  1285.  Bit 4 : DMA 1:ENABLE 0:DISABLE
  1286.  Bit 3 : 0:NTSC(28 lines Cell) 1:PAL(30 lines Cell)
  1287.  Bit 2 : 1
  1288.  Bit 1 : 0
  1289.  Bit 0 : 0
  1290.  
  1291. Register #2
  1292.  
  1293.  Address of base of the Screen MAP A/$400 (that all the $2000).
  1294.  
  1295. Register #3
  1296.  
  1297.  Address of base of the window/$400 (Third Screen)   (D000)
  1298.  
  1299. Register #4
  1300.  
  1301.  Address of base of Screen MAP B/$2000               (E000)
  1302.  
  1303. Register #5
  1304.  
  1305.  Address of base of the list of sprites/$200         (BC00)
  1306.  
  1307. Register #6
  1308.  
  1309.  Not used (0)
  1310.  
  1311. Register #7
  1312.  
  1313.  Background Color (0 to 63) : 'Border' color.
  1314.  
  1315. Register #8 and #9
  1316.  
  1317.  Not used (0)
  1318.  
  1319. Register #10
  1320.  
  1321.  Line counter per H interrupt (0 to 255).
  1322.  
  1323. Register #11
  1324.  
  1325.  Bit 7-4 : 0
  1326.  Bit 3   : Level 2 Interrupt 1:ON 0:OFF
  1327.  Bit 2   : Vertical Scroll Control 1: An offset per 16 pixels
  1328.                            0: An Screen offset
  1329.  Bit 1-0 : Horizontal Scroll Control
  1330.             00 : An Screen offset
  1331.             01 : Not Used
  1332.             10 : An offset per cellule
  1333.             11 : An offser per line
  1334.  
  1335. Register #12
  1336.  
  1337.  Bit 7 : Must be as the bit 0
  1338.  Bit 6 : 0
  1339.  Bit 5 : 0
  1340.  Bit 4 : 0
  1341.  Bit 3 : Shadow effect between Playfields and the sprites 1:ON 0:OFF
  1342.  Bit 2 : Vertival Resolution (224 or 448 pixels)
  1343.  Bit 1 : Entrelaced ( only on entrelaced : 448 pixels are possible)
  1344.  Bit 0 : 32 Tiles per line or 40 tiles per line (320 or 256 pixels)
  1345.  
  1346. Register #13
  1347.  
  1348.  Address of base for Horizontal Scrolls/$400         (B800)
  1349.  
  1350. Register #14
  1351.  
  1352.  Not used (0)
  1353.  
  1354. Register #15
  1355.  
  1356.  Increase offset of vdp_cmd in word
  1357.  
  1358. Register #16
  1359.  
  1360.  Bit 7-6 : 0
  1361.  Bit 5-4 : Size Vertical Screen Maps A and B 00:32 01:64 10:USED 11:128
  1362.  Bit 3-2 : 0
  1363.  Bit 1-0 : SIze Horizontal Screen Maps A and B ( Same format as Vertical)
  1364.  
  1365. Register #17
  1366.  
  1367.  Horizontal Dimension Window
  1368.  
  1369. Register #18
  1370.  
  1371.  Vertical Dimension Window
  1372.  
  1373. Register #19                                         (93)
  1374.  
  1375.  Less weight longer transfert DMA
  1376.  
  1377. Register #20                                   (94)
  1378.  
  1379.  Strong Weight longer transfert DMA
  1380.  
  1381. Register #21                                         (95)
  1382.  
  1383.  DMA Source Less Weight
  1384.  
  1385. Register #22                                         (96)
  1386.  
  1387.  DMA Source Strong Weight for VRAM or Middle Weight for RAM
  1388.  
  1389. Register #23                                         (97)
  1390.  
  1391.  DMA Control
  1392.  
  1393.  Bit 7   : Source 1:VRAM 0:RAM
  1394.  Bit 6   : Source 1:ON 0:OFF (or Bit 23 Source RAM)
  1395.  Bit 5-0 : RAM Source ( Bit 22-17)
  1396.  In thiz case of RAM Source, the bits 6-0 are considerated as the strong
  1397.  weight of the source.
  1398. ENDNODE
  1399.  
  1400. NODE Interruptions "Interruptions"
  1401.  
  1402. ----------------------------------------------------------------------
  1403.                   INTERRUPTIONS
  1404. ----------------------------------------------------------------------
  1405.  
  1406.  The interruptions are of the 68000 : (!!!!!!)
  1407.  
  1408.  Level 2 : External Interrupt (???)
  1409.  Level 4 : H interrupt (Interruption Raster Runs by the VDP)
  1410.  Level 6 : V interrupt (Interruption Vertical Blanck)
  1411.  
  1412.  ...
  1413. ENDNODE
  1414.  
  1415. NODE Exceptions "Exceptions of 68000 of the GENESIS"
  1416.  
  1417. *****************************************************************
  1418.             EXCEPTIONS OF 68000 OF THE GENESIS
  1419. *****************************************************************
  1420.  
  1421.       $00   SYSTEM SSP
  1422.       $04   SYSTEM PC
  1423.       $08   BUS ERROR
  1424.       $0C   ADDRESS ERROR
  1425.       $10   ILLEGAL INSTRUCTION
  1426.       $14   DIVISION BY ZERO
  1427.       $18   CHK EXCEPTION
  1428.       $1C   TRAPV EXCEPTION
  1429.       $20   PRIVILEGE VIOLATION
  1430.       $24   TRACE EXCEPTION
  1431.       $28   LINE-A EMULATOR
  1432.       $2C   LINE-F EMULATOR
  1433.       $30   RESERVED BY MOTOROLA
  1434.       $34   RESERVED BY MOTOROLA
  1435.       $38   RESERVED BY MOTOROLA
  1436.       $3C   RESERVED BY MOTOROLA
  1437.       $40   RESERVED BY MOTOROLA
  1438.       $44   RESERVED BY MOTOROLA
  1439.       $48   RESERVED BY MOTOROLA
  1440.       $4C   RESERVED BY MOTOROLA
  1441.       $50   RESERVED BY MOTOROLA
  1442.       $54   RESERVED BY MOTOROLA
  1443.       $58   RESERVED BY MOTOROLA
  1444.       $5C   RESERVED BY MOTOROLA
  1445.       $60   SPURIOUS EXCEPTION
  1446.       $64   INTERRUPT REQUEST LEVEL 1
  1447.       $68   INTERRUPT REQUEST LEVEL 2
  1448.       $6C   INTERRUPT REQUEST LEVEL 3
  1449.       $70   INTERRUPT REQUEST LEVEL 4 (VDP INTERRUPT)
  1450.       $74   INTERRUPT REQUEST LEVEL 5
  1451.       $78   INTERRUPT REQUEST LEVEL 6 (VERTICAL BLANK)
  1452.       $7C   INTERRUPT REQUEST LEVEL 7
  1453.       $80   TRAP #00 EXCEPTION
  1454.       $84   TRAP #01 EXCEPTION
  1455.       $88   TRAP #02 EXCEPTION
  1456.       $8C   TRAP #03 EXCEPTION
  1457.       $90   TRAP #04 EXCEPTION
  1458.       $94   TRAP #05 EXCEPTION
  1459.       $98   TRAP #06 EXCEPTION
  1460.       $9C   TRAP #07 EXCEPTION
  1461.       $A0   TRAP #08 EXCEPTION
  1462.       $A4   TRAP #09 EXCEPTION
  1463.       $A8   TRAP #10 EXCEPTION
  1464.       $AC   TRAP #11 EXCEPTION
  1465.       $B0   TRAP #12 EXCEPTION
  1466.       $B4   TRAP #13 EXCEPTION
  1467.       $B8   TRAP #14 EXCEPTION
  1468.       $BC   TRAP #15 EXCEPTION
  1469.       $C0   RESERVED BY MOTOROLA
  1470.       $C4   RESERVED BY MOTOROLA
  1471.       $C8   RESERVED BY MOTOROLA
  1472.       $CC   RESERVED BY MOTOROLA
  1473.       $D0   RESERVED BY MOTOROLA
  1474.       $D4   RESERVED BY MOTOROLA
  1475.       $D8   RESERVED BY MOTOROLA
  1476.       $DC   RESERVED BY MOTOROLA
  1477.       $E0   RESERVED BY MOTOROLA
  1478.       $E4   RESERVED BY MOTOROLA
  1479.       $E8   RESERVED BY MOTOROLA
  1480.       $EC   RESERVED BY MOTOROLA
  1481.       $F0   RESERVED BY MOTOROLA
  1482.       $F4   RESERVED BY MOTOROLA
  1483.       $F8   RESERVED BY MOTOROLA
  1484.       $FC   RESERVED BY MOTOROLA
  1485. ENDNODE
  1486.  
  1487. NODE InFormAtions "More InFormAtions"
  1488.  
  1489. =============================================================
  1490.  
  1491. The 68000 keeps all of it's interrupt vectors in the first 1k of memory
  1492. (this is cartridge ROM!) The first 10 longwords are:
  1493. Stack pointer after reset
  1494. Program counter after reset
  1495. Bus Error
  1496. Address Error
  1497. Illegal Instruction
  1498. Division by Zero
  1499. CHK instruction
  1500. TRAPV instruction
  1501. Priviledge violation
  1502. Trace
  1503.  
  1504. The external interrupts start at $60 (vector 25-31) and end at $7F. Now
  1505. all videogame units have a variety of interrupts of VBlank and HBlank. If
  1506. you poke arount the interrupt table with the hints I've given you, and
  1507. follow those addresses into the code, you can probably find the VBLANK
  1508. and HBLANK routines for any given game. The vblank routines often read
  1509. the controllers, do DMA, access video RAM, etc. so this is a good short
  1510. cut to find meaty code within the machine! (Look for nice round addresses
  1511. close together... wouldn't those be VDP registers?) HBLANK is even better
  1512. if a game uses it (look at any sonic game!) because they must be short
  1513. (and are thus easily identifiable when traced from the interrupt table
  1514. vectors), generally they only have one or two instructions to load their
  1515. data into the VDP before it will be displayed on the screen, so you
  1516. should immediately be able to figure out how to load palettes into the
  1517. Genesis.
  1518.  
  1519. Look atSonic the Hedgehog 1 dissassembly, following the interrupt vectors
  1520. to find the HBLank routine. (All interrupt routines should end in RTE.)
  1521.  
  1522. Notice there is one branch and then some set up and a lot of longword
  1523. writes. Try changing these writes to write constant data and then look at
  1524. some section of the game which uses Hblank interrupts. Betcha the colors
  1525. have changed...(oops... the game will hang because the checksum is
  1526. no longer good. You must find the checksum and step over it... trace
  1527. through initialization till you find it... I think it should end on a
  1528. nice round address, but it's been a while so I am not sure. Look for a
  1529. loop with an add in it and nothing else. The checksum is stored in a
  1530. place where changing it will not change the checksum, lots of other data
  1531. like that is there... good luck!) Anyway, if you disable the checksum and
  1532. change the data in hblank then play a board with water I think you will
  1533. understand how to change color palettes on the Genesis!
  1534.  
  1535. If you can figure this out, you can probably guess that writing other
  1536. data to the VDP is very similar. Look at the VBlank code to see what it
  1537. does with similar addresses to figure out how to write characters and
  1538. stuff. This is pretty convoluted, unfortunately. I can only suggest that
  1539. you look at very old games for this information as they are programmed
  1540. more simply.
  1541.  
  1542. I hope this helps you somewhat. I ask that you don't print this as I have
  1543. written it, and what you do print please don't mention me as I could get
  1544. in trouble. If you do some hacking and get stuck, let me know and I'll
  1545. give you some more hints. I hate not being able to say things directly,
  1546. because I think the Genesis is a wonderful piece of hardware and wish
  1547. everyone could know how great it is.
  1548.  
  1549. P.S. don't look at Road Rash, it will drive you INSANE! It seems to run
  1550. entirely in VBLANK and HBLANK! I figured out the 4-TAP by looking for
  1551. Joystick accesses in the VBLANK code... easy!
  1552.  
  1553. =============================================================
  1554.  
  1555. 5.0 Language Switch, from Rec.Games.Video FAQ
  1556.  
  1557. How to make a language switch (Genesis/MD).
  1558.  
  1559. On a Genesis/MD, there are jumpers labelled JP1, JP2, JP4,
  1560. and JP3.  The Genesis has a capacitor on JP1 and a trace on
  1561. JP2; the Mega Drive has a capacitor on JP2 and a trace on
  1562. JP1.  The bottom ends of JP1 and JP2 are connected together.
  1563. So if you cut the trace and the top end of the capacitor, and
  1564. install a DPDT switch between them which reconnects them
  1565. either unchanged or swapped left to right, you have a
  1566. language switch. You'll need some wire, a soldering iron,
  1567. solder, and a DPDT switch.
  1568.  
  1569. Some machines have an open circuit instead of the capacitor.
  1570. Also, I've been told that even if there is a capacitor, you
  1571. can throw it out and leave an open circuit. Either way, the
  1572. switch is a lot simpler, requiring a SPDT switch and less
  1573. wire and solder.
  1574.  
  1575. Several people have told me that you could just cut both JP1
  1576. and JP2 and put a SPST switch on JP1. This is even simpler,
  1577. but I'm not sure it really works, as opposed to putting your
  1578. machine in an intermediate state that only sort-of works.
  1579.  
  1580. The redesigned Genesis 2 machines don't appear to have either
  1581. the capacitor or circuit. Nobody yet knows how to make the
  1582. language switch for one, though there are language switch
  1583. cartridges you can buy to act as one.
  1584.  
  1585. IF YOUR MACHINE HAS NO CAPACITOR (or if you want to cross
  1586. your fingers and throw away your capacitor) and is not a
  1587. Genesis 2:
  1588.  
  1589. Cut JP2.  The trace might be covered with paint and hard to
  1590. see.  (If you started with a Mega Drive, JP2 is open and you
  1591. have to cut JP1 instead.) If you aren't sure which end I mean
  1592. by "bottom", just check the back of the board to see which
  1593. end is connected together.
  1594.  
  1595.    Original state of machine:             After cutting:
  1596.  
  1597.        JP2 top     JP1 top              JP2 top     JP1 top
  1598.           |           |                    |           |
  1599.           |           |                    |           |
  1600.           |
  1601.           |
  1602.           |
  1603.           |
  1604.           |           |                    |           |
  1605.            \         /                      \         /
  1606.             \_______/                        \_______/
  1607.           bottom of both                   bottom of both
  1608.  
  1609. Add a SPDT switch which can be in one of two positions:
  1610.               ._ _ _ _ _ _ _ _ _ _ _ _
  1611.              .                        .
  1612.             .           . _ _ _ _ _ _ _ _ _ _
  1613.            .           .                .    .
  1614.        JP2 top     JP1 top               .    .
  1615.           |           |                  .    .
  1616.           |           |                 _________
  1617.                                         | o   o |
  1618.                                         | \     |
  1619.                                         |  \    |
  1620.                                         \___o___/
  1621.           |           |                     .
  1622.            \         /                      .
  1623.             \_______/ - - - - - - - - - - - -
  1624.           bottom of both
  1625.  
  1626.               ._ _ _ _ _ _ _ _ _ _ _ _
  1627.              .                        .
  1628.             .           . _ _ _ _ _ _ _ _ _ _
  1629.            .           .                .    .
  1630.        JP2 top     JP1 top               .    .
  1631.           |           |                  .    .
  1632.           |           |                 _________
  1633.                                         | o   o |
  1634.                                         |     / |
  1635.                                         |    /  |
  1636.                                         \___o___/
  1637.           |           |                     .
  1638.            \         /                      .
  1639.             \_______/ - - - - - - - - - - - -
  1640.           bottom of both
  1641. -------------------------------------------------------------
  1642.  
  1643. IF YOUR MACHINE DOES HAVE THE CAPACITOR:
  1644.  
  1645. Cut both sides.  (Note: if you started with a Japanese Mega
  1646. Drive the capacitor will be on the side labelled X instead)
  1647.  
  1648.    Original state of machine:             After cutting:
  1649.  
  1650.        JP2 top     JP1 top              JP2 top     JP1 top
  1651.           |           |                    |           |
  1652.           |           |                    |           |
  1653.           |           |
  1654.           |           |
  1655.           |           |                    |
  1656.         X |          ###                 X |          ###
  1657.           |          ###                   |          ###
  1658.           |          ###                   |          ###
  1659.            \         /                      \         /
  1660.             \_______/                        \_______/
  1661.           bottom of both
  1662.  
  1663. add switch which can be in one of two positions:
  1664.  
  1665.        JP2 top     JP1 top
  1666. (Connect 2 to 2
  1667.           |           |
  1668. and 1 to 1)
  1669.           |           |
  1670.           2           1                   2  1  1  2
  1671.                                         ______________
  1672.            _ _ _ _ _ _ _ _ _ _          | o  o  o  o |
  1673.           |                   `         |  \  \      |
  1674.         X |          ###`      `        |   \  \     |
  1675.           |          ### `      `       \____o__o____/
  1676.           |          ###  `      `           '  '
  1677.            \         /     `      `- - - - -'  '
  1678.             \_______/       ` _ _ _ _ _ _ _ _ '
  1679.           bottom of both
  1680.  
  1681.        JP2 top     JP1 top
  1682. (Connect 2 to 2
  1683.           |           |
  1684. and 1 to 1)
  1685.           |           |
  1686.           2           1                   2  1  1  2
  1687.                                         ______________
  1688.            _ _ _ _ _ _ _ _ _ _          | o  o  o  o |
  1689.           |                   `         |      /  /  |
  1690.         X |          ###`      `        |     /  /   |
  1691.           |          ### `      `       \____o__o____/
  1692.           |          ###  `      `           '  '
  1693.            \         /     `      `- - - - -'  '
  1694.             \_______/       ` _ _ _ _ _ _ _ _ '
  1695.           bottom of both
  1696.  
  1697.  
  1698. 50/60 hertz switch.
  1699.  
  1700. You can build a 50/60 hertz switch on a Genesis/Mega Drive
  1701. like a language switch, but using jumpers JP3 and JP4.  The
  1702. standard setting is 50 in PAL areas such as Europe, and 60 in
  1703. NTSC areas like the US and Japan. In the 60 hertz mode, the
  1704. game is faster and the screen taller; however, not all TVs
  1705. and monitors in Europe can display this mode.
  1706.  
  1707.  
  1708. Some American/Japanese games are protected to keep Europeans
  1709. >from playing them; this protection checks the 50/60 hertz
  1710. setting.  You can usually get around it by installing the
  1711. switch and switching when starting the game, then switching
  1712. back afterwards.
  1713.  
  1714. Many European games are simple ports of American or Japanese
  1715. games and are not redesigned for 50 hertz, so work faster and
  1716. with "better" screen proportions if played at 60 hertz.
  1717.  
  1718.  
  1719. Genesis/Mega Drive dual version (language switch) list:
  1720.  
  1721.    *Battle Maina 2: The game plays in both positions. However
  1722.      with both controlers removed, a system info screen appears
  1723.      which informs about system version, langauge mode.
  1724.     Bonanza Brothers: Game plays in Japanese.  (Maybe. There
  1725.      seems to be more than one version floating around.)
  1726.     Columns: Game plays in Japanese.
  1727.    *Cyberball: Japanese version has a modem option.
  1728.     Dragon's Fury: Works only with language set to English.
  1729.      The original, Devil's Crush MD, works either way.
  1730.     Dynamite Duke: Harder on the Mega Drive.
  1731.     Elemental Master: Harder on the Mega Drive.
  1732.     Fatal Labyrinth: Game plays in Japanese.
  1733.     Fire Shark: Different title screen with Kanji.
  1734.     Flicky: Characters have Japanese names and instructions
  1735.      are in Japanese.
  1736.     Forgotten Worlds: Game plays in Japanese.
  1737.     Gaiares: only mentions the Japanese licensee on the title
  1738.      screen, and has Japanese text; you can also select
  1739.      Japanese text from the option screen.
  1740.     Ghostbusters: Game plays in Japanese.
  1741.     Ghouls and Ghosts: Different title screen with Kanji.  To
  1742.      see it on a Genesis, select the last music and sound (26
  1743.      and 56) from the options screen, then press lower left;
  1744.      A, B, or C; and Start all at the same time.  (I never
  1745.      tried this, but Gamepro magazine claimed it works.) The
  1746.      game shows some other Japanese text, and when you die
  1747.      during a boss you start out earlier.
  1748.     Insector X: Title screen refers to company as Hot-B, not
  1749.      Sage's Creation. The MD version shoots more slowly. The
  1750.      ending text is still English.
  1751.    *Marvel Land: The Japanese version says "for Mega Drive"
  1752.      or "for Genesis" but the language stays Japanese. (What
  1753.      does an English version do?)
  1754.     Monaco GP: Game plays in Japanese (also an option on the
  1755.      option screen).
  1756.     Mystic Defender: This game is actually the anime-based
  1757.      Kujaku-Ou (Peacock King) 2 game. In Japanese mode, the
  1758.      opening text is replaced by a graphics screen (never
  1759.      seen in the US version) with Japanese.  The levels have
  1760.      names, the main character wears a white robe, the
  1761.      lightning magic effect is different, and the character
  1762.      is named Kujaku in the ending (which is still English).
  1763.     Outrun: The attract mode lacks sound, the startup screen
  1764.      says "push" (not "press") start button, and "(C) Sega
  1765.      1986, 1991" is printed in reverse order. The default
  1766.      options are KM/H and a different button selection (but
  1767.      can still be changed on the option screen).
  1768.     Quackshot: Game plays in Japanese.
  1769.     Raiden Trad: The "licensed to Sega" line is absent on
  1770.      both title screens, and the second title screen includes
  1771.      only the Japanese part instead of the non-Japanese part
  1772.      of the first one.
  1773.     Revenge of Shinobi: Title changes to Super Shinobi;
  1774.      credits show at the end.
  1775.     Rolling Thunder II: The Japanese version only works on a
  1776.      Japanese setting. The US version works either way (and
  1777.      isn't bilingual).
  1778.     Sonic the Hedgehog II: Tails is renamed to "Miles".
  1779.     Streets of Rage: Title screen changes to Bare Knuckle,
  1780.      and all text is in Japanese, including the introduction.
  1781.      The clock resets when you encounter the bosses.
  1782.     Streets of Rage II: Turns to Bare Knuckle II, and renames
  1783.     Skate to Sammy --_if_ you change the setting sometime
  1784.      after turning the machine on (to skip the lockout).
  1785.     Thunder Force II: Title screen has "MD" on it, and
  1786.      company name is "Tecnosoft".
  1787.     Thunder Force III: company's name is spelled "Tecnosoft".
  1788.    *Thunder Storm FX (CD): Turns to Cobra Command in US mode.
  1789.     Truxton: Japanese title is Tatsujin.
  1790.     Twin Hawk: Different title screen with Kanji.
  1791.    *Wrestle War: The wrestler is blond on a Genesis and
  1792.      black-haired on a MD.
  1793.  
  1794.     * Information from testing a Japanese game
  1795.  
  1796. =============================================================
  1797.  
  1798. 6.0 Sega Internet Information - This information came from
  1799. Bernd P. Ziller. Mailing to any of these site (or FTP, gopher,
  1800. etc.) will not work due to a firewall. They are looking out, but
  1801. we can't look in. I stongly suggest that you don't try anything
  1802. stupid.
  1803.  
  1804.  segaoa.com       198.176.13.13      130slmail        198.176.14.65
  1805.  loghost          198.176.13.13      localhost        127.0.0.1
  1806.  400mail          198.176.14.57      pd275            198.176.14.68
  1807.  trixie           198.176.9.40       torcable         198.176.14.53
  1808.  pd130            198.176.14.61      storm            198.176.11.47
  1809.  segaintera       198.176.14.52      segaoa           198.176.13.13
  1810.  sonic            198.176.13.13      blackhole        198.176.14.69
  1811.  multimedia       198.176.14.63      pd1              198.176.14.62
  1812.  segard           198.176.14.51      segaeurope       198.176.14.50
  1813.  tormail          198.176.14.54      si32             198.176.14.55
  1814.  sb1mail          198.176.14.60      macpo            198.176.14.67
  1815.  pluto            198.176.9.52       fremontml        198.176.14.56
  1816.  racerx           198.176.9.41       hummer           198.176.11.55
  1817.  303tdmail        198.176.14.64      sb2mail          198.176.14.58
  1818.  ftp              198.176.13.13      gambit           198.176.11.46
  1819.  Emerald_Dragon   198.176.8.22
  1820.  
  1821. =============================================================
  1822.  
  1823. I am still hoping to expand this document. I am looking for
  1824. information on the Sega Multitap, CD, 32-X (Mars), HMD, hardware
  1825. in general, Saturn, and the controllers.
  1826.  
  1827. Please E-Mail me for a copy or to add information to this
  1828. list. Again My E-Mail address is:
  1829.  
  1830. U6c16@Wvnvm.Wvnet.Edu
  1831.  
  1832. Snail Mail:
  1833.  
  1834. Henry Rieke
  1835. Attn: Sega FAQ
  1836. 161 Poplar Dr
  1837. Morgantown, Wv 26505-2340
  1838.  
  1839. A Very Special Thanks to:
  1840.  
  1841. David Ashley <dash@netcom.com>
  1842.  
  1843. Rober Leyland <Leyland@island.COM>
  1844.  
  1845. David Delabassee <delabass@nic.INbe.net>
  1846.  
  1847. Special Thanks to :
  1848.  
  1849. Scott Golby <sgolby@st.nepean.uws.edu.au>
  1850.  
  1851. Rick McTeague <sysrick@starbase.spd.louisville.edu>
  1852.  
  1853. Landon Dyer <landon@apple.com>
  1854.  
  1855. Neal Howland <nhowland@matt.ksu.ksu.edu>
  1856.  
  1857. Bernd P. Ziller <bziller@ba-stuttgart.de>
  1858. WPCD12cpiPanasonic
  1859. KX-P118017 Feb 94 09:30:55 +0100
  1860. From:
  1861. Subject: Re: What Language are games programmed in?
  1862. To: U6C16@WVNVM.BITNET
  1863. Message-id: <9402170830.AA16515@leda.pt.hk-r.se>
  1864. X-Envelope-to: U6C16@WVNVM.BITNET
  1865.  
  1866. Heres an extract from the game _____. I just included some of the beginning
  1867. of the code and some ASCII segments. I hope you are satisfied with this.
  1868.  
  1869.  
  1870.  
  1871.  
  1872.         dc.l $FFFE00,$D7E,$200,$200,$200
  1873.         dcb.l $17,$200
  1874.         dc.l $E9E,$200,$EAE,$200,$20E
  1875.         dcb.l $F,$20E
  1876.         dcb.l $F,$200
  1877.         dc.b "SEGA MEGA DRIVE (C)SEGA "
  1878.         dc.b "1989.AUG _____",$87,"V        "
  1879.         dc.b "                        "
  1880.         dc.b "              ",$87,"V        "
  1881.         dc.b "                        "
  1882.         dc.b "        GM 00054010-01",$93,"G"
  1883.         dc.b "JD              ",$0,$0,$0,$0,$0,$3,"",$FF
  1884.         dc.b $0,"",$0,$0,$0,"",$FF,"                "
  1885.         dc.b "                        "
  1886.         dc.b "                        "
  1887.         dc.b "JUE             "
  1888.         move #$100,$A11100
  1889.         nop
  1890.         rte
  1891.         bra.s $20C
  1892.         bra.s $20E
  1893.         move.l a6,d5
  1894.         lea $C00004,a5
  1895.         move.l #$940000,d4
  1896.         move d6,d4
  1897.         lsl.l #8,d4
  1898.         move #$9300,d4
  1899.         move.b d6,d4
  1900.         move.l d4,(a5)
  1901.         lsr.l #1,d5
  1902.         and.l #$7FFFFF,d5
  1903.         move.l #$960000,d4
  1904.         move d5,d4
  1905.         lsl.l #8,d4T        move.b d5,d4
  1906.         move.l d4,(a5)
  1907.         swap d5
  1908.         move #$9700,d4
  1909.         move.b d5,d4
  1910.         move d4,(a5)
  1911.         or #$80,d7
  1912.         swap d7
  1913.         move d7,(a5)
  1914.         swap d7
  1915.         move d7,-(a7)
  1916.         move (a7)+,(a5)
  1917.         rts
  1918.         move.l #$7C000002,$C00004
  1919.         move.l #$0,$C00000
  1920.         rts
  1921.         bsr $3BCC
  1922.         lea $FFFFC800.w,a6
  1923.         moveq #$0,d6
  1924.         move #$13F,d7
  1925.         move d6,(a6)+
  1926.         dbf d7,$282
  1927.         move.l #$78000002,d7
  1928.         move #$13F,d6
  1929.         bra $2B8
  1930.         move.l #$40000003,d7
  1931.         bra $2A6
  1932.         move.l #$60000003,d7
  1933.         move #$1FFF,d6
  1934.         bra $2B8
  1935.         move.l #$60000002,d7
  1936.         move #$DFF,d6
  1937.         moveq #$0,d5
  1938.         move #$8F01,$C00004
  1939.         lea $C00004,a5
  1940.         move.l #$940000,d4
  1941.         move d6,d4
  1942.         lsl.l #8,d4
  1943.         move #$9300,d4
  1944.         move.b d6,d4
  1945.         move.l d4,(a5)
  1946.         move #$9780,(a5)
  1947.         or.l #$40000080,d7
  1948.         move.l d7,(a5)
  1949.         move.b d5,$C00000
  1950.         move (a5),d4
  1951.         btst #$1,d4
  1952.         bne.s $2EC
  1953.         move #$8F02,(a5)
  1954.         rts
  1955.         move.l #$40000010,d7
  1956.         moveq #$28,d6
  1957.         moveq #$0,d5T        move d5,$C00000
  1958.         dbf d6,$30A
  1959.         rts
  1960.         lea $C00000,a5
  1961.         move.l #$800000,d3
  1962.         move.l d7,$C00004
  1963.         move d6,d2
  1964.         move (a6)+,(a5)
  1965.         dbf d2,$32A
  1966.         add.l d3,d7
  1967.         dbf d5,$322
  1968.         rts
  1969.         move d6,d2
  1970.         lea (a5),a4
  1971.         move d4,(a5)+
  1972.         addq #1,d4
  1973.         dbf d2,$33C
  1974.         lea $80(a4),a5
  1975.         dbf d5,$338
  1976.         rts
  1977.         bset #$6,$FFFFC127.w
  1978.         bra.s $36E
  1979.         move.l #$C0200000,$C00004
  1980.         move #$0,$C00000
  1981.         bclr #$6,$FFFFC127.w
  1982.         move $FFFFC126.w,$C00004
  1983.         rts
  1984.         bset #$0,$FFFFC15E.w
  1985.         moveq #$0,d0
  1986.         moveq #$0,d1
  1987.         move.b (a6)+,d0
  1988.         lea $FFFFC080.w,a1
  1989.         add d0,a1
  1990.         move.b (a6)+,d0
  1991.         move (a6)+,(a1)+
  1992.         dbf d0,$38C
  1993.         rts
  1994.         bclr #$0,$FFFFC15E.w
  1995.         beq.s $3CE
  1996.         btst #$6,$A10001
  1997.         beq.s $3AE
  1998.         move #$6EE,d0
  1999.         dbf d0,$3AA
  2000.         lea $C00004,a5
  2001.         move.l #$94009340,(a5)
  2002.         move.l #$96E09540,(a5)
  2003.         move #$977F,(a5)
  2004.         move #$C000,(a5)
  2005.         move #$80,-(a7)
  2006.         move (a7)+,(a5)
  2007.         rts
  2008.         moveq #$7,d1
  2009.         lea $FFFFC080.w,a6T        moveq #$E,d7
  2010.         move (a6),d4
  2011.         move d4,d2
  2012.         and d7,d2
  2013.         beq.s $3E4
  2014.         subq #2,d2
  2015.         asl #4,d7
  2016.         move d4,d3
  2017.         and d7,d3
  2018.         beq.s $3F0
  2019.         sub #$20,d3
  2020.         asl #4,d7
  2021.         and d7,d4
  2022.         beq.s $3FA
  2023.         sub #$200,d4
  2024.         or d2,d3
  2025.         or d3,d4
  2026.         move d4,(a6)+
  2027.         dbf d0,$3D8
  2028.         bset #$0,$FFFFC15E.w
  2029.         moveq #$7,d2
  2030.         moveq #$1,d0
  2031.         jsr $F80(pc)
  2032.         dbf d2,$40C
  2033.         dbf d1,$3D2
  2034.         rts
  2035.         moveq #$1F,d0
  2036.         lea $FFFFC080.w,a2
  2037.         lea -$80(a2),a1
  2038.         move.l (a2)+,(a1)+
  2039.         dbf d0,$426
  2040.         moveq #$1F,d0
  2041.         clr.l (a1)+
  2042.         dbf d0,$42E
  2043.         rts
  2044.         moveq #$E,d1
  2045.         lea $FFFFC080.w,a6
  2046.         lea -$80(a6),a1
  2047.         moveq #$3F,d0
  2048.         move d1,d5
  2049.         moveq #$E,d7
  2050.         move (a1)+,d4
  2051.         move d4,d2
  2052.         and d7,d2
  2053.         sub d5,d2
  2054.         bpl.s $452
  2055.         moveq #$0,d2
  2056.         asl #4,d7
  2057.         asl #4,d5
  2058.         move d4,d3
  2059.         and d7,d3
  2060.         sub d5,d3
  2061.         bpl.s $460T        asl #4,d7
  2062.         asl #4,d5
  2063.         and d7,d4
  2064.         sub d5,d4
  2065.         bpl.s $46C
  2066.         moveq #$0,d4
  2067.         or d2,d3
  2068.         or d3,d4
  2069.         move d4,(a6)+
  2070.         dbf d0,$442
  2071.         cmp #$8020,$FFFFC142.w
  2072.         bne.s $48E
  2073.         lea $FFFFC0A0.w,a2
  2074.         lea -$80(a2),a1
  2075.         moveq #$7,d0
  2076.         move.l (a1)+,(a2)+
  2077.         dbf d0,$488
  2078.         moveq #$7,d2
  2079.         bset #$0,$FFFFC15E.w
  2080.         jsr $F7E(pc)
  2081.         dbf d2,$496
  2082.         subq #2,d1
  2083.         bpl.s $438
  2084.         rts
  2085.  
  2086.  
  2087. ........
  2088.  
  2089.  
  2090.         move #$B4,$FFFFC150.w
  2091.         clr $FFFFC152.w
  2092.         moveq #-$79,d7
  2093.         jsr $748.w
  2094.         lea $16F8,a0
  2095.         jsr $14F4(pc)
  2096.         lea $1700,a0
  2097.         jsr $14F4(pc)
  2098.         lea $1296(pc),a6
  2099.         lea $FF03A0,a5
  2100.         jsr $197A
  2101.         lea $FF25A0,a5
  2102.         lea $1274(pc),a6
  2103.         bsr $19E8
  2104.         lea $FF359A,a5
  2105.         lea $127E(pc),a6
  2106.         bsr $19E8
  2107.         lea $FF37A2,a5
  2108.         lea $128E(pc),a6
  2109.         bra $19E8
  2110.         dc.b "GAME OVER",$0,"CONTINUE PLAY "
  2111.         dc.b "^",$0,"YES NO",$0,$0,"PLAYER 1",$0,$0,$0,$0,$0,$0
  2112.  
  2113. T        dc.b "NUS@@@@@@@@@@@@@@@",$0,"MISSI"
  2114.         dc.b "ON COMPLETED BONUS@@",$0,"MIN"
  2115.         dc.b "//SEC",$0,"OVER/////SEC///NO/"
  2116.         dc.b "BONUS",$0,"UNDER////SEC",$0,"PTS",$0,"P"
  2117.         dc.b "TS",$0,"PTS",$0,$0
  2118.         dc.b "INFILTRATE ENEMY LINES?",$0
  2119.         dc.b $12,"RESCUE SECRET AGENT?",$0,$0,$14
  2120.         dc.b "GO TO THE ARSENAL?",$0,$8,"BLOW"
  2121.         dc.b " UP ALL THE ENEMY WEAPON"
  2122.         dc.b "S?",$0,$10,"PENETRATE THE FORTRE"
  2123.         dc.b "SS?",$0,$E,"RESCUE COLONEL TRAU"
  2124.         dc.b "TMAN?",$0,$0,"PLAYER 1 START",$0,$0
  2125.  
  2126.