Now Reading
My first Z80 meeting language program

My first Z80 meeting language program

2023-12-24 06:55:52

I used to be cleansing an previous work space after I noticed my previous blue pocket book that I used from 1986 to 1989. It had suffered the move of time and mud.

My old notebook from 1988
My previous pocket book from 1988

I assumed it was the identical pocket book I had seen earlier than, as a result of I had two blue notebooks of the identical mannequin, however I misplaced one. After which to my shock, I found it was the misplaced second pocket book, the place I put my first Z80 meeting language program!

Fairly pleased, I took footage instantly of the necessary pages, simply in case I lose once more the pocket book.

And reminiscences begin coming slowly…

The historical past

My Karateka game: Title screen

I used to be 9 years previous and I wished to write down wonderful video games. After all, I used to be too younger to create one thing within the league of the video games that I used to be watching in magazines on the time like Compute! and Enter MSX.

After 4 years of writing video games in BASIC language, I felt like I used to be stopped by the slowness inherent to an interpreted language.

This recreation was written round June 1988, my father was giving a lecture on programming the VDP processor TMS9128. The video processor was fairly out there on the time (through Digikey) as a result of the demise of all computer systems utilizing it.

My notes on the VDP 16K VRAM structure
My notes on the VDP 16K VRAM construction. Discover the register numbers.

The scholars had been soldering their computer systems based mostly on Z80 over a copper board perforated with holes spaced by 0.1″

Sadly my arms weren’t ready on the time to deal with exactly a soldering iron, so I had been watching awkwardly how the scholars loved constructing their computer systems, how they managed to get them operating, and the way they troubleshooted their bugs.

My Karateka game: Inside the game

This gave me loads of time to consider the Z80 assembler programming idea, I had been unable to know the idea of methods to put collectively the directions. The earlier weeks earlier than that Sunday (I can keep in mind it was Sunday), whereas watching my father placing collectively the monitor/VDP/Keyboard EPROM code for the scholars laptop, lastly I had the imaginary gentle bulb over my head. After all! A number of directions compose a BASIC language assertion, so it was a matter of doing the identical however in assembler.

The Sunday morning earlier than class, I began writing furiously over my pocket book a recreation a few karateka combating a girl launching knifes. I had the entire concept on my head, now I understand for the primary time I had the BASIC algorithm clearly in my thoughts. It was solely a matter of translating it to assembler. I had realized that the road separation of BASIC was invisible on assembler, however every deal with might be associated to that imaginary line quantity in BASIC language.

You may think about the shock of the entire class after I confirmed my recreation proudly. I keep in mind three college students copying manually the code from the RAM dump after which making Xerox copies for the opposite college students.

Getting this to work in 2021

Listed here are the photographs of my pocket book. You may must forgive my horrible child letters. Barely any feedback however something you see will likely be in Spanish, as a result of that’s my first language.

Whereas commenting every web page (and analyzing my novice 9 years previous myself!), I will translate this recreation to tniASM v0.44 for each MSX and Colecovision (simply because). We’d like the next translation and help layer as a result of we do not have at hand the unique ROM from the scholars laptop:


	;
	; Karateka
	;
	; by Oscar Toledo G.
	; (c) Copyright Oscar Toledo G. 1988-2021
	; https://nanochess.org/
	;
	; Creation date: Jun/1988. I used to be 9 years previous.
	; Revision date: Could/12/2021. Ported to MSX/Colecovision.
	;

COLECO: EQU 0   ; Outline this to 0 for MSX, 1 for Colecovision

RAM_BASE:	EQU $E000-$7000*COLECO
VDP:		EQU $98+$26*COLECO

KEYSEL:	EQU $80
JOYSEL:	EQU $C0
JOY1:	EQU $FC
JOY2:	EQU $FF

    if COLECO
	fname "KARATECV.ROM"

	org $8000,$9fff

	dw $aa55	; No BIOS title display
	dw 0
	dw 0
	dw 0
	dw 0
	dw START

	jp 0		; RST $08
	jp 0		; RST $10
	jp 0		; RST $18
	jp 0		; RST $20
	jp 0		; RST $28
	jp 0		; RST $30
	jp 0		; RST $38

	jp 0		; No NMI handler

    else
	fname "KARATMSX.ROM"

	org $4000,$5fff

	dw $4241
	dw START
	dw 0
	dw 0
	dw 0
	dw 0
	dw 0
	dw 0

SNSMAT:	equ $0141

    endif

WRTVDP:
	ld a,b
	out (VDP+1),a
	ld a,c
	or $80
	out (VDP+1),a
	ret

SETWRT:
	ld a,l
	out (VDP+1),a
	ld a,h
	or $40
	out (VDP+1),a
	ret

WRTVRM:
	push af
	name SETWRT
	pop af
	out (VDP),a
	ret

FILVRM:
	push af
	name SETWRT
.1:	pop af
	out (VDP),a
	push af
	dec bc
	ld a,b
	or c
	jp nz,.1
	pop af
	ret

	; Setup VDP earlier than recreation
setup_vdp:
	LD BC,$0200
	CALL WRTVDP
	LD BC,$C201	; No interrupts
	CALL WRTVDP
	LD BC,$0F02	; $3C00 for sample desk
	CALL WRTVDP
	LD BC,$FF03	; $2000 for colour desk
	CALL WRTVDP
	LD BC,$0304	; $0000 for bitmap desk
	CALL WRTVDP
	LD BC,$3605	; $1b00 for sprite attribute desk
	CALL WRTVDP
	LD BC,$0706	; $3800 for sprites bitmaps
	CALL WRTVDP
	LD BC,$0407	; Blue border
	CALL WRTVDP
    IF COLECO
	LD HL,($006C)   ; MSX BIOS chars
	LD DE,-128
	ADD HL,DE
    ELSE
	LD HL,($0004)   ; MSX BIOS chars
	INC H
    ENDIF
        PUSH HL
        LD DE,$0100
        LD BC,$0300
        CALL LDIRVM
        POP HL
        PUSH HL
        LD DE,$0900
        LD BC,$0300
        CALL LDIRVM
        POP HL
        LD DE,$1100
        LD BC,$0300
        CALL LDIRVM

        LD HL,$2000
        LD BC,$1800
        LD A,$F4
        CALL FILVRM
	RET

LDIRVM:
        EX DE,HL
.1:     LD A,(DE)
        CALL WRTVRM
        INC DE
        INC HL
        DEC BC
        LD A,B
        OR C
        JR NZ,.1
        RET

GTTRIG:
    if COLECO
        out (KEYSEL),a
        ex (sp),hl
        ex (sp),hl
        in a,(JOY1)
        ld c,a
        in a,(JOY2)
        and c
        ld c,a
	out (JOYSEL),a
	ex (sp),hl
	ex (sp),hl
	in a,(JOY1)
        and c
        ld c,a
	in a,(JOY2)
	and c
	rlca
	rlca
	ccf
	ld a,0
	sbc a,a
	ret
    else
	xor a
	name $00d8
	or a
	ret nz
	ld a,1
	name $00d8
	or a
	ret nz
        ld a,2
        name $00d8
        or a
        ret nz
        ld a,3
        name $00d8
        or a
        ret nz
        ld a,4
        name $00d8
        ret
    endif

	;
	; Will get the joystick path
	; 0 - No motion
	; 1 - Up
	; 2 - Up + proper
	; 3 - Proper
	; 4 - Proper + down
	; 5 - Down
	; 6 - Down + left
	; 7 - Left
	; 8 - Left + Up
	;
GTSTCK:
    if COLECO
        out (JOYSEL),a
	ex (sp),hl
	ex (sp),hl
        in a,(JOY1)
	ld b,a
	in a,(JOY2)
	and b
        and $0f
        ld c,a
        ld b,0
        ld hl,joy_map
        add hl,bc
        ld a,(hl)
        ret

joy_map:
        db 0,0,0,6,0,0,8,7,0,4,0,5,2,3,1,0

    else
	xor a
	name $00d5
	or a
	ret nz
	ld a,1
	name $00d5
	or a
	ret nz
	ld a,2
	jp $00d5
    endif

	; ROM routines I forgot

	; Clear display
LIMPIA:	; $04cc
	LD HL,$3C00
	LD BC,$0300
	XOR A
	JP FILVRM

	; Copy string to VDP
INMEDIATO:	; $0169
	EX (SP),HL

.0:	LD A,(HL)
	INC HL
	OR A
	JR Z,.1
	PUSH AF
	POP AF
	OUT (VDP),A
	JR .0

.1:	EX (SP),HL
	RET

	;
	; Begin of the sport
	;
START:		; 8000
	DI
	LD SP,RAM_BASE+256

Each further code will likely be added on the finish of the earlier code.

Page 1 of my Z80 game
Web page 1 of my Z80 recreation, right-click for increased decision.

So right here is the web page 1 of my Z80 recreation. The supply code at proper was written considering in placing it inside an assembler program that I used to be going to develop (think about that, a 9 years previous ambitiously considering in writing an assembler!).

To enter this recreation into the scholars’ laptop, one must enter solely the microcode on the left. In case you discovered an error on the best facet supply code is as a result of it’s imply to be as reference solely.

The code principally setups the sport and creates a recreation loop. I misspelled NAVAJA (knife) as NEVAJA. Discover how I changed PONEHL for the same MSX routine WRTVDP. The INMEDIATO routine copies the next bytes on to VDP till discovering a zero byte.


JUEGO:
	CALL setup_vdp	; Not in unique however wanted to setup VDP
	CALL LIMPIA	; Clear display
	CALL PRESENTACION       ; Title display
	CALL GRAFICOS	; Setup graphics
PRIN:		; 8009
	CALL PATCH	; Patch for leap
	CALL KARATEKA	; Transfer karateka
	CALL MALORA	; Transfer baddie
	CALL NEVAJA	; Transfer knifes
	JP PRIN		; Repeat recreation loop

        ; Title display
PRESENTACION:	; 8018
	LD HL,$3C4D
	CALL SETWRT
	CALL INMEDIATO
Page 2 of my Z80 game
Web page 2 of my Z80 recreation.

After all, I did not had any concept of utilizing directives besides to place a byte directly. That is the title display. “PULSE ESPACIO” means to press the keyboard area bar. I modified it to any set off on MSX or Colecovision.


	DB "KARATEKA",0

	LD HL,$3ECA
	CALL SETWRT
	CALL INMEDIATO
	DB "PULSE ESPACIO",0
Page 3 of my Z80 game
Web page 3 of my Z80 recreation.

It makes use of an inside BIOS routine $04f5 to learn the keyboard matrix, and it has been changed with a MSX GTTRIG name (or Colecovision learn of buttons).
Then it setups the graphics for the karateka, the knife, and the judoka.


	; Modified from the unique
TEC:	XOR A
	CALL GTTRIG
	OR A
	RET NZ
	JP TEC

	; Setup graphics for Karateka, Knife, and Judoka
GRAFICOS:
	LD HL,$3800
	LD DE,GRAFICOS_8600
	LD B,$00
.1:	LD A,(DE)
	CALL WRTVRM
	INC HL
	INC DE
	DJNZ .1

	LD HL,$0B08
	LD DE,GRAFICOS_85D8
	LD B,$28
.2:	LD A,(DE)
Page 4 of my Z80 game
Web page 4 of my Z80 recreation.

It now setups some variables for the place of the karateka, and the knifes shoot by the enemy. Additionally resets the kicks_given variable. It begins filling the colour for the sky and grass.


	CALL WRTVRM
	INC HL
	INC DE
	DJNZ .2

        LD A,$68
	LD (y_karateka),A
	LD A,$D0
	LD (x_karateka),A
	LD A,$00
	LD (spr_karateka),A
	LD A,$00
	LD (knife1),A
	LD A,$00
	LD (knife2),A
	LD A,$00
        LD (kicks_given),A

	LD HL,$2B00
	LD B,$08
.3:	LD A,$77	; Turquoise colour
	CALL WRTVRM
	INC HL
	DJNZ .3
	LD HL,$2808
	LD B,$08
.4:	LD A,$22	; Grass colour
Page 5 of my Z80 game
Web page 5 of my Z80 recreation.

Then it cleans the display and begins placing the characters on the display to create visually the sky and grass. And sure, embarrassingly the 9 years previous is repeating code like loopy!


	CALL WRTVRM
	INC HL
	DJNZ .4

	LD HL,$2300
	LD B,$08
.5:	LD A,$77
	CALL WRTVRM
	INC HL
	DJNZ .5

	CALL LIMPIA

	LD HL,$3C00
	LD B,$00
.6:	LD A,$60
	CALL WRTVRM
	INC HL
	DJNZ .6

	LD B,$E0
.7:	LD A,$60
	CALL WRTVRM
	INC HL
	DJNZ .7

	LD B,$20
.8:	LD A,$01
	CALL WRTVRM
	INC HL
Page 6 of my Z80 game
Web page 6 of my Z80 recreation.

It units the colour for the enemy after which places it on the display by utilizing outlined characters. Then setups 3 variables, one in all them is unused.


	DJNZ .8

	LD HL,$2B08
	LD B,$28
.9:	LD A,$17
	CALL WRTVRM
	INC HL
	DJNZ .9

	LD HL,$3DA2
	LD A,$61
	CALL WRTVRM
	LD HL,$3DA3
	LD A,$62
	CALL WRTVRM
	LD HL,$3DC2
	LD A,$63
	CALL WRTVRM
	LD HL,$3DC3
	LD A,$64
	CALL WRTVRM
	LD A,$00
	LD (knife_time+1),A     ; NOT USED
	LD A,$00
	LD (kicks_given),A
	LD A,$00
	LD (knife_time),A
Page 7 of my Z80 game
Web page 7 of my Z80 recreation.

For some unclear purpose I set once more the Register 1 of VDP, then it setups the beginning place for the participant. Discover the microcode says 3E 68 corrected whereas the supply code at proper reads LD A,70 placing the participant below the ground.

The motion is left and proper, up for punchs, and down for kicks. Once more the keyboard studying has been changed for MSX GTSTCK (translated for Colecovision).


	LD BC,$C201
	CALL WRTVDP
	LD HL,$1B00
	LD A,$68
	CALL WRTVRM
	INC HL
	LD A,$E0
	CALL WRTVRM
	INC HL
	LD A,$00
	CALL WRTVRM
	INC HL
	LD A,$0E
	CALL WRTVRM
	RET

	; Transfer karateka
KARATEKA:	; 8132
	XOR A
	CALL GTSTCK	; Modified from unique
	CP $07
	JP Z,MIK
	CP $03
	JP Z,MDK
	CP $01
	JP Z,GODMA
Page 8 of my Z80 game
Web page 8 of my Z80 recreation.

I believe I used to be going by way of a psychological compilation of BASIC to assembler, solely that might clarify why the code is fairly unoptimized. Optimizing it somewhat would have saved me a number of time re-entering the sport into the pc.

Shifting the karateka to left was achieved just by subtracting 8 to the X coordinate, and updating it additionally on the sprite attributes desk. Additionally it animates the participant between two frames.


	CP $05
	JP Z,GODPI
	RET

	; Transfer karateka to left
MIK:	; 8149
	LD A,(x_karateka)
	SUB $08
	LD (x_karateka),A
	LD HL,$1b01
	CALL WRTVRM
	LD A,(spr_karateka)
	CP $00
	JP Z,SP2
	LD A,$00
	LD (spr_karateka),A
	JP SPR

SP2:	; 8167
	LD A,$08
	LD (spr_karateka),A
SPR:	LD HL,$1b02
	CALL WRTVRM
	RET
Page 9 of my Z80 game
Web page 9 of my Z80 recreation.

The motion to proper replicates primarily the identical code for left motion. It might have used the identical subroutine by passing parameters on DE or BC registers.

Given it has no concept of the participant path, it checks the sprite body to see during which path he/she is going through. One other variable would have made it a lot simpler.


	; Transfer karateka to proper
MDK:	; 8173
	LD A,(x_karateka)
	ADD A,$08
	LD (x_karateka),A
	LD HL,$1b01
	CALL WRTVRM
	LD A,(spr_karateka)
	CP $04
	JP Z,SPC
	LD A,$04
	LD (spr_karateka),A
	JP SPR0

SPC:	LD A,$0C
	LD (spr_karateka),A
SPR0:	LD HL,$1b02
	CALL WRTVRM
	RET

	; Hand struggle (GOlpe De MAno)
GODMA:	; 819D
	LD A,(spr_karateka)
	CP $00
	JP Z,GAI
	CP $08
	JP Z,GAI
	CP $04
Page 10 of my Z80 game
Web page 10 of my Z80 recreation.

The code to punch enemy to left (GAI) and proper (GAD), it merely updates the sprite to the punch body, and calls NADEO (the place it checks if enemy is hit), then it does a wait (stopping the entire recreation!) and restores the unique sprite. I nonetheless wanted to know the idea of unbiased objects.


	JP Z,GAD
	CP $0C
	JP Z,GAD
	RET

GAI:	; 81B5
	LD HL,$1B02
	LD A,$10
ZON:	CALL NADEO
	LD BC,$4000
.1:	DEC BC
	LD A,B
	OR C
	JR NZ,.1
	LD A,(spr_karateka)
	JP WRTVRM

GAD:	; 81CB
	LD HL,$1B02
	LD A,$14
	JP ZON
Page 11 of my Z80 game
Web page 11 of my Z80 recreation.

The code to deal with kicks is basically a replica of the earlier code. BOLAS is basically saying Ay Caramba!


GODPI:	; 81D3 Forgot label on code
	LD A,(spr_karateka)
	CP $00
	JP Z,IZ
	CP $08
	JP Z,IZ
	CP $04
	JP Z,DER
	CP $0C
	JP Z,DER
	RET

IZ:	; 81EB
	LD HL,$1B02
	LD A,$18
HOLA:	CALL NADEO
	LD BC,$4000
BOLAS:	DEC BC
	LD A,B
	OR C
	JR NZ,BOLAS
	LD A,(spr_karateka)
	JP WRTVRM

DER:    ; 8201
	LD HL,$1B02
	LD A,$1C
	JP HOLA
Page 12 of my Z80 game
Web page 12 of my Z80 recreation.

After watching there was no approach of avoiding the knifes, I applied the leap for the karateka.

See Also

That is displaying extra considering, like calling NEVAJA to maintain the knifes transferring. However nonetheless two separate routines, one to maneuver participant up, and one to maneuver participant down. Every with their very own delay.


	; Karateka leap
SALTO:	; 8209
	LD A,(y_karateka)
	LD B,$04
OSC:	LD HL,$1B00
	SUB $04
	CALL WRTVRM
	PUSH HL
	PUSH AF
	CALL NEVAJA
	PUSH BC
	LD BC,$4000
.1:	DEC BC
	LD A,B
	OR C
	JR NZ,.1
	POP BC
	POP AF
	POP HL
	DJNZ OSC
	LD B,$04
KAR:	LD HL,$1B00
	ADD A,$04
	CALL WRTVRM
	PUSH HL
	PUSH AF
	CALL NEVAJA
	PUSH BC
Page 13 of my Z80 game
Web page 13 of my Z80 recreation.

Shifting the knifes is solely a operating counter from left to proper, updating the display.

The child could not clear up methods to make knifes nearer to the enemy launching them, as a result of the knifes cleared behind with areas so these would have erased the best half of the enemy.


	LD BC,$4000
BOCHA:	DEC BC
	LD A,B
	OR C
	JR NZ,BOCHA
	POP BC
	POP AF
	POP HL
	DJNZ KAR
	RET

NEVAJA:	; 8247
	LD A,(knife1)
	ADD A,$A5
	LD H,$3D
	LD L,A
	LD A,$65
	CALL WRTVRM
	LD A,(knife1)
	ADD A,$A4
	LD H,$3D
	LD L,A
	LD A,$60
	CALL WRTVRM
	LD A,(knife1)
	INC A
Page 14 of my Z80 game
Web page 14 of my Z80 recreation.

A tremendous waste of bytes by repeating the identical code to maneuver a parallel knife on the identical column by utilizing a unique variable.


	LD (knife1),A
	LD A,(knife2)
	ADD A,$C5
	LD H,$3D
	LD L,A
	LD A,$65
	CALL WRTVRM
	LD A,(knife2)
	ADD A,$C4
	LD H,$3D
	LD L,A
	LD A,$60
	CALL WRTVRM
	LD A,(knife2)
	INC A
	LD (knife2),A
	CP $1A
	CALL Z,B2
	LD A,(knife1)
	CP $1A
	CALL Z,B1
	RET

B1:	DEC A
	ADD A,$A5
	LD H,$3D
Page 15 of my Z80 game
Web page 15 of my Z80 recreation.

Once more a waste of bytes to delete every knife individually, when each come collectively. In all probability I used to be considering on having them seem on completely different instances, however could not determine methods to do it. The MALORA perform (baddy) checks if the knifes hit the participant, once more checking every knife individually.


	LD L,A
	LD A,$60
	CALL WRTVRM
	LD A,$00
	LD (knife1),A
	RET

B2:	DEC A
	ADD A,$C5
	LD H,$3D
	LD L,A
	LD A,$60
	CALL WRTVRM
	LD A,$00
	LD (knife2),A
	RET

MALORA:	; 82B9
	LD A,(x_karateka)
	RRCA
	RRCA
	RRCA
	LD B,A
	LD A,(knife1)
	ADD A,$05
	CP B
	JP Z,MUERTO
	LD A,(knife2)
Page 16 of my Z80 game
Web page 16 of my Z80 recreation.

The MUERTO (useless) perform merely fills the entire colour desk with a random colours (Hey! That is a particular visible impact!) And stops earlier than resetting to the inner monitor. Could not insert a leap to the principle recreation as a result of the RST 00 instruction solely makes use of one byte, and a leap makes use of 3 bytes (keep in mind I wasn’t utilizing an assembler) so for this time I modified it to leap to the sport.


	ADD A,$05
	CP B
	JP Z,MUERTO
	RET

MUERTO:	; 82D3
	LD HL,$2000
	LD BC,$1800
M2:	LD A,R	
	CALL WRTVRM
	INC HL
	DEC BC
	LD A,B
	OR C
	JR NZ,M2
	LD BC,$0000
M3:	DEC BC
	LD A,B
	OR C
	JR NZ,M3
	JP JUEGO	; Not in unique as a result of lack of area
Page 17 of my Z80 game
Web page 17 of my Z80 recreation.

Lastly my first working subroutine NADEO, known as 4 instances to examine for enemy being hit. I can’t determine what I used to be making an attempt to abbreviate there. The hit examine is straightforward, if the participant is standing precisely the place the knifes seem, it’ll hit the enemy, in fact I used to be making an attempt to make him/her to be hit by the knifes. Sadly this actual place is hitting on the air, and there’s no visible indication of hit…


NADEO:	; 82ED
	CALL WRTVRM
	PUSH AF
	PUSH HL
	PUSH BC
	PUSH DE
	LD A,(x_karateka)
	CP $28
	CALL Z,GOLPES
	POP DE
	POP BC
	POP HL
	POP AF
	RET

GOLPES:	; 8301
	LD A,(kicks_given)
	INC A
	LD (kicks_given),A
	CP $14
	JP Z,GANAR
	RET

GANAR:	; 830E
	CALL LIMPIA
	LD HL,$3C03
	CALL SETWRT
	CALL INMEDIATO
Page 18 of my Z80 game
Web page 18 of my Z80 recreation.

This half is straightforward. Solely a profitable message (BIEN! or good!)


	DB "BIEN!",0
	LD BC,$0000
BION:	DEC BC
	LD A,B
	OR C
	JR NZ,BION
	JP JUEGO
Page 19 of my Z80 game
Web page 19 of my Z80 recreation.

Clearly I wrote the entire recreation from my mind to paper, and did not deliberate for a delay to make the sport playable. This code handles it and likewise the leaping.

Discover how I did not use interrupts, I did not knew about interrupts on the time, however the easy concept of getting a relentless time reference when it comes to video frames would have blown my thoughts!


PATCH:
	LD BC,$4000
.1:	DEC BC
	LD A,B
	OR C
	JR NZ,.1
	XOR A
	CALL GTTRIG
	OR A
	JP NZ,SALTO
	RET
Page 20 of my Z80 game
Web page 20 of my Z80 recreation.

This web page would not should be ported as VPOKE is changed by the WRTVRM routine. And VPEEK is not used. By the best way, this reveals the affect of my Enter MSX journal readings.

Page 21 of my Z80 game
Web page 21 of my Z80 recreation.
Page 22 of my Z80 game
Web page 22 of my Z80 recreation.

These pages comprise the graphics for the sport. There must be squared paper someplace containing my unique drawings however I haven’t got discovered them.


GRAFICOS_85D8:
	DB $00,$03,$06,$0D,$1B,$17,$03,$01	; JUDOKA
	DB $00,$C0,$00,$C0,$40,$C0,$80,$00
	DB $0F,$F3,$00,$07,$07,$02,$1C,$30
	DB $F0,$CF,$00,$E0,$E0,$40,$38,$0C

	DB $10,$10,$20,$FF,$FF,$20,$10,$10	; KNIFE

GRAFICOS_8600:
	DB $03,$07,$07,$03,$01,$03,$03,$03	; KARATEKA LEFT
	DB $03,$03,$03,$01,$01,$01,$03,$0F
	DB $C0,$E0,$E0,$C0,$80,$C0,$C0,$C0
	DB $C0,$C0,$C0,$80,$80,$80,$80,$80

	DB $03,$07,$07,$03,$01,$03,$03,$03	; KARATEKA RIGHT
	DB $03,$03,$03,$01,$01,$01,$01,$01
	DB $C0,$E0,$E0,$C0,$80,$C0,$C0,$C0
	DB $C0,$C0,$C0,$80,$80,$80,$C0,$F0

	DB $03,$07,$07,$03,$01,$03,$03,$03	; KARATEKA WALKING LEFT
	DB $03,$03,$03,$01,$02,$04,$0C,$3D
	DB $C0,$E0,$E0,$C0,$80,$C0,$C0,$C0
	DB $C0,$C0,$C0,$80,$40,$20,$60,$E0

	DB $03,$07,$07,$03,$01,$03,$03,$03	; KARATEKA WALKING RIGHT
	DB $03,$03,$03,$01,$02,$04,$06,$07
	DB $C0,$E0,$E0,$C0,$80,$C0,$C0,$C0
	DB $C0,$C0,$C0,$80,$40,$20,$30,$BC

	DB $03,$07,$07,$03,$01,$FF,$FF,$03	; KARATEKA PUNCH LEFT
	DB $03,$03,$03,$01,$01,$01,$03,$0F
	DB $C0,$E0,$E0,$C0,$80,$C0,$C0,$C0
	DB $C0,$C0,$C0,$80,$80,$80,$80,$80

	DB $03,$07,$07,$03,$01,$03,$03,$03	; KARATEKA PUNCH RIGHT
	DB $03,$03,$03,$01,$01,$01,$01,$01
	DB $C0,$E0,$E0,$C0,$80,$FF,$FF,$C0
	DB $C0,$C0,$C0,$80,$80,$80,$C0,$F0

	DB $03,$07,$07,$03,$01,$03,$C3,$C3	; KARATEKA KICK LEFT
	DB $33,$33,$0F,$07,$00,$00,$01,$07
	DB $C0,$E0,$E0,$C0,$80,$C0,$C0,$C0
	DB $C0,$C0,$C0,$80,$80,$80,$80,$80

	DB $03,$07,$07,$03,$01,$03,$03,$03	; KARATEKA KICK RIGHT
	DB $03,$03,$03,$01,$01,$01,$01,$01
	DB $C0,$E0,$E0,$C0,$80,$C0,$C3,$C3
	DB $CC,$CC,$F0,$E0,$00,$00,$80,$E0
Page 23 of my Z80 game
Web page 23 of my Z80 recreation.

The final web page accommodates documentation of the variables used and half of it’s desynchronized, and the knife 3 wasn’t applied. It is a sensible instance of actual documentation 😛


	ORG RAM_BASE

y_karateka:	RB 1
x_karateka:	RB 1
spr_karateka:	RB 1
knife1:		RB 1
knife2:		RB 1
kicks_given:	RB 1
knife_time:    RB 1    ; NOT USED

Downloads

You may obtain the supply code for this recreation.

  • Karateka.zip sources and ROM information for Colecovision and MSX (5 kb)
  • Karate2.zip ROM information for Colecovision and MSX (17 kb), programmed in someday with all my instruments. It’s the recreation because it appeared on my 9 years previous thoughts.

Associated hyperlinks

Final modified: Aug/29/2021

Source Link

What's Your Reaction?
Excited
0
Happy
0
In Love
0
Not Sure
0
Silly
0
View Comments (0)

Leave a Reply

Your email address will not be published.

2022 Blinking Robots.
WordPress by Doejo

Scroll To Top