Apple II port to BBC Master computer

Threads about other remakes and ports.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5656
Joined: April 9th, 2009, 10:58 pm

Re: Apple II port to BBC Master computer

Post by Norbert »

Norbert wrote: March 31st, 2018, 6:56 pm
kieranhj wrote: March 31st, 2018, 6:53 pmFor this build, to start the game directly (skipping the attract sequence) change the byte at offset 0x428 from 0x8A to 0xD5. (Changes the JMP AttractMode to JMP DOSTARTGAME.)

To alter the start level change the byte at offset 0x12F9 from 0x01 to the level number. (Changes the Accumulator register before JMP start in master.asm.)
Thanks.
Is there any way to also skip the BITSHIFTERS commercial?
Modders playtest a lot.
In short bursts, I mean. Which means re-starting levels a lot.
kieranhj
Sheikh
Sheikh
Posts: 30
Joined: October 13th, 2017, 3:02 pm

Re: Apple II port to BBC Master computer

Post by kieranhj »

Norbert wrote: March 31st, 2018, 7:45 pm Is there any way to also skip the BITSHIFTERS commercial?
Modders playtest a lot.
In short bursts, I mean. Which means re-starting levels a lot.
You can remove the loading screens and wait for keypress by changing the bytes at offsets 0x34f, 0x3b8 and 0x3c1 from 0x20 (JSR function) to 0x2c (BIT - effectively a NOP.)

Unfortunately there will always be a 10 second or so load time, that's just how long it takes to get the data off the disc on the BBC machine. Most emulators support a "high speed" option.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5656
Joined: April 9th, 2009, 10:58 pm

Re: Apple II port to BBC Master computer

Post by Norbert »

Hm, all right; thanks for the info.
I'll release leapop 0.9b in about 2.5 hours.
kieranhj
Sheikh
Sheikh
Posts: 30
Joined: October 13th, 2017, 3:02 pm

Re: Apple II port to BBC Master computer

Post by kieranhj »

David wrote: March 31st, 2018, 6:18 pm PoP crashed on level 12:
crash_level_12.png

Here is the savestate:
crash_level_12.zip

Unfortunately I did not save the game *before* the crash, so I can't easily test whether the game always crashes at that point.
Hi David,

Thank you for providing the save state - this was very helpful. I have identified a memory scribble which comes down to an error I made whilst porting the shakeloose function in topctrl.asm. The original code uses the same label names to identify variables and functions in places, using the syntax of the particular Apple II assembler Jordan used. My assembler does not permit that but I missed this occurance so the two have been confused, thus writing over the function in some cases.

I will put up a bugfix test build shortly in case anyone has time & inclination to play through again. I will be doing a v1.1 in due course.
David
The Prince of Persia
The Prince of Persia
Posts: 2790
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Apple II port to BBC Master computer

Post by David »

kieranhj wrote: March 31st, 2018, 10:00 pm Thank you for providing the save state - this was very helpful. I have identified a memory scribble which comes down to an error I made whilst porting the shakeloose function in topctrl.asm. The original code uses the same label names to identify variables and functions in places, using the syntax of the particular Apple II assembler Jordan used. My assembler does not permit that but I missed this occurance so the two have been confused, thus writing over the function in some cases.
(I guess "scribble" means an accidental overwrite?)

I think I found what you mean:

The jarabove function:
Apple II: https://github.com/kieranhj/pop-beeb/bl ... RL.S#L1284
BBC: https://github.com/kieranhj/pop-beeb/bl ... .asm#L1504

The jarabove variable:
Apple II: https://github.com/kieranhj/pop-beeb/bl ... EEQ.S#L471
BBC: https://github.com/kieranhj/pop-beeb/bl ... r.asm#L196 (commented out)

Interestingly, the "jarabove" label is defined as ".jarabove", but referenced as "bne jarabove", without the dot.
Actually, it seems that all labels and variables are defined with a dot. But defines and macros are definat without it.

EDIT: I see you already fixed this on a new branch: https://github.com/kieranhj/pop-beeb/co ... 8ce8401f7a


If the colon prefix is not allowed in your assembler, then you could have used some other character instead, instead of just deleting it.
Or maybe you didn't know about the possible name clash before you deleted colons?
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5656
Joined: April 9th, 2009, 10:58 pm

Re: Apple II port to BBC Master computer

Post by Norbert »

What would be a good (i.e. easy, preferred) way for modders, who want to change more than just levels, to modify the logo screen?
Does it require the use of edit.tf, and then some kind of export?
(I have no idea how you got the pixel art inside the disk...)
David
The Prince of Persia
The Prince of Persia
Posts: 2790
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Apple II port to BBC Master computer

Post by David »

kieranhj wrote: March 31st, 2018, 10:00 pm The original code uses the same label names to identify variables and functions in places,
I found out how to find such cases using Bash:

Code: Select all

$ find pop-beeb -iname '*.asm' | xargs grep -Ei '^ (ADC|AND|ASL|BIT|CMP|CP[XY]|DEC|EOR|INC|LD[AXY]|LSR|ORA|RO[LR]|SBC|ST[AXYZ])' | cut -d' ' -f3 | sort -u > used_as_data
$ find pop-beeb -iname '*.asm' | xargs grep -Ei '^ (BCC|BCS|BEQ|BLT|BMI|BNE|BPL|BRA|JMP|JSR)' | cut -d' ' -f3 | sort -u > used_as_code
$ diff --unchanged-group-format='%=' --changed-group-format='' used_as_code used_as_data
For the source of release 1.0, this is the result:

Code: Select all

jarabove
label_80
jarabove is the mistake that you found, and label_80 is some actual self-modifying code.


By the way, you could mark the source corresponding to the v1.0 release with a tag so it would show up here: https://github.com/kieranhj/pop-beeb/releases
I did the same with SDLPoP: https://github.com/NagyD/SDLPoP/releases
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5656
Joined: April 9th, 2009, 10:58 pm

Re: Apple II port to BBC Master computer

Post by Norbert »

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5656
Joined: April 9th, 2009, 10:58 pm

Re: Apple II port to BBC Master computer

Post by Norbert »

kieranhj wrote: March 31st, 2018, 10:00 pmI will be doing a v1.1 in due course.
I've just released leapop v1.0, which, when it comes to BBC Master support, now ships with and works with your 1.1 by default.
(It also still supports your 1.0, for backwards compatibility.)
Post Reply