Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > what is your RAM init pattern?
2016-04-27 19:49
chatGPZ

Registered: Dec 2001
Posts: 11386
what is your RAM init pattern?

since i stumbled about yet another case of some ancient demo that relies on uninitialized RAM - and which would only work if you change the default VICE uses currently - i think its about time to collect some hard data about this phenomenon and perhaps at the end add proper configuration for it to VICE (or even choose a better default).

background: when you power on your C64, the RAM will not be zero, instead (about) half of the RAM cells will be 1, and the other half will be 0. this results in some kind of pattern (mostly) consisting of $00 and $ff. for example if you start VICE, then enter the monitor and look at a page of RAM it shows this:

(C:$e5d4) m c000 c0ff
>C:c000  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00   ................
>C:c010  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00   ................
>C:c020  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00   ................
>C:c030  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00   ................
>C:c040  ff ff ff ff  ff ff ff ff  ff ff ff ff  ff ff ff ff   ................
>C:c050  ff ff ff ff  ff ff ff ff  ff ff ff ff  ff ff ff ff   ................
>C:c060  ff ff ff ff  ff ff ff ff  ff ff ff ff  ff ff ff ff   ................
>C:c070  ff ff ff ff  ff ff ff ff  ff ff ff ff  ff ff ff ff   ................
>C:c080  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00   ................
>C:c090  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00   ................
>C:c0a0  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00   ................
>C:c0b0  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00   ................
>C:c0c0  ff ff ff ff  ff ff ff ff  ff ff ff ff  ff ff ff ff   ................
>C:c0d0  ff ff ff ff  ff ff ff ff  ff ff ff ff  ff ff ff ff   ................
>C:c0e0  ff ff ff ff  ff ff ff ff  ff ff ff ff  ff ff ff ff   ................
>C:c0f0  ff ff ff ff  ff ff ff ff  ff ff ff ff  ff ff ff ff   ................


this is the default pattern, which could be shortened to "64 times $00, 64 times $ff, repeat"

now i'd like to know how it looks like on your (real) C64... if you have some cartridge with ML monitor, all you need to do is power on your c64, check some memory page, and post the pattern here (you can ignore that some values wont actually be 0 or $ff - what matters is the general trend). additionally it would be extra cool if you could look into your C64 and post the type of RAM chips that it uses as well (since the pattern most likely depends on them) - they are labelled 4164 or 4464 or 41464 (please post everything written on it, the exact type and manufacturer is interesting here). Also please post the ASSY NO of the board, as the way RAM is wired up matters as well.

thanks for your help!

PS: if you are curious, Typical is the demo in question... if you can name other examples ("works in CCS64 but not in VICE is often an indicator for it), please post them too!
2016-04-27 20:55
T.M.R
Account closed

Registered: Dec 2001
Posts: 749
<Post edited by moderator on 28/4-2016 11:03>

i'm getting something like this...

.:1000 04 14 00 b7 84 04 04 84
.:1008 04 f7 00 b3 a3 ef a3 b7
.:1010 04 f7 04 b3 24 ef 00 27
.:1018 04 b4 00 f3 04 04 00 a7
.:1020 04 10 00 b3 b4 00 00 fb
.:1028 00 b3 00 b3 a3 ff 00 fb
.:1030 04 f3 00 f3 04 ff 00 bb
.:1038 04 b7 00 f3 04 ff 00 b3

...on my workhorse breadbin from a cold start with an AR6 present. The board is an assy. 250425 (made in Hong Kong by Kalex) with most of the RAM saying MCM6665BP20 on the first line and FQQ8502 on the second.

My other breadbin is repeating ff ff 00 00 and seems to swap the values at the start of a page boundary - that's another assy. 250425, the RAM says JAPAN4L3U on the first line and HM4864P-3 on the second.

(i'm squinting a lot to read the numbers, there may be "hiccups" in there...)

i have another old board and i think two C64Cs knocking about that work, could pull them out at the weekend perhaps...
2016-04-27 21:10
chatGPZ

Registered: Dec 2001
Posts: 11386
that first pattern seems... kinda unlikely :) for best results, use the c000 page (higher chance that it wasnt used for whatever) and power off the C64 for half a minute or so
2016-04-27 21:38
T.M.R
Account closed

Registered: Dec 2001
Posts: 749
Quoting Groepaz
that first pattern seems... kinda unlikely :) for best results, use the c000 page (higher chance that it wasnt used for whatever) and power off the C64 for half a minute or so


i've just started it again (with just an AR6 present, it's been off since i posted) and here's what i see:

.:c000 54 fb 00 ff 50 ff 00 ef
.:c008 04 ff 00 fb 27 af 90 af
.:c010 04 ff 00 fb 27 af 00 fb
.:c018 00 ff 10 fb a4 ff 00 ff
.:c020 54 fb 99 fb ff ff 99 ab
.:c028 00 fb 00 fb af af a2 af
.:c030 14 fb 04 fb 04 bb 00 bb
.:c038 10 1c 00 fb 86 af 24 ff

Then, after powering down for around two minutes, it looks like this:

.:c000 04 fb 00 ff 06 04 a0 fb
.:c008 04 ff 00 fb a6 ff b2 ff
.:c010 04 ff 00 fb 04 ff 02 fb
.:c018 04 ff 00 fb 04 ff 00 ff
.:c020 04 fb 00 fb 04 85 00 ff
.:c028 00 ff 00 fb ff ff 04 fb
.:c030 04 ff 00 fb 04 ff 00 bb
.:c038 04 fb 00 fb a3 df 54 34

Don't look at me, the odd number might be a typo because i'm tired but there's no simple $00 and $ff pattern! =-)
2016-04-27 22:30
chatGPZ

Registered: Dec 2001
Posts: 11386
WEIRD =)

i have knocked up a very simple test program and added a bit of info here ... the program may be useful for those that dont have a ML monitor handy (do such people exist? =P) and the readme might give you a hint on what kind of description i am looking for.
2016-04-28 02:07
Karmic

Registered: Apr 2015
Posts: 66
.:c000 03 f0 00 f0 00 f0 03 f0
.:c008 0f ff 0f ff 0f ff 0f ff
.:c010 81 ff ff ef ff 0f ff 0f
.:c018 f0 00 f0 00 f0 00 f0 00
.:c020 00 f0 00 f0 b0 f0 00 f0
.:c028 0f ff 0f ff 0f ff 0f ff
.:c030 ff c0 ff 0f ff ef 80 0f
.:c038 f0 00 f0 00 f0 00 f0 01

NEC D41464C 8605FU037, ASSY no. 250466
2016-04-28 07:35
iAN CooG

Registered: May 2002
Posts: 3194
this was also discussed in C64 Emulator Bugs
you can add to the problematic rels:
Comic Art 09
Flying Shark Preview +
2016-04-28 07:38
Flavioweb

Registered: Nov 2011
Posts: 463
Isn't convenient to analyze the 00-3ff area? I think is the primary cause of programs malfunctions...
2016-04-28 08:00
tlr

Registered: Sep 2003
Posts: 1790
Quote: Isn't convenient to analyze the 00-3ff area? I think is the primary cause of programs malfunctions...

Everything except the stack is initialized on reset...

I don't think it's especially common to rely on the initial contents of the $0100-$01ff area.
2016-04-28 09:24
lft

Registered: Jul 2007
Posts: 369
Is this true for all the common carts too?
2016-04-28 09:47
tlr

Registered: Sep 2003
Posts: 1790
Yes, most probably. In carts there are obviously some modifications to vectors and things like this though.
 
... 47 posts hidden. Click here to view all posts....
 
Previous - 1 | 2 | 3 | 4 | 5 | 6 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Guests online: 101
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Swappers
1 Derbyshire Ram  (10)
2 Jerry  (9.8)
3 Violator  (9.7)
4 Acidchild  (9.7)
5 Cash  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.053 sec.