Defender..auto regenerated?

Want to talks about games you like, would like to see developed on the Oric, it's here.
User avatar
kenneth
Squad Leader
Posts: 515
Joined: Fri Nov 26, 2010 9:11 pm
Location: France PdD
Contact:

Defender..auto regenerated?

Post by kenneth »

I'm trying to code a routine for using ijk joystick for the game Defence Force (Defender). I found the code about the keyboard, but when I have patched it, the original values will come back at each start of the game, there is two identical copies of the routine, but for a self fix a third is required, and I can not find it, maybe a crypted code hided somewhere...Andrew Moore is Amazing... :lol:
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Defender..auto regenerated?

Post by Dbug »

In oricutron you can add "mem" breakpoints: The debugger will stop when this memory location is accessed, possibly that could help find where this other routine is?
User avatar
kenneth
Squad Leader
Posts: 515
Joined: Fri Nov 26, 2010 9:11 pm
Location: France PdD
Contact:

Re: Defender..auto regenerated?

Post by kenneth »

This is a solution, if the keyboard code is scanned by an LDAxxx I could find the regeneration code.
User avatar
coco.oric
Squad Leader
Posts: 720
Joined: Tue Aug 11, 2009 9:50 am
Location: North of France
Contact:

Re: Defender..auto regenerated?

Post by coco.oric »

ADVERT :
Tricks and Tips about Oricutron Debugger in next CEO-MAG, biggest issu of the year.
Parution : Dec 2020

(article en Francais)
coco.oric as DidierV, CEO Member
Historic owner of Oric, Apple II, Atari ST, Amiga
User avatar
Dom
Flying Officer
Posts: 141
Joined: Sun Nov 25, 2012 7:00 pm

Re: Defender..auto regenerated?

Post by Dom »

Hello Kenneth,
I made a JS PASE adaptation of this game. Maybe this could help you to find a way for an IJK JS adaptation.
Attached : the text I wrote in 1999 for this occasion. :)
Attachments
shoot_again22.pdf
(11.73 KiB) Downloaded 201 times
User avatar
iss
Wing Commander
Posts: 1641
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: Defender..auto regenerated?

Post by iss »

Hey, Dom, CHAPEAU BAS!
Your work is absolutely amazing!

So far, using your guides, I've ported to IJK-egoist:
- ijk-3d-fongus.tap
- ijk-defence-force.tap
- ijk-invaders.tap
- ijk-styx.tap

Everything works like charm :).
I'll finish in no-time the remaining games and this will be released as IJK-egoist-games-vol.2

IJK-egoist-games-vol.1 is ready and includes:
- ijk-acherons-rage.tap
- ijk-chopper.tap
- ijk-draculas-revenge.tap
- ijk-harrier.tap
- ijk-hopper.tap
- ijk-hunchback.tap
- ijk-lightcycle.tap
- ijk-mushroom.tap
- ijk-oricmunch.tap
- ijk-ultra.tap
- ijk-xenon1.tap
- ijk-zorgons-revenge.tap
- test-ijk.tap

Of course all released [raxiss] games are updated with IJK support too.
They will be packed together with some more brand new games in IJK-specialpack ;).
User avatar
kenneth
Squad Leader
Posts: 515
Joined: Fri Nov 26, 2010 9:11 pm
Location: France PdD
Contact:

Re: Defender..auto regenerated?

Post by kenneth »

Thanks for the news, I am trying to adapt GhostbGobbler by adding the joystick diagonal control and it will not be necessary to adjust the contact to choose the joystick with Egoist.
User avatar
kenneth
Squad Leader
Posts: 515
Joined: Fri Nov 26, 2010 9:11 pm
Location: France PdD
Contact:

Re: Defender..auto regenerated?

Post by kenneth »

Dom wrote: Mon Nov 30, 2020 7:12 am Hello Kenneth,
I made a JS PASE adaptation of this game. Maybe this could help you to find a way for an IJK JS adaptation.
Attached : the text I wrote in 1999 for this occasion. :)
Nice work!
User avatar
ibisum
Wing Commander
Posts: 1645
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

Re: Defender..auto regenerated?

Post by ibisum »

Great expose for how to patch DEFENCE-FORCE .. I translated it to English (couldn't find a translation already?)

Code: Select all


DEFENCE FORCE is kind of like a better Fire-flash, except without joystick
support, and available only on cassette.

Therefore this article will demonstrate how to transfer the cassette format to a
floppy disk (which is not a difficult task), and we will add joystick
capabilities.

__ The State Of Play.

The game itself consists of four modules, which occupy just over 57 KB on the
cassette.

1 - $ 6000 to $ 69FF
2 - $ 4FD to $ 4DFF
3 - $ 2980 to $ 727F
4 - $ 4E00 to $ 96FF


__ The transfer to diskette.

I didn't really try to understand who was doing what between all the modules. I
have just noticed large overlaps at the level of loading addresses. So I have
loaded all four parts, then saved a continuous block from between $4FD - $96FF. 
Jumping to the game at the start address of the last module, it works!
You will notice that the code does not "weigh" more than 36Kb, so we saved 21Kb
of space on our floppy disk.

.. SCREENSHOT OF DEFENCE FORCE SCORE CARD ..

__ Joystick Adaptation

The key-reading routine is located at $5A00. It uses the ROM routine in
$F590 to address the columns. The ROM writes the contents of the accumulator 
(before its call) on the port B of the VIA, to address the lines.

It is therefore called each time we wish to test a key, by the sequence: 

	LDA row number / LDX column mark / JSR $ 5A00

ADDRESSES	 KEY 			EFFECT 
$ 7020: 	<Z> and <T> 	Up movement
$ 7040: 	<A> and <5> 	Down movement
$ 7060: 	<[> and <,>     Left movement
$ 7080: 	<]> and <. >    Right movement

$ 70A0:   <returnn> and <space>  Shields
$ 70C0:     <0>             Game Reset

The four tests of direction being in turn called by a routine starting with a series
of NOP instructions at $2588.

It is to this last address that we are going to insert the joystick reading.

 ... BASIC Text .. 


User avatar
xahmol
Flight Lieutenant
Posts: 437
Joined: Sun Jun 28, 2020 7:32 pm
Location: Utrecht, The Netherlands
Contact:

Re: Defender..auto regenerated?

Post by xahmol »

Well, seems like I really have to get my hands on an IJK interface then ;-) Great work!
User avatar
Dom
Flying Officer
Posts: 141
Joined: Sun Nov 25, 2012 7:00 pm

Re: Defender..auto regenerated?

Post by Dom »

I’m very happy if my work, can help :)
Thanks a lot, ibisum for the English translation . :)
For a complete comprehention of the text, I have to explain the strange first instruction : CLOAD "STOP"

In 1984 in the mag Théoric n ° 2, we found, on page 32, a small utility which corrected the problem of "false" ERRORS found, by forcing, during interrupts, the error flag ($ 2B1) to zero.

10 FOR I = # 221 to # 22A
20 READA: POKEI, A: NEXT
30 DOKE # 245, # 221
40 DATA # 48, # A9,0, # 8D, # B1,2, # 68, # 4C, # 22, # EE

$ 0221 48 PHA
$ 0222 A9 00 LDA # $ 00
$ 0224 8D B1 02 STA $ 02B1
$ 0227 68 PLA
$ 0228 4C 22 EE JMP $ EE22

In these times, my goal as a cheater, was the opposite ... To prevent auto starts in any cases. :)
I had therefore replaced, in the list of DATA, the # B1 by #AD, so that $ 02AD, auto-start flag, is forced to 0 at each interrupt.
I called this little prog: STOP. It has been systematically migrating to the TAPE directories of each of my new PCs since that time. To prohibit an AUTO start I always do :

CLOAD "STOP"
CLOAD "Studied game"

Then, as many CLOAD "" as there are parts in the game ...
User avatar
ibisum
Wing Commander
Posts: 1645
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

Re: Defender..auto regenerated?

Post by ibisum »

Ah, I remember encountering this STOP program a few times back in the day .. combined with "!NEW", it was the best way to find out how to write Oric software - by inspecting the work of the commercial vendors. ;) I had so much fun using these commands to break in and read listings ..

I'm really glad you mentioned that, I was wondering about it and went on a casual search for it in some mags .. it makes me wonder what other useful Oric UTILS are out there. All mine were lost decades ago when I chucked out my Oric UTILS tape .. ;)
Post Reply