m_genesis.kv 1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
m_genesis.kv 2 ;; ;;
m_genesis.kv 3 ;; This file is part of 'M', a MIPS system emulator. ;;
m_genesis.kv 4 ;; ;;
m_genesis.kv 5 ;; (C) 2019 Stanislav Datskovskiy ( www.loper-os.org ) ;;
m_genesis.kv 6 ;; http://wot.deedbot.org/17215D118B7239507FAFED98B98228A001ABFFC7.html ;;
m_genesis.kv 7 ;; ;;
m_genesis.kv 8 ;; You do not have, nor can you ever acquire the right to use, copy or ;;
m_genesis.kv 9 ;; distribute this software ; Should you use this software for any purpose, ;;
m_genesis.kv 10 ;; or copy and distribute it to anyone or in any manner, you are breaking ;;
m_genesis.kv 11 ;; the laws of whatever soi-disant jurisdiction, and you promise to ;;
m_genesis.kv 12 ;; continue doing so for the indefinite future. In any case, please ;;
m_genesis.kv 13 ;; always : read and understand any software ; verify any PGP signatures ;;
m_genesis.kv 14 ;; that you use - for any purpose. ;;
m_genesis.kv 15 ;; ;;
m_genesis.kv 16 ;; See also http://trilema.com/2015/a-new-software-licensing-paradigm . ;;
m_genesis.kv 17 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
m_genesis.kv 18
m_genesis.kv 19 ;; TODO: 'warm boot' command. Right now, 'shutdown' is the only supported cmd.
m_genesis.kv 20
m_genesis.kv 21 ;;;;;;;;;;;;;;;;;;;;;;;;;
m_genesis.kv 22 ;; Power Supply Device ;;
m_genesis.kv 23 ;;;;;;;;;;;;;;;;;;;;;;;;;
m_genesis.kv 24
m_genesis.kv 25 ;-----------------------------------------------------------------------------
m_genesis.kv 26 ;; Power Supply:
m_genesis.kv 27 DECLARE_BUS_DEVICE POWER, 0x410, 0x410
m_genesis.kv 28 ;-----------------------------------------------------------------------------
m_genesis.kv 29
m_genesis.kv 30 ;-----------------------------------------------------------------------------
m_genesis.kv 31 %define POWER_CMD_SHUTDOWN 0x01 ; 'Power off' immediately.
m_genesis.kv 32 ;-----------------------------------------------------------------------------
m_genesis.kv 33
m_genesis.kv 34 ;-----------------------------------------------------------------------------
m_genesis.kv 35 _PD_Read_Word_POWER: ; Word reads from POWER: always 0
m_genesis.kv 36 xor eax, eax
m_genesis.kv 37 ret ; Fin.
m_genesis.kv 38 ;-----------------------------------------------------------------------------
m_genesis.kv 39 _PD_Write_Word_POWER: ; Word writes to POWER do nothing!
m_genesis.kv 40 ret
m_genesis.kv 41 ;-----------------------------------------------------------------------------
m_genesis.kv 42 _PD_Read_Byte_POWER:
m_genesis.kv 43 xor eax, eax ; Read Byte from POWER: always 0
m_genesis.kv 44 ret
m_genesis.kv 45 ;-----------------------------------------------------------------------------
m_genesis.kv 46 _PD_Write_Byte_POWER:
m_genesis.kv 47 cmp dl, 1 ; 1 == shutdown
m_genesis.kv 48 jne _PD_Write_Byte_POWER_No_Shutdown ; if != 1, do not shut down
m_genesis.kv 49 Flg_On Shutdown ; Set the Shutdown flag.
m_genesis.kv 50 _PD_Write_Byte_POWER_No_Shutdown:
m_genesis.kv 51 ret ; Fin.
m_genesis.kv 52 ;-----------------------------------------------------------------------------
m_genesis.kv 53 _Device_Init_POWER: ; No init needed
m_genesis.kv 54 ret
m_genesis.kv 55 ;-----------------------------------------------------------------------------
m_genesis.kv 56 _Device_Shutdown_POWER: ; Nothing needed
m_genesis.kv 57 ret
m_genesis.kv 58 ;-----------------------------------------------------------------------------