Jump to content
IGNORED

576NUC+ doesn't like some games modded to Joy2B+


Peruchi
 Share

Recommended Posts

Regarding Hawkquest Joy2B:

There's two preceding "original" versions:

1) The original 4-disk version

2) The Atarimax 1MB(8mbit) cart version by @playsoft per this thread:

 

@mytek

@Peruchi@Mr Robot  Did you try version #2 above, or just #1?

 

Assuming that the non-Joy2B Atarimax cart version works and the Joy2B one doesn't, there's a few things that may come to mind:

 

1) @playsoft mentioned in the post below that there was a bug that sometimes caused the game to not boot on real hardware; I patched in the proposed fix into the Joy2B release (I don't think it's in the original Atarimax cart release).  It may be possible that something about it is causing issues with 576NUC (or I implemented it incorrectly)?

 

2) One of the big differences between the original disk version and the Atarimax version is the usage of the >48K memory map (E000-FFFF, AKA the OS ROM space).

The extra code for Joy2B support (which was a more involved hack than the other Joy2B hacks I made) involves even more extra code in the OS ROM space.

I can't imagine that it would cause problems since that part of ram should be fully banked in (and the OS ROM banked out), but just in case, could that be causing issues with 576NUC memory management?

 

From my original notes (pardon the lack of comments; the key thing is where I located things in memory...):

;--------------------------------------------------
; New Button 2 handler (in OS RAM space)
;--------------------------------------------------
    ; E965: Button 2 debouncing value
    E966: AD 70 02          lda PADDL0
    E969: C9 E4             cmp #$e4
    E96B: D0 0D             BNE $E97A
    E96D: AD 65 E9          lda $E965
    E970: D0 0D             BNE $E97F
    E972: A9 01                            lda #$01
    E974: 8D 65 E9          sta $E965
    E977: 4C 9E 85          JMP $859E
    E97A: A9 00                            lda #$00
    E97C: 8D 65 E9          sta $E965
    E97F: 60                                RTS
;--------------------------------------------------   
; New, relocated Custom Immediate VBLANK handler (the call to setting SETVBV needs to be set to the new address too)
;--------------------------------------------------
    F2E0: AD 00 D3          LDA PORTA                            ; $FE380 in the rom, $E965 in system memory 
    F2E3: 29 0F             AND #$0F                            ; ($FED40 in rom/$F2DF in system) is where free space begins)
    F2E5: 8D 78 02          STA STICK0
    F2E8: AD 10 D0          LDA TRIG0
    F2EB: 8D 84 02          STA STRIG0
    F2EE: AD 00 D2          lda POT0
    F2F1: 8D 0B D2          STA POTGO
    F2F4: 8D 70 02          STA PADDL0
    F2F7: A9 01             LDA #$01
    F2F9: 8D 16 E8          STA $E816
    F2FC: AD 18 02          LDA CDTMV1
    F2FF: F0 08             BEQ $E985
    F301: CE 18 02          DEC CDTMV1
    F304: D0 03             BNE $E985
    F306: 20 C2 E9          JSR $E9C2              ;[expand]
    F309: AD 1A 02          LDA CDTMV2
    F30C: F0 08             BEQ $E992
    F30E: CE 1A 02          DEC CDTMV2
    F311: D0 03             BNE $E992
    F313: 20 C5 E9          JSR $E9C5              ;[expand]
    F316: AD 1C 02          LDA CDTMV3
    F319: F0 0A             BEQ $E9A1
    F31B: CE 1C 02          DEC CDTMV3
    F31E: D0 05             BNE $E9A1
    F320: A9 00             LDA #$00
    F322: 8D 2A 02          STA CDTMF3
    F325: AD 1E 02          LDA CDTMV4
    F328: F0 0A             BEQ $E9B0
    F32A: CE 1E 02          DEC CDTMV4
    F32D: D0 05             BNE $E9B0
    F32F: A9 00             LDA #$00
    F331: 8D 2C 02          STA CDTMF4
    F334: AD 20 02          LDA CDTMV5
    F337: F0 0A             BEQ $E9BF
    F339: CE 20 02          DEC CDTMV5
    F33C: D0 05             BNE $E9BF
    F33E: A9 00             LDA #$00
    F340: 8D 2E 02          STA CDTMF5
    F343: 6C 24 02          JMP (VVBLKD)      
;--------------------------------------------------
;As pointed out by Paul Lay, replace the following mutexes to fix a bug from the original cart release:
                    AD 0E D4          LDA NMIEN
                    48                PHA
;with:
          A9 40             LDA #$40
                    48                PHA
                    EA                NOP
;--------------------------------------------------

 

And finally, for those wondering: I tested Hawkquest Joy2B on an actual NTSC 800XL and in Altirra; I didn't test this on other systems (I don't even have NTSC 128K Ataris anymore ? )

Edited by Bobo Cujo
Link to comment
Share on other sites

Could the issue be trying to binary load an AtariMaxFlash 1MB cart image?

 

The HQ file posted earlier has the wrong filename extension, it should be a .car file. Altirra is able to load it (as a 1MB AtariMaxFlash cart) because it recognises that the first 16 bytes are a CART header. I don't know what support 576NUC+ has for carts.

  • Like 2
Link to comment
Share on other sites

5 hours ago, Bobo Cujo said:

Regarding Hawkquest Joy2B:

There's two preceding "original" versions:

1) The original 4-disk version

2) The Atarimax 1MB(8mbit) cart version by @playsoft per this thread:

 

@mytek

@Peruchi@Mr Robot  Did you try version #2 above, or just #1?

I tried both on emulation with varying memory configs and they both worked, I haven't tried the cart version on a real NUC, so far all my testing has been using a fujinet. I'll try the cart version when I get home from work tonight, @Peruchi probably can't test a cart version as there are only a couple of people who have cart ports on their NUCs.

 

  • Like 1
Link to comment
Share on other sites

As @Mr Robot stated, I don't have the cart expander board for the NUC, so I can't properly test the 1MB image of the game "Hawkquest".

 

It seems that @playsoft got the right answer to the problem, maybe the file should have a .car extension, not .xex, and an update on the github page would be applicable:

 

hq.thumb.png.2a43b5cbb537d15b1fd4c4f43a2c92de.png

I tested on my NUC the original 4-disk version, as mentioned by @Bobo Cujo. I wish I could understand all the machine language code he provided, but, alas, I'm just an enthusiast of the A8, not more than that ?

Link to comment
Share on other sites

I'm far from an expert on 576NUC+ extended memory since the design and the jed file used in the EMMU are not my doing. However the base 64K memory should be the same from a functionality point of view as a stock XL/XE computer.

 

As for carts, the stock 576NUC+ is a SIO-centric computer and does not provide a cart port without a custom daughter board designed by @Mr Robot which as he mentioned there not many of those presently in the wild. So all 576NUC+ tests of these Joy2B+ games needs to be done with either ATRs or XEX versions.

  • Like 1
Link to comment
Share on other sites

11 hours ago, Bobo Cujo said:

;--------------------------------------------------
; New Button 2 handler (in OS RAM space)
;--------------------------------------------------
    ; E965: Button 2 debouncing value
    E966: AD 70 02          lda PADDL0
    E969: C9 E4             cmp #$e4
    E96B: D0 0D             BNE $E97A
    E96D: AD 65 E9          lda $E965
    E970: D0 0D             BNE $E97F
    E972: A9 01                            lda #$01
    E974: 8D 65 E9          sta $E965
    E977: 4C 9E 85          JMP $859E
    E97A: A9 00                            lda #$00
    E97C: 8D 65 E9          sta $E965
    E97F: 60                                RTS

Unless whatever is at $859E is depending on the value of A or the flags, you can save a couple of bytes here by replacing the LDA $01 STA $e965 instruction pair at $E972 with a single INC $E965 since the previous two instructions (LDA $E965 BNE $E97F) mean that both A and $E965 must be 0 at this point.  

 

The LDA + STA take 6 cycles, the same as the INC, so there is no CPU time savings, but hey, two bytes is two bytes!

 

Again, this optimization depends upon whatever is at the destination of the JMP $859E.  If it does not rely on A or the flags, then this is a safe code change.

 

 

  • Like 1
Link to comment
Share on other sites

The Joy2B version of Hawkquest was never made in 1MB .xex form; it was only made available in .car (Atarimax cartridge) form.

If that was made into an .xex, it would definitely explain why the game didn't boot ?

 

To my knowledge, I don't think non-Joy2B Hawkquest ever made it to an .xex version either...

 

(for those wondering: I didn't make a Joy2B version of the original 4-disk version, since it lacks NTSC compatibility)

  • Like 3
Link to comment
Share on other sites

11 hours ago, Bobo Cujo said:

The Joy2B version of Hawkquest was never made in 1MB .xex form; it was only made available in .car (Atarimax cartridge) form.

If that was made into an .xex, it would definitely explain why the game didn't boot ?

Considering that the NUC only has 576K it wouldn't matter if a 1MB version had been made ;)

 

Link to comment
Share on other sites

  • 4 weeks later...

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...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...