/[VRac]/Galaksija.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /Galaksija.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 140 by dpavlin, Sun Aug 5 01:02:59 2007 UTC revision 163 by dpavlin, Sun Aug 5 20:02:14 2007 UTC
# Line 8  use File::Slurp; Line 8  use File::Slurp;
8  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
9  use Z80; # import  use Z80; # import
10    
11  use base qw(Class::Accessor VRac Z80 Screen Prefs);  use base qw(Class::Accessor VRac Z80 Screen Prefs Session);
12  __PACKAGE__->mk_accessors(qw(booted));  __PACKAGE__->mk_accessors(qw(booted));
13    
14  =head1 NAME  =head1 NAME
# Line 17  Galaksija - Galaksija emulator Line 17  Galaksija - Galaksija emulator
17    
18  =head1 VERSION  =head1 VERSION
19    
20  Version 0.00  Version 0.01
21    
22  =cut  =cut
23    
24  our $VERSION = '0.00';  our $VERSION = '0.01';
25    
26  =head1 SUMMARY  =head1 SUMMARY
27    
# Line 116  Read from memory Line 116  Read from memory
116    
117  =cut  =cut
118    
 my $keyboard = {};  
   
119  sub read {  sub read {
120          my $self = shift;          my $self = shift;
121          my ($addr) = @_;          my ($addr) = @_;
# Line 151  sub write { Line 149  sub write {
149    
150  =head1 Architecture specific  =head1 Architecture specific
151    
152    =cut
153    
154    my @keymap = (
155            'a' .. 'z',
156            qw/up down left right space/,
157            '0' .. '9',
158            ':', '"', ',', '=', '.', '/', 'enter', 'tab',
159            'left alt', 'delete', 'scroll lock', 'left shift'
160    );
161    
162    my $remap;
163    my $o = 1;
164    
165    foreach my $key ( @keymap ) {
166            $remap->{$key} = $o;
167            $o++;
168    }
169    
170    =head2 key_down
171    
172    =cut
173    
174    sub key_down {
175            my ( $self, $key ) = @_;
176            warn "key down: $key ", $remap->{$key};
177            $self->write( 0x2000 + $remap->{$key}, 0xfe );
178    }
179    
180    =head2 key_up
181    
182    =cut
183    
184    sub key_up {
185            my ( $self, $key ) = @_;
186            warn "key up: $key ", $remap->{$key};
187            $self->write( 0x2000 + $remap->{$key}, 0xff );
188    }
189    
190  =head2 render_vram  =head2 render_vram
191    
192  Simple hex dumper of text buffer  Simple hex dumper of text buffer
# Line 205  L<VRac>, L<Screen>, L<Z80> Line 241  L<VRac>, L<Screen>, L<Z80>
241    
242  Dobrica Pavlinusic, C<< <dpavlin@rot13.org> >>  Dobrica Pavlinusic, C<< <dpavlin@rot13.org> >>
243    
 Based on Galaxy Win emulator L<http://emulator.galaksija.org/>  
   
244  =head1 BUGS  =head1 BUGS
245    
246    Galaksija Plus isn't emulated. I don't have additional rom, but I would
247    B<love> to have support for this machine. So if you have ROM for Galaksija
248    Plus, get in touch!
249    
250  =head1 ACKNOWLEDGEMENTS  =head1 ACKNOWLEDGEMENTS
251    
252  See also L<> which is source of all  Based on Galaxy emulator L<http://emulator.galaksija.org/> for Windows which
253  info about this machine (and even hardware implementation from 2007).  is in turn based on DOS version by Miodrag JevremoviŠ
254    L<http://solair.eunet.yu/~jovkovic/galaxy/>.
255    
256  =head1 COPYRIGHT & LICENSE  =head1 COPYRIGHT & LICENSE
257    

Legend:
Removed from v.140  
changed lines
  Added in v.163

  ViewVC Help
Powered by ViewVC 1.1.26