Page 2 of 2

Re: Was it possible to extend Noddy?

Posted: 15 Oct 2014 18:39
by Crazyboss
believe jp (hl) is quicker - and the table only need the labels to jump too no need for the jr instruction.

MSX Konami games uses this a lot, and other games too ;) Not common used in MTX games.

Re: Was it possible to extend Noddy?

Posted: 15 Oct 2014 23:29
by Martin A
JR is a one byte instruction and 1 byte displacement, so with 10 JR's and direct entry to the 11th code section, the table is actually 2 bytes shorter than it would be if it were 11, 2 byte vectors

Re: Was it possible to extend Noddy?

Posted: 16 Oct 2014 08:34
by Crazyboss
Not that is madders :) the JP is quicker than JR but JP use one byte more.

Re: Was it possible to extend Noddy?

Posted: 17 Oct 2014 14:28
by thewiz
I am working on decoding the Noddy ROM routines to see what can be used and how extensions can be added. I don't remember seeing anything like this in any of the club magazines.

Why was it called Noddy?

What I've worked out so far:

SPLOD - 0x2b32. Starting point of Noddy when called from BASIC.

NODENT - 0x2eb8. A bit of setup and then:

MAINLP - 0x2ecd.

On Entry HL = location in Noddy page being processed
Search for next '*' char. (getstar)
Get next char in A that isn't 0xff or a ',' (getchar)
Process char (findinst)
Repeat for all '*' chars.

I've more but run out of time.

Re: Was it possible to extend Noddy?

Posted: 20 Oct 2014 14:08
by thewiz
Next installment:

Code: Select all

getstar		2fc5	Get next char on Noddy page (testbit7)
			Repeat until char on Noddy page = '*'

testbit7	2ffe	A = (HL)
			Return Z if bit 7 not set
			Return NZ if A = (HL) = 0xff
			else Noddy error 53 "Missing Symbol".

getchar		2ff3	Inc HL while (HL) != 0xFF and (HL) != ','

findinst	2f1a	Handle Noddy Instruction
			Call extension routine (USERMOD). HL points to cmd
				addr on Noddy page, A is the cmd.
			Monitor break key (breakmod). Jr to exxxx if it was.
			If not valid, noddy error 49 "Command not found"

			A = character after *

breakmon	09f2	Monitor break key?

noderr		3028	Node error

ndisplay	2f73	Get noddy page to display, noddy error 63 if not found
			Select VS5 and clear screen
			Clear stack

strhl		02E7	Output a string, terminated by 0xFF with compressed
getspace	2fe9	Check (HL) for 0xFF or ','?

pgslc1		0647	?

getsub		3009	calls getchar and then calls "PUTSTACK".
			Could this be getting a parameter?
Next step is to write a proof of concept.