-
Posts
597 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Gallery
Events
Store
Everything posted by Just Jeff
-
We're putting the band back together! I've never attempted to write a music engine or really look into one. It wasn't that hard but I bet someone knows a more efficient and/or fancy way to do it. (Yes I know my table is inside the loop but its just easier to look at that way for now. Also I snagged the note values from Kirk Israel) I haven't quite figured out why I get a high pitched beep when the song repeats either. MusicRoutine: dec NoteDuration ; Have we gone 30 or 60 frames yet? bne OSwait ; If not, then skip to the end inc NoteCounter ; Go to the next note inc NoteCounter ; Twice because durations are in the table as well ldx NoteCounter ; Put the note location in the index lda Tune,x ; Load the frequency sta AUDF0 ; Store the frequency lda Tune,x+1 ; Load the duration sta NoteDuration ; Store the new duration in RAM lda NoteCounter ; See if its time to repeat the song cmp #72 ; 36 notes plus 36 note durations beq ResetCounter ; if so, reset the counter jmp OSwait ; Don't reset the counter ResetCounter lda #0 sta NoteCounter jmp OSwait Tune: ; 35 notes and pauses .byte 0,0,24,30,27,30,30,30,27,30,24,28,-1,2,24,28,-1,2,24,60 ;9 notes .byte 27,28,-1,2,27,28,-1,2,27,60,24,30,20,28,-1,2,20,60 ;9 .byte 24,30,27,30,30,30,27,30,24,28,-1,2,24,28,-1,2,24,28,-1,2 ;10 .byte 24,30,27,28,-1,2,27,30,24,30,27,30,30,120 ;7 OSwait: Tune2.asm Tune.bin
-
Can someone explain pointers to me?
Just Jeff replied to Electrk's topic in 2600 Programming For Newbies
Hmm. I did mean it that way and it does sound weird but I thought about what I wrote yesterday and said to myself- "Why did I go into that? A pointer, when used for graphics, is telling the machine which line of graphics it's on. If you have an 8x8 sprite for example, and Atari can only draw one line of the screen, you have to put in a series of eight 1x8 slices of your graphic using the pointer. -
Can someone explain pointers to me?
Just Jeff replied to Electrk's topic in 2600 Programming For Newbies
Ha!- Lost you where? Do you know how a television draws its pictures? -
Can someone explain pointers to me?
Just Jeff replied to Electrk's topic in 2600 Programming For Newbies
Pointers are used because the Atari's graphics are done one line at a time. For example, if your sprite starts at line 100 of the screen, you would set your pointer 100 places above your graphics in the code. The code in that location is useless to you and is not used. The goal is to just start counting from there. So when your kernel reaches line 100, your pointer has also moved 100 places to the exact starting point of the graphics you want on the screen. Then at line 101, the pointer is on the second line of your graphics, and so on. -
Can someone explain pointers to me?
Just Jeff replied to Electrk's topic in 2600 Programming For Newbies
When you see < and >, you are seeing the 8 bit 6502 handle a 16 bit number. Think of it like our use of comma when writing a big number- like 65,536. Telling the machine to LDA <... and LDA >... would be like saying fetch the 536 and then fetch the 65 from the above number. Note- since we only use binary, 65,536 is really 11111111,11111111. So that's 16 1s. We fetch 8 at a time to move the whole number. In your case, you are fetching a memory address, those are 16 bits so you have to do it this way. -
How can make 2 color bars in asm, blue and green.
Just Jeff replied to funkheld's topic in 2600 Programming For Newbies
How much 6502 Assembly language do you know? How much Stella do you know? It will help people answer clearly. -
Why appears here "hello world" 2x.
Just Jeff replied to funkheld's topic in 2600 Programming For Newbies
Hmm I'm not sure I understand your question. They did it to save money, memory, and machine time. The TIA only uses 3 bytes for the playfield registers this way. The games they imagined during the design- Combat, Pong, etc use reflected playfields for example. -
How high and how wide can the player be?
Just Jeff replied to funkheld's topic in 2600 Programming For Newbies
8 bits wide by any height you want. Also, you can widen the bits with one of the registers (NUSIZ0)- this will make your player wider, but no more defined. As designed, Atari can only display 2 players. It will also display those players in double or triple if you want- again by changing register (NUSIZ0) Note- there are many tricks to get it to display more than this, but think you would benefit from going through this tutorial first: http://atariage.com/2600/programming/2600_101/ -
Why appears here "hello world" 2x.
Just Jeff replied to funkheld's topic in 2600 Programming For Newbies
As designed, Atari will either repeat or reflect the left half of the playfield graphics on the right side. In this case, you are repeating the left side. Try storing a #1 to register CTRLPF and you will see your words reflected on the right half. Note: many programs avoid repeating or reflecting the play field by changing those graphics registers with precise timing- after the beam has passed the left side but not yet reached the right side. -
Thanks, I'll have to look at that.. but I wasn't specific enough. I'm referring to parts like this: lda #<Fireballs sta G48 lda #>Fireballs sta G48+1 lda #<(Fireballs+19) sta G48+2 lda #>(Fireballs+19) sta G48+3 lda #<(Fireballs+38) sta G48+4 lda #>(Fireballs+38) sta G48+5 lda #<(Fireballs+57) sta G48+6 lda #>(Fireballs+57) sta G48+7 lda #<(Fireballs+76) sta G48+8 lda #>(Fireballs+76) sta G48+9 lda #<(Fireballs+95) sta G48+10 lda #>(Fireballs+95) sta G48+11 ldy #18 Each graphic has its own indirect addressing setup like this. Is there a way that "Fireballs" and the other names could be switched to a variable so this routine could be called for each graphic, not rewritten each time for Fireballs, etc?
-
That sounds good.. And I also think its good as is. I think just having something up there is good for now because I still need to add other things. I still need to add a little menu to select one or two players and maybe some other flair. Speaking of that Excel spreadsheet, seeing it that big, I think converting this to PF graphics would look good too. Darrell.. I noticed in Medieval Mayhem, you had to re-write a lot of the code for each individual 48 pixel graphic. Why did you have to do that and not use a subroutine? Was it because the graphics were different heights?
-
I'm surprised that while loading the graphics addresses into RAM, you are not able to set up a subroutine. You have a separate routine written for SpeedGraphic, FireballGraphic, CatchGraphic, etc even though they are nearly identical other than the starting address. I'm about to do the same thing so I was curious if there was a way to call a subroutine.
-
Looking for fonts for 48 bit display
Just Jeff replied to Just Jeff's topic in Atari 2600 Programming
Thanks.. I was just trying to make sure I didn't re-invent the wheel here.. I ended up using something on dafont.com. Since they have bitmap fonts, not true type. I pasted into Paint, then zoomed in to make it nice and pixelated. -
Hi! Does anybody know of any resource that has fonts I can use for a title screen?
-
This sounds like it might be your part: Atari 2600 6 Switch 12 pin (Male to Male) Flat Mylar connecting cable. Used to connect the angled 2600 switch board assembly to the 2600 motherboard. CB103143 $8.95