Routine making 1981/1983 appear at boot time?

Talk about programming CreatiVision (except games programming). Projects of homebrew hardware are also welcome.
Post Reply
User avatar
MADrigal
Site Admin
Posts: 1192
Joined: Sun Sep 15, 2013 1:00 pm
Contact:

Routine making 1981/1983 appear at boot time?

Post by MADrigal » Fri Apr 05, 2013 1:41 pm

I tried to understand why in certain games there's "(C) 1981" with the CreatiVision logo (boot screen), and in some others there's "(C) 1983".

I always thought the "198" prompt is part of a routine in the BIOS, and the "1" or "3" is contained in the actual game ROM program.

I made a few tests on the games which prompt "1983" (that's Stone Age, Locomotive and Chopper Rescue), by simply changing the "D3" values into "D4" in all the locations where D3 was stored (one by one, of course). The result -> the game prompted "1984" when changing a CERTAIN byte. :-)

PS: Please notice that "D3" is the ASCII code for "3" in the BIOS charset, and "D4" stands for "4" of course :-)

Important: the significant "D3" is stored AT DIFFERENT LOCATIONS depending on which game!!!

Repeating the same procedure on games which prompt "1981" gives no result... Nothing has changed. "1981" always and always... seems like the BIOS doesn't need to "peek" the D1 from the game ROM area.

What I think: the BIOS routine displays 198 + ....
- case 1: prompts "1" if there's no "routine" or "vector" which jumps into the ROM program
- case 2: prompts "x" where "x" is the result of a certain ROUTINE (not location) included in the ROM program.

Problem is that I have no idea where the "routine" is... because D3 is stored in the following locations:

Game: LOCOMOTIVE (12 KBytes ROM)
D3 found at: $2003 (of the ROM file)
which is mapped at: $5003 and $7003 (of the CPU addressing area)

Game: CHOPPER RESCUE (18 KBytes ROM)
D3 found at: $400E (of the ROM file)
which is mapped at: $400E, $500E, 600E and $700E (of the CPU addressing area)
and optionally mirrored at: $480E, $580E, 680E and $780E (of the CPU addressing area)

Game: STONE AGE (8 KBytes ROM)
D3 found at: $1866 (of the ROM file)
which is mapped at: $9866 and $B866 (of the CPU addressing area)

===

The question is:

is there wa way to make the console display "(C) 2013" instead of "(C) 198x", without having to re-program the BIOS prompt from scratch? How does the whole routine work? Where is it in the BIOS? I have a partial disassembly of the BIOS, made by mr. Barry Klein and Roberto Ventura, but several parts are not commented, and I have no idea how they work.
User avatar
carlsson
Posts: 507
Joined: Fri Jun 13, 2008 7:39 am
Location: Västerås, Sweden

Re: Routine making 1981/1983 appear at boot time?

Post by carlsson » Fri Apr 05, 2013 10:37 pm

Well, the routine I call to get the banner is located at $F808. It looks like this:

Code: Select all

.C:F808  BEQ $F848 ; Skip banner if reset button was pressed
.C:F80A  LDA #$D1
.C:F80C  PHA
.C:F80D  LDX #$05
.C:F80F  LDA $F856,X
.C:F812  JSR $FE1F ; Write VDP status register
.C:F815  DEX
.C:F816  BPL $F80F
.C:F818  LDA #$61
.C:F81A  LDX #$F8
.C:F81C  JSR $FD53
.C:F81F  PLA
.C:F820  JSR $FD82 ; Write VDP data
.C:F823  LDA #$F1
.C:F825  LDX #$07
.C:F827  JSR $FE1F
.C:F82A  LDA #$00
.C:F82C  LDX #$D8
.C:F82E  JSR $FE1F
.C:F831  LDY #$1F
.C:F833  LDA #$F1
.C:F835  JSR $FD82 ; Write VDP data
.C:F838  DEY
.C:F839  BPL $F835
.C:F83B  JSR $FD33
.C:F83E  BNE $F83B
.C:F840  DEY
.C:F841  BNE $F83B
.C:F843  JSR $F84B
.C:F846  NOP
.C:F847  NOP
.C:F848  JMP ($BFE8) ; Start address as specified in the game
I should probably have a look at the games you mention, if they call $F808 at all or if they have mimiced the BIOS ROM routine within the cartridge. As far as I'm concerned, there is nothing preventing one from reimplementing the BIOS ROM banner routine with own data.
User avatar
MADrigal
Site Admin
Posts: 1192
Joined: Sun Sep 15, 2013 1:00 pm
Contact:

Re: Routine making 1981/1983 appear at boot time?

Post by MADrigal » Wed Apr 10, 2013 11:44 am

Got it.

> F80A LDA #$D1

That's the "1" making "198x" become "1981".

There must be some specific routine in the later games (Chopper, Locomotive, Stone Age) that "overwrites" that value on screen.

They probably "skip" the routine till F80A, and execute an identical one, with "LDA #$03" instead.
User avatar
carlsson
Posts: 507
Joined: Fri Jun 13, 2008 7:39 am
Location: Västerås, Sweden

Re: Routine making 1981/1983 appear at boot time?

Post by carlsson » Thu Apr 11, 2013 1:13 pm

It assumes the last character printed by $FD53 is "8". If so, we can only get to 1989 using the BIOS routine with bypassing part of it.
User avatar
MADrigal
Site Admin
Posts: 1192
Joined: Sun Sep 15, 2013 1:00 pm
Contact:

Re: Routine making 1981/1983 appear at boot time?

Post by MADrigal » Thu Apr 11, 2013 1:30 pm

Well the "1" of "1981" is also in the BIOS, so you can't modify it. The complete "1981" data is in the BIOS.

"198" is in $F87D-$f87F, and "1" is in $F80A

I'm currently trying to sort all infos, trying to add a "(C) 2013" to your Reversi source code.
User avatar
carlsson
Posts: 507
Joined: Fri Jun 13, 2008 7:39 am
Location: Västerås, Sweden

Re: Routine making 1981/1983 appear at boot time?

Post by carlsson » Thu Apr 11, 2013 1:39 pm

Good luck! I think we'd need to lift quite a bit of code to make it happen, but as I wrote before it will be well below 4K even with music added, so it will fit.
User avatar
MADrigal
Site Admin
Posts: 1192
Joined: Sun Sep 15, 2013 1:00 pm
Contact:

Re: Routine making 1981/1983 appear at boot time?

Post by MADrigal » Thu Apr 11, 2013 1:44 pm

Completing to sort out infos.

1) The "creatiVision" message is stored here:
- $f868-$f869 it's the upper row, where's the top of the "V"
- $f86d it's the "TM" mark on the upper row
- $f871-$f878 it's the lower row of "creatiVision"

2) the "(C) 1981" is:
- $f8fc it's the "(C)" character
- $f87d-$f87f" it's the "198"
Post Reply