New obstacle - electric fence

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andrew Davie

The elecric fence is kinda ubiquitous, but easy to implement.  Here's a first effort...
I guess you'll have to press a switch somewhere to turn it off.


Bomberman94

Looks great and good idea to add these fences! Do you please have a binary for us to try on real Atari?

Andrew Davie

Quote from: Bomberman94 on 04 Jun 2026, 07:26 AMLooks great and good idea to add these fences! Do you please have a binary for us to try on real Atari?

Not sure if you're saying the binaries released so far do NOT work on a real Atari?
I have just assumed they do, as I don't have a real Atari setup anymore.  They work on both Stella and Gopher emulators. The format is CDFJ+; I'm unsure of compatibility with the various dev cartridges. It may be that the only way to run on a real Atari will be through an actual cartridge with CDFJ+ board.  No idea, really.

In any case, here's the latest binary with the electric fences. Slightly updated from the prior video.
Just testing out behaviours when you hit the fence, and possible top and bottom parts (which I don't like).


JetSetIlly

Quote from: Andrew Davie on 04 Jun 2026, 08:55 AMNot sure if you're saying the binaries released so far do NOT work on a real Atari?
I think this will only work with a Harmony Encore because of the size.
https://github.com/JetSetIlly/Gopher2600
@JetSetIlly@mastodon.gamedev.place
@jetsetilly.bsky.social

Bomberman94

Quote from: JetSetIlly on 04 Jun 2026, 05:17 PM
Quote from: Andrew Davie on 04 Jun 2026, 08:55 AMNot sure if you're saying the binaries released so far do NOT work on a real Atari?
I think this will only work with a Harmony Encore because of the size.

Ah sorry - I only own a normal Harmony cartridge with up to 32K files. Maybe someone with an encore cartridge can test?

Andrew Davie

#5
I spent some time having fun with the electric fence/barrier.
Sound added - pretty awesome IMHO -- and some graphical effects.




SpiceWare

Quote from: JetSetIlly on 04 Jun 2026, 05:17 PMI think this will only work with a Harmony Encore because of the size.

Based on getting my Mac Studio to work with my Harmony carts (original, Encore, and Dev) and testing ROMS from @johnnywc23 I think it'll only work with the 128KB Dev Cart, not the Encore, and that ROMs are limited to 120KB on the Dev Cart. The full 128KB can be used when building stand-alone carts using the Melody board.

Additionally there's 2 different drivers:
  • 48-pin for the Dev cart
  • 64-pin for the Melody board

Refer to reply of topic Harmony Cart and Apple Silicon Mac?

johnnywc23

@Andrew Davie - the latest version looks and sounds great!  (played on Stella)  FYI - there is a misaligned ARM write that causes the game to crash if Stella is in DEV mode.  I usually get these with a memCopyInt that isn't on a 4-byte  boundary.

Regarding the 128K when using the ARM, once you go past 32K you cannot run the ROMs on any retail Harmony cart (standard or Encore).  Fred has mentioned that he has plans to develop either a new Harmony cart (Harmony Encore+ maybe?) that would be able to support Melody ROMs > 32K, or possibly an HEM (Harmony Expansion Module) that you would plug between an Atari and the Haomrny / Encore cart that would expand the capabilities of the Harmony.

Until then, the only way to test these games on a real system is to burn the image onto one of Fred's dev carts (he has sent one to me, Darrell and Jürgen has one also).  The caveat is that it only has 120K of space, so when we were testing Turbo, I made sure to keep the ROM size at 120K or lower so it could be tested by the group.

Darrell is correct in that there are two CDFJ+ drivers; one is 48-pin and is needed to run the game on a dev cart, and the 64-pin version is needed if you burn the ROM onto a Melody board from Fred.

I can always test the game on real hardware if you'd like as I have 512K 64-pin boards and a Melody programmer from Fred.  If you want Jüurgen, Darrell (and Nathan too) to test, you would need to limit the size to 120K and use the 48-pin driver.

Hope that helps!
John

JetSetIlly

Quote from: johnnywc23 on 05 Jun 2026, 06:58 AM@Andrew Davie - the latest version looks and sounds great!  (played on Stella)  FYI - there is a misaligned ARM write that causes the game to crash if Stella is in DEV mode.  I usually get these with a memCopyInt that isn't on a 4-byte  boundary.

It will crash (open the debugger) in Gopher2600 too if the "Abort of Memory Fault" option is set. I suppose the ARM in the Harmony is very old and does not support misaligned access at all. So if you're targeting the Harmony, this option should always be set.
https://github.com/JetSetIlly/Gopher2600
@JetSetIlly@mastodon.gamedev.place
@jetsetilly.bsky.social

johnnywc23

Quote from: JetSetIlly on 05 Jun 2026, 07:10 AM
Quote from: johnnywc23 on 05 Jun 2026, 06:58 AM@Andrew Davie - the latest version looks and sounds great!  (played on Stella)  FYI - there is a misaligned ARM write that causes the game to crash if Stella is in DEV mode.  I usually get these with a memCopyInt that isn't on a 4-byte  boundary.

It will crash (open the debugger) in Gopher2600 too if the "Abort of Memory Fault" option is set. I suppose the ARM in the Harmony is very old and does not support misaligned access at all. So if you're targeting the Harmony, this option should always be set.

Agreed.  I always do my testing with Dev mode in Stella and I check "Abort on Memory Fault" in Gopher just to be safe. :) 

Andrew Davie

Quote from: JetSetIlly on 05 Jun 2026, 07:10 AMIt will crash (open the debugger) in Gopher2600 too if the "Abort of Memory Fault" option is set. I suppose the ARM in the Harmony is very old and does not support misaligned access at all. So if you're targeting the Harmony, this option should always be set.

Noted, TY.  I have, AFAIK, now fixed all of those memory fault issues.


Andrew Davie

Quote from: johnnywc23 on 05 Jun 2026, 06:58 AM@Andrew Davie - the latest version looks and sounds great!  (played on Stella)  FYI - there is a misaligned ARM write that causes the game to crash if Stella is in DEV mode.  I usually get these with a memCopyInt that isn't on a 4-byte  boundary.

You were bang on with that. I'd only recently started using myMemCopyInt for large clears and had decided to do it with a local array, which was the problem. For anyone's reference, fixed in the C code with the aligned attribute. I had already made sure the arrays were multiples of 4 bytes long, just forgot the start!


#define W4 ((_BOARD_COLS + 3) & ~3)
#define H4 ((_BOARD_ROWS + 3) & ~3)

bool onScreenX[W4] __attribute__((aligned(4)));
bool onScreenY[H4] __attribute__((aligned(4)));


QuoteRegarding the 128K when using the ARM, once you go past 32K you cannot run the ROMs on any retail Harmony cart (standard or Encore).

Thanks for all that info. Mostly news to me.  I'll distribute 64K ROMs for the foreseeable future. I only had 128K because I was playing with the CDFJ+ shell to make sure all the options were working properly, and it got left at 128K for no particular reason.


QuoteI can always test the game on real hardware if you'd like as I have 512K 64-pin boards and a Melody programmer from Fred.  If you want Jüurgen, Darrell (and Nathan too) to test, you would need to limit the size to 120K and use the 48-pin driver.

Helps heaps, TY.  Hopefully the emulators will see me through to the end, whatever that may be. I'll call on real-hardware testers at some points, though - and TY for the offer.

Andrew Davie

Quote from: SpiceWare on 05 Jun 2026, 06:22 AMBased on getting my Mac Studio to work with my Harmony carts (original, Encore, and Dev) and testing ROMS from @johnnywc23 I think it'll only work with the 128KB Dev Cart, not the Encore, and that ROMs are limited to 120KB on the Dev Cart. The full 128KB can be used when building stand-alone carts using the Melody board.

Additionally there's 2 different drivers:
  • 48-pin for the Dev cart
  • 64-pin for the Melody board

Refer to reply of topic Harmony Cart and Apple Silicon Mac?

TY for the info. All new to me. I'll try and stick with a 64K cart for the time being.

At some point, though, I need to get my head around those two drivers. I just have whatever came with the original CDFJ+ shell that I've based this iteration on.