Jump to content

BNE Jeff

+AtariAge Subscriber
  • Content Count

    444
  • Joined

  • Last visited

Community Reputation

83 Excellent

About BNE Jeff

  • Rank
    Moonsweeper

Profile Information

  • Gender
    Male
  • Location
    Virginia
  • Interests
    Atari 2600 programming.
  1. Did you seed Random with a value? If not, it looks like its going to be zero every time. If you step through on the debugger, do you see new values on each frame?
  2. Dang it! Thanks for the help everybody. I stuck 12 bytes in the macro as a spacer. 64K EF autodetected:
  3. Thanks.. I was able to switch using this. It was generally identifying the ROM as 4K although for some of my attempts, it thought it was a 64K Megaboy.
  4. Thanks.. I see a problem in the list file.. As noted before, the bankswitch addresses end 16 bytes before the end of the ROM space (why? I don't know). To place the reset and IRQ vectors in the right place, I added a second RORG to the macro. Its being ignored. ORG $FFFC is not being generated by RORG $1FFC. This is the case on all of the banks. 177 ffe0 ORG $FFE0 0 ffe0 BANKS_AND_VECTORS 1 ffe0 RORG $1FE0 2 ffe0 3 ffe0 00 SelectBank0 .byte.b $00 4 ffe1 00 SelectBank1 .byte.b $00 5 ffe2 00 SelectBank2 .byte.b $00 6 ffe3 00 SelectBank3 .byte.b $00 7 ffe4 00 SelectBank4 .byte.b $00 8 ffe5 00 SelectBank5 .byte.b $00 9 ffe6 00 SelectBank6 .byte.b $00 10 ffe7 00 SelectBank7 .byte.b $00 11 ffe8 00 SelectBank8 .byte.b $00 12 ffe9 00 SelectBank9 .byte.b $00 13 ffea 00 SelectBank10 .byte.b $00 14 ffeb 00 SelectBank11 .byte.b $00 15 ffec 00 SelectBank12 .byte.b $00 16 ffed 00 SelectBank13 .byte.b $00 17 ffee 00 SelectBank14 .byte.b $00 18 ffef 00 SelectBank15 .byte.b $00 19 fff0 20 fff0 RORG $1FFC 21 fff0 00 10 .word.w SystemStart 22 fff2 00 10 .word.w SystemStart 179 fff4 The macro code: MAC BANKS_AND_VECTORS ; end of every bank RORG $1FE0 ;WAS RORG $FFF4 SelectBank0 .byte $00 SelectBank1 .byte $00 SelectBank2 .byte $00 SelectBank3 .byte $00 SelectBank4 .byte $00 SelectBank5 .byte $00 SelectBank6 .byte $00 SelectBank7 .byte $00 SelectBank8 .byte $00 SelectBank9 .byte $00 SelectBank10 .byte $00 SelectBank11 .byte $00 SelectBank12 .byte $00 SelectBank13 .byte $00 SelectBank14 .byte $00 SelectBank15 .byte $00 RORG $1FFC ;Added because there is blank space. .word SystemStart ; RESET .word SystemStart ; IRQ ENDM What am I doing wrong there? I do see that my old RORG reflected a 64K ROM space with $FFF4 (even though it was a 32K game), I'm only reflecting 4K here with $1FFC- does that matter?
  5. The jump table- right? MAC JUMP_TABLE ; start of every bank RORG $1000 And my 16 banks will ORG $0000, $1000, $2000, … F000- right? Does the bank with ORG $1000 need to be the one that contains my SystemStart (@ the reset vector)?
  6. I'm having trouble getting this one to work. Would it look like this? Also, it looks like it wastes 12 bytes between the last hot spot and the reset vector (So I added a RORG): MAC BANKS_AND_VECTORS ; end of every bank RORG $1FE0 ;WAS RORG $FFF4 SelectBank0 .byte $00 SelectBank1 .byte $00 SelectBank2 .byte $00 SelectBank3 .byte $00 SelectBank4 .byte $00 SelectBank5 .byte $00 SelectBank6 .byte $00 SelectBank7 .byte $00 SelectBank8 .byte $00 SelectBank9 .byte $00 SelectBank10 .byte $00 SelectBank11 .byte $00 SelectBank12 .byte $00 SelectBank13 .byte $00 SelectBank14 .byte $00 SelectBank15 .byte $00 ; .word SystemStart ; NMI used for banks 7 and 8 RORG $1FFC ;Added because there is blank space. .word SystemStart ; RESET .word SystemStart ; IRQ ENDM
  7. Yeah I had to look around a bit for my stuff on that. I like the asl idea though. Thanks.
  8. Oh yeah it's way better that DiStella. I was able to get a good DiStella disassembly with the additional switches, but once I disassembled with Stella, I dropped it entirely. The Stella disassembly is nice!
  9. Good Morning, I used Distella to disassemble Chopper Command but the bin didn't run when recompiled with DASM. I found missing assembler instructions such as ORGs SEGs and the Processor spec. It runs now with issues. I'll continue fixing it up but I'm curious- Did I use Stella wrong? Is there a switch I should have added? I used -a only. I made notes of my changes in the attached asm- just search for semicolons to see them. The second attachment is my current .bin. The third attachment is the original .bin if someone wants to disassemble to compare results. Thanks! CPRCMD.asm CPRCMD.asm.bin Choprcmd.bin
  10. Nice! Yeah for longer samples, you'll have to use bank switching. I don't recall exactly, but I think generally you only get 3 seconds or so of speech into 4 K. Of course you can adjust the quality to get more or less than that. I don't recall offhand seeing speech that didn't have a blank screen either, though I'm sure its out there. Its a matter of holding the sample routine's hand... every 100 cycles more or less... without ever letting go. Easily said, but it will get in the way of everything you do in the vertical blank, kernel, overscan, subroutines, indexes, and surely other things. And you'll pay for it with degraded game and graphics quality as well. And.. you mentioned sampling a song- even harder because you can't vary the rate much- you'll go out of tune. I made a half-hearted attempt a while back. (attached) It's got the stable kernel, but the speech is still not right. It takes a few seconds for you to realize its saying "Hello" really really slowly. Maybe its time to debug it. SpeechKernel10.asm SpeechKernel10.asm.bin
  11. Woops. Sorry about that.. I was in a little bit of a hurry getting ready for work. Correct files attached now.. For my samples I used Audacity on its crappiest quality- I believe it was 8 bit mono audio at the slowest rate. Then I ran it through something called Wav2Atari which is written in Perl. It converts .wavs to the 4 bit format you're going to want. Not sure what you mean by deltas to decide which note to import. With samples, your not working with notes directly, you're building the waves with your data. hello.asm HELLO.BIN
  12. Are you playing one nibble at a time here? I'm not sure how your compiler is dealing with these hex numbers but I think you should be processing one hex digit at a time (0-F only). Typically, you would store two 4 bit nibbles in one byte, use the byte as is for the right nibble, then lsr 4 times to use the left nibble. Example attached. It looks like it wastes about 130 cycles between wave changes (not notes) hello.wav
  13. Ahh thanks, that was the missing piece. I saw Thomas mention something like that but it didn’t click because I had no idea that was a thing. Everyone here seems to know it without having to say. All those years of math in school and I don’t recall ever seeing it. Here’s my interpretation: Div6: SUBROUTINE ; divide player position by 6 ; rors are necessary for larger numbers sta temp ; Store the value for recycling. 1/3 is the convergence of 1/4 + 1/16 + 1/64 + 1/256... lsr ; Shift significant bits (of 2 bit pairs) over 1 adc #$15 ; = %00010101. Round up if the 2 bit pair was 3? lsr ; Now we are at 1/4 the original number. The results here will be divided 3 more times for the 1/256 portion adc temp ; Add that to the original number for round 2 (Original # plus 1/4) ror ; lsr ; Divide that by 4. The results here will be divided 2 more times for the 1/64 portion adc temp ; Add that to the total number for round 3 (Original # plus 1/4 plus 1/16) ror ; lsr ; Divide that by 4. The results here will be divided 1 more time for the 1/16 portion adc temp ; Add that to the total number for round 4 (Original # plus 1/4 plus 1/16 plus 1/64) ror ; lsr ; Divide that by 4 for final result. Original can be discarded now. Result is 1/4 plus 1/16 plus 1/64 plus 1/256 ;Make it divide by 6 lsr ;
  14. Well I've looked at this multiple times this week, manually worked through it with various values and it always works. I made a spreadsheet to try to observe what happens, why and when.. and I still have no solid idea why this works. My guess is that the adc #$15 (%00010101) is seeding the value to affect the carry for some reason and that repeatedly dividing by four, then adding the original amount back in, somehow works out to dividing by 3. Also thinking that binary 3 behaves differently than decimal 3, being that its a fraction of the base in decimal, but 1.5 times the base in binary. Would someone care to comment it so I might get a better grip on it? Also, did I get any of it right? Thanks
  15. Hello.. I'm trying to divide the 160 color clocks by 6. If I wanted to divide by 6, should I just put an lsr right at the top of this (before storing to temp)? Should I do anything with the carry?
×
×
  • Create New...