|
Subject: [stella] help with: move this From: Maxime Beauvais <maximebeauvais@xxxxxxxxx> Date: Mon, 5 Nov 2001 11:57:59 -0800 (PST) |
Hi,
I'm still in the learning stage of the atari
programming.I did some experience with playfiefd
source code and it was fun.
However, I have an problem with move source code.
1- I try to distalla bigmove.bin to bigmove.src
However I get a .a65 source code? what is this?
Normally I used the .asm. THANKS
2- I found an other version of bigmove. However I'm
not able to dasm this source code
here is the source code. can you help me. Wher is the
error? THANKS!!!!
processor 6502
include vcs.h
scanctr = $91 ; variable used to count scanlines
(looking for scanline 95)
; the Y registerwill be used to count
scanlines from 191 -
;
; variable (scanctr)
; will count from 0 - 191. When Y
meets scanctr, then we are at
; scanline 95 and it's time to draw
our sprite.
; *** usual initialize
Start
SEI ; Disable interrupts, if there are any.
CLD ; Clear BCD math bit.
LDX #$FF
TXS ; Set stack to top of RAM.
LDA #0 ;Zero everything except VSYNC.
B1 STA 0,X
DEX
BNE B1
MainLoop
JSR VerticalBlank ;Execute the vertical blank.
JSR CheckSwitches ;Check console switches.
JSR GameCalc ;Do calculations during Vblank
JSR DrawScreen ;Draw the screen
JSR OverScan ;Do more calculations during
overscan
JMP MainLoop ;Continue forever.
VerticalBlank ;Beginning of the frame - at
the end of overscan.
LDA #2 ;VBLANK was set at the
beginning of overscan.
STA WSYNC
STA WSYNC
STA WSYNC
STA VSYNC ;Begin vertical sync.
STA WSYNC ; First line of VSYNC
STA WSYNC ; Second line of VSYNC.
LDA #44 ;Set timer to activate during the
last line of VBLANK.
STA TIM64T
;
; Now we can end the VSYNC period.
;
LDA #0
STA WSYNC ; Third line of VSYNC.
STA VSYNC ; Writing zero to VSYNC ends vertical
sync period.
RTS
CheckSwitches
LDA #0 ;Clear collision latches
STA CXCLR ;In a real game, we'd probably
check the collision
;registers before clearing them.
LDA SWCHA ;Read joystick 0
STA Joystick0 ;Store for later use
RTS
GameCalc
LDA #0
STA COLUBK ;Background will be black.
LDA Joystick0 ;Load the joystick switches
AND #$F0 ;Only care about top four bits, which
is joystick 0
CMP #$F0 ;If top four=1111, stick centered,
don't change
BEQ NoStick
LDA #$88 ;otherwise, make the background medium
blue
STA COLUBK
NoStick
LDA #$55 ;Alternate pixels: 01010101 = $55
STA PF0
STA PF2 ;Store alternating bit pattern to the
playfield registers
ASL ;Because PF1 displays in the opposite
bit order from PF0
STA PF1 ;and PF2, we need 10101010 instead of
01010101.
LDA #1
STA CTRLPF ;Let's reflect the playfield just
cause we feel like it
STA RESP0 ; SCOTT
RTS
DrawScreen
LDA INTIM
BNE DrawScreen ;Loops until the timer is done -
that means we're
;somewhere in the last line of
vertical blank.
STA WSYNC ;End the current scanline - the
last line of VBLANK.
STA VBLANK ;End the VBLANK period. The TIA
will display stuff
;starting with the next scanline.
We do have 23 cycles
;of horizontal blank before it
displays anything.
LDY #192 ;We're going to use Y to count
scanlines.
;Everything is already set, so let's just count
scanlines.
;We're at the beginning of WBLANK of the first TV line
right here.
ScanLoop
STY COLUPF ;Keep changing the playfield color
every line for some
;neat-looking stripes.
STA WSYNC ;Wait for end of scanline
INC scanctr ; increment our scanline ctr
DEY
LDA Y
CMP #$91 ; compare the Y register to value
in memory location $91
BEQ drawSprite ; get rid of this if things start
breaking
BNE ScanLoop ;Count scanlines.
RTS
drawSprite ; I'm trying to load the 8 bytes of
sprite data at end of file
LDX $08 ; <= I GET A SYNTAX ERROR HERE!!!
Al I'm trying to do is load the X register with hex
value 8
cont STA WSYNC
LDA Sprite,X
STA GP0
DEX
BNE cont
RTS
OverScan ;We've got 30 scanlines to kill.
LDX #30 ;In a real game, we'd probably be
doing calculations
Sprite
.byte %11111000 ; this is a goofy looking
ship
.byte %00100110
.byte %11111111
.byte %00111110
.byte %11100100
.byte %00101000
.byte %11111000
.byte %00000000
; Starting positions for PC
org $FFFC
.word Start
.word Start
__________________________________________________
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com
----------------------------------------------------------------------------------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [stella] Adventure Decompilation (E, Joel Park | Thread | Re: [stella] help with: move this, Manuel Polik |
| Re: [stella] Line Labels/Memory Loc, Joel Park | Date | [stella] Adventure Disassembly, Glenn Saunders |
| Month |