Jump to content
chad5200

3E bankswitching is not working on Harmony Encore

Recommended Posts

Andrew Davie is working on a Sokobon game and it uses 3E bankswitching.

 

It looks like the 3E bankswitching scheme is not working correctly on the Harmony Encore v.1.06.

 

 

There are also reports that the Boulder Dash demo uses 3E bankswitching and that game also does not work on the Harmony Encore.

 

Any chance the developers could take a look at this and possibly get 3E bankswitching to function correctly?

 

 

 

Share this post


Link to post
Share on other sites

There was some discussion on 3E not working right with Harmony a while back. Unfortunately, Batari never weighed in on the issue.

 

I don't know how often he reads the forums. A PM or email might be the best way to get his attention. 

 

 

Share this post


Link to post
Share on other sites

At some point, the Harmony software may get open sourced and that will really open up the possibilities, but I think that depends on the amount of Harmony Encore carts in backstock.

Share this post


Link to post
Share on other sites

Dredging my memory, although 3E is in principle capable of addressing heaps of RAM and ROM, to maintain compatibility with existing boards available at the time, the "official" scheme was limited to a maximum of 480K ROM and 32K RAM. This is way back, so I'm really grasping at thin memories here.  In principle, the format can address much more memory... you are probably stepping outside the bounds of "official" if you do that.
So, it's an artefact of being compatible with Harmony (or similar) I seem to recall.  But definitely, 480K ROM and 32K RAM should work, if I am not completely mistaken.
 

Share this post


Link to post
Share on other sites

The Krokodile cart was limited to 32K RAM. This is almost certainly the original "limit" on RAM usage in the 3E format. Nonetheless, 3E itself can handle up to 256 x 1K RAM (=256K) banks switching via write to 3E, and living at $7000-$73FF (READ) and $7400-$77FF (WRITE). Additionally, the ROM banks can be switched into the same area with up to 256 x 2K ROM banks (=512K) living at $7000-$77FF (READ). I cannot recall the correct behaviour for if you switch a ROM bank ($7000-$77FF) and then a RAM bank and then attempt to READ at $7400-$74FF. It might be implementation dependent, and hence a potential source of incompatibility. That is, do you still see the upper half 1K of the previously switched ROM bank, or... what?

Additionally, the fixed bank lives at $7800-$7FFF (i.e., 2K) and as far as I recollect it is always the LAST bank in the ROM (which, in hindsight, is rather silly). I would have made it the FIRST, so that the size doesn't affect where the reset vectors are. In any case, it does appear to be the last 2K of the ROM, whatever size it is.

Apparently it was the Cuttle Cart 2 (CC2) which drove the limitation of 480K for ROM size for 3E compatibility. Again, that was pretty much an informal agreement to not produce ROMs over 480K in size, in order to maintain CC2 compatibility.

So, that's all I can determine at this point.

Edited by Andrew Davie

Share this post


Link to post
Share on other sites
7 hours ago, Andrew Davie said:

I cannot recall the correct behaviour for if you switch a ROM bank ($7000-$77FF) and then a RAM bank and then attempt to READ at $7400-$74FF. It might be implementation dependent, and hence a potential source of incompatibility. That is, do you still see the upper half 1K of the previously switched ROM bank, or... what?


I have remembered. To answer my own question, the "cart" has no way of knowing if an access is a read or a write, so any access to $7400-$77FF is a WRITE, and $7000-$73FF is a READ. So there's no way of "reading" that 2nd 1K block. Any attempt to do so will actually trigger a WRITE to the lower block 'shadow' location.  So, no extra 1K of ROM data to play with, alas, in that 2nd 1K block when RAM is switched in.

Share this post


Link to post
Share on other sites

The Boulder Dash demo does work on Harmony Encore. If it doesn't work for someone, most likely the console switches are set to PAL mode for the ROM, as it's a dual-format ROM. Offhand, I don't know what the console switches need to be set to for it to work properly, but if someone does know then go ahead and share.

 

But, yes, the 3E implementation, although enough for Boulder Dash on Harmony Encore, is still incomplete. I didn't reply to the first reports above for two reasons. First, I recall seeing some posts that were a bit angry that the firmware wasn't complete (not in this thread, but in one of the ones linked above). Second, at the time I wasn't able to do anything about the incomplete code.

 

There is no technical reason that I know of that would stop Harmony Encore from a full 3E implementation with 480k and 32k. There are some things that make the code challenging to write, though. Still, the only thing that has prevented full 3E from being finished is my lack of time to invest in the code. My Linux PC with all of the source code on it is in storage right now as I don't have a suitable place to set it up in my current living situation, but I will have a place before too long.

  • Like 5

Share this post


Link to post
Share on other sites
6 minutes ago, batari said:

The Boulder Dash demo does work on Harmony Encore. If it doesn't work for someone, most likely the console switches are set to PAL mode for the ROM, as it's a dual-format ROM. Offhand, I don't know what the console switches need to be set to for it to work properly, but if someone does know then go ahead and share.

 

But, yes, the 3E implementation, although enough for Boulder Dash on Harmony Encore, is still incomplete. I didn't reply to the first reports above for two reasons. First, I recall seeing some posts that were a bit angry that the firmware wasn't complete (not in this thread, but in one of the ones linked above). Second, at the time I wasn't able to do anything about the incomplete code.

 

There is no technical reason that I know of that would stop Harmony Encore from a full 3E implementation with 480k and 32k. There are some things that make the code challenging to write, though. Still, the only thing that has prevented full 3E from being finished is my lack of time to invest in the code. My Linux PC with all of the source code on it is in storage right now as I don't have a suitable place to set it up in my current living situation, but I will have a place before too long.

 

tenor.gif?itemid=10618052

  • Like 1
  • Haha 5

Share this post


Link to post
Share on other sites

Hmm, I just tried both versions of the demo on my Encore.  Both start up fine, I can see the splash screen and title screen, but both crash when I try to start the game.  My C=1084S handles PAL frame rates just fine, I've used that ability with my Amiga since '91, so it's not that.

 

 

 

 

Share this post


Link to post
Share on other sites
14 hours ago, SpiceWare said:

Hmm, I just tried both versions of the demo on my Encore.  Both start up fine, I can see the splash screen and title screen, but both crash when I try to start the game.  My C=1084S handles PAL frame rates just fine, I've used that ability with my Amiga since '91, so it's not that.

 

 

 

 

It works for me, but if it doesn't work for everyone, then clearly there is more work to do. If you have a different console, I'd give that a try as there may be some timing differences between various consoles that need to be worked out.

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, batari said:

It works for me, but if it doesn't work for everyone, then clearly there is more work to do. If you have a different console, I'd give that a try as there may be some timing differences between various consoles that need to be worked out.

Thank you for checking this out. If you need any special test code from Sokoban or similar, just ask.

  • Like 1

Share this post


Link to post
Share on other sites
13 hours ago, batari said:

It works for me, but if it doesn't work for everyone, then clearly there is more work to do. If you have a different console, I'd give that a try as there may be some timing differences between various consoles that need to be worked out.

 

  • light sixer - crashes right away after hitting FIRE to starting a game
  • 4-switch - game starts playing after hitting FIRE, but within a few seconds the screen starts to jump up/down, become scrambled, then crashes
  • evil7800 - plays just fine

 

IMG_2110.thumb.jpg.7f2a48dd175d857fea75e0487f972a00.jpg

 

  • Thanks 1

Share this post


Link to post
Share on other sites
On 8/17/2019 at 2:29 PM, SpiceWare said:

 

  • light sixer - crashes right away after hitting FIRE to starting a game
  • 4-switch - game starts playing after hitting FIRE, but within a few seconds the screen starts to jump up/down, become scrambled, then crashes
  • evil7800 - plays just fine

 

IMG_2110.thumb.jpg.7f2a48dd175d857fea75e0487f972a00.jpg

 

I can confirm the same behavior with my 4 switch (title screen works, showed game for 1 sec then crash)

and my 7800 (game works fine, but is stuck in PAL mode due to my right difficulty switch stuck on A! 😅)

 

Sokoban behaves the same way (but does not roll on my 7800, since there is a dedicated NTSC build)

 

Cheers,

Ben

Share this post


Link to post
Share on other sites

I got all of my computers out of storage in October and though they aren't set up, I got the data off of all of them and onto a portable hard drive so I am able to develop again, and have been working on a new BIOS for Encore that includes these 3E fixes.

 

I think only a few small tweaks are needed for the Boulderdash demo to work on all systems, and I might release an interim fix for that here, but the goal with the new BIOS is the 480k+32k as suggested above.

 

Anyone have some of these 480k+32k 3E roms for testing purposes?

Share this post


Link to post
Share on other sites
13 minutes ago, batari said:

Anyone have some of these 480k+32k 3E roms for testing purposes?

Look here:

There are 3F and 3E versions. The latest one (BadApple1_0) is probably the best test ROM for you.

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...