Just made a new ZX spectrum game (48k)

Discuss Demos / Games / Applications written by Atari coders

Moderators: Mug UK, Silver Surfer, Moderator Team

MrPixel
Atari freak
Atari freak
Posts: 70
Joined: Mon Jan 08, 2018 4:31 am

Just made a new ZX spectrum game (48k)

Postby MrPixel » Wed Jan 17, 2018 1:48 am

it's called Urban war
now i don't have an intro or an ending as of yet but this is the code so far

10 print "you are in a white room
20 print "you a see a gun"
30 input a$
40 print "gun taken"
50 print upon opening the door, you are greeted with(i had to split this due to memory restraints) an urban hellscape
60 print "that would make Satan blush.
then you're given some directions. east leads to a roadblock, and a second chance
west causes an airstrike to collapse a building, killing you
north (or straight, doesn't matter) leads to the next section consisting of 4 guards
210 print "dodging between alleyways and buildings, you come across some guards.
(if you shoot them, your gun jams and you die, you can only sneak past)
all in all, it's fairly complete, just needs some finishing touches. 270 lines of code in all.

comments, suggestions for part 2? (unfortunately, i cannot attach the file so others may play

User avatar
Hazzardus
Atari freak
Atari freak
Posts: 66
Joined: Sun Jun 21, 2009 10:43 pm
Location: Hove Beach

Re: Just made a new ZX spectrum game (48k)

Postby Hazzardus » Sun Jan 21, 2018 7:34 pm

Sounds like it could be fun, and very similar to how unfair the original adventure games were on the speccy.

MrPixel
Atari freak
Atari freak
Posts: 70
Joined: Mon Jan 08, 2018 4:31 am

Re: Just made a new ZX spectrum game (48k)

Postby MrPixel » Fri Jan 26, 2018 11:20 pm

is there a way to put it on here. its in .Tap form

jury
Captain Atari
Captain Atari
Posts: 208
Joined: Tue Sep 21, 2004 11:11 am
Location: Poland

Re: Just made a new ZX spectrum game (48k)

Postby jury » Sat Jan 27, 2018 6:53 pm

MrPixel wrote:is there a way to put it on here. its in .Tap form


Do you mean to attach it to the thread? If yes, then if you press "Full Editor & Preview" button, you will have the "Attachments" tab where you are able to attach any kind of files to the forum.

MrPixel
Atari freak
Atari freak
Posts: 70
Joined: Mon Jan 08, 2018 4:31 am

Re: Just made a new ZX spectrum game (48k)

Postby MrPixel » Sat Jan 27, 2018 9:00 pm

thanks.

also, i'm trying to run an assembly program but i keep getting an opcode error in 6

this is the code:

DI ; 4 clocks F3
LD HL, $8002 ; 10 21 02 80
a: DEC HL ; 6 2B
b: DEC HL ; 6 2B
c: INC (HL) ; 11 34
JR NZ, c ; 7/12 20 FD
INC HL ; 6 23
INC (HL) ; 11 34
JR NZ, b ; 7/12 20 F8
INC HL ; 6 23
INC (HL) ; 11 34
JR NZ, a ; 7/12 20 F3
EI ; 4 FB
RET ; 10 C9

MrPixel
Atari freak
Atari freak
Posts: 70
Joined: Mon Jan 08, 2018 4:31 am

Re: Just made a new ZX spectrum game (48k)

Postby MrPixel » Sat Jan 27, 2018 9:11 pm

i've tried .sna .z80 and .tzx snapshots. i've even saved it to binary at memory location 3300 and nothing.

MrPixel
Atari freak
Atari freak
Posts: 70
Joined: Mon Jan 08, 2018 4:31 am

Re: Just made a new ZX spectrum game (48k)

Postby MrPixel » Sat Jan 27, 2018 9:12 pm

keep in mind that the game is still in alpha. i lost urban war but am starting Alien.

MrPixel
Atari freak
Atari freak
Posts: 70
Joined: Mon Jan 08, 2018 4:31 am

Re: Just made a new ZX spectrum game (48k)

Postby MrPixel » Sat Jan 27, 2018 9:26 pm

just made a game. it's a joke title but it should tide you over until urban war or Alien (need help with alien, i'm trying to add a condition for ripley. if you say no, you die later on but if you say yes, your survive, then die later, will list the code later)

mlynn1974
Captain Atari
Captain Atari
Posts: 153
Joined: Mon Mar 03, 2008 10:33 pm
Contact:

Re: Just made a new ZX spectrum game (48k)

Postby mlynn1974 » Mon Jan 29, 2018 1:33 pm

MrPixel wrote:a: DEC HL ; 6 2B


Put the label on a new line:
a:
DEC HL

also don't use a single letter for a label because 'a' could look like the accumulator register A.
This function will assemble in Z80asm. I didn't try it in SPIN.
Still got, still working: Atari 4Mb STe, 520STFM, 2.5Mb STF.
Hardware: Cumana CSA 354, Ultimate Ripper, Blitz Turbo, Synchro Express II (US and UK Versions).

MrPixel
Atari freak
Atari freak
Posts: 70
Joined: Mon Jan 08, 2018 4:31 am

Re: Just made a new ZX spectrum game (48k)

Postby MrPixel » Mon Jan 29, 2018 4:17 pm

tell that to the site that made this code

MrPixel
Atari freak
Atari freak
Posts: 70
Joined: Mon Jan 08, 2018 4:31 am

Re: Just made a new ZX spectrum game (48k)

Postby MrPixel » Mon Jan 29, 2018 4:18 pm

do i have to call it from basic? if so, print USR...what?

mlynn1974
Captain Atari
Captain Atari
Posts: 153
Joined: Mon Mar 03, 2008 10:33 pm
Contact:

Re: Just made a new ZX spectrum game (48k)

Postby mlynn1974 » Mon Jan 29, 2018 10:25 pm

Code: Select all

   DI ; 4 clocks F3
    LD HL, 16384+6192 ; 10 21 02 80
aloop:   DEC HL ; 6 2B
bloop:   DEC HL ; 6 2B
cloop:   INC (HL) ; 11 34
   JR NZ, cloop ; 7/12 20 FD
   INC HL ; 6 23
   INC (HL) ; 11 34
   JR NZ, bloop ; 7/12 20 F8
   INC HL ; 6 23
   INC (HL) ; 11 34
   JR NZ, aloop ; 7/12 20 F3
   EI ; 4 FB
   RET ; 10 C9


I have attached a visual example of this code in a zip with the source code and a Z80 snapshot. It can be assembled with ZXSpin Spectrum Emulator. I assembled the routine to address 60000 in 48k Mode. The Z80 snapshot is sitting in BASIC and can be run with 1 line of code: randomize usr 60000

The original routine looped around a lot working down in memory from address 32770 ($8002).
We couldn't see that on screen so I set the pointer in my code to the end of video memory 16384+6192.
It disables interrupts and enables them at the end so you can't get the keyboard values or set the border, ink or paper colour in this routine.

The code is kind of messy with repeated use of HL and waiting until HL goes to 0 to exit the loop.
What I see are 3 colour cycling blocks in the top third of the screen right in the centre. The attribute map is the last 768 bytes of video memory so it must be poking that and changing the pattern of the 8x8 blocks.
I don't know if that is what the author intended.
You do not have the required permissions to view the files attached to this post.
Still got, still working: Atari 4Mb STe, 520STFM, 2.5Mb STF.
Hardware: Cumana CSA 354, Ultimate Ripper, Blitz Turbo, Synchro Express II (US and UK Versions).

MrPixel
Atari freak
Atari freak
Posts: 70
Joined: Mon Jan 08, 2018 4:31 am

Re: Just made a new ZX spectrum game (48k)

Postby MrPixel » Sun Feb 18, 2018 1:31 am

i tried to attach the file but it wouldn't work. i'll program a version for the atari 800/600XL and post as soon as i can.

MrPixel
Atari freak
Atari freak
Posts: 70
Joined: Mon Jan 08, 2018 4:31 am

Re: Just made a new ZX spectrum game (48k)

Postby MrPixel » Sun Feb 18, 2018 1:54 am

here it is in Png. format. there is a loop error in the code, which i could not fix as the stop command doesn't work the way i want it to.


Social Media

     

Return to “Non Atari Platforms”

Who is online

Users browsing this forum: No registered users and 2 guests