News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Joseman

Burning Rubber on CPC classic

Started by Joseman, 13:48, 30 September 23

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Joseman

These days i was trying to execute Burning Rubber on classic just disabling the CPC features.

Well, it boots to the menu and music...

Just for fun, nothing else!


poulette73

How did you deactivate the CPC Plus functions?

How is it carried out? (C4CPC, M4 Board with CPR injection, other)

Thanks ! 😉

Joseman

Quote from: poulette73 on 11:41, 01 October 23How did you deactivate the CPC Plus functions?

How is it carried out? (C4CPC, M4 Board with CPR injection, other)

Thanks ! 😉

-The cart84, that is the first activated on &C000, I put it in &C000 configuration &C3.
-The secuence for activate the plus hardware, put nop nop in the out (c),c bucle.
-Deactivate (nop nop on the out (c),c):

  -ld bc,#7f84 (for not activate the upper rom on classic)
  -ld bc,#7fb8 (for not activate the asic pagination)
  -ld bc,#7fb0  (they don't use #7fa0) for not deactivation de asic pagination
  -ld bc,#df84 (on the plus this activate cart84)

-Preventing the program to erase with ldir the range on &C000

-The writings to the Asic registers on the range &6000-&6xxx doesn't matter on the classic.

-the nops on the outs were made with search of the ld bc's with F3 on winape

Now i'm trying to de the same with Pang, it seems that they activate the IM2 ints, and something is erasing the table of ints, crashing on classic. I have to look what is happening.

Beside this, i don't think that it has any use on a CPC classic, Pang for example, the balls are hardware sprites, how difficult can be to do it with software on classic? any chance to run Pang on a classic changing the hardware routine for software ones?













poulette73

Thank you for all these very useful details. 

In fact, it was me who misunderstood, sorry.  
I hadn't thought that the game was launched on an Amstrad Plus with the Plus features disabled (I had thought that the CPR had been modified to run on CPC old, with the Plus functions disabled... :D )

lmimmfn

It's probably easier to update WEC with mode 0 on the CPC that it will be trying to get this working on a normal CPC.
6128 for the win!!!

dthrone

#5

[/quote]


Beside this, i don't think that it has any use on a CPC classic, Pang for example, the balls are hardware sprites, how difficult can be to do it with software on classic? any chance to run Pang on a classic changing the hardware routine for software ones?

[/quote]
Absolutely not, it would require a complete rewrite!  It would be easier to change some Zap t Balls gfx and layouts to imitate Pang levels.

andycadley

Quote from: Joseman on 18:15, 01 October 23Now i'm trying to de the same with Pang, it seems that they activate the IM2 ints, and something is erasing the table of ints, crashing on classic. I have to look what is happening.

One of the subtle differences with the Plus is that, once the hardware is enabled, the vectored address can be controlled to some degree (the auto-clear part is very buggy but the basic concept functions). So it's possible that Pang doesn't actually have a full table of IM2 vectors.

Quote from: Joseman on 18:15, 01 October 23Beside this, i don't think that it has any use on a CPC classic, Pang for example, the balls are hardware sprites, how difficult can be to do it with software on classic? any chance to run Pang on a classic changing the hardware routine for software ones?

It'd be a huge effort and probably insanely slow. Replacing the use of hardware sprites is very non trivial (it's also why I'm not a fan of things like Switchblade that are really CPC games with slight tarting up using the Plus hardware, rather than being geared around it).

Joseman

Quote from: andycadley on 14:27, 02 October 23One of the subtle differences with the Plus is that, once the hardware is enabled, the vectored address can be controlled to some degree (the auto-clear part is very buggy but the basic concept functions). So it's possible that Pang doesn't actually have a full table of IM2 vectors.


Yes, i took a look at it yesterday. They put on I register the &C3 value for the MSB, but the LSB is changing.

i don't know anything about the plus and little about the the IM2 int. I suposse that there is diferent hardware (Asic) writing the LSB value?

this value is hardware coded or there is any software configuration to assign the LSB value to a certain hardware?

anyway, i believe that there must be little amount of different LSB values on a stock plus?

or maybe i'm totally wrong and the IM2 mode doesn't work like i think?



andycadley

Quote from: Joseman on 18:53, 02 October 23Yes, i took a look at it yesterday. They put on I register the &C3 value for the MSB, but the LSB is changing.

i don't know anything about the plus and little about the the IM2 int. I suposse that there is diferent hardware (Asic) writing the LSB value?

this value is hardware coded or there is any software configuration to assign the LSB value to a certain hardware?

anyway, i believe that there must be little amount of different LSB values on a stock plus?

or maybe i'm totally wrong and the IM2 mode doesn't work like i think?


The ASIC has a register which can set the upper 5 bits of the low byte, the lowest bit is always zero. The other two bits are supposed to indicate the source of the interrupt (Raster or one of the three DMA channels) although there are some bugs with that.

Joseman

Quote from: andycadley on 20:51, 02 October 23The ASIC has a register which can set the upper 5 bits of the low byte, the lowest bit is always zero. The other two bits are supposed to indicate the source of the interrupt (Raster or one of the three DMA channels) although there are some bugs with that.


When i have time i'll investigate what the int routines do. I don't think the first screen on pang is using rasters or the music is using any DMA channels, but maybe i'm wrong?

andycadley

#10
If the PRI isn't active, the "normal" gate array interrupts are considered raster interrupts. So even if it's just using HALT for timing purposes, it might be taking advantage of the fact you don't need a full 257 byte table on the Plus (nor do you need to accommodate odd numbered vector addresses).

Looking for writes to the ASIC register at 6805h would indicate the developers knew about the vectorisation facilities - it was removed from the dev docs because it doesn't work properly but presumably that's because a developer hit bugs. Maybe the Pang developers?

Joseman

Quote from: andycadley on 08:59, 03 October 23Looking for writes to the ASIC register at 6805h would indicate the developers knew about the vectorisation facilities - it was removed from the dev docs because it doesn't work properly but presumably that's because a developer hit bugs. Maybe the Pang developers?

Quick look here, first steps on pang:

org #d6a3
xor a
ld (#6804),a
ld a,#00
ld (#6802),a
ld a,#00
ld (#6803),a
ld a,#c7
ld (#6801),a
ld a,#00
ld (#6805),a
ld a,#bf
ld (#6800),a

Joseman

it's strange... it doesn't seem that any other writes are made to &6805 with RAM ASIC enabled... at least not on the first screen...

it looks like the &6805h is written only with &00 value... what it means? disable this function?

andycadley

No that would mean the generated vector addresses have the five most significant bits set to 0, so vector addresses would be xx00, xx02, xx04, xx06 depending on source, with xx being the value of the I register. It also enables auto-clear on the DMA interrupt channels.

All of which suggests they were trying to use the Plus auto vector interrupts, at least initially anyway.

Joseman

Quote from: andycadley on 09:43, 03 October 23No that would mean the generated vector addresses have the five most significant bits set to 0, so vector addresses would be xx00, xx02, xx04, xx06 depending on source, with xx being the value of the I register. It also enables auto-clear on the DMA interrupt channels.

All of which suggests they were trying to use the Plus auto vector interrupts, at least initially anyway.

I only see a &C307 read with int activated, this lead to &D6CC

The code in &D6CC is very simple

org #d6cc
push af
ld a,#01
ld (#1b64),a
pop af
ret

Only &01 on &1b64, not any other value written.

and only readed after the first screen on pang.

it seems that this int is useless on the first screen?


andycadley

Ods that it doesn't seem to be re-enabling interrupts? Maybe just some leftover code that's redundant?

Joseman

Quote from: andycadley on 10:55, 03 October 23Ods that it doesn't seem to be re-enabling interrupts? Maybe just some leftover code that's redundant?

Yes, you're right, i didn't notice it. its weird...

This afternoon i'll take a closer look...

But i don't think that the first screen on Pang cant be made with classic features, my attempt still resets, but the game is erasing (with &00, &FF) a lot of memory ranges, i suspect that is reaching my code, i will see..

Powered by SMFPacks Menu Editor Mod