Re: ZX81 emulator for iOS
Posted: Tue Dec 27, 2016 1:31 am
same for the microdigital tk85.
Discussion forums for users of the Sinclair 8-bit range of computers - ZX80, ZX81, ZX Spectrum, Z88, clones...
https://sinclairzxworld.com/
Err, the Timex "ULA" directly controls the DRAM chips /RAS, /CAS and /WR control lines... and a buffer chip is used to isolate the lower address bus, unlike a Sinclair ZX81 (where resistors are used). The buffer is directly controlled by the Timex ULA as well...gozzo wrote:the ts 1500 uses dynamic rams so i suppose it would need similar mod as the rampacks..
Apart from 1024MAK technical details.kpalser wrote:Thank you for all your efforts!dr beep wrote:Well, Kevin. Time is on your site.
We played games and I found some time to finish the texting and files.
Now in your mail.
Not only the 1K games, but also SHOGUN, My first ZX81 program, added.
Fun part: since spring there is a SHOGUN-app for download, but my AI is better and the game will be free.
Time to admit to arrogance in an assumption on my part. Whilst I'd seen YouTube videos of your games, today was the first time I ran them on the app emulator core. I understood that 16K WRX programs need a hardware modification in the RAM pack (is that true of TS1500?) but 1K WRX could work on unmodified ZX81s. Hence, my assumption that 1K WRX would just work with the app. Something is off in my code - it was written independently of other ZX81 emulators based on studying the various online sources documenting the hardware and has run fine with everything that I had thrown at it. That is up to now.
Subsequently, I have fired up EightyOne on a PC emulator (being a Mac user) and saw the same behaviour when WRX is not turned on. I've just been consulting the EightyOne source code, in particular the "BYTE zx81_opcode_fetch(int Address)" function to see how it handles the WRX option. It's structured quite differently from my code.
My focus in the short term has changed to fixing the WRX shortcoming in the app so that I can include your games.
Code: Select all
final func readM1CycleZ80(fromAddress address: UInt16) -> UInt8 {
// Memory Map:
// 0-8K BASIC ROM.
// 8-16K Shadow of BASIC ROM. Can be disabled by 64K RAM pack.
// 16K-17K Area occupied by 1K of onboard RAM. Disabled by RAM packs.
// 16K-32K Area occupied by 16K RAM pack.
// 8K-64K Area occupied by 64K RAM pack.
// use memoryPointer instead of "memory[Int(address)]" to avoid performance
// penalties of bounds checking
// take into account the address line
if (address & 0x8000) == 0 {
return memoryPointer.advanced(by: Int(address)).pointee
} else {
// simulate the address lines pointing to a memory
// address before 32768
let readByte: UInt8 = memoryPointer.advanced(by: Int((address & 16383) &+ 16384)).pointee
// "The hardware in the ZX81 ULA takes control when any opcode
// is executed above 32K (A15 high and M1 low) with data bit 6
// equal to zero."
if (readByte & 64) == 0 {
if !sendingSyncSignal {
processConsumedCPUCycles()
let romAddress: UInt16
// generate the adress to the 8bit scanline pattern in the ROM
if Z80CPU.I >= 32 { // <- new for WRX
// WRX
// I register + R
romAddress = (UInt16(Z80CPU.I) << 8) | UInt16(Z80CPU.R) // <- new for WRX
} else {
// A9-A15 (I register), A3-A8 (ULA 6 bit character code), A0-A2 (ULA MODULO)
romAddress = (UInt16(Z80CPU.I) << 8) | (UInt16(readByte & 63) << 3) | UInt16(lineControl)
}
var videoByte: UInt8
if (romAddress & 0x8000) == 0 {
videoByte = memoryPointer.advanced(by: Int(romAddress)).pointee
} else {
videoByte = memoryPointer.advanced(by: Int((romAddress & 16383) &+ 16384)).pointee
}
// invert the video pixels if bit 7 of the character code is set
if (readByte & 128) != 0 {
videoByte = ~videoByte
}
displayView.addWriteEightPixelsToQueue(videoByte)
cyclesPassedToDisplay = cyclesPassedToDisplay &+ 4
}
// "The ULA forces the data lines low. The CPU interprets
// the byte as a NOP" (0x0)
return 0x0
}
return readByte
}
}
Yes, it is his emulatorAmericanPi wrote:@kpalser
I ReTweeted someone who said they just got one for their iPad.
https://t.co/iIvOB1Lt6H
Is that your emulator.
_I wish there was one for android
__heck I'de build one myself if I wasn't knee deep in making a listing of all the know ZX81 Versions (still chuggin), and knew how lol
dr beep wrote:
Yes, it is his emulator
Yes, it is my othello
Android is (far) future (read info).
I would not consider dr beep's post to be rude.AmericanPi wrote:dr beep wrote:
Yes, it is his emulator
Yes, it is my othello
Android is (far) future (read info).
Your response is pretty short and seems purposefully snippity.
Are you being purposefully rude?