News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Joseman

Badlands mysterious load

Started by Joseman, 00:32, 12 October 14

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Joseman

Hi all

I've been playing badlands this days analysing the simplistic loader...

If you don't know, badlands has 2 modes: 64k's (no music, no sound) 128 k's (music and sounds)

Taking a look at the tape loader there is a part where you can think that is loading the sounds and the music on the second bank of the 6128:
...
ld bc,#7fc4
out (c),c
ld hl,#4000
ld de,#4000
call l0141
...
.l0141
ld a,#99
call #bca1
ret
..X..
the strange thing is, if i tell the loader  to not load this part, you think that the normal is the game will load with no music and no sound...

But no!, the game still loads with music and sounds!!

And i swear that i can't see any difference with the 128k's version with or without this load!!

Note that even on the cpc464 where the #7fc4 has no efect the #4000 direction gets overwrited by the main load #300 - #9000.

so... what is this load for???

Anyone can solve this mystery?

Thanks :)

Joseman

#1
Hi again!

I'll reply myself  ;D

The "mysterious" load is indeed the music and the efects for the 128k's models, the problem was with WINAPE that, after a reset it DOESN'T clear the ram!!, then the music data was always loaded, even if i don't load the 128k's data music, on winape it always stays loaded in ram (second bank C4 #4000), then the apparent effect of  not seeing the difference between load or not load the 128k's data!  :laugh:

It's normal that WINAPE doesn't clear the second bank ram after a reset?

On a side note, Badlands doesn't bother to autodetect if the model is a CPC with 64k's or more ram, if i remove the data music on a 128k's model, Badlands will crash right after load the game, lazy programmers, lazy loader, lazy spectrum game...






Executioner

Quote from: Joseman on 12:12, 31 October 14
It's normal that WINAPE doesn't clear the second bank ram after a reset?

Yes, it's not supposed to do that otherwise it would wipe out any Silicon Disc data if it existed. There is a Cold Reset option.

Reset: CTRL-F9
Cold-Reset: CTRL-SHIFT-F9

TFM

WinApe behaves like a real CPC, which does not delete the Exp.RAM either (at Reset).  :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Joseman

Quote from: Executioner on 00:14, 13 November 14
Yes, it's not supposed to do that otherwise it would wipe out any Silicon Disc data if it existed. There is a Cold Reset option.

strange that the silicon disc data is affected with a reset of the second bank of a 6128, it share the same i/o address?

Quote from: TFM on 19:52, 14 November 14
WinApe behaves like a real CPC, which does not delete the Exp.RAM either (at Reset).  :)

strange too, i suposse that they thought that few people will do a reset in a cpc when they don't provide such button  :laugh:

gerald

Quote from: Joseman on 11:31, 16 November 14
strange that the silicon disc data is affected with a reset of the second bank of a 6128, it share the same i/o address?
Yes, at least DK tronics one maps to the upper 256k of the possible expansion RAM

Quote from: Joseman on 11:31, 16 November 14strange too, i suposse that they thought that few people will do a reset in a cpc when they don't provide such button  :laugh:
Think about SW reset (RST0)

Also, there is no such thing as a RAM reset from a HW point of view. The CPC FW initialise most of the base 64K to 0, but does not care about expansion.
Now, why initialising all RAM ? Unless you assume that it is at know value after power on (which is not), there is no good reason ! Programmers have to initialise ram they use  ;)

Executioner

Quote from: Joseman on 11:31, 16 November 14
strange that the silicon disc data is affected with a reset of the second bank of a 6128, it share the same i/o address?

It isn't affected by a reset unless you hold the button down too long and disable the memory refresh. The standard 6128 firmware doesn't clear any extra banks of memory. It is posible that the 464 firmware could clear a bank if it were mapped in since the firmware doesn't do OUT #7fxx,#c0 like the 6128 firmware.

arnoldemu

Quote from: Executioner on 03:24, 17 November 14
It isn't affected by a reset unless you hold the button down too long and disable the memory refresh. The standard 6128 firmware doesn't clear any extra banks of memory. It is posible that the 464 firmware could clear a bank if it were mapped in since the firmware doesn't do OUT #7fxx,#c0 like the 6128 firmware.
Wouldn't the external hardware see the reset and reset the memory configuration?
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Executioner

Quote from: arnoldemu on 14:51, 17 November 14
Wouldn't the external hardware see the reset and reset the memory configuration?

It probably does, but I don't have a 464 with all possible memory expansions to test it on though. I do seem to remember getting a corrupt display on a 464 years ago after a reset, but that may have been using soft reset after playing with the memory mapping.

Powered by SMFPacks Menu Editor Mod