Posts

This profile is from a federated server and may be incomplete. Browse more on the original instance.

bread80, to random
@bread80@mstdn.social avatar

AI in science fiction: Insufficent data, unable to compute.

AI in the real world: Here’s a couple of pages that sound plausible.

bread80, to random
@bread80@mstdn.social avatar

After an evening wrestling with Inkscape I’m ready for an early night. But the diagram actually looks pretty good, and means I’m significantly closer to publishing an article I wrote six months ago.

bread80, to random
@bread80@mstdn.social avatar

I’m secretly happy about the Sonos app-pocalyse. It’s given me the kick I needed to finally ditch it and move to something (hopefully) better.

bread80,
@bread80@mstdn.social avatar

@RetroFunPL New ‘improved’ app, rewritten from the ground up.

The UX is horrible. The key pain point for me is that there doesn’t seem to be any way to connect to the NAS. Although it did work for the first five minutes, but the artists list had no A-Z quick links and I was having to scroll down through several hundred entries.

bread80,
@bread80@mstdn.social avatar

@RetroFunPL zone day I’ll have cable everywhere and LAN sockets. Not sure I want the hassle and disruption just yet though.

bread80, to random
@bread80@mstdn.social avatar

I've renamed the EXTERN directive to CALL. That feels a lot more logical given it's function (to call assembly code such as ROM routines).

It also makes it straightforward to implement an RST directive to call assembly via a Z80 RST instruction.

(In the screenshot I've cleaned up the comments in the output to make it easier to read.)

bread80, to random
@bread80@mstdn.social avatar

update: Write and writeln marks the end of the the refactoring of operations and primitives which has taken up the last few months.

I've also refactored a few other parts to better future proof them.

There a still a few rough edges to smooth off in the expression parser (implicit types) and code generator (parameter loading and validation).

But this means I can now return to interesting stuff :) as well as moving towards some kind of initial (pre-beta) release.

Output if the test program running on an Amstrad CPC emulator.

bread80, to random
@bread80@mstdn.social avatar

I/O on the 2200 (as I'm understanding it) :

The instructions are similar to the i8008. Bits 4 to 1 of the bytecode code the I/O port. 32 addresses, but the first 8 are inputs, mapped to instructions IN 0..7. The remaining 24 are outputs mapped to instructions OUT 0..23.

The Datapoint uses the instruction EX for outputs (short for external IIRC)). Rather than port numbers it uses names. The first 8 are generic:
EX ADR
EX STATUS
EX DATA
EX WRITE
EX COM1 though EX COM4
🧵

bread80,
@bread80@mstdn.social avatar

To poll a device for input data:
Set A to device address
EX ADR ;Device selected
EX STATUS ;Prepare to read status byte
INPUT ;Read status byte
Check value. If data available:
EX DATA ;Prepare to read data
INPUT ;Read data
Data is now in A register.

All of which is horribly long winded.

bread80,
@bread80@mstdn.social avatar

However, the output port is decoded on the decoder board using bits 4..1 of the instruction register. They're exposed on pins on the processor boards edge connector.

The instruction decoding for the INPUT command looks to be partial enough that it is issued irrespective of the port address. If so another board could be decoding I4..I1 to give an input port address.

(But the pinouts for every board are unique to that board. It's possible no other board has access to them).

bread80, to random
@bread80@mstdn.social avatar

I'm adding a basic terminal to the 2200 simulator. It's listening to output ports (input still to do).

Here's a video of it saying "Hello World" in it's own fashion. Program listing in video comments.

https://youtu.be/FzSDf94Q0Ao

bread80,
@bread80@mstdn.social avatar

BTW the 'Clocks' readout on the simulator counts half cycles. The simulation takes just over 700k half cycles to run. That translated to about 35ms at the 9.84MHz crystal frequency.

bread80, to random
@bread80@mstdn.social avatar

RIP Z80 🥲

End of life notification letter:
https://www.mouser.com/PCN/Littelfuse_PCN_Z84C00.pdf

sourdust,
@sourdust@toot.wales avatar

@bread80 Wow. I though they still ran about 40% of... everything?

RetroFunPL,
@RetroFunPL@8bit.red avatar

@bread80 This has put me in denial, but also sparked a post to check and share how many systems actually ran on it. Hundreds, I say.

https://retrofun.pl/2024/04/19/rip-z80-cpu/

bread80, to random
@bread80@mstdn.social avatar

Returning to the simulator to try and fix a thorny issue that's been eluding me for a while.

The four chips at the bottom are '193 counters which normally house the program counter. Above are a row of '153 4-to-1 multiplexers. These can load an address from the stack, the H, L registers or the temp address register (for inline jump, call addresses).

bread80,
@bread80@mstdn.social avatar

Executing the LAM instruction (equivalent to LD A,(HL) in Z80) involves storing PC on the stack, asserting /ADDR_SEL.HL to set the multiplexers and /ADDR.LOAD to latch the data in the counters. Data latched whenever the signal is low.

But the simulator loads all 1 bits - the 'off' value for the multiplexers.

bread80,
@bread80@mstdn.social avatar

/ADDR_SEL.HL and /ADDR.LOAD are driven by the same circuit, timing separated by gate delays. Presumably this works in the original machine but my simulator is experiencing some kind of race condition which keeps.

I've tweaked the simulated gate delays for the multiplexers and the timing logs show they're changing /after/ LOAD is cancelled. Next stage is to add some detailed logging to the chips to see what's happening.

bread80, to random
@bread80@mstdn.social avatar

All these people getting excited about not seeing the sun for a few minutes should try living in Britain. We can go entire months without seeing the sun.

bread80, to random
@bread80@mstdn.social avatar

"A programmer that's never programmed a computer in binary is like a child that's never run barefoot over Lego."

Also can you spot the schoolboy error in the first line of code? Which means all the jump target addresses are wrong and I need to redo a lot of stuff.

devlin,
@devlin@topspicy.social avatar

@bread80 06, not 07?

bread80,
@bread80@mstdn.social avatar

@devlin 06 is the correct opcode for LA (load A with immediate), but I forgot the immediate data. 07 should be the second byte of the instruction.

bread80, to random
@bread80@mstdn.social avatar

If you’re making an audio player and I press the back button two seconds into a track it probably means I want to play the previous track, not skip back to the beginning of the current one.

Extelec,
@Extelec@mstdn.social avatar

@bread80 I will accept two quick presses for the previous track

bread80,
@bread80@mstdn.social avatar

@Extelec Sadly double clicking doesn’t seem to work on touch screens.

bread80, to random
@bread80@mstdn.social avatar

I fixed the ALU issue. The clock input of the carry flag latch wasn't triggering. The circuit uses a couple of open-collector gates and a pull-up. A bug in my simulator failed to recognise the net's rising edge.

A few upgrades to the simulator so it can free run and some speed ups. Below is after adding 1 to A and looping until the carry flag is set, using a JFC (Jump if Carry False) and HALTing.

bread80,
@bread80@mstdn.social avatar

Note the Clocks count in the previous image: 2.6 million. That's counting half cycles of the 9.84MHz crystal.

So that simple code took over a tenth of a second to execute! This machine was not fast.

For every jump the shift memory has to be clocked until it's in the correct position. There are 512 bits per chip. At 1.2MHz it takes about 500uS for a full rotation, or about 2,000 rotations per second.

The same goes for any memory access and subroutine calls and returns.

bread80, to random
@bread80@mstdn.social avatar

I’m reading up on this XZ security issue. Does it affect the XZ80 and XZ81 or is it only the XZ Spectrum that’s at risk?

phlash,
@phlash@mastodon.me.uk avatar

@bread80 the 80 and 81 are safe but the Spectrum will need you to tape the RAM pack on just in case...

groxx,
@groxx@hachyderm.io avatar

@bread80 it's the whole spectrum

bread80, to random
@bread80@mstdn.social avatar

Todays test program: load values into the A and B registers, add (or subtract) them and loop.

I've got the jump working but the ALU ops are not so pretty. It's inverting each bit of A if the bit in B is set. The circuit for the ALU is all standard gates, and I'd be surprised if there's any bugs in there given the rest of the simulator is working so well.

So it's probably a schematic issue, and one which will take a bit of debugging.

poleguy,
@poleguy@mastodon.social avatar

@bread80 cost? Did xor cost more than nand/nor?

Bom consolidation?

bread80,
@bread80@mstdn.social avatar

@poleguy If there were spare gates around that may have made sense.

I’m also wondering if the intermediate products were useful in some way. But if it’s more efficient to make and adder without XOR gates I feel like the entire electronics industry has missed something big!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • cubers
  • osvaldo12
  • InstantRegret
  • magazineikmin
  • ethstaker
  • rosin
  • Youngstown
  • slotface
  • ngwrru68w68
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • megavids
  • khanakhh
  • cisconetworking
  • Durango
  • GTA5RPClips
  • thenastyranch
  • tacticalgear
  • modclub
  • tester
  • normalnudes
  • provamag3
  • anitta
  • Leos
  • lostlight
  • All magazines