Jump to content

Just Jeff

+AtariAge Subscriber
  • Content Count

    454
  • Joined

  • Last visited

Everything posted by Just Jeff

  1. OK. I told him something like that too- but with a whole bunch of "I thinks" in there since I didn't know. How would it be harder? btw the the tutorial mentions repeatedly that C was invented to write Unix. I assume that's why I'm seeing some similarities? I know its just the start but between Unix and DASM, this little bit is familiar to me already (but different): printf("Hello, World! \n"); I think it would be helpful to see some code examples that apply to CDF so I can look at them as I go along- to put things in context. Anybody have any? And.. I searched around some more and just made the connection- CDF is the result of the bus stuffing effort. Correct?
  2. OK Thanks.. I'm working on it now. Funny.. it looks a lot like Unix/Linux scripting to me so far.. The guy in the cube next to me knows C and said he'd help me. The guy across from me asked "Why not use C++" I told him I think its because the age of the technology. But then he said it compiles to the same thing, I think. Do you know why it's not another version of C?
  3. Well that's why I couldn't find anything on it. I'm not sure which way to go now.. I'm mainly interested in stuffing more into the kernel, making a game 8K or larger, with a little in tune music. So I need to write in 6502 assembly and C, and somehow CDF "scheme" fits in there? Thanks!
  4. Good Evening, If anyone could steer me in the right direction, I'd appreciate it... I'd like to look into learning ARM Assembly. Does anyone have any commented code and/or tutorial they can suggest? Also, is it better than DPC+ ? Can it make in-tune music? Does the code run mainly on the Melody board, using the Atari mainly for its registers? Which tools do I need? Which compiler, etc. Is ARM assembly much more difficult than 6502? Thanks!
  5. Thanks.. What's ARM assembly?
  6. Looking into this again.. I've been learning Unix and Linux in my job and I have Ubuntu on VirtualBox here at home so that will be a little easier. But the C- its still a requirement? How much would I have to learn? Is there a resource you recommend?
  7. OK Thanks.. It took me a few reads to get this. Its a 96 pixel display- right? I think I'll be able to stick to the small objects at 30Hz, and use it only occasionally.
  8. OK Thanks.. I put together this little Hello World (attached) to give it a look and yeah its a little disappointing. I tried it on the Harmony too. I'm going to reconsider the design of s game I'm thinking of working on. It will probably still have some flicker but just a little bit- probably less than 5% of the time. Thanks again! HW.bin
  9. OK Thanks! Sounds like I can just figure it out myself then.. Though- I thought the 30Hz flicker was undetectable on CRTs and Stella emulator. Is that correct?
  10. Good Evening, I'd like to play around with flicker a little bit but I've never done it. Is it as simple as writing 2 kernels and branching to one or the other or is it more complicated than that?
  11. Atariage has a beginner course you can do at night: http://atariage.com/2600/programming/2600_101/ Its done at a very basic level.
  12. If I understand it correctly, your observing time should be easy enough to do. At times, your demo has quite a few stars on the same horizontal line. You'll have to avoid that or use flicker. While TIA will tell you that your beam has collided with a star, it won't be able to tell you exactly which star, so you'll have to figure that out in your code.
  13. You at using constants. The difference is this: Dasm sees COR_FUNDO and always replaces it with $99 when it assembles the code Its only there for your convenience as a label, the Atari never uses any RAM for it. To use RAM to make a variable, you would use: ORG $80 ;point DASM to the start of RAM CorFundo: ds 1 ;tell DASM you are using 1 byte of RAM and naming it CorFundo You have your color changes one right after the other here. If the button is pressed, it does the first color change, then changes it right back. You would need to place a jmp in front of "jumper" to prevent that: LDA INPT4 ;read button input BMI ButtonNotPressed ;skip if button not pressed ldx COLUP0 cpx #COR_PLAYER bcs jumper ldx #COR_FUNDO ldy #COR_PLAYER stx COLUBK sty COLUP0 jumper ldx #COR_FUNDO ldy #COR_PLAYER stx COLUP0 sty COLUBK
  14. and 1 minute later I figure something out... commented the the RAM with their addresses and sure enough $87 & $88 contain the numbers displayed and the code in the debugger shows them too. My #12 and #34 has their hex values displayed- $0c 22.
  15. Hi! I'm going to try to make a 2K old school, launch title type game. When I'm stuck, I'm trying to figure it out but I'll also post it here in with the hope that it might speed things up a bit. If you like debugging then go for it- it is appreciated! Right now I'm working on inserting a score kernel (Spiceware's). I got it mostly working, but something seems to be wrong with the indexing. Its supposed to display 12 34 but displays other numbers. Not sure if it has anything to do with decimal mode- I've turned it on and off with no effect. If I change the score- 12 and 34 to other numbers, again, it displays numbers, but not those numbers. Thanks! PROCESSOR 6502 ; paddle game ; 27 May 2017 ; ; ; paddle 1 = player 0 ;TIA_BASE_READ_ADDRESS = $30 include VCS.H include macro.h SEG.U VARS ORG $80 Paddle1: ds 1 DigitTens: ds 2 ScoreGfx: ds 2 DigitOnes: ds 2 Score: ds 2 Temp: ds 1 SEG CODE org $F000 InitSystem: CLEAN_START ;sed lda #12 sta Score lda #34 sta Score+1 ;cld sta COLUPF VerticalBlank: lda #$82 sta WSYNC sta VSYNC ; 3 start vertical sync, D1=1 sta VBLANK ; 3 6 start vertical blank and dump paddles to ground lda #$2C ; 2 8 set timer for end of Vertical Blank sta TIM64T ; 4 12 sta WSYNC ; 1st line of vertical sync sta WSYNC ; 2nd line of vertical sync lda #0 sta WSYNC ; 3rd line of vertical sync sta VSYNC ; stop vertical sync, D1=0 ldx #3 PosObjectLoop lda Paddle1 ;+4 9 sec ;;;;;;;;;;;;;;;;;;;Jeff added sta WSYNC DivideLoop sbc #15 bcs DivideLoop ;+4 13 eor #7 asl asl asl asl sta HMP0 ;+4 17 sta RESP0 ;+4 23 sta WSYNC sta HMOVE jsr PrepScoreForDisplay ;jeff added lda #$0f ; set color for paddle 1 display sta COLUP0 lda #153 ; prep paddle results with highest possible value sta Paddle1 ; our initial paddle results will be 1-153 ldx #0 VblankWait lda INTIM bpl VblankWait sta WSYNC sta HMCLR ; clear hmoves for next time around stx VBLANK ; turn on video output & remove paddle dump to ground ;------------------------------------------------------------------------ ; Score Loop ;------------------------------------------------------------------------ ldx #5 ; 2 11 - use X as the loop counter for ScoreLoop ;ldy #0 ; temp to test score ScoreLoop: ; 43 - cycle after bpl ScoreLoop ldy DigitTens ; 3 46 - get the tens digit offset for the Score lda DigitGfx,y ; 5 51 - use it to load the digit graphics and #$F0 ; 2 53 - remove the graphics for the ones digit sta ScoreGfx ; 3 56 - and save it ldy DigitOnes ; 3 59 - get the ones digit offset for the Score lda DigitGfx,y ; 5 64 - use it to load the digit graphics and #$0F ; 2 66 - remove the graphics for the tens digit ora ScoreGfx ; 3 69 - merge with the tens digit graphics sta ScoreGfx ; 3 72 - and save it sta WSYNC ; 3 75 - wait for end of scanline ;--------------------------------------- sta PF1 ; 3 3 - @66-28, update playfield for Score dislay ldy DigitTens+1 ; 3 6 - get the left digit offset for the Score+1 lda DigitGfx,y ; 5 11 - use it to load the digit graphics and #$F0 ; 2 13 - remove the graphics for the ones digit sta ScoreGfx+1 ; 3 16 - and save it ldy DigitOnes+1 ; 3 19 - get the ones digit offset for the Score+1 lda DigitGfx,y ; 5 24 - use it to load the digit graphics and #$0F ; 2 26 - remove the graphics for the tens digit ora ScoreGfx+1 ; 3 29 - merge with the tens digit graphics sta ScoreGfx+1 ; 3 32 - and save it nop ;12 44 - waste some cycles nop nop nop nop nop ; 2 44 sta PF1 ; 3 47 - @39-54, update playfield for Score+1 display ldy ScoreGfx ; 3 50 - preload for next scanline sta WSYNC ; 3 53 - wait for end of scanline ;--------------------------------------- sty PF1 ; 3 3 - update playfield for the Score display inc DigitTens ; 5 8 - advance for the next line of graphic data inc DigitTens+1 ; 5 13 - advance for the next line of graphic data inc DigitOnes ; 5 18 - advance for the next line of graphic data inc DigitOnes+1 ; 5 23 - advance for the next line of graphic data nop ;12 35 - waste some cycles nop nop nop nop nop dex ; 2 37 - decrease the loop counter sta PF1 ; 3 40 - @39-54, update playfield for the Score+1 display bne ScoreLoop ; 2 42 - (3 43) if dex != 0 then branch to ScoreLoop sta WSYNC ; 3 45 - wait for end of scanline ;--------------------------------------- stx PF1 ; 3 3 - x = 0, so this blanks out playfield sta WSYNC ; 3 6 - wait for end of scanline ;--------------------------------------- lda #0 ; 2 2 sta CTRLPF ; 3 5 - turn off SCORE mode ldx #1 ; 2 7 ;------------------------------------------------------------------------ ldy #152 ReadLoop sta WSYNC sty COLUBK lda INPT0 ; 3 - always 9 bpl .save ; 2 3 .byte $2c ; 4 0 .save sty Paddle1 ; 0 3 dey bne ReadLoop ; display Paddle 1's value by using Player 0 sta WSYNC lda #$FF sta GRP0 ldy #24 P0loop sta WSYNC dey bne P0loop lda #0 sta GRP0 lda #$26 ; prep overscan delay sta WSYNC sta TIM64T ; set overscan delay OSwait lda INTIM bpl OSwait jmp VerticalBlank ;=============================================================================== ; PrepScoreForDisplay ; -------------- ; Converts the high and low nybbles of the RAM variables Score and Score+1 ; into offsets into the digit graphics so the values can be displayed. ; Each digit uses 5 bytes of data for the graphics. For the low nybble we need ; to multiply by 5, but the 6507 does not have a multiply feature. It can, ; however, shift the bits in a byte left, which is the same as a multiply by 2. ; Using this, we can get multiply a # by 5 like this: ; # * 5 = (# * 2 * 2) + # ; The value in the upper nybble is already times 16, so we need to divide it. ; The 6507 can shift the bits the right, which is the same as divide by 2. ; (# / 16) * 5 = (# / 2 / 2) + (# / 2 / 2 / 2 / 2) ;=============================================================================== PrepScoreForDisplay: ldx #1 ; use X as the loop counter for PSFDloop PSFDloop: lda Score,x ; LoaD A with Score+1(first pass) or Score(second pass) and #$0F ; remove the tens digit sta Temp ; Store A into Temp asl ; asl ; Multiply by 5 adc Temp ; ADd with Carry value in Temp (# * 5) sta DigitOnes,x ; STore A in DigitOnes+1(first pass) or DigitOnes(second pass) lda Score,x ; LoaD A with Score+1(first pass) or Score(second pass) and #$F0 ; remove the ones digit lsr ; Logical Shift Right (# / 2) lsr ; Logical Shift Right (# / 4) sta Temp ; Store A into Temp lsr ; Logical Shift Right (# / lsr ; Logical Shift Right (# / 16) adc Temp ; ADd with Carry value in Temp ((# / 16) * 5) sta DigitTens,x ; STore A in DigitTens+1(first pass) or DigitTens(second pass) dex ; DEcrement X by 1 bpl PSFDloop ; Branch PLus (positive) to PSFDloop rts ; ReTurn from Subroutine ;=============================================================================== ; Digit Graphics ;=============================================================================== align 256 DigitGfx: .byte %00000111 .byte %00000101 .byte %00000101 .byte %00000101 .byte %00000111 .byte %00010001 .byte %00010001 .byte %00010001 .byte %00010001 .byte %00010001 .byte %01110111 .byte %00010001 .byte %01110111 .byte %01000100 .byte %01110111 .byte %01110111 .byte %00010001 .byte %00110011 .byte %00010001 .byte %01110111 .byte %01010101 .byte %01010101 .byte %01110111 .byte %00010001 .byte %00010001 .byte %01110111 .byte %01000100 .byte %01110111 .byte %00010001 .byte %01110111 .byte %01110111 .byte %01000100 .byte %01110111 .byte %01010101 .byte %01110111 .byte %01110111 .byte %00010001 .byte %00010001 .byte %00010001 .byte %00010001 .byte %01110111 .byte %01010101 .byte %01110111 .byte %01010101 .byte %01110111 .byte %01110111 .byte %01010101 .byte %01110111 .byte %00010001 .byte %01110111 .byte %00000000 ; used to blank out right score in 1 player games .byte %00000000 .byte %00000000 .byte %00000000 .byte %00000000 .byte %01010101 .byte %01010101 .byte %01010101 .byte %00000000 .byte %01010101 org $FFFA .word InitSystem ; NMI .word InitSystem ; RESET .word InitSystem ; IRQ JS.asm JS.bin
  16. Do you have additional monitors at work? You could use a composite to VGA converter.
  17. Dang it.. I've been staring at the positioning routine for half an hour because of the fact that it looked like 15 pixel increments. I guess I've forgotten what .wx means. I was thinking it meant "word" and couldn't figure out why it was used here. I'm rusty.. Thanks!
  18. OK thanks.. Reloading ROM seems to work... But.. are you getting smooth movement? Mine is jumping 15 pixels or so.
  19. Sweet.. I'll look into that in a minute.. In the meantime.. I hate to ask because I really am trying to figure it out myself... But can anybody figure out why the player is not moving? I've played with Stella's paddle settings but I get nothing.. and I thought I'd be a little farther along on this at this point in a three day weekend. JS.bin JS.asm
  20. Here it is with v1: ------- FILE JS.asm LEVEL 1 PASS 1 1 0000 ???? ; dasm JS.asm -f3 -v0 -sJS.sym -lJS.lst -oJS.bin 2 0000 ???? JS.asm (3): error: Unknown Mnemonic '6502'. 3 0000 ???? PROCESSOR 6502 4 0000 ???? But I did notice the output in the command prompt shows two unknown symbols where v0 just says "Complete" C:\Atari\dasm>dasm JS.asm -f3 -v0 -sJS.sym -lJS.lst -oJS.bin Complete. C:\Atari\dasm>dasm JS.asm -f3 -v1 -sJS.sym -lJS.lst -oJS.bin START OF PASS: 1 ---------------------------------------------------------------------- SEGMENT NAME INIT PC INIT RPC FINAL PC FINAL RPC CODE f000 f000 VARS [u] 0080 0080 0000 ???? 0000 ???? RIOT [u] 0280 0280 TIA_REGISTERS_READ [u] 0030 0030 TIA_REGISTERS_WRITE [u] 0000 0000 INITIAL CODE SEGMENT 0000 ???? 0000 ???? ---------------------------------------------------------------------- 2 references to unknown symbols. 0 events requiring another assembler pass. Complete.
  21. Looks the same... C:\Atari\dasm>dasm DASM 2.20.11 20140304 Copyright © 1988-2008 by various authors (see file AUTHORS). License GPLv2+: GNU GPL version 2 or later (see file COPYING). DASM is free software: you are free to change and redistribute it. There is ABSOLUTELY NO WARRANTY, to the extent permitted by law.
  22. Interesting. Did you use DiStella or something?
  23. Oooohhh.. I was convinced it was my syntax somewhere... I looked at that over and over and never picked up on that. Thanks! I've never looked at the list file. I guess I had to learn that hard way. I don't see "error", It shows "????" instead. I can see where it included VCS registers though from include vcs.h 1 10000 ???? ; dasm JS.asm -f3 -v0 -sJS.sym -lJS.lst -oJS.bin 2 10000 ???? 3 10000 ???? PROCESSOR 6502 4 10000 ???? ; paddle game 5 10000 ???? ; Jeff Haber 6 10000 ???? ; 27 May 2017 7 10000 ???? 8 10000 ???? ; 9 10000 ???? ;
×
×
  • Create New...