WikiPendium

(beta)

NVMaccess()

WikiPendium :: RecentChanges :: RecentlyCommented :: UserSettings :: You are ec2-18-191-240-243.us-east-2.compute.amazonaws.com

NVMaccess()


WORD Logbase( op, start, count, buffer )


NVMaccess() is the function to use if you want to read or write data store in Non Volatile RAM (NVRAM in short), which is preserved between power-off using a battery (also used by the clock).

Opcode

46 (0x2e)

Availability

Like some other XBIOS functions, if the return code is 0x2e, it means the function is not supported.

Parameters

op is the operation to perform on the NVRAM data:

Name Value Operation
NVM_READ 0 Read bytes from NVRAM to buffer in RAM
NVM_WRITE 1 Write bytes from buffer in RAM to NVRAM
NVM_RESET 2 Reset NVRAM content

start is the start offset in the NVRAM buffer.
count is the number of bytes to process.
buffer is a pointer to a buffer where the function will read from/write to data.

Binding

	pea	buffer
	move.w	count,-(sp)
	move.w	start,-(sp)
	move.w	op,-(sp)
	move.w	#$2e,-(sp)
	trap	#14
	lea	12(sp),sp


Return Value

Returns 0 if succeeded, or a negative error code.

NVRAM content

Here are currently known values stored in the NVRAM. They were not documented by Atari.

Name Offset Value Description
NVRAM_BOOT 1 - OS preference
- - 0x00 None
- - 0x08 Magic
- - 0x10 Linux
- - 0x20 NetBSD?
- - 0x40 SVR4
- - 0x80 TOS
NVRAM_LANGUAGE 6 - Language
- - 0 US English
- - 1 German
- - 2 French
- - 3 UK English
- - 4 Spanish
- - 5 Italian
NVRAM_KEYBOARD 7 - Keyboard mapping
- - 0 USA
- - 1 Germany
- - 2 France
- - 3 UK
- - 4 Spanish
- - 5 Italia
- - 6 Sweden
- - 7 Swiss (French)
- - 8 Swiss (German)
- - 9 Turkey
- - 10 Finland
- - 11 Norway
- - 12 Denmark
- - 13 Saudi Arabia
- - 14 Holland
- - 15 Czechoslovakia
- - 16 Hungary
- - 17 Slovakia
- - 18 Greece
NVRAM_DATE_FMT 8 - Date and time format (bitmask between date and time values)
- - 0x00 Time: 12 hours
- - 0x10 Time: 24 hours
- - 0x00 Date: MMDDYY
- - 0x01 Date: DDMMYY
- - 0x02 Date: YYMMDD
- - 0x03 Date: YYDDMM
NVRAM_DATE_SEP 9 - Date separator (ASCII character code)
NVRAM_DELAY 10 0 to 255 Boot delay (in seconds)
NVRAM_VIDEO_HI 14 - High byte of video mode code
NVRAM_VIDEO_LO 15 - Low byte of video mode code
NVRAM_SCSI_ARB 16 - SCSI arbitration (bitmask)
- - 0x00 Disabled
- - 0x80 Enabled
- - 0 to 7 SCSI device number for Falcon

Il n'y a pas de commentaire sur cette page. [Afficher commentaires/formulaire]