Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Can we please...

Reply to topic
Author Message
  • Joined: 12 Jul 1999
  • Posts: 882
Reply with quote
Can we please...
Post Posted: Wed Jul 28, 1999 9:28 am
Can we please get back to the purpose of this developers forum instead of becoming a therapy centre? (Sorry, no offence Chris :)

I'll start the ball rolling...
How do I compile that Snail game music?
That TASM compiler just gives me 68 errors:


0089 0000 .ORG START
0090 0000 ; This code contains standard SMS initialization routines.
0091 0000 DI ; Disable Interrupts
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0091: unrecognized instruction. (DI)
0092 0000 IM 1 ; Interrupt Mode 1
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0092: unrecognized instruction. (IM)
0093 0000 LD SP, $D000 ; Initialize stack pointer
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0093: unrecognized instruction. (LD)
0094 0000 LD HL, $FFFD
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0094: unrecognized instruction. (LD)
0095 0000 LD (HL), $00 ; Map ROM page 0
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0095: unrecognized instruction. (LD)
0096 0000 INC HL
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0096: unrecognized instruction. (INC)
0097 0000 LD (HL), $01 ; Map ROM page 1
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0097: unrecognized instruction. (LD)
0098 0000 INC HL
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0098: unrecognized instruction. (INC)
0099 0000 LD (HL), $00 ; Map ROM page 0
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0099: unrecognized instruction. (LD)
0100 0000 JP MAIN
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0100: unrecognized instruction. (JP)
0101 0038 .ORG INTERRUPT_HANDLER_OFFSET
0102 0038 DEC C ; Decrement duration counter
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0102: unrecognized instruction. (DEC)
0103 0038 JR Z, NEXT_NOTE ; If counter is 0, then play next note
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0103: unrecognized instruction. (JR)
0104 0038 LD A, C
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0104: unrecognized instruction. (LD)
0105 0038 CP DURATION_BETWEEN_NOTES ; Play short silence between notes.
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0105: unrecognized instruction. (CP)
0106 0038 JR NZ, I_HANDLER_DONE
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0106: unrecognized instruction. (JR)
0107 0038 ; Silence sound channel 0 for inter-note break.
0108 0038 LD A, SOUND_VOLUME_WRITE
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0108: unrecognized instruction. (LD)
0109 0038 OR SOUND_CHANNEL_0
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0109: unrecognized instruction. (OR)
0110 0038 OR SOUND_VOLUME_OFF
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0110: unrecognized instruction. (OR)
0111 0038 OUT (PSG_PORT), A
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0111: unrecognized instruction. (OUT)
0112 0038 JR I_HANDLER_DONE
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0112: unrecognized instruction. (JR)
0113 0038 NEXT_NOTE:
0114 0038 ; Turn sound channel 0 back on.
0115 0038 LD A, SOUND_VOLUME_WRITE
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0115: unrecognized instruction. (LD)
0116 0038 OR SOUND_CHANNEL_0
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0116: unrecognized instruction. (OR)
0117 0038 OR SOUND_VOLUME_LOUDEST
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0117: unrecognized instruction. (OR)
0118 0038 OUT (PSG_PORT), A
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0118: unrecognized instruction. (OUT)
0119 0038 ; Load low frequency bits
0120 0038 LD A, (HL)
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0120: unrecognized instruction. (LD)
0121 0038 OR SOUND_FREQUENCY_WRITE_LO
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0121: unrecognized instruction. (OR)
0122 0038 OR SOUND_CHANNEL_0
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0122: unrecognized instruction. (OR)
0123 0038 OUT (PSG_PORT), A
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0123: unrecognized instruction. (OUT)
0124 0038 ; Point to next byte in music data table.
0125 0038 ; Register D contains the count of bytes accessed in music
0126 0038 ; data table. This count is used to determine when end
0127 0038 ; of music data is reached so song can be repeated.
0128 0038 INC HL
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0128: unrecognized instruction. (INC)
0129 0038 INC D
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0129: unrecognized instruction. (INC)
0130 0038 ; Load high frequency bits
0131 0038 LD A, (HL)
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0131: unrecognized instruction. (LD)
0132 0038 OR SOUND_FREQUENCY_WRITE_HI
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0132: unrecognized instruction. (OR)
0133 0038 OR SOUND_CHANNEL_0
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0133: unrecognized instruction. (OR)
0134 0038 OUT (PSG_PORT), A
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0134: unrecognized instruction. (OUT)
0135 0038 ; Load duration counter.
0136 0038 INC HL
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0136: unrecognized instruction. (INC)
0137 0038 INC D
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0137: unrecognized instruction. (INC)
0138 0038 LD C, (HL)
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0138: unrecognized instruction. (LD)
0139 0038 INC HL
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0139: unrecognized instruction. (INC)
0140 0038 INC D
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0140: unrecognized instruction. (INC)
0141 0038 ; Check if at we're at the end of the music data table.
0142 0038 LD A, D
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0142: unrecognized instruction. (LD)
0143 0038 CP (END_MUSIC_DATA_TABLE-MUSIC_DATA_TABLE+3)
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0143: unrecognized instruction. (CP)
0144 0038 JR NZ, I_HANDLER_DONE
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0144: unrecognized instruction. (JR)
0145 0038 ; If we are set HL to point back to beginning.
0146 0038 ; Clear D
0147 0038 ; Set C to allow a short break between songs.
0148 0038 LD HL, MUSIC_DATA_TABLE
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0148: unrecognized instruction. (LD)
0149 0038 LD D, $00
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0149: unrecognized instruction. (LD)
0150 0038 LD C, DURATION_INTRO
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0150: unrecognized instruction. (LD)
0151 0038 ; Silence sound channel 0.
0152 0038 LD A, SOUND_VOLUME_WRITE
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0152: unrecognized instruction. (LD)
0153 0038 OR SOUND_CHANNEL_0
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0153: unrecognized instruction. (OR)
0154 0038 OR SOUND_VOLUME_OFF
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0154: unrecognized instruction. (OR)
0155 0038 OUT (PSG_PORT), A
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0155: unrecognized instruction. (OUT)
0156 0038 I_HANDLER_DONE:
0157 0038 EI
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0157: unrecognized instruction. (EI)
0158 0038 RETI
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0158: unrecognized instruction. (RETI)
0159 1000 .ORG MAIN
0160 1000 ; Turn on VBlank interrupt
0161 1000 XOR A
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0161: unrecognized instruction. (XOR)
0162 1000 LD A, VDPREG1_VSYNC_FLAG
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0162: unrecognized instruction. (LD)
0163 1000 OUT (VDP_ADDRESS_PORT), A
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0163: unrecognized instruction. (OUT)
0164 1000 LD A, VDP_REG_WRITE
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0164: unrecognized instruction. (LD)
0165 1000 OR VDP_REG_1
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0165: unrecognized instruction. (OR)
0166 1000 OUT (VDP_ADDRESS_PORT), A
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0166: unrecognized instruction. (OUT)
0167 1000
0168 1000 ; Set up sound channel 0 volume.
0169 1000 LD A, SOUND_VOLUME_WRITE
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0169: unrecognized instruction. (LD)
0170 1000 OR SOUND_CHANNEL_0
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0170: unrecognized instruction. (OR)
0171 1000 OR SOUND_VOLUME_LOUDEST
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0171: unrecognized instruction. (OR)
0172 1000 OUT (PSG_PORT), A
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0172: unrecognized instruction. (OUT)
0173 1000 ; Set up music pointer and counters.
0174 1000 ; HL register is pointer, BC is duration counter.
0175 1000 LD D, $00
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0175: unrecognized instruction. (LD)
0176 1000 LD HL, MUSIC_DATA_TABLE
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0176: unrecognized instruction. (LD)
0177 1000 LD C, $01
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0177: unrecognized instruction. (LD)
0178 1000 EI
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0178: unrecognized instruction. (EI)
0179 1000 ; Start loop
0180 1000 MAIN_LOOP:
0181 1000 JR MAIN_LOOP
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0181: unrecognized instruction. (JR)
0182 1000 HALT
C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0182: unrecognized instruction. (HALT)

Untill right at the end:

C:YASDNILGAMESSEGA8-BIT_~1SNAIL.ASM line 0290: No END directive before EOF.
tasm: Number of errors = 68

What's going on?
  View user's profile Send private message
Eric
  • Guest
Reply with quote
Post Posted: Wed Jul 28, 1999 3:29 pm
Quote
> Can we please get back to the purpose of this developers forum instead of becoming a therapy centre? (Sorry, no offence Chris :)

> I'll start the ball rolling...
> How do I compile that Snail game music?
> That TASM compiler just gives me 68 errors:

[code cut-out]

Quote
> What's going on?

Probably you are using different command-line switches. TASM is can be used to assemble code for a variety of microprocessors. I don't know what the default processor is, but I'm sure it's not the Z80.

Try this command-line:

tasm -80 -b snail.asm

The -80 means Z80. The -b means a raw binary object file. TASM will create snail.obj simply rename this file snail.sms

That shoud do it.

Also, this version only runs on Massage. I've got a newer version which works on both Massage and BrSMS, but I can't get it to work on Meka. Once it works on all three of those emulators I'll re-post it.

Eric
 
  • Joined: 24 Jun 1999
  • Posts: 1732
  • Location: Paris, France
Reply with quote
Post Posted: Wed Jul 28, 1999 9:47 pm
Didn't read Eric's answer yet, but I suppose he answered the same thing.
You obviously didn't compiled in Z80 mode. the Table Assembler supports several CPU.
  View user's profile Send private message Visit poster's website
  • Joined: 12 Jul 1999
  • Posts: 882
Reply with quote
Post Posted: Thu Jul 29, 1999 4:28 am
Hmm...
I tried the way the page I got it from tells me, but it came up with the error "No END before EOF"
  View user's profile Send private message
Eric
  • Guest
Reply with quote
Post Posted: Thu Jul 29, 1999 6:02 am
Quote
> Hmm...
> I tried the way the page I got it from tells me, but it came up with the error "No END before EOF"

The very last line should be:

.END

and only that. The period (.) should (probably) be the very first character on the line.

Does your version have this as the last line? (In other words, are you sure you grabbed the whole file?)

Eric
 
Chris
  • Guest
Reply with quote
Tasm
Post Posted: Thu Jul 29, 1999 6:27 am
Even I could compile it. Just read and figure it out. I'm not trying to be mean or sarcastic but
that assembler is layed out like a road map. Here's the simpliest way to compile a Z80 assembler
source:


tasm snail.asm -80 -b

The parameter 80 means use the Z80 conversion table and the b means convert into prue
z80 binary instructions. When I compiled it I got the same list of errors. I said, "This cannot
be. All of these instructions make sense." I even looked in my Z80 Assembler Cookbook
and found the instructions valid. Then I remembered: Table Assembler. Mabye this assembler
can assemble different types of processors. So I typed:


tasm


And sure enough it gave me a list of the optional parameters and a small description of it's
effects. That thing is amazing. You can compile 8080, 6502, Z80, just about all the 8-bit
processors. I think it's a whole lot easier to use than Microsoft Assembler. If I ever become
wise enough to build an assembler, I'll keep that baby in mind.

Chris :o)
 
  • Joined: 12 Jul 1999
  • Posts: 882
Reply with quote
Post Posted: Thu Jul 29, 1999 11:18 am


Quote
> The very last line should be:

> .END

> and only that. The period (.) should (probably) be the very first character on the line.

> Does your version have this as the last line? (In other words, are you sure you grabbed the whole file?)

> Eric

Yes, but it still prints this out:

C:UnfnknblvblGamesSega8-bit_dev>tasm -80 -b snail.asm
TASM Z80 Assembler. Version 3.0.1 June, 1994.
Copyright (C) 1985-1994 by Speech Technology Incorporated
tasm: pass 1 complete.
snail.asm line 0290: No END directive before EOF.
tasm: pass 2 complete.
tasm: Number of errors = 1

C:UnfnknblvblGamesSega8-bit_dev>

And here is the last few lines of my snail,asm;

END_MUSIC_DATA_TABLE:
.ORG HEADER_OFFSET
.DB "TMR MESA" ; Tradmark
.DW 9919h ; Year
.DW 0000h ; Checksum not correct
.DW 0000h ; Part Num not correct
.DW 2107h ; Day / Month
.ORG LAST_PAGE_OFFSET
.END

I don't get it!
What's up?
~unfnknblvbl
  View user's profile Send private message
Eric
  • Guest
Reply with quote
Post Posted: Thu Jul 29, 1999 5:09 pm
Quote
> Yes, but it still prints this out:

> C:UnfnknblvblGamesSega8-bit_dev>tasm -80 -b snail.asm
> TASM Z80 Assembler. Version 3.0.1 June, 1994.
> Copyright (C) 1985-1994 by Speech Technology Incorporated
> tasm: pass 1 complete.
> snail.asm line 0290: No END directive before EOF.
> tasm: pass 2 complete.
> tasm: Number of errors = 1

> C:UnfnknblvblGamesSega8-bit_dev>

> And here is the last few lines of my snail,asm;

> END_MUSIC_DATA_TABLE:
> .ORG HEADER_OFFSET
> .DB "TMR MESA" ; Tradmark
> .DW 9919h ; Year
> .DW 0000h ; Checksum not correct
> .DW 0000h ; Part Num not correct
> .DW 2107h ; Day / Month
> .ORG LAST_PAGE_OFFSET
> .END

> I don't get it!
> What's up?

I don't get it either. It is very likely that you are using a different TASM. I know there are quite a few assemblers named TASM out there, all for different CPU's. I'll check into to it and get back to you.

For the time being you could try just "END" (no period) as the last line.

Eric
 
  • Joined: 12 Jul 1999
  • Posts: 882
Reply with quote
Post Posted: Thu Jul 29, 1999 5:29 pm
Yeah.
I tried it anyway, and it worked.
  View user's profile Send private message
Reply to topic



Back to the top of this page

Back to SMS Power!