Comments (5)
Where does the TF maps its fast mem in the address space? Is it in the Z3 range? It doesn't look like you're explicitly setting USP/SSP, so if SP is pointing to Z3 mapped fast mem (e.g. $6xxxxxxx) it will not translate correctly after MMU is enabled (since you ignore topmost 8 bits), and you'll be returning to some "random address" with rts.
Before installing the trap handlers in 30translate.i, try to add:
lea stacksetup(pc),a3
move.l a3,TRP0_INT_VECTOR
trap #0
stacksetup:
lea chip_stack_top,a3
move.l a3,sp
sub.l #$200*4,a3
move.l a3,usp
And this somewhere in chip bss:
align 4
ds.l $400
chip_stack_top:
(Of course code also shouldn't be in Z3 fast, but since it's not crashing immediately that doesn't seem to be the case)
from vamiga.
Before installing the trap handlers in 30translate.i, try to add:
Works like a charm on the TF534 after adding your code 😎:
from vamiga.
Strange. The test program executes this code:
setupTC:
move.l a4,a2
add.l #$2000,a2
; Install the Translate Control Register (TC)
; 8 : E = 1
; 0 : FCL = 0, SRE = 0
; 8 : PS = 256 bytes
; 84444 : IS = 8, TIA = 4, TIAB = 4, TIAC = 4, TIAD = 4
move.l #$80884444,(a2)
pmove (a2),TC
; At this point, the MMU is active and maps $Axxxxx to $Dxxxxx
; Added for debugging...
myloop:
move #$F00,$AFF180
move #$FF0,$AFF180
jmp myloop
rts
The code enables the MMU. It is set up to map $Axxxxx to $Dxxxxx which makes it possible to change the background color by writing into $AFF180 instead of $DFF180.
The myloop
stuff has been added for debugging. I do see color stripes on the real machine (A500 with Terrible Fire) which means the MMU is working. However, if the myloop
stuff is carried out right after the rts
(in the calling function), the program crashes. This means, on the real machine, the rts
does not return to the expected location. It sends the CPU to nirvana (but only on real hardware, not in UAE) 🤔.
from vamiga.
Where does the TF maps its fast mem in the address space?
OMG, that's it. I never thought about the upper memory area (my brain is hard-wired to the 24-bit address space of the old Amigas since I never had one the later machines 🙈). Indeed, the TF maps FastRam way beyond the 24-bit address space:
from vamiga.
Closed as the MMU project is on hold.
from vamiga.
Related Issues (20)
- Use whdload packages? HOT 3
- Improved thread synchronization HOT 2
- Improved exception handling HOT 2
- Add a warp-start feature HOT 2
- V2.3 HOT 1
- Smaller bugs in v2.3 HOT 1
- Add a short description for all known ROMs HOT 1
- Game: rings around the world CRASH HOT 5
- (very minor) Crash with certain extended ADF file HOT 13
- Implement more realistic audio filters HOT 14
- Chipset-settings not saved in .vAmiga HOT 6
- Add support for ADFs with less than 80 cylinders HOT 1
- Mouse Selecting/Mouse Caputuring/Use As Default Bug v2.4 HOT 3
- [macOS] invalid 'Apple Development' code-signature in latest release HOT 2
- 2.4 issues HOT 5
- New hardware HOT 25
- Using a folder as HDF HOT 1
- Majic 12 - Ray of hope 2 of hope glitches HOT 21
- Let's twist again isn't displayed correctly HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vamiga.