Jump to content

Recommended Posts

I'd also like to get rid of the highlighted player color, so that all players are one color, looks more like a team. Highlighted colors won't matter since the comp will be playing itself.

 

I'm also thinking the Sharks team name is better for football. I'm thinking of replacing it. Which team name is better: Space Hawks or UFOs?

OK, I just got home last night and tested it this morning. Using the Intellivision Rocks disc, here's what I did:

  • Copied the files WS_Baseball.itv, WS_Baseball.cfg, and WS_Baseball.ivw to a local folder.
  • I renamed the first file to change its extension to, WS_Baseball.bin
  • From the command line, I navigated to that folder.
  • I executed the command as before:
$ dis1600 WS_Baseball.bin  WS_Baseball-dis.asm

The output I received was:

SEGMENT ofs 0000  len 2000  addr 5000  FLAGS: R---P
SEGMENT ofs 2000  len 3000  addr D000  FLAGS: R---P

It seems to have worked. On a lark, I did the same thing to the third file (.ivw). I suspect this is a second ROM for another bank, and it mostly contains data. I don't know.

 

-dZ.

Edited by DZ-Jay

Sorry, I got distracted with other things. The "EQU" directive means "Equivalent," and is used to define a constant. When you say something like:

X_RESET    EQU    $1000

it literally means "X_RESET is equivalent to $1000." This allows you to use symbolic names to represent other constant values, such as memory addresses. The assembler will automagically replace all such symbols with their equivalent base value.

 

All that said, here are the EXEC constants supported by the "disasm" tool. I've extracted these directly from the source code. Just add the following snippet to the very top of the disassembled file, and you should be good to go:

X_RESET             EQU    $1000
X_RET_R5            EQU    $1003
X_ISR               EQU    $1004
X_ISRRET            EQU    $1014
X_CHK_KBD_OR_CBL    EQU    $101D
X_INIT              EQU    $1026
X_READ_ROM_HDR      EQU    $10AB
X_DEF_ISR           EQU    $1126

X_RAND1             EQU    $167D
X_RAND2             EQU    $169E

X_INIT_MOB          EQU    $16B2
X_INIT_MOBS         EQU    $16B4

X_FILL_ZERO         EQU    $1738
X_FILL_MEM          EQU    $1741
X_PACK_BYTES        EQU    $174F
X_PACK_BYTES.1      EQU    $1750
X_UNPK_BYTES        EQU    $1757
X_UNPK_BYTES.1      EQU    $1758

X_GETNUM            EQU    $18FF
X_PRNUM_LFT         EQU    $189E
X_PRNUM_ZRO         EQU    $18AD
X_PRNUM_RGT         EQU    $18C5

X_PRINT_R1          EQU    $1867
X_PRPAD_R1          EQU    $186C
X_PRINT_R5          EQU    $187B
X_PRPAD_R5          EQU    $1871

X_EXT_SIGN_LO       EQU    $1668
X_EXT_SIGN_HI       EQU    $1669
X_CLAMP             EQU    $1670
X_SET_BIT           EQU    $16DB
X_CLR_BIT           EQU    $16E6
X_POW2              EQU    $1745

X_TIMER_STOP        EQU    $1838
X_TIMER_START       EQU    $1844

X_PLAY_NOTE         EQU    $1ABD
X_HUSH              EQU    $1AA8
X_PLAY_MUS1         EQU    $1B27
X_PLAY_MUS2         EQU    $1B5D
X_PLAY_MUS3         EQU    $1B95
X_PLAY_SFX1         EQU    $1BBB
X_PLAY_SFX2         EQU    $1BBE

X_SFX_OK            EQU    $1EAD
X_STOP_SFX          EQU    $1EB4
X_PLAY_RAZZ1        EQU    $1EBA
X_PLAY_RAZZ2        EQU    $1EBD
X_PLAY_RAZZ3        EQU    $1EC1
X_PLAY_RAZZ4        EQU    $1EC4
X_PLAY_RAZZ5        EQU    $1EC5
X_PLAY_CHEER1       EQU    $1ED5
X_PLAY_CHEER2       EQU    $1ED6
X_PLAY_WHST1        EQU    $1F1B
X_PLAY_WHST2        EQU    $1F1E
X_PLAY_WHST3        EQU    $1F22

X_MPY               EQU    $1DDC
X_DIV               EQU    $1DFB
X_DIVR              EQU    $1DF8
X_SQRT              EQU    $1E23
X_SQUARE            EQU    $1DDB

X_DO_GRAM_INIT      EQU    $1F2F
X_NEW_GRAM_INIT     EQU    $1F35

Edited by DZ-Jay

Thanks, but I'm still getting errors. This is the top of my asm file:

ORG $5000

.HEADER:

 

BIDECLE $D000 ; 5000 Ptr: MOB graphic images
BIDECLE $F000 ; 5002 Ptr: EXEC timer table
BIDECLE $F01D ; 5004 Ptr: Start of game
BIDECLE $F183 ; 5006 Ptr: Backgnd gfx list
BIDECLE $F012 ; 5008 Ptr: GRAM init sequence
BIDECLE $F01A ; 500A Ptr: Date/Title
DECLE $01E0 ; 500C Key-click / flags
DECLE $0000 ; 500D Border extension
DECLE $0000 ; 500E Color Stack / FGBG
DECLE $0000, $0001 ; 500F Color Stack init (0, 1)
DECLE $0005, $0000 ; 5011 Color Stack init (2, 3)
DECLE $0000 ; 5013 Border color init

 

Does the EQU's go above that?

It doesn't really have to be above that, but I would recommend it.

 

By the way, make sure that the symbols start at the beginning of each line, otherwise it won't work.

 

What's the error you are getting?

 

dZ.

Strange, I do not see those constants defined in the source. Moreover, those do not seem to be real labels, but placeholders for addresses. I wonder if you could replace the "G_" with a "$" to make them work.

 

-dZ.

Edited by DZ-Jay

You're right! That got most of them. Now I'm seeing these errors:

MVO R1, .ISRVEC.0 ; 5140 0241 0100
baseball.asm:259: ERROR - undefined symbol .ISRVEC.0

MVO R0, .BTAB.62 ; 51C0 0240 0262
baseball.asm:344: ERROR - undefined symbol .BTAB.62

JSR R5, .EXEC.730 ; 51C9 0004 0114 0330
baseball.asm:350: ERROR - undefined symbol .EXEC.730

...etc,

Sorry, I was busy with work and some personal affairs.

 

In looking through the symbols generated, I see that this is not going to be as straightforward as I thought. For instance, the disassembler's source code uses a symbol called .EXEC with a base of $1000 and a size of $1000 words. The disassembled code then includes made up symbols that represent offsets from the base, such as .EXEC.730, which represents $730 words after the base, or address $1730. This means that whenever you see something like .EXEC.XXX, you'll have to take the "XXX" as a Hexadecimal value and add $1000.

 

The same is true for other symbols such as .STIC.X and .STIC.Y. I wish there was a way to disable these symbols from the code generation. I'll post the question in the programming forum.

 

In the meantime, attached is the updated and complete symbol table. Any further errors will have to be fixed manually based on the derived symbols.

 
; ------------------------------------------
; DEFAULT SYMBOL TABLE
; ------------------------------------------
.PSG0.chn_b_lo      EQU     $01F1
.PSG0.chn_c_lo      EQU     $01F2
.PSG0.envlp_lo      EQU     $01F3
.PSG0.chn_a_hi      EQU     $01F4
.PSG0.chn_b_hi      EQU     $01F5
.PSG0.chn_c_hi      EQU     $01F6
.PSG0.envlp_hi      EQU     $01F7
.PSG0.chan_enable   EQU     $01F8
.PSG0.noise         EQU     $01F9
.PSG0.envelope      EQU     $01FA
.PSG0.chn_a_vol     EQU     $01FB
.PSG0.chn_b_vol     EQU     $01FC
.PSG0.chn_c_vol     EQU     $01FD
.PSG0.rgt_hand      EQU     $01FE
.PSG0.lft_hand      EQU     $01FF
.PSG1.chn_a_lo      EQU     $00F0
.PSG1.chn_b_lo      EQU     $00F1
.PSG1.chn_c_lo      EQU     $00F2
.PSG1.envlp_lo      EQU     $00F3
.PSG1.chn_a_hi      EQU     $00F4
.PSG1.chn_b_hi      EQU     $00F5
.PSG1.chn_c_hi      EQU     $00F6
.PSG1.envlp_hi      EQU     $00F7
.PSG1.chan_enable   EQU     $00F8
.PSG1.noise         EQU     $00F9
.PSG1.envelope      EQU     $00FA
.PSG1.chn_a_vol     EQU     $00FB
.PSG1.chn_b_vol     EQU     $00FC
.PSG1.chn_c_vol     EQU     $00FD
.PSG1.rgt_hand      EQU     $00FE
.PSG1.lft_hand      EQU     $00FF
.ISRVEC             EQU     $0100
.BTAB               EQU     $0200
.GRAM               EQU     $3800
.GROM               EQU     $3000
.STIC.X             EQU     $0000
.STIC.Y             EQU     $0008
.STIC.A             EQU     $0010
.STIC.C             EQU     $0018
.STIC.VIDEN         EQU     $0020
.STIC.MODE          EQU     $0021
.STIC.CS            EQU     $0028
.STIC.BORD          EQU     $002C
.STIC.HDLY          EQU     $0030
.STIC.VDLY          EQU     $0031
.STIC.EDGE          EQU     $0032
.HEADER             EQU     $5000
.ISRRET             EQU     $1014
.EXEC               EQU     $1000
.UART               EQU     $00E0
.ECSRAM             EQU     $4000
.IV.ALD             EQU     $0080
.IV.FIFO            EQU     $0081
.ECSCBL.POLL        EQU     $CF01
.ECSCBL             EQU     $CF00
 
NULL                EQU     $0000
 
; ------------------------------------------
; EXEC ROUTINES
; ------------------------------------------
X_RESET             EQU     $1000
X_RET_R5            EQU     $1003
X_ISR               EQU     $1004
X_ISRRET            EQU     $1014
X_CHK_KBD_OR_CBL    EQU     $101D
X_INIT              EQU     $1026
X_READ_ROM_HDR      EQU     $10AB
X_DEF_ISR           EQU     $1126
 
X_RAND1             EQU     $167D
X_RAND2             EQU     $169E
 
X_INIT_MOB          EQU     $16B2
X_INIT_MOBS         EQU     $16B4
 
X_FILL_ZERO         EQU     $1738
X_FILL_MEM          EQU     $1741
X_PACK_BYTES        EQU     $174F
X_PACK_BYTES.1      EQU     $1750
X_UNPK_BYTES        EQU     $1757
X_UNPK_BYTES.1      EQU     $1758
 
X_GETNUM            EQU     $18FF
X_PRNUM_LFT         EQU     $189E
X_PRNUM_ZRO         EQU     $18AD
X_PRNUM_RGT         EQU     $18C5
 
X_PRINT_R1          EQU     $1867
X_PRPAD_R1          EQU     $186C
X_PRINT_R5          EQU     $187B
X_PRPAD_R5          EQU     $1871
 
X_EXT_SIGN_LO       EQU     $1668
X_EXT_SIGN_HI       EQU     $1669
X_CLAMP             EQU     $1670
X_SET_BIT           EQU     $16DB
X_CLR_BIT           EQU     $16E6
X_POW2              EQU     $1745
 
X_TIMER_STOP        EQU     $1838
X_TIMER_START       EQU     $1844
 
X_PLAY_NOTE         EQU     $1ABD
X_HUSH              EQU     $1AA8
X_PLAY_MUS1         EQU     $1B27
X_PLAY_MUS2         EQU     $1B5D
X_PLAY_MUS3         EQU     $1B95
X_PLAY_SFX1         EQU     $1BBB
X_PLAY_SFX2         EQU     $1BBE
 
X_SFX_OK            EQU     $1EAD
X_STOP_SFX          EQU     $1EB4
X_PLAY_RAZZ1        EQU     $1EBA
X_PLAY_RAZZ2        EQU     $1EBD
X_PLAY_RAZZ3        EQU     $1EC1
X_PLAY_RAZZ4        EQU     $1EC4
X_PLAY_RAZZ5        EQU     $1EC5
X_PLAY_CHEER1       EQU     $1ED5
X_PLAY_CHEER2       EQU     $1ED6
X_PLAY_WHST1        EQU     $1F1B
X_PLAY_WHST2        EQU     $1F1E
X_PLAY_WHST3        EQU     $1F22
 
X_MPY               EQU     $1DDC
X_DIV               EQU     $1DFB
X_DIVR              EQU     $1DF8
X_SQRT              EQU     $1E23
X_SQUARE            EQU     $1DDB
 
X_DO_GRAM_INIT      EQU     $1F2F
X_NEW_GRAM_INIT     EQU     $1F35

Sorry if I was not clear. You need to change something like ".EXEC.730" to "$1730". Essentially, convert the offset symbol to an absolute address.

 

Remember, it's not just adding $1000; it is adding the value defined as the base address for the symbol. In the case of ".EXEC.730" we can infer it from the constant directive:

 

.EXEC.   EQU. $1000

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...