Traxx Posted August 10, 2022 Share Posted August 10, 2022 Going to start showing my progress,with Eagle's help with sharing knowledge 3 Quote Link to comment Share on other sites More sharing options...
Traxx Posted August 10, 2022 Share Posted August 10, 2022 (edited) I learnt so much from you,I took a look at a commercial game in mame debugger and understood what was happening Edited August 10, 2022 by Traxx 4 Quote Link to comment Share on other sites More sharing options...
Traxx Posted August 10, 2022 Share Posted August 10, 2022 (edited) I know a pixel artist from c64 dev scene I can put you in touch with,he is looking for a programmer that want's to code on a platformer,that's you! Incorrect thread apologies Edited August 10, 2022 by Traxx 3 Quote Link to comment Share on other sites More sharing options...
Eagle Posted August 10, 2022 Share Posted August 10, 2022 I hope you guys well after last scroll. Today I would like to show you Vertical scroll in direct mode + 16 sprites/objects Source code in Mads attached Enjoy @Traxx ok. But first I have to go back to Robbo next week Direct mode Vertical scroll + 16 sprites - link to JS7800 most important part of code for this example update_scroll lda firstline and #$0F cmp #$0F ;put zero beq @+ inc firstline dec lastline ;change addres of tiles in last line lda firstline and #$0F ora #$E0 ; MSB Maria bank for tiles :13 sta line9+2+[#*4] ; hehe don't ask ;) MADS is cool and #$0F eor #$0F sta y_offset ; need for correction spritest Y rts @ lda #$0F sta y_offset ;=0 need for correction spritest Y lda #$40 ;1 line + Holey DMA sta firstline lda #$4F sta lastline ;copy tile row down ldx #$00 @ lda line8,x sta line9,x lda line7,x sta line8,x lda line6,x sta line7,x lda line5,x sta line6,x lda line4,x sta line5,x lda line3,x sta line4,x lda line2,x sta line3,x lda line1,x sta line2,x lda line0,x sta line1,x inx ;copy tile colour down as well lda line8,x sta line9,x lda line7,x sta line8,x lda line6,x sta line7,x lda line5,x sta line6,x lda line4,x sta line5,x lda line3,x sta line4,x lda line2,x sta line3,x lda line1,x sta line2,x lda line0,x sta line1,x :3 inx ;skip 4 bytes (1+3) cpx #13*4 ;13 tiles * 4 byte DL bne @- lda firstline and #$0F ora #$E0 ;MSB Maria bank for tiles :13 sta line9+2+[#*4] ;put new tiles row on Top of screen (line0) ldx #$00 @ lda Random and #$0F ;from 0-15 ;multiply x3 because Tiles are 3 bytes width sta temp ;=*1 asl @ ;=*2 clc adc temp ;=*3 sta Line0,x ;get random pallet for Tile lda Random and #$E0 ;we use only highest 3 bits for pallet ora #$1D ;ora width of tile (3 bytes) sta Line0+1,x :4 inx ;4 times INX cpx #13*4 bne @- rts directmodescrollvertical.a78 DirectModeScrollVertical.zip 6 1 Quote Link to comment Share on other sites More sharing options...
Traxx Posted August 10, 2022 Share Posted August 10, 2022 (edited) I just got done with your first working code example brother,and learnt a massive amount.What's your first name Eagle,I'm Richard.I'd like to get to know you on a first name basis,I almost gave up on 7800 programming with dasm and lack of programmers sharing but you changed all of that. Edited August 10, 2022 by Traxx 1 Quote Link to comment Share on other sites More sharing options...
Traxx Posted August 10, 2022 Share Posted August 10, 2022 Thank you Eagle Quote Link to comment Share on other sites More sharing options...
Eagle Posted August 10, 2022 Share Posted August 10, 2022 @Traxx I’m happy to help. @mksmithsorry for hijack your thread. I will move back to my topic soon Dariusz 1 Quote Link to comment Share on other sites More sharing options...
+mksmith Posted August 10, 2022 Author Share Posted August 10, 2022 Just now, Eagle said: @Traxx I’m happy to help. @mksmithsorry for hijack your thread. I will move back to my topic soon Dariusz No need for apologies mate! Loving what you have contributed to this discussion. Scrolling has been a real holy grail for the us devs in recent years and you've added considerably to achieving this goal - thank you!! 4 1 Quote Link to comment Share on other sites More sharing options...
+mksmith Posted August 11, 2022 Author Share Posted August 11, 2022 6 hours ago, Traxx said: I know a pixel artist from c64 dev scene I can put you in touch with,he is looking for a programmer that want's to code on a platformer,that's you! Incorrect thread apologies All good traxx! If your learning here what's were after in the community! 1 Quote Link to comment Share on other sites More sharing options...
+mksmith Posted August 11, 2022 Author Share Posted August 11, 2022 @Eagle One question - can you see the converted MADs assembly in some way? Quote Link to comment Share on other sites More sharing options...
Eagle Posted August 11, 2022 Share Posted August 11, 2022 (edited) I will add next time Mads listing file to zip. also I will explain some others Mads features (you can't see them in LST file) # (loop counter) :13 (repeat 13 times) :13 sta line9+2+[#*4] will give you sta line9+2+[0*4] sta line9+2+[1*4] sta line9+2+[2*4] sta line9+2+[3*4] sta line9+2+[4*4] sta line9+2+[5*4] sta line9+2+[6*4] sta line9+2+[7*4] sta line9+2+[8*4] sta line9+2+[9*4] sta line9+2+[10*4] sta line9+2+[11*4] sta line9+2+[12*4] Also Mads has very useful org addr,* to relocate your code ORG $1800,* .local DLLs :3 .byte $0F,>emptyline,<emptyline ;3 empty DLL firstline .byte $4F,>line0,<line0 .byte $4F,>line1,<line1 .byte $4F,>line2,<line2 .byte $4F,>line3,<line3 .byte $4F,>line4,<line4 .byte $4F,>line5,<line5 .byte $4F,>line6,<line6 .byte $4F,>line7,<line7 .byte $4F,>line8,<line8 lastline .byte $4F,>line9,<line9 :7 .byte $0F,>emptyline,<emptyline ;7 empty DLL will give you after F000 ORG $1800,* 512 1800 .local DLLs 513 1800 0F 1C ED 0F 1C ED + :3 .byte $0F,>emptyline,<emptyline ;3 empty DLL 514 1809 4F 18 3D firstline .byte $4F,>line0,<line0 515 180C 4F 18 B5 .byte $4F,>line1,<line1 516 180F 4F 19 2D .byte $4F,>line2,<line2 517 1812 4F 19 A5 .byte $4F,>line3,<line3 518 1815 4F 1A 1D .byte $4F,>line4,<line4 519 1818 4F 1A 95 .byte $4F,>line5,<line5 520 181B 4F 1B 0D .byte $4F,>line6,<line6 521 181E 4F 1B 85 .byte $4F,>line7,<line7 522 1821 4F 1B FD .byte $4F,>line8,<line8 523 1824 4F 1C 75 lastline .byte $4F,>line9,<line9 DLL will be at $F000 address and you can copy to RAM Because all labels will be relocated firstline = $1809 lastline = $1824 Building Display List is much much easier in Mads directmodescrollvertical.lst Edited August 11, 2022 by Eagle 1 Quote Link to comment Share on other sites More sharing options...
Eagle Posted August 11, 2022 Share Posted August 11, 2022 (edited) Next one Joystick and software collision added Mads source code attached Enjoy Direct Mode Vertical Scroll with Joystick and software collisions - link to JS7800 new procedures below main jsr WaitVBLANK mva #$04 BACKGRND ;show CPU usage jsr joystick jsr software_collision jsr ChangeColourToShowCollision jsr update_scroll jsr Clear_all_sprites ;delete all srites from previous Vblank (put $00 in second byte after scroll/background data) jsr put_sprites_on_screen jsr Sinus_path mva #$00 BACKGRND jmp main software_collision mva #$00 collision ;clear all collision ldx #$0F ;15objects from 1-15 (object 0 is Player 1) @ jsr detect_collision beq no_collision_detected inc collision no_collision_detected dex bne @- ;BNE instead of BPL - we skip object O rts ChangeColourToShowCollision lda collision ;any collision? bne YesWeHadCollision lda #$24 sta P1C2 ;change colour back when NO collision rts YesWeHadCollision lda #$00 sta P1C2 ;change colour when collision detected rts detect_collision lda x_en,x clc adc #12 sbc x_en ;player 1 Xpos cmp #12+12-1 bcs no_collision lda y_en,x adc #16 ;no CLC because we have BCS before ;) sbc y_en ;player 1 Ypos cmp #16+16-1 bcs no_collision lda #$01 ;you can detect here which object had collision (reg x) play SFX, start animation of explossion, etc. rts no_collision lda #$00 rts ;Tabstick - what you read from SWCHA ; 0000 ;-- ; 0001 ;-- ; 0010 ;-- ; 0011 ;-- ; 0100 ;-- ; 0101 ;right down ; 0110 ;right up ; 0111 ;right ; 1000 ;---- ; 1001 ;left down ; 1010 ;left up ; 1011 ;left ; 1100 ;--- ; 1101 ;down ; 1110 ;up ; 1111 ;no move ; simply - bit 0 = 0 - up ; bit 1 = 0 - down ; bit 2 = 0 - left ; bit 3 = 0 - right x_stick .byte 0,0,0,0,0,1,1,1,0,$FF,$FF,$FF,0,0,0,0 y_stick .byte 0,0,0,0,0,1,$FF,0,0,1,$FF,0,0,1,$FF,0 Joystick lda SWCHA :4 lsr @ tax lda x_stick,x clc adc x_en cmp #$FF bne @+ ;check left lda #$00 beq @+1 @ cmp #160-12+1 ;check right bcc @+ lda #160-12 @ sta x_en lda y_stick,x clc adc y_en bpl @+ ;check top lda #$00 beq @+1 @ cmp #$60 ;check bottom bcc @+ lda #$5f @ sta y_en rts directmodescrollverticalcollision.a78 sourcecode_directmodescrollverticalcollision.zip Edited August 11, 2022 by Eagle 3 2 Quote Link to comment Share on other sites More sharing options...
SlidellMan Posted August 12, 2022 Share Posted August 12, 2022 Eagle, what you have just made is magnanimous! 3 Quote Link to comment Share on other sites More sharing options...
Traxx Posted August 13, 2022 Share Posted August 13, 2022 (edited) Reverse engineered Jinks scrolling,color palette routine,char animation routine,huge thanks Dariusz,you made this possible for me so quickly by sharing,your contribution is immensely appreciated. I didn't add limits to the scroll yet,put you can try it in JS7800 scroll.a78 Edited August 13, 2022 by Traxx 2 Quote Link to comment Share on other sites More sharing options...
Traxx Posted August 13, 2022 Share Posted August 13, 2022 (edited) I'm very confident I could port a c64 shump over to 7800 with lot's of sprites going at this point and Parallax shifting,we shall see what I can do in a few days... Edited August 13, 2022 by Traxx Quote Link to comment Share on other sites More sharing options...
Traxx Posted August 13, 2022 Share Posted August 13, 2022 (edited) Dariusz,karate champ has loads of animation,how would you handle it? Edited August 13, 2022 by Traxx 1 Quote Link to comment Share on other sites More sharing options...
Albert Posted August 15, 2022 Share Posted August 15, 2022 On 8/10/2022 at 5:43 AM, Eagle said: Yes Below old link, working fine https://raz0red.github.io/js7800/?cart=https://atariage.com/forums/applications/core/interface/file/attachment.php?id=959666 These will only work temporarily, as I will soon be wiping the forum off the old server. ..Al 1 Quote Link to comment Share on other sites More sharing options...
Albert Posted August 15, 2022 Share Posted August 15, 2022 On 8/10/2022 at 5:53 AM, Cyprian said: and actually that was a great feature. would be cool to have it back This may not be something I can fix on my end. Attachments are now stored in a CDN (Content Delivery Network), but I can just manually paste the URL in a new browser window and load it that way without any issues. I'd need to know more about what's happening on the JS7800 and what type of response they are getting when they attempt to grab the attachment as has been done in the past. ..Al Quote Link to comment Share on other sites More sharing options...
Traxx Posted August 21, 2022 Share Posted August 21, 2022 Ok ported the c64 karate champ sprites Dariusz,But i'm quite far into mame reverse engineer of KC,going to use arcade code in 7800 version. 1 Quote Link to comment Share on other sites More sharing options...
+mksmith Posted August 21, 2022 Author Share Posted August 21, 2022 6 hours ago, Traxx said: Ok ported the c64 karate champ sprites Dariusz,But i'm quite far into mame reverse engineer of KC,going to use arcade code in 7800 version. Sounds great! Good luck! Quote Link to comment Share on other sites More sharing options...
Ecernosoft Posted August 29, 2022 Share Posted August 29, 2022 On 8/21/2022 at 1:21 PM, Traxx said: Ok ported the c64 karate champ sprites Dariusz,But i'm quite far into mame reverse engineer of KC,going to use arcade code in 7800 version. Hey @Traxx, how have you been going with the porting? I'd love to see it! 1 Quote Link to comment Share on other sites More sharing options...
Traxx Posted August 29, 2022 Share Posted August 29, 2022 It goes slow as I'm playing with the direct mode scroll examples to get a better grasp on 7800 scrolling. Quote Link to comment Share on other sites More sharing options...
Ecernosoft Posted August 29, 2022 Share Posted August 29, 2022 3 minutes ago, Traxx said: It goes slow as I'm playing with the direct mode scroll examples to get a better grasp on 7800 scrolling. What is direct mode? Is that 160C? Quote Link to comment Share on other sites More sharing options...
Traxx Posted August 29, 2022 Share Posted August 29, 2022 If you go to page two of this thread you'll see working code examples of it. Quote Link to comment Share on other sites More sharing options...
Eagle Posted August 29, 2022 Share Posted August 29, 2022 Indirect mode = char mode (high dma usage, less colours) Direct mode = Tile/Sprite mode (low dma usage, more colours) 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.