Was it possible to extend Noddy?

Everything about programming, including VDP and Sound programming.
User avatar
thewiz
Posts: 120
Joined: 12 Aug 2012 16:08

Was it possible to extend Noddy?

Post by thewiz » 13 Oct 2014 14:12

I've always wondered why it wasn't possible to extend Noddy. Basic had its User command, Panel could be expanded using M/C and even user interrupts could be added. Node was also handled as an extension.

But Noddy was always write text on Blue. Not very user friendly.

Did Noddy use a Virtual screen that could be controlled, e.g. Ink and Paper. If so could it be changed to be a graphic screen?

A lot of games written had instruction pages with different character sets, sprites and colours. Surely Noddy would of been ideal for this in a Basic program.

Could something be done about this, maybe using a USER PLOD "" command and making use of the ROM but allowing for extensions?

I do know how Noddy pages are stored which I'll detail soon.
THIS is what Memotech is doing now.

Bill B
Posts: 161
Joined: 26 Jan 2014 16:31

Re: Was it possible to extend Noddy?

Post by Bill B » 13 Oct 2014 14:30

System variable USERNOD (0xFAA1). Presumably called at some point in NODDY processing. No idea what you can do with it.

Bill.

Martin A
Posts: 406
Joined: 09 Nov 2013 21:03

Re: Was it possible to extend Noddy?

Post by Martin A » 13 Oct 2014 19:47

Here's the relevant part of the ROM for Noddy commands, Its at 2F1A in the "Basic" rom.

Interestingly USERNOD is called before the inbuilt commands are checked.

Syntax checking in minimal.
Find a "*" then read the next character, if it's one of the 11 commands, then run them, otherwise there's an error.
(there are only 10 JR's in the table, as it falls through directly into the OFF command

Code: Select all

findinst
    CALL USERNOD
    CALL breakmon
    JR   NZ,exxxx    ;exit
    PUSH HL
    LD   HL,vj1
    LD   BC,0000Bh
    CPDR
    JR   Z,fffno      ;Parse the jump table in the event of a match, error otherwise
    CALL noderr 
    
    DB   031h      ;command not found
fffno
    LD   HL,vjump
    ADD  HL,BC
    ADD  HL,BC
    EX   (SP),HL 
    RET
    
    DB   "LSEDARGIPB" 
vj1
    DB   "O"
    
vjump
    JR   nodlst        ;List
    JR   stknod        ;Stack
    JR   inkey         ;Enter
    JR   ndisplay      ;Display
    JR   return        ;Advance
    JR   exxxx         ;Return
    JR   gggoto        ;Goto
    JR   cccomp        ;If
    JR   pause         ;Pause
    JR   branch        ;Branch
  ;direct entry into the code for Off
    CALL stackem
    PUSH HL
    EX   DE,HL
    CALL findit
    POP  HL
    RET
Presumably any USERNOD code just checks the A register, and then either exits, or does the advance to "*" and check again until no match sort of thing

Bill B
Posts: 161
Joined: 26 Jan 2014 16:31

Re: Was it possible to extend Noddy?

Post by Bill B » 13 Oct 2014 20:07

Agreed, so USERNOD allows extensions to the NODDY language, but not so much for display enhancements.

From my quick scan of Martin's full ROM listing, it looks as though NODDY used VS5, so by changing this before calling PLOD it might be possible to change the colours used. However this is a text mode screen, it only supports one foreground and one background colour (as far as I remember). I suppose you could have new NODDY commands to change these colours.

To get multi-coloured text you would have to change VS5 into a graphics mode screen. Don't know whether that would work or whether NODDY assumes 40 characters per line. If you did that you could then try embedding escape sequences into the NODDY display pages to select different colours etc.

A lot of experimentation required.

Bill.

User avatar
thewiz
Posts: 120
Joined: 12 Aug 2012 16:08

Re: Was it possible to extend Noddy?

Post by thewiz » 13 Oct 2014 20:49

For some reason I thought USERNOD was for the NODE system.

One extension I can think of are different display commands to display pages differently, e.g. scroll up from the top, bottom, left right, window blinds, etc.

Will have to try changing VS5 to be graphic and see what happens.
THIS is what Memotech is doing now.

Martin A
Posts: 406
Joined: 09 Nov 2013 21:03

Re: Was it possible to extend Noddy?

Post by Martin A » 13 Oct 2014 20:55

If you have a look at the "Dennis" games, they use Noddy and VS4 for the screen design. So 32 column mode works

"Someone" with a FDX should be able to check if Noddy works on 80 columns too.

Hmm, Add a Colour command
maybe:
Ca to Co could set the background
CA to CO the foreground
using the RST 10 display drivers wouldn't be too hard, I'm thinking the one that sends the BC pair, then send 04,colour or 06,colour depending. Does that work for colour changing ??

User avatar
thewiz
Posts: 120
Joined: 12 Aug 2012 16:08

Re: Was it possible to extend Noddy?

Post by thewiz » 14 Oct 2014 13:51

OK,

I can confirm that changing paper and ink on VS 5 changes the colour used by Noddy. So no more white on blue :D

Also VS 5 can be changed to a graphic screen however the columns per line has to be 32 however Noddy still outputs 40 (39?) characters. So is doable.

CRVS 5,1,0,0,32,24,32

However if VS 5 is redefined before going into Noddy, a page can be setup at 32 columns/line. Also the DSI commands work like CTL D and CTL F, which do change paper and ink, but, they are not saved so when redisplaying its back to one colour.

Next step is to add a new command.

Format of a Noddy page:

Code: Select all

00 00     Page Length, 16 bit. Includes page length, name, contents and terminator.
00 ...    Page Name. Last char has bit 7 set.
00 ...    Text of page. Multiple spaces are encoded as 0x80 + No. of spaces.
FF        Page Terminator.


A page is 39 columns by 24 lines in size. Noddy is situated after arrtop, up to nbtop.
THIS is what Memotech is doing now.

Tony Brewer
Posts: 62
Joined: 08 Jan 2014 20:50

Re: Was it possible to extend Noddy?

Post by Tony Brewer » 14 Oct 2014 19:39

I was the last person at Memotech to modify the Noddy code before it was committed to mask ROM. Knowing how it was supposed to work would have been helpful!

Although I didn't make the decisions it wasn't easy to choose 11 commands that spelt BIG EARS PLOD. Some names changed and initial letters were swapped around, which is reflected in the source code labels. I think the final stumbling block was removed when Geoff Boyd came up with Advance for something beginning with A.

User avatar
Crazyboss
Site Admin
Posts: 227
Joined: 09 Aug 2012 21:45
Location: Sweden
Contact:

Re: Was it possible to extend Noddy?

Post by Crazyboss » 14 Oct 2014 22:37

Martin A wrote:Here's the relevant part of the ROM for Noddy commands, Its at 2F1A in the "Basic" rom.

Interestingly USERNOD is called before the inbuilt commands are checked.

Syntax checking in minimal.
Find a "*" then read the next character, if it's one of the 11 commands, then run them, otherwise there's an error.
(there are only 10 JR's in the table, as it falls through directly into the OFF command

Code: Select all

findinst
    CALL USERNOD
    CALL breakmon
    JR   NZ,exxxx    ;exit
    PUSH HL
    LD   HL,vj1
    LD   BC,0000Bh
    CPDR
    JR   Z,fffno      ;Parse the jump table in the event of a match, error otherwise
    CALL noderr 
    
    DB   031h      ;command not found
fffno
    LD   HL,vjump
    ADD  HL,BC
    ADD  HL,BC
    EX   (SP),HL 
    RET
    
    DB   "LSEDARGIPB" 
vj1
    DB   "O"
    
vjump
    JR   nodlst        ;List
    JR   stknod        ;Stack
    JR   inkey         ;Enter
    JR   ndisplay      ;Display
    JR   return        ;Advance
    JR   exxxx         ;Return
    JR   gggoto        ;Goto
    JR   cccomp        ;If
    JR   pause         ;Pause
    JR   branch        ;Branch
  ;direct entry into the code for Off
    CALL stackem
    PUSH HL
    EX   DE,HL
    CALL findit
    POP  HL
    RET
Presumably any USERNOD code just checks the A register, and then either exits, or does the advance to "*" and check again until no match sort of thing
they didn know about the jp (hl) instruction ?
//CLAUS - Webmaster at www.mtxworld.dk

Tony Brewer
Posts: 62
Joined: 08 Jan 2014 20:50

Re: Was it possible to extend Noddy?

Post by Tony Brewer » 15 Oct 2014 13:20

Crazyboss wrote: they didn't know about the jp (hl) instruction ?
PUSH HL | ... | EX (SP),HL | RET preserves HL.

Post Reply