Author Topic: ghouls'n goblins gx4000  (Read 11103 times)

0 Members and 1 Guest are viewing this topic.

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.140
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 1965
Re: ghouls'n goblins gx4000
« Reply #80 on: 23:03, 29 February 16 »
Traditional split ("rupture") with PRI. Written so you can just drop it into code, because I used interrupts in a nice way :)


Each PRI is done on last scanline of each section.

Top panel is R9=0, bottom panel is R9=0, middle is R9=7. NOTE: Pri thinks char height is 8, so pri for top panel and bottom panel is calculated as if R9=7, but it's not ;)

PRI made this really easy.

I used R8 instead of R6 to control border ;) Why?

R8 can be used at any time, R6 must be set *before* the split.

PROBLEM: Sprite near top of main area will repeat on all the others :(

EDIT: ARGGHHH! Pasting it in, and it's removing the "8 )" and making it into smileys.
I will have to attach the code.
« Last Edit: 23:23, 29 February 16 by arnoldemu »
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.140
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 1965
Re: ghouls'n goblins gx4000
« Reply #81 on: 23:07, 29 February 16 »
Here goes. Not exactly demo of the year, but it probably gets the point across. Tweaking the DMA list REPEAT slightly can start the effect going in the other direction. Obviously you can get a lot more sophisticated with much longer DMA lists, causing different patterns of "movement" in the interrupt sequence by playing with the overall length and the spacing of interrupts.
Ok I see the effect in winape. a raster bar going up/down.

Arnold just flashes the border. I wonder what a real plus will do... and it's ok on a real Plus. damn. :D I like your tests Andy ;)

@andycadley: Your code doesn't initialise the prescalar for dma channel 0.
So it relies on the value at power on.. I assumed it was random - I have a TODO to test that at power on, clearly it's 0 or something like that.



 
« Last Edit: 23:35, 29 February 16 by arnoldemu »
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline andycadley

  • Supporter
  • 6128 Plus
  • *
  • Posts: 719
  • Liked: 289
Re: ghouls'n goblins gx4000
« Reply #82 on: 23:49, 29 February 16 »
Oops. Entirely unintentional, I'd forgotten that. Interesting though as the documentation seems to suggest it shouldn't be reset at power on.

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.140
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 1965
Re: ghouls'n goblins gx4000
« Reply #83 on: 23:53, 29 February 16 »
Oops. Entirely unintentional, I'd forgotten that. Interesting though as the documentation seems to suggest it shouldn't be reset at power on.
no problem, it has encouraged me to add that test.
Exactly, doc says it shouldn't be reset. I'm guessing it's like some of the other registers, 0 most of the time, 1 sometimes. So far only the palette registers seem to be totally random at power on.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline Executioner

  • Supporter
  • 6128 Plus
  • *
  • Posts: 790
  • Country: au
  • WinAPE Developer
    • WinAPE
  • Liked: 374
Re: ghouls'n goblins gx4000
« Reply #84 on: 00:59, 01 March 16 »
Using DMA lists is great if you don't want to use them for music and sound effects, in which case it can be nice to have one DMA list per AY channel.

You can easily do these sort of split screens on a normal CPC, then just tweak some values for the Plus. Here's a routine which could actually be used on both a real CPC and Plus (it currently uses HALT for timing rather than interrupt routines). The timing has to be accurate for the switch to/from R9=0 and R9=7 or everthing blows up. This could be achieved using PRI on the Plus more easily, and the R4 values would need some tweaking to get it working on a normal CPC.

Code: [Select]
;; Overscan split test
org #40
run #40

di
ld hl,#c9fb
ld (#38),hl

ei

ld bc,#7f10
out (c),c
ld c,#53
out (c),c

ld bc,#bc01
out (c),c
ld bc,#bd20
out (c),c

ld bc,#bc02
out (c),c
ld bc,#bd2a
out (c),c

call waitffb

ld bc,#bc09
out (c),c
ld bc,#bd02
out (c),c

ld b,10
djnz $

ld bc,#bd00
out (c),c

ld bc,#bc04
out (c),c
ld bc,#bd40        ; Initial value from
out (c),c

ld bc,#bc07
out (c),c
ld bc,#bd7f
out (c),c

ld bc,#bc0c
out (c),c
ld bc,#bd30
out (c),c

ld bc,#bc0d
out (c),c
ld bc,#bd20
out (c),c

ld bc,#bc06
out (c),c
ld bc,#bd3f
out (c),c

halt
ld bc,#bc04
out (c),c
ld bc,#bd63
out (c),c

ld bc,#bc07
out (c),c
ld bc,#bd41
out (c),c

ld b,224
.loop
djnz $

ld bc,#bc01
out (c),c
ld bc,#bd00
out (c),c

ld b,50
djnz $

ld bc,#bd20
out (c),c

ld bc,#bc09
out (c),c
ld bc,#bd07
out (c),c

ei

call waitffb

ld bc,#bc09
out (c),c
ld bc,#bd02
out (c),c

ld b,10
djnz $

ld bc,#bd00
out (c),c

halt

ld b,230
jr loop

.waitffb
ld b,#f5
halt
in a,(c)
rra
jr nc,waitffb + 2
ret

The resulting screen layout looks like:




Offline Xifos

  • CPC664
  • ***
  • Posts: 147
  • Country: fr
  • Liked: 114
Re: ghouls'n goblins gx4000
« Reply #85 on: 10:21, 01 March 16 »
Hem, i did as i said and stopped using r9 at 1 for the score board.
Now i can have a 31*4 char hud, even at the top.
And the sprites don't go over it.




All your fantastic ways of setting hud with r9 at 0 are beyond my level (too complex)...
(and i thought that dma list were only for the psg...)
 :)


Offline Ast

  • 6128 Plus
  • ******
  • Posts: 797
  • Country: fr
    • Amstrad cpc Website of Ast/iMPACT
  • Liked: 461
Re: ghouls'n goblins gx4000
« Reply #86 on: 11:52, 01 March 16 »
Try to use TotO's hud which is more beautiful than yours.
@TotO : Can you help him for graphics or are you too busy ?
_____________________

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


Amstrad Plus French Forum

All friends are welcomed !

Offline TotO

  • 6128 Plus
  • ******
  • Posts: 2.950
  • Country: fr
    • ?area=showdonations;u=4
    • Cent Pour Cent [dot net]
  • Liked: 2045
Re: ghouls'n goblins gx4000
« Reply #87 on: 12:01, 01 March 16 »
In answer to both posts, you have to considerate the game as Work In Progress.
That means, all you see is not what you will get.  :-\

About the HUD, the informations are now at the good place. It is just a graphic update to acheive.
I think that is definitively not a priority... But yes, I will help if required.  8)

---

Try to use TotO's hud which is more beautiful than yours.
@TotO : Can you help him for graphics or are you too busy ?

I actually wish the hero sprite was changed to something better... loved the game, even on the CPC, but I always hated that ugly mess!
« Last Edit: 12:27, 01 March 16 by TotO »
Unregistered from CPCwiki forum.

Offline Xifos

  • CPC664
  • ***
  • Posts: 147
  • Country: fr
  • Liked: 114
Re: ghouls'n goblins gx4000
« Reply #88 on: 13:21, 01 March 16 »
The graphics need to be redrawn by a true graphic artist.
If Toto agrees, it would be an honor to have such a graphist.
But it's a lot of work to get mode 0 graphics from the arcade "mode 1 pixels"...
So i was afraid to ask...

Offline fano

  • Supporter
  • 6128 Plus
  • *
  • Posts: 803
  • Country: fr
  • Easter Egg Programmer
    • Easter Egg
  • Liked: 242
Re: ghouls'n goblins gx4000
« Reply #89 on: 13:25, 01 March 16 »
But it's a lot of work to get mode 0 graphics from the arcade "mode 1 pixels"...
So i was afraid to ask...
Don't be afraid, first he loves to do that , second he already made some before, third he owns a great and very fast technic  :P 
"NOP" is the perfect program : short , fast and (known) bug free

Follow Easter Egg products on Facebook !