16k and PEEK 40000 (on a real 16k Spectrum)?

ZupZup
edited June 2 in Hardware
Imagine a real 16k Spectrum (without any RAM expansion or circuits fitted). What would I get if I do a PEEK or try to access memory over 32767?

Would I get...
- a 0?
- a 255?
- a mirror of what's on lower memory (would it be different if the address is above/below 49152?
- some kind of random (I mean, not a fixed value over time) number due to electrical noise?

Thanks.
Post edited by Zup on
I was there, too
An' you know what they said?
Well, some of it was true!

Comments

  • This is a guess but if you did a PEEK of 40000 from BASIC I’m assuming you would get an “Out of memory” error?
  • edited June 2
    None of the above :))


















    What you will get depends on if the ULA is reading screen data, if it is, reading an unimplemented address will read the data that is on the data bus.
    If the ULA is not reading screen data, the read will read 255 (0xFF) due to the pull-up resistors on each data bus line.

    Note that in a ZX Spectrum, the whole memory map is fully decoded, unlike the I/O ports or the memory map of the ZX80 and ZX81.

    Mark
    Post edited by 1024MAK on
  • Mousey wrote: »
    This is a guess but if you did a PEEK of 40000 from BASIC I’m assuming you would get an “Out of memory” error?
    The BASIC PEEK function does not know that those RAM chips are not fitted, and it does not care...

    Mark
  • edited June 4
    the pull-up resistors (https://www.electronics-tutorials.ws/logic/pull-up-resistor.html)
    are NOR gates? https://en.wikipedia.org/wiki/Logical_NOR
    and not some metal skirts?

    which NOR is actualy an OR with a CPL afterward since NOT in binary is our z80 CPL(complement) nice to know
    and there is a Truth Table !!!
    we can use that one (more than once i hope)
    https://en.wikipedia.org/wiki/Bitwise_operation

    if a 16k reads from a high port adres, it influences less then reading from a low adres under 32768
    but does the actual PORT exists? what is 'adressing' a port if there is 8 to 16 wires and 65536 ports?
    thats 2 things in one question/remark thingie
    Post edited by Crisis on
    my old website http://home.hccnet.nl/c.born/ has changed to http://www.cborn.nl/zxfiles/ so just click it and select a file
  • Crisis wrote: »
    ...
    Ports should not be affected, as they don't depend on RAM. If a suitable interface / device is connected, it would work.

    My question was about the CPU reading (i.e.: ld (40000),a) non existant RAM chips.I've been looking on the schematics, and it seems that the CPU should get a 255, but I'm not sure. BTW, it seems that some emulators get this wrong...

    - MAME/MESS: I've been unable to set a ZX Spectrum 16k.
    - fuse 1.5.7: PEEK 40000=255, memory is not writable.
    - Spectaculator 8.0: PEEK 40000=255, memory is not writable.
    - ZX Spin (both 0.66 and 0.7): PEEK 40000=0, memory is not writable.
    - EightyOne 1.2: PEEK 40000=various values (?), memory is not writable.
    - EmuZWin 2.7: Unable to set a 16k.
    - SpecEmu 3.1, build 27/02/20: PEEK 40000=255, memory is not writable.
    - ZesarUX 6.1RC: PEEK 40000=255, memory is not writable.

    That's strange... I remember that at least one emulator let change high memory even on a 16k...
    I was there, too
    An' you know what they said?
    Well, some of it was true!
Sign In or Register to comment.