Author Topic: Hunt z80 port  (Read 19644 times)

0 Members and 3 Guests are viewing this topic.

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Hunt z80 port
« Reply #45 on: January 28, 2010, 12:21:45 pm »
I tried the new version.  It's great!!  Excellent job!  I like the basic version also. :)

I found one bug:  When trees are placed you can have them in the row with the score and time:
(Look by my score)
« Last Edit: January 28, 2010, 12:22:31 pm by ztrumpet »

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Hunt z80 port
« Reply #46 on: January 28, 2010, 02:23:08 pm »
Thanks

yeah I'm aware of that one.  It's because of ions random routine, and nothing I do can stop it it seems x.x I might have to use a modified one for that.
/e

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Hunt z80 port
« Reply #47 on: January 28, 2010, 02:50:29 pm »
Thanks

yeah I'm aware of that one.  It's because of ions random routine, and nothing I do can stop it it seems x.x I might have to use a modified one for that.
Could you do this: (In basic)
Repeat Ans>1
RandInt(1,8
End

I think in Asm it would be something like:
loop:
    xor a
    cp rand_ion_thing
    jr Z, loop

Am I close to right?
« Last Edit: January 28, 2010, 02:51:20 pm by ztrumpet »

Offline mapar007

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 550
  • Rating: +28/-5
  • The Great Mata Mata
    • View Profile
Re: Hunt z80 port
« Reply #48 on: January 28, 2010, 02:53:16 pm »
Close ;D but it could be easier. (correct me if I'm wrong/I misinterpret)

it would be like
     call irandom
     and 7 ;(that is, a mod 8, row indexes are 0-7 in asm)



Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Hunt z80 port
« Reply #49 on: January 28, 2010, 02:58:36 pm »
Code: [Select]
ld b,7
call irandom
inc a
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline mapar007

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 550
  • Rating: +28/-5
  • The Great Mata Mata
    • View Profile
Re: Hunt z80 port
« Reply #50 on: January 28, 2010, 03:05:26 pm »
Ignore my post. I simplified xD. It should have been an integer from 1-7 I suppose. (use a mod 6\ inc a; with initial a random)

Offline Galandros

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1140
  • Rating: +42/-10
    • View Profile
Re: Hunt z80 port
« Reply #51 on: January 28, 2010, 03:13:16 pm »
Code: [Select]
ld b,7
call irandom
inc a
I thought the same thing. And I should be rusted in z80 by now.
mapar why complicate things? :p
Hobbing in calculator projects.

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Hunt z80 port
« Reply #52 on: January 28, 2010, 03:36:51 pm »
thanks for the help!
now to get it working with graphics x.x

what's the easiest way to clear the graphbuffer? (plotsscreen)
« Last Edit: January 28, 2010, 04:03:22 pm by Eeems »
/e

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Hunt z80 port
« Reply #53 on: January 28, 2010, 04:32:43 pm »
Code: [Select]
ld hl,plotsscreen ;copy from here
ld (hl),0 ;write first byte
ld de,plotsscreen+1 ;copy to here
ld bc,768-1 ;copy all but the first byte
ldir

Note, LDIR basically does this:
Loads value at (HL) to (DE)
Increases HL and DE
Decreases BC
If BC is not zero, rinse and repeat

Since in this case DE is the address directly in front of HL, the 0 gets copied to all the bytes in the buffer.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Hunt z80 port
« Reply #54 on: January 28, 2010, 04:39:17 pm »
well I just found out that b_call _GrBufClr does it as well, which is faster though?
also I've got it working :D now to convert all the menu's to it :P

EDIT: I can't seem to get sprite masking working x.x anybody got a good AND routine?
EDIT2: nvm, got a good spritemask routine to use instead
EDIT3: here is v1.07b :D almost done :D now to add collision support for trees and add in tilemaps of a sort to make a different background every game.
« Last Edit: January 28, 2010, 06:12:30 pm by Eeems »
/e

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Hunt z80 port
« Reply #55 on: January 28, 2010, 07:13:16 pm »
Yay assembly programing!  Its cool that your getting into this, and neat that you got sprites working so fast O.O Good job!

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Hunt z80 port
« Reply #56 on: January 28, 2010, 07:39:02 pm »
well I just found out that b_call _GrBufClr does it as well, which is faster though?
also I've got it working :D now to convert all the menu's to it :P

EDIT: I can't seem to get sprite masking working x.x anybody got a good AND routine?
EDIT2: nvm, got a good spritemask routine to use instead
EDIT3: here is v1.07b :D almost done :D now to add collision support for trees and add in tilemaps of a sort to make a different background every game.
I think that bcall has pretty much the same code, but you won't really want to have the extra overhead of bcalls when making a game.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Hunt z80 port
« Reply #57 on: January 28, 2010, 08:05:09 pm »
Thanks builderboy!
@calc84: ah ok, I'll switch to it then.
/e

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Hunt z80 port
« Reply #58 on: January 28, 2010, 09:15:10 pm »
Sounds great Eeems!  I wish I was at home to try this...

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Hunt z80 port
« Reply #59 on: January 28, 2010, 09:43:25 pm »
Lol, well I hope you like it!
/e