| |
turtle Account closed
Registered: Mar 2005 Posts: 44 |
How to split the screen horizontally ?
........
No problem, to split the screen vertically, through the use of $ d012
..................
graphic
lda # $ 60
aa cmp $ d012
bne aa
text
........
|
|
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
it works exactly the same, except you need cycle exact timing. (that said, it doesnt really work terribly well with $d011 ... try $d021 first to get the idea, and to get the timing right). |
| |
turtle Account closed
Registered: Mar 2005 Posts: 44 |
someone who has a small example? |
| |
Cybernator
Registered: Jun 2002 Posts: 154 |
1000 78 SEI
1001 A9 00 LDA #$00
1003 8D 11 D0 STA $D011
1006 A9 06 LDA #$06
1008 A2 04 LDX #$04
100a 8D 20 D0 STA $D020
100d A0 05 LDY #$05
100f 88 DEY
1010 D0 FD BNE $100F
1012 EA NOP
1013 8E 20 D0 STX $D020
1016 A0 04 LDY #$04
1018 88 DEY
1019 D0 FD BNE $1018
101b 24 00 BIT $00
101d 4C 0A 10 JMP $100A
This one simply switches the border color. (Try hitting RESTORE repeatedly. :)) Making a graphics/text split gets more involved. Since you can't make a split in a middle of a badline, you'll have to abort (yes, begin then abort) the badlines. Also, the modes won't work the way you probably expect since the VIC won't do any C-accesses.
|
| |
null Account closed
Registered: Jun 2006 Posts: 645 |
uhm. wouldn't a horizontal be much easier than vertical?
becauase, afaik:
left to right == horizontal
top to bottom == vertical.
...or I just misunderstand the question..
------------------------------------
http://zomgwtfbbq.info |
| |
Trooper
Registered: Sep 2002 Posts: 39 |
SEI
nope1 lda $d012 ;these lines check
raster1 cmp #$80 ;the raster and wait
bne nope1 ;until it reaches the point
LDA #$01
STA $D020
nope2 lda $d012 ;these lines check
raster2 cmp #$90 ;the raster and wait
bne nope2 ;until it reaches the point
lda #$02
sta $d020
ldx #$50
slowdown dex
bpl slowdown
inc raster1+1
inc raster2+1
JMP nope1
|
| |
Mace
Registered: May 2002 Posts: 1799 |
Quote: uhm. wouldn't a horizontal be much easier than vertical?
becauase, afaik:
left to right == horizontal
top to bottom == vertical.
...or I just misunderstand the question..
------------------------------------
http://zomgwtfbbq.info
Yeah, left to right == horizontal, but if you want left and right to be different (i.e. split), it's vertical ;-) |
| |
iAN CooG
Registered: May 2002 Posts: 3197 |
*=$0801
word eop
word 7102
byte $9e,[startprg]d,0
eop
word 0
startprg
sei
lda #$35
sta $01
lda #$7f
sta $dc0d
lda $dc0d
lda #<irq
sta $fffe
lda #>irq
sta $ffff
lda #<nmi
sta $fffa
lda #>nmi
sta $fffb
lda #$18
sta $d012
lda #$0b
sta $d011
lda #01
sta $d01a
sta $d019
cli
jmp *
irq
inc $d019
sta sa+1
stx sx+1
sty sy+1
nop
bit $24
bit $24
bit $24
bit $24
bit $24
bit $24
bit $24
bit $24
bit $24
bit $24
bit $24
lda #$00
sta $ff
startpiece
lda #$05
ldx #$01
ldy #$02
sta $d020
bit $24
bit $24
bit $24
stx $d020
bit $24
bit $24
bit $24
bit $24
sty $d020
bit $24
bit $24
nop
lda #$00
sta $d020
nop
endpiece
dec $ff
bne startpiece
nop
sa lda #00
sx ldx #00
sy ldy #00
nmi rti
|
| |
turtle Account closed
Registered: Mar 2005 Posts: 44 |
Quote:
*=$0801
word eop
word 7102
byte $9e,[startprg]d,0
eop
word 0
startprg
sei
lda #$35
sta $01
lda #$7f
sta $dc0d
lda $dc0d
lda #<irq
sta $fffe
lda #>irq
sta $ffff
lda #<nmi
sta $fffa
lda #>nmi
sta $fffb
lda #$18
sta $d012
lda #$0b
sta $d011
lda #01
sta $d01a
sta $d019
cli
jmp *
irq
inc $d019
sta sa+1
stx sx+1
sty sy+1
nop
bit $24
bit $24
bit $24
bit $24
bit $24
bit $24
bit $24
bit $24
bit $24
bit $24
bit $24
lda #$00
sta $ff
startpiece
lda #$05
ldx #$01
ldy #$02
sta $d020
bit $24
bit $24
bit $24
stx $d020
bit $24
bit $24
bit $24
bit $24
sty $d020
bit $24
bit $24
nop
lda #$00
sta $d020
nop
endpiece
dec $ff
bne startpiece
nop
sa lda #00
sx ldx #00
sy ldy #00
nmi rti
word eop
word 7102
byte $9e,[startprg]d,0
word 0
dont work to type in assembler ?
this rutine make raster that is cros on the screen.?
i want to have text on the left and gfx on the right =) |
| |
Frantic
Registered: Mar 2003 Posts: 1648 |
Oh... so you want to do a vertical split. ;) |
| |
Stainless Steel
Registered: Mar 2003 Posts: 966 |
For ACME compatible xcompilers, try this :
*=$5000
sei
lda #$35
sta $01
lda #$7f
sta $dc0d
lda $dc0d
lda #<irq
sta $fffe
lda #>irq
sta $ffff
lda #<nmi
sta $fffa
lda #>nmi
sta $fffb
lda #$18
sta $d012
lda #$0b
sta $d011
lda #01
sta $d01a
sta $d019
cli
jmp *
irq
inc $d019
sta sa+1
stx sx+1
sty sy+1
nop
bit $24
bit $24
bit $24
bit $24
bit $24
bit $24
bit $24
bit $24
bit $24
bit $24
bit $24
lda #$00
sta $ff
startpiece
lda #$00
ldx #$02
ldy #$07
sta $d020
bit $24
bit $24
bit $24
stx $d020
bit $24
bit $24
bit $24
bit $24
sty $d020
bit $24
bit $24
nop
lda #$01
sta $d020
nop
endpiece
dec $ff
bne startpiece
nop
sa lda #00
sx ldx #00
sy ldy #00
nmi rti
just jump to $5000 once the file is loaded.
|
... 30 posts hidden. Click here to view all posts.... |
Previous - 1 | 2 | 3 | 4 - Next |