Jump to content

grafixbmp

+AtariAge Subscriber
  • Posts

    708
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by grafixbmp

  1. So been working on a project and wanted some feedback on what I came up with. Just wanting second opinions if my logic is sound. This gives controller directions and debounce data. it could also be expanded to include any action buttons if single player or all cardinal directions for 2 players. Call either once per frame or just between usage of control inputs.

     

    	;		1 = off		0 = on
    
    
    	;previous poll		active poll							debounce
    
    	;	1		1	and 1 then answer xor previous 0 then invert		1
    
    	;	1		0	and 0 then answer xor previous 1 then invert		0
    
    	;	0		0	and 0 then answer xor previous 0 then invert		1
    
    	;	0		1	and 0 then answer xor previous 0 then invert		1
    
    
    	; ram variables for controls
    
    	; current_poll
    
    	; debounce
    
    	; temp_1
    
    
    
    
    
    control_check/reset
    
    	; uses inverted logic 1=off 0=on
    
    	lda SWCHA
    
    	and #$F0	;keep only player 0 data. omit if using both players
    
    	sta temp_1
    
    	and current_poll
    
    	eor current_poll
    
    	eor #$FF
    
    	sta debounce
    
    	lda temp_1
    
    	sta current_poll
    
    	; for the rest of the game code check the debounce for trigger activation of any direction
    
    	; or check current poll for continued activation of any direction
    
    	rts

     

  2. Just had a little thought about something and wondered if anyone has done this before or if it would ever be useful at all. so with standard subroutines they are absolute but with jumps they are either absolute or variable (indirect) so with some extra code we should be able to have indirect subroutines. I sudo coded a brief example of what I mean and wondered if it had any merit. My syntax may have errors but  hopefully the idea gets across.

     

    	Indirect_Subroutine = $80	
    
    	I_S = $81
    
    	;some code
    
    
    	lda <#subroutine_B
    
    	sta Indirect_Subroutine
    
    	lda >#subroutine_B
    
    	sta Indirect_Subroutine+1
    
    
    	; some more code
    
    
    	
    	lda <#continue_from_routine
    
    	pha
    
    	lda >#continue_from_routine
    
    	pha
    
    	jmp (Indirect_Subroutine)
    
    continue_from_routine
    
    
    	;some more code
    
    
    
    subroutine_A
    
    	;do stuff
    
    	rts
    
    subroutine_B
    
    	;do_stuff
    
    	rts
    
    subroutine_C
    
    	;do_stuff
    
    	rts

     

  3. Hello all, it's been some time since I've posted on the forums. But now I have a cool story (at lest i find it cool) I wanted to share with everyone here. 

     

        I recently attended a top secret annual conference meet up in Chicago (my first time visiting the city) known as Thotcon. This conference lasted 2 days and is a meet up for network security workers and generally anyone in IT, tinkerers or white hat hackers. There were many talks and seminars on various computer and networking subjects as well as other activities.  I was invited by my good friend whom we will refer as Mr. E to participate in what they call a "village". This particular village (one of several) I had suggested the name ASMb1337 because my buddy wanted me to expose modern coders to the old ways and help get their feet wet with some old school coding. We have a website  www.hacknwa.org which simply links to the required resources to code 6502 assembly that attendees could download and try out. For the event Mr. E  had me code a simple 4k demo scene with some music to show off our groups local logo that moves on screen. The source code was available to attendees and their goal was to modify the code, recompile and be a stable build to win a prize. The prize was a blank NES cart dev board that they could use to experiment further with 6502 but this time for the NES. It was a ton of fun and I would love to do it again. That said, there was one thing I had wished to do with the demo that I never finished with. Although it works fine as is, I had wanted to implement a sort of parabolic motion to the logo so as it would slow down before reversing direction and speed up when in the middle of the screen. I wondered  if anyone here wouldn't mind to take up the task to implement this feature. My coding is mediocre at best and I'm not near as seasoned as many here so I know the code looks weak but it works. So here are a few pics including my good friend who got me involved and a few for the event. The source and 2 different builds to do something different. Credits go to Paul Slocum for his wonderful music engine and web based tracker. Music is credited to another good friend of mine who goes by the handle The Thunder Lizzard. included the music and song player headers.

    IMG_20230520_114832182_HDR2.jpg

    IMG_20230520_114855668_HDR.jpg

    IMG_20230520_114916563.jpg

    hacknwa.asm hacknwa.bin hackNWA2.bin song.h songplay.h

    IMG_20230527_201238299[1].jpg

    • Like 2
  4. I need to place 2 tables of bytes (graphical data) in rom. However, i need one loaded in even addresses and the other in odd addresses. I would like to avoid manually interlacing my graphical data as well as color palettes. People keep saying let DASM do it for you so was wondering if it was up to the task.  

  5. Slight dilemma. If I'm using an indirect pointer with the Y index and I need to offset the pointer because the Y index isn't inline with the true pointer, then does the page value just wrap itself to do this or does the high byte need to be adjusted too. Technically, no page boundary  access would occur. 

    Ex: data to be accessed is located on any arbitrary page of the 4k rom space starting at 00 to say 0B. This is 12 bytes worth. Likewise, the pointer in ram would have 00 be the start (or end) with whatever page the hi byte is as the 2 byte pointer. Providing the y index is exclusively set to index this data, everything would work as normal.

    However, if the Y index is decrementing from 30,  then the pointer would need to be offset before hand so that the data reads correctly. It would stop before going below the pages 00 address so as not to access data across a page boundary.  So does the 2 byte pointer only need the low byte changed or both the high byte and low to compensate this? Sorry if the explanation is overly complicated. I don't want to incurr any extra cycles.

  6. On 11/4/2021 at 10:21 PM, DaveM said:

    Things are going MUCH slower than I had hoped.  Just not enough time right now to devote to working on the game.  BUT... progress is being made!20211102_192501.thumb.jpg.356d24b4fb8babaa1cd2ccaff081e08c.jpg

    Baby Yoda? Or rather Grogu.

    • Haha 1
  7. here is my two bits for what its worth. I'm very visual when it comes to kernel coding and I have to draw out my code visually to the screen alignment. This seems to almost always get cycle exact code as long as it doesn't cross any page boundaries. It may not make much sense to some people, but it works for me. Just thought I would share this version. It only runs absolute addressing for a 48 pixel static image but also allows PF1 to get loaded too for the first copy and blanked for the second copy. 

    6 digit routine absolute graphics with 1 PF update.png

    • Like 1
  8. On 8/7/2020 at 1:52 AM, tokumaru said:

    It just occurred to me that Atari 2600 graphics drawn exclusively with playfield pixels look a lot like SNES graphics... in mosaic mode! It kinda looks like the game is in the middle of a scene transition (à la Super Mario World), and my brain keeps waiting for the animation to finish and the final graphics to appear.

     

    Not that the graphics look bad or anything, it's just that rendering detailed backgrounds is far from being one of the things the 2600 excels at. I love all the mock-ups posted in this thread, especially because they're so unconventional.

     

    overworld sprites.png

    • Like 2
  9. On 6/26/2019 at 10:06 PM, Omegamatrix said:

    Are the pieces moving or static? I think 30Hz flicker will be okay. If you have a black screen keep the luminance low to make it more tolerable.

    The pieces would be static and the screen would function more like a segmented LCD screen.

  10. Had some partial kernel code for several years for a puzzle games inspired by a rather popular casual game. I had worked out most of the general rules and kernel rendering but that's it so far. Recently crafted an animated gif to roughly demonstrate.

    20190620_205637.gif

    • Like 1
×
×
  • Create New...