init work

This commit is contained in:
Kyle J Cardoza 2024-07-11 23:47:54 -04:00
parent 3a46f91535
commit f749b29b7b
4 changed files with 19 additions and 3 deletions

View File

@ -2,6 +2,7 @@
(memory RAM (memory RAM
(address (#x000200 . #x001FFF)) (address (#x000200 . #x001FFF))
(type RAM)
(section zhuge) (section zhuge)
(section znear) (section znear)
(section zdata) (section zdata)
@ -18,6 +19,7 @@
(memory ROM (memory ROM
(address (#xC00000 . #xC0FFFF)) (address (#xC00000 . #xC0FFFF))
(type ROM)
(section (low_rom #xC08000)) (section (low_rom #xC08000))
(section code) (section code)
(section farcode) (section farcode)

View File

@ -42,5 +42,17 @@ delay_y
// Disable the on-CPU RAM // Disable the on-CPU RAM
w65c265s_sram_off w65c265s_sram_off
; Set P5.4 and P5.5 as output
lda #0b00110000
trb PDD5
tsb PDD5
trb PD5
; Set P6.1 as output
lda #0b00000010
trb PDD6
tsb PDD6
trb PD6
// And we are booted enough to jump to high ROM. // And we are booted enough to jump to high ROM.
jmp long:__program_root_section jmp long:__program_root_section

View File

@ -18,12 +18,15 @@
#endif #endif
#include "macros.h" #include "macros.h"
#include "65c816.h"
#include "w65c265s.h"
;;; *************************************************************************** ;;; ***************************************************************************
;;; ;;;
;;; __program_start - actual start point of the program ;;; __program_start - actual start point of the program
;;; ;;;
;;; Set up CPU stack, initialize sections and call main(). ;;; Set up CPU stack, ini
#include "65c816.h"tialize sections and call main().
;;; You can override this with your own routine, or tailor it as needed. ;;; You can override this with your own routine, or tailor it as needed.
;;; The easiest way to make custom initialization is to provide your own ;;; The easiest way to make custom initialization is to provide your own
;;; __low_level_init which gets called after stacks have been initialized. ;;; __low_level_init which gets called after stacks have been initialized.

View File

@ -6,6 +6,5 @@
// Copyright © 2024 Kyle J Cardoza <Kyle.Cardoza@icloud.com> // Copyright © 2024 Kyle J Cardoza <Kyle.Cardoza@icloud.com>
void main(void) { void main(void) {
for (;;) {} for (;;) {}
} }