Home
Sega Genesis Software Manual
Contents
1. And JSID DD cmp b _JSID_10 moveq 1 d0 rts JSID 10 d2 d3 a0 sp 100 780 Z80 bus request movew 88100280 Z80 reset line high btst b 0 Z80BusReq 280 bus grant acknowledge 28 wait until bus granted move l 500 10003 0 22 2 moveq move b moveq move l swap move b move b nop nop nop nop move b nop nop nop nop move b move b nop nop nop nop move b move b move w Isr b ror w Isr b rolw Isr b rol w or b 15 6 move w Isr b Isr b 0 40 4140 40 40 40 40 0 40 dodi 6 a0 d3 4 0 43 49401000000 6 a0 4401000000 a0 0 40 00000000 a0 a0 d1 01000000 0 40 42 1 40 8140 1 d0 1 40 142 1 92 1 d2 42 40 8503 40 82 40 41 42 dl 141 141 141 142 1 82 save original status of control port zoriginal status of I O port 1 0 control TH PD6 output set TH 1 high TH 0 low set TH high ID2 PD6 1 amp PD1 OR PDO 1 d2 orb 42 41 20 6 0 amp PD1 OR PDO and w 03 41 orb 91 40 retum id value move b 43 40 original status of I O port swap d3 move b 43 6 0 restore original status of I O control port move w 0 Z80BusReq Z80 bus release move
2. wox Firm name the same as in 2 Modem number 2 Version 13 Data on the countries in which the product can be released Japan J USA u Europe sure to input a space code in the unoccupied 1 7 948 space SWGENESS MANUAL 022092 CONFIDENTIAL 106 PROPERTY OF SEGA How to Obtain a Check Sum The Check Sum obtaining program is shown as follows The program starts with OFF8000H RAM space First fill game capacity by 1 and then load of the programs Next load the Check Sum program and run the program from OFFBOOOH After while stop running the program At this time the lower Word of Data Register 0 90 is the Check Sum value Note that Break in Memory should be cancelled in advance Also when burn ins to ROM first fill the game capacity by 1 end 124 org 8000 start move a0 di 88141 4520040 sub 01 2 counter move 91 02 suqw 9142 swap di moveq 400 one add a0 40 dora 42 712 nop te SWGENEBIS MANUAL CONFIDENTIAL 106 PROPERTY OF SEGA Memory Mapping for Emulation For the 68000 Emulation address should be disabled initially 0 to Required areas should then be enabled as follows Program and Data are in 0 to 00
3. B DISPLAY SPECIFICATION STRUCTURE CTRL 3 CRAM 4 VSRAM 5 D INTERRUPT J 9 1 VERT IPT 9 2 HORIZONTAI Gy ae 3 EXTERNAL INTERRUPT EX i 10 E 10 10 004 CONTROL POR 12 y 13 MODE E REGISTER NO 1 18 E REGISTER NO 2 5 13 NAME TABLE BASE ADDRESS FOR SCROLL 13 NAME TABLE BASE ADDRESS FOR WINDOW 13 pyPATTERN NAME TABLE BASE ADDRESS FOR SCROLL B 14 SPRITE ATTRIBUTE TABLE BASE ADDRESS 14 BACKGROUND COLOR 14 H INTERRUPT REGISTER MODE SET REGISTER NO 3 MODE SET REGISTER NO 4 H SCROLL DATA TABLE BASE ADDRESS AUTO INCREMENT DATA SCROLL SIZE WINDOW H POSITION WINDOW V POSITION LENGTH COUNTER DMA LENGTH COUNTER HIGH SWGENESIS MANUAL ev 022182 CONFIDENTIAL 106 PROPERTY OF SEGA SYNGENESIS MANUAL 18 SOURCE ADDRESS LOW 19 SOURCE ADDRESS MID 20 SOURCE ADDRESS HIGH ACCESS VDP RAM 1 RAM ADDRESS SETTING VRAM ACCESS CRAM ACCESS ACCESS ACCESS TIMING HV COUNTER MA TRANSFER MEMORY VRAM VRAM FILL VRAM COPY DMA TRANSFER CAPACITY SCROLLING SCREEN ots 88 1 SCROLLING SCREEN SIZE 37 2 HORIZONTAL SCROLLING 39 3 VERTICAL SCROLLING 4 SCROLL PATTERN 42 5 PATTER
4. Sprite Scroll A n 4 Background by combining S Ten Register 912 and the above priority Shadow Highlight effect function can be utilized SRGENESIS MANUAL CONFIDENTIAL 106 PROPERTY OF SEGA SIEN 0 o o o The above sfi ws Priority situation of Sprite Scroll A Scroll and Background The dot to which Color Code 0 is designated is transparent Therefore either one of Scroll Screen A Scroll Screen the priority of which is one step lower than the transparent SWOENESS MANUAL Res 2 CONFIDENTIAL 106 PROPERTY OF SEGA SCIEN 1 Sprite Color Palette 0 3 Color Code 0 15 Color Palette 3 Color Code 0 13 Where S TEN 1 wheri the Priority bit of both Scroll A and Scroll B is 0 there will be Shadow For the colof status refer to the color palette SWGENESIS MANUAL puro CONFIDENTIAL 106 PROPERTY OF SEGA SIEN 1 Sprite Color Palette 3 Color Code 15 dot works as an operator this will no
5. sse Reger Tar tos Register 20 1015 1614 613 Register 23 1st 5000004 015 06 07 00 and 5000004 15 08 07 00 500000 15 08 07 00 27 Fill byte number AD Destination address FILL data SWOENESIS MANUAL Rav 22098 29 CONFIDENTIAL 106 PROPERTY OF SEGA Example 1 Fill data are word Register 15 1 1 V RAM address is even A First low side of Fill data are written in V RAM address B Second upper side of Fill data are written V RAM 1 V RAM address is added register 15 written upper side Fill data in V RAM at next each step 2 V RAM address is odd D First upper side of FILL data are written in V RAM address 1 E Second low side of FILL data are written in V RAM F Same as C VRAM address Is even You must rewrite data into ADD 1 after write data S9WGENESSS MANUAL CONFIDENTIAL 106 PROPERTY OF SEGA Example 2 Fill data are word Register 15 2 VRAM address even VRAM address odd ADD A lower Even 1 upper ADD E lower A00 2 C lower ADD 1 3 upper ADD 2 ADO 4 C lower ADD 3 5 upper ADD 4 0 5 ADO 7 upper ADD 6 7 Example 3 Fill data are byte 1 V RAM address is even
6. 2 ad 015 08 015 08 3 4 5 9 9 sh START ADDRESS 0 REG 15 1 SANGENESS MANUAL ev CONFIDENTIAL 106 PROPERTY OF SEGA 20 START ADDRESS 1 REG 415 2 BYTE LONG WORD ADDRESS O D7 Do 07 00 015 08 2 oro 4 oro 8 07 00 7 8 sh 000 9 START 85 1 REG 15 1 BYTE ADDRESS D tw 07 07 tt 023 016 1 031 024 023 016 031 024 022 016 031 024 SWGENESIS MANUAL Pes CONFIDENTIAL 8106 PROPERTY SEGA 2 015 00 VRAM DATA The data is always read in word units AO is ignored during the feading no swap of bytes occurs if 0 1 Subsequent reads are from address increment by REGISTER 15 0 is used in calculation of the next address CRAM ACCESS The CRAM contains 128 bytes 910 7 For word wide writes to the CRAM CONFIDENTIAL PROPERTY OF SEGA 015 00 are valid when we use word for data set If the writes are byte wide write the high byte to C00000 and the low byte to C00001 long word wide access is equivalent to two sequential word wide accesses Place the first data in D31 016
7. 889588 015 010 can b freely utilized for pi gram software SWGENESIS MANUAL sr CONFIDENTIAL 106 PROPERTY OF SEGA o 3 VERTICAL SCROLLING The Display Screen allows for scrolling overall or every 2 cells in a dot unit The setting can be done by VSCR Register 11 A setting applies to both Scroll Screens A and B Register 11 The scroling quantity is equivalent to 11 bits 000 7FFH However t will be shown below in the Interlace Non interlace The effective scrolling quantity is equivalent to 10 bits Interlace 1 _ Same as above Interlace 2 The effective scrolling quantity is equivala it 10711 bits Taking the Display Screen as standard the directon will be follows SWGENESIS MANUAL ev CONFIDENTIAL 106 PROPERTY OF SEGA 15 1312 109 8 7654 3 2 0 828892858 8 38 39 Coll 015 011 is indefinite 4 SCROLL PATTERN NAM The Scroll Screen s name table is in VRAM and set by Registers 2 and 4 The Name requires 2 bytes 1 word per cell the Scroll Screen Depending on the Scroll size VRAM Scroll Screen correspond with each other differently Refer to Scroll Screen Size ram tm ee eee Refer to Priority Color palette selection bit see Color Palette Color palette selection bit see Co
8. SWGENESIS MANUAL R 02082 45 CONFIDENTIAL 106 PROPERTY OF SEGA J WINDOW For Window display the following register setting and VRAM areas are required Window Pattern Name Table and Base Address Register 3 7 2 wos wor wore T Mode Set Register Number 4 Register 12 Window H Position Register 17 o Window V Position Register 18 The Window Display Position is designated by Registers 17 and 18 Screen display can be divided on a unit basis of H2 cells and V1 cell The dividing position 40 V 28 cells mode SWOENESIS MANUAL purs 46 CONFIDENTIAL 106 PROPERTY OF SEGA memes Down WNPS wore wes wes 0 Displays Window from the left to H dividing position 1 Displays Window from the H dividing position to the right end DOWN 0 Displays Window from the top end to the V dividing position 1 Displays Window from the V dividing position to the bottom end WHP5 WHP1 dividing position WVP4 WVPO dividing position H Resolution Dividing Position WHP 0 160 3208 0 00 40 SWGENESIS MANUAL Pes cans 47 CONFIDENTIAL 106 PROPERTY OF SEGA Setting Example Register 17 000H 01H Window from the left end to the
9. SWOENCSIS MANUAL CONFIDENTIAL 106 PROPERTY OF SEGA 27 1st 9000004 coo oaia oare oas oas 015 08 Das DAS DAS 07 00 and 5000004 1815 LGO Number of move word SA23 SA1 Source address in 68000 DA15 DAO Destination address in VOP 02 00 selection 2 VRAM FILL FILL mode filis with same data from free even VRAM addr sS FILL for only VRAM How to set FILL DMA DMA Starts after Step M1 Register 1 1 DMA ENABLE Increment number set to 15 norr ily 1 Fill size set to 19 20 DMA mode set to 23 Destination address and data sat start M10 aflar confirmation of finishing DMA DISENABLE Mt sho ig be hin 106 DMA transfer otherwise we cannot guarantee the operation SWGENESIS MANUAL Rov 022092 CONFIDENTIAL n is incremented with Register 15 VDP does not ask but open for CPU but CPU cannot access VDP without PSG HV counter and status You ealiz end of DMA by bit in status register 28 106 PROPERTY OF SEGA Register Setting Register 1 has another bit Register 15 wos es wes ince vo INC7 INCO increment number Status Ever FULL SOVA 000 1 Busy Notcare
10. option screen shall appear player can select items by pressing D Button upward lownward and change by pressing D Button sideways STANDARD POL 25 CONFIDENTIAL 106 PROPERTY OF SEGA How to return to the title or option screen Select EXIT and press A B or C button or press the START button the placement of cursor should not matter The following options shall be implemented when applicable LEVEL Difficulty setting PLAYER Number of players SOUND TEST Sound test CONTROL Control setting RAPID Continuous shooting setting V PASSWORD NAME ENTRY SCREEN A Select a clear font so there will be confusion e g 0 0 and 0 1 and 1 Passwords should be 12 characters or legs It is a good idea to subgroup them and use different Colors for each Do not use punctuation marks or BOTH upper and lower case letters B Maneuver PASSWORD STANDARD POL 1 enter password or hame select letters by D Buttonvand enter by button C 2 When finished p t the cursor on END 3 To del te letters hold button C and move the the D Button or use RTN return and F f nction password is wrong the letters entered 3 rased Movement of the cursor shall be a loop up down the reset button is pressed during DEMO the screen shall return to SEGA logo the high scores the ption settings and the password should not be cleared During the
11. vow o o we wrs wvre wee wveo DOWN 0 Window is in upper side from base point 1 Window is in lower side from base point WPV4 0 Base pointer 0 Upper side 1 1 cell down 2 16 DMA LENGTH COUNTER LOW 158 nec eio ves 195 te tez 19 coo 17 DMA LENGTH COUNTER HIGH MSB LSB REG 20 1615 168 1015 0 DMA LENGTH COUNTER 18 DMA SOURCE ADDRESS LOW 58 158 REG 21 sas 842 sai 19 DMA SOURCE ADDRESS 158 SA9 5 188 REG 3 Pomno saz sazo sars DMA SOURCE ADDRESS DMD1 0 DMA MODE o SA23 MEMORY TO VRAM 1 _ VRAM 1 SWGENESIS MANUAL puc CONFIDENTIAL 106 PROPERTY OF SEGA G ACCESS RAM 1 RAM ADDRESS SETTING You can access VRAM CRAM and VSRAM after writing 32 bits of control data to 5 00004 00006 You have to use word long word when addressing If you use long word 031 016 is 151 015 00 2nd att 015 08 8 00004 Ls Ls m 07 00 m o 015 06 00004 Los cos 07 00 06 00 10 CODE 16 0 DESTINATION RAM ADDRESS SWWGENESS MANUAL casa 18 CONFIDENTIAL 106 PR
12. 05 00 10 CODE 15 DESTINATION RAM ADDRESS ACCESS MODE VRAM WRITE CRAM o VSRAM WRITE 0 0 0 READ CRAM READ C00008 veo 015 08 HCI 07 00 NTERLACE MODE c vce 65 ves vc3 ve vci 015 08 HC8 HC7 HC6 HC4 HC3 HC2 HC1 07 00 HC8 HC1 COUNTER VC8 VCO COUNTER SWGENESIS 12 CONFIDENTIAL 106 PROPERTY OF SEGA VDP REGISTER VDP has write only register 0 No 23 and read only status register totalling 25 register There are two modes for register setting one is mode 4 the other mode 5 We tell you about mode 5 in this section and about mode 4 in MARK section If you change mode one frame you can get various effects 1 MODE SET REGISTER NO 1 SB 158 1 Enable H interrupt 68000 LEVEL 4 0 Disable H interrupt REG 10 M3 V counter stop 0 Enable read counter 2 MODE SET REGISTER NO 2 MSB 188 REG osP ito o DISP 1 Enable Display 0 Disable Display EO 1 Enable V interrupt 68000 LEVEL 6 0 Disable V Mt 1 DMA Enable 0 Disable 30 cell PAE mode V 28 cell mode PAL mode always 0 in NTSC mode 3 PATTERN NAME ADDRESS FO
13. DISPLAY PERIOD RETRACE INTERRUPT POINT 2 HORIZONTAL INTERRUPT H INT The Horizontal Interrupt occurs just before H retraite DISPLAY PERIOD CPU CL OCK INTERRUPT POINT VOP FETCHES INFORMATION FOR THE LINE VDP loads tret quired display inforifiation including required register values tor the line in about s6 cl cks thus the CPU control the display of the next line but not the line on which ifid intertupt occurs Dro Smet T oap tal interrupt is controlled by line counter in register 10 ifthis line counter is changed at each interrupt the desired spacing of interrupts may be achieved Thus If register 10 equals 00h then the interrupt occurs every line If register 10 equals 01h then the interrupt occurs every other line If register 10 equals 02h then the interrupt occurs every third line SWOENESIS MANUAL 9 CONFIDENTIAL 106 PROPERTY OF SEGA 3 EXTERNAL INTERRUPT EX INT e The extemal interrupt is generated by a peripheral device gun modem and stops the H V counter for later examination by the CPU HL INPUT PIN a INTERRUPT HAPPEN COUNTER RATCHED Please see other sections of this manual for information about the H V Counter the initialization of the external interrupt E VDP PORT The VDP ports are
14. 106 INTERLACE 1 F FELD NO 1 FIELDNO 2 PROPERTY OF SEGA BACKWARD COMPATIBILITY MODE the case of Backward Compatibility Mode the Mega Drive differs from the original Mark 11 and Master System in the following points MARK Ill MS Japan 05 is not incorporated ROM cartridge card selections are made by hardware the same manner as in the case of Mark Ill Start up slot number is not written in Start up SEGA logo is not displayed EM sound source is not incorporated FM sound is incorporated MS Japan standard and Mark however Mega Drive has option for that although Consider the Mega Drive s Japanese specifications ag that of Joystick Port or MS Japan without FM sound source and B MASTER SYSTEM 95 is not incorporated 0 000 RAM is not m power up 10000 has no meaningful value Start up Sega logo is not displayad sound source incomoratad FM sound source is in orporated in MS By option However Mega Drive has option although confection is possible Please regard the Mega Drive overseas version as a Master out an Operating System ROM Drive s Mark Ill and Master System backward compatibility mode the RAM opment for which D RAM was used cannot be used due to
15. B C BYTE DATA 2 V RAM address 1 000 D F DATA 3 VRAM COPY This function copi s trom source address to destination address by number of Copy Register 1 1 DMA ENABLE Number of copy bytes in 19 20 ource address and DMA mode in 23 Destination address set transfer F After confirming DMA finish M1 0 DISENABLE SWGENESIS MANUAL CONFIDENTIAL 106 PROPERTY OF SEGA starts when D above is finished Apply 1 1 only during DMA transfer In other cases if M1 1 is set there is no guarantee that it will function correctly At the time of DMA transfer the destination address is incremented by the set value of Register 415 During DMA transfer although the VDP does not require CPU to make a bus available no access is possible from CPU to VDP except for PSG HV counter Status Read transfer finish can be recognized by referring to the Status Registers DMA bit Example With Transfer byte 3 at the time of VRAM Copy Source Register 15 1 Register 15 2 Address Destination Address DATA 1 DATA 1 DATA2 DATA2 DATAS 6 DATAT Caution In the case of Copy Sid from VRAM and write to VRAM are repeated per bytes Therefore when the Source Area and Transfer Area are overlapped the transf r may not be performed correctly SWNGENESSS M
16. MOUSE 10 d7 mouse 1 1 MOUSE ERR 0 41 40 88 40 800 a0 d1 w 4 20 d1 w MOUSE 20 MOUSE 20 47 1 2 MOUSE_ERR a0 d1 w d3 20 a0 d1 w 88 43 4 a0 d1 w MOUSE 30 47 mouse 1 3 MOUSE ERR a0 d1 w d3 HA da 3A 500 20 41 43 40 40 43 34 20 d1 w MOUSE 40 d7 mouse 1 4 MOUSE ERR a0 d1 w d2 20 a0 d1 w 8 d2 4 20 d1 w 40 ml 11 40 1 100000000 select 1 1 1 592 I rsv3 14 94 43 1 111 select 1 rsv5 1 rsv 1 rsv7 l rsv8 43 1 1 11000010000 43 1 11 poo 111 select Yo Xo Ysgn Xsgn 540 m 111 1111111 42 Xo Ys Xs select Center Middle Right Left 42 xoa Yo Xo Ys bneb MOUSE 50 dbra d7 mouse 1 5 bra MOUSE ERR MOUSE 50 move b 0 41 42 42 xxxx Yo Ys XspooxiC MRL move b 500 a0 d1 w select X high X7 X6 X5 X4 84 02 442 42 Yo Xo Ys Xs C M R mouse 1 6 btstb 34 20 dL w beq b MOUSE 60 dbra d7 mouse bra MOUSE ERR MOUSE 60 move b 40 41 50 42 d2 Yo Ys M R LpoooiX7 X6 X5 X4 move b 20 a0 d1 w select X low X3 X2 8442 Isl 8442 02 xxxx Yo Xo M R 7 X6 X5 mouse 1 7 btst b 4 a0 d1 w bne b MOUSE_70 dbra d7 mouse 1 7 br
17. byte Base address designated by Register 2 Scroll B Name Table maximum 8 byte Base address designated by Register 4 Window Pattern Name Table varies by H resolution Base address designated by Register 3 Scroll Data Table 1 byte Base address designated by Register 13 Sprite Attribute Table varies by resolution Base address designated by Register 5 Generator Table Base address is 0000H fixed Sprite Generator Table 2 Base address is 0000H fixed There are 1 K bytes for H Scroll Table however as for display 896 bytes in V28 Cell Mode and 960 bytes 18 V30 Cell Mode There are 2 bytes for Window Patter Name Table in H32 Cell Made and 4 K byte H40 Mode For details refer to Window There afe 512 bytes for Sprite Attribute Table in H32 Cell and 1 K byte area in H40 Cell However as for display there are 640 bytes in H40 Mode rris from 0 000 Register 4 507 Window Pattern Name Table 2 K bytes from Register 3 52 H Scroll Data Table 1 K byte from 08800 Register 13 52 Sprite Attribute Table 512 bytes from OBEOOH Register 5 SSF SWGENESIS MANUAL Re CONFIDENTIAL 8106 PROPERTY OF SEGA 79 Unoccupied area is used as Pattern Generator and Sprite Generator OBEOOH SCROLL SPR
18. GENESIS SOFTWARE MANUAL SEGA ENTERPRISES Copyright 1988 8 of Japan This manual may not in whole or part be copied photocopied reproduced or translated without prior written consent from Sega Enterprises CONFIDENTIAL 8106 PROPERTY SEGA Genesis Technical Overview February 28 1990 GENESIS 68000 8mHz CPU 41 MByte 8 Mbit ROM Area 64 KByte RAM Area Video Display Processor Dedicated video display processor Controls playfield and sprites Capable of OMA Horizontal and vertical interrupts 280 4mHz Controls PSG Programmable Sound Generator amp FM 8 KBytes of dedicated Sound RAM VIDEO NOTE Playfield and Sprites are 09600 Display Area visual 40 Chars wide x 28 chars high Each char is 8 x 8 pixels Pixel resolution 320 x 224 3 Planes 2 Scrolling playtiekis Playfields 6 Different sizes field have a fixed window Playfield Each char position takes 2 bytes that includes Char name 10 bits points to char definition Horizontal flip Vertical flip Color palette 2 bits index into CRAM e Priority SWGENESIS MANUAL ev cian CONFIDENTIAL 106 PROPERTY OF SEGA Scrolling 1 Pixel scrolling resolution Horizontal Whole playfield as unit Each character line Each scan line Vertical Whole playfield as unit 2 Char wide colum
19. 3 actions e g Phantasy Star Button A Check Special functions Button Cancel Button Decide Opening windows D Others Even if there are two actions for the game all buttons should be utilized It is convenient if maneuvers can be changed in the option mode VIII CONTINUE ENDING A CONTINUE It shall appear when the game is over if appropriate This may not apply to sports or RPG s etc The CONTINUE shall be limited certain number of times e T The screen should return to the SEGA log after 10 20 seconds j B ending screen shall but it can be exited via the START button The screen shall return t the SEGA logo after the ending after 10 20 seconds IX GAME OVER A This 11 60 seconds and then the screen shall display SEGA logo B Pr ssing the START button while GAME OVER is indicated shall caus the screen to change and show the Sega loge portant indications such as the score there hall be a two cell margin on the right and left side 4 a one cell margin on the top and the bottom of the creen some monitors do not show these areas well Do not put important score text or time information in the top bottom leftmost or rightmost row or columns STANDARD poL m CONFIDENTIAL 106 PROPERTY OF SEGA When background music composed by a third party is utilized pay careful attention to the copyright in or
20. 30 240 RASTER 82 RASTER groenes 5 CONFIDENTIAL 106 PROPERTY OF SEGA VDP STRUCTURE The CPU controls the by special memory locations 1 CTRL control This controls REGISTER VRAM CRAM VSRAM DMA DISPLAY etc 2 VRAM VDP RAM General purpose storage area for display data 3 CRAM COLOR RAM 64 colors divided into 4 palettes of 16 colors each 4 VSRAM Vertical Scroll RAM Up to 20 different vertical scroll values each for scrolling play fields A and B 5 Direct Memory Access The VDP may move data at high speed from CPU VRAM GRAM and VSRAM instead of the CPU by taking the 68000 off the bus and doing The VDP can also fill the VRAM with a constant or copy tom VRAM to VRAM without disturbing the 68000 VRAM SOENESIS MANUAL CONFIDENTIAL 106 PROPERTY OF SEGA 0 INTERRUPT There are three interrupts Vertical Horizontal and External You can control each interrupt by the IEO IE1 and 2 bits in the VDP registers The interrupts use the AUTO VECTOR mode of the 68000 and are at levels 6 4 and 2 respectively the level 6 vertical interrupt having the highest priority 1 V Interrupt LEVEL 6 1E1 H Interrupt LEVEL 4 1 2 External interrupt LEVEL 2 1 Enable 0 Disable 1 VERTICAL INTERRUPT V INT The vertical interrupt occurs just after V retrace
21. 338838 CONFIDENTIAL 106 PROPERTY OFSEGA 7 Programmable Sound Generator PSG PSG contains four sound channels consisting of three tone generators and a noise generator Each of the four channels has an independent volume control attenuator The PSG is controlled through output port 7F Tone Generator Frequency The frequency pitch of a tone generator is set by a 10 bit value This value is counted down until it reaches zero at which time the tone output toggles and the into the counter Thus higher 10 bit numbers produce lower frequencies To load new frequency value into one of the tone generators a bytes to VO location 7F according to the following format 10 bit data is msb i 9 d8 07 06 05 04 43 d2 01 00 Noise Generator Control The noise generator uses t itee Control bits to select the character of the noise sound A bit called Feedback produces periodic noises or white noise Noise Type like low frequency tone White hiss Genesis Sound Software Manual T February 21 1992 CONFIDENTIAL 106 PROPERTY OF SEGA The frequency of the noise is selected by two bits NF1 NFO according to the following table NF NFO Noise Generator Clock Source 0 Clock 2 higher pitch less coarse Clocks 1 Clock88 lower pitch more coarse 1 0 o 1 1 Tone Generator 3 Note Clock is fi
22. DATA ACKNOWLEDGE signal may not be sent back causing hang up in the production unit Depending on some ROM emulators or ICE SUPER TARGET even the emulator may hang up avoid such hang ups measures have been taken so that SUPER TARGET would return ACKNOWLEDGE signal to the CPU without system hang ups This is done via IC 19 As a result due to this IC function for SUPER TARGET to function normally the hang up occurs in the production unit Please take the following steps to correct the problem 1 Before checking the software through SUPER TARGET CPU remove IC 19 from the socket 2 When using ICE ROM emulator 1019 may be removed Reinstall the IC should ICE ROM emulator act abnormally 3 The above measures are common with the MEGA DRIVE and the MEGA CD ae DIR SNITCH CSUPER TARGET Transitod by J T February 24 1993 1 26 22 21 xas Scot is what I discovered in the past couple of days while working with the Scaling Hardware Address 5 2 Mode Priority Mode works as follows In Mode OFF all scaled pixel data is written to Image Buffer In Write Up mode only non zero scaled pixel data is written to Image Buffer In Write Down mode non zero data In Image Buffer is not written to by scaled data Address FF8058 Stamp Size Repeat This bit works exactly opposite as it i
23. KEY ONOFF DAC To write to Part write the 8 bit address 4000 and 6 data to 4001 To write to Part II write the 8 bit address to 4002 and the data to Caution Before writing read from any address to d termine if the YM 2612 is still busy from the last write Delay until Bit 7 returns t6 0 Caution in the case gf registers that are ganged together to form a longer number for example thi TOBI or the 14 bit frequencies write the high register 1 if busy 0 if ready for new data 1 if the timer has counted up and overflowed See Register 27H Genesis Sound Software Manual ae February 21 1982 CONFIDENTIAL 106 PROPERTY OF SEGA PART MEMORY Each of 30H 90H has twelve entries three channels x four operators Channels 1 3 become channels 4 6 in Part PART MEMORY MAP cont FREG NM x mox CH 3 SUPPLEMENTARY FREO NUM x esswemox 99526 x FEEDBACK Genesis Sound Software Manus February 21 1992 CONFIDENTIAL 106 PROPERTY OF SEGA Page 10 Each of the above has three entries All follow the pattern AH with the exception that ABH and ACH follow the pattern cra AGH PART II
24. and Bj mode two entirely separate items 3 4 normal channel s Operators use offsets of integral multiples of a single frequency In SPECIAL mode each has an entirely separate frequency Channel 3 operator 1 s frequency is Registers ahd Operators 2 and 4 are in Registers and AC A9 and AD and and AE respectively T uses timer overflow to set the read register flag 0 means the timer keeps cycling without setting the flag RESET writing a 1 clears the read register fiag writing 0 has no effect 28H OPERATOR Genesis Sound Sofware Manual February 21 1992 Page 12 CONFIDENTIAL 106 PROPERTY OF SEGA This register is used for key and key Key is the depression of the synthesizer key Key off is its release The sequence of operations is set parameters key on wait off When key off occurs the FM channel stops its slow decline and starts the rapid decline specified by the release rate In a single write to Register 28H one sets the status all operators for a single channel Sega always sets them to the same value on 1 or off 0 Using a special channel 3 believe it is Possible to have each operator be a separate note so there is possible justification for tuming them and off separately OPERATOR 4131211 Register contains 8 bit DAC If the DAC enable 151 the DAC data am
25. and the second data in D15 DO The data may be written sequentially the address is incremented by the value of REGISTER 15 after every write independent of whether the width is byte or word Note that 0 is used in the increment but not in address decoding resulting in some interesting side effects if writes are attempted at odd addresses For word wide reads trom the CRAM use scooott Cie 257122 mm 015 06 5 c 42362216 E 015 08 8 004 07 00 Data 015 08 000000 4 015 08 600004 07 00 015 08 07 00 Data 015 08 600000 07 00 VS10 VSO V quantity of scrol 2 CONFIDENTIAL 106 PROPERTY OF SEGA 5 ACCESS TIMING CPU and VDP access CRAM and VSRAM using timesharing Because the VOP is very busy during the active scan the CPU accesses are limited However during vertical blanking the CPU may access the VDP continuously The number of permitted accesses by the CPU additionally depends on whether the screen in 32 cell mode or 40 mode Additionally the access size depends on the RAM type a VRAM access is byte wide but CRAM and VSRAM are word wide For example in 32 Cell mode Bccess the VRAM 16 times during horizontal scan in a single line Each acceess
26. e g for animation speed regulation Catapult has developed a synchronization technology that will maintain sync between the two machines provided you stay within the DOs and DON Ts guidelines Ideally create a game loop with a predictable number of VBls For example if you list of routines you need to go through in your game loop and you have a worst case execution time for each routine you might be able to determine how many will pass in the game loop If you happen to complete 10 the game loop sooner than worst case you would wait it out until the predicted number of VBIs has elapsed If you don t have a predictable number of VBls per game loop and the number of elapsed VBIs is used as part of the game logic e g for animation speed regulation then make sure that you use a single variable that contains the elapsed of the previous game loop This variable will be controlled by a 2 synchronization mechanism available from Catapult to maintain synchronization between the two game machines DON T Don t use the number of VBls elapsed in the current game loop in your game logic If you need to use elapsed VBIs for speed regulation use the elapsed VBI count from the previous game loop and make sure you use a single variable to store the value 56 Using Sync O Tron Sync O Tron is a technology developed by Catapult that maintains synchronization between the VBIs of two vi
27. is a duplication of 30H B4H where channels 1 3 are replaced by 4 6 The Registers LFO EN 1 is enabled 0 disabled 272 LFO Low Froquend Nano ie used to distort the FM sounds amplitude and phase It is enabled as there is LFO FREQ 171 om a global enable b sensitivity dabie dn channel by channel basis Registers enable an operator by operator basis in Registers 60H 8EH If the LFO is desired it by Register 22H Next select which channels will be affected by the LFO to what degree and whether their amplitude or frequency is affected by setting Registers Finally it a channel s amplitude is affected make sure that it is only the slots that setting Registers 60H 6EH TIMER 68 a ed CONFIDENTIAL 106 PROPERTY OF SEGA Registers 24H and 25H are ganged together to form 10 bit TIMER A with Register 25H containing the least significant bits They should be set in the order 24H 25H timer lasts 18 1024 TIMER microseconds TIMER A all 1 s 8 5 0 108 ms TIMER A 0 s 48 400ys 18 4 ms an TMERS 8 01 TIMER lasts 288 256 microseconds TIMER B 15 0 288 ms all 05 73 44 ms Register 27H controls the software timers and the Channel 3
28. reates INT The VDP equivalent to No 225 es the stored HINT 6 Receiving H_INT 225 part 4 processing occurs again CONFIDENTIAL 106 PROPERTY OF SEGA Addendum 3 Abstract from Page 4 4 Interrupt Problem During Data Transfer Pert 2 discussed the problems encountered when using HINT end V_INT in 8 program The same kinds of problems occur during an INT involving date reception and b an INT involving V_INT and data reception Refer back to part 2 for details 4 The INT during data reception does not occur in sync in r lation to and HINT therefore the solutions to the problem are different Solution In the Case of a During data reception the receive flag is set at the same time of the INT The receive flag is cleared when the data is read by the INT during date reception which does not overlap with HA hen HINT occurs again it overlaps and passes as the second INT during data reception After this occurs the receive flag is left in clear status Solve the problem by discriminating between the INT during data reception end the H_INT which passes as the INT ducing date reception This can be determined by checking dn the statusiof the receive flag Solution in the Case Set the mode Wfitch prevents the occurrence of V_INT s and then use the VDP s V_BLK status bit to detect V timing Use this method to perform the sa
29. rejore mask Scroll A by using high priority SWGENESIS MANUAL 50 Pes 22082 CONFIDENTIAL 106 PROPERTY OF SEGA 3 WINDOW PATTERN Window Pattern Name Table is VRAM and the base address is designated by Register 13 The Pattern Name the same as in Scroll Screen requires 2 bytes 1 word per ceil pri Refer to Priority cpt Color palette selection bit Color palette selection bit reverse Bit 1 Reverse hf H Reverse Bit 1 Reverse pt10 pto Pattern Generator Number Pattern Name and VRAM relation varies depending on H 32 cell 40 mode careful attention to this point H 32 Mode i o 1 SWGENESIS MANUAL 51 CONFIDENTIAL 106 PROPERTY OF SEGA H 40 Cell Mode o 1 3 v4 oz 1 0082 0060 32 cel a 31 oko Olde 4 Values shown offset from the Base Address the H40 Cell Mode there exists the area for 64 display from the 41st cell in the H direction Sprite Attribute Table and Base Address d Attribute Table Maximum 640 Bytes SWOENESIS MANUAL 52 CONFIDENTIAL 106 PROPERTY OF SEGA 1 DISPLAY POSITION Sprite Position and Display Screen are as follows When
30. then this access becomes ineffective The fix for the problem the VDP after the initiatzction program ICD BLK che the BUSY status register If a DMA 6 being executed do not attempt to access 2 The problem stil persists even affer the precautions above ore token Diagnosis of the problem Tho Rroblam wil occur when the reset takes place between the peridot te when actual the CPU hos finished the poromotes to execute the DMA and the execution of he DMA nok Eih i The fix for the problem 77 of th precautions taken in 1 as an example make sure not to execute a DMA Aight offer a reset CONFIDENTIAL 106 PROPERTY OF SEGA 29 993 Sega Enterprises Ltd MEGA 0 WAIT during Mega Drive VRAM READ In the Mega Drive during VRAM READ when the following conditions are not met data may not be read correctly Durin blank VRAM Address Set 4 VRAM READ WAIT exceeding 116 CPU clock cycles Next Address Set During V blank VRAM Address Set 4 VRAM READ Wait exceeding 12 CPU clock cycles VRAM Address Set seen above after the last READ is completed WAIT is required before the next VRAM address is set With respect to VRAM READ it can be read continuously by 17 February 24 1993 2 9 1993 Sega Enterprises Ltd SUPER TARGET IC 19 When 68000 CPU accesses an illegal area
31. 3 and 6 Usually an FM channel has only one overall frequency but if so elected FM chafifiels 3 and 6 use four separate frequencies one for each operator remainder of the registers apply to a single FM channel or to ari in that channel Registers that refer to the channel as a whole are frequency number in the standard case algorithm number extent of self feedback in operator 1 output type to L or both speakers can be FREE heliphones are used the extent to which the channel is distorted by the LFO Registers that refer to each operator make up the remainder Th feti operators connections are determined by the algorithm used but the envelope 5 always Specified individually for each operator In tne case of FM channels and 6 ie frequen may be specified individually for each operator Genesis Sound Software Manual February 21 1982 CONFIDENTIAL 8106 PROPERTY OF SEGA ENVELOPE SPECIFICATION KEY ON DEPRESSED The sound starts when the key is depressed a process The sound has an attack a strong primary decay followed by a slow secondary The sound continues this Secondary decay until the key is released 4 called key off The sound then begins rapid tinal decay representing for example not after the key has been released and the damper has come down on the strings The envelope is repre
32. 5 10 seconds If the player does not start the game during the title 5 10 seconds the screen shall proceed to the demonstration Turn on the sound If not already on If the START button is pressed during the demo the Logo screen shall appear again CONFIDENTIAL 106 PROPERTY OF SEGA If the START button is not pressed during the demo the SEGA logo shall appear after a certain time POWER ON SEGA SEGA logo screen When the START Button is pushed or after interval of about 2 seconds CHAMPION FINGER WRESTLING PUSH START BUTTON 1990 SEGA Gopyright notice START button pressed go on to game screens Otherwise in approximately 5 10 seconds 10 20 seconds Return to SEGA logo screen If START button is pushed go to Logo screen Iv art Option screen is required with the exception ansferred games and games which might lose their game play characteristics by having the screen Control pad maneuvers and screen display Selection shall be made by moving D Button upward or downward or left amp right and pressing the START button STANDARD 23 CONFIDENTIAL 106 PROPERTY OF SEGA 2 Player 1 PLAYER START OPTIONS If the player selects 1 PLAYER START he can play alone Two player simultaneous play 1 PLAYER START 2 PLAYER START OPTIONS 1P control pad only Although the screen indicates 2 PLAYER START the cursor s
33. DMA Usage Utilize DMA as you normally would in a game but make sure the DMA is complete and you have returned to the main game loop when the next VBI occurs DON T Don t have giant DMA operations that extend through one or more VBls This may result in a different number of occurring in each game machine If you decide how many DMA operations you do during a VBI by checking whether vertical blanking is over or not don t use the number of completed DMA operations in your game logic For example you are in the VBI routine you are doing a number of DMA operations and before each DMA operation you check to see whether you ve run out of vertical blanking time Because of variances in execution speed one game machine may report that vertical blanking is over and the other one may report the opposite If the main game loop makes game logic decisions based on the number of completed DMA operations the games will get out of sync 54 Controller Reads and the Main Game Loop Ideally read the controllers only once game loop before the start of the game loop It doesn t matter whether you read the controllers during the VBI routine or in the main game loop although Sega encourages you to read the six button controllers and the multi play adapter during VBI Often a game loop is so long e g 3 frame times or more that the controllers must be read more frequently than once per game loop to p
34. Digitized Audio channel as replacement for one of the FM channels Stereo output capability One LFO low frequency oscillator to distort the FM sounds 2 timers for use by software To define these terms more carefully an FM channel is capable of expressifg with d high degree realism a single note in almost instrument s voice Chords are created by using multiple FM channel i standard FM channels each have a single overall frequency afd data for howto turn this frequency into the complex final waveform the voice This conversion process uses four dedicated channel components called operators each possessingia frequency a variant of the overall frequency an envelope and the capability to modulate its using the frequency and envelope The operator frequencies are offsets of integral multiples Gf the Gverall frequency There are two sets of three FM channels named channels 3 10 3 and 4 to 6 respectively Channels and 6 the last in each set have the capability 0 056 otally separate frequency for operator rather than offsets of integral This works well we believe for percussion instruments which have harmonics at odd multiples such as 1 4 1 7 of the fundamental The 8 bit Digitized Audio Channel DAC exists as repiacement of FM channel 6 meaning that turning on the DAC turns off 6 Unfortunat ly timing must
35. Genesis Sound Software Manual is incorrect It should be changed to CONFIRMATION OF BUS STATUS This infomation is 5411100 bit 8 not bit 0 as stated in the manual 280 is inactive 68k can access 1 280 is active Please note that this is reversed from what is in the manual SEGA OF AMERICA INC Consumer Products Division GENESIS TECHNICAL BULLETIN 29A To SEGA amp Third Party Developers From Technical Support Group Date April 11 1994 Re Genesis Technical Information This a clarification on Genesis Technical Bulletin 29 The information on the bottom of page 2 of the Genesis Sound Software Manual is incorrect It should be changed to CONFIRMATION OF BUS STATUS This infomation is in A11100 bit 8 when accessed by WORD and bit 0 by BYTE 0 280 is inactive 68k can access 1 280 is active Please note that this is reversed from what is in the manual 275 Shoreline Drive Suite 200 Redwood City CA 94065 115 5082800 es GENESIS TECHNICAL BULLETIN 31 To Sega and Third Party Developers From Developer Technical Support Date November 22 1994 Genesis ID table update M 1 Changes to cartridge data ID specifications Please note that the specifications below also apply to the Genesis 32X The followi mi Old Country code data New byte ASCII hardware enable code 1FOh 1 1 to 1FFh are fi
36. H8 SEGA OF AMERICA INC Consumer Products Division GENES X Developers and Third Parties From Mac Senour Technical Support Ye Date 9 9 91 Re Corrections to the Genesis Software Manual When discussing VRAM CRAM and VSRAM access th manual states in pages 22 27 that byte access is possible this is incortect Access is limited to word or long word On page 77 it implies that the 68000 set the bank switches bank switches MUST be set by the 28 These changes affect version 1 0 of the Manual later versions will reflect this correction RS Tett 94065 SEGA OF AMERICA INC Consumer Products Division GENESIS ICAL IN To Developers and Third Parties From Mac Senour Technical Support ill Date 9 5 91 Re ROM splitting As we all know Genesis products must be split into 128k odd amp even pieces expects the ROM images to he in the following format O Evel For larger products continue th above pattern We would appreciate it if all products would conform to this method of splitting Please request the utility to split ROMs M2B or Split4 if your current t ol can t output files in this manner Redwood GA 065 PROPERT HOR SEGA GA OF AMERICA INC Consumer Products Division GENESIS TECHNICAL BULLETIN 27 To SEGA amp Third Party Developers From Technical Support Group Date J
37. Ysign 0 when Y data is positive 1 when negative Xs Xsign 0 when X data is positive 1 when negative C Center button START PAUSE M Middle button TRG B R Right button TRG C to CANCEL L Left button TRG A to SELECT X7 XO absolute values of movement in X direction 7 0 absolute values of movement Y direction REGISTERS register d1 is exclusively used for input to the routine register 40 amp d2 is used for output SESE ESSERE ERN EN EREX TER MOUSE movem d1 d3 d4 d7 a0 sp move w 100 Z80BusReq move w 100 Z80Reset btst b H0 Z80BusReq bne 8 moveq 0 40 error flag cmp w 880002 41 bhi MOUSE_EXIT 91 91 move l 500210003 20 MOUSE CONNECT move b 60 6 a0 d1 w nop nop move b 560 0 41 TH TR 11 END DATA command moveq 0 42 0 83 mouse 1 btst b 4 0 41 beq b mouse_rdy_Ip move b a0 d1 w d4 d4b 111 0000 and b 950544 tst b 44 bne MOUSE EXIT nothing connected differnt controller move b 20 0 41 select ti mi 11 move w Sfe d7 timeout parameter mouse btstb 4 a0 d1 w 122 5 bne b dbra bra MOUSE 10 move b move b nop mouse 1 2 btst b beqb n bne b dbra bra MOUSE 20 move b move b Isl w mouse 1 3 btst b bne b dbra bra MOUSE_30 move b 11 move b orw moveq mouse 1 4 btst b 545 dbra bra MOUSE 40 move b move b mouse 1 5 btst b vns
38. connect various peripherals to the 1 0 port other than joysticks Each peripheral has its own ID code and it is possible for the CPU to check the code to identify what is connected Be aware that there are some Master System peripherals which cannot be identified by this method 1 ID Code The ID code for the external ports CTRL 1 CTRL2 whichcorrespond to the 1 0 port s DATA1 2 3 PD2 ang PDO are shown by logical operation In concrete terms setting the TH pin to output mode and outputting either 1 or 0 as data will yield the following 103 PD6 1 AND OR PD2 1 AND OR PDO 0 AND OR PD2 100 PD6 0 AND OR PD The relationship between the 10 code and the peripheral hardware is shown below Device Name 103 102 101 100 Old style joystick 2 trig 11271777 F Undefined 0 E 4 New style joustick 3 trig 1 0 1 1 0 C 1 9 1 1 58 1 0 1 9 A 1 59 1 9 9 0 8 1 1 1 7 Undefined 0 1 1 56 Sega Reserved 1 0 1 5 Undefined o 1 9 9 4 Undefined 07 92 1 1 3 Undefined 1 52 Undefined 1 1 Sega Reserved 0 CONFIDENTIAL 106 PROPERTY OF SEGA k Addendum 5 Abstract From Page 1 1 When the 280 Cannot Do a 68000 Bus Access There are times when the 280 cannot read or write good date in the 68000
39. destination address 7168 address 5000004 must be a word write The final write use the work There are two ways to accomplish this 1 by copying th DMA program inte RAM 2 by doing a final move W RAM address 13 Stops The source address is 000000 3FFFFF 0 5 for RAM The DMA reads are word wide writes are and word wide for CRAM and VSRAM The destination is SW GENESIS MANUAL pur CONFIDENTIAL 106 PROPERTY OF SEGA Setting of DMA M Register 1 1 DMA ENABLE Increment number set to Register 15 normally 2 Transfer word number set to Registers 19 20 gt Source address and DMA mode set into Registers 21 422 and 23 m Set the destination address VDP gets the CPU bus G start H VDP releases the CPU bus 1 1 has to be 0 after confirmation of DMA finish DMA DISENABLE DMA starts after Step E You must set 1 1 only during DMA otherwise we the operation Source addresses were increased with 2 and destination increased with content of Register 15 2 Content of Register Register 41 Ras another bit 1 INCO Number of increment tas taz ter too Tig ios Toe T un s spe Tos poem 897
40. features that may delay the game or annoy the other player For example if you provide an instant replay feature you might want to limit each player to one instant replay per quarter Don t expect the players to discipline themselves in the use non gameplay features When they are losing some players will do anything to annoy the winning players 12 64 Call Waiting and Line Noise Dialog Boxes Provide a means to display text during gameplay to alert the player about Call Waiting or Line Noise The text will only be displayed when the game is frozen so if characters need to be moved off the screen during the display of text they can be moved back after the text has been removed from the screen Don t rely on players to guess what is going on when the screen freezes during a Line Noise event Also if you cannot display text during Call Waiting then the game must be terminated when the Call Waiting event occurs When the player is done with the phone call the game must start again from the beginning 6 5 4 Controller Allocation Make sure that during tournament play the controllers are allocated as controllers 1 and 2 against 3 and 4 Although it is interesting to split players in different configurations it is very confusing and usually results in players not knowing what is going on Don t assume that the players can talk to each other to decide on a controller configuration Make sure that all 4 players h
41. is the version number of the game In some games however the data suffix 2 as shown in numbers 2 and 5 below denotes the sales territory for the cartridge Please make sure not to confuse the two Explanation There are currently 5 product number types 1 T xxxxx third party brand Japan 2 T xxxxx zz third party brand international 3 G tttt Sega brand Japan 4 MK 0000 Sega brand US 5 MK 0000 zz Sega brand international other than US For European third party products the product number is 50 22 50 Only r xxxxx is necessary when the information is entered in the cartridge 50 is unnecessary Example If the product number is 12345 50 European version the cartridge information is as follows Incorrect 180h GM T 12345 50 kind good number ver checksum Correct 180h GM T 12345 00 kind good number ver checksum Note The information contained here is not included in any previously released documentation nme 10 SEGA OF AMERICA INC Consumer Products Division GENESIS TECHNICAL BULLETIN 28 To SEGA amp Third Party Developers From Technical Support Group Date January 31 1994 Re Genesis Technical Information 1 In accordance with an increased number of Mega Drive peripheral devices 1 0 port usage data is added at 190H of the cartridge ID For more information on port usa
42. play the start button shall work as the pause button During the 2 player simultaneous play both control pads shall be able to pause and cancel CONFIDENTIAL 106 PROPERTY OF SEGA C During pause the sound shall be silenced The background music only shall continue immediately when the pause is released The pause function shall not work when the SEGA logo or the title logo are displayed or during the demonstration E PAUSE shall be indicated on the screen during the pause NOTE Adventure and role playing games may not require the pause mode VII BASIC MANEUVERS DURING THE GAME PLAY A General Maneuvers may vary based on specific requirements of individual games START Button Start Pause D Button Used to determine the directions Button A Special functions maneuvers Button B Passive maneuvers such as CANCEL Button C Active maneuvers such DECIDE B Sample Quick Maneuvers for action and shooting games 1 2 actions 4 Ghouls n Ghosts Thunder Force II Button A Junp Sub Shot ButtonjB Shot Main Shot Button Jump S b Shot 2 3 actions e g Trojan Altered Beast Button A Punch Button Kick Button C Jump Sampl Slow Maneuvers for role playing simulation and adventure games 8 1 32 actions Button Decide Opening windows Button B Cancel Button C Decide Opening windows STANDARD z CONFIDENTIAL 106 PROPERTY OF SEGA 2
43. player Games XBAND can host 4 against 4 games for teams of players using multi play adapter in each game machine 75 Multi Way Gaming In the future XBAND will be able to support multi way gaming for 10s or even 100s of simultaneous players competing against each other in the same game Contact Catapult for more details if you have a game that would take advantage of this functionality 14 76 Handicapping Your game patch can provide information for the XBAND Network to use to handicap players For example you could start out a better player in a fighting game with a pre existing damage level or assign a higher point level to blows he she receives 77 Bug Fixes Your Game Patch can include bug fixes to your game Whether the bugs are crashers or just imperfections that should be fixed it is trivial to use the Game Patching mechanism to fix the bugs when the cartridge is played on XBAND Indeed most of the games running on the XBAND network today have been patched with bug fixes 7 8 Your Idea Here If you ve got a unique idea for information to store on the XBAND Server and integrate with your XBAND savvy game we re interested in hearing it Contact Developer Relations at 408 366 1735 XBAND BANDWIDTH and Sync O Tron are trademarks of Catapult Entertainment Inc other trademarks are of their respective owners 15 Addendum 1 Abstract from Page 2 Joysticks Peripherals It is possible to
44. reads the control pads in the Logo Demo program As you can see this routine sends a bus request reads hm de then releases the z80 573 Forbes Blvd Box 2167 So San Francisco 94080 415 742 9300 FAX 415 742 0516 CONFIDENTIAL 106 PROPERTY OF SEGA 1 TA 2 t sT datal l is the address for edge data of port 1 z80_diw set busreq bsr rs sub 280 ei rts rs sub lea sw datal a5 witch data store address lea port 1 a6 port for pl bsr rs 0 addq w 2 6 port 2 rs 0 move b 50 6 TH 0 wait nop move b 6 47 input 0 asl b 2 47 0 amp wait move b 540 andi w 11000000 47 chame data 0 amp wait move b a6 d6 Gg anput xs andi w 00111111 46 i or b 46 47 not b d7 move b 5 46 eor b 47 46 move b d7 aS switch data and b 47 46 move b 46 5 switch edge data rts j port initial sw init iport initial moveq set TH out move b move b moved rts troller port address 00 Modem 504 Mega Drive Joy Stick 50 Ram Disk sof ETC or None use 0 a0 cont set 0006 port 1 di d2 a5 sp register push dis z80 diw lea and data pc a5 data table address set move b a5 cont a6 Th bit set output 106 initial SEGA OF AMERICA INC Consume
45. s addresses If the the 68000 s bus cycle accesses 100 prior to the 280 s interrupt the bus cycle for the 280 interrupt is shortened When this occurs the 280 cannot read or write good data BR 86 BGACK Short Time Period When the 68000 i accessing A100XX 1 A BUSREQ j sent to the 260 Stops the 280 bus access A11100 0100H 2 1 lg cesset 3 BUSREQ from the 280 is cleared 280 begins bus access 5 11 0000 Change the 68000 s programs to follow the steps shown above Miscellaneous the program structure uses something like V_INT for sync there should be no problems as long as it is set up so that unfavorable bus access patterns are not created CONFIDENTIAL 106 PROPERTY OF SEGA BR 8 1 1 1 68000 Bus OtherYotterlsar 100 100HY SA 100x Years 100 00 280 a 280 e 280 BG BGACK CONFIDENTIAL 106 PROPERTY OF SEGA Addendum 3 Abstract from Page 2 2 When Using H INT and V INT with a Genesis Program When the VDP register 0 s 1 1 1 and register 10 00H HINT end V_INT are created with the timing scheme described below However problem occurs during No 224 H_INT s timing Since the amount of time which is available before V_INT is only 14 7 5 the acceptance of the No 224 means that the V_INT will miss the V_INT occurrence
46. same line 11 Sprites counting from the on amp having the highest priority as for 11th one however only for 16 dots fram the left end in the H40 cell mode can be displayed due to the limitation of the display dots 9 dispiayed on the same line t priority in the H32 cell due 10 the limitation of 57 5 PRIORITY BETWEEN SPRITES Priority between Sprites is designated by each Sprite s Link Data With Sprite 0 being Priority No 1 the Sprite No 2 written in the Link Data there will be Priority No 2 Priority No 2 Sprite s Link Data shows Priority No 3 Sprite Priority No 3 Sprite s Link Data shows Priority No 4 Sprite this way Priority is sequentially designated by each Sprite s Link Data and thus it is in List form The value that can be set in the Link Data is 0 number of maximum Display on one screen minus one Be sure to set 0 to the lowest priority Sprites Link Data When 0 is given to the Sprite Link Data List ends at that Sprite and the Priority will become the lowest Even in the case that the number of Sprites linkedto List is less than the maximum display quantity 64 or 80 the rei Sprites linked to Sprite will be displayed P When value other than those specified is set to Link Dala or 0 is the lowest Priority Sprite Link Data ordinary functioning is not guaranteed Sprite 0 Sprite 0 Sprite
47. sdund stay on continuously for the pause interval Page 20 CONFIDENTIAL 106 PROPERTY OF SEGA SEGA OF AMERICA INC Consumer Products Division ECHNI Developers and Third Parties From Mac Senour Technical support Specialist Date 3 13 91 Re Genesis Technical Bulletins The following bulletins were written to address Gertain areas of Genesis game development that required correction or clarification Please replace all previous bulletins with the attached pages These Technical Bulletins may not in or part be copied photocopied reproduced or translated written consent from Sega of America Inc i If you have any questions comments have problem that you like to have addressed in the future please contact Mac Senour Technical Support pecialist Sega of America 573 Forbes Blvd 2 So San Francisco 94080 415 742 9300 352 575 Forbes Blvd P O 2167 So San Francisco CA 94080 415 74295 215 7420516 CONFIDENTIAL 106 PROPERTY OF SEGA SEGA OF AMERICA INC Consumer Products Division GENESIS TECHNICAL BULLETIN 1 To Developers and Third Parties From Mac Senour Technical Support Date 3 13 91 Re Errors within the Microtec examples There are three errors in examples that are provided Please make the changes as noted In TESTC68K bat The asm68k commands end with a semicolon remov
48. the VDP Performs high speed fills or memory copies 12 PSG stands for Programmable Sound Generator a ci 13 FM stands for Frequency Modulation a class Mega drive contains a Yamaha 2612 FM B DISPLAY SPECIFICATION CHARACTER GENERATOR SCROLL PLAYFIELOS Two scroling play feids whose size in cells is selectable trom selectable There are 64 sprites available when the screen is in 32 wide mode or 80 hen the screen is in 40 cell wide mods 1 window associated with the Scroll A play feld 64 colors 512 possibiites European television 50 Hz standard vertical size of 30 cells 240 dots is GENES MANUAL Rev 21552 CONFIDENTIAL 106 PROPERTY OF SEGA divided into active scan where the picture is displayed and vertical retrace or vertical blanking e The VDP supports both NTCS and PAL television standards In both cases the screen is where the monitor prepares for the next display VOP FETCHES DISPLAY GENERATE HORIZONTAL INTERRUPT HORIZONTAL HORIZONTAL RETRACE RETRACE RASTER gt VERTICAL RETRACE DISPLAY DISPLAY SCREEN GENERATE VERTICAL INTERRUPT VERTICAL RETRACE Numbers of t sters in scteen ar as follows unstveonten von NO LINE NO LINE NO DISPLAY RETRACE NTSC 262 28 224 RASTER 38 RASTER PAL 312 28 224 RASTER 98 RASTER
49. the problem boards for development which utilize S RAM can be used SWOENESIS MANUAL Res CONFIDENTIAL 106 PROPERTY OF SEGA SYSTEM Mega Drive System area assignment starts from 5400000 with the 280 sub CPU s memory area A VERSION NUMBER Indicates the Mega Drive s hardware version soor woo ves vere vem Mode R 0 Domestic Model 1 Overseas Model VMOD R 0 NTSC CPU clock 7 67 MHz 1 PAL CPU clock 7 60 MHz 0 unit connected 7 1 FDD unit not connected RSV Currently not 3 0 Mega Drive versi n is indicated by 0 SF The present hardware version is indicated by 0 Disk B VO PORT The Mega Drive has the three general purpose Ctr 2 and Exp Although each port differs from the others in Physical it functions in the same manner Each port has the followingstive registers tor control Data Parallel data RAW Parallel control S Ctrl Serial control RW TxData data RM R RxData SWGENESSS MANUAL pe CONFIDENTIAL 106 PROPERTY OF SEGA 72 The relationship between REGISTERS is as follows DATA 00 vo DOWN SERIAL PARALLEL CONVERSION P gt S PARALLEL SERIAL CONVERS
50. two free running video game systems you can only hope to keep both systems on the same frame for about two minutes Fortunately since VBI synchronization is essential for many games Catapult has developed a technology called Sync O Tron which keeps VBls locked together for the duration of the game despite the drift between the two crystal oscillators This technology usually helps solve game synchronization problems but it is not always a complete solution It is discussed later in Section 5 6 Another common source of synchronization problems occurs in the critical relationship between VBI and the main game loop One would think that given identical hardware identical software and identical state e g the same controller input the VBI interrupt for a given frame will occur after the exact same instruction in the main game loop in both machines If it were the case that there were no other asynchronous events occurring in the video game machine this indeed would be true Unfortunately events such as DRAM refresh and sound DMA are unpredictable and asynchronous to the CPU execution causing the two CPUs to have the same average execution speed although not the same cycle by cycle execution profile So while it is the case that VBI will occur at 4 approximately the same instruction each main game loop given VBI it might be one or two instructions off If there is a game state decision that occurs in one of th
51. 0 SEGA OF AMERICA check_sum equ 0000 ORG 0100 dc b SEGA GENESIS dc b C T XX 199X XXX dc b your game tile dc b dc b dc b your game title dc b dc b dc b GM T XXXXXX XX dc w check sum dc b J dc l 00000000 500280 dc b dc b dc b dc b dc b U release year title version j1a0 CONFIDENTIAL 106 PROPERTY OF SEGA SEGA OF AMERICA INC Consumer Products Division SIS TECHNICAL To Developers and Third Parties From Mac Senour Technical Support 7 Date 4 2 91 Re Impossible values read from the controller pads It is possible for a well used controller pad to yield incorrect values Specifically up AND down left AND Fight This is due to the small piece of rubber wearing ouf inside the pad Your routine that handles the values read should be written so that if the number is NOT one of the expectedwwalues it should re read the pad to obtain a correct value As always please call if you have qu stions comments 575 Forbes Blvd PO Box 2167 So San Francisco 94080 415 742 9300 FAX 415 742 0516 CONFIDENTIAL 106 PROPERTY OF SEGA SEGA OF AMERICA INC Consumer Products Division Developers and Third Parties From Mac Senour Technical su
52. 00 a d Sound Sound Chip Prohibited Bark Register Prohibied Sound RAM 4 This is for the 280 progta 68000 by byte Sound Chip This is the mapping area for source YM2612 When accessing from 68000 byte due to timing problem Bank Register Access to the 68000 side Memory Area from 280 will be based a 32 byte unit At this time this fegister sets which bank is to be accessed Registering from 68000 can beset however do not access to 280 Bank Memory Area by 68000 CONFIDENTIAL 106 PROPERTY OF SEGA Setting Method When accessing to the 68000 side addresses from Z80 side all the addresses can be classified into Banks Bank can be set by writing 9 times in 0 bit of 6000 280 address The 9 bits correspond to 68000 address 15 23 as shown below S RAM 5 SOUND OTHERS BANK 68000 SWGENES MANUAL Res caosa CONFIDENTIAL 106 PROPERTY OF SEGA VRAM MAPPING In VRAM there are various tables and pattern generators as stated below Among those the base address of Pattern Generator Table and Sprite Generator Table are 0000H and fixed However the other base addresses can be freely assigned in VRAM by setting VDP Register Also Area can be overlapped therefore Table can be commonly used by Scroll screen and Window for example Scroll A Pattern Name Table maximum 8
53. 7FFFF S RAM is for 280 in 0A00000 to OAO1FFF FM sound chip interface is 0A04000 to OAO4FFF VO and 280 control port are 0410000 to OA11F FF VDP and sound control port are in 0 00000 to OCOOFFF Scratch RAM isin 000 to OFFFFFF 171 5642 02 This board has two memory areas Main Memory D RAM 5000000 Backup Memory S RAM 5200000 203FFF 1 Initialize Write 0100H into 0A11000 Write 1 into 0A130F0 Green LED light up 2 Write Protect Write 3 into 0A130F0 Red LED light up 3 Read Write Write 1 into 50 130 4 Note Emul t r access te these ports should be enabled before the writes then disabled after words a SWOENESS MANUAL Pe CONFIDENTIAL 106 PROPERTY OF SEGA 87 PROPERTY OF SEGA 106 Mega Drive Registers Fixed Bits 40 Cell and NTSC Mode CONFIDENTIAL SNGENESIS MANUAL ev cone GENESIS SOUND SOFTWARE MANUAL CONFIDENTIAL 106 PROPERTY OF SEGA 1 280 MAPPING 280 Interrupt 68K CONTROL OF 2 80 280 Start up 280 Handshake FM SOUND CONTROL 68K Access FM Chip 280 Access FM Chip PSG CONTROL V D A CONTROL ee M CONFIDENTIAL 106 PROPERTY OF SEGA SUPPLEMENTARY INDEX 1 FM AUDIO YM2612 A Overview B little bit about operators Regis
54. AM BUS RESET ON BUS REQ OFF BUS RESET OFF BUS REQUEST BUS REQ DATA 100H WORD A11100 BUS REQ OFF DATA WORD A11100 RESET Z 80 RESET ON DATA WORD 5411200 RESET 100 WORD A11200 This period requires 26ms Also FM sound 500768 is cleared at the same time CONFIRMATION OF BUS STATUS THSinformation is in 5411100 bit 0 Genesis Sound Software Manual February 21 1992 CONFIDENTIAL 106 PROPERTY OF SEGA Page 2 280 Handshake If you access the HANDSHAKE area 00000 AO7FFF you must use BUS REQ 68K has to access the 2 80 S RAM by byte FM SOUND CONTROL A 68K Accesses the FM Source 68K needs BUS REQ when accessing the FM source because this memory is controlled by Z 80 B 280 Accesses the FM Source 2 80 normally controls the FM 4000H 4003H IV PSG CONTROL PSG accepts access of 68K and 2 80 any time but you fiave to coordinate 68K and 2 80 accesses PSG is in 00011 from 68K and 7F11H from 2 80 Genesis Sound Software Manual February 21 1992 Pages CONFIDENTIAL 106 PROPERTY OF SEGA OVERVIEW Yamaha 2612 Frequency Modulation FM sound synthesis IC resembles the Yamaha 2151 used in SEGA s coin operated machines and the chips used in Yamaha s synthesizers 1 capabilities include 6 channels of FM sound An amp bit
55. ANUAL ev CONFIDENTIAL 106 PROPERTY OF SEGA 32 Registers are as follows Register 1 includes bits set for purposes other than DMA Therefore careful attention in this regard Registar 15 wor wos mes ve INC7 INCO Increment number UM ETE TTE SL re 015 08 07 00 Destination address ing first and second by long word first will be 031 016 and second will be sons wen 25 CONFIDENTIAL 106 PROPERTY OF SEGA 4 DMA TRANSFER CAPACITY Transfer quantity varies depending on the Display Mode as follows number of words not bytes should apply transfer to all the addresses of CRAM and VSR depending on the number of lin s duririg V Blank refer to Display Mode in the case of NTSC video signal and PAL systems when on screen display is not made the Transfer is th same as Transfer Bytes Per Line during Blanking MANUAL Rv 082092 CONFIDENTIAL 106 PROPERTY OF SEGA SCROLLING SCREEN There are two different scroll screens A and B which separately can scroll vertically and horizontally on a basis of a one dot unit in the horizontal direction scrolling overall or based on a one cell unit or one line unit can be selected and in the vertical direction scrolling ove
56. AS result V_INT is cancelled Moreover when the V INT is 225 HLINT occurs instead of the V_INT 63 7us 147 ns Solution 1 Set register os IE1 O before No 223 H INT ends in order to prevent SE 1 1 before V_INT is accepted in order to make H_INT No 224 also becomes valid 1 Set the 680005 SR 25xX before No 223 1 ends order to Prevent No 224 from being processed 2 Restore the 68000 SR prior to the end of V_INT Processing Enables No 224 processing 3 Process No 224 H INT Warning When manipulating SR make sure not to destroy the CONFIDENTIAL 106 PROPERTY OF SEGA 224 000 VUL s ES Main Program 2 244 HINT 4 5 No 225 X Execute HINT processing 18131 Multiplication 8 5 5 E Diagram of the Problem Caused bg Multiplication Command 1 The MOVE command given il iglication readies the 68000 to process HINT 2 The 68000 VPA INT ACKJ Since the VDP for processing No 224 does not after HINT occurs HINT 18 not processed After V_INT receives a VPA and mistakes this for V_INT proc amp ssing HINT 18 Stored 3 Processing i xecuted since H_INT No 224 was received in part 1 processing the 68000 readies to process H_INT
57. DIR D2R dnd RR in the same RS is the degree to which the envelope becomes narrower as becomes high Genesis Sound Sofware Manual CONFIDENTIAL 8106 PROPERTY OFSEGA 7 frequency s top five bits 3 octave bits and 2 note bits are called KC key code in the following rate formulas RS 0 Final Rate 2 Rate KC 8 RS 1 Final Rate 2 Rate KC 4 RS 2 Final Rate 2 Rate KC 2 RS 3 Final Rate 2 Rate Always rounded down As rate ranges from 0 31 this means that the RS influence ranges from small at 0 3 to very large at 0 31 er ipie Tem DIR first decay rate is the initial step amplitude decay rate 6 value and affected by RS 4 46 likg all rates 0 31 AM is the amplitude modulation enable whether or not this operator i pe subject to amplitude modulation by the LFO This bit is not relevant unless LFO is enabled and Register B4 s AMS amplitude modulation sensitivity is non zero me D2R secondary decay rate is the long tallof of the sound that continues as long as the key is depressed xi erede Sound Sotware Manual EN 21 1992 CONFIDENTIAL 106 PROPERTY OF SEGA S Channel 1 s frequency is in AO and Channel 28 frequency is in A1 and ASH Channel 3 if it is in normal mode please see page 12 is 2 and 6 If channel 3 is in special
58. ESS MANUAL CONFIDENTIAL 106 PROPERTY OF SEGA 2 780 MEMORY 0000H SOUND RAM 04000H 2000H 04001H SEGA 04002H RESERVED 04003H 4000H 04004 SOUND CHIP ACCESS 6000H 2612 PROHIBITED 06 00 0H MISCELLANEOUS 00TH ACCESS E 8000H PROHIBITED 07 11 68000 BANK esae FFFFH 3 68000 ACCESS TO ZB0 MEMORY A00000 SOUND RAM 5 04000 5 02000 12 0 5 04002 SEGA 01 RESERVED 04004 SOUND CHIP ACCESS YM2612 PROHIBITED A06000 BANK BANK REGISTER A06002 ACCESS PROHIBITED ACCESS PROHIBITED AOFFFF Smaenesis MANUAL CONFIDENTIAL 106 PROPERTY OF SEGA 4 VO AREA A10000 5 10002 DATA CTRL 1 DATA CTRL 2 A10008 CONTROL 1 5 1000 Tx DATA Rx DATA 1 MODE Tx DATA Rx DATA 2 5 10014 A1001A Tx DATA RxDATA E MODI A10020 SATFFFF 5 CONTROLAREA ACCESS PROHIBITED A11000 5 110902 MODE access gt PROHIBITED 280 BUSREQ ACCESS PROHIBITED ACCCESS PROHIBITED SATFFFF SWGENESS MANUAL ur CONFIDENTIAL 106 PROPERTY OF SEGA 6 VDP AREA C00000 00004 DATA 5000008 CONTROL C0000A HV COUNTER ACCESS C00010 PROHIBITED ACCESS PSG C00012 PROHIBI
59. Enable Code 2501 2 20 20 20 20 2 2 20 2 2 2 22 2 2 20 20 NOTE Software containing errors in the code above will not be ible for fi ROM release purposes E e mc To Sega and Third Party Developers From Developer Technical Support and Catapult Entertainment Date 30 Jan 95 Re Getting Games Ready For XBAND NOTE This document is provided to Sega Certified Developers under the confidential terms of your Sega Developer Agreement 1 Introduction This document provides an introduction to the XBAND Video Game Modem and Network and a preliminary overview of game design guidelines that will make o it easier for your game to be adapted for network play If you are developing a new multi player game that you would like to be compatible with the XBAND Network or if you would like the XBAND Network to be compatible with an existing multi player game this is the first document that you should read NOTE Many of the technologies described in this document are proprietary to Catapult Entertainment Inc and are either patented or patent pending 2 How to reach XBAND Catapult Entertainment Inc c o Developer Programs 20823 Stevens Creek Blvd Cupertino CA 95014 Voice 408 366 1735 Fax 408 366 1729 Internet developers catapent com 3 What is XBAND XBAND is made up of two major components The XBAND Video Game
60. F SEGA 7 199 11 82 Il Corrections to the Manual When discussing VRAM CRAM 27 that byte access 6 possible after the VDP address register is set operation causes the VDP to think during the VSRAM access the manual states in ages 22 through in reality this is false The reason for this is that Instruction for CPU word access ex a fetch next access that it is stil a word access From now on please consider the text regarding byte access In pages 22 27 as being null and void Corrections to Mega Drive Addendum 6 Page 3 About Control Pads left right input impossible there are fimes when len ju oue control pod 8 designed and produced so that simuttaoous or simultaneous i Jue of the intemal rubber parts or force on the pods which ne have switch Because of this rom now on al software should process simultaneous directional input Corrections to MD Manual Page 77 Although the manual stote los that the 68000 moy set this s not the case Please execute Dank switching Input occurs due to design specs the however h realty inthe 20 fom CONFIDENTIAL 106 PROPERTY SEGA Mara 11 66 Software Guldelines 1 Whe cotter 1 When 220 MO area from within the 68000 s main routine beware of th main routine eu Executo c Conti bus request to the 280 e
61. ION SWGENESSS MANUAL Rev nome 73 CONFIDENTIAL 106 PROPERTY OF SEGA e Mapping is as follows 10003 Data 1 10005 Data2 10007 Data3 A10009 10008 Cri 2 10000 SAT000F TxData 1 10011 RxData 1 10013 S Ct 1 10015 TxData 2 A10017 AxData 2 10019 5 02 1001 3 A1001D RxData 3 SAI001F S Ctri 3 Ctr 1 2 Exp Both Byte and Word access are possible However in the case ot Word access the lower byte is meaningful Data shows the status of each port The I O direction of each TA is set by Ctr and S Ctri DATA 7 PD6 5 PD4 RW AW RIGHT RW TH PD2 RW LEFT RW TR PDs RW DOWN POO RW UP SWGENESIS MANUAL ey CONFIDENTIAL 74 106 PROPERTY OF SEGA Ciri designates the direction of each port and the Interrupt Control of TH ros J Po INT RW 0 TH INT Prohibited 1 Allowed PC6 RW 0 PD6 Input Mode 1 PD6 Output Mode PCS RW 0 PDS Input Mode 1 PD5 Output Mode PC4 RW 0 PD4 Input Mode 1 PD4 Output Mode PC3 RW 0 Input Mode 1 Output Mode PC2 RW 0 PD2 Input Mode 1 PD2 Output Mode PC 0 Input Mode 1 Output Mode PCO RW 0 PDO Input Mode 6 1 Output Mode Ready Interrupt Prohibited R
62. ITE ATTRIBUTE SWGENESIS MANUAL Fev CONFIDENTIAL 106 PROPERTY OF SEGA 80 Scroll A Pattem Name Table 8 K bytes from 0 000 Register 42 530 Scroll B Pattern Name Table 8 K bytes from Register 4 507 Window Name Table 4 bytes from 08000 Register 3 2C Scroll Data Table 2 K bytes from Register 13 528 Sprite Attribute Table 1 K byte from Register 5 54 SWGENESS MANUAL uo 81 CONFIDENTIAL 106 PROPERTY OF SEGA Precautions for 5 Software Programming When programming the M5 software pay attention to the following 1 The program od RAM ROM VRAM CRAM VSRAM should be resident in RAM or it should be as in LIST for example However in either one of the above two cases a long word access is not possible as regards the last address set 2 10 should be as in the next page 3 Put LIST2 at your program s start This is the U S security software DMA RAM lea Vdp cmd 500000 Address Register 3 Set source Address to VDP Register Set Data Length to VDP Register 4 move 1 xx ramo Destination Addres iram Work move w ramo An movew 2 Pay caf tul attention to 1st word and Destination Address should be set by Word and 0 by Leng Word sequential order of usr2 move b 5 10001 40 andib 950140
63. LEVEL 2 2 Disable external interrupt See INTERRUPT and SYSTEM VSCR V scroll mode HSCR LSCR scroll mode VSCR FUNCTION 1 FUNCTION o rou seno FULL SCROLL nen 2CELL SCROLL BOTH SCROLL A and 10 MODE SET REGISTER NO 4 hable SHADOW and HILIGHT 10 Disable SHADOW and HILIGHT FUNCTION NO INTERLACE INTERLACE DOUBLE RESOLUTION SWGENESIS MANUAL pun CONFIDENTIAL 106 PROPERTY OF SEGA 11 H SCROLL DATA TABLE BASE ADDRESS MSB 158 13 VRAM ADDR 0000 0000 LSB 14 0 o o 0 12 AUTO INCREMENT DATA This register controls bias number of increment data MSB REG 915 ince mcs nca mca 1 7 i Bias number 0 5 64 PROHIBITED 188 mer was wee wee RIGT 0 Window is in left side from base point 1 Window is in right side from base point WHP5 1 Base pointer 0 Left side 1 1 cell right 222 SWGENESIS MANUAL Fv 16 CONFIDENTIAL 106 PROPERTY OF SEGA 15 WINDOW V POSITION MSB LSB
64. Modem e and the XBAND Network The XBAND Video Game Modem is a device that 1 plugs in between a Sega Genesis cartridge slot and video game cartridge The XBAND Network is an on line system built into the XBAND Video Game Modem that automatically matches players to play video games with each other keeps track of game statistics provides e mail and electronic newspapers and much more As a video game developer you will be mostly concerned with the operation and programming of the XBAND Video Game Modem during the execution of your video game The information you will need regarding this starts in Section 4 XBAND Video Game Modem The XBAND Video Game Modem is more than just a modem Physically it plugs into a Sega Genesis cartridge slot and accepts a video game cartridge on a connector on the top The phone line plugs into an RJ 11 jack on the side There is also a slot to accept an ISO 7816 compliant Smart Card whose use will be explained later and a pass through switch which allows you to play the attached cartridge in single player mode The XBAND Video Game Modem has 512KBytes 4 MBits of ROM that holds the XBAND OS XOS code XOS graphics and sound data and the XOS GameTalk routines which can be directly called by game cartridges The XBAND Video Game Modem also contains 64KBytes 512KBits of battery backed SRAM that holds the player s personal information X Mail Player List Player ID XOS syste
65. N GENERATOR 22 44 WINDOW 48 i DISPLAY POSITION 46 2 WINDOW PRIORITY 4 50 3 WINDOW PATTERN NAME idis ds 55220 52 1 DISPLAY POSITION 53 SPRITE ATTRIBUTE 55 56 lt DISP _ 4 BETWEEN SPRITES Riss uode SPRITE PATFERN GENERATOR 60 PRIORITY 81 87 ATER 69 KWARD COMPATIBILITY MODE UE MARK III MS Japan 4444 71 MASTER SYSTEM RAM BOARD 2 n CONFIDENTIAL 106 PROPERTY OF SEGA IV SYSTEM 72 B V VRAM MAPPING VI SOUND SOFTWARE MANUAL A 280 MAPPING B 68K CONTROL OF 280 SOUND CONTROL D PSG CONTROL E D A CONTROL APPENDIX SWGENESIS MANUAL Per NERSION NLNBER 25255775 Coes 72 VOPORT gt E 72 MEMORY MODE L C 76 1 280 BusReq 2 280 Reset BO AHER DDR CONFIDENTIAL 106 PROPERTY OF SEGA 1 MEMORY Mega Drive 16 Bit Mode as distinct from Master System Compatibility Mode 1 68K MEMORY 8000000 200000 CARTRIDGE 400000 SEGA 400000 600000 RESERVED 10000 5800000 1 000 900000 SEGA RESERVED A00000 A12000 SYSTEM SEGA 800000 RESERVED SEGA C00000 RESERVED vor 8000000 00000 00000 WORK RAM ACCESS 8 00000 PROHIBITED 5 WORK RAM SFFFFFF SWGEN
66. OPERTY OF SEGA 2 VRAM ACCESS VRAM address range from 0 to 64K bytes total VRAM access addressing is as follows when writing e de scoooos 015 08 8 0004 07 00 015 09 om ow ov oa on 5252101 015 00 VRAM data When you use long word 031 016 is 151 015 00 2nd Wher you do byte wriingrdatee B7 DO and may De written te 5000060 0 500084 4 Word and lon word 07 0 e VRAM address is increased by th of REGISTER 29 independent data size VRAM address AQ is used in tHe calculation of the address increment but is ignored during address decoding addressing and decoding as follows the address decode uses 15 1 AO specifies the data write format Write data cannot cross a word boundary high and low bytes are exchanged if AO 1 mo i wono wono ADoRESS EVEN oso 7 07 00 023 016 07 00 ADDRESS even 07 00 mm Ee 097 08 even 07 00 50 Rev 022092 19 CONFIDENTIAL 106 PROPERTY OF SEGA EXAMPLE START ADDRESS 0 REG 15 2 BYTE WORD LONG WORD ADDRESS 0 015 08 091 024 1 is 07 00 07 00 023 016
67. R SCROLL MSB 158 sais sara SA13 o 0 o ADDR XXX0_0000_0000_0000 PATTERN NAME TABLE BASE ADDRESS FOR WINDOW MSB LSB REG 3 0 0 wore 013 WD12 WD11 0 WDII shouid be 0 in H40 cell mode VRAM ADDR XXXX_X000_0000_0000 H32 cell mode VRAM ADDR XXXX_9000_0000_0000 H40 cell mode SWGENESIS MANUAL ev 13 CONFIDENTIAL 106 PROPERTY OF SEGA 5 PATTERN NAME TABLE BASE ADDRESS FOR SCROLL MSB 158 REG 4 o 0 seis se 5813 VRAM ADDR 0 0000 0000 0000 6 SPRITE ATTRIBUTE TABLE BASE ADDRESS MSB 158 REG sS amis ama amz oT ats ATS should be 0 in H40 cell mode VRAM ADDR XXX0 0000 0000 32 cell VRAM ADDR XX00 0000 0000 40 cell REG 6 7 BACKGROUND COLOR MSB LSB coro CPT10 COLOR PALLET COL 3 0 COLOR CODE 188 MSB 158 HITS HITS This register makes H interrupt timing by number of aster H interrupt is enabled by IE 1 SWGENESS MANUAL pure CONFIDENTIAL 106 PROPERTY OF SEGA 9 MODE SET REGISTER 3 MSB LSB acm o o wscn isca IEZ 1 Enable external interrupt 68000
68. SPRITE O No 3 SWGENESIS MANUAL 9 CONFIDENTIAL 106 PROPERTY OF SEGA Setting Example Link Data Sprite 0 2 Sprite 1 Sprite 2 Sprite 3 Sprite 4 Sprite 5 Sprite 11 Sprite 13 Sprite 14 Sprite 15 tes Shown the Display Priority are displayed on the screen Sprites 2 14 and 16 onward are not displayed because they are not linked list swoeness 59 CONFIDENTIAL 106 PROPERTY OF SEGA 6 SPRITE PATTERN GENERATOR The Sprite Pattern Generator with VRAM 0000H as Base Address expresses pattern on basis of 8x8 dots 32 bytes are required to define one pattern Every 32 bytes one pattem is expressed the sequence of Pattern Generator 0 1 2 etc The relationship of Display Pattern and Memory is the same as in Pattern Generator Also Sprite Size and Pattern Generator relationship is as follows SWGENESIS MANUAL ur 60 CONFIDENTIAL 106 PROPERTY OF SEGA L PRIORITY Priority between Sprite Scroll A and Scroll can designated Priority can be designated by each Name and Attribute Priority bit It will be set for the Scroll Screen on a cell unit basis and for each Sprite By combining each Priority bit Priority will be as follows however the Background Priority is always the lowest
69. Sprite H position is 0 this is in a special mode Therefore pay careful attention to this point Resolution Position Display Aroa Cel 090 UFH 001 1FFH Cel 080 iBFH Resolution V Position Display Ares 000 1FFH 090 154 E 2 000 SWGENESIS MANUAL Fev CONFIDENTIAL 53 106 PROPERTY OF SEGA When 0 is set to the SPRITE H POSITION low priority sprite the same e line will not be displayed SPRITE POSITION POSITION OF SPRITE DISPLAY SCREEN SPRITE PRIORITY 8 A C D SWOENESIS MANUAL Congo CONFIDENTIAL 106 PROPERTY OF SEGA 2 SPRITE ATTRIBUTE Sprite Attribute Table is on VRAM and the Base Address is designated by Ri 5 Attribute requires 8 bytes 4 words per Sprite and i Priority Sprite Generator Number and Attribute Starting from the beginning of the Attribute Table numbers are given in the Sequence of Sprite 0 Sprite 1 Sprite 2 Sprite 3 etc Priority between Sprites is not determined by the sequence of Sprite number but by each Sprite s Link Data and thus becomes programmable Sprite s H Size Sprite s V Size Link Data Qus Bit see Priority selection bit see Color Palette y m Bi
70. TED 76489 55 PROHIBITED sDFFFFF SWGENESS MANUAL cana CONFIDENTIAL 106 PROPERTY OF SEGA VDP 315 5313 Video Display Processor VDP controls screen display VDP has graphic Modes IV and V where Mode IV is for compatibility with the MASTER SYSTEM and V is for the new Mega drive functions There are no advantages to using Mode IV so it is assumed that all Mega drive development will use Mode V in Mode V the VDP display has 4 planes SPRITE SCROLLA WINDOW SCROLLB and BACKGROUND GRAPHIC IV MODE COMPATIBILITY MODE SCROLL SPRITE PRIORITY BACKGROUND DISPLAY gt GRAPHIC V MODE 16 BIT MODE SCROLL SCROLL Haa ANAL CONFIDENTIAL 106 PROPERTY OF SEGA TERMINOLOGY unit of position on coordinates is called DOT minimum unit of display is called a PIXEL CELL means an 8 pixel x 8 pixel pattern SCROLL indicates a repositionable screen spanning field CPU usually indicates the 68000 VDP stands for Video Dispiay Processor CTRL stands for Control VRAM stands for VDP RAM the 64K bytes area of RAM accessible only through the VDP 9 CRAM stands for Color RAM 64 9 bit words inside the VDP chip 11 stands for Direct Memory Access the process by which
71. a MOUSE ERR MOUSE 70 moveb a0dl w d2 42 YoXoYsXs CMRL X7X6X5X4poox X3X2X1X0 move b 00 a0 d1 w select High Y7 Y6 5 4 4 d2 4 d2 d2 Y0X0YsXs CMRL X7X6X5X4 X3X2X1 mouse 1 8 btstb 4 a0 d1 w MOUSE 80 dbra d7 mouse 1 8 bra MOUSE ERR MOUSE 80 move b a0 d1 w d2 42 YoXoYsXs CMRLIX7X6XSX4 X3X2X1XOpoood Y7 Y6Y 5 Y4 move b 20 a0 d1 w select Y Low Y2 Y1 YO 8442 Isl 84 42 d2 YoXoYsXs CMRL X7X6X5X4 X3X2XIXOYTY6YSY _1 9 btstb 4 a0 d1 w beq b MOUSE 90 dbra d7 mouse 109 bra MOUSE_ERR MOUSE_90 move b a0 d1 w d2 d2 YoXoYsXs CMRLIX7X6XSX4 X3X2X1 XO YTY6Y SY4poood Y3 Y2Y 1YO move b 560 a0 d1 w TR 1 DATA command and exit 1 8 2 442 d2 YoXo YsXs CMRLIXTX6XSX4 X3X2X 1X0 Y7YGY S YA Y3Y2Y 1YO mouse 1 10 btst b 4 a0 d1 w beq b 1 10 orl 8500000000 42 MOUSE EXIT move w 0 Z80BusReq moveml __ 81 3 44 47 40 rts MOUSE ERR move b 560 a0 d1 w nop nop mouse erlp btst b 4 a0 d1 w mouse_erlp orl 8580000000 42 moveq 0 40 move w 0 Z80BusReq moveml __ sp dl d3 d4 d7 a0 rts 1 3 Warning regarding the Sega infrared 6 button cordless pad The following software issues were discovered prior to the release of the Mega Drive infrared 6 button cordless pad Detailed technical specifications regarding the infrared pad w
72. aced new MSB The horizontal resolution problem is solved by always dropping the LSB IV Counters value is not valid during vertical blanking check to be sure that it scan before using the value SWGENESS MANUAL Res 22052 25 CONFIDENTIAL 106 PROPERTY OF SEGA TRANSFER o DMA Direct Memory Access is a high speed technique for memory access to the VRAM CRAM and VSRAM During DMA VRAM CRAM and VSRAM occur at the fastest possible rate refer to the section on Access Timing There are three modes of DMA access as can be seen below all of which may be done to VRAM or CRAM or VSRAM The 68K is stopped during memory to VRAM CRAM VSRAM DMA but the 280 continues to run as long as it does not attempt access to the 68K memory space DMA is quite fast during VBLANK about double the tightest possible 68K loop s speed but during active scan the speed is the same as a 68K loop Please note that after this point VRAM is used as a generic term for VRAM CRAM VSRAM OMA Memory V RAM L VRAM Copy 1 OMDO Reg 23 DMDO SA23 Source address are 000000 S3FFFFF ROM RAM for memory to transfers 10 the case of ROM VAAN hardware feature causes occasional failure of DMA unl ss the following two conditions are observed 4 The
73. anuary 24 1994 Re Genesis Technical Information The following tech note contains information on Genesis peripheral devices 130 Shoreline Drive Redwood City 94065 415 508 2800 FAX 415 802 1448 1 Warning regarding control pad data reads For both the and 6 button pads pad data is determined 2usec after TH is modified Therefore as shown in the sample below read data from the pad 2usec 4 nop s after is modified Joypad Reads Pad data from the 3 and 6 button controllers are read 2usec after is modified The wait is necessary because the data in the chip needs time to stabilize after TH is modified If data is read without this wait there is no guarantee that the data will be correct Moreover the 2 time is equivalent to 4 nop including the 68000 s prefetch Z80BusReq equ 5 11100 Z80Reset equ A11200 m Mw JSD joystick id get This routine essentially performs connection check of the Genesis ports Figures out if some kind of controller is attached to port and distinguishes between different classes regular vs handshaking controllers This identification scheme is based on Addendum 1 in the Genesis Software Manual iim port number 0 2 out d0 I ID P 0d FP6B six button or MD 3button 03 SOA SOJ mouse 07 SEGA TEAM PLAYER i ff input error passed incorrect port number 0f unknown or nothing connected
74. at location 68000 in the 68000 memory space UPPER BYTE LOWER BYTE DATA PORT C00000 5000002 C00004 00006 8 00008 C0000A 500000 C0000 on m em functionally equivalent MANUAL Rev 10 CONFIDENTIAL 106 PROPERTY OF SEGA 2 C00004 CONTROL PORT READ STATUS REGISTER 015 08 07 00 scoo4 eet Le ool NO USE EMPT 1 WRITE FIFO EMPTY 0 FULL 1 WRITE FIFO FULL ie Bi si 1 V interrupt happened SOVR 1 Sprites overflow occurred too many one ling Over 17 32 mode Over 21 in 40 cell mode 1 Collision happened between non zero pilis iri two 5 gt ODD 1 interlace mode frame in interlace mode uring V blanking 0 PAL 1 PAL MODE 0 NTSC MODE 015 08 ust use Word or long word access to the VDP ports when setting the registers faeces is equivalent to two word accesses with D31 016 written first CONFIDENTIAL 106 PROPERTY OF SEGA WRITE2 ADDRESS SET 18 cor An c00004 BEP ES cos ex ws 2st 5000004
75. ate not identical execution on both machines Synchronization issues for Game State approach games are quite game specific and are not addressed in this document Please contact Catapult for more information With the Controller Communication approach player game controller input is transmitted between the game machines This approach is commonly used by games where all players are visible on the screen at the same time such as sports and fighting games The advantage of this approach is that there is a relatively small fixed amount of data that must be transmitted allowing the data to be transmitted every frame time thereby allowing real time response The disadvantage of this approach is that it requires identical real time game logic execution on both game machines The following discussions review the issues surrounding the synchronization of Controller Communication approach games 5 Game Design Guidelines This section provides a number of guidelines for game design that either avoid synchronization problems or suggest architectures in which the synchronization problems can be controlled 5 1 Random Number Generators DO Implement a single random number generator routine in your code that starts from a settable seed and follows a reproducible sequence mathematical algorithms work best The random number generator should only be called by a single thread of execution i e either the main game loop or the VBI routine but
76. augment the video game cartridge to make it function properly over the modem When the XBAND Video Game Modem connects to an opponent and the handshake is complete control is passed to the video game cartridge The video game cartridge executes as it would normally except for the changes to the cartridge provided by the Game Patch These changes route the controller reads through the modem to the remote Sega Genesis machine resolve synchronization issues between the two systems and record results of the game execution for later reporting to the XBAND Server When game completes the XBAND Video Game Modem hangs up the phone and control returns to the XOS The custom chip in the XBAND Video Game Modem provides a very flexible set of capabilities for augmenting the execution of a game cartridge The chip permits you to make any change to a cartridge ROM that is needed to make it work on XBAND There are a number of ways that a Game Patch is developed for an existing cartridge Ideally it is developed by the programmer who wrote the original game cartridge but often this person is not available In fact sometimes the original source code for the game is not even available or is commented in a foreign language rendering it unreadable Catapult has found that given the relatively small changes required to augment a game for use on XBAND it is quite feasible to get the game to work from the object code using reverse 6 engineering te
77. ause the video game once disrupted and then make every effort to wait out the noise event restore cartier and resume the game Even if the modem has no choice but to hang up it will redial the opponent and attempt to restore carrier and resume the game This level of tenaciousness is essential when dealing with shared voice lines We have found that about one in every three games experiences a line noise event that would have resulted in a lost connection with a conventional modem 4 Getting Network Games to Run In Sync The essential problem of real time point to point modem game play is maintaining synchronization between the two video game machines Although the video game hardware and cartridge software are identical on both ends of the phone line slight variances between the systems as well as the limited timing resolution of the modem data stream creates a situation where it is quite easy for the two machines to drift out of synchronization Once the two video games are out of sync even slightly they will drift even further apart as game play continues and in the end the game will likely have a different outcome There is no single technique that will magically maintain synchronization for all games Catapult has found that there are about as many techniques for maintaining synchronization as there are techniques for designing main game loops And we have also come very quickly to the realization that it would be ludicrous to try to
78. ave a chance to join in the beginning but there should be no additions after the game begins We have found that players get very upset when a person joins in later in the match Don t let players join in at any arbitrary time Limit it to a single screen and make it very clear how many players are playing Ideally you should have a tournament mode for 1 on 1 and 2 on 1 or 2 XBAND will eventually provide special matching for people who only want to play 1 on 1 13 7 Special XBAND Features for New Games The following features can significantly add to the game play value of your games utilizing the special capabilities of the XBAND systems These are just a few ideas If you have special needs or a really cool idea let us know and we ll see if we can code it into XBAND 71 Full screen for Point of View 2 Player Games If you are currently splitting the screen in your 2 player point of view game you might consider a full screen mode when playing through XBAND 72 Updated Stats Throughout the Season If you are writing a sports game with real players you can have the player roster updated with the latest trades injuries etc whenever the player logs into the XBAND Server Catapult is working on content relationships to provide you with this data for your sports games 73 Levels Mazes The XBAND Server can download new levels and mazes for RPG or DOOM like games within available RAM constraints 74 Eight
79. be done by software meaning that unless the software has been very cleverly constructed it is impossible to use any of the FM channels at the same time as the DAC Stereo output capability means thal any of tne sounds FM or DAC may be directed to the left the Tight or both outputs The stere is Output only through the headphone jack The LFO or Low Frequency Oscillaat allows for amplitude and or frequency distortions of the FM Sounds Eath degree to which it will be distorted by the LFO if at This could be used imple if guitar solo Finally the System has software timers which may be used as an alternative to the 280 VBLANK interrupt Unfortunately these two timers do not cause interrupts they must be read determine if they have finished counting Genesis Sound Software Manual February 21 1992 Page 4 CONFIDENTIAL 106 PROPERTY OF SEGA A LITTLE BIT ABOUT OPERATORS There are four dedicated operators assigned to every channel with the following properties Anoperator has an input a frequency and an envelope with which to modify the input and an output 4 The operators have two types those whose outputs feed into another operator and those that are summed to form the final waveform The latter are called slots The slots may be independently enabled although Sega s software always enables disables them all simultaneously Operator one may feed back into itself res
80. beqb 70 1 If Rot version 0 SEGA a14000 Output ASCII SWOENESS MANUAL CONFIDENTIAL 106 PROPERTY OF SEGA ROM Cartridge Data For Mega Drive Write in ROM s 100H 1FFH 100 SEGA MEGA DRIVE 1 110H SEGA 1988 JUL 2 120H Game Name domestic 3 150H Game Name overseas 4 180 XXXXXXXX XX 5 18 XXXX 6 190H Control Data 7 1 5000000 SXXXXXX 1ABH FF0000 FFFFFF 9 1BOH Extemal RAM Data 10 1BCH Modem Data 1 8 12 1FOH Country in which the product 13 can be released 2 Copyright notice and year month of release firm 3 Game name for domestic JIS KANJI Code 4 Game name for overseas market JIS KANJI Code ok 5 Type of cartridge and products number version number Game GM Education Number Product No Version _ depending an the type of ROM or software version Start Address End Address 9 RAM Capacity Start Address End Address SWGENESIS MANUAL ev coe CONFIDENTIAL 106 PROPERTY OF SEGA 10 When extemal RAM is mounted fill the address by a space code when it is Mounted do the following 1B0H dcb 1x1yz000 00100000 1 for Backup and 0 if not Backup 10 if even address only 11 odd address only 1B4H dei RAM start address RAM end address 11 corresponding to modem fil it by space code if not do the following 1 dcb
81. chniques and several of the Game Patches XBAND were developed using these methods The following sections cover the basics of game synchronization and give several examples If you are designing a new game we hope that this will cover enough of the gotchas to keep it sync clean If you are developing a Game Patch for a game that is already in the field this should give you a starting point in understanding key places where the game must be patched 43 Synchronization Approaches There are two main communication approaches that are used between video games to maintain synchronization Game State Communication and Controller Communication With the Game State approach game state information such as player position number of enemies number of lives etc is transmitted between the game machines This approach is commonly used in point of view games The advantage of this approach is that the games truly free run on each machine and data is only sent when there is relevant data to send For example if the two players are in different rooms only information that might affect the other player is transmitted The disadvantage of this approach is that a great deal of information must sometimes be transmitted in real time e g if both players are shooting at each other If you are using this approach for your game then most of the discussion that follows does not apply to you since you are just trying to achieve identical game st
82. deo game systems The technology is available for your use by your game while it is running on the XBAND Network It provides two key advantages First Sync O Tron often simplifies the development of synchronized game loops Without Sync O Tron two free running game machines can drift apart by an entire frame within 2 minutes With Sync O Tron you are guaranteed that both game machines will always be frame synchronous to each other Second Sync O Tron reduces communications latency Without Sync O Tron there might be as much as a full frame of skew between the two game machines To allow for this worst case scenario it is necessary to add an additional frame of latency to the communications With Sync O Tron there is always a fixed relationship between the VBIs of the two systems and minimum latency can be achieved Sync O Tron requires a very small routine that runs in VBI once per game loop 11 6 User Interface Considerations When a multi player game is played over a telephone line by people who don t know each other and can t talk to each other there number of user interface issues that need to be considered Although it is possible to get existing multi player games to run as is on XBAND we have found certain user interface changes are essential to avoid disputes between players and dissatisfaction with game play These issues are discussed below 61 Fair Access to Critical Controls Have a means f
83. der to avoid any infringement therein Copyrights shall be secured for all 3rd Party music when applicable C Names which are closely related to any particular manufacturer product and character shall not be used D Buttons shall work as soon as they are pressed not released unless there is a specific approved reason to violate this rule E Start Button shall work separately from other buttons F Indication of Score and High Score High scores and previous players shall Scores shown on TITLE DEMONSTRATION screens 16 2 player game then both scof s shali be Wieplayed simultaneously Title music shall start wign the ppears and finish before the demonstration starts H The title of the game and names within the gane shall not infringe spon the frad marks of Third Parti I At the end of the game ub fords or expressions which imply copyright patent or invention shall not be made during credits 2 Develoj gredits be included at the end of the f approval by SEGA NOTE In th case where any question arises as regards the ITEMS set forth in the SEGA GAME SOFTWARE DEVELOPMENT STANDARDS or matters f r Which eElpulation is made the developer shall from time equired consult with the SEGA Software Department 3 said problem subject to the outcome of such reactant STANDARD 3 CONFIDENTIAL 106 PROPERTY O
84. e it and the file will assemble correctly The link command is incorrect Itvshould be LNK68K c sieve cmd o sieve sieve fit The C compiler documentation f fers to Command line option of STRINGSINTEXT for allocating str ng Code segment rather then data segment The correct spelling for this option is STRINTEXT me f 7 574 Forbes PO Box CONFIDENTIAL 106 PROPERTY OF SEGA 7 50 San Francisco CA 94080 415 742 9300 FAX 415 742 0516 SEGA SEGA OF AMERICA INC Consumer Products Division TECHNICAL BULLETIN No 002 To Genesis Developers and Genesis Third Parties From Steve Hanawa lt jyy Date June 19 1990 Re Genesis Loader Board In order to prevent loading errors please have th following modification on Genesis Loader Board You need to have 2 Resister 4 7 1 8W 1 Jumper Wire Please call me if you have any questions or Sp cial arrangements Rey unge c GA 171 5734 1 2 5 3 Place jumper wire between centronics connector pin 12 and ICI 74HC74 pin 7 GND 573 Forbes Blvd PO Box 2167 So San Francisco CA 94080 415 742 9300 FAX 415 742 0516 CONFIDENTIAL 106 PROPERTY OF SEGA SEGA SEGA OF AMERICA INC Consumer Products Division GENESIS TECHNICAL 3 To Developers and Third Parties From Senour Technical Support Date August 2 1990 Re Precaution when accessing the 280 b
85. ese instructions that is affected by a variable changed during VBI the game execution will be different on both machines This same slight variation in CPU timing can also affect the number of VBI frames per game loop For example if the main game loop takes almost exactly three frames to execute it might finish executing just before VBI on one machine and just after VBI on the other machine If the number of frames per game loop affects game logic as it often does one game will count three frames and the other will count four causing the two games will exhibit different behavior The slight variation in CPU timing can also affect reads from hardware registers that affect game behavior For example some games read the current HV counter at various points in the game loop for use as a random number Clearly given the execution variances just mentioned the number fetched could have widely differing values on the two machines DMA timing can also introduce variations in execution for many of the same reasons On the Sega Genesis when graphics DMA occurs it shuts down the CPU completely Normally DMA is only used during vertical blanking allowing the CPU to run during active video but sometimes when games are doing major screen updates e g between segments of the game they activate DMA continuously until the update is complete If the DMA continues for more than a frame time an entire VBI may be missed And if the DMA completes at app
86. ge data please see Page 1 of the GENESIS SOFTWARE DEVELOPMENT MANUAL COMPLEMENT Items added Sega mouse Fighting pad 6B 6 Multi tap Setting Conditions Fighting Pad 6B Only when the XYZ buttons are effective For the rest enter J the usual manner Multi tap When multi tap multi switch is on When data can be read with multi switch tumed on even if it is not geared for the multi play 130 Shoreline Drive Redwood City CA 94065 415 508 2800 FAX 415 802 1448 Multi Tap Supplement Multi tap switching setup has the following functions A D Terminal selectors any one terminal can be selected MULTI Used with games designed for more than 3 players 2 For the country information to be added at 1FOH of the Mega Drive cartridge ID please input such data in accordance with A10001H of the I O port BIT7 0 Domestic Input as J 0 NTSC Japan Korea Taiwan sales hardware BIT7 1 Overseas Input as U BIT6 0 NTSC US Canada sales hardware BIT7 1 Overseas Input as E BIT6 1 PAL Europe Hong Kong sales hardware Note For the above I O port see Page 72 of the GENESIS SOFTWARE MANUAL Translated by Jay Tabeiilanoary 31 1994 2 GENESIS TECHNICAL BULLETIN 29 To SEGA amp Third Party Developers From Technical Support Group Date March 10 1994 Re Genesis Technical Information The information on the bottom of page 2 of the
87. h other differently Example Register 16 00H 32 32 cell SWGENESIS MANUAL Fev 22092 CONFIDENTIAL 106 PROPERTY OF SEGA s Example Register 16 11H 64764 cell 1 CELL 7 1 64 coll 62 wo ea wo s We ow Example Register 16 327128 cell o SWGENESIS MANUAL CONFIDENTIAL 106 PROPERTY OF SEGA 2 HORIZONTAL SCROLLING The Display Screen allows for scrolling or based on one cell unit or on a dot by dot basis in one line unit Either one of the above scrolling can be selected by HSCR and LSCR Register 411 A setting applies to both Scroll Screens A and user FUNCTION Scroting HSCR LCSR Register 811 The effective scroll quantity is equivalent to 10 bits 000 Taking the Display Screen as standard the Scroll direction will be as follows Horizontally quantity settirigiarea VRAM From the base address which was set by Register 13 set the scrolling quantity of Screens A and alternately Also the scrolling Setting position varies depending on the following mode overall 1 cell SRGENESSS MANUAL Rev 39 CONFIDENTIAL 106 PROPERTY OF SEGA 8 14 13 G2 odo
88. hall be controlled so that the player cannot Select it In order to make it clear whether the player select or not different colors should be us d When the player selects 1 PLAYER 8 Gan play alone 1 and 2P control pads 2 a When the 1 control pad s START button is pressed 1 PLAYER START 2 PLAYER START OPTIONS The player selectall three however the player can only play with 1P control pad 1 PLAYER START the player can play alone with side 2 PLAYER START 2 players can play simultaneously d 1P control pad controls the player 1 and 2P control pad controls the player 2 STANDARD POL CONFIDENTIAL 106 PROPERTY OF SEGA 3 When the 2P control pad s START button is pressed 1 PLAYER START 2 PLAYER START OPTIONS The player cannot select 1 PLAYER START and he can only control the 2P control pad 2 PLAYER START 2 players can play simultaneously 1 control pad controls the player 1 and 2P control pad controls the player 2 4 Two player alternate play if applicable a 1P control pad only 1 PLAYER START 2 PLAYER START OPTIONS The player can select all thre 1 PLAYER START the player can play along with 1P side o 2 PLAYER START 2 players can play alternate with 5 ontrol pad b Option Screen LEVEL 4 EASY PLAYER 5 SOUND TEST 1 CONTROL RAPID T the player selects OPTIONS on the Start option
89. have and the game results from the last game played Simultaneously the XBAND Video Game Modem downloads the phone number of an opponent or a number of minutes to wait for a call any incoming mail the two XBAND on line newspapers any new game patch that is needed to be explained below and any new system updates for the XOS Once the transaction is complete the XBAND Video Game Modem hangs up the phone and if it downloaded an opponent s phone number it immediately dials the opponent If it received instructions to wait for an opponent it notifies the player of how long it expects to wait and then waits for the telephone to ring Either by dialing out or by receiving an incoming call the XBAND Video Game Modem connects with another XBAND Video Game Modem There is a handshake where they exchange player information then the video game cartridge is started up the two games synchronize to each other and the video game is played Once the game is completed the XBAND Video Game Modems disconnect storing the results of the game in battery backed up RAM to be stored until one of the XBAND Video Game Modems connects to the XBAND Server again and uploads the data Since the phone lines used for XBAND are often used for voice calls or fax machines as well it s important to gracefully deal with Call Waiting and line noise events Such disruptions typically cause modems to lose carrier and hang up The XBAND Video Game Modem however will p
90. here may be occasions when the data becomes garbled Because of this possibility sure to check the back up data and perform reproduction retrieval processing Moreover do not place critical data at leading and ending RAM addresses since one word in both addresses have high probability of becoming garbled CONFIDENTIAL 106 PROPERTY OF SEGA SEGA SOFTWARE DEVELOPMENT AND GAME STANDARDS The following Sega of America Game Standards Policy should serve as a guideline for the development of Sega licensed cartridges by defining the types of content and themes inconsistent with Sega s corporate marketing and product development philosophy SOA will not approve cartridges i e audio visual work packaging and instructions manuals with sexually suggestive or explicit content which reflect ethnic racial teligious nationalistic or sexual stereotyp s or language which depict excessive graphi violence which use profanity in any form or which incorporate language that could be offensive by prevailing public standards and tastes which encourage or glamorize the use of drugs alcohol or tobacco which make an overt political statement which contain depictions of synbols or groups which are an anathema to racial religious or ethnic groups which is a potential infringement of a legally protected copyright or trademark It is not possible for a single document to cover every possible eventualit
91. ight enter spin loop to count the length of time before a player presses start for the purpose of getting a random number seed The timing resolution of a CPU spin loop is far more precise than the time resolution of a modem so the two game machines will certainly measure the player reaction time differently resulting in a different random number seed 42 How XBAND Synchronizes Existing Game Cartridges Multi player Sega Genesis video games played across XBAND must be carefully designed to 1 accept controller input from the remote Sega Genesis system 2 maintain synchronized execution between the Sega Genesis systems and 3 have appropriate options for networked play Clearly games which are designed from the start with the knowledge of the XBAND Network and Video Game Modem can design in these capabilities However cartridges which are already out on the market require these capabilities to be added in the field The XBAND Network and Video Game Modem work together to make these in field extensions possible The process goes as follows When someone hits the Challenge button to register for a match the XOS running on the XBAND Video Game Modem dials into the XBAND Server and uploads the checksum of the cartridge that the player wants to play The XBAND Server checks to see whether the cartridge is a supported XBAND game and if it is it downloads to the XBAND Video Game Modem a Game Patch which contains the code necessary to
92. ill follow at a later date Change in the method to switch between the Fighting Pad 6B and the 38 Pad The mode switch is made by the operation described below Do not implement the following button combinations in game controls 1 After installing the infrared 6 button pad receiver on the Mega Drive turn on power to the Mega Drive 2 When the receiver has power push the MODE X and C buttons on the cordless 6 button pad simultaneously 3 The controller is now in 3 button mode 4 Warning regarding Fighting Pad 6B hereafter 6 data The shaded data in the table below is used for expansion uses The data is not currently used by the 6 The data there is invalid therefore please do not use them TH bit TR bit5 TL bit L biiz D bitt Comments 19 TRG C TRGB RIGHT LEFT DOWN UP 2 START TRG A 0 0 DOWN UP 3 TRGB RIGHT LEFT DOWN UP 4 START 0 0 DOWN UP 5 m TRGC TRGB RIGHT LEFT DOWN UP 6 Low START TRG A 0 0 0 0 Recognition T Hi TRG C TRG B MODE TRG X TRG Y TRG Z Expansion 8 Low START TRGA 1 1 1 1 e H TRGB Fighting Pad 6B Data Table 9 5 Cartridge Information Corrections and Additions to Genesis Technical Bulletin 26 Sec 3 The data yy entered in cartridge information ID 188h 18Dh
93. impose a single mechanism upon all video games developers You need to look at the particular architecture of your game see which issues apply in your case and which issues don t and make use of the tools and techniques that Catapult has developed And if that doesn t do the trick we re here to help you Many times we ve been told that because of this and that a game will never run synchronized over a modem We have yet to find one that we could not get to work with XBAND 41 Why Synchronization Errors Occur One would think that two identical video game machines running the same software and fed the same controller inputs would have identical execution Unfortunately this is not at all the case There are several reasons why two identical video game machines running identical software will have varying execution behavior This list is by no means complete but it covers the major issues that we have encountered To begin with any two free running systems will run at different speeds That is to say the crystal oscillator that governs the clock speed of the video game processor and the timing of the video scanning is only accurate to a certain precision In practical terms we have found that the worst case speed differential between two video game systems will cause one machine to get a full frame ahead of the other in about two minutes So if your game uses Vertical Blanking Interrupt VBI as a timing reference you will find that given
94. is a byte write so this amounts to 8 words However CRAM and VSRAMiithough sharing the 16 time limit are word accesses so that 16 wards may be written in single line the FIFO wil fil up and the wait ti the CPU has unlimited access to the RAMs during vertical blanking the wait case never arises SWOENESIS MANUAL 24 CONFIDENTIAL 106 PROPERTY OF SEGA 6 COUNTER The HV Counter s function is to give the horizontal and vertical location of the television beam If the 3 Bit of Register 0 is set the HV Counter will then freeze when trigger signal HL goes high as well as triggering a level 2 interrupt NIIS Counter is not latched by trigger signal Courter is tached by wigger Signal Register 40 Non interlace Mode 5000008 vos ves ves vez 1 564 vee wes wes nca Hos 07 00 Interlace Mode ver vos vos vee ver 07 00 V Counter VCO Counter counter PETS 9 co nter only has eight bits each for and V so Interlace Mode and 40 320 dot modes present sorite problems During Interlace Mode the LSB of the vertical position is tepl
95. lled with the space character code 20h Explanation The hardware enable code is used when the application reads the hardware data information i 5 10001 in order to perform territory lockout The code is used by SEGA to check hardware software compatibility 10001 Main Sales Hardware Enable Code numbers from 0 to F below Bit7 Bit 6 Hardware Type Territories o 1 2T3 T4 5 e 7 s A 8 F 0 0 Japan NTSC Japan S Korea Taiwan X o 1 x o 1 Japan PAL 0 0 1 0 Overseas NTSC America Brazil 1 71 PAL Europe Hong Kong 7 Example 2 17 Enable X Disable Ex 1 The hardware enable code F is entered in applications that do not limit hardware compatibility a universal compatibility ROM As can be seen in the table above the hardware enable code is compatible with all hardware types Ex 2 For applications that are compatible only with the US version of the Genesis the hardware enable code 4 is used The application is compatible only with hardware that shows Bit 7 1 and Bit 6 0 at A10001 Hardware 4
96. lor Palette V Reverse Bit 1 Reverse H Reverse Bit 1 Reverse Pattem Generator Number 07 00 SWOENESS MANUAL 42 CONFIDENTIAL 106 PROPERTY OF SEGA Reverse bits vf and hf allow for and V reverse on unit basis v o PE 0 Med 0 0 hie 1 he1 SWGENESIS MANUAL iy cae CONFIDENTIAL 106 PROPERTY OF SEGA 43 5 PATTERN GENERATOR Pattern Generator has VRAM 0000H as base address and a pattem is expressed an 8 x 8 dot basis To define a pattern 32 bytes are required Starting from 0000H it proceeds in the sequence of Pattern Generator 0 1 2 etc The relationship between the display pattern and memory is follows 12345678 coooooooo do0000000 hoooooooo 0 3 07 00 07 0007 0007 00 SWGENESIS MANUAL ev CONFIDENTIAL 106 PROPERTY OF SEGA Interface 2 one celi consists of 8 x 16 dots and therefore 64 bytes 16 long words are required 12345678 snunoonuu enunonnun gnanoonnn innaoonan agaooona 00000000 o 1 2 07 0007 000
97. m sp d2 d3 a0 2 Warning regarding Sega Mouse data requests After the 10th data read always issue an END DATA command Set both TH amp TR bit high to issue an END DATA command see example below Abnormal operation may occur if data beyond the 11th state is read MOUSE_GET mouse tablet driver THIS DRIVER READS THE SEGA MOUSE Access this routine from within the V_INT The Z80 Enable Disable code is provided as a safety check to prevent unfavorable bus access dl w port number 0 2 401 amp 42 1 401 contains connection status and reserved bits 42 1 contains MOUSE bits 40 xoooxpooxxpooexpooedt ml 1111111111 If mouse is connected value returned 00 1 is as follows 401 10111 11 11111 if mouse connected bit t1 1 m1 0 if tablet connected bit t1 0 m1 1 note bits t1 and m1 cannot simultaneously be zero In case of error nothing connected other device or incorrect port value the driver returns 0 in register 401 If mouse tablet is actually connected the value in 40 1 cannot be zero In case of timeout the driver sets bit 31 in 42 1 and returns 0 40 1 MOUSE DATA is returned in register 42 1 as follows 421 Oxxxpooxi YoXoYsXs CMRLIX7X6X5X4 X3X2X1X0 Y7Y6Y5Y 4 Y3Y2Y 1 YO wman 4 x denotes don t care bits Yo Yover 1 when data exceeds 255 ffh Xover 1 when X data exceeds 255 ffn Ys
98. m patches cartridge specific game patches game results from the last game played and the XBAND on line newspapers BANDWIDTH and XBAND News The XBAND Video Game Modem contains a proprietary custom chip which provides all of the logic functions for the operation of the XBAND Video Game Modem and also the means for controlling the execution of plugged in cartridges Finally the XBAND Video Game Modem contains a special modem chip that provides low latency noise tolerant communications as well as special detection mechanisms for Call Waiting and other noise events This allows the modem to run at only 2400 bits per second transmitting a maximum of 4 bytes per frame 3 2 XBAND Network The XBAND Network is different than traditional on line systems If a player of a traditional on line service wishes to play a game with another person the player must be connected to the service s Server for the duration of the game With XBAND players are only connected to the XBAND Server for small percentage of their connect time resulting in a lower cost and lower latency connection typically less than 50 msec end to end When XBAND player wishes to play against another person the player s XBAND Video Game Modem connects to the XBAND Server During the brief connection to the XBAND Server typically between 10 seconds and a minute the XBAND Video Game Modem uploads the player s phone number any outgoing mail the player might
99. me type of prot fig 85 V_INT 0 differentiate HINT and V_INT timing by using H_BLK HV counter the It is possible distinguish between the INT during data reception and the H and V that pass as the INT during data reception by analyzing the receive flag Try to think of other solutions by using IET and IE2 settings within the VDP register CONFIDENTIAL 106 PROPERTY OF SEGA Addendum 4 Regarding the DMA When using other than FZ VRAA and VRAM COPY use the onain method to program 1 Send bus request to the 280 2 Base the DMA destination address set section in RAM 3 Rewrite the one leading word of data after the er 1 and 2 are used all cases except FILL VRAM MRAM COPY 3 is used for WRAM to VRAM WRAM to COLOR RAM ei ll Compatibility with the MKIII Mode registers 11 through 23 cannot be un ess bit 2 of register 1 is not set to 1 Registers 11 througty 23 ere masked for mode s error trapping purposes MKIII uses regist The Genesis mode The registers are irs 0 through 10 is active when register 1 s bit2 1 10 0 0n power up IV Warnings Regarding Use of Back Up RAM 4818 is unformatted when the cartridge product is make sure to initialize during power up In most cases RAM data is cleared with FF at the factory however don t as a matter of fact fi this does not occur frequently t
100. mode Operator 1 frequency is in A2 and AGH Operator 28 frequency is in AB and ACH Operator 3 s frequency is in A9 and ADH Operator 4 s frequency is in AA and AEH frequency is 14 04 number that should be set high byte low byte then The highest 3 bits called the block give the octave The next 10 bits give the octavi and a possible 12 tone sequence is Low 617 653 692 733 77741 in base 10 872 924 979 1037 1099 High 1164 This sequence should be used Inside each Feedback is tng egree to which op rator 1 feeds back into itself In the voice library self feedback is represented as this is type of inter operator connection used Please see the list of the eight zs Register contains stereo output control and LFO sensitivity control L Left output 1 is on 0 is off R Rightoutput 1 is on 0 is off Note The stereo may only be heard by headphones Genesis Sound Sotware Manual February 21 1982 Page 16 CONFIDENTIAL 106 PROPERTY OF SEGA AMS amplitude modulation sensitivity and FMS frequency modulation sensitivity are the degree to which the channel is affected by the LFO If the LFO is disabled this register need not be set Additionally amplitude modulation is also enabled on an operator by operator level es 21315151517 255 TEST PROGRAM
101. not both One of the game machines can determine the initial seed by any means you wish and then it will transmit to the other game machine DON T Don t scatter random number functions throughout your code Call to a central routine Don t implement an irreproducible random number sequence For example reading the HV Counter or using whatever register DO s value happens to be upon entry to the VBI routine are both no no s Don t call the random number generator from more than one thread of execution e g from both the main game loop and the VBI routine VBI will occur at an unpredictable point in the main game loop If the random number generator is being called or the seed is being updated in both threads of execution the sequence in which it is being called will be unpredictable 52 Cartridge RAM Usage DO Provide a mode whereby the current contents of the battery backed cartridge RAM on your cart are not utilized by the game logic Carefui Make sure that in this mode none of the game logic considers the value of the RAM Don t leave stray references to the battery backed RAM in your code for modes that supposedly don t consider the RAM e g Exhibition mode in sports games Such stray references result in subtle synchronization bugs that only come up when one player has a particular value in the RAM and the other player does not They are a hassle to track down 53 Sega Genesis
102. ns Sprites 1x 1 Char up to 4 x 4 chars Up to 80 sprites can be defined Up to 20 sprites displayed on a scan line Sprite priorities Character Definitions 4 bits pixel points to color register 4 bytes scanline of char 32 bytes for complete char definition Playfield and sprite chars are the same COLOR Uses CRAM part of the VDP 64 9 bit wide color registers 64 colors out of 512 possible colors 3 bits of Red 8 bits of Green 8 bits of Blue 4 palettes of 16 colors Oth color palette is always transparent OTHER Removes the 68000 from the BUS lt move 205 bytes scanline during VBLANK There 36 during VBLANK 7380 bytes during VBLANK al amp Vertical Interrupts chip Yamaha YM 2612 6 Channel stereo 280 can access ROM data 8 KBytes RAM SWAGENESIS MANUAL CONFIDENTIAL 8106 PROPERTY OF SEGA HARDWARE o 2 Controllers Joypad 3 Buttons Start button 41 External port 2 Video outs RF amp RGB Audio jack stereo Volume control for audio jack SWGENESS MANUAL Rec CONFIDENTIAL 106 PROPERTY OF SEGA MEMORY M A Mega Drive 16 Mode Ka 1 68K MEMORY MAP 280 MEMORY PP 5 gt 8 315 5313
103. or either player to gain access to critical controls without the other player interfering Don t create a situation where one player who is faster at pushing buttons can prevent another player from accessing an important control screen Have a reasonable time out for every screen so that players don t tie up the game indefinitely Don t create a situation where both players are required to push a button for the game to continue One player may deliberately try to delay the game just to be obnoxious Also sometimes players are out of the room when the game starts up which means they forfeit It is fair that one player should be able to play the game from beginning to end if the other player is not there 6 2 Tournament Mode Provide a tournament mode which has locked game play options e g fixed game duration secret power up codes disabled battery backed cartridge RAM disabled etc Don t leave it up to the players to amicably agree on settings for modem play Decide on what is an appropriate tournament configuration and lock it down Make sure any options that should be available during a tournament should be settable by team Don t provide options that affect both teams in tournament mode The players will literally go back and forth fighting over the option screen If options can t be settable by team then lock it down to a fixed setting 63 Non gameplay Features during Gameplay Provide reasonable limits to non gameplay
104. p Guiput as a replacement for channel 6 The only channel 6 register that aff te the DAC is the stereo output portion of Register Registers 90 single operator registers Please see page 8 for how the twelve channel operator combinations artanged and MUL multiple relate the operator s frequency to the overall frequency from 0 to 15 and multiplies the overall frequency with the exception that 0 results in multiplication by 1 2 That is MUL 0 to 15 gives x 1 2 x 1 x 2 x 15 DT gives small variations from the overall frequency x MUL The MSB of DT1 is a primitive sign bit and the two LSBs are magnitude bits See the next page for a diagram Genesis Sound Sofware Manual February 21 1992 CONFIDENTIAL 106 PROPERTY OF SEGA MULTIPLICATIVE EFFECT D 6 004 deve o r ofaa 3 e No change xe 5 air SR TL total level represents the envelope s highest amplitude smallest A change of one unit is about 0 75 dB he largest and 127 the make note softer only change the TL of the sioti operators Changing the other operators will affect the flavor of the note Register 0H contains RS rate scaling amplitude rise shown on page 4 AR is the steepness of the initial RS affects AR
105. pport ve Date 9 9 91 Re Problems during sound access Sound output stops during a game Problem The busy flag was read in the FM sound like this address 4001h 3 perator YM2616 CS RD WR A1 A0 0 0 1 0 1 However in the case of the YM2 regulated according to the conditions set the device being read as not busy outputing sound Ne it s output is not This results Consequence ends up Fix When the FM sound generator s busy flag is read do not access anything else other 4 A1 A0 0 0 4 address 40008 CONFIDENTIAL 7 PROPERTY UF SECA SEGA OF AMERICA INC Consumer Products Division SIS TECHN Developers and Third Parties From Mac Senour Technical support Me Date 9 9 91 Re Problems with repeated resets The software seems to go out of control whem resets are repeated The Problem When the reset occurs the CPU ij set however the VDP is not When the reset occurs during the VDP continues the DMA The VDP is accesse If this is done while the VDP is execut is ineffective The Fix Before accessing the VDP initialization program ICD BLK4 check the DMA BUSY status fi If a DMA is being executed do not attempt to itcess th VDP If the problem persists at you are not executing a DMA right after a reset Retvogg figs CA 51065
106. r Products Division JENES ICAL To Project Managers Developers and Third Parties From Mac Senour Technical Support Specialist Date November 26 1990 Re Cartridge identification Every product must have at location 100h an IDTABLE Th e table is slightly different for each type of developer difference is small affecting the product code the copyright both important for product approval Please the following pages in your Sega Software Manual 5 573 Forbes Blvd P O 2167 San Francisco CA 94080 415 742 9300 FAX 415 742 0516 CONFIDENTIAL 106 PROPERTY OF SEGA UHR HO OO SEGA GENESIS CARTRIDGE ID TABLE STANDARD FORMAT FOR SEGA OF AMERICA NOV 26 1990 SEGA OF AMERICA m IEXUOUOOOOOOLOIOOOOOOOOR Check sum equ 0000 ORG 0100 SEGA GENESIS 100 C SEGA 199X XXX 10 release year your game tile 3120 Japan your game title dc w check sum dc b J y 7190 controller 4 1 00000000 0007ffff 00ffQ0000 ffff dc b ALBO dc b t ico dc b 4 2100 dc b dc b U 21 0 CONFIDENTIAL 106 PROPERTY OF SEGA MK XXXX XX 3180 product version 1a0 SEGA GENESIS CARTRIDGE ID TABLE STANDARD FORMAT FOR THIRD PARTIES NOV 26 199
107. rall or in a two cell unit can be selected Also the scroll screen size can be changed on a basis of a 32 cell unit SCROLL SCREEN EFFECTIVE DISPLAY SCREEN GENESIS MANUAL pup CONFIDENTIAL 106 PROPERTY OF SEGA For the scrolling screen display the following register setting and VRAM are required Scroll Name Table Base Address m o ows 8 Scroll B Pattern Name Table Base Address Rogister 4 9 sew sei Mode Set Register 3 OTT Set Register 4 Register 12 H Scroll Data Table Register 13 Scroll Size Register 16 VRAM Scroll Table Max 8 Kbyte Scroll Name Table Max 8 Kbyte Scrol Data Table Max 960 byte 8 0 Data Table Max 80 byte SWGENESIS MANUAL fev 022092 CONFIDENTIAL 106 PROPERTY OF SEGA 1 SCROLLING SCREEN SIZE The screen size can be set by VSZ1 520 HSZ1 and 520 Register 16 The following six kinds can be set for both Scroll Screens A and B 32 32 32 64 32 128 64 32 64 64 128 32 vszi Function D 1 1 1 Scroll Screen s Pattern Name Table Address exits in the VRAM and is designated by Registers 2 and 4 Depending and Scroll Screen correspond to eac
108. rovide adequate responsiveness There are two approaches to handling this situation a sample the controllers each VBI but create a data structure that reflects the controller behavior through the duration of the game loop e g Up on 2nd frame A and Right on 3rd frame then feed this data structure all at once into the next game loop This data structure rather than raw controller data will be transmitted to the other game machine once per game loop This is the preferred method b sample the controllers each VBI but only feed in the updated controller information at predictable points in the main game loop For example if you have 16 objects on the screen that are updated in sequence in the main game loop and it typically takes 8 frame times to update them all feed in each new controller value after every two objects are updated Take 9 care to design your code such that the game loop is not usually held up waiting for VBI There are a number of other subtleties that must be considered since we can t be certain that both game machines will have the same number of per game loop Overall this is a doable but tricky solution to the problem DON T Don tsample the controllers asynchronously to the main game loop and feed in their values at unpredictable points It is critical that both machines utilize the same controller data for the same game logic Since VBI will occur at unpredictable points in
109. roximately the same moment as VBI it may complete before VBI on one machine but after VBI on the other machine This can create a situation where the two machines will count a different number of VBls resulting in differing game execution game cartridge itself can introduce variances Many games today have battery backed cartridge RAM that they use for storing results from previous games If these results affect game play as is often the case with sports games there will be varying execution between the two cartridges It isn t a reasonable solution to just erase the RAM or update both with the same values Very often the information stored in the RAM is of great importance to the game player e g hard earned stats etc So the game must have a mode of execution where the RAM status is disregarded In some situations there is more than one release of the same game cartridge For example NBA JAM for Sega Genesis had two releases and there were significant differences in the code e g one of the basketball players was changed and some of the timings were changed between the two releases A separate Game Patch had to be developed for each version to reconcile the execution differences so that a Rev 1 could play against a Rev 2 and stay in sync Finally there is occasionally code that samples player reaction time so precisely that the exact same timing cannot be reproduced on both machines For example 5 game m
110. s documented in the Software Manual on page 19 Address 5 5 Image Buffer V Cell Size VCS0 4 Specifies the number of vertical cells MINUS ONE in the image buffer ie To get a buffer twelve cells tall you would store an eleven Trace Vector Info All Vector Values have fractional parts Start Position Has three bits of fractional data ie The Position one is represented by a value of 8 Deltas Has 11 bits of fractional data ie To get a step of one pixel 0800 would be used Hope this helps Jerry Bennett V you live any yuestiony give me a at 818 774 0600 2592 222 28 MOM
111. second call Register 18 O00H 10H Window from the top end to the 16th cell WINDOW 5 SCROLL 2 DISPLAY SCREEN Register 17 80H 02H Window from the left end 4th cell 18 the right end Register 18 80H 01H Window fromthe 2nd the bottom end WINDOW DISPLAY SCREEN 40 X 28 CELL MODE SWGENCSIS MANUAL Pes CONFIDENTIAL 106 PROPERTY OF SEGA Register 17 80H 01H Window from the 4th cell to the right end Register 18 00H 10H Window from the top end 10 the 16th cell WINDOW 15 SCROLL 7 DISPLAY SCREEN 40 X 28 CELL MODE Register 417 00H 02H Window to the 4th call from the lett Register 18 80 01 Window from the 2nd to the bottom end WINDOW DISPLAY SCREEN 40 X 28 CELL MODE SWGENESIS MANUAL pu 49 CONFIDENTIAL 106 PROPERTY OF SEGA 2 WINDOW PRIORITY Window Priority is handled in the same way as in Scroll A Scroll A is not displayed in the area where Window is displayed Aiso only when Window is set to the left and Scroll A is moved in direction the character corresponding to two cells on the right side of the boundary between Window and Scroll A will be disfigured There will be no malfunctioning when Window is set to the left side and Scroll A is moved only in the V direction also when Window is set to the right side WINDOW SCROLLA 4 Th
112. sented by the above and angles and a few supplementary registers Used in the above diagram are TL Total lovey jst amplitude of waveform AR Attack rate the angle of initial amplitude increase This can be made very steep if desired The problem with slow attack rates is that if the notes are short the release faled vay bd before the note has reached a reasonable level RR The final angle of amplitude decrease after key off Additional registers are RS Rate scaling the degree to which envelopes become shorter as frequencies become higher For example high notes on a piano fade much more quickly than low notes Genesis Sound Software Manual February 21 1982 CONFIDENTIAL 106 PROPERTY OF SEGA Amplitude Modulation enable whether or not this operator will allow itself to be modified by the Changing the amplitude of the slots changes the loudness of the note changing the amplitude of the other operators changes its flavor SSG EG A proprietary register whose usage is unknown It should be set to zero The FM 2612 may be accessed from either the 68000 or the 2 80 In both cases however the bus is only 8 bits wide The FM 2612 is accessed through memory locations 4000H 4003H in the 280 case 04000 A04003H in the 68000 case These will be referred to as 4000 to 4003 The internal registers of the 2612 are divided as follows PARTI 21H LFO TIMERS
113. splay are as follows OUTPUT LEVEL R OUTPUT GAB are the samo as R STATUS OF SHADOW ROUTPUT 2 G88 are the as R TATUS OF HIGHRIGHT ROUTPUT GAB are the same as R SWGENESIS MANUAL Res 022002 CONFIDENTIAL 106 PROPERTY OF SEGA INTERLACE MODE Raster Scan Mode can be changed by setting LSMO and LSM1 RGB 12 ono the same pater is displayed the rasters of even and odd numbered flos intedaco 1 In the interlace mode he diferent pater is displayed the rasters of even and odd numbered fles intedaco 2 the interlace mode and Interlace 1 one cell is defined 8 8 dots in Interlace 2 8x16 dots For Display one cell consists of 8x8 dots inthe mode and in the interlace mode 8x16 dots any case number of calls in one screen are the sami Depending on the type of display the cas liotnteriace display there may occur a Serious blur in the vertical direction Therefore Wii using the display pay careful attention in this regard CONFIDENTIAL 106 PROPERTY OF SEGA 0 1 3 4 t 6 INTERLACE 2 o 4 1 1 5 7 SWGENESIS MANUAL puro CONFIDENTIAL
114. t 1 Reverse H Reverse Bit 1 Reverse into Aene Sprite Pattern Generator Number Ge poti SWGENESIS MANUAL ev CONFIDENTIAL 106 PROPERTY OF SEGA 55 Ty Xt wi 422 het SWGENESS MANUAL fes cocos CONFIDENTIAL Made 2 one cell is comprised of 8 16 dots therefore the times as compared to Interlace Mode 1 106 PROPERTY OF SEGA SWGENESS MANUAL 977 CONFIDENTIAL 106 PROPERTY OF SEGA 4 SPRITE s DISPLAY CAPACITY The number of Sprite s maximum display varies depending on H resolution setting Resolution of Display No of Display per Line Display Dot per Line Max 16 Spies 256 dots CELI Sprite is displayed in the sequential order of Priority Example With H size 1 cell when 30 Sprites are intended to be dispiaye Same line up to 16 Sprites counting from the one having highest priority iti the H32 mode and 20 Sprites in the H40 cell mode can be displayed due to the limitation of display per line With H size 4 cells when 16 Sprites are intended 10 up to 8 Sprites counting from the one having the modo and 10 Sprites in the H40 cell mode can be Display dots With H size cells when 16 Sprites are intended to b displayed in the
115. t be displayed SWGENESIS MANUAL ev CONFIDENTIAL 106 PROPERTY OF SEGA SIEN 1 Sprite Color Palette 3 Color Code 14 S WGENESIS MANUAL CONFIDENTIAL 106 PROPERTY OF SEGA When SPRITE is not related to PRIORITY the following PRIORITY applies 0 9 0 1 Ant Bet 0 8 4 0 0 B 0 Bat 8 1 STATUS OF SHADOW swaeness MANUAL pur A CONFIDENTIAL 106 PROPERTY OF SEGA COLOR PALETTE dot is comprised of 4 bits and can designate the 0 15 colors Also 0 3 color palette can be designated by Scroll screen on a cell basis and by each Sprite CRAM data are as follows Since each of R G and B has 3 bits colors can be freely selected 512 colors DATA The relationships between CRAM address palette and color code as follows However in the case of each palette s color code 0 the color for the Scroll Scroll Window and Sprite is See Through irrespective of RBG designation 5 1 Same as Palotie 0 13 For 14 and 15 rator i Prionty SRGENESSS MANUAL cogna CONFIDENTIAL 106 PROPERTY OF SEGA bit and di
116. ter Overview Envelope Specification Part 1 Memory Map Test Program PROGRAMMABLE SOUND GENERATOR Tone Generator Frequen Noise Generator Control Attenuators This supplementary index was provided to allow direct access to the content on this PDF It was not included in the orginal document CONFIDENTIAL 106 PROPERTY OF SEGA 1 280 MAPPING 280 We show the memory at right VO is contained in memory map 1 Program Area 280 ADDRESS Program data and scratch are in 0 to in S RAM 2 BANK From 8000H FFFFH is window of 68K memory 2 80 can access of 68K memory by BANK 27 switching BANK select data um create 68K address from A15 to A23 You must write these VM BANK 9 bits one at a time into 6000H D rey SELECT serially byte units 7F11 using 4 3 3 Ferr ES BANK AREA 3 89 4000H ij 4001H 002 2 register select Channel 4 6 2 DATA register select Channel 1 3 DATA P G address is B Interrupt 2 80 gets the only VIDEO vertical interrupt This interrupt is generated 16ms period and 64ms length Genesis Sound Software Manual February 21 1992 Page 1 CONFIDENTIAL 106 PROPERTY OF SEGA 68K CONTROL OF 2 80 280 Start Up 2 80 Operation Sequence BUS REQ ON BUS RESET OFF 68K copies program into 2 80 S R
117. the game loop controller values that are sampled at VBI and immediately fed into the game loop may result in differing game logic between the two game machines 55 Game Loop Duration and Game Logic Game loops typically are longer than one VBI in duration Unfortunately it is often very difficult to predict how many VBls of duration a particular game loop will take and in fact for the execution reasons mentioned above it is quite possible that the two game machines may take a different number of 1 to execute the same game loop code Also there are situations when the game logic execution is the same on both machines but the display code execution is vastly different Point of view games such as racing games that are split screen when played on a single video game machine can be full screen on each game machine when played on XBAND The game logic is the same since the state of both players is updated on both machines but the display code for each player s point of view could be vastly different Consequently the execution time per game loop on each machine can be different If you can predict the number of VBIs that will elapse in your game loop easily ie both machines can determine in advance the worst case number of frames per a given game loop that simplifies the synchronization problem significantly But if you can t don t feel bad most games can t and you need to consider the number of elapsed 1 in your game logic
118. ulting in a more complex Waveform These operators may be arranged in eight different configurations called algorithras Following is a diagram of the algorithms Genesis Sound Software Manual E February 21 1992 CONFIDENTIAL 106 PROPERTY OF SEGA ALGORITHM 0 1 2 2 1 JG a 3 I I x T T T T 6 s Bl SLOTS ARE INDICATED BY SHADING Algorithm 0 distortion guitar high h t chopper 7 bass Algorithm 1 harp PSG Programmable Sound Generator sound Algorithm 2 Bass electric guitar brass piano woods Algorithm 3 strings folk chimes Algorithm 4 flute bells Chorus bass drum snare drum tom tom Algorith S brass organ Algorittin 6 xylophone tom tom organ vibraphone snare drum base drum Algatilhre 7 pipe organ Genesis Sound Sotware Manual February 21 1992 Page 6 CONFIDENTIAL 106 PROPERTY OF SEGA REGISTER OVERVIEW The system is controlled by means of a large number of registers General system registers are timer values and status software use LFO enable and frequency to distort the FM channels DAC enable and amplitude output enables for each of the six FM channels number of frequencies to be used in FM channels
119. us from a 68000 main non interrupt routine If the following routine was executed and an interrupt occurred between step 2 and 3 data error would occur IF the interrupt also access the 280 bus 1 Send Z80 bus request 2 Check acknowledge 3 Writing data to 280 bus 4 Release 280 bus Essentially the main routine sends bus request but before it can conduct it s data transfer the interrupt sends it s own bus request When the interrupt completes it releases the 280 bus it should Unfortunately the main routine xpects the bus to be available thus an error occ rs When this error occurs the 280 RAM is corrupted One symptomiof this error is a sound is SOMETIMES interrupted IT The solution is really quite simple before step one above disable inti ts sable interrupts NE 22 CONFIDENTIAL 106 PROPERTY OF SEGA SEGA SEGA OF AMERICA INC Consumer Products Division 1515 TECHNI Developers and Third Parties From Mac Senour R amp D Technical Support September 7 1990 Re Reading the controller pads When reading a location within the range of 5 10000 5 100 which includes the controller pads the 280 must have a bus request If not the wait state will change from 25005 to 110ns The shorter time will cause the 280 to misread ALL further data Once the ports have been read the 280 may be released Included with this bulletin is a reprint of the routine that
120. xd Ready Interrupt Allowed SWGENESIS MANUAL pups CONFIDENTIAL 106 75 PROPERTY OF SEGA SWGENESIS MANUAL Pes cage MEMORY MODE The Mega Drive is able to generate internally the Refresh signal for the D RAM evelopment cartridge When using the development cartridge set to D RAM mode In the case of a production cartridge set to ROM mode Only 08 of address A11000 is effective and for Write only A11000 08 0 ROM mode 1 D RAM mode Access to A11000 can be based on byte D Z80 CONTROL 1 280 BusReq When accessing the 280 memory from the 68000 first stofiithe 28 ising BusRea At the time of power on reset the 68000 has access 10 bus A11100 08 0 BusReq cancel 1 BusReq request CPU function stop accessible unctioning Access to 280 area in the following manner Write 0100 A11100 by using a Word access b Check to see that 08 of 5434100 becomes 0 C Access to 280 area d Write 0000 in SAY 10 by using a Word access also 280 The 280 is automatically reset during the Mega The Drive harg s poer reset sequence 18 A11100 can also be based on byte 76 CONFIDENTIAL 106 PROPERTY OF SEGA 280 AREA Mapping is performed starting from 500000 for 280 a sub CPU As viewed from 68000 the memory map will be as follows SWOENESIS MANUAL ev s4020
121. xecution bus request 8 executed within errupt routine for the purpose of the controller request ls cleared within the Interrupt to main routine data to 280 area D 2 339 8 e 5 7 2 principle the 280 8 laft with the 280 bus request in effect o this exemple tls cleared in step 5 When this occurs the folowing things occur Tha RAM of the 280 gets damaged hon Af forth problem Disable intemupts prior to step 1 2 Problems during sound a cess 7 Sound output stops during the game Diagnosis of the problem The busy flag wat read in the FM sound generator YM2612 lke this address 4001H accessed 2 Drive Howden tho core ofthe YVOST2 ts output isnot regulated according tothe Gbove This resuifs in the device being read ot ol Bay red os AL AD 0 0 Mega Drive address 4000H CONFIDENTIAL 106 PROPERTY OF SEGA When tn sound generators busy ls raad do not access ening other 9 Repeated Resets 1 The software out of control when resets are repeated 5 Diagnosis of the problem 7 When the reset occurs the CPU reset however the VDP not reset When the reset occurs OMA the VDP the LOMA ight ofa ho rasat he whle the VDP executing
122. xed in frequency It is a crystal controlled oscillator signal connected to the PSG When NF1 NFO is 11 Tone Generator 3 supplies the noise clock source This allows the noise to be swept in frequency This effect might be used for a jet engine funus for example load these noise generator control bits write the following byte to port 7 Ts opo Attenuators Four noise attenuators adjust the volume of th three Generators and the noise channel Four bits A3 A2 A1 A0 control the attenutatiofi as follows A3 A2 1 A0 Attenuation 9 db maximum 2 db Note high attenuation results in a quieter sound 4db 8db 84 10 12 1480 16 db 18 db 20db 22 db 24db 26 db 28 db on 9 0 0 0 1 1 1 4 0 20 0 1 1 9 1 1 9 5 1 oio Genesis Sound Sofware Manual February 21 1992 CONFIDENTIAL 106 PROPERTY OFSEGA attenuators set for the four channels by writing the following bytes to location 57 EXAMPLE When the Mk3 is powered on the following code is executed LD HLCLRTB i clear table LD CPSG_PRT psg port is 7F LD B4 1 load four bytes CLATB 59 SBF SOF SFF This code turns the four sound channels of i s a goodea to 8 execute this code when the PAUSE button is pressed so that the
123. y in an area as broad and subjective as thematic nt Fe is reason these standards of guidance should be one of common sense practicality and prevailing public taste STANDARD POL CONFIDENTIAL 106 PROPERTY OF SEGA Revised 01 03 91 INITIAL DISPLAY A TITLE DISPLAY A STANDARD POL The trademark SEGA TM shall be displayed in the center of screen Logo code will provided by SEGA Check the control pad s while SEGA logo is displayed If no control pad is connected or only the 2P control pad is connected make the loop as follows SEGA logo Title Demo SEGA logo While no button is pressed If the START button on either controller is pressed the game title should be displayed If the Player 1 controller is connected a button press vill exit from the Logo to the title ahould xit the title Display the title sequence amd the text PUSH START BUTTON If any button on either ontroller is pressed at this point the start option Select screen shall appear Copyright marking ser can exit via any button but can not bypass altogether PE original software the year of publication Copyright holder eig 91990 SEGA software e g 91987 TEKKON gt PROGRAMMED GAME 1990 SEGA required by contract the title sequence the screen automatically the demonstration mode within
Download Pdf Manuals
Related Search
Related Contents
Samsung PS51D6900DS manual de utilizador ご使用の前にこの取扱説明書(セットアップ編) と別冊の取扱説明書 image Manual-1961 - HP Archive TITANIUM OIL TEMP GAUGE - Harley ŠKODA Octavia ISTRUZIONI PER L`USO Continental Platinum CP42149 User's Manual Télécharger le PDF National Instruments PCI-1200 User's Manual www.reducvin.com Copyright © All rights reserved.
Failed to retrieve file