Click here to Skip to main content
15,887,268 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: No sacrifice, no victory Pin
Mircea Neacsu1-Jul-20 6:21
Mircea Neacsu1-Jul-20 6:21 
GeneralRe: No sacrifice, no victory Pin
CodeWraith1-Jul-20 9:06
CodeWraith1-Jul-20 9:06 
GeneralRe: No sacrifice, no victory Pin
RedDk1-Jul-20 8:12
RedDk1-Jul-20 8:12 
GeneralRe: No sacrifice, no victory Pin
CodeWraith1-Jul-20 9:37
CodeWraith1-Jul-20 9:37 
GeneralRe: No sacrifice, no victory Pin
CPallini1-Jul-20 23:32
mveCPallini1-Jul-20 23:32 
GeneralRe: No sacrifice, no victory Pin
CodeWraith2-Jul-20 1:26
CodeWraith2-Jul-20 1:26 
GeneralRe: No sacrifice, no victory Pin
CPallini2-Jul-20 1:31
mveCPallini2-Jul-20 1:31 
GeneralRe: No sacrifice, no victory Pin
ElectronProgrammer2-Jul-20 2:00
ElectronProgrammer2-Jul-20 2:00 
Hello. Sorry about the big block of text.

You mentioned the CDP1802 and, from what I read, it already has 16bit address but they are time multiplexed in 8bit. The best you can have is to insert an 8bit flip-flop to store the high 8bit of the address (or the low 8bit, whichever is sent first). There is probably some signal (pin or pins) that it uses to indicate when the first 8bit are sent and when the second 8bit are sent. You will need that to synchronize storing the address (allowing/disallowing writing to the flip-flops).

Keep in mind that, with 16bit, the most memory you can address is 65536 positions of 8bit, or 64kB.

Filesystem wise you have to go with something supporting at most 16 bit, like FAT16. Anything 32bit, like FAT32, is off the table since you would have to emulate the 32bit processing and that would most certainly kill performance. Even FAT16 might not run very fast or at all.

My recommendation would be for you to implement a raw flat filesystem. Think of the storage device as a fixed length file that has two lists, one starting at the lowest address and stores free positions of storage and positions of the start of the files (and maybe data like names, dates,etc), and another list starting at the highest address with the content of the files stored in reverse order (it is less problematic to expand files to free storage positions assuming you leave free space after each file). If you don't like the content in reverse order switch the positions of the two lists, in which case the first list will be in reverse order.

On a computer, you would have to either write a program that could handle this custom filesystem or write a FUSE layer to handle it seemingly. Writing a program that simply exports/imports all files from/to the filesystem to the filesystem of the computer is the easiest.

Advanced tip on expanding storage by using more flip-flops if both the CPU and storage device supports the timing: setup four flip-flops (remember these are 8bit wide) in the following manner: The first will store the high 8bit of the first address. The second will store the low 8bit of the first address. The third will store the data of the first address. The fourth will store the high 8bit of the second address. The low 8bit of the second address is pass-through.

Now you can use this trick to address up to 40bit worth of storage positions. Independently of you wanting to read or write to storage, first do a write with the high 16bit part of the address (bit 0 to 15) as the address and the 8bit data as the next 8bit of the address (bit 16 to 23). Next do the actual read/write from storage by passing the low 16bit of the address (bit 24 to 39) as the address.

If you need even more storage, you can add one more write using three extra flip-flops and use it as a block addresser. This would allow you to address 40bit storage positions of 24bit blocks or 48bit storage positions with 16bit blocks depending how you want to view it.

I have done something similar a long time ago with an 8051 and a 256MB disk.

Good luck Wink | ;)
GeneralRe: No sacrifice, no victory Pin
CodeWraith2-Jul-20 5:01
CodeWraith2-Jul-20 5:01 
GeneralRe: No sacrifice, no victory Pin
ElectronProgrammer2-Jul-20 9:54
ElectronProgrammer2-Jul-20 9:54 
GeneralRe: No sacrifice, no victory Pin
CodeWraith2-Jul-20 11:34
CodeWraith2-Jul-20 11:34 
GeneralRe: No sacrifice, no victory Pin
AlphaNerd2-Jul-20 7:39
AlphaNerd2-Jul-20 7:39 
GeneralOK - Now I Get It ! Pin
W Balboos, GHB1-Jul-20 0:57
W Balboos, GHB1-Jul-20 0:57 
GeneralRe: OK - Now I Get It ! Pin
Slacker0071-Jul-20 1:32
professionalSlacker0071-Jul-20 1:32 
GeneralRe: OK - Now I Get It ! Pin
ZurdoDev1-Jul-20 1:42
professionalZurdoDev1-Jul-20 1:42 
GeneralRe: OK - Now I Get It ! Pin
musefan1-Jul-20 1:45
musefan1-Jul-20 1:45 
GeneralRe: OK - Now I Get It ! Pin
W Balboos, GHB1-Jul-20 1:51
W Balboos, GHB1-Jul-20 1:51 
GeneralRe: OK - Now I Get It ! Pin
dandy721-Jul-20 3:26
dandy721-Jul-20 3:26 
GeneralRe: OK - Now I Get It ! Pin
W Balboos, GHB1-Jul-20 3:48
W Balboos, GHB1-Jul-20 3:48 
GeneralRe: OK - Now I Get It ! Pin
ZurdoDev1-Jul-20 1:58
professionalZurdoDev1-Jul-20 1:58 
GeneralRe: OK - Now I Get It ! Pin
Slacker0071-Jul-20 2:16
professionalSlacker0071-Jul-20 2:16 
GeneralRe: OK - Now I Get It ! Pin
Slacker0071-Jul-20 2:18
professionalSlacker0071-Jul-20 2:18 
GeneralRe: OK - Now I Get It ! Pin
musefan1-Jul-20 1:43
musefan1-Jul-20 1:43 
GeneralRe: OK - Now I Get It ! Pin
W Balboos, GHB1-Jul-20 1:47
W Balboos, GHB1-Jul-20 1:47 
GeneralRe: OK - Now I Get It ! Pin
musefan1-Jul-20 1:54
musefan1-Jul-20 1:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.