Jump to content

RevEng

Members
  • Content Count

    7,027
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by RevEng

  1. When a minikernel isn't running bB doesn't use up 100% of the available real-estate on the screen. I just ran a quick test and hit WSYNC 16 times in a minikernel without overrunning 262 lines. To use your analogy, batari reserved a couple of seats on the short bus for us minikernel coders.
  2. I think that it will take a critical mass of titles that support it before most users will build/buy adapters. One way to speed that up is to hack some of the games that use the second joystick's button to use it. Regarding the adapter, it would make sense to include a regular db9 male wired in parallel, so a normal joystick could be wired in at the same time; it would save a lot of unplugging. Assuming the pad wouldn't interfere with regular operation. Alternatively, a microcontroller could be used as cd-w suggested. It could act in "compatibility mode" if the vcs didn't handshake with it, and in "pass-through mode" if it did. If you wanted to get really fancy, the microcontroller could control the vcs select and reset switches too, with some minor mods.
  3. The most natural place to implement a minikernel in bB is above the score, below the main playfield area. All of the bB kernels do a "jsr minikernel" there, if "minikernel" is defined. That way you just distribute a "textkernel.asm" with the minikernel label inside it, and the bBers basically include/inline it. You won't know which cycle in the scanline you're on, so you'll need to do a "sta WSYNC" at some point. Unless the setup is hugely expensive, its probably best to blow a few scanlines for it. Otherwise, create a "setuptext" label in your kernel and instruct the bB coder to do a "jsr setuptext" somewhere in their code. (Which executes during overscan) The bB kernels use the timer for the scanline count, and the code that follows the minikernel (the score kernel) doesn't assume a whole lot about the state its in, so you don't need to fret too much about the hand-off after you rts.
  4. Any progress? A text mini-kernel would definitely be handy.
  5. Your pencil program works fine for me with all diagonals, in Stella under Ubuntu. I suspect its a keyboard and/or Windows thing.
  6. +1 rep man. That's very thoughtful of you.
  7. You should have a look through pong story. Whatever it is its probably there somewhere.
  8. Thanks for posting the link. For me the highlight was the new "Prince of Persia: The Forgotten Sands" title! Cool beans!
  9. Nice work Cliff! You'd be hard pressed to find a more foolproof solution than a 2600 running this!
  10. No problem. I look forward to hearing any discoveries you make!
  11. Your application sounds neat Cliff! You could also have the Atari play "correct" and "incorrect" buzzer sounds depending on which "reset" button the judges pressed. I hope you share how the program works out for you in the end. I always enjoy stories of hardware being successfully repurposed.
  12. I doubt there's anything wrong on your end. I suspect we just have 2 different versions of bB, so we have slightly different amounts of overhead. Since the calculations subtract out the overhead for the loop, it doesn't factor into things anyway. Here's my bins. I think you'll find stella gives you the same results as I had with these. cyclecount.withcode.bin cyclecount.nocode.bin
  13. Overview... Create the program that loops the code you want to measure N number of times. Then... Adjust N, recompile, and rerun. Repeat this step with differen N values, until N provides a cyclescore fairly close to 0. record score as TEST_CYCLES edit the program and comment out the code in the loop. recompile, and rerun. record score as OVERHEAD_CYCLES CYCLES_PER_COMMAND=(OVERHEAD_CYCLES-TEST_CYCLES)/N MARGIN_OF_ERROR=64/N (bB's cyclescore is accurate to +-64 cycles) Example... Here's an example for a=b+c... set debug cycles set debug cyclescore dim loop=x scorecolor=$0f testloop rem *** adjust the "to" value in the loop most of the cycles are used up for loop = 1 to 100 rem do what you want to measure here a=b+c next drawscreen COLUBK=0 goto testloop So for this example, running with N=100 provides a score of 128. Running the same code without the a=b+c results in a score of 1216 CYCLES_PER_COMMAND = (1216-128)/100 = 10.88 MARGIN_OF_ERROR = 64/100 = +-0.64 Extra Credit Work - verifying the method This example is pretty easy to verify with cycle counting. Looking at the generated assembly code, the code in the loop breaks down to... LDA b ; 3 CLC ; 2 ADC c ; 3 STA a ; 3 ;=11 10.88 isn't 11, but it's definitely within our margin of error.
  14. Any chance we can get a separate version with the paddle check disabled? That wouldn't cost any bytes. I can "suffer" using the console switches to select a game the 1 or 2 times a year I decide to play a paddle game, but I can't do the same with the sega pad, as INPT0 pins the selection to the top.
  15. Not a whole lot of spare time, but I took a few minutes and knocked out Defender Arcade. It's added to the first post. Gotta love Stella's rom-editing capabilities!
  16. I salute you sir! Finally I will be able to pause the 2600 when my mom wife calls.
  17. Take your time Stephen. Having a burned out Stella maintainer won't help anyone! 1) correct 2) 2 buttons. One the normal joystick button, the other is INPT1. Yes, the paddle1 line. The INPT5 suggestion to RT was just a workaround for testing. 3) "sega genesis compatible" or similar will do, I think.
  18. No problem. Glad to help! If anybody has any more questions on the genesis controllers, feel free to post them here.
  19. I'll take a look in the next few days. It's pretty easy to DIY; if you're interested I posted a short demo program. Dammit, stop with the intriguing ideas Will!
  20. Yeah, stella is a sticking point. I'm kind of hoping that the 2-button hack thread prods Stephen into updating stella. As a workaround until he does, you can skip the detection stuff in my demo. Then just use "INPT5" instead of "INPT1" as you're working, which will use the second joysick's button instead. This maps to "f" by default in stella. Then when you're ready to test on real hardware, just search and replace INPT5 with INPT1 and rebuild.
  21. I threw together a quick little asm demo program that demonstrates how to read the B and C buttons on the Sega Genesis controller. The program is pretty simple. I just draws the screen in one color if the B button is pressed (read through INPT4) and another if the C button is pressed. (read through INPT1) 2buttonread.asm.txt 2buttonread.bin If anyone wants to see more proof-of-concepts, take a look at my 2-button hack thread.
  22. I threw together a quick little bB demo program that demonstrates how to read the B and C buttons on the Sega Genesis controller. Why bother? 3rd party genesis pads can be had cheaply and they work without mods on the 2600, making them a popular choice for those of us that like gamepads. On top of that, they're trivial to support in your code. 2buttonread.bas 2buttonread.bas.bin The program shows a red screen if the genesis controller was NOT detected, or a light-blue one if it WAS detected. Then pressing the B and C buttons will show up on the controller on the screen. If anyone wants to see more proof-of-concepts, take a look at my 2-button hack thread which has a homebrew contribution from our very own batari. [edit] It seems that some types of Genesis controllers don't like the way bB handles VBLANK. Do the following for improved compatibility... Copy over "std_kernel.asm" from your bB includes directory over to your project directory. Then take this section of code (search for "VBLANK")... LDA #%11000010 sta WSYNC STA VBLANK ...and change it to... LDA #%01000010 ; *change top bit to 0, so paddle caps don't discharge* sta WSYNC STA VBLANK After that, rebuild your game, and it should work with all genesis controllers.
  23. If any or all of the Harmony team wants a (or another) genesis compatible pad to test with, please PM me with your shipping information. I'll gladly have one of these sent to you.
  24. Ah, I'm glad it was something mundane, rather than an incompatibility. I've added a link to your Gingerbread Man post in the first post. I believe that's the first 2600 homebrew to have sega 2-button support! I also tidied up that first post, and added a FAQ.
×
×
  • Create New...