Author Topic: C128 ROM Default Parameters  (Read 699 times)

0 Members and 1 Guest are viewing this topic.

Offline RCtech

  • VIC 20 user
  • ****
  • Posts: 101
  • Age: 37
  • Activity:
    3.8%
  • Country: de
  • Reputation: 2
  • With us since: 26/03/2008
    YearsYearsYearsYearsYears
    • View Profile
C128 ROM Default Parameters
« on: July 31, 2011, 10:14 PM »
For a ROM modification I searched a lot of default adresses in the C128 ROM map, here they are.

C64 Kernel Colors:

$E535 $0E - Cursor color
$EC09 $0E - Frame color
$ECDA $06 - Background color

C128 Kernel VIC Colors:

$0E85 $0D - Cursor color
$22E7 $0B - Frame color
$22E8 $0D - Background color

C128 Kernel VDC Colors:

$0E9F $07 - Cursor color cyan
$2323 $F0 - Frame + Background color black

Boot routine:

$388C $A2 - Boot routine call during reset
$388D $08 - Device for boot routine

If you replace in address $338C the value $A2 (STA mnemonic) with $60 (RTS mnemonic), the boot routine will be skipped. The BOOT command is still working.
Modyfing the value in $338D will change the boot routine to another device. I'll use drive 17 for bootable MO media.

The main reason for researching these values was the dull black/cyan VDC color. It always looks too old-aged. So I changed it to blue/white, as in the C65.
These are the values for the VDC screen, the VIC color's weren't modified.

$0E9F $0F - Cursor color white
$2323 $F2 - Frame + Background color blue

With some more modifications in the kernal and the Basic-lo ROM it's possible to create a look which comes more close to a C65, take a look in the attachments. But it's only a ROM text hack, there are no detection routines implemented.


The complete default values for the VIC are located from $E2C7 to $E2F7, for the VDC Tab 1 from E2F8 to $E331.
The following bytes from $E332 to $E33A should be FF 19 47 FF 04 27 07 20 FF, the values are named as VDC Tab 2 and VDC Tab 3 in my ROM listing. $FF is a seperating character.

Playing around with this could be interesting to modify the VDC's setup during power on, so it'll be possible to move the screen position or changing synronization values. It's easy to test the modified ROM images in VICE using the Resource Inspector, but after changes you have to load another ROM file (f.e. the default one), reset, then re-load the file you've modified and reset again.
« Last Edit: July 31, 2011, 10:50 PM by Naquaada »

Offline MIRKOSOFT

  • C128 user
  • ******
  • Posts: 785
  • Age: 33
  • Location: Zvolen
  • Activity:
    3.6%
  • Country: sk
  • Reputation: 188
  • Gender: Male
  • C128 programmer
  • With us since: 13/02/2009
    YearsYearsYearsYears
    • View Profile
    • MIRKOSOFT
Re: C128 ROM Default Parameters
« Reply #1 on: August 02, 2011, 06:34 AM »
Only one thing is interest.... if could real working DCS... Dual CPU System... But modifying KERNAL messages helps not to work...

This is interesant:

$388C $A2 - Boot routine call during reset

$A2 mnemonic (if it is not my mistake) is LDX direct addressing...

The Q is: is it @ $388C in KERNAL128 ROM?

Q is only for change boot routine to own - if are there two bytes free for modifyng to JMP $XXXX e.g. $4C 00 20
MIRKOSOFT of megabytes

Commodore 64 was great, Commodore 128 is bigger, better, faster and more!!!

64ever 128her
sixty-for-ever one-twenty-either

C128 = C64² + more

http://www.mirkosoft.sk

Offline MIRKOSOFT

  • C128 user
  • ******
  • Posts: 785
  • Age: 33
  • Location: Zvolen
  • Activity:
    3.6%
  • Country: sk
  • Reputation: 188
  • Gender: Male
  • C128 programmer
  • With us since: 13/02/2009
    YearsYearsYearsYears
    • View Profile
    • MIRKOSOFT
Re: C128 ROM Default Parameters
« Reply #2 on: August 02, 2011, 08:15 AM »
Hi!

So, I experimented...

It seems that @ $388C is beginning of code: (look on picture in attachment)

LDX #$08
LDA #$30
...

For me is important how to automatically call EPROM inside U36 socket..

where I can flash everything what I need...

Can anybody help?

Quote
The complete default values for the VIC are located from $E2C7 to $E2F7, for the VDC Tab 1 from E2F8 to $E331.
The following bytes from $E332 to $E33A should be FF 19 47 FF 04 27 07 20 FF, the values are named as VDC Tab 2 and VDC Tab 3 in my ROM listing. $FF is a seperating character.

Where are these essages in KERNAL? like COMMODORE BASIC V7.0 122365 BYTES FREE... to modify it in KERNAL? Or how you did it?

Many thanks.

Miro


MIRKOSOFT of megabytes

Commodore 64 was great, Commodore 128 is bigger, better, faster and more!!!

64ever 128her
sixty-for-ever one-twenty-either

C128 = C64² + more

http://www.mirkosoft.sk

Offline MIRKOSOFT

  • C128 user
  • ******
  • Posts: 785
  • Age: 33
  • Location: Zvolen
  • Activity:
    3.6%
  • Country: sk
  • Reputation: 188
  • Gender: Male
  • C128 programmer
  • With us since: 13/02/2009
    YearsYearsYearsYears
    • View Profile
    • MIRKOSOFT
Re: C128 ROM Default Parameters - more than modify...
« Reply #3 on: August 02, 2011, 08:34 AM »
So, ok, I modified KERNAL, and now I want to modify startup message and with BOOT routine call my U36 SOCKET EPROM...

So, can you help me?
MIRKOSOFT of megabytes

Commodore 64 was great, Commodore 128 is bigger, better, faster and more!!!

64ever 128her
sixty-for-ever one-twenty-either

C128 = C64² + more

http://www.mirkosoft.sk

Offline MIRKOSOFT

  • C128 user
  • ******
  • Posts: 785
  • Age: 33
  • Location: Zvolen
  • Activity:
    3.6%
  • Country: sk
  • Reputation: 188
  • Gender: Male
  • C128 programmer
  • With us since: 13/02/2009
    YearsYearsYearsYears
    • View Profile
    • MIRKOSOFT
Re: C128 ROM Default Parameters - Internal EPROM structure
« Reply #4 on: August 02, 2011, 10:13 AM »
Hi!

So, I found all to modify KERNAL, BASIC LO/HI, CHARMAP...

For now: What a structure must to have Internal EPROM (socket U36)?

I tried following cartridge header...

But successful was only redefinng first bytes of BASIC 8.0 EPROM and test to endless loop of INC $D020...

When I created blank 32kB file (filled with $00) and at begin the same loop, works not correctly...

So, only one BIG Q is: WHAT A STRUCTURE MUST TO HAVE INTERNAL EPROM?

Many thanks for every help, reply or comments...

Miro
MIRKOSOFT of megabytes

Commodore 64 was great, Commodore 128 is bigger, better, faster and more!!!

64ever 128her
sixty-for-ever one-twenty-either

C128 = C64² + more

http://www.mirkosoft.sk

 



Back to top