King Tut.csm what's going on?

You need an actual VIC.

Moderator: Moderators

Post Reply
matsondawson
The Most Noble Order of Denial
Posts: 343
Joined: Fri May 01, 2009 4:44 pm

King Tut.csm what's going on?

Post by matsondawson »

I'm trying to load King Tut from tape, and it keeps failing with the following (below). The question is what's the JMP ($0014) meant to do.
And, given the program below, why is line 18 poking stuff to the keyboard buffer and what's the inverted "E".

Code: Select all


DCB8 STY $68
DCBA RTS

D804 LDA $64
D806 LDY $65
D808 STY $14
D80A STA $15
D80C RTS

E12D LDA #$E1
E12F PHA
E130 LDA #$43
E132 PHA
E133 LDA $030F
E136 PHA
E137 LDA $030C
E13A LDX $030D
E13D LDY $030E
E140 PLP
E141 JMP ($0014)
1101 ???err 239
bad instruction: EF pc:1102
Image
User avatar
Mike
Herr VC
Posts: 5134
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

matsondawson wrote:The question is what's the JMP ($0014) meant to do.
It's part of the routine in the BASIC interpreter, that handles the SYS command. JMP ($0014) calls the routine specified in the numeric parameter of SYS. The return address $E144 - 1 is pushed on the stack in the instructions of $E12D .. $E132.
And, given the program below, why is line 18 poking stuff to the keyboard buffer and what's the inverted "E".
Standard procedure to LOAD and RUN the next program from tape. It simulates SHIFT+[RUN STOP]. And the "inverted E" switches to white colour, so you don't see the "PRESS PLAY ON TAPE", etc... prompts. :roll:

This header program seems to be pretty useless, anyway. At least the following program will set 45/46 to new values, and the POKEs to 43/44 refer to an unexpanded VIC-20. What RAM configuration does the game demand?
matsondawson
The Most Noble Order of Denial
Posts: 343
Joined: Fri May 01, 2009 4:44 pm

Post by matsondawson »

I believe it's an unexpanded game.
If I skip that loader and just load normally it seems to work.
I think there's something wrong with my tape load routines, as if i type the program in by hand it works fine, but if i load it and run, it does that bad branch.

Thanks for the help.
User avatar
Mayhem
High Bidder
Posts: 3007
Joined: Mon May 24, 2004 7:03 am
Website: http://www.mayhem64.co.uk
Location: London

Post by Mayhem »

The TAP in GB20 loads and runs fine, maybe it's the emulator? Cheers for that screen though, tells me who programmed it to enter into the database! Another John Ferrari program (sadly RIP), who went onto do Summer and Winter Camp for Thalamus for example.
Lie with passion and be forever damned...
matsondawson
The Most Noble Order of Denial
Posts: 343
Joined: Fri May 01, 2009 4:44 pm

Post by matsondawson »

ok King Tut code sucks...
I was trying to load the csm of it, that failed, then I tried the tap and that failed the same way.
I loaded up vice and added a break point, and it turns out there's some dodgy code in king tuts start routine.

Code: Select all

ISB $5554     <- undocumented instruction
NOOP $0F,X   <- same.  what the!?
LDA #$02
LDA #$64
STA $0328
RTS
I think it's branching 4 bytes too early in the code.
I haven't implemented undocumented instructions yet which explains why it doesn't work for me.
User avatar
nbla000
Salmon Run
Posts: 2582
Joined: Thu Oct 13, 2005 8:58 am
Location: Italy

Post by nbla000 »

I've downloaded a tap file here and seems that works.

Btw it works for unexpanded vics only, tested on last Vice version.
Mega-Cart: the cartridge you plug in once and for all.
Post Reply