Shop OBEX P1 Docs P2 Docs Learn Events
Tempest 2000 for P2 - Page 2 — Parallax Forums

Tempest 2000 for P2

2»

Comments

  • At the point where you DIY up some contraption, forget about USB

  • evanhevanh Posts: 15,854

    @Wuerfel_21 said:
    At the point where you DIY up some contraption, forget about USB

    Nice to know, thanks.

  • MicksterMickster Posts: 2,691

    @tritonium said:
    hi
    Best I can find is double that for half the resolution (from the uk) https://www.ebay.co.uk/itm/395380522342
    Dave

    If the order => £8, the shipping is free but tax is also applied. Makes sense when purchasing multiples.
    Keep an eye on the voltage though because I saw one that required a minimum of 8V (weird)

    https://aliexpress.com/w/wholesale-rotary-encoder-optical.html

    The claimed "7-day delivery" has been reality for me, recently.

  • MicksterMickster Posts: 2,691

    Imagine a game with force-feedback (prices are insanely low)

    https://aliexpress.com/item/1005001686327895.html

    Craig

  • roglohrogloh Posts: 5,756
    edited 2024-07-17 04:52

    There's also something like this available from ali that is relatively cheap and looks interesting for UI devices...

    https://www.aliexpress.com/item/1005004437852504.html

    It's 5V only so would need some translation or resistors to protect the P2 (unless it's open collector) but also has an inner shaft for more rapid rotation if required. I still have not yet tried out this Tempest game to see how useful that might or might not be, along with the 100 stops per revolution detent feeling that a device like this would provide. Depending on the type of game that uses it perhaps in some cases you'd prefer a freer rotation and/or inertia on a spinner.

  • evanhevanh Posts: 15,854

    Yes, those will be open-collector. They could be either high-side (PNP) or low-side (NPN). Euro origin parts are usually PNP. USA/Japan origin parts are usually NPN.

  • I use those from Wavetop but they should all be similar. The optical sensors are open collector but the encoders have an internal pullup to 5V with ~1kOhm or something. I use this circuit to connect it to the P1. Should also work with P2.

  • I like how the thread just turned into encoder discussion. I ordered one of those cheapo KY-40 encoders to play with. I think Parallax sells a similar one in their store. Those do 20 cycles per turn, which allegedly is just about the right amount.

  • RaymanRayman Posts: 14,572

    Now that I think about it, maybe trying to use a mouse wheel is easiest solution?
    Not sure how playable that is though...

  • Mouse wheel is a bit anemic because the tick rate is slow and it doesn't spin smoothly. I've been messing around and just using the actual mouse X sensor works pretty ok. Though the way the rotary controller code works is quite odd.

    So on the Jaguar, it tries to detect the encoder's grey code sequence in a timer IRQ and then it adds or subtracts a value between $2000 and $5000 to rot_cum whenever it detects a movement. The sensitivity value is adjusted dynamically based on how often the ticks happen.

    In the menus, any frame where rot_cum is non-zero will move the cursor.

    In the main game, rot_cum moves the player, but for some reason only when arrow keys are held down due to wrong order of conditionals (how did this ever work?).

    In the bonus stages, things kinda just work, but it's kinda too sensitive.

    Currently i'm just putting mouse deltaX << 10 into rot_cum.

  • I've pushed the mouse support code to github. Should be fairly obvious how to make it read other devices. Though the sensitivity logic on the 68000 side is totally bypassed. To use, you need to enable rotary controller in the menu and possibly adjust the button mapping (note: certain controls are hardcoded. notably, vertical control in warp stages and the level selector).

  • RaymanRayman Posts: 14,572

    Hmm... mouse X is interesting... Maybe deltax could be translated into rotational velocity? So, mouse at starting position means stay still and mouse all the way to the right means spin fast clockwise? Or, something like that...

  • No, it's just direct mapped. Move the mouse right -> spin right. That means you have to lift up and reset the mouse quite often, but FPS games also need that, so one ought to be used to that.

  • evanhevanh Posts: 15,854

    @Wuerfel_21 said:
    So on the Jaguar, it tries to detect the encoder's grey code sequence in a timer IRQ and then it adds or subtracts a value between $2000 and $5000 to rot_cum whenever it detects a movement. The sensitivity value is adjusted dynamically based on how often the ticks happen.

    It had no hardware counters for a mouse?! That I find very surprising.

  • @evanh said:

    @Wuerfel_21 said:
    So on the Jaguar, it tries to detect the encoder's grey code sequence in a timer IRQ and then it adds or subtracts a value between $2000 and $5000 to rot_cum whenever it detects a movement. The sensitivity value is adjusted dynamically based on how often the ticks happen.

    It had no hardware counters for a mouse?! That I find very surprising.

    I'm talking about the spinner controller there. Though a dumb mouse would use a similar thing, just twice for X/Y. However, the jaguar is a (poorly designed) game console that connects to a TV, hardware mouse support is low on the list of priorities.

  • There is now support for actual quadrature encoder. Note that mine came with built-in pull-up resistors. P2 has fine pullup built-in, so don't connect the power pin if that's the case.

    I tried implementing the acceleration mechanic the Jaguar code uses, but it feels kinda bad. The sensitivity is way to high for warp stage regardless. I might actually (gasp) make an editorial change here and reduce the sensitivity of warp stage rotary controls.

  • Okay, getting the acceleration backwards is not correct and bad :) Though halving warp sensitivity still seems good.

  • RaymanRayman Posts: 14,572

    @Wuerfel_21 What kind of encoder do you have?

    BTW: Off topic maybe, but all these emulators kind of make be sad that my actual arcade cabinet has a vertical screen...
    Just thinking about slipping a new LCD monitor over top of it so can do these games on my cab...
    Some new monitors are so thin, think it can work...

  • evanhevanh Posts: 15,854

    @Wuerfel_21 said:
    Okay, getting the acceleration backwards is not correct and bad :)

    Motion tracking will be clockwise/anticlockwise, rather than left/right. So, a bottom half pipe will feel opposite direction at first glance.

  • @Rayman said:
    @Wuerfel_21 What kind of encoder do you have?

    cheap ones that look like this.

    BTW: Off topic maybe, but all these emulators kind of make be sad that my actual arcade cabinet has a vertical screen...
    Just thinking about slipping a new LCD monitor over top of it so can do these games on my cab...
    Some new monitors are so thin, think it can work...

    LCD just isn't as good as a real RGB-driven CRT... Though I guess finding any cab in good condition these days is a bit hard. The crafty would realize that an arcade monitor is basically the same as a cheap TV (or an expensive TV if it's one of those big-screen japanese cabs). If you find a crummy TV on the roadside, remove the front bezel and hotwire an RGB input (skip this if you live in Europe), you just need some woodworking and nice buttons to make an arcade.

    @evanh said:

    @Wuerfel_21 said:
    Okay, getting the acceleration backwards is not correct and bad :)

    Motion tracking will be clockwise/anticlockwise, rather than left/right. So, a bottom half pipe will feel opposite direction at first glance.

    No, i meant "backwards acceleration" as in "if you turn it faster it reacts proportionally slower", which is the opposite of the intended effect.

  • evanhevanh Posts: 15,854

    @Wuerfel_21 said:
    No, i meant "backwards acceleration" as in "if you turn it faster it reacts proportionally slower", which is the opposite of the intended effect.

    You'd said left/right earlier so I stitched the two together and figured maybe you'd made an assumption about how the motion tracked.

  • RaymanRayman Posts: 14,572

    Was curious what the actual jaguar had and found this on wikipedia:

    The most common criticism with the Jaguar version of Tempest 2000 was the lack of a rotary controller similar to the controller on the Tempest arcade machine.

  • RaymanRayman Posts: 14,572

    @Wuerfel_21 Happy with the low cost encoder?

  • Yea, the jaguar never had it's official rotary controller released.

    Idk if I can pass judgement on the encoders with them free-floating like this. I am more comfortable with the gamepad controls.

  • RaymanRayman Posts: 14,572

    Wonder if one of these steering wheels for xbox controllers would be good here...

    https://www.amazon.com/dp/B0CYKW3J92/

  • No, you need continuous rotation.

    Also, as mentioned, the normal gamepad controls are just fine.

  • ColeyColey Posts: 1,110

    @Wuerfel_21 Fansatic achievement, kudos to you.

    @Baggers knows Jeff Minter so maybe he can get a message to him about this....

  • Fansatic? :)

    Just don't tell the Atari corporate goons. Though I guess they didn't care about the source being on github or freeware T2K clones on PC, so they're probably too busy with the blockchain or whatever they're doing.

  • If you tried to build this and it failed to download the RLN submodule, this has now been fixed (URL went dead)

  • Ahle2Ahle2 Posts: 1,179

    Impressive work @Wuerfel_21 :)

    (I haven't been here for over two years and I just thought that I should do a quick visit to see what's happening)

Sign In or Register to comment.