Jump to content
IGNORED

New Baseball game for the TI-99/4a


Opry99er

Recommended Posts

Been playing around with Strike Three!... It's a very nice LOOKING game... and it has some interesting points, but overall it is pretty blah as far as gameplay. Here are some screenshots I took while playing it in Classic99 (as a loaded User cartridge)

 

 

There's no denying that it looks good... I mean, probably the best presentation between Strike Three! and MBX Championship Baseball, but the gameplay is fairly weak. It feels more like an XB game than a cartridge game in assembly. I'm still on the warpath trying to get the original cartridge, however. =) It's quirky, cool, and rare.

 

Anyway, enjoy the pix... I thought this was as good a place as any to post them.

 

s31_zpsc03122e6.jpg

 

 

s32_zps30cdf37e.jpg

 

s33_zps008022c9.jpg

 

s34_zps55ae6ff1.jpg

Edited by Opry99er
Link to comment
Share on other sites

A lot of the later Databiotics games were really... well... cheap. "Black Hole" really pissed me off because it LOOKS like a Star Wars arcade clone in the screenshot but plays like a cheap Extended BASIC game with no animation.

 

Part of it was they were trying to fit the game in a classic 8k ROM chip, so they really didn't have a lot of dataspace to play with. But it really has a lack of interest in creating good games, or even unique ones. It just feels like someone throwing something together to make a little money. ($30 for these cartridges in the late 80's/early 90's was outright theft, mind you, for what you got...)

 

Adamantyr

Link to comment
Share on other sites

well... if I remember correctly, compiled programs have the ability to be put into cartridge format... Maybe Tursi can chime in on this...

 

If so, I can tell you right now that some of the compiled games that have been created would be amazing cartridge games... =) Put some of that mid-80s third party crap to shame!

 

I still REALLY want a Strike Three! cart though... =)

Edited by Opry99er
Link to comment
Share on other sites

Alright... Haven't had much time to work on the "vs." equations lately, been moving into a new house and it's been taking every second of my free time... But some ideas on weighting:

 

comparing OPS to WHIP...

 

The best career OPS (On-base percentage Plus Slugging) in history is still Babe Ruth with 1.164 ***As a clarification, the higher the OPS, the better

 

The best career WHIP leader by a starting pitcher (Walks plus Hits per Innings Pitched) in history is Addie Joss with a .968 ***As a clarification, the lower the WHIP, the better.

 

 

Assuming we start by just weighting these two against each other, let's make a couple assumptions... First, If Addie Joss (with a .968 WHIP) went against Babe Ruth (with a 1.164 OPS) a million times, we will assume that they would each succeed 500,000 times... making it a perfect even matchup. This will be our baseline for the equations going forward.

 

1.164 and .968 are both pretty near to "1", so if we wanted to, we could use 1 to 1 as the baseline... Of course as the pitcher's WHIP goes up, the pitcher becomes less effective, allowing more base runners... as the hitter's OPS goes down, he becomes less effective, either reaching base fewer times or hitting for more singles than, say, doubles, triples or homeruns.

 

Now I need to find a way to weight it in code so that if the Home Team's pitcher (in the sim) Walter Johnson **who has a career 1.06 WHIP** goes up against the Away Team's second baseman (Rod Carew) **who has a career .822 OPS, we can predict an outcome. This is the difficulty. =) I'm working on a couple equations right now and I'll post them when I have perfected them and you guys can give me pointers. =)

Link to comment
Share on other sites

well... if I remember correctly, compiled programs have the ability to be put into cartridge format... Maybe Tursi can chime in on this...

 

Not quite sure what I'm chiming in on.... compiled XB? I'm the wrong one to answer that. ;)

 

Technically anything could be stored on cart, if you don't mind it copying to (and thus requiring) 32k RAM expansion. Something that runs specifically IN the cartridge space, though, usually needs to be designed to (just because of the limited CPU RAM available).

 

Link to comment
Share on other sites

As I recall from the discussion many moons ago, Tursi took a compiled program in EA5 format and made a cartridge by saving the program into GROM. Then, when the program ran, the GROM was copied into the 32K memory expansion and ran normally at that point.

 

I have a tool (for Windows) that will do this for you automatically. My goal at the time was just to make it easier to distribute EA#5 programs for use in emulators, but now I'm actually finding myself using it for testing the GROM chip I've been working on for Jon ;)

 

http://harmlesslion.com/software/makecart

Link to comment
Share on other sites

I have a tool (for Windows) that will do this for you automatically. My goal at the time was just to make it easier to distribute EA#5 programs for use in emulators, but now I'm actually finding myself using it for testing the GROM chip I've been working on for Jon ;)

 

http://harmlesslion....ftware/makecart

 

And he's been doing an excellent job of it too! :) I need to burn that diag program to my spare 1284 and run it through its paces... just didn't have time this weekend. :)

Link to comment
Share on other sites

As I recall from the discussion many moons ago, Tursi took a compiled program in EA5 format and made a cartridge by saving the program into GROM. Then, when the program ran, the GROM was copied into the 32K memory expansion and ran normally at that point.

 

Yep! Works great for his emulator as a quick and dirty way of copying an EA/5 program to 32K and then running it. It also worked when I moved his "GROMs" over to my HSGPL - I was able to play his PSG sound "cartridge" on a real TI-99/4A.

 

The other way to accomplish this is to split the EA/5 executables up and copy the segments to 32K in the cartridge and then start the program directly by branching to >A000. See here: http://www.avjd51.dsl.pipex.com/ti/ti.htm#bank_switching

 

That's how I made the Neverlander, CF2K, DU2K, and DM2K cartridges. They simply use the EPROM to copy the executable to 32K (>2000 and >A000) and then run it!

 

So, both methods work, and have their place. Tursi's storing the bits in GROM and then copying them work well with the program he wrote. My method means that I had to take the split program file images, strip the heads off, combine them, and then split them into ~7K chunks with a bank switch header on top of them that copied them each successively to the appropriate place in 32K. Harder to do, but really the only thing we could do since we were operating from ROM space and didn't have GROM emulation on the carts. Ask Fred Kaal - he got the hang of doing it to update his programs' cartridge EPROM :-)

Link to comment
Share on other sites

Here's the source for the header for DM2K/DU2K/CF2K - a 128K bank switched "copy to 32K" cart. Credits to Tursi and Stuart for helping with this a while back.

 

* THREE PROGRAM HEADER FOR 64K BANKED
* SWITCHED CART
 DEF SFIRST,SLAST,SLOAD
 UNL

* ROM HEADER
 AORG >6000

SFIRST EQU $
SLOAD EQU $

GRMHDR BYTE >AA,1,1,0,0,0
 DATA PROG3
 BYTE 0,0,0,0,0,0,0,0

PROG3 DATA PROG2
 DATA DU2K
 BYTE 8
 TEXT 'DU2K 2.0'
 EVEN

PROG2 DATA PROG
 DATA DM2K
 BYTE 8
 TEXT 'DM2K 2.4'
 EVEN

PROG DATA 0
 DATA CF2K
 BYTE 8
 TEXT 'CF2K 1.4'
 EVEN

***************
* Copy Data for Modules *
* Format is:
* First, the address to load for the first source bank.
* Number of 32-bit words, source address, target address
* To end list, provide a start address greater than >8000
* (This means you can't start in the low RAM bank)
***************

CF2KDT DATA >6000
    DATA >076A,>6258,>A000,>076A,>6258,>BDA8
    DATA >076A,>6258,>DB50,>04C0,>6D00,>2000
    DATA >A000

DM2KDT DATA >6008
    DATA >072A,>6358,>A000,>072A,>6358,>BCA8
    DATA >072A,>6358,>D950,>0300,>7400,>2000
    DATA >A000

DU2KDT DATA >6010
    DATA >0794,>61B0,>A000,>0794,>61B0,>BE50
    DATA >0794,>61B0,>DCA0,>0400,>7000,>2000
    DATA >A000

***************
* CF2K Module *
***************
CF2K LWPI >8300
 LI R14,CF2KDT * address of copy table
    JMP COPYLP

***************
* DM2K Module *
***************
DM2K LWPI >8300
 LI R14,DM2KDT * address of copy table
    JMP COPYLP

***************
* DU2K Module *
***************
DU2K LWPI >8300
 LI R14,DU2KDT * address of copy table
    JMP COPYLP

***************
* Common Code *
***************
COPYLP BL @GOGO * Set up Char Sets
     MOV *R14+,R7 * get bank

ONEBLK MOV *R14+,R4 * Get bytes divided by 4
    JGT CONT * Branch if positive (less than >8000)
    B *R4 * Else it's the jump address, so start the program

CONT MOV *R14+,R9 * Address to copy from
    MOV *R14+,R10 * Address to copy to
    BL @COPYME * COPY IT!
    INCT R7 * Next Bank
    JMP ONEBLK

****************
* Copy Routine *
****************
* R4 - Bytes Div 4
* R7 - Bank switch address
* R9 - Address to copy from
* R10 - Address to copy to
* R11 - Return spot
COPYME
    MOV R0,*R7 * Do the bank switch
LOOPIT
    MOV *R9+,*R10+
    MOV *R9+,*R10+
    DEC R4
    JNE LOOPIT
    B *R11		 * We're done.

****************************
* Load lower case charsets *
****************************
* Note, if you still need space, you can remove support for the
* 99/4 by deleting the code marked between * +++ 99/4 support +++ begin/end
* blocks
GOGO
    MOV R11,R9 * Save our return spot

* +++ 99/4 support begin +++

* load R3 with 6 for 99/4, or 7 for 99/4A
    CLR R0
    BL @GPLSET
    BL @GETGPL * read GROM >0000
    LI R3,7
    CI R0,>AA01 * 99/4 is AA01, all versions of 99/4A seem to be AA02 (even 2.2!)
    JNE IS4A	 * note we also assume unknown is 99/4A just to be safe
    DEC R3

* make a copy of the capitals for the 99/4 to 'support' lowercase
* this will be partially overwritten by the main set, but it works!

    LI R0,>0018 * GPL vector address
    LI R1,>4A00 * dest in VDP - must OR with >4000 for write
    LI R2,>0040 * how many chars
    BL @GPLVDP * this function goes somewhere later in your ROM
    JMP MNSET

* +++ 99/4 support end +++
* If you delete the above block, replace with
* LI R3,7
* so that the character size counter is still valid

IS4A
* 'lowercase' letters
    LI R0,>004A * GPL vector address (not available for 99/4)
    LI R1,>4B00 * dest in VDP - must OR with >4000 for write
    LI R2,>001F * how many chars
    BL @GPLVDP * this function goes somewhere later in your ROM

* main set
MNSET
    LI R0,>0018 * GPL vector address
    LI R1,>4900 * dest in VDP - must OR with >4000 for write
    LI R2,>0040 * how many chars
    BL @GPLVDP * this function goes somewhere later in your ROM
    B *R9	 * RETURN TO CALLER

*****************
* GROM routines *
*****************

* Set GROM address
GPLSET
    MOVB R0,@>9C02
    SWPB R0 
    MOVB R0,@>9C02
    B *R11

* Get a word from GPL
GETGPL
    MOVB @>9800,R0
    SWPB R0
    MOVB @>9800,R0
    SWPB R0
    B *R11

* Copy R2 characters from a GPL copy function vectored at
* R0 to VDP R1. GPL vector must be a B or BR and
* the first actual instruction must be a DEST with an
* immediate operand. Set R3 to 6 for 99/4 (6 byte characters)
* or 7 for a 99/4A (7 byte characters)

GPLVDP
    MOV R11,R10 * save return address
    BL @GPLSET	 * set GROM address 
    BL @GETGPL	 * Get branch instruction (not verified!)
    ANDI R0,>1FFF * mask out instruction part
    AI R0,3	 * skip instruction and destination
    BL @GPLSET	 * set new GROM address
    BL @GETGPL	 * get actual address of the table
    BL @GPLSET	 * and set that GROM address - GROM is now ready!
    
    SWPB R1	 * assume VDP is already prepared for write to save space
    MOVB R1,@>8C02
    SWPB R1
    MOVB R1,@>8C02 * VDP is now ready!

   CLR R0

LP8
    MOVB R0,@>8C00 * pad the top of the char with a space
    MOV R3,R0	 * then copy 7 (or 6) bytes

* +++ 99/4 support begin +++

    CI R3,6	 * check for 99/4
    JNE LP9
    MOVB R0,@>8C00 * extra blank line for 99/4

* +++ 99/4 support end +++
* no changes needed if this block removed

LP9
    MOVB @>9800,@>8C00 * copy a byte (both sides autoincrement)
    DEC R0
    JNE LP9
    
    DEC R2		 * next character
    JNE LP8

    B *R10

FINISH EQU $
SLAST END

Edited by acadiel
Link to comment
Share on other sites

I am splitting the development of this game into two...

 

1) The standard XB game I've been working on with eventual graphics and disk access... full 162 game season with compiled stats

 

2) A BBS version of the game with modified displays, slimmed down statistical equations, and maybe 4 teams instead of 30.

 

 

I've been playing the "PGA Golf" game on HeatWaveBBS.com and I've played "Battleship" on the Hidden Reef. These games seem like they function very nicely in the BBS environment because of their simplicity, minimal screen displays, solid algorithms, and ease of use. The baseball sim, once statistical weighting is in effect, would make a nice contender for the BBS scene.

 

I'll have to modify the display code pretty drastically and find out what kind of program-size limitations I'll have, but overall, I think this will be a relatively simple conversion, once I understand the conventions.

 

Wish me luck!

 

Owen

Link to comment
Share on other sites

Here's something I've been looking at... these are the CALL LINK documents for the BBS. I've got to convert what I've got (once I finish this particular version... should be this weekend) to work with this setup. If you haven't, yet, sign up for the Heat Wave BBS or the Hidden Reef and try out some of the door games... Golf is my favorite, followed shortly thereafter by Battleship.

 

These conventions are called up each time a user inputs a game command or any time the display must change. Daunting... but I'm confident. =)

 

 

 

 


.BP;LM0;RM79.
.TL 43:38.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.CE14.
S+T Software Bulletin Board Systems


Version 02.10.04


Copyright (C)2004 by S+T Software
.
.
.
.
APPENDIX B
.
S+T BBS ASSEMBLY  'CALL LINK' SPECIFICATIONS
.
.
.
.
    Specifications in this manual are subject to change without notice..
.
    Documentation Copyright (c)2004 by Timothy A Tesch, All rights reserved..

    Questions concerning the use of these links/loads should be directed
    to S+T Software. Some link information taken from MXT BBS Systems.
.
.BP.

.FO ^^^^^^^^^^v02.10.95    APPENDIX B: ASSEMBLY 'CALL LINK' SPECIFICATIONS.



&CALL^LINK("BCLEAR")
Clears the 40 column screen BELOW lines 1-6 (the SysOp window)


&CALL^LINK("CHAT")
Standard two-way bidirectional CHAT mode.
    - <CTRL =>  (Control equals) exits chat mode


&CALL^LINK("DISP",A$,a)
Prints a message 1-255 characters in length anywhere on the SysOp screen.

      A$ = String to be printed
      a  = position in 40 column window to begin printing


&CALL^LINK("FCLEAR")
Clears the ENTIRE 40 column screen, including the SysOp window.


&CALL^LINK("FORTY",A$)
Toggles the screen to 40 column mode.

      Lines 1-6 are 'locked' (not printed to)  and are used to display the
      SysOp data window.  Lines 7-21 are used to simulate a 40 column
      emulator.  Lines 22-24 will be garbled - this is normal when using 40
      column mode and will not affect program operation.

      After toggling to 40 column mode, ASCII characters 144-159 are
      redefined as IBM graphic characters to facilitate limited graphic
      viewing.  Codes 128-143 are redefined by LOAD3.

      A$ = STR$((FOREGROUND-1)*16+BACKGROUND-1) using the XB manual color
           scheme.  This sets the fore/background colors for 40 column mode.

NOTE: A$ is optional!  Not neccessary if you only want to set 40 column mode.


&CALL^LINK("HOTKEY",A$)
Sets up hotkeys for use with any printing routine.

    A$ = 96 character MAXIMUM string of characters to be accepted as hotkeys

---> NOTE:  You MUST perform a CALL LINK("HOTKEY","") at the beginning of
           any external program you write to assure compatibility.  If you do
           not, the program may crash mysteriously.

.BP.
&CALL^LINK("IN",A$)
Accepts any string of characters and places into A$

&LOAD^VALUE
-24576       (1) will accept any length input from 1-255 characters, terminated
                either by a <CR> or when text input length equals maximum input
                length.
-24574       (2) Can be forced to UPPERcase
-24573       (3) Can be echoed to user as any ASCII charactere
-24553       (4) Spaces, periods and carats (SHIFT-6) can be disallowed

Return:

    If A$ = CHR$(1) then no carrier is present, otherwise the input string is
    returned.

** See Appendix C for Call LOAD specs usable with 'IN'


&CALL^LINK("NUMIN",A$)
Accepts a 'string' of NUMBERS-only and places in A$

    (1) will accept any length input from 1-255 characters, terminated
        either by a <CR> or when text input length equals maximum input length
    (2) Can be echoed to user as any ASCII charactere
    (3) ONLY numbers are accepted

Return:

    If A$ = CHR$(1) then no carrier is detected, otherwise  A$ will contain
    the entered number(s).

** See APPENDIX C for call LOAD specs usable with 'NUMIN'


&CALL^LINK("MDMON")
    - Turn DTR pin #5 *on*

&CALL^LINK("MDMOFF")
    - Turn DTR pin #5 *off*

.BP.
&CALL^LINK("PRINT",A$)

Will print a string from 0-255 characters in length.  HOTKEYS can be activated
and CONTROL Q,S,X (Resume, Pause, Abort) are active.  Carrier detect is
also active.

    - If A$ = CHR$(1) then carrier was lost

    - If Hotkeys are ON and no key was pressed, A$ will equal "" (a null)

    - If Hotkeys are ON and a VALID hotkey was pressed, that character
      will be returned in A$.


                         *************************
                         ** W A R N I N G ! ! ! **
                         *************************

         (1) You must use a VARIABLE to pass the text when using hotkeys!

                 CALL LINK("PRINT",STRING$)  - valid in all cases
                 CALL LINK("PRINT","This is a test") - not valid w/hotkeys


         (2) If hotkeys are ON, you should also perform the following:

             10  CALL LINK("HOTKEY","ABCD")
             20  A$="This is a test"
             30  B$=A$
             40  CALL LINK("PRINT",B$)
             50 ...test for hotkeys, etc

              WHY????  Call link PRINT will check for the characters ABCD
              as it prints the message.  However, since HOTKEYS are *ON*,
              the variable in the PRINT link will be overwritten; either
              with a "" (null), a hotkey, or carrier loss detection.  For
              this reason the BBS has special SUBS to handle hotkeys.


** See APPENDIX C for information on the CALL LOADS usable with PRINT


&CALL^LINK("PRINTX",A$)

    - Same as PRINT except CONTROL-X (abort) is not active.


&CALL^LINK("REG")

    - Restores screen mode to 28 columns.  Does *NOT* reset graphics
      characters which have been previously redefined.

.BP.
&CALL^LINK("RS232",A$)

    - Returns the status of the carrier line.

    If A$ = "ONLINE" there is a carrier  *OR* the carrier CALL LOAD has
            been set.  See notes in Appendix A.

    If A$ = "HUNGUP" there is not a carrier.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
&CALL^LINK("SC",A$)

    - Returns either a character from the keyboard/user in A$
    - Does *not* wait for a keypress; scans the RS232 port for a character

           If A$=CHR$(0) then no key was pressed
           If A$=CHR$(1) then carrier in not present

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&CALL^LINK("TRITEC",A$,B$)

    - Accesses either the MBP or the Geneve clock OR converts 24 hour
      time to 12 hour am/pm format for use with other clock cards (like the
      triple tech)

         MBP:      perform LINK, A$="HH:MM:SS am", B$="MM/DD"
                   you must add a "YY/" for the year since not supported w/MBP

         Geneve:   perform LINK, A$="HH:MM:SS am", B$="YY/MM/DD"

         Triple:   This is different.  Use the following in sequence:
          Tech          CALL LINK("DC",A$,"CLOCK")    * gets time/date string
                                                      * from Tri-Tech
                        CALL LINK("TRITEC",A$,B$)     * Splits into time/date

                   Using these two links will grab the time and date in the
                   format: A$="HH:MM:SS am", B$="YY/MM/DD"

.BP.
================================================================================
=           dv80 / df128 FILE READERS and other DSR access LINKS               =
================================================================================

The below links can display DV80 *OR* DF128 files.  Characteristics:


(1) DV80 files will have a CR/LF combination added after every line

(2) DF128 files are read *as-is* meaning
         - no CR/LF combinations are added
         - trailing spaces are not stripped

(3) Hotkeys, carrier detection, and CONTROL Q,S,X (Pause, Resume, Abort)
   are fully supported.

(4) 40 character PATHnames for hard drives, RAMdisks, and floppies supported.

(5) Performing a CALL PEEK(-24566,A) will return the following after file access
         A=0  , file was found
|        A=255, file does not exist or is wrong type
|
*---> Does not work with the DC link!


NOTICE:  Please read the description in 'PRINT' for documentation regarding
        HOTKEYS and CARRIER detection.  This is *very* important.



&CALL^LINK("DSREAD",A$,PATHFILE$)

      A$ = RETURNED TO XB - Carrier Loss and Hotkey returns          (OUT)
PATHFILE$ = Any valid PATH.filename up to 40 characters in length     (IN)

    - Will read either a DV80 or DF128 file.  No file specification
       is needed.  The assembly will determine the type of file and will take
       appropriate action.


&CALL^LINK("DX",A$,PATHFILE$)

    - Same as DSREAD; however, CTRL-X (ABORT) is not allowed.


&CALL^LINK("DFMSG",A$,PATHFILE$,STARTREC)

    - Will read a DF128 file in RELATIVE mode, allowing you to start reading
      text at any record specified by STARTREC.

    - File reading is halted upon encountering an ASCII 0 (null) code *OR*
      the enf of the file.

    - Hotkeys, carrier detection, and CONTROL Q,S,X are all supported

A$        = Carrier loss / hotkey return                              (OUT)
PATHFILE$ = PATH.filename - 40 characters max                         (IN)
STARTREC  = Starting record from 0 to 32767                           (IN)


NOTE: specifying this link using the following:

    CALL LINK("DFMSG",A$,PATHFILE$,STARTREC,0,0)

    will cause the assembly to try and read a DISPLAY/FIXED 80 file beginning
    at the specified record.  Blank records are NOT bypassed.  This link is
    designed for use with the DF80 file transfer lists (!!DIR).


&CALL&LINK("DC",A$,PATHFILE$)

    - Reads the FIRST record of any DV80 file and places that record into
      the variable A$.

    - Used in conjunction with the 'DS' link

A$        = returns first record of file to XB in this string         (OUT)
PATHFILE$ = valid PATH.filename up to 40 characters                   (IN)


&CALL^LINK("DS",A$,PATHFILE$)

    - Skips the first record of a DV80 file and displays the rest exactly
      like the 'DSREAD' link

    - Used in conjunction with the 'DC' link

A$        = carrier detect / hotkey returns                           (OUT)
PATHFILE$ = valid PATH.filename up to 40 characters                   (IN)

.BP.
================================================================================
=                         FILE TRANSFER LINKS:                                 =
================================================================================

&CALL^LINK("XFER",A,A$,B,B$,VDP$)

    Before the actual XFER link is performed, certain variables must be set
    using the appropriate values in a CALL LOAD statement.  These values
    will be documented in the APPENDIX C.


         A  = sector/record size

                        (1) Sectors of a downloaded file
                        (2) records (2*sectors) of an uploaded file
                        (3) sectors size of a file when using the file-size
                            function


         A$ = Filename, must NOT contain any spaces or periods. (10 characters)

         B  = Success/Failure condition.  Reported as a number from 0-6:

              0 = File Transfer Successful
              1 = Could not Read a file
              2 = Could not Save a file
              3 = Too  many retries
              4 = Other System cancelled
              5 = PATH not found
              6 = Carrier Loss detected

         B$ = Any valid PATHname.  MUST include a period at the end.

         VDP$ = PATH.FILENAME location to store the 8K VDP buffer.  This file
                will be 34 sectors in length.  If this file cannot be saved or
                loaded, the BBS will almost certainly crash after a file
                transfer is performed.

&FILE^SIZE^CHECKING^ROUTINE

CALL LOAD(-24566,0,1,DRIVE,HOF,0)
CALL LINK("XFER",A,B$,C,D$,VDP$)

Where:
         DRIVE = 1-9 or 17-42
         HOF   = 0 for floppy access, 1 for Hard drive access
         B$    = filename to check for
         D$    = PATH to locate the file
         VDP$  = not used, but should be present

Returned:
         A = size of file, 0=nonexistent
         C = 0 file exists, <>0 file does not exist

 

 

Link to comment
Share on other sites

I am splitting the development of this game into two...

 

1) The standard XB game I've been working on with eventual graphics and disk access... full 162 game season with compiled stats

 

2) A BBS version of the game with modified displays, slimmed down statistical equations, and maybe 4 teams instead of 30.

 

 

I've been playing the "PGA Golf" game on HeatWaveBBS.com and I've played "Battleship" on the Hidden Reef. These games seem like they function very nicely in the BBS environment because of their simplicity, minimal screen displays, solid algorithms, and ease of use. The baseball sim, once statistical weighting is in effect, would make a nice contender for the BBS scene.

 

I'll have to modify the display code pretty drastically and find out what kind of program-size limitations I'll have, but overall, I think this will be a relatively simple conversion, once I understand the conventions.

 

Wish me luck!

 

Owen

 

That's a great idea Owen. There are no specific memory limitations for BBS XB programs, and you can even use disk files for data storage etc... The main programming limitations are related to the display which has to be strictly text, and you cannot use things like DISPLAY AT or ACCEPT AT, CALL GCHAR, CALL CHAR, CALL COLOR etc... I'm not sure however if you can use ANSI terminal escape codes to move things around the screen.

Your baseball program should be definitely an excellent candidate for BBS conversion.

Link to comment
Share on other sites

That's a great idea Owen. There are no specific memory limitations for BBS XB programs, and you can even use disk files for data storage etc... The main programming limitations are related to the display which has to be strictly text, and you cannot use things like DISPLAY AT or ACCEPT AT, CALL GCHAR, CALL CHAR, CALL COLOR etc... I'm not sure however if you can use ANSI terminal escape codes to move things around the screen.

Your baseball program should be definitely an excellent candidate for BBS conversion.

Reno Keno uses ANSI positioning for all of its screen work. Some day we were going to add color but never got around to it. It's relatively simple to add ANSI codes, you just need to follow the proper syntax. However, any program that can be played with PRINT, INPUT, and CALL KEY can be translated into proper call LINKs for the BBS.

 

I gave Owen some subprogram examples that will simplify his efforts, if he continues down this path.

Link to comment
Share on other sites

Yea, I'm already on the conversion path. =) I should have something to test here by this weekend. And for this game, PRINT, INPUT, CALL KEY are really all I need. =)

 

Exciting stuff... I may do further conversions, like Lemonade Stand... Once graphics and sound are stripped out, it's just a simple numbers manipulation game... excellent candidate for a similar conversion.

 

Owen

Link to comment
Share on other sites

I'll be posting an updated version of the BBS version of this game tonight when I get home.

 

There are some big changes and a couple new features.

 

1) All screen displays are done via "PRINT" statements as opposed to DISPLAY AT. This creates a pretty interesting console BASIC feel as the whole screen rolls up from the bottom until it fills the screen. In addition to this, the PRINT statements are routed through a custom sub which will CALL LINK to an assembly subroutine which is native to the BBS. In this way, the screen draws don't roll quite so much and are much faster.

 

2) CALL CLEAR has been replaced with CALL CL and routed through a custom sub which, again, calls an assembly subroutine which is native to the BBS.

 

3) I have implemented (in a minimized fashion) true weighted plays, wherein the better hitter will more often than not out-perform a sub-par pitcher. For the two teams currently available, career statistics have been implemented.

 

 

***Statistical weights***

 

I used two stats that I believe to be the most accurate representation of "effectiveness" in the pitcher/hitter duel. OPS (On-base-Plus-Slugging) for the hitter and WHIP (Walks-plus-Hits-per-Inning-Pitched). I went with the simplest form of this... Babe Ruth had the best overall career OPS which was slightly over 1.00 (higher is better). Addie Joss had the best career WHIP at just under 1.00 (lower is better).

 

Basically it's an ABS function, so to speak. 1.00 is the baseline. If a hitter at .975 OPS faces a pitcher at 1.100, the hitter stands the better chance of winning. Taking 1.00 as the baseline, for an Absolute function, the hitter has a "25" score. (this is the difference between the OPS and 1.0 times 100) The pitcher has a 100 score (again, 1.100, multiply the difference from 1 by 100). In this equation, the lower the number (or the closer to 1.00) the better. Therefore, a hitter at "25" will have a better chance at success than a pitcher at "100". Convoluted enough?

 

=)

 

Look for updates tonight.

Link to comment
Share on other sites

Sorry... look for updates TONIGHT.... =)

 

I was under the weather yesterday and didn't post the updates.

 

What I'll be posting is the exact same game, only fit to run on a BBS. Essentially just PRINT instead of DISPLAY AT....

 

Still working on the statistical weighting. I've got the formula, just adding each player's "rating" into the code... taking a while.

Link to comment
Share on other sites

DISPLAY AT(1,1):"SCORE: ",SCO(1);

 

becomes:

 

CALL C("SCORE: "&STR$(SCO(1)))

 

for every display... CALL C is actually the assembly subroutine to draw the string to the screen...

 

CALL KEY is also routed through a sub, as is CALL CLEAR (which has become CALL CL)

 

Minor adjustments, but important to the desired result of having one of my games run on a BBS. =)

Link to comment
Share on other sites

So here's the "BBSish" code.

 

I am still in the process of adding statistics for each player.

 

***I have a question for you guys... So, the full XB version will contain 30 static teams (having the same players on the teams all year) playing 162 games and yearly stats compiled onto disk. The BBS version will have to be less ambitious...

 

Would you guys rather have 4 static teams to play against (in the BBS environment) or have a random team generated each time from a pool of players?

 

Basically I have enough space and freedom to put 4 regular teams into place with full rosters... OR, I could have just a pool of players to choose from for the opposing team which would be created at random... Any thoughts on which would be more interesting/Fun to play?

 

 

 

 

 


**REM THESE LINES SET UP INITIAL VARIABLES.  EACH BASE HAS A FLAG AND PLAYER NAME ASSOCIATED WITH IT
10 DIM SCO(2), P$(2), C$(2), B$(2), BB$(2), BBB$(2), SS$(2), LF$(2), CF$(2), RF$(2), BO(2), HIT(2)
100 BAP=0 :: INN=1 :: OUT=3 :: BFLG=0 :: BBFLG=0 :: BBBFLG=0 :: HPFLG=0 :: SCO(1)=0 :: SCO(2)=0 :: TAP=1 :: INF=0 :: RFLG=0
105 BO(1)=0 :: BO(2)=0 :: HIT(1)=0 :: HIT(2)=0
110 RANDOMIZE
120 REM BASEBALL SIM

**REM THESE ARE THE STRING VARIABLES CARRYING THE PLAYERS' NAMES WITH THEM

***REM HOME TEAM
130 P$(1)="W. JOHNSON"
135 C$(1)="J. BENCH"
140 B$(1)="L. GEHRIG"
145 BB$(1)="R. HORNSBY"
150 BBB$(1)="E. MATHEWS"
155 SS$(1)="H. WAGNER"
160 LF$(1)="T. WILLIAMS"
165 CF$(1)="J. DIMAGGIO"
170 RF$(1)="B. RUTH"

***REM AWAY TEAM

175 P$(2)="NOLAN RYAN"
180 C$(2)="Y. BERRA"
185 B$(2)="T. HELTON"
190 BB$(2)="R. CAREW"
195 BBB$(2)="A. RODRIGUEZ"
200 SS$(2)="C. RIPKEN JR."
205 LF$(2)="B. WILLIAMS"
210 CF$(2)="P. ROSE"
215 RF$(2)="M. CUDDYER"


220 CALL CL

**REM BEGIN GAME LOOP

240 IF OUT>2 THEN GOSUB 1200
241 IF INN>8 THEN GOSUB 1600
245 GOSUB 520




***SCREEN DISPLAY
248 IF INF=1 THEN CALL C("                      TOP") ELSE CALL C("                      BOT")
250 CALL C(" OUTS: "&STR$(OUT)&"       INNING: "&STR$(INN))
251 CALL C(""):: CALL C("")
252 CALL C(" HOME: "&STR$(SCO(1)))
253 CALL C(" AWAY: "&STR$(SCO(2)))
254 FOR I=1 TO 4 :: CALL C("") :: NEXT I
255 TAP=TAP XOR 3
256 CALL C("NOW PITCHING:"):: CALL C(P$(TAP)):: CALL C("")
257 TAP=TAP XOR 3
259 CALL C("NOW BATTING:"):: CALL C(BAP$)
260 CALL C("                 "&STR$(BBFLG))
261 CALL C("                "&STR$(BBBFLG)&" "&STR$(BFLG))
262 CALL C("                 "&STR$(BAP)):: CALL C("")
265 CALL C("PRESS ANY KEY TO SIMULATE!")

MAIN LOOP

290 CALL KEY(0,K,S):: IF S=0 THEN 290
300 SFDICE=INT(RND*6)+1
310 WHDICE=INT(RND*6)+1
320 CALL CL
340 IF SFDICE<3 THEN GOSUB 360 ELSE GOSUB 440
350 FOR I=1 TO 900 :: NEXT I :: CALL CL :: GOTO 240



********************************************************
**REM THIS IS THE "YOU REACH BASE AND HERE'S HOW" SUB

360 CALL CL
370 ON WHDICE GOSUB 380,390,400,410,420,430 :: RETURN

**REM WALK, RUNNERS ON BASE ADVANCE ONLY IF FORCED

380 CALL C("WALK")
381 IF BBBFLG>0 AND BBFLG>0 AND BFLG>0 THEN HPFLG=BBBFLG :: SCO(TAP)=SCO(TAP)+1 :: BBBFLG=BBFLG :: BBFLG=BFLG :: BFLG=BAP;
382 IF BBFLG>0 AND BFLG>0 THEN BBBFLG=BBFLG :: BBFLG=BFLG :: BFLG=BAP
383 IF BFLG>0 THEN BBFLG=BFLG :: BFLG=BAP
384 BFLG=BAP
385 RETURN

**REM SINGLE, ALL RUNNERS ADVANCE ONE BASE

390 CALL C("SINGLE") :: IF BBBFLG>0 THEN HPFLG=BBBFLG :: SCO(TAP)=SCO(TAP)+1 :: BBBFLG=0
391 IF BBFLG>0 THEN BBBFLG=BBFLG :: BBFLG=0
392 IF BFLG>0 THEN BBFLG=BFLG :: BFLG=0
393 BFLG=BAP
394 RETURN

400 CALL C("SINGLE") :: IF BBBFLG>0 THEN HPFLG=BBBFLG :: SCO(TAP)=SCO(TAP)+1 :: BBBFLG=0
401 IF BBFLG>0 THEN BBBFLG=BBFLG :: BBFLG=0
402 IF BFLG>0 THEN BBFLG=BFLG :: BFLG=0
403 BFLG=BAP
404 RETURN

**REM DOUBLE, ALL RUNNERS ADVANCE TWO BASES

410 CALL C("DOUBLE") :: IF BBBFLG>0 THEN HPFLG=BBBFLG :: SCO(TAP)=SCO(TAP)+1 :: BBBFLG=0
411 IF BBFLG>0 THEN HPFLG=BBFLG :: SCO(TAP)=SCO(TAP)+1 :: BBFLG=0
412 IF BFLG>0 THEN BBBFLG=BFLG :: BFLG=0 
413 BBFLG=BAP
414 RETURN

**REM TRIPLE, ALL RUNNERS ADVANCE THREE BASES

420 CALL C("TRIPLE") :: IF BBBFLG>0 THEN HPFLG=BBBFLG :: SCO(TAP)=SCO(TAP)+1 :: BBBFLG=0
421 IF BBFLG>0 THEN HPFLG=BBFLG :: SCO(TAP)=SCO(TAP)+1 :: BBFLG=0
422 IF BFLG>0 THEN HPFLG=BFLG :: SCO(TAP)=SCO(TAP)+1 :: BFLG=0
423 BBBFLG=BAP
424 RETURN

**REM HOME RUN, ALL RUNNERS (PLUS BATTER AT PLATE) SCORE

430 CALL C("HOME RUN") :: IF BBBFLG>0 THEN HPFLG=BBBFLG :: SCO(TAP)=SCO(TAP)+1 :: BBBFLG=0
431 IF BBFLG>0 THEN HPFLG=BBFLG :: SCO(TAP)=SCO(TAP)+1 :: BBFLG=0
432 IF BFLG>0 THEN HPFLG=BFLG :: SCO(TAP)=SCO(TAP)+1 :: BFLG=0
433 HPFLG=BAP :: SCO(TAP)=SCO(TAP)+1
434 RETURN

*************************************************************

**REM THIS IS THE "YOU'RE OUT, AND HERE'S HOW" SUB

440 CALL CL
450 ON WHDICE GOSUB 460,470,480,490,500,510 :: RETURN

**REM STRIKEOUT, NO RUNNERS ADVANCE
460 CALL C("STRIKEOUT") :: OUT=OUT+1 :: RETURN

**REM GROUNDOUT, ALL RUNNERS ADVANCE A BASE

470 CALL C("GROUNDOUT")
471 OUT=OUT+1 :: IF OUT>2 THEN RETURN
472 GOSUB 1500 :: IF RFLG>0 THEN CALL C("ALL RUNNERS ADVANCE")
474 IF BBBFLG>0 THEN HPFLG=BBBFLG :: SCO(TAP)=SCO(TAP)+1 :: BBBFLG=0
475 IF BBFLG>0 THEN BBBFLG=BBFLG :: BBFLG=0
476 IF BFLG>0 THEN BBFLG=BFLG :: BFLG=0
477 RETURN

**REM GROUNDOUT, RUNNERS ADVANCE IF FORCED

480 CALL C("GROUNDOUT")
481 OUT=OUT+1 :: IF OUT>2 THEN RETURN
482 GOSUB 1500 :: IF RFLG>0 THEN CALL C("RUNNERS ADVANCE IF FORCED")
484 IF BBBFLG>0 AND BBFLG>0 AND BFLG>0 THEN HPFLG=BBBFLG :: SCO(TAP)=SCO(TAP)+1 :: BBBFLG=BBFLG :: BBFLG=BFLG :: BFLG=0 :: RETURN
485 IF BBFLG>0 AND BFLG>0 THEN BBBFLG=BBFLG :: BBFLG=BFLG :: BFLG=0 :: RETURN
486 IF BFLG>0 THEN BBFLG=BFLG :: BFLG=0
487 RETURN

**REM GROUNDOUT, DOUBLE PLAY IF RUNNER ON 1ST AND LESS THAN 2 OUTS, ALL OTHERS ADVANCE

490 CALL C("GROUNDOUT")
491 OUT=OUT+1 :: IF OUT>2 THEN RETURN
495 IF BFLG>0 THEN OUT=OUT+1 :: BFLG=0 :: CALL C("DOUBLE PLAY!") :: IF OUT>2 THEN RETURN
496 IF BBBFLG>0 THEN HPFLG=BBBFLG :: SCO(TAP)=SCO(TAP)+1 :: BBBFLG=0
497 IF BBFLG>0 THEN BBBFLG=BBFLG :: BBFLG=0
498 GOSUB 1500 :: IF RFLG>0 THEN CALL C("RUNNERS ADVANCE")
499 RETURN

**REM SHALLOW FLYOUT.  NO RUNNERS ADVANCE

500 CALL C("SHALLOW FLYOUT")
506 OUT=OUT+1 :: IF OUT>2 THEN RETURN
507 GOSUB 1500 :: IF RFLG>0 THEN CALL C("RUNNERS HOLD")
508 RETURN

**REM DEEP FLYOUT.  ONLY RUNNERS ON 2ND AND 3RD ADVANCE

510 CALL C("DEEP FLYOUT")
511 OUT=OUT+1 :: IF OUT>2 THEN RETURN
515 GOSUB 1500 :: IF RFLG>0 THEN CALL C("RUNNERS ON SECOND OR THIRD  ADVANCE")
516 IF BBBFLG>0 THEN HPFLG=BBBFLG :: SCO(TAP)=SCO(TAP)+1 :: BBBFLG=0
517 IF BBFLG>0 THEN BBBFLG=BBFLG :: BBFLG=0
518 RETURN



***************************************************************************

**REM THIS IS THE "GO THROUGH BATTING ORDER AND DISPLAY BATTER'S NAME" SUB

520 BAP=BAP+1 :: IF BAP>9 THEN BAP=1
530 IF BAP=1 THEN BAP$=B$(TAP) ELSE IF BAP=2 THEN BAP$=BB$(TAP) 
535 IF BAP=3 THEN BAP$=BBB$(TAP) ELSE IF BAP=4 THEN BAP$=SS$(TAP)
540 IF BAP=5 THEN BAP$=LF$(TAP) ELSE IF BAP=6 THEN BAP$=CF$(TAP) 
545 IF BAP=7 THEN BAP$=RF$(TAP) ELSE IF BAP=8 THEN BAP$=C$(TAP)
550 IF BAP=9 THEN BAP$=P$(TAP)
560 RETURN


***************************************************************************

**REM THIS IS THE "3 OUTS, NOW CHANGE SIDES" SUB


1200 INF=INF+1 :: GOSUB 1600 :: CALL CL
1210 IF INF>2 THEN INF=1 :: INN=INN+1
1215 CALL C("         INNING #"&STR$(INN)) :: FOR I=1 TO 10 :: CALL C(""):: NEXT I :: FOR I=1 TO 500 :: NEXT I
1220 IF INF=2 THEN CALL C("     HOME TEAM UP TO BAT")
1250 IF INF=1 THEN CALL C("     AWAY TEAM UP TO BAT")
1260 FOR I=1 TO 10 :: CALL C(""):: NEXT I
1264 FOR I=1 TO 500 :: NEXT I
1265 BO(TAP)=BAP
1266 TAP=TAP XOR 3
1267 BAP=BO(TAP)
1268 OUT=0 :: BFLG=0 :: BBFLG=0 :: BBBFLG=0
1269 CALL CL
1270 RETURN


***************************************************************************

**REM THIS IS THE "CHECK IF THERE ARE ANY BASE RUNNERS" SUB

1500 IF BFLG>0 THEN RFLG=1 :: RETURN
1510 IF BBFLG>0 THEN RFLG=1 :: RETURN
1520 IF BBBFLG>0 THEN RFLG=1 :: RETURN
1530 RFLG=0 :: RETURN

***************************************************************************

**REM THIS IS THE "CHECK FOR A TIE AT THE END OF THE GAME" SUB

1600 IF SCO(1)=SCO(2) THEN RETURN
1605 IF INN>8 THEN GOSUB 1700
1610 RETURN

***************************************************************************

**REM THIS IS THE "END THE GAME IF IT'S THE BOTTOM OF THE LAST INNING" SUB (AND WALKOFF)

1700 IF INF=1 THEN RETURN
1705 IF SCO(1)>SCO(2) THEN CALL CL :: CALL C("GAME OVER")
1706 CALL C("HOME: "&STR$(SCO(1))) :: CALL C("AWAY: "&STR$(SCO(2))) :: END
1708 IF SCO(1)<SCO(2) THEN CALL CL :: CALL C("GAME OVER")
1709 CALL C("HOME: "&STR$(SCO(1))) :: CALL C("AWAY: "&STR$(SCO(2))) :: END
1710 RETURN


***************************************************************************

**REM -BBS SPECIFIC "PRINT" CALL

2000 SUB C(A$):: PRINT A$ :: SUBEND

***************************************************************************

**REM -BBS SPECIFIC "CALL CLEAR"

3000 SUB CL :: CALL CLEAR :: SUBEND

4000 SUB KY :: CALL KEY(0,K,S):: SUBEND

 

 

Link to comment
Share on other sites

***Note... the code I just posted is still XB-compatible. The one with the actual assembly routines won't do anyone much good until you get on the BBS. =) Feel free to run the listing and see the PRINT style... It's different and kind of cool in a retro-BASIC way. =)

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...