+Lathe26 Posted February 18, 2019 Share Posted February 18, 2019 What are the recommended ways to create a Mattel-like green title screen in IntyBASIC? One way would be to manually re-create the title screen in IntyBASIC. Another option might be to somehow use the EXEC's built-in code, but then overwrite some of the hardcoded text such as "Mattel Electronics" (see http://wiki.intellivision.us/index.php?title=Hello_World_Tutorial). This has probably been answered elsewhere already but my Google-foo is failing me right now. Quote Link to comment Share on other sites More sharing options...
carlsson Posted February 18, 2019 Share Posted February 18, 2019 There is an example in the SDK called "classic" which I believe generates a such title screen. I don't think it is included with the standard IntyBASIC distribution though. Quote Link to comment Share on other sites More sharing options...
intvnut Posted February 18, 2019 Share Posted February 18, 2019 It's not really feasible to use the built-in EXEC title screen without some hackery to intybasic_prologue.asm. It's doable, but you'll get a more consistent result just coding up a classic title screen directly in IntyBASIC. I say "more consistent," as you won't have to deal with the Sears version of the title screen. Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted February 18, 2019 Share Posted February 18, 2019 What are the recommended ways to create a Mattel-like green title screen in IntyBASIC? One way would be to manually re-create the title screen in IntyBASIC. Another option might be to somehow use the EXEC's built-in code, but then overwrite some of the hardcoded text such as "Mattel Electronics" (see http://wiki.intellivision.us/index.php?title=Hello_World_Tutorial). This has probably been answered elsewhere already but my Google-foo is failing me right now. The IntyBASIC SDK includes one by default on every new project. There is also an example called "classic" that shows how to do it, but I do not know if nanochess includes it with the regular distribution. -dZ. Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted February 18, 2019 Share Posted February 18, 2019 Here's the code for "classic." It requires the "constants.bas" ' ========================================================================= ' IntyBASIC SDK Library: Title.bas ' Code automatically generated by INTYNEW. ' ------------------------------------------------------------------------- ' This code library generates a classic Mattel-style title screen for ' IntyBASIC program projects. The "TITLE" and "AUTHOR" values are ' taken from the input arguments to the INTYNEW utility. ' ========================================================================= ' ========================================================================= ' Define Constants ' ========================================================================= CONST TITLE_ROW = 6 ' Background row in which to print TITLE string CONST TITLE_LENGTH = 13 ' Length of TITLE string, in characters CONST TITLE_COLOR = CS_YELLOW ' Color of TITLE string CONST AUTHOR_ROW = 10 ' Background row in which to print AUTHOR string CONST AUTHOR_LENGTH = 6 ' Length of AUTHOR string, in characters CONST AUTHOR_COLOR = CS_WHITE ' Color of AUTHOR string (and copyright year) CONST COLOR_BAR_ROW = 1 ' Background row in which to display colored bars CONST BRAND_ROW = 3 ' Row in which to print the SDK brand and logo CONST BRAND_COLOR = CS_WHITE ' Color of SDK brand and logo CONST LOGO_COL = 16 ' Background colum in which to display SDK logo CONST LOGO_ROW = 2 ' Background row in which to display SDK logo CONST LOGO_X_OFFSET = 3 ' Fine position adjustment for logo in X CONST LOGO_Y_OFFSET = 6 ' Fine position adjustment for logo in Y CONST LOGO_COLOR = BRAND_COLOR ' Color of SDK logo CONST CARD_WIDTH = 8 ' Width of a background card, in pixels CONST CARD_HEIGHT = 8 ' Height of a background card, in pixels CONST DEBOUNCE_DELAY = 2 ' Number of cycles to detect button press CONST NO_KEY = 0 ' Represents no user input ' ========================================================================= ' Define Functions ' TextCenterPos(aLength, aRow) ' Computes the screen position in which to place a a string of a ' given length, in order to center it on a given row. ' ' Arguments: ' aLength: The length of the string, in characters ' aRow: The row in which to print the string ' ' SpritePosX(aColumn, anOffset) ' Computes the screen position of a sprite on the X axis, given ' a background column, with an additional displacement value. ' ' Arguments: ' aColumn: The background column to display the sprite ' anOffset: An additional horizontal displacement offset, ' in pixels. ' ' SpritePosY(aRow, anOffset) ' Computes the screen position of a sprite on the Y axis, given ' a background row, with an additional displacement value. ' ' Arguments: ' aRow: The background column to display the sprite ' anOffset: An additional vertical displacement offset, ' in pixels. ' ========================================================================= DEF FN TextCenterPos(aLength, aRow) = SCREENPOS((((BACKGROUND_COLUMNS - aLength) + 1) / 2), aRow) DEF FN SpritePosX(aColumn, anOffset) = ((aColumn + 1) * CARD_WIDTH ) + anOffset DEF FN SpritePosY(aRow, anOffset) = ((aRow + 1) * CARD_HEIGHT) + anOffset ' ============================ ' Draw Classic Title Screen ' ============================ ' Set Screen Mode to "Color Stack" and define the stack MODE SCREEN_COLOR_STACK, STACK_BROWN, STACK_BLACK, STACK_BROWN, STACK_BLACK BORDER BORDER_BROWN DEFINE DEF00,5,Graphics CLS ' Logo is a double-vertical resolution sprite SPRITE 0, SpritePosX(16, LOGO_X_OFFSET) + VISIBLE, SpritePosY(2, LOGO_Y_OFFSET) + ZOOMY2 + DOUBLEY, SPR00 + LOGO_COLOR + BEHIND SPRITE 1, SpritePosX(17, LOGO_X_OFFSET) + VISIBLE, SpritePosY(2, LOGO_Y_OFFSET) + ZOOMY2 + DOUBLEY, SPR02 + LOGO_COLOR + BEHIND WAIT ' Print classic colored bars ' - Vertical bars on left PRINT AT SCREENPOS( 2, COLOR_BAR_ROW) COLOR CS_WHITE, "\165" PRINT AT SCREENPOS( 4, COLOR_BAR_ROW) COLOR CS_YELLOW, "\165" PRINT AT SCREENPOS( 6, COLOR_BAR_ROW) COLOR CS_GREEN, "\165" PRINT AT SCREENPOS( 8, COLOR_BAR_ROW) COLOR CS_DARKGREEN, "\165" ' - Vertical bars on right PRINT AT SCREENPOS(11, COLOR_BAR_ROW) COLOR CS_TAN, "\164" PRINT AT SCREENPOS(13, COLOR_BAR_ROW) COLOR CS_RED, "\164" PRINT AT SCREENPOS(15, COLOR_BAR_ROW) COLOR CS_BLUE, "\164" PRINT AT SCREENPOS(17, COLOR_BAR_ROW) COLOR CS_BLACK, "\164" ' Print SDK brand and logo PRINT AT TextCenterPos(15, BRAND_ROW + 0) COLOR BRAND_COLOR, "IntyBASIC SDK" PRINT AT TextCenterPos( 8, BRAND_ROW + 1) COLOR BRAND_COLOR, "presents" ' Print project-specific information PRINT AT TextCenterPos(TITLE_LENGTH, TITLE_ROW) COLOR TITLE_COLOR, "Classic Title" PRINT AT TextCenterPos((AUTHOR_LENGTH + 6), AUTHOR_ROW) + 0, BG04 + AUTHOR_COLOR PRINT AT TextCenterPos((AUTHOR_LENGTH + 6), AUTHOR_ROW) + 1 COLOR AUTHOR_COLOR, "2015 Nobody" ' ============================ ' Wait For Any Key ' ============================ ' ------------------------------------------------------ ' First, we wait for the controller to be completely ' at rest, with no input, for DEBOUNCE_DELAY cycles. ' This ensures we will get a brand new key press. ' ------------------------------------------------------ Counter = 0 WHILE (Counter < DEBOUNCE_DELAY) WAIT IF (cont <> NO_KEY) THEN Counter = 0 ELSE Counter = Counter + 1 WEND ' ------------------------------------------------------ ' Then, we wait for a new controller key press. ' ------------------------------------------------------ WHILE (cont = NO_KEY) WAIT WEND ' ------------------------------------------------------ ' At this point we have a valid user input signal, so we ' could jump to an appropriate subroutine depending on ' the key pressed. In this case, we just wanted ' *any key* pressed, so we're done. ' ------------------------------------------------------ WAIT ResetSprite(0) ResetSprite(1) CLS ' Skip graphics and go to program code GOTO Main Graphics: ' SDK Logo - Left Side BITMAP "........" BITMAP "....#.#." BITMAP "....#.#." BITMAP "....####" BITMAP "...#####" BITMAP "...#####" BITMAP "..##.###" BITMAP "..######" BITMAP ".#######" BITMAP ".#######" BITMAP "#######." BITMAP "#.###..." BITMAP ".###...#" BITMAP "..##..##" BITMAP "......##" BITMAP "......##" ' SDK Logo - Right Side BITMAP "........" BITMAP "........" BITMAP "........" BITMAP "##......" BITMAP "..##...." BITMAP "##..#..." BITMAP "###..#.." BITMAP "####.#.." BITMAP "#####.#." BITMAP "#####.#." BITMAP "#####.#." BITMAP "#####.#." BITMAP "#####.##" BITMAP "#####.##" BITMAP "#####.##" BITMAP "#####.##" Copyright: ' Real Copyright Symbol BITMAP ".######." BITMAP "#......#" BITMAP "#..###.#" BITMAP "#.#....#" BITMAP "#.#....#" BITMAP "#..###.#" BITMAP "#......#" BITMAP ".######." Main: ' Continue normal code flow It produces this screen: Full project is here: classic.zip 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.