Retrochallenge 2019/10 Final Update

As sometimes happens Retrochallenge efforts take turns and twists.   The progress made on the GUI version on the Superstar Baseball game was sufficient proof of concept for me to know that Visual MUMPS was capable.  While working on the game I kept having ideas to improve Visual MUMPS.  So this final post for the challenge will document those improvements. These improvements include providing GUI versions of existing system routines, and the beginning of Visual BASIC type IDE for creating Visual MUMPS applications.

A number of options were added to the MUMPS menu, that provide GUI versions of MUMPS system routines. Specifically (^%io – IO status, ^%gd – Global Directory, ^%g – global display, and ^%vd (or w  ) for variable display. Also Clear Console (w #) was added.

Untitled

IO status used to provide a text listing on the console of the status of each IO unit number (used to read and write files) now it shows them in a listbox, which later enhancement may allow closing units from listbox.

finalio

Next the Global Directory shows all the global (arrays stored to disk) that are in the database, in a listbox.  Then the global can be displayed by selecting the list item and clicking the display button.

finalgdir

The global can also be displayed by selected Global Display, which provides a dialog asking the user to type in the global name.

finalgdisp

Whether the user selections the global ^icecream from the global directory screen and clicks the display button, or uses the Display Global option above the output is a text listing of the global.

finalg

 

The IDE is still undergoing development  but let’s review progress to date.  The IDE is invoked from the IDE menu, or open apple I.  When selected a dialog for specifying the parameters for a window is presented. The parameter are set with a combination of line edit, popup menus and checkbox.  These parameters match those needed in the $zwindow() function call.

Clicking the “Try” button displays the window according to the parameters set :

finalide3
Result of clicking Try Button

Clicking the “Close” button or the Close box on the Trial window closes the window.  Save will eventually produce the Visual MUMPS code associated with this window, (including controls which are created by clicking the “Ctrl” button)

Adding Controls to the window with the “Ctl” Button is done through a two window activity.  The first window allows the selection of the control type, adding a new control or the selection of an existing control and editing it. A “Try” button will also be provided.

Well that wraps up this Retrochallenge, I forged on with my projects despite there not being much from organizers of this round of the Retrochallenge, with that the spirit of the Retrochallenge is to do retro-computing, and a few of us carried on in light of minimal or no formality of the Retrochallenge.

Cheers

 

Retrochallenge Update #6 – Sidebar 1 : A new Apple IIGS system with goodies

I thought I was going to take my retro computing hobby to the emulator only route.  So I had sold off my pimped out Apple IIGS last summer, but when I ran across another on craigslist with no monitor, keyboard or memory card for a very reasonable price I couldn’t help myself.

img_6151

Then I needed to get it to a place where I could use it so the shopping began and resulted in the following postal service bonanza.

img_6135

But before any new goodies could go in the old clock battery needed to come out.  Amazingly it did have a charge left, but it still had to go.

img_6136

Then I went for the new 4 Meg memory card from GGlabs via their ebay presence.

img_6140

Followed by the VidHD video card that will allow HD quality video from the Apple IIGS.  It needs to be in slot 3. The HDMI cable had to be coaxed through the opening behind slot 2 and plugged into the board.  I may later opt for a panel mount cable that will allow the TV to be more easily connected to another computer.

img_6142

Then two new pieces of kit from BigMessOWires.com, the FloppyEMU which can emulate up to 4 smartport hard drives or a floppy drive for the Apple IIgs. This however is not a perfect solution as there is some contention between the VidHD card and the FloppyEmu that requires rebooting.

The wombat card allow USB keyboard and mouse to be converted to ADB and used with the IIGS,  moreover a non-bluetooth wireless keyboard and mouse can be used.

img_6143

 

I am housing the Floppy EMU and Wombat in old empty 3.5″ Drive cases to keep the clutter down and make it look more retro.

 

img_6152

Next post will look at some additional enhancements to the Visual MUMPS environment.

 

Retrochallenge Update #5 – Listbox – Change to Load Window

When Anidar Visual MUPMS was first released it had a good number of GS/OS controls available in the interpreter, but there were still a number missing including the List Manager tools.  Well the Listbox control has been added along with three function calls, $zwaddlitem() with adds items to one of two embedded lists, $zwlist() which places the list box control on a window, and $zwgetlsel() which returns the number of the selected item in a list.

With these new tools at my disposal I rewrote the load data window for the baseball game.  While the radio buttons worked, I think the listboxes provide a much cleaner user interface.

The implementation of the list manager functionality in Visual MUMPS allow for two lists at any time, both can have up to 50 items up to 80 characters in length. The lists are simply numbered 1 and 2.  The lists are defaulted to only allow single selection this will likely be expanded to allow multiple selections.  Each item in the list can be set as selected or not selected and dimmed (not available) or available.

Show below are the calls which can also be found at AndiarSoftware.wordpress.com along with all the other Visual MUMPS function calls.

listmgrcall

Retrochallenge Update #4 – Drawing the Play Field

A short update here, but visually exciting.  It me some trial and error to get the graphics correct.  Also to be honest it is slow if I don’t up the speed of the emulator.  Likely a show stopper for the original hardware configuration.  Luckily we have emulators that allow us to test in theory how our old systems could work.

That aside here is a screenshot of the play field.  Scoreboard on the top, baseball diamond and player info in the middle, and message center and command buttons on the bottom.  The bases will turn red/blue when occupied during the game and the player on the base, along with the batter and pitcher.

playfield

Here is the same screen from the original Spectrum/ Timex Sinclair version.

bbmenuv2
New options D for defensive team lineup, B for batting team lineup

Game play coding will begin next.  This will be the most complicated part of the project.

Retrochallenge Update #3 – Player Data – and Update to Splash Screen

The Superstar Baseball board game is played by rolling dice and consulting player data cards or game charts for things like stealing bases and bunting.  The first set of data I have created comes from the  player and pitcher cards came with the game and look like this:

Keying in each outcome is a pain.  Then I found a board game web site an found there is a bit of a cult following for this board game and new “cards” have been created over the years and provided in spread sheets. So I have downloaded some of these and have saved as CSV files and converted to programs that will load as data.

Screen Shot 2019-10-09 at 11.18.10 AM

I have changed the initial splash screen to allow selection home and visitor teams from a list of 5 teams representing the best players of the decade from 1950 to 1990.

splashnew

Here is a quick description of the variables used to house the player and pitcher data:

Variable Player :

player(“62″)=”SANDBERG^RYNE^R^B^1^2B153B12            ”
player(“62″,”l”)=”p2d*fsegg$/gca4n1kg3gvp+k//ggw”
player(“62″,”r”)=”wd*ecfvnk$/k14+/nvg3gagpk/gsg2″

player(num) = data
Num is player number index

Data – Pieces delimited by “^”
=============================

1 – player last name
2 – player first name
3 – Batting hand “R”-right, “L”- left “B”-both
4 – Bunting rating “A” Higher Rating “B”-lower rating
5 – Running speed 0-5 0 slowest, 5 fastest
6 – positions and ratings – up to five sets of positions and ratings
first two characters is position next two are the numerical defensive rating

 

player(num,”l”) and player(num,”r”) – batting outcomes for dice role 30 for vs Left and right handed pitchers

1 – the character position in the string corresponds to dice rolls 10-39
with position 1 = dice roll 10, 2= dice roll 11 … 30 = dice roll 39

pli(“62″)=”R SANDBERG         R B 1 2B15 3B12           ”
pli(num) – formatted line for player data, used in lineup card and bullpen screens

Fixed length fields in single string of data

Pos
====================

1 – First initial
3-19 Last name and space filler
21 – Batting hand
23 – Bunt rating
25 – Speed rating
27 on set of 4 chars position/rating separated by space

pitcher(“66″)=”DDDDDD    SS    F  – G- W—X-”                                 
pitcher(“66″,”t”)=”R”                                                          
pitcher(num) – Pitching outcomes tied to dice rolls
pitcher(num,”t”) – Throwing hand “R”-right, “L”-left

 

Line up data :

lu(team, lineup num) 

1 – player num
2 – position on defense (if linueup num is 1-9) – not needed if on bench

lu(“90s”,”1″)=”55^9″
lu(“90s”,”2″)=”62^4″
lu(“90s”,”3″)=”57^5″                                                            lu(“90s”,”4″)=”52^7″
lu(“90s”,”5″)=”58^3″
lu(“90s”,”6″)=”59^2″
lu(“90s”,”7″)=”54^8″
lu(“90s”,”8″)=”60^6″
lu(“90s”,”9″)=”71^1″

This lineup show the first batter is player number 55, plays position 9 (left field)

and would look like this on the lineup card :

lineup90s
 

 

 

Retrochallenge 2019/10 Update #2 – Menus, Line up and Bullpen

 

Picking up from the last post, I made a decisions on the menus, use both a window to kick off the game and an application defined menu with the Visual MUMPS User menu enhancement.

bbmnu3

It’s quite simple to add/change items in the user menu the code to create this menu looks like this :

code_menu

The clear routine loops to clear out all menu items.  It’s good to start clean each time menus are being added, also there will be times when I will want the menus to be empty to only allow action in the open window.  In the INIT routine the first four options are always put into the menu.  The MUMPS has the ability to use post conditionals on certain commands, here the set command has post conditionals on the next menu items.

s:inning<1 z=$zwmenu(“Play Ball”,7,”s %cw%win1 d quit^bb.mps,play^bbplay.mps”)

In the line of code this menu item only gets set up when the variable inning is less than 1 (before the game starts).  The call to $zwmenu has three parameters, menu text, number of menu item and the callback code to be run.  The next two set commands in the text are used to set the callback code for the Quit item based on whether or not the game has started.

The next bit of functionality is the lineup and Pitcher change features.  Show below is how the look in the original TS/2068 version.

In the GUI environment the set up is  a bit different and easier to code and use.  The players and pitchers are listed and those that are valid to be substituted have active radio buttons next to them.  One to select the player to come out and the second column for who to put in. Then simply clicking the Sub button (or hitting “S”) will trigger the action.  Then Bench players are highlighted in yellow on the lineup card.  For the pitchers only starting pitchers and be selected before the game.  Once the game starts then only relievers will be active to pick.  For players once the game starts and a player is removed from the lineup then he is not eligible to be put back into the game.

When rosters or pitching changes are being made, all other windows are hidden until changes are completed, then those window will be redrawn.  Modal windows are an enhancement to Visual MUMPS I will add to the list, but this is a minor challenge and doesn’t hamper the ability to write this game.

In the next post the Play Ball window will be created.

 

 

 

Retrochallenge 2019/10 Update #1 – Splash Screen – Main Menu

As noted in my project intent I am going to use Visual MUMPS for the Apple IIGS that I developed in the previous Retrochallenge to do an update to the Superstar Baseball game that I wrote for the Timex Sinclair 2068.

So starting out I made the decision to use 320 graphics mode, while it is a lesser resolution it’ll give more robust color options and I’ve not done much programming in this mode so I wanted to give it a try.

So looking back to the original game the program starts with a splash screen and then a menu to set up the team lineups for the game. The game is a computerized version of an old board game, where each player has it’s own data card, more on that in the next post.

Here is the splash screen and menu from the original :

 

So let’s take a look at how this can be done with Visual MUMPS

The code for the program will be called bb320.mps ( the mps is what I use to denote MUMPS source code, and the file should be text or source file type).  The splash screen will be done with an alert box (message box), but first the graphics mode will be switched to 320 mode and the MUMPS console window will hidden.  Then the message for the alert box set and alert created. 

Source code : 

bb3B0 ; superstar baseball in 320 graphics mode for Apple IIGS

; set to 320 mode and hide console
w $zgmode(320),$zwhide(0)


; splash screen for game start
set b8=” ”
s smsg=b8_”Superstar Baseball”_$c(13)_b8_” For Apple IIGS”_$c(13)
s smsg=smsg_b8_” Version 2.0″
s %z=$zwalert(smsg,3,3,0,-1,-1)
k b8 ; delete the variable b8 (blanks) as it’s no longer needed

What it looks like:

Starting the ^bb320.mps program and splash screen

 

Next I there were a couple of choices for implementing the menu.  My first inclination was to build a window with buttons for each menu option, and also radio buttons for the choice of home team, this allows for some colors splash and make it pretty clear what options are next : 

bbmenu

but then I remembered that I had added a User menu, that supports up to 9 application definable menus that can be used and that might look something like: 

bbusermenu

What is not addressed in this approach is the selection of the home team.  So a menu item and window that would allow the selection as show above  or two menu items to for AL home and one of NL home could also be used as shown below.  It would have been good to implement the check marks on the menu, but that has not been done yet in Visual MUMPS.

bbu2menu

I think I’m leaning towards my initial idea of the bottom box, with radio buttons, because as I think ahead there may be additional opportunity to use the menus.

Regardless of choice the Visual MUMPS programming language makes it easy to prototype the various options. 

More to come…