Advertisement
Nightseeker

Sega Channel BIOS (US)Demo Cartridge 1 c ode

Jun 9th, 2020
1,270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 6.80 KB | None | 0 0
  1. Sega_Channel_Demo_Cart_1-Sega_Channel-globals.c
  2. /****************************************************************************
  3. *                                                                           *
  4. *              Project: SEGA CHANNEL                                        *
  5. *                                                                           *
  6. *               Module: GLOBALS.C                                           *
  7. *                                                                           *
  8. * Module Creation Date: October 1993                                        *
  9. *                                                                           *
  10. *               Author: J. Fort                                             *
  11. *                                                                           *
  12. *   Development System: Sierra C 3.0                                        *
  13. *                                                                           *
  14. *    Copyright (c)1993 Pacific SoftScape Inc.                               *
  15. *                                                                           *
  16. ****************************************************************************/
  17.  
  18. #include <stdio.h>
  19. #include "genesis.h"
  20. #include "actor.h"
  21. #include "objeng.h"
  22.  
  23.  
  24. const INIT_REGISTERS ResetRegisters =
  25. {
  26.     0x06,               /*         ModeSet1: disable H int, stop H&V ctrs */
  27.     0x64,               /*         ModeSet2: enable display, enable V int */
  28.     0x30,               /* PatternBaseAddrA: @ $C000 */
  29.     0x30,               /* PatternBaseAddrW: @ $C000 */
  30.     0x07,               /* PatternBaseAddrB: @ $e000 */
  31.     0x5e,               /*      SatBaseAddr: @ $bc00 */
  32.     0x00,               /*          BkColor: color zero */
  33.     0x00,               /*             HInt:    */
  34. #ifdef  _DEBUG
  35.     0x08,               /*         ModeSet3: enable ext int, full scroll */
  36. #else
  37.     0x08,               /*         ModeSet3: full scroll */
  38. #endif
  39.     0x81,               /*         ModeSet4: h 40 cell mode */
  40.     0x00,               /*      HScrollAddr: @ $0000 */
  41.     0x02,               /*    AutoIncrement: 2 */
  42.     0x11,               /*       ScrollSize: 64 x 64 maps */
  43.     0x00,               /*       WindowHpos:    */
  44.     0x00,               /*       WindowVpos:    */
  45. };
  46.  
  47.  
  48. /***************************************************************************
  49.   FUNCTION:     Stub -- do nothing
  50.   DESCRIPTION:  .
  51.   RETURNS:      .
  52.   PARAMETERS:   .
  53.   SIDE EFFECTS: .
  54.   REVISIONS:    10/93   -jf-
  55. ****************************************************************************/
  56. void Stub(void)
  57. {
  58. }
  59.  
  60.  
  61.  
  62. HERO    Hero;
  63. OBJECT  object[MAX_OBJECTS];
  64.  
  65. DWORD   WorldXpos;                  /* 16:16 fixed point world position */
  66. DWORD   WorldYpos;                  /* 16:16 fixed point world position */
  67.  
  68. WORD    MinWorldX,MaxWorldX;        /* world X limits */
  69. WORD    MinWorldY,MaxWorldY;        /* world Y limits */
  70.  
  71. WORD    CurrentSequence;            /* All purpose sequence counter */
  72. void    *pSubmenu;                  /* Pointer to submenu */
  73.  
  74. WORD    GameFlags;                  /* Where ICON's get thier data from */
  75.  
  76. BYTE    BackdropRate;               /* Where we ALWAYS get our backdrop reload from */
  77.  
  78.  
  79. Sega_Channel_Demo_Cart_1-GenLost-unknown1
  80.                 MEMORY
  81.                 {
  82.                         rom:  ORG(0x000000) LEN(0x100000)
  83.                         ram:  ORG(0xff0000) LEN(0x010000)
  84.                 }
  85.                 SECTIONS
  86.                 {
  87.                         .text: {} > rom
  88.                         .art: ORG(0x10000) {} > rom
  89.                         .sound: {} > rom
  90.                         .abs: {} > ram
  91.                         .bss: ORG(0xff8000) {} > ram
  92.                 }
  93.  
  94.  
  95. Sega_Channel_Demo_Cart_1-Sega_Channel-header
  96. .opt    proc=68000
  97.     .file   "..\c\header.c"
  98.     .def    BYTE\   .scl    13\ .type   0xc\    .endef
  99.     .def    WORD\   .scl    13\ .type   0xd\    .endef
  100.     .def    DWORD\  .scl    13\ .type   0xf\    .endef
  101.     .def    tagGENESIS_HEADER\  .scl    10\ .type   0x8\    .size   256\    .endef
  102.     .def    System\ .val    0\  .scl    8\  .type   0x32\   .line   23\ .size   16\ .dim    16\ .endef
  103.     .def    ReleaseYearMonth\   .val    16\ .scl    8\  .type   0x32\   .line   24\ .size   16\ .dim    16\ .endef
  104.     .def    GameNameDomestic\   .val    32\ .scl    8\  .type   0x32\   .line   25\ .size   48\ .dim    48\ .endef
  105.     .def    GameNameOverseas\   .val    80\ .scl    8\  .type   0x32\   .line   26\ .size   48\ .dim    48\ .endef
  106.     .def    ProductNumVersion\  .val    128\    .scl    8\  .type   0x32\   .line   27\ .size   14\ .dim    14\ .endef
  107.     .def    CheckSum\   .val    142\    .scl    8\  .type   0xd\    .endef
  108.     .def    IOusage\    .val    144\    .scl    8\  .type   0x32\   .line   29\ .size   16\ .dim    16\ .endef
  109.     .def    RomStart\   .val    160\    .scl    8\  .type   0xf\    .endef
  110.     .def    RomEnd\ .val    164\    .scl    8\  .type   0xf\    .endef
  111.     .def    RamStart\   .val    168\    .scl    8\  .type   0xf\    .endef
  112.     .def    RamEnd\ .val    172\    .scl    8\  .type   0xf\    .endef
  113.     .def    ExternalRam\    .val    176\    .scl    8\  .type   0x32\   .line   32\ .size   12\ .dim    12\ .endef
  114.     .def    ModemData\  .val    188\    .scl    8\  .type   0x32\   .line   33\ .size   12\ .dim    12\ .endef
  115.     .def    Memo\   .val    200\    .scl    8\  .type   0x32\   .line   34\ .size   40\ .dim    40\ .endef
  116.     .def    Country\    .val    240\    .scl    8\  .type   0x32\   .line   35\ .size   16\ .dim    16\ .endef
  117.     .def    .eos\   .val    256\    .scl    102\    .size   256\    .tag    tagGENESIS_HEADER\  .endef
  118.     .def    GENESIS_HEADER\ .scl    13\ .type   0x8\    .size   256\    .tag    tagGENESIS_HEADER\  .endef
  119.     .def    tagINIT_REGISTERS\  .scl    10\ .type   0x8\    .size   15\ .endef
  120.     .def    ModeSet1\   .val    0\  .scl    8\  .type   0xc\    .endef
  121.     .def    ModeSet2\   .val    1\  .scl    8\  .type   0xc\    .endef
  122.     .def    PatternBaseAddrA\   .val    2\  .scl    8\  .type   0xc\    .endef
  123.     .def    PatternBaseAddrW\   .val    3\  .scl    8\  .type   0xc\    .endef
  124.     .def    PatternBaseAddrB\   .val    4\  .scl    8\  .type   0xc\    .endef
  125.     .def    SatBaseAddr\    .val    5\  .scl    8\  .type   0xc\    .endef
  126.     .def    BkColor\    .val    6\  .scl    8\  .type   0xc\    .endef
  127.     .def    HInt\   .val    7\  .scl    8\  .type   0xc\    .endef
  128.     .def    ModeSet3\   .val    8\  .scl    8\  .type   0xc\    .endef
  129.     .def    ModeSet4\   .val    9\  .scl    8\  .type   0xc\    .endef
  130.     .def    HScrollAddr\    .val    10\ .scl    8\  .type   0xc\    .endef
  131.     .def    AutoIncrement\  .val    11\ .scl    8\  .type   0xc\    .endef
  132.     .def    ScrollSize\ .val    12\ .scl    8\  .type   0xc\    .endef
  133.     .def    WindowHpos\ .val    13\ .scl    8\  .type   0xc\    .endef
  134.     .def    WindowVpos\ .val    14\ .scl    8\  .type   0xc\    .endef
  135.     .def    .eos\   .val    15\ .scl    102\    .size   15\ .tag    tagINIT_REGISTERS\  .endef
  136.     .def    INIT_REGISTERS\ .scl    13\ .type   0x8\    .size   15\ .tag    tagINIT_REGISTERS\  .endef
  137.     .text
  138.     .align  2
  139.     .globl  _header
  140. _header:
  141.     .byte   "SEGA GENESIS\0"
  142.     .space  3
  143.     .byte   "(C)T-XX 1994.JAN"
  144.     .byte   "Sega Channel    \0"
  145.     .space  31
  146.     .byte   "Sega Channel    \0"
  147.     .space  31
  148.     .byte   "GM T-000000 00"
  149.     .word   0x0
  150.     .byte   "J\0"
  151.     .space  14
  152.     .long   0x0
  153.     .long   0xfffff
  154.     .long   0xff0000
  155.     .long   0xffffff
  156.     .byte   "\0"
  157.     .space  11
  158.     .byte   "\0"
  159.     .space  11
  160.     .byte   "Developed by Pacific SoftScape Inc.\0"
  161.     .space  4
  162.     .byte   "JUE\0"
  163.     .space  12
  164.     .def    _header\    .val    _header\    .scl    2\  .type   0x8\    .size   256\    .tag    tagGENESIS_HEADER\  .endef
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement