Commodore64 C64 SPRITE SCROLLER IN BORDER

  Рет қаралды 5,855

Tony P

Tony P

Күн бұрын

I got side border version out • C64 COED BAKERY sprite...
Source Code here:
www.lemon64.co...
As doublewide sprite is 48pixel, I slice up the work in small snippets spaced out over 48frames, so no workload spikes.
jumptable
WORD sprsetup, color, skip, skip ; 1-4
WORD skip, color, skip, skip ; 5-8
WORD gettext1, color, skip, skip ; 9-12
WORD gettext2, color, skip, skip ; 13-16
WORD gettext3, color, skip, skip ; 17-20
WORD copyfonts, color, skip, skip ; 21-24
WORD skip, color, skip, skip ; 25-28
WORD skip, color, skip, removmsb ; 29-32
WORD skip, color, skip, skip ; 33-36
WORD skip, color, skip, skip ; 37-40
WORD skip, color, skip, skip ; 41-44
WORD skip, color, skip, addmsb ; 45-48

Пікірлер: 21
@tonysofla
@tonysofla 2 жыл бұрын
More advanced version: kzbin.info/www/bejne/naDNp5RjnLqAjqc
@MiccaPhone
@MiccaPhone 2 жыл бұрын
A Sprit SCOLLER without an "R" :-D
@tonysofla
@tonysofla 2 жыл бұрын
I noticed it too, after I uploaded it.
@dr.ignacioglez.9677
@dr.ignacioglez.9677 2 жыл бұрын
I REALLY LOVE C64 👍🥂🎩
@cbmeeks
@cbmeeks 2 жыл бұрын
Pretty awesome. Where did you get that music? I've been hearing it a lot in Commodore related videos (even a CoCo one too).
@tonysofla
@tonysofla 2 жыл бұрын
KZbin library, I searched 8bit
@CoolDudeClem
@CoolDudeClem 3 жыл бұрын
The only thing this video needs is a SID rendition of the music.
@drlegendre
@drlegendre 3 жыл бұрын
Nifty!
@JustWasted3HoursHere
@JustWasted3HoursHere 2 жыл бұрын
As Robin from "8 Bit Show & tell" said recently, removing the top and bottom borders is tricky but fairly doable by most people if they're careful. But removing the side borders - without glitches - is VERY tricky because timing must not only be exact but it must accommodate actions that can cause extra or fewer cycles to throw a wrench in the timing. I don't think I've ever seen even a demo remove ALL borders with anything consequential happening on the screen.
@tonysofla
@tonysofla 2 жыл бұрын
If you look at my lemon64 link, I was able to open sideborder too in last post, first you need stable raster, I used double irq to get from 0-7cycle jitter down to 0-1 jitter with nop's and finaly 0 jitter by checking raster line.
@tonysofla
@tonysofla 2 жыл бұрын
postimg.cc/0KdGXBP1
@JustWasted3HoursHere
@JustWasted3HoursHere 2 жыл бұрын
@@tonysofla It is quite tricky though, especially if you have changing sprite characteristics that can change how many cycles the VIC is using on the fly. Very impressive though!
@DavidSpitzerLawDog
@DavidSpitzerLawDog 3 жыл бұрын
Cool scoller
@meneerjansen00
@meneerjansen00 3 жыл бұрын
This looks really cool! Maybe one can scroll the latest news or the weather forecast whilst programming in BASIC. Would be insanely slow, I think but during the typing in of code, why not? 😃 Come to think of it, how you stop the prog to go on with other things C64? Reset the computer?
@tonysofla
@tonysofla 3 жыл бұрын
FRAME 32, this had to be done exact here as sprite7 starts with a x value msb+31, uses a table as generate mask from sprindex would probably use more bytes. Also move out of view sprite snug against the end of the sprite-conveyer-belt removmsb LDA sprindex ; after 32 scrolls a sprite crosses below msb TAY ASL A ; double it TAX LDA #95 ; also move most left sprite STA $D000,x ; to the right side as all under border LDA $D010 AND remtable,y STA $D010 JMP taskexit remtable BYTE %10111111, %01111111, %11111110, %11111101 BYTE %11111011, %11110111, %11101111, %11011111
@TamasKalman
@TamasKalman 2 жыл бұрын
awesome video - what is the sound track pls?
@tonysofla
@tonysofla 3 жыл бұрын
FRAME 2,6... every 4th frame, uses redundant repeated table, as having a check in inner-loop is best avoidable. color LDX #0-0 ; 0 to 7 INX CPX #8 BNE _notendcol LDX #0 _notendcol STX color+LB LDY #7 _colloop LDA colortable,x STA $D027,y ; sprite0 color + y INX DEY BPL _colloop JMP taskexit colortable BYTE 1,15,12,11,11,12,15,1 , 1,15,12,11,11,12,15 ;repeat 7 bytes
@tonysofla
@tonysofla 3 жыл бұрын
FRAME 21 (as Sprite is now behind border out of view) copy 3 rom chars to sprite in one go, counting down is faster so do it backwards. copyfonts LDA #$33 ; make the CPU see the Character Generator ROM STA $01 ; at $D000 LDX #7 ; copy chars to sprite in one swoop LDY #23 ; 3rd column 8th row in a sprite source3 LDA $d018,x ; do this while sprite is all under border dest3 STA $3080,y DEY source2 LDA $d010,x dest2 STA $3080,y DEY source1 LDA $d008,x dest1 STA $3080,y DEY ; third dey DEX ; one dex BPL source3 ; if less than zero stop LDA #$37 ; switch in I/O mapped registers again STA $01 ; so vic can see them JMP taskexit
@tonysofla
@tonysofla 3 жыл бұрын
FRAME 48, last frame, Sprite1 has now crossed in to negative (left side) range and need msb set, also increase sprite index first. addmsb LDA sprindex CLC ADC #1 AND #7 ; so increse sprite index 0-7 STA sprindex TAY ; backit up to y ASL A ; double it TAX ; move it to x _palfix LDA #$ff ; $f7 is equal -1 under PAL system STA $D000,x ; x-pos was a $ff value LDA $D010 ; so under ntsc nothing change ORA addtable,y ; now move the sprite to the negative range STA $D010 ; that is all the way to the left TXA JMP taskexit addtable BYTE %00000001, %00000010, %00000100, %00001000 BYTE %00010000, %00100000, %01000000, %10000000
@tonysofla
@tonysofla 3 жыл бұрын
FRAME1: sprsetup LDA sprindex ; first entry 321 LSR A ; 00000032 (1) ROR A ; 10000003 (2) ROR A ; 21000000 (3) the 3 is used in HB STA dest1+LB ; 0, 64, 128 or 192 STA dest2+LB STA dest3+LB LDA #>sprdata ; get HB of sprite data loc ADC #0 ; use (if) carry from the 3 STA dest1+HB ; 0, 64, 128 or 192 STA dest2+HB STA dest3+HB JMP taskexit
@tonysofla
@tonysofla 3 жыл бұрын
FRAME 9, 13, 17 (not really important where) gettext1 LDX #source1-source3 ; sprite is filled in from bottom right.. BYTE $2C ; the BIT opcode skip trick gettext2 LDX #source2-source3 ; ...to top left so source3 is first BYTE $2C gettext3 LDX #source3-source3 ; yes it would be zero _thechar LDY #0-0 ; char pointer LDA mytext,y ; get char CMP #$ff ; end of text so can use 0-to-254 petscii BNE _noendtxt ; replace these two lines w/ BPL for cbm style LDA #32 ; replace w/ space, use AND #127 for cbm style LDY #-1 ; iny below makes it 0 max 256 charters for now _noendtxt INY STY _thechar+LB ; next char on return TAY ; 87654321 ASL A ; 76543210 = x2 ASL A ; 65432100 = x4 ASL A ; 54321000 = x8 STA source3+LB,x ; store it in copyfonts 1 to 3 TYA ; 87654321 LSR A ; 08765432 LSR A ; 00876543 LSR A ; 00087654 LSR A ; 00008765 LSR A ; 00000876 ORA #$D0 ; char rom block start at $D000 STA source3+HB,x ; store it in copyfonts 1 to 3 JMP taskexit
The Amazing Programming Language Lost For 40 Yrs: C64 Microtext
39:27
Retro Recipes
Рет қаралды 141 М.
Good teacher wows kids with practical examples #shorts
00:32
I migliori trucchetti di Fabiosa
Рет қаралды 12 МЛН
Стойкость Фёдора поразила всех!
00:58
МИНУС БАЛЛ
Рет қаралды 7 МЛН
Conductive
18:18
ExtraHolidayGames
Рет қаралды 1
TAS Explained: Super Mario Bros. 3 in 0.2 seconds
19:39
100th Coin
Рет қаралды 295 М.
Maybe the BEST C64 Demo I have yet seen !
16:44
gazzaka
Рет қаралды 99 М.
Map Men vs. Geoguessr
28:07
Jay Foreman
Рет қаралды 908 М.
Retro Programming - Creating sprites on the C64
20:11
No Name
Рет қаралды 15 М.
The Incredible Musical Keyboard for the Commodore 64
9:43
8-Bit Keys
Рет қаралды 677 М.
Can Windows XP Run Minecraft 1 21?
44:40
ChrisPro
Рет қаралды 991 М.
Modern Tools for Commodore 64 Sprite Animation - Byron Stout
37:48
Vintage Computer Federation
Рет қаралды 3,7 М.
All the Commodore 64 KERNAL Revisions: Bugs, Fixes, and More!
29:39
8-Bit Show And Tell
Рет қаралды 47 М.