News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_ukmarkh

ghouls'n goblins gx4000

Started by ukmarkh, 04:01, 24 February 16

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

andycadley

Quote from: Xifos on 08:20, 26 February 16
I have considered the scoreboard at the top.
But it's more complicated, because of R9 at 1 and the pri.
I don't know if i can set a pri at line 0...
You can't because a value of 0 switches it off. You have to set up the first part of the display and then use the PRI to fiddle with it on subsequent parts. Can't say I've ever tried doing it with an R9=1 bit at the top of the display....

arnoldemu

Quote from: andycadley on 08:39, 26 February 16
You can't because a value of 0 switches it off. You have to set up the first part of the display and then use the PRI to fiddle with it on subsequent parts. Can't say I've ever tried doing it with an R9=1 bit at the top of the display....
With PRI being limited to 255 and because it doesn't wrap, the answer probably lies with using a traditional split. Then you can cause a PRI to trigger on the last scanline (1 line before the top panel). delay slightly, set R9=0, now set a PRI to trigger at the end. Now set R9=7. It will be a lot easier on Plus.
There may be an alternative way, I'll work out some code that will do it.

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Executioner

You shouldn't need an interrupt on scan line 0 to change CRTC/MODE/Palette/Soft-scroll for a static screen at the top, just set them all up on a PRI after the end of the pervious displayed frame, or a standard VSYNC interrupt, then set a PRI for a scan line above the bottom of the static display and set soft-scroll during the border area (it can be changed every character!). Frogger uses a Plus Split-Screen and Soft-Scroll change every 16 scan lines for the river/road.

Xifos

Quote from: Executioner on 11:29, 26 February 16
You shouldn't need an interrupt on scan line 0 to change CRTC/MODE/Palette/Soft-scroll for a static screen at the top, just set them all up on a PRI after the end of the pervious displayed frame, or a standard VSYNC interrupt, then set a PRI for a scan line above the bottom of the static display and set soft-scroll during the border area (it can be changed every character!). Frogger uses a Plus Split-Screen and Soft-Scroll change every 16 scan lines for the river/road.

What about R9 set to 1 for the panel score ?

arnoldemu

Quote from: Xifos on 12:28, 26 February 16
What about R9 set to 1 for the panel score ?
Executioner is saying to use split screen or scroll to do this.

My idea works different. I will write some code to do it because I need to test it.

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

dragon

About the music ìts a shame  the plus range don't have a utility to transform the music easily in to a dma plus compatible mode.



Executioner

Quote from: Xifos on 12:28, 26 February 16
What about R9 set to 1 for the panel score ?

Do you want it set to 1 (2 scan lines per character) or 0 (1 scan line per character)? You can still do this, but you'd probably want to use normal interrupts for the VSYNC and the first Raster 52 interrupt. I assume you're setting R9 to a low value to use only a contiguous block of memory for it.

Xifos

That's right, at this point, R9 is set to 1.
But i could try to use the cartridge pages better, and stop changing R9 and forget about the ram used by the screen.
It would be easier to have a good score board.

What annoys me is that the hardware sprites are affected if there is a split screen at the top, because of the scanline counter.
They are shifted to the up.

Executioner

Quote from: Xifos on 09:01, 28 February 16
What annoys me is that the hardware sprites are affected if there is a split screen at the top, because of the scanline counter.
They are shifted to the up.

They could appear on both screens if you're using a CRTC based hardware split, but with ASIC Split-Screen they're not, the scan-line doesn't reset.

TotO

#59
A 32x4 HUD with all the game informations, using:

- 4 colour CPC palette
- No special feature

[attachimg=3]

- Ink updates on the first char line
- Hard sprite for the selected weapon

[attachimg=1]

- Ink updates on each char line
- Hard sprite with more colours

[attachimg=2]
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

fano

you can add different color per line for text  ;D
"NOP" is the perfect program : short , fast and (known) bug free

Follow Easter Egg products on Facebook !

fano

#61
Btw (sorry for double post) i read a lot of references to PRI.But PRI is limited to visible screen, why not using DMA list to generated interrupt on any of the 312 lines of the screen.Maybe i miss some major drawback about this, did some already try ?
"NOP" is the perfect program : short , fast and (known) bug free

Follow Easter Egg products on Facebook !

TotO

Quote from: fano on 09:53, 29 February 16
you can add different color per line for text  ;D
I don't want to scare him!  ;D
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

fano

Quote from: TotO on 10:06, 29 February 16
I don't want to scare him!  ;D
:laugh:
F**k that, make us a pretty sexy mockup, we need all dreams to progress  :-*
Anyway, if the mockup is sexy enough, i'll be glad to write him int handler and hud code  ;)
"NOP" is the perfect program : short , fast and (known) bug free

Follow Easter Egg products on Facebook !

TotO

#64
Hehe!
By the way, its look must remain coherent with the game itseft.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Guy0me

#65
Quote from: Xifos on 13:39, 24 February 16
Hi everyone !
So you noticed.
I'm the one behind this try to have a ghosts'n goblins on Gx4000/Cpc+ cartridge.

That's a very good idea to make a remake with plus abilities excellente work so far , do you know there is a Ghost'n Goblins Arcade released on C64 ?

https://www.youtube.com/watch?v=WNfS5NUohtM
[CSDb] - Ghosts'n Goblins Arcade by Nostalgia (2015)
the previous 1986 version was graphically quite ugly compared to the Amstrad release although the gameplay was ok ..
In the new arcade C64 version they took the Ghost'n goblins out on CPC as example i guess, but there's anyway some good ideas for inspiration I think.

andycadley

Quote from: fano on 09:59, 29 February 16
Btw (sorry for double post) i read a lot of references to PRI.But PRI is limited to visible screen, why not using DMA list to generated interrupt on any of the 312 lines of the screen.Maybe i miss some major drawback about this, did some already try ?

I think @arnoldemu and I have both done this before and it works quit well. It's a good idea to use the PRI to set up the DMA timing so that you get it just where you want it.

Downside is that you can't use that DMA list for audio and you can't rely on self clearing of the interrupt because that's buggy, but otherwise it's very flexible.

Ast

No need to use the Dma... Only use the Pri and make your raster, and so on...
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !

fano

#68
Quote from: Ast on 13:35, 29 February 16
No need to use the Dma... Only use the Pri and make your raster, and so on...
But what when you need to manipulate border or your interrupt needs to be on line 0 or off visible screen ?
"NOP" is the perfect program : short , fast and (known) bug free

Follow Easter Egg products on Facebook !

arnoldemu

Quote from: fano on 13:54, 29 February 16
But what when you need to manipulate border or your interrupt needs to be on line 0 or off visible screen ?
PRI is not only for visible area. It is based on char line counter (VC) and raster line counter (RC) in CRTC. VC=0,RC=0 is normally start of visible area.

If I have normal height screen and set PRI to 255 it will trigger in the border.

It's limit is 256 lines and it doesn't wrap (so you can't set e.g. 32 and get it to repeat two times - doesn't happen) so if you want to interrupt in the upper border you have two choices.
1. use traditional split AND PRI. Now VCC=0 more than once and you can use PRI in each part. Traditional split is much easier when using PRI to help :)

2. use standard interrupt and waste some cpu time (like on CPC).

3. use DMA interrupt.

4. Or use them ALL  :P

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

fano

#70
Quote from: arnoldemu on 14:00, 29 February 16
PRI is not only for visible area. It is based on char line counter (VC) and raster line counter (RC) in CRTC. VC=0,RC=0 is normally start of visible area.
Sorry , i misformuled the question as i see (consider?imagine?) the line 0 as the one where the hsync occurs.So my question (as it was not really a question but an assertion) , is is possible to cause PRI interrupt on/before the first line that generate pixels from screen memory ? but i think your post contains the reply , more , you came with another solution i didn't think thx ;)
"NOP" is the perfect program : short , fast and (known) bug free

Follow Easter Egg products on Facebook !

andycadley

One nice thing about using the DMA lists is that you can easily define unusual spacings of interrupts.

Also, by making the list slightly too short or long, you can make the positioning move up or down the display automatically. Which might make for some nice demo raster effects.

Ast

Quote from: andycadley on 14:29, 29 February 16
One nice thing about using the DMA lists is that you can easily define unusual spacings of interrupts.

Also, by making the list slightly too short or long, you can make the positioning move up or down the display automatically. Which might make for some nice demo raster effects.
I don't understand how you do... Please give us an example coz i'm a little bit curious about that.
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !

arnoldemu

Quote from: fano on 14:21, 29 February 16
Sorry , i misformuled the question as i see (consider?imagine?) the line 0 as the one where the hsync occurs.So my question (as it was not really a question but an assertion) , is is possible to cause PRI interrupt on/before the first line that generate pixels from screen memory ? but i think your post contains the reply , more , you came with another solution i didn't think thx ;)
If PRI=1, then interrupt happens at the hsync on line 1. So result is effectively line 2.

If you want to have a PRI interrupt happen on line 0, do it on the final line of the display ;)

But, normal display without split has 312 lines. So we can't get that close.

Use traditional split and now we can get close :)

For SPLT it is different, it does wrap. If you set SPLT so that it wraps you can change line 1 (not line 0 because you can't make SPLT ever happen on this line, MA is taken from R12/R13 and not SPLT address).
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

andycadley

Quote from: Ast on 14:33, 29 February 16
I don't understand how you do... Please give us an example coz i'm a little bit curious about that.
I'll try and knock up a sample later. Basically, the idea is you write a self maintaining DMA list that is, for example, 311 lines long. Each time it repeats, therefore, interrupts will occur 1 scanline earlier than the previous frame (since there are 312 lines). Change colours on the dma interrupt and it appears to move "up" the screen.

Powered by SMFPacks Menu Editor Mod